/*
 * EWAY-Design (neu) – Bausteine: Buttons, Badges, Avatare, Karten, Tabellen, Tabs, Filter,
 * Formulare, Dropzone, Hinweise, Fortschritt, Leer-Zustand, Lichtschleier.
 * Plan: plans/layout.md · HTML-Aufbau: inc/php_functions/ui.php · Vorschau: system/styleguide
 * Wirkt nur auf Elemente mit ew-Klassen.
 */

/* ---------- Buttons ---------- */

.ew-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--ew-line-strong);
    border-radius: var(--ew-radius);
    background-color: transparent;
    color: var(--ew-text);
    font: 600 13px/1 var(--ew-font);
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--ew-transition), border-color var(--ew-transition), color var(--ew-transition);
}
.ew-btn:hover { background-color: var(--ew-hover); border-color: var(--ew-line-strong); color: var(--ew-text); }
.ew-btn:active { transform: translateY(1px); }
.ew-btn .ew-icon { font-size: 16px; }

.ew-btn-primary { background-color: var(--ew-accent); border-color: var(--ew-accent); color: var(--ew-on-accent); }
.ew-btn-primary:hover { background-color: var(--ew-accent-hover); border-color: var(--ew-accent-hover); color: var(--ew-on-accent); }

.ew-btn-ghost { border-color: transparent; color: var(--ew-text-soft); }
.ew-btn-ghost:hover { border-color: transparent; color: var(--ew-text); }

.ew-btn-danger { background-color: var(--ew-danger-tint); border-color: transparent; color: var(--ew-danger); }
.ew-btn-danger:hover { background-color: var(--ew-danger-tint); border-color: var(--ew-danger); color: var(--ew-danger); }

.ew-btn-danger-solid { background-color: var(--ew-danger); border-color: var(--ew-danger); color: var(--ew-on-danger); }
.ew-btn-danger-solid:hover { filter: brightness(1.06); background-color: var(--ew-danger); color: var(--ew-on-danger); }

.ew-btn-sm { height: 30px; padding: 0 11px; font-size: 12px; }
.ew-btn-block { width: 100%; }
.ew-btn[disabled],
.ew-btn.disabled { opacity: .45; pointer-events: none; }

/* Icon-Button (quadratisch) */
.ew-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--ew-radius);
    background-color: transparent;
    color: var(--ew-text-muted);
    cursor: pointer;
    position: relative;
    transition: background-color var(--ew-transition), color var(--ew-transition);
}
.ew-icon-btn:hover,
.ew-icon-btn.show { background-color: var(--ew-active); color: var(--ew-text); }
.ew-icon-btn.ew-outline { border-color: var(--ew-line); color: var(--ew-text-soft); }
.ew-icon-btn.ew-outline:hover { border-color: var(--ew-line-strong); }
.ew-icon-btn-sm { width: 26px; height: 26px; }
/* so hoch wie .ew-btn und mit demselben Rand – Symbol-Knöpfe neben normalen Knöpfen, z. B. in der Kopfzeile (seit 2026-11-27, slides/infoscreens edit) */
.ew-icon-btn-md { width: 36px; height: 36px; }
.ew-icon-btn-md.ew-outline { border-color: var(--ew-line-strong); }
.ew-icon-btn.ew-danger:hover { background-color: var(--ew-danger-tint); color: var(--ew-danger); }
.ew-icon-btn.ew-icon-btn-danger { background-color: var(--ew-danger-tint); border-color: transparent; color: var(--ew-danger); }
.ew-icon-btn.ew-icon-btn-warning { background-color: var(--ew-warning-tint); border-color: transparent; color: var(--ew-warning); }
.ew-icon-btn.ew-icon-btn-danger-solid { background-color: var(--ew-danger); border-color: transparent; color: var(--ew-on-danger); }
.ew-icon-btn.ew-icon-btn-danger:hover,
.ew-icon-btn.ew-icon-btn-warning:hover { filter: brightness(1.15); }
.ew-icon-btn.ew-icon-btn-danger-solid:hover { filter: brightness(1.08); color: var(--ew-on-danger); }

/* Puls-Ring um einen Icon-Button (z. B. neue Nachrichten auf dem Anrufbeantworter) */
@keyframes ew-pulse { 0% { transform: scale(1); opacity: .75; } 60%, 100% { transform: scale(1.5); opacity: 0; } }
.ew-pulse::after {
    content: "";
    position: absolute;
    inset: -1px;
    border: 2px solid var(--ew-danger);
    border-radius: inherit;
    pointer-events: none;
    animation: ew-pulse 2.2s ease-out infinite;
}
.ew-pulse .ew-count { z-index: 1; }
@media (prefers-reduced-motion: reduce) { .ew-pulse::after { animation: none; opacity: 0; } }

/* Hinweispunkt (z. B. neue Hinweise, fällige Aufgaben) */
.ew-indicator {
    position: absolute;
    top: -3px;
    right: -3px;
    display: block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: var(--ew-danger);
    box-shadow: 0 0 0 2px var(--ew-bg-header);
}
.ew-indicator.ew-indicator-start { left: -3px; right: auto; }

@keyframes ew-blink { 50% { opacity: .35; } }
.ew-blink { animation: ew-blink 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .ew-blink { animation: none; } }
.ew-icon-btn .ew-icon { font-size: 17px; vertical-align: 0; color: inherit; } /* inherit: Metronic färbt i.bi sonst grau */
.ew-icon-btn .ew-count { position: absolute; top: -6px; right: -7px; }
.ew-icon-btn .ew-count-danger { box-shadow: 0 0 0 2px var(--ew-bg-header); }


/* ---------- Badges, Zähler, Avatare ---------- */

.ew-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--ew-radius-badge);
    background-color: var(--ew-neutral-tint);
    color: var(--ew-text-soft);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
}
.ew-badge .ew-icon { font-size: 13px; vertical-align: 0; }
.ew-badge-accent { background-color: var(--ew-accent-tint); color: var(--ew-accent-text); }
.ew-badge-success { background-color: var(--ew-success-tint); color: var(--ew-success); }
.ew-badge-warning { background-color: var(--ew-warning-tint); color: var(--ew-warning); }
.ew-badge-danger { background-color: var(--ew-danger-tint); color: var(--ew-danger); }
.ew-badge-info { background-color: var(--ew-info-tint); color: var(--ew-info); }
.ew-badge-outline { background-color: transparent; box-shadow: inset 0 0 0 1px var(--ew-line-strong); color: var(--ew-text-muted); font-weight: 500; }   /* zurückgenommen, z. B. Datum in der Vergangenheit */

/* KI-Badge (seit 2026-11-24, plans/ai_credits.md Abschnitt 0): steht vor jeder KI-Funktion – ui_ai_badge(), Knopf ui_ai_button() */
.ew-ai-badge {
    display: inline-flex;
    align-items: center;
    flex: none;
    padding: 2px 6px;
    border-radius: 5px;
    background-color: var(--ew-info);
    color: var(--ew-on-info);
    font: 700 10px/1.2 var(--ew-font);
    letter-spacing: .03em;
    text-transform: none;
    white-space: nowrap;
}
.ew-btn-sm .ew-ai-badge { padding: 2px 5px; font-size: 9.5px; }
.ew-ai-btn[hidden] { display: none !important; }   /* z. B. „KI Vorschlagen“ beim Alt-Text nur bei leerem Feld (seit 2026-11-26) */
.ew-ai-dialog-title { display: inline-flex; align-items: center; gap: 10px; }
.ew-ai-dialog-title .ew-ai-badge { font-size: 12px; padding: 3px 8px; }
.ew-ai-dialog-more { margin-top: 10px; color: var(--ew-text-muted); font-size: 13px; }
/* Verbrauch und Hinweis in KI-Hinweisen (seit 2026-11-29, Wunsch Nutzer): ui_ai_cost()/ui_ai_note() in ui.php, ui_ai_cost_html()/ui_ai_confirm() in ui.js */
.ew-badge-ai { background-color: var(--ew-info); color: var(--ew-on-info); }
.ew-ai-cost { color: var(--ew-text); line-height: 1.6; }
.ew-ai-cost .ew-badge { vertical-align: 1px; }
.ew-ai-cost-sm { margin-top: 4px; font-size: 12px; color: var(--ew-text-soft); }
.ew-ai-cost-sm .ew-badge { padding: 1px 6px; font-size: 11px; }
.ew-we-mup-cost { padding-left: 27px; }   /* unter dem Text der Checkbox im Fenster „Bilder“ (_api_web_multi.php) */
.ew-ai-line { margin-top: 4px; }
.ew-ai-note { margin-top: 14px; padding: 10px 12px; border-radius: var(--ew-radius); background-color: var(--ew-neutral-tint); color: var(--ew-text-muted); font-size: 12.5px; line-height: 1.5; }
.ew-ai-note p { margin: 0; }

.ew-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 17px;
    padding: 0 5px;
    border-radius: 9px;
    background-color: var(--ew-accent);
    color: var(--ew-on-accent);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}
.ew-count-danger { background-color: var(--ew-danger-count); color: var(--ew-on-danger-count); }

.ew-dot { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; background-color: currentColor; }

.ew-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 32px;
    height: 32px;
    overflow: hidden;
    border-radius: 50%;
    background-color: var(--ew-accent-tint);
    color: var(--ew-accent-text);
    font-size: 12px;
    font-weight: 600;
}
.ew-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ew-avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.ew-avatar-lg { width: 40px; height: 40px; font-size: 14px; }
.ew-avatar-xl { width: 64px; height: 64px; font-size: 22px; }
.ew-avatar-info { background-color: var(--ew-info-tint); color: var(--ew-info); }
.ew-avatar-neutral { background-color: var(--ew-neutral-tint); color: var(--ew-text-muted); }
.ew-avatar.ew-selected { outline: 2px solid var(--ew-accent); outline-offset: 2px; }

.ew-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ew-person-name { font-weight: 600; color: var(--ew-text); }
.ew-person-sub { color: var(--ew-text-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Kontaktkarte („Visitenkarte“, ui_contact()): bewusst keine .ew-list-row, sonst wirkt sie wie eine Tabelle */
.ew-contact { display: flex; gap: 16px; padding: 20px; }
.ew-contact-main { flex: 1 1 auto; min-width: 0; }
.ew-contact-name { display: block; color: var(--ew-text); font-size: 16px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; text-decoration: none; }
a.ew-contact-name:hover { color: var(--ew-text); text-decoration: underline; }
.ew-contact-role { margin-top: 1px; color: var(--ew-text-muted); font-size: 12px; overflow-wrap: anywhere; }
.ew-contact-lines { display: flex; flex-direction: column; gap: 1px; margin: 10px -8px 0; }
.ew-contact-line { display: flex; align-items: center; gap: 8px; padding: 3px 8px; border-radius: var(--ew-radius-badge); color: var(--ew-text); overflow-wrap: anywhere; text-decoration: none; }
.ew-contact-line > span:last-child { min-width: 0; }
.ew-contact-line .ew-icon { flex: none; width: 16px; color: var(--ew-text-muted); font-size: 15px; text-align: center; }
a.ew-contact-line { transition: background-color var(--ew-transition); }
a.ew-contact-line:hover { background-color: var(--ew-hover); }
a.ew-contact-line:hover .ew-link { text-decoration: underline !important; }
a.ew-contact-line:focus-visible { outline: 0; box-shadow: var(--ew-focus-ring); }
.ew-contact-note { display: flex; gap: 7px; margin-top: 12px; color: var(--ew-text-soft); font-size: 12px; overflow-wrap: anywhere; }
.ew-contact-note .ew-icon { flex: none; margin-top: 1px; color: var(--ew-text-muted); font-size: 14px; }
.ew-contact-lines + .ew-contact-note { padding-top: 11px; border-top: 1px solid var(--ew-line); }
.ew-contact-empty { margin-top: 10px; color: var(--ew-text-muted); font-size: 12px; }
/* im Dialog (Fenster „Person“): Kreuz oben rechts statt Kopfzeile, die Karte ist der Kopf */
.ew-contact-close { position: absolute; top: 10px; right: 10px; z-index: 2; }
.ew-contact-close + .ew-contact { padding: 24px 52px 24px 24px; }
/* Smartphone: Tippfläche je Zeile mindestens 44 px */
@media (max-width: 575.98px) {
    .ew-contact-lines { gap: 0; }
    .ew-contact-line { min-height: 44px; padding: 4px 8px; }
}


/* ---------- Karten ---------- */

.ew-card {
    background-color: var(--ew-surface);
    border: 1px solid var(--ew-line-strong);   /* Außenrahmen wie Kontextmenüs – klarer vom Hintergrund abgesetzt (Wunsch Nutzer 2026-10-24) */
    border-radius: var(--ew-radius-card);
    color: var(--ew-text);
}
.ew-card-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--ew-line);
}
.ew-card-title { margin: 0; font-size: 15px; font-weight: 600; color: var(--ew-text); }
.ew-card-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.ew-card-body { padding: 16px; }
.ew-card-footer { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--ew-line); color: var(--ew-text-muted); font-size: 12px; }

/* Listenzeilen in Karten (z. B. Dashboard „Auf einen Blick“) */
.ew-list-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--ew-line); }
.ew-list-row:first-child { border-top: 0; }
.ew-list-row > .ew-icon { color: var(--ew-text-muted); }
.ew-list-row .ew-list-end { margin-left: auto; }
/* Zeile mit Titel und Text darunter (z. B. Einstellungen: E-Mail · Ändern) */
.ew-list-text { flex: 1 1 auto; min-width: 0; }
.ew-list-title { color: var(--ew-text); font-weight: 600; }
.ew-list-sub { color: var(--ew-text-soft); font-size: 12px; overflow-wrap: anywhere; }
.ew-list-row > .ew-btn, .ew-list-row > .ew-badge, .ew-list-row > .ew-icon-btn { flex: none; }
/* Durchsuchbare Auswahl (ui_combo, ui.js): Feld mit Liste darunter, Liste wie ein Kontextmenü */
.ew-combo { position: relative; }
.ew-combo .ew-search { width: 100%; min-width: 0; }
.ew-combo-list { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; max-height: 264px; margin: 0; padding: 6px; overflow-y: auto; list-style: none;
    background-color: var(--ew-raised); border: 1px solid var(--ew-line-strong); border-radius: var(--ew-radius-card); box-shadow: var(--ew-shadow-float); }
/* in scrollbaren Dialogen (modal-dialog-scrollable) im Fluss: der Dialog wächst mit, statt die Liste am Rand abzuschneiden */
.modal-dialog-scrollable .ew-combo-list { position: static; margin-top: 4px; }
.ew-combo-option {display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; color: var(--ew-text); cursor: pointer; }
.ew-combo-option .ew-icon { color: var(--ew-text-soft); }
.ew-combo-option.ew-focus, .ew-combo-option:hover { background-color: var(--ew-active); }
.ew-combo-option[aria-disabled="true"] { color: var(--ew-text-muted); background: none; cursor: not-allowed; }
.ew-combo-sub { margin-left: auto; padding-left: 12px; color: var(--ew-text-muted); font-size: 12px; white-space: nowrap; }
.ew-combo-empty { padding: 8px 10px; color: var(--ew-text-muted); font-size: 12px; }
/* als Formularfeld (ui_combo mit name): Pfeil wie select.ew-input, gewählter Eintrag in der Liste fett */
.ew-combo-field .ew-input {
    padding-right: 34px;
    background-image: linear-gradient(45deg, transparent 50%, var(--ew-text-muted) 50%), linear-gradient(135deg, var(--ew-text-muted) 50%, transparent 50%);
    background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
    background-size: 5px 5px;
    background-repeat: no-repeat;
}
.ew-combo-option[aria-selected="true"] { font-weight: 600; }
/* gesperrter Eintrag im Kontextmenü (z. B. Notdienste: Person krank oder im Urlaub) */
.ew-dropdown-item:disabled { color: var(--ew-text-muted); background: none; cursor: not-allowed; }
/* Listenzeile als Link (ui_list_link, z. B. Startseite Montage-App → Listen): ganze Zeile klickbar, Pfeil rechts */
a.ew-list-link { color: var(--ew-text); text-decoration: none; transition: background-color var(--ew-transition); }
a.ew-list-link:hover { background-color: var(--ew-hover); color: var(--ew-text); }
.ew-list-link > .ew-icon:first-child { flex: none; width: 18px; text-align: center; }   /* Icons verschieden breit (z. B. eigene Listen mit Font Awesome) – Titel bündig */
.ew-card-header + a.ew-list-link { border-top: 0; }   /* Kartenkopf hat schon eine Linie */
.ew-card > a.ew-list-link:last-child { border-radius: 0 0 var(--ew-radius-card) var(--ew-radius-card); }
.ew-list-link .ew-list-arrow { flex: none; margin-left: auto; color: var(--ew-text-muted); transition: transform var(--ew-transition), color var(--ew-transition); }
a.ew-list-link:hover .ew-list-arrow { color: var(--ew-text); transform: translateX(2px); }

/* Gruppenzeile in einer Tabelle (z. B. Liste „Mitarbeiter“ der Montage-App nach Kategorie, per DataTables drawCallback) */
table.ew-table > tbody > tr.ew-table-group > td { padding-top: 14px; background-color: var(--ew-hover); color: var(--ew-text-soft); font-size: 12px; font-weight: 600; }
/* Hervorgehobene Gruppenzeile (seit 2026-11-17, Kataloge → Einträge – Wunsch Nutzer: klarere Trennung je Kategorie): getönt mit Akzentlinie,
   Symbol, Name und Anzahl (span.ew-table-group-title); auf dem Smartphone mit Abstand nach oben */
table.ew-table > tbody > tr.ew-table-group-strong > td { padding-top: 12px; padding-bottom: 12px; border-top: 2px solid var(--ew-accent-line);
    background-color: var(--ew-accent-tint); color: var(--ew-text); font-size: 14px; }
table.ew-table > tbody > tr.ew-table-group-strong:first-child > td { border-top: 0; }
.ew-table-group-title { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ew-table-group-title > .ew-icon { color: var(--ew-accent-text); font-size: 17px; }
.ew-table-group-title > .ew-badge { font-weight: 500; }
table.ew-table > tbody > tr.ew-table-group-strong.ew-catl-group-none > td { background-color: var(--ew-hover); }
table.ew-table > tbody > tr.ew-table-group-strong.ew-catl-group-none .ew-table-group-title > .ew-icon { color: var(--ew-text-muted); }

/* Kachel als Link (ui_tile, z. B. Startseite Montage-App): Icon in getönter Fläche, Titel, Zeile darunter, Pfeil */
a.ew-tile { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--ew-text); text-decoration: none; transition: background-color var(--ew-transition); }
a.ew-tile:hover { background-color: var(--ew-raised); color: var(--ew-text); }
.ew-tile-icon { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--ew-radius); background-color: var(--ew-neutral-tint); color: var(--ew-text-soft); }
.ew-tile-icon .ew-icon { font-size: 20px; }
.ew-tile-text { flex: 1 1 auto; min-width: 0; }
.ew-tile-title { display: block; font-weight: 600; }
.ew-tile-sub { display: block; color: var(--ew-text-muted); font-size: 12px; }
.ew-tile-arrow { flex: none; color: var(--ew-text-muted); transition: transform var(--ew-transition), color var(--ew-transition); }
a.ew-tile:hover .ew-tile-arrow { color: var(--ew-text); transform: translateX(2px); }
.ew-tile-danger .ew-tile-icon { background-color: var(--ew-danger-tint); color: var(--ew-danger); }
.ew-tile-danger .ew-tile-title { color: var(--ew-danger); }
@media (prefers-reduced-motion: reduce) { a.ew-tile:hover .ew-tile-arrow, a.ew-list-link:hover .ew-list-arrow { transform: none; } }
/* Karte grün hinterlegt, z. B. Liste mit Erledigtem (System → Entwicklung → Fertig); Tönung über der Kartenfarbe */
.ew-card.ew-card-success { background-image: linear-gradient(var(--ew-success-tint), var(--ew-success-tint)); border-color: color-mix(in srgb, var(--ew-success) 35%, transparent); }
.ew-card-success .ew-list-row > .ew-icon { font-size: 18px; }
@media (max-width: 575.98px) { .ew-card-success .ew-list-row.ew-list-row-wrap > .ew-list-text { flex-basis: calc(100% - 28px); } }   /* Platz für das größere Icon */
/* System → Changelog: Kennzeichen vor jedem Eintrag (neu · update · fixed) gleich breit, damit die Titel bündig stehen */
.ew-cl-entry > .ew-badge { flex: none; min-width: 58px; justify-content: center; }
/* System → Entwicklung (Kundenseite und Lizenzserver, seit 2026-11-22): je Zeile vorne das Badge der Art in einer Spalte (alle gleich breit,
   Inhalt mittig wie die Kennzeichen im Changelog; Neue Funktion lime wie dort · Verbesserung · Fehler), bei „In Umsetzung“ der Fortschritt
   als Spalte – Balken in jeder Zeile gleich breit, Prozent rechts daneben; fertige Einträge stehen dort am Ende ihrer Art, grün hinterlegt,
   statt des Balkens Badge „fertig“ und Hinweis (.ew-dev-done, seit 2026-11-22 statt einer eigenen Kachel „Fertig“). Kacheln unterscheidbar
   (Wunsch Nutzer): In Umsetzung mit Lime-Rand wie ein aktives Paket (.ew-plan.ew-current) und drehendem Zahnrad, Geplant mit grauem Symbol,
   Offen zusätzlich zurückgenommen (halb durchsichtig, gedämpfte Schrift) */
.ew-dev-type { flex: none; display: flex; width: 122px; }   /* „Neue Funktion“ mit Icon ≈ 117 px, etwas Luft für andere Schriftdarstellung */
.ew-dev-type > .ew-badge { flex: 1 1 auto; justify-content: center; }
.ew-dev-progress { flex: none; display: flex; align-items: center; gap: 10px; width: 280px; min-height: 21px; }   /* „fertig“ + Hinweis ≈ 257 px, mit Luft */
.ew-dev-progress > .ew-meter { flex: 1 1 auto; margin-top: 0; }
.ew-dev-progress-value { flex: none; min-width: 40px; color: var(--ew-text); font-size: 13px; font-weight: 600; text-align: right; white-space: nowrap; }
.ew-card-success.ew-card-head-strong > .ew-card-header { background-color: transparent; }   /* Fertig: Kopf in der grünen Tönung der Kachel */
.ew-dev-card .ew-list-row.ew-dev-done { background-color: var(--ew-success-tint); }
.ew-dev-card > .ew-list-row.ew-dev-done:last-child { border-radius: 0 0 calc(var(--ew-radius-card) - 1px) calc(var(--ew-radius-card) - 1px); }   /* Ecken der Kachel */
.ew-dev-progress.ew-dev-progress-done { gap: 8px; }
.ew-dev-progress-done > .ew-badge { flex: none; }
.ew-dev-done-hint { min-width: 0; color: var(--ew-text-muted); font-size: 12px; line-height: 1.3; }
.ew-card.ew-dev-card-active { border-color: var(--ew-accent); box-shadow: 0 0 0 1px var(--ew-accent); }   /* außen, damit der getönte Kopf die Linie nicht verdeckt */
.ew-dev-spin::before { display: inline-block; animation: ew-dev-spin 4s linear infinite; }   /* nur das Zeichen dreht sich, nicht die Lime-Kachel */
@keyframes ew-dev-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ew-dev-spin::before { animation: none; } }
.ew-card.ew-dev-card-planned.ew-card-head-strong > .ew-card-header > .ew-card-title-icon,
.ew-card.ew-dev-card-open.ew-card-head-strong > .ew-card-header > .ew-card-title-icon { background-color: var(--ew-hover); color: var(--ew-text-muted); }
.ew-card.ew-dev-card-open { background-color: color-mix(in srgb, var(--ew-surface) 45%, transparent); }
.ew-card.ew-dev-card-open.ew-card-head-strong > .ew-card-header { background-color: transparent; border-bottom-color: var(--ew-line); }
.ew-dev-card-open .ew-card-title, .ew-dev-card-open .ew-list-title { color: var(--ew-text-soft); }
.ew-dev-card-open .ew-dev-type > .ew-badge { opacity: .7; }
/* Smartphone: oben Badge (und am Lizenzserver die Knöpfe rechts), darunter Titel und Text über die ganze Breite, darunter der Fortschritt */
@media (max-width: 575.98px) {
    .ew-dev-card .ew-list-row { flex-wrap: wrap; row-gap: 6px; }
    .ew-dev-card .ew-list-row > .ew-list-end { order: 1; margin-left: auto; }
    .ew-dev-card .ew-list-row > .ew-list-text { order: 2; flex-basis: 100%; }
    .ew-dev-card .ew-list-row > .ew-dev-progress { order: 3; flex: 1 1 100%; width: auto; }
}
/* Zeile mit Icon, Text und breitem Button (z. B. System → Updates): auf dem Smartphone steht der Button unter dem Text */
@media (max-width: 575.98px) {
    .ew-list-row.ew-list-row-wrap { flex-wrap: wrap; }
    .ew-list-row.ew-list-row-wrap > .ew-list-text { flex-basis: calc(100% - 26px); }
    .ew-list-row.ew-list-row-wrap > .ew-btn { margin-left: 26px; }
}
/* Betrag rechts (z. B. Vertrag → Leistungen) und kleine Aktion als Link in der Zeile darunter */
.ew-list-amount { flex: none; min-width: 72px; font-weight: 600; text-align: right; white-space: nowrap; }
.ew-list-amount s { display: block; color: var(--ew-text-muted); font-size: 12px; font-weight: 400; }   /* alter Preis vor Rabatt, darunter der neue */
.ew-list-action { padding: 0; border: 0; background: none; color: var(--ew-text-soft); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.ew-list-action:hover, .ew-list-action:focus-visible { color: var(--ew-text); }

/* Positionen: Bezeichnung (mit Beschreibung) links, Betrag rechts – z. B. Leistungen eines Vertrags */
.ew-kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; font-size: 12px; }
.ew-kv-label { min-width: 0; }
.ew-kv-label > span { display: block; color: var(--ew-text-muted); }
.ew-kv-value { color: var(--ew-text-soft); text-align: right; white-space: nowrap; }
@media (min-width: 576px) { table.ew-table .ew-kv { min-width: 200px; } }

/* Kennzahl */
.ew-stat-label { display: flex; align-items: center; gap: 6px; color: var(--ew-text-soft); }
.ew-stat-value { margin: 6px 0 2px; font-size: 24px; font-weight: 600; line-height: 1.15; }
.ew-stat-unit { color: var(--ew-text-soft); font-size: 13px; font-weight: 400; }
.ew-stat-value s { color: var(--ew-text-muted); font-size: 15px; font-weight: 400; }   /* alter Preis vor Rabatt */

/* Paketkarte (ui_plan, z. B. Vertrag → Paketwechsel, SMS-Pakete) – nebeneinander in .ew-grid */
.ew-plan { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 18px; border: 1px solid var(--ew-line-strong); border-radius: var(--ew-radius-card); background-color: var(--ew-surface); color: var(--ew-text); }
.ew-plan.ew-current { border-color: var(--ew-accent); box-shadow: inset 0 0 0 1px var(--ew-accent); }
.ew-plan-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.ew-plan-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 15px; font-weight: 600; }
.ew-plan-name .ew-icon { color: var(--ew-text-muted); font-size: 18px; }
.ew-plan-price { font-size: 26px; font-weight: 600; line-height: 1.15; }
.ew-plan-unit { color: var(--ew-text-soft); font-size: 13px; font-weight: 400; }
.ew-plan-sub { margin-top: -6px; color: var(--ew-text-muted); font-size: 12px; }
.ew-plan-features { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 0; padding: 10px 0 0; border-top: 1px solid var(--ew-line); list-style: none; font-size: 13px; }
.ew-plan-features li { display: flex; align-items: flex-start; gap: 8px; color: var(--ew-text-soft); }
.ew-plan-features li .ew-icon { margin-top: 2px; color: var(--ew-success); }
.ew-plan-features li.ew-strong { color: var(--ew-text); font-weight: 600; }
.ew-plan-features li.ew-off { color: var(--ew-text-muted); }
.ew-plan-features li.ew-off .ew-icon { color: var(--ew-text-muted); }
.ew-plan-foot { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin-top: auto; padding-top: 6px; }
/* Einleitung über den Paketkarten (contract_addon_intro(), Vertrag → Erweiterungen, seit 2026-12-05, Wunsch Nutzer): links Bild oder Video,
   rechts Titel, Text und Aufzählung. Das Bild füllt seine Hälfte ganz (contain), die Fläche dahinter hat die Randfarbe des Bildes
   (--ew-addon-media-bg, Vorgabe #0a171c wie tv.webp) – ist der Text höher als das Bild, gibt es keine Kante. */
.ew-addon-intro { container-type: inline-size; overflow: hidden; margin-bottom: 16px;
                  border: 1px solid var(--ew-line-strong); border-radius: var(--ew-radius-card); background-color: var(--ew-surface); color: var(--ew-text); }
.ew-addon-intro-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ew-addon-intro-media { position: relative; justify-self: stretch; align-self: stretch; width: 100%; aspect-ratio: 16 / 9;
                        background-color: var(--ew-addon-media-bg, #0a171c); }
.ew-addon-intro-media > img, .ew-addon-intro-media > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
/* Slider (ab zwei Bildern/Videos, seit 2026-12-05, Wunsch Nutzer): Folien übereinander, Überblenden; Pfeile links/rechts (mit Maus erst beim
   Überfahren), Punkte unten (aktiver Lime), Überschrift oben mittig im Bild. Skript: contract_addon_slider_script(). */
.ew-addon-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility 0s linear .6s; }
.ew-addon-slide.is-active { opacity: 1; visibility: visible; transition: opacity .6s ease, visibility 0s; }
.ew-addon-slide > img, .ew-addon-slide > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.ew-addon-slider-still .ew-addon-slide { transition: none; }
.ew-addon-slide-title { position: absolute; top: 4%; left: 8%; right: 8%; z-index: 1; color: #fff; font-size: 15px; font-size: clamp(12px, 1.6cqw, 18px);
                        font-weight: 600; line-height: 1.2; text-align: center; text-shadow: 0 2px 10px rgba(0, 0, 0, .55); pointer-events: none; }
.ew-addon-slider-btn { position: absolute; top: 50%; z-index: 2; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px;
                       margin-top: -17px; padding: 0; border: 1px solid rgba(255, 255, 255, .18); border-radius: 50%; background-color: rgba(10, 23, 28, .7);
                       color: #fff; font-size: 16px; opacity: .85; transition: opacity .2s ease, background-color .2s ease; cursor: pointer; }
.ew-addon-slider-btn:hover, .ew-addon-slider-btn:focus-visible { background-color: rgba(10, 23, 28, .95); opacity: 1; }
.ew-addon-slider-btn .ew-icon, .ew-addon-slider-btn i { color: #fff; }
.ew-addon-slider-prev { left: 10px; }
.ew-addon-slider-next { right: 10px; }
@media (hover: hover) {
    .ew-addon-slider .ew-addon-slider-btn { opacity: 0; }
    .ew-addon-slider:hover .ew-addon-slider-btn, .ew-addon-slider .ew-addon-slider-btn:focus-visible { opacity: .85; }
    .ew-addon-slider .ew-addon-slider-btn:hover { opacity: 1; }
}
.ew-addon-slider-dots { position: absolute; bottom: 10px; left: 0; right: 0; z-index: 2; display: flex; justify-content: center; gap: 4px; }
.ew-addon-slider-dots button { width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; }   /* Trefferfläche 22 px */
.ew-addon-slider-dots button::before { content: ""; display: block; width: 8px; height: 8px; margin: 7px; border-radius: 50%; background-color: rgba(255, 255, 255, .45);
                                       transition: background-color .2s ease, transform .2s ease; }
.ew-addon-slider-dots button:hover::before { background-color: rgba(255, 255, 255, .8); }
.ew-addon-slider-dots button[aria-current="true"]::before { background-color: var(--ew-accent); transform: scale(1.25); }
.ew-addon-intro-body { display: flex; flex-direction: column; justify-content: center; gap: 10px; min-width: 0; padding: 22px 26px; }
.ew-addon-intro-title { font-size: 18px; font-weight: 600; line-height: 1.25; }
.ew-addon-intro-text { color: var(--ew-text-soft); font-size: 13px; }
.ew-addon-intro .ew-plan-features { margin: 2px 0 0; padding: 0; border-top: 0; }
.ew-addon-intro .ew-plan-features strong { color: var(--ew-text); font-weight: 600; }   /* **Wort** in der Aufzählung */
.ew-addon-intro-sub { margin-top: 4px; color: var(--ew-text-muted); font-size: 12px; font-weight: 600; }   /* features_title, z. B. „Credits je Funktion“ */
.ew-addon-intro-sub + .ew-plan-features { margin-top: -4px; }
.ew-addon-intro.ew-addon-intro-nomedia .ew-addon-intro-grid { grid-template-columns: 1fr; }
/* Schmale Card (Wunsch Nutzer 2026-12-05): Text unter das Bild. Maßgeblich ist die Breite der Card, nicht des Fensters – mit Seitenmenü wird sie schon
   in breiten Fenstern schmal. Das Bild höchstens 360 px hoch (contain, Seitenränder in der Randfarbe). Browser ohne Container-Abfragen: nach Fensterbreite. */
@container (max-width: 959.98px) {
    .ew-addon-intro-grid { grid-template-columns: 1fr; }
    .ew-addon-intro-media { max-height: 360px; }
    .ew-addon-intro-body { padding: 18px 20px; }
}
@supports not (container-type: inline-size) {
    @media (max-width: 1399.98px) {
        .ew-addon-intro-grid { grid-template-columns: 1fr; }
        .ew-addon-intro-media { max-height: 360px; }
        .ew-addon-intro-body { padding: 18px 20px; }
    }
}


/* ---------- Tabellen (auch DataTables) ---------- */

.ew-table-wrap { overflow-x: auto; position: relative; }   /* relative: absolut positionierte Kinder (z. B. .visually-hidden im Kopf) bleiben im Scrollbereich, sonst wird die ganze Seite breiter */
.ew-table-wrap.ew-table-wrap-outer { overflow: visible; }   /* äußerer Rahmen um eine DataTable: nur der innere scrollt (ui_datatable) */
table.ew-table {
    width: 100%;
    margin: 0 !important;
    border-collapse: collapse;
    color: var(--ew-text);
    font-size: 13px;
}
/* Spaltenköpfe als Titelzeile: getönt, halbfett, kräftige Linie darunter – klar von den Zeilen unterschieden (Wunsch Nutzer 2026-11-02,
   vorher durchsichtig und gedämpft wie eine Inhaltszeile) */
table.ew-table > thead > tr > th {
    padding: 10px 16px;
    border-bottom: 1px solid var(--ew-line-strong) !important;
    background: var(--ew-table-head);
    color: var(--ew-text);
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}
table.ew-table.dataTable > thead > tr > th { padding-right: 16px; }   /* Metronic-Bundle setzt in DataTables-Köpfen 0 – rechtsbündige Köpfe klebten am Rand */
/* Tabelle oben in der Karte ohne Kartenkopf: Tönung an den runden Ecken der Karte abschneiden (der Bereich scrollt ohnehin, overflow ist gesetzt) */
.ew-card > .ew-table-wrap:first-child,
.ew-card > .ew-table-wrap:first-child .ew-table-wrap { border-radius: calc(var(--ew-radius-card) - 1px) calc(var(--ew-radius-card) - 1px) 0 0; }
table.ew-table > tbody > tr > td {
    padding: 10px 16px;
    border-top: 0;
    border-bottom: 1px solid var(--ew-line);
    background: transparent;
    vertical-align: middle;
}
table.ew-table > tbody > tr:last-child > td { border-bottom: 0; }
table.ew-table > tbody > tr { transition: background-color var(--ew-transition); }
table.ew-table > tbody > tr:hover > td { background-color: var(--ew-hover); }
table.ew-table .ew-col-actions { width: 1%; text-align: right; white-space: nowrap; }
table.ew-table .ew-col-num { text-align: right; white-space: nowrap; }   /* Beträge */
/* Hervorgehobene erste Spalte (z. B. Listen der Montage-App, Variante C – Entscheidung Nutzer 2026-10-29): Icon der Liste
   gedämpft davor, Text größer und hell; .ew-table-lead dämpft die übrigen Spalten (Links behalten ihre Farbe) */
table.ew-table td.ew-col-title { font-size: 15px; font-weight: 600; color: var(--ew-text); }
table.ew-table td.ew-col-title > .ew-icon { width: 18px; margin-right: 10px; text-align: center; color: var(--ew-text-muted); }
table.ew-table.ew-table-lead > tbody > tr:not(.ew-table-group) > td:not(.ew-col-title) { color: var(--ew-text-soft); }
table.ew-table th.sorting,
table.ew-table th.dt-orderable-asc,
table.ew-table th.dt-orderable-desc { cursor: pointer; }

/* Zeilenaktionen: höchstens ein Schnell-Icon + ⋯-Menü */
.ew-row-actions { display: inline-flex; align-items: center; gap: 2px; }

/* DataTables-Bedienelemente in ew-Karten (DataTables 2: dt-…, ältere Version: dataTables_…) */
.ew-card .dataTables_wrapper .row { margin: 0; }
.ew-card .dt-info,
.ew-card .dataTables_wrapper .dataTables_info { padding: 12px 16px; color: var(--ew-text-muted); font-size: 12px; }
/* Abstand am Seitenbereich, nicht an ul.pagination – DataTables 2 blendet sonst Seitenknöpfe aus */
.ew-card .dt-paging { padding: 10px 16px !important; }
.ew-card .dataTables_wrapper .dataTables_paginate { padding: 0 !important; }
.ew-card .dt-length select,
.ew-card .dataTables_wrapper .dataTables_length select {
    height: 30px;
    padding: 0 26px 0 10px;
    background-color: var(--ew-input-bg);
    border: 1px solid var(--ew-line-strong);
    border-radius: var(--ew-radius);
    color: var(--ew-text);
}
.ew-card .dataTables_wrapper .pagination { gap: 2px; margin: 0; padding: 10px 16px; }
.ew-card .dt-paging .pagination { gap: 2px; margin: 0; padding: 0; }
.ew-card .dt-paging .page-link,
.ew-card .dataTables_wrapper .page-link {
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border: 0;
    border-radius: var(--ew-radius) !important;
    background: transparent;
    color: var(--ew-text-soft);
    font-size: 12px;
    line-height: 30px;
    text-align: center;
}
.ew-card .dt-paging .page-link:hover,
.ew-card .dataTables_wrapper .page-link:hover { background-color: var(--ew-active); color: var(--ew-text); }
.ew-card .dt-paging .page-item.active .page-link,
.ew-card .dataTables_wrapper .page-item.active .page-link { background-color: var(--ew-accent-tint); color: var(--ew-accent-text); }
.ew-card .dt-paging .page-item.disabled .page-link,
.ew-card .dataTables_wrapper .page-item.disabled .page-link { background: transparent; opacity: .4; }

/* Smartphone: Tabelle als Kartenliste (td braucht data-label) */
@media (max-width: 575.98px) {
    table.ew-table.ew-table-stack,
    table.ew-table.ew-table-stack > tbody { display: block; width: 100% !important; }   /* DataTables setzt sonst eine feste Breite */
    table.ew-table.ew-table-stack > thead { display: none; }
    table.ew-table.ew-table-stack > tbody > tr { display: block; padding: 10px 14px; border-bottom: 1px solid var(--ew-line); }
    table.ew-table.ew-table-stack > tbody > tr > td { display: block; padding: 3px 0; border: 0; text-align: left; }
    /* Label links, Inhalt rechtsbündig daneben – auch mehrzeilig (Adresse, Badges, Positionen) */
    table.ew-table.ew-table-stack > tbody > tr > td[data-label] { text-align: right; }
    table.ew-table.ew-table-stack > tbody > tr > td[data-label]::before { content: attr(data-label); float: left; margin-right: 12px; color: var(--ew-text-muted); font-size: 12px; text-align: left; }
    table.ew-table.ew-table-stack > tbody > tr > td[data-label]::after { content: ""; display: block; clear: both; }
    table.ew-table.ew-table-stack > tbody > tr > td[data-label] .ew-row { justify-content: flex-end; }
    table.ew-table.ew-table-stack > tbody > tr > td[data-label] .ew-kv-label { text-align: left; }
    table.ew-table.ew-table-stack > tbody > tr > td.ew-col-main { padding-bottom: 6px; }
    table.ew-table.ew-table-stack > tbody > tr > td.ew-col-actions { width: auto; text-align: right; }
    /* leere Angaben ausblenden (z. B. Liste „Mitarbeiter“ ohne Mobilnummer) und Gruppenzeile über die volle Breite */
    table.ew-table.ew-table-stack > tbody > tr > td.ew-stack-empty { display: none; }
    table.ew-table.ew-table-stack > tbody > tr.ew-table-group { padding: 0; }
    table.ew-table.ew-table-stack > tbody > tr.ew-table-group > td { padding: 8px 14px; }
    table.ew-table.ew-table-stack > tbody > tr.ew-table-group-strong:not(:first-child) { margin-top: 14px; }
    table.ew-table.ew-table-stack > tbody > tr.ew-table-group-strong > td { padding: 10px 14px; }
}


/* ---------- Tabs ---------- */

/* Segment-Leiste wie .ew-seg, damit die Tabs auf den ersten Blick als solche erkennbar sind (Entscheidung Nutzer 2026-10-31,
   vorher Text mit Linie). Passt die Leiste nicht in die Breite, bricht sie in eine zweite Reihe um, kein seitliches Scrollen. */
.ew-tabs { display: flex; flex-wrap: wrap; gap: 2px; width: fit-content; max-width: 100%; margin-bottom: 16px; padding: 3px; border: 1px solid var(--ew-line-strong); border-radius: var(--ew-radius); background-color: var(--ew-hover); }
.ew-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--ew-text-soft);
    font: 500 13px/1.2 var(--ew-font);
    white-space: nowrap;
    cursor: pointer;
}
.ew-tab:hover { background-color: var(--ew-hover); color: var(--ew-text); }
.ew-tab.active { background-color: var(--ew-tab-active); box-shadow: inset 0 0 0 1px var(--ew-line-strong); color: var(--ew-text); }   /* auch ohne Zahl klar erkennbar; Linie als Schatten, damit nichts springt */
.ew-tab:focus-visible { outline: 0; box-shadow: var(--ew-focus-ring); }
.ew-tab-count { color: var(--ew-text-muted); font-weight: 600; }   /* auch außerhalb der Tabs: pages/todo/todo.js */
.ew-tab .ew-tab-count { display: inline-flex; align-items: center; justify-content: center; min-width: 19px; height: 19px; padding: 0 6px; border-radius: 10px; background-color: var(--ew-neutral-tint); color: var(--ew-text-soft); font-size: 11px; line-height: 1; }
.ew-tab.active .ew-tab-count { background-color: var(--ew-accent); color: var(--ew-on-accent); }
.ew-tab .ew-tab-count-warning, .ew-tab.active .ew-tab-count-warning { background-color: #f5bd4f; color: #2b1d00; }   /* feste Farben: in beiden Modi gut lesbar */
@media (max-width: 575.98px) {
    .ew-tab { flex: 1 1 auto; justify-content: center; }   /* umgebrochene Reihen füllen die Leiste aus */
}
/* Tabs im Kartenkopf (ui_card_start "tabs_html", Wunsch Nutzer 2026-11-02): links die Tabs, rechts Suche und Werkzeuge in derselben Zeile */
.ew-card-header > .ew-tabs { margin-bottom: 0; }
.ew-card-tools > [data-ew-tab-tools][hidden] { display: none; }
.ew-card-tools > [data-ew-tab-tools] { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
@media (max-width: 575.98px) {
    /* Smartphone: Tabs und Suche je über die ganze Breite statt rechts eingerückt */
    .ew-card-header > .ew-tabs { width: 100%; }
    .ew-card-header > .ew-tabs ~ .ew-card-tools { flex: 1 1 100%; }
    .ew-card-header > .ew-tabs ~ .ew-card-tools > [data-ew-tab-tools],
    .ew-card-header > .ew-tabs ~ .ew-card-tools .ew-search { flex: 1 1 auto; }
}


/* ---------- Suche und Filter-Chips ---------- */

.ew-search { position: relative; display: flex; align-items: center; min-width: 200px; }
.ew-search > .ew-icon { position: absolute; left: 11px; color: var(--ew-text-muted); pointer-events: none; }
.ew-search .ew-input { padding-left: 34px; }

.ew-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ew-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 30px;
    padding: 0 11px;
    border: 1px solid var(--ew-line);
    border-radius: var(--ew-radius);
    background: transparent;
    color: var(--ew-text-soft);
    font: 500 12px/1 var(--ew-font);
    white-space: nowrap;
    cursor: pointer;
}
.ew-chip:hover { border-color: var(--ew-line-strong); color: var(--ew-text); }
.ew-chip.active { background-color: var(--ew-accent-tint); border-color: transparent; color: var(--ew-accent-text); }
.ew-chip-count { font-weight: 600; }


/* ---------- Formulare ---------- */

.ew-label { display: block; margin-bottom: 5px; color: var(--ew-text-soft); font-size: 12px; font-weight: 500; }
.ew-label .ew-required { color: var(--ew-danger); }
.ew-field { margin-bottom: 14px; }
.ew-field:last-child { margin-bottom: 0; }
/* Mehrere Felder nebeneinander; Spalten über --ew-field-cols (z. B. "140px minmax(0, 1fr)"), Smartphone untereinander */
.ew-field-row { display: grid; grid-template-columns: var(--ew-field-cols, repeat(2, minmax(0, 1fr))); gap: 0 12px; margin-bottom: 14px; }
.ew-field-row:last-child { margin-bottom: 0; }
.ew-field-row > .ew-field { margin-bottom: 0; }
/* Datum + Uhrzeit nebeneinander */
.ew-datetime { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 8px; }
@media (max-width: 575.98px) {
    .ew-field-row { grid-template-columns: minmax(0, 1fr); gap: 14px 0; }
}

.ew-input {
    display: block;
    width: 100%;
    height: 38px;
    padding: 0 12px;
    background-color: var(--ew-input-bg);
    border: 1px solid var(--ew-line-strong);
    border-radius: var(--ew-radius);
    color: var(--ew-text);
    font: 13px/1.4 var(--ew-font);
    transition: border-color var(--ew-transition), box-shadow var(--ew-transition);
}
.ew-input::placeholder { color: var(--ew-text-muted); }
.ew-input:hover { border-color: var(--ew-text-muted); }
.ew-input:focus { outline: none; border-color: var(--ew-accent); box-shadow: var(--ew-focus-ring); }
textarea.ew-input { height: auto; min-height: 90px; padding: 9px 12px; }
select.ew-input {
    appearance: none;
    padding-right: 34px;
    background-image: linear-gradient(45deg, transparent 50%, var(--ew-text-muted) 50%), linear-gradient(135deg, var(--ew-text-muted) 50%, transparent 50%);
    background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
    background-size: 5px 5px;
    background-repeat: no-repeat;
}
select.ew-input option { background-color: var(--ew-raised); color: var(--ew-text); }
.ew-input.is-invalid { border-color: var(--ew-danger); }
.ew-input.is-valid { border-color: var(--ew-success); }
.ew-input[disabled] { opacity: .55; }
input[type="color"].ew-input { width: 56px; padding: 3px; cursor: pointer; }   /* Farbwahl */
.ew-help { margin-top: 5px; color: var(--ew-text-muted); font-size: 12px; }
.ew-error { margin-top: 5px; color: var(--ew-danger); font-size: 12px; }

.ew-input-group { display: flex; align-items: stretch; }
.ew-input-group > .ew-input { border-radius: 0; }
.ew-input-group > :first-child { border-top-left-radius: var(--ew-radius); border-bottom-left-radius: var(--ew-radius); }
.ew-input-group > :last-child { border-top-right-radius: var(--ew-radius); border-bottom-right-radius: var(--ew-radius); }
.ew-input-group > :not(:first-child) { margin-left: -1px; }
.ew-input-addon {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background-color: var(--ew-hover);
    border: 1px solid var(--ew-line-strong);
    color: var(--ew-text-muted);
    white-space: nowrap;
}
.ew-input-group .ew-icon-btn { height: auto; width: 40px; border: 1px solid var(--ew-line-strong); border-radius: 0; }

/* Schalter */
.ew-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; color: var(--ew-text); }
.ew-switch input {
    appearance: none;
    position: relative;
    flex: none;
    width: 36px;
    height: 20px;
    margin: 0;
    border-radius: 10px;
    background-color: var(--ew-line-strong);
    cursor: pointer;
    transition: background-color var(--ew-transition);
}
.ew-switch input::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--ew-text-soft);
    transition: transform var(--ew-transition), background-color var(--ew-transition);
}
.ew-switch input:checked { background-color: var(--ew-accent); }
.ew-switch input:checked::after { transform: translateX(16px); background-color: var(--ew-on-accent); }
.ew-switch input:focus-visible { outline: none; box-shadow: var(--ew-focus-ring); }

/* Schieberegler (ui_range): Spur wie .ew-meter, gefüllter Teil Lime über --ew-range-pct (ui.js), Wert rechts */
.ew-range { display: flex; align-items: center; gap: 12px; }
.ew-range input[type="range"] { flex: 1; min-width: 0; height: 22px; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
.ew-range input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, var(--ew-accent) var(--ew-range-pct, 0%), var(--ew-line-strong) var(--ew-range-pct, 0%));
}
.ew-range input[type="range"]::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    margin-top: -6px;
    border: 3px solid var(--ew-surface);
    border-radius: 50%;
    background-color: var(--ew-accent);
    box-shadow: 0 0 0 1px var(--ew-accent);
    -webkit-appearance: none;
    appearance: none;
}
.ew-range input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background-color: var(--ew-line-strong); }
.ew-range input[type="range"]::-moz-range-progress { height: 6px; border-radius: 3px; background-color: var(--ew-accent); }
.ew-range input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border: 3px solid var(--ew-surface); border-radius: 50%; background-color: var(--ew-accent); box-shadow: 0 0 0 1px var(--ew-accent); }
.ew-range input[type="range"]:focus-visible { outline: none; }
.ew-range input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 1px var(--ew-accent), var(--ew-focus-ring); }
.ew-range input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 1px var(--ew-accent), var(--ew-focus-ring); }
.ew-range-value { min-width: 46px; color: var(--ew-text); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* Checkbox und Radio */
.ew-check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; color: var(--ew-text); }
.ew-check-top { align-items: flex-start; }              /* ui_check(…, ["top" => true]): Kästchen auf Höhe der ersten Textzeile */
.ew-check.ew-check-top input { margin-top: 1px; }       /* doppelte Klasse: sonst gewinnt das spätere margin: 0 von .ew-check input */
.ew-check input {
    appearance: none;
    flex: none;
    display: inline-grid;
    place-content: center;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 1px solid var(--ew-line-strong);
    border-radius: 5px;
    background-color: var(--ew-input-bg);
    cursor: pointer;
}
.ew-check input[type="radio"] { border-radius: 50%; }
.ew-check input:checked { background-color: var(--ew-accent); border-color: var(--ew-accent); }
.ew-check input[type="checkbox"]:checked::after {
    content: "";
    width: 9px;
    height: 5px;
    margin-top: -2px;
    border-left: 2px solid var(--ew-on-accent);
    border-bottom: 2px solid var(--ew-on-accent);
    transform: rotate(-45deg);
}
.ew-check input[type="radio"]:checked::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background-color: var(--ew-on-accent); }
.ew-check input:focus-visible { outline: none; box-shadow: var(--ew-focus-ring); }

/* Auswahlkarte (z. B. Rolle) */
.ew-choice { display: flex; gap: 10px; margin-bottom: 8px; padding: 10px 12px; border: 1px solid var(--ew-line-strong); border-radius: var(--ew-radius); cursor: pointer; }
.ew-choice:hover { border-color: var(--ew-text-muted); }
.ew-choice:has(input:checked) { border-color: var(--ew-accent); background-color: var(--ew-accent-tint); }
.ew-choice > .ew-check { align-self: flex-start; margin-top: 1px; }   /* auf Höhe des Titels, auch bei langem Text */
.ew-choice-title { font-weight: 600; }
.ew-choice-end { margin-left: auto; color: var(--ew-text-soft); white-space: nowrap; }   /* z. B. Preis rechts */
.ew-choice-end > .ew-badge { margin-right: 6px; }   /* Badge vor dem Preis (end_html) */
.ew-choice-desc { color: var(--ew-text-muted); font-size: 12px; }
/* Auswahlkarte mit Bild (z. B. Logo im E-Mail-Template): Inhalt in .ew-choice-body, Bild in .ew-choice-media */
.ew-choice-body { flex: 1 1 auto; min-width: 0; }
.ew-choice-media { display: flex; align-items: center; justify-content: center; height: 72px; margin-top: 8px; padding: 10px; border: 1px solid var(--ew-line); border-radius: 6px; }
.ew-choice-media img { max-width: 100%; max-height: 100%; object-fit: contain; }
/* E-Mail-Template (settings/email_template.php), Präfix ew-mailtpl- (ew-mail-preview ist im Mail-Archiv schon vergeben):
   Farbvorgabe als Fläche mit Logo und Textprobe in den festen Mailfarben, Farbfelder unter „Eigene“, Vorschau-iframe */
.ew-mailtpl-swatch { flex-direction: column; gap: 6px; }
.ew-mailtpl-swatch img { max-height: 24px; }
.ew-mailtpl-swatch span { font-size: 10px; line-height: 1; }
.ew-mailtpl-color { width: 64px; padding: 4px; cursor: pointer; }
.ew-mailtpl-preview { display: block; width: 100%; height: 600px; border: 0; border-radius: var(--ew-radius); background-color: #fff; }
.ew-choice .ew-dropdown-tag { margin-left: 6px; }   /* ui_choice(…, array("tag_html" => ui_superadmin_tag())) */
.ew-switch .ew-dropdown-tag { flex: none; margin-left: 0; }   /* ui_switch(…, array("tag_html" => ui_superadmin_tag())), seit 2026-11-16 */
.ew-seg label .ew-dropdown-tag { margin-left: 6px; }          /* ui_seg: Wahl nur für den Superadmin („SA“), seit 2026-11-16 */
.ew-section-title .ew-dropdown-tag { flex: none; margin-left: 0; }   /* ui_section_start(…, array("tag_html" => ui_superadmin_tag())) – direkt hinter dem Titel, seit 2026-11-20 */
/* „i“ mit Hinweis zum Antippen (ui_info_tip(), seit 2026-11-20): klein hinter Beschriftung/Überschrift, ohne die Zeile höher zu machen;
   das Blatt mit normaler Schrift (erbt sonst Größe/Farbe der Beschriftung), auf dem Smartphone volle Breite von unten (layout.css) */
.ew-info-tip { display: inline-flex; flex: none; vertical-align: middle; margin: -6px 0 -6px 2px; }
.ew-info-tip > .ew-icon-btn { color: var(--ew-text-muted); font-size: 15px; }
.ew-info-tip > .ew-icon-btn:hover, .ew-info-tip > .ew-icon-btn.show { color: var(--ew-text); }
.ew-info-tip-sheet { color: var(--ew-text); font-size: 13px; font-weight: 400; text-transform: none; letter-spacing: normal; }
.ew-info-tip-sheet > span { display: block; }
.ew-info-tip-sheet .ew-dropdown-section { color: var(--ew-text-soft); line-height: 1.5; white-space: normal; }
@media (min-width: 576px) { .dropdown-menu.ew-dropdown.ew-info-tip-sheet { width: 320px; } }
/* Unterpunkte zu einer Auswahlkarte (z. B. Personen einer gemeinsamen To-do-Liste), eingerückt; per JS mit hidden ein-/ausgeblendet */
.ew-choice-sub { margin: -2px 0 10px 28px; padding: 10px 12px; border: 1px solid var(--ew-line); border-radius: var(--ew-radius); }
.ew-choice-sub .ew-check { margin-bottom: 4px; }
/* Häkchen untereinander in einem eigenen Bereich, nicht eingerückt (z. B. Rechte im Benutzer-Dialog der Montage-App) */
.ew-check-list .ew-check { margin-bottom: 4px; }

/* Zwischenüberschrift (z. B. Abschnitte in einem Dialog): Trennlinie davor, außer bei .ew-first */
.ew-subhead { margin: 20px 0 12px; padding-top: 16px; border-top: 1px solid var(--ew-line); font-weight: 600; }
.ew-subhead.ew-first { margin-top: 0; padding-top: 0; border-top: 0; }
.ew-subhead-desc { margin: -8px 0 12px; color: var(--ew-text-muted); font-size: 12px; }

/* Farbauswahl aus festen Farben (z. B. Kalenderfarbe eines Standorts): Radios als Farbkreise */
.ew-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.ew-swatches input { position: absolute; opacity: 0; pointer-events: none; }
.ew-swatches label { width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); cursor: pointer; }
.ew-swatches input:checked + label { outline: 2px solid var(--ew-accent); outline-offset: 2px; }
.ew-swatches input:focus-visible + label { box-shadow: var(--ew-focus-ring); }

/* Standort: farbiges Symbol (Kalenderfarbe) und Logo-Vorschau auf Weiß */
.ew-location-marker { display: inline-flex; flex: none; align-items: center; justify-content: center; border-radius: 8px; color: #fff; font-size: 16px; }
.ew-location-logo { display: inline-flex; align-items: center; height: 32px; max-width: 120px; padding: 3px 6px; border-radius: 6px; background-color: #fff; }
.ew-location-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* TV → Monitore, Präsentationen, Panels: Symbol eines Bildschirms (Quer-/Hochformat, mit Standfuß), Inhalt bzw. Monitore, Adresse,
   Bühne der Vorschau (immer dunkel) */
.ew-screen-device { display: inline-flex; flex: none; align-items: center; justify-content: center; width: var(--ew-screen-size, 40px); height: var(--ew-screen-size, 40px);
    border-radius: 8px; background-color: var(--ew-neutral-tint); color: var(--ew-text-soft); }
.ew-screen-device > span { position: relative; width: 56%; height: 36%; margin-bottom: 3px; border: 2px solid currentColor; border-radius: 3px; }
.ew-screen-device > span::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 44%; height: 2px; border-radius: 1px; background-color: currentColor; transform: translateX(-50%); }
.ew-screen-device.ew-screen-portrait > span { width: 34%; height: 56%; }
.ew-screen-target { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ew-screen-target > .ew-icon { flex: none; font-size: 18px; }
.ew-screen-target-name { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.ew-screen-address { display: inline-flex; align-items: center; gap: 2px; min-width: 0; max-width: 100%; }
.ew-screen-url { overflow: hidden; color: var(--ew-text-soft); font-family: SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ew-screen-url:hover { color: var(--ew-text); text-decoration: underline; }
.ew-screen-stage-wrap { display: flex; justify-content: center; padding: 24px; border-radius: var(--ew-radius-card); background-color: #05090b; }
.ew-screen-stage { position: relative; width: min(100%, calc(66vh * 16 / 9)); aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background-color: #000;
    box-shadow: 0 0 0 6px #161c20, 0 0 0 7px rgba(255, 255, 255, .12); }   /* Rahmen als Schatten: die Breite der Bühne bleibt die Breite der Anzeige */
.ew-screen-stage.ew-screen-portrait { width: auto; height: 66vh; aspect-ratio: 9 / 16; }
.ew-screen-stage iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; }
/* TV → Monitore, Gerätefreigabe: Zelle „Geräte“ (Punkt grün/rot, Anzahl, wartende) öffnet den Dialog; Code wartender Geräte */
.ew-screen-devices-cell { display: inline-flex; align-items: center; gap: 6px; padding: 2px 0; border: 0; background: none; color: var(--ew-text); font: inherit; white-space: nowrap; cursor: pointer; }
.ew-screen-devices-cell:hover > span:not(.ew-dot):not(.ew-badge) { text-decoration: underline; text-underline-offset: 2px; }
.ew-screen-devices-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.ew-screen-devices-cell .ew-dot,
.ew-list-row > .ew-screen-online { width: 9px; height: 9px; }
.ew-list-row > .ew-screen-online { margin: 0 4px; }
.ew-screen-devices-head-actions { display: flex; flex: none; align-items: center; gap: 4px; }
@media (min-width: 576px) { .dropdown-menu.ew-dropdown.ew-screen-devices-help { width: 320px; } }   /* Smartphone: Blatt in voller Breite */
.ew-screen-devices-help .ew-dropdown-section { color: var(--ew-text-soft); line-height: 1.5; }
.ew-screen-code { flex: none; min-width: 64px; color: var(--ew-text); font-family: SFMono-Regular, Menlo, Consolas, monospace; font-size: 20px; font-weight: 700; letter-spacing: .08em; }
table.ew-table .ew-col-lock { width: 1%; text-align: center; white-space: nowrap; }   /* schmale Symbolspalte (TV → Panels: Bedienung gesperrt; die Spalte Passwort gibt es seit 2026-11-25 nicht mehr) */
table.ew-table td.ew-col-lock .ew-icon { font-size: 17px; }
table.ew-table th.ew-col-lock .fa-arrow-pointer { font-size: 12px; }   /* TV → Panels: Mauszeiger im Kopf „Bedienung gesperrt“ – gefüllt, wirkt sonst größer als das Schloss (Wunsch Nutzer 2026-11-20) */
/* TV → Präsentationen, Einstellungen: Beispiel-Kachel (16:9) mit Text- und Hintergrundfarbe, Farben inline */
.ew-slides-sample { display: flex; flex-direction: column; justify-content: center; gap: 2px; width: 160px; aspect-ratio: 16 / 9; padding: 10px 14px; overflow: hidden;
    border: 1px solid var(--ew-line-strong); border-radius: 6px; line-height: 1.3; }
.ew-slides-sample-title { font-size: 15px; font-weight: 700; }
.ew-slides-sample-text { font-size: 12px; }
/* … Textfarbe und Hintergrund untereinander, Text rechts neben dem Farbfeld (Klick auf den Text öffnet die Farbwahl), daneben die
   Beispiel-Kachel; auf schmalen Bildschirmen rutscht sie darunter (seit 2026-11-20, Wunsch Nutzer) */
.ew-slides-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; margin-bottom: 14px; }
.ew-slides-color-list { display: flex; flex-direction: column; gap: 10px; }
.ew-slides-color { display: flex; align-items: center; gap: 12px; margin: 0; color: var(--ew-text); font-weight: 500; cursor: pointer; }
.ew-slides-color input[type="color"].ew-input { flex: none; }
/* TV → Präsentationen → Folien bearbeiten: Kacheln mit echter Vorschau (Anzeige in fester Größe, per Skript auf die Breite verkleinert),
   Nummer, Griff zum Ziehen, Art + Inhalt, Dauer · Übergang (eigene Werte in Textfarbe, Standard gedämpft); Auswahl von Art und Vorlage im Dialog (.ew-slide-pick) */
.ew-slides-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.ew-slides-grid-portrait { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.ew-slide { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--ew-line-strong); border-radius: var(--ew-radius-card); background-color: var(--ew-raised); }
.ew-slide-view { position: relative; display: block; cursor: pointer; }
.ew-slide-view:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--ew-accent); }
.ew-slide-view.ew-slide-show:hover .ew-slide-thumb { opacity: .88; }
.ew-slide-thumb { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background-color: #000; transition: opacity var(--ew-transition); }
.ew-slide-thumb.ew-slide-portrait { aspect-ratio: 9 / 16; }
.ew-slide-thumb iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; pointer-events: none; }
.ew-slide-nr { position: absolute; top: 8px; left: 8px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: var(--ew-radius-badge); background-color: rgba(0, 0, 0, .7);
    color: #fff; font-size: 12px; font-weight: 700; line-height: 24px; text-align: center; }
/* nur der Knopf auf der Vorschau – der Menüpunkt „Alle Einträge ansehen“ hat dieselbe Klasse (Klick-Handler) */
.ew-slide-view > .ew-slide-entries { position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border: 0;
    border-radius: var(--ew-radius-badge); background-color: rgba(0, 0, 0, .7); color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; }
.ew-slide-view > .ew-slide-entries:hover, .ew-slide-view > .ew-slide-entries:focus-visible { background-color: rgba(0, 0, 0, .9); outline: none; }
.ew-slide-view > .ew-slide-entries .ew-icon { font-size: 14px; color: inherit; }
.ew-slide-body { display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 4px; border-top: 1px solid var(--ew-line); }
.ew-slide-drag { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 22px; height: 34px; border-radius: 6px; color: var(--ew-text-muted);
    cursor: grab; touch-action: none; }
.ew-slide-drag:hover { background-color: var(--ew-hover); color: var(--ew-text); }
.ew-slide-text { flex: 1 1 auto; min-width: 0; }
.ew-slide-title { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--ew-text); font-weight: 600; }
.ew-slide-title > .ew-icon { flex: none; color: var(--ew-text-soft); font-size: 16px; }
.ew-slide-kind { flex: none; }
.ew-slide-summary { min-width: 0; overflow: hidden; color: var(--ew-text-soft); font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.ew-slide-meta { margin-top: 2px; overflow: hidden; color: var(--ew-text-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ew-slide-own { color: var(--ew-text); font-weight: 500; }
/* Dauer und Übergang oben rechts auf der Vorschau (wie die Nummer, slides_tile_flags_html()); eigene Werte in Lime */
.ew-slide-flags { position: absolute; top: 8px; right: 8px; display: inline-flex; gap: 4px; }
.ew-slide-flag { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 7px;
    border-radius: var(--ew-radius-badge); background-color: rgba(0, 0, 0, .7); color: #fff; font-size: 12px; font-weight: 700; line-height: 1; }
.ew-slide-flag .ew-icon { font-size: 12px; color: inherit; }
.ew-slide-flag.is-own { background-color: var(--ew-accent); color: var(--ew-on-accent); }
.ew-slide-info { display: flex; min-width: 0; margin-top: 3px; font-size: 13px; }
/* ausgeblendete Folie (seit 2026-12-04): Vorschau abgeblendet mit Schild in der Mitte, ⋯ zeigt „Einblenden“ statt „Ausblenden“ (wie Website-Editor → Folien) */
.ew-slide-off { display: none; }
.ew-slide.is-hidden .ew-slide-off { position: absolute; top: 50%; left: 50%; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px;
    border-radius: var(--ew-radius-badge); background-color: rgba(0, 0, 0, .75); color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap;
    transform: translate(-50%, -50%); pointer-events: none; }
.ew-slide.is-hidden .ew-slide-off .ew-icon { font-size: 14px; color: inherit; }
.ew-slide.is-hidden .ew-slide-thumb, .ew-slide.is-hidden .ew-slide-view.ew-slide-show:hover .ew-slide-thumb { opacity: .35; }
.ew-slide.is-hidden .ew-slide-title, .ew-slide.is-hidden .ew-slide-info { opacity: .6; }
.ew-slide .ew-slide-unhide, .ew-slide.is-hidden .ew-slide-hide { display: none !important; }
.ew-slide.is-hidden .ew-slide-unhide { display: flex !important; }
.ew-slide-static .ew-slide-view { cursor: default; }
.ew-slide-static .ew-slide-view.ew-slide-entry-show { cursor: pointer; }   /* Einträge: Klick = Vorschau des Eintrags */
.ew-slide-entry-show:hover .ew-slide-thumb { opacity: .88; }
.ew-slide-static .ew-slide-body { padding-left: 12px; }
.ew-slide-dragging { position: fixed; z-index: 1040; margin: 0; box-shadow: var(--ew-shadow-float); opacity: .92; pointer-events: none; }
.ew-slide-holder { border: 2px dashed var(--ew-accent); border-radius: var(--ew-radius-card); background-color: var(--ew-accent-tint); }
.ew-slides-dnd, .ew-slides-dnd * { cursor: grabbing !important; user-select: none; }
.ew-slides-runtime { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ew-slides-runtime .ew-icon { font-size: 15px; }
.ew-card-footer .ew-small .ew-icon { font-size: 12px; vertical-align: -1px; }
.ew-slide-pick { cursor: pointer; }
.ew-slide-pick:hover, .ew-slide-pick:focus-visible { border-color: var(--ew-accent); box-shadow: 0 0 0 3px var(--ew-accent-tint); outline: none; }
.ew-slide-pick.ew-current { border-color: var(--ew-accent); box-shadow: 0 0 0 1px var(--ew-accent); }
.ew-slide-pick .ew-slide-body { padding-left: 12px; }
.ew-slide-own-box { margin-top: 10px; }
/* Dialog „Bearbeiten“: Live-Vorschau der Darstellung; Werte, die gerade nicht gelten (z. B. Zoom bei „Ganz sichtbar“) */
.ew-slide-design-preview { max-width: 420px; margin-bottom: 14px; overflow: hidden; border: 1px solid var(--ew-line-strong); border-radius: var(--ew-radius); }
.ew-slide-design-preview .ew-slide-thumb.ew-slide-portrait { max-width: 200px; }
.ew-seg input:disabled + label { opacity: .4; cursor: not-allowed; }
/* Übergänge als Kacheln mit Vorschau A ↔ B (Einstellungen der Folie und der Präsentation; Animation per Skript, _slides_dialogs.php) */
.ew-tr-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.ew-tr-tile { position: relative; display: block; margin: 0; cursor: pointer; }
.ew-tr-tile > input { position: absolute; opacity: 0; pointer-events: none; }
.ew-tr-box { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 6px; border: 1px solid var(--ew-line-strong); border-radius: var(--ew-radius);
    background-color: var(--ew-raised); transition: border-color var(--ew-transition); }
.ew-tr-tile:hover .ew-tr-box { border-color: var(--ew-text-muted); }
.ew-tr-tile > input:checked + .ew-tr-box { border-color: var(--ew-accent); box-shadow: 0 0 0 1px var(--ew-accent); }
.ew-tr-tile > input:focus-visible + .ew-tr-box { box-shadow: var(--ew-focus-ring); }
.ew-tr-demo { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 4px; background-color: #05090b; perspective: 400px; }
.ew-tr-face { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; }
.ew-tr-a { z-index: 2; background-color: #2b6f8a; color: #fff; }
.ew-tr-b { z-index: 1; background-color: #e8893a; color: #2a1400; }
.ew-tr-label { color: var(--ew-text); font-size: 12px; font-weight: 600; line-height: 1.3; }
.ew-tr-sub { display: block; color: var(--ew-text-muted); font-weight: 400; }
/* Dialoge „Folie hinzufügen“ / „Vorlage ändern“: Vorlagen scrollbar (Wunsch Nutzer), darunter Karten „Bild“ und „Text“ nebeneinander */
.ew-slide-choices { max-height: min(46vh, 420px); overflow-y: auto; margin: 4px -4px 0; padding: 4px; border-radius: var(--ew-radius); }
.ew-slide-choices .ew-slides-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.ew-slide-choices .ew-slides-grid-portrait { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.ew-slide-design-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.ew-slide-colors-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.ew-slide-colors-row .ew-field { margin-bottom: 0; }
.ew-slide-colors-row input[type="color"] { width: 110px; }
#ew_slide_design_form [data-ew-opt] > .ew-field, #ew_slide_form [data-ew-for-content] > .ew-field { margin-bottom: 14px; }   /* je Feld eine Hülle: :last-child greift sonst überall */
/* Texteditor (CKEditor) im Dialog: Link-Feld und andere schwebende Felder über dem Dialog (Bootstrap 1055; CKEditor-Standard 1000) */
.ck-body-wrapper { --ck-z-panel: 1100; }   /* Wrapper am Seitenende hat nur diese Klasse */

/* TV → Panels „Code bearbeiten“: großes Fenster, der Editor füllt die Höhe */
.ew-modal .ew-modal-code { max-width: min(1400px, calc(100vw - 32px)); height: calc(100% - 32px); margin: 16px auto; }
.ew-modal .ew-modal-code .modal-content { height: 100%; }
.ew-modal .ew-code-body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 10px; min-height: 0; }
.ew-code-body code { color: var(--ew-text-soft); font-family: SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.ew-panels-code-state.ew-dirty { color: var(--ew-warning) !important; }
/* Code-Editor: Textfeld (Schrift unsichtbar, nur Cursor und Auswahl) genau über der Hervorhebung (Prism), Zeilennummern links;
   immer dunkel. Textfeld und Hervorhebung brauchen exakt dieselbe Schrift, Abstände und Umbrüche, sonst verrutschen sie.
   Klasse .ew-code-editor, nicht .ew-code – die gehört dem Codefeld der Anmeldung (2FA, layout.css). */
.ew-code-editor { display: flex; flex: 1 1 auto; min-height: 280px; overflow: hidden; border: 1px solid var(--ew-line-strong); border-radius: var(--ew-radius); background-color: #0b1114; }
.ew-code-editor .ew-code-lines,
.ew-code-editor .ew-code-view,
.ew-code-editor .ew-code-input { box-sizing: border-box; margin: 0; padding: 12px 14px; border: 0; border-radius: 0; background: transparent; font: 13px/20px SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0; tab-size: 4; -moz-tab-size: 4; white-space: pre; word-wrap: normal; overflow-wrap: normal; }
.ew-code-editor .ew-code-lines { flex: none; min-width: 52px; padding-right: 10px; padding-bottom: 80px; overflow: hidden; border-right: 1px solid rgba(255, 255, 255, .08); color: #56646c; text-align: right; user-select: none; }
.ew-code-area { position: relative; flex: 1 1 auto; min-width: 0; }
.ew-code-editor .ew-code-view,
.ew-code-editor .ew-code-input { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: auto; }
.ew-code-editor .ew-code-view { z-index: 0; color: #d5dde2; pointer-events: none; }
.ew-code-editor .ew-code-view > code { all: unset; font: inherit; white-space: inherit; color: inherit; }
.ew-code-editor .ew-code-input { z-index: 1; resize: none; outline: 0; box-shadow: none; color: transparent; -webkit-text-fill-color: transparent; caret-color: #fff; }
.ew-code-editor .ew-code-input::selection { background-color: rgba(190, 230, 60, .25); }
.ew-code-editor .token { background: none; font-style: normal; font-weight: 400; }
.ew-code-editor .token.comment, .ew-code-editor .token.prolog, .ew-code-editor .token.doctype, .ew-code-editor .token.cdata { color: #6f8089; font-style: italic; }
.ew-code-editor .token.punctuation, .ew-code-editor .token.operator { color: #9aa8b1; }
.ew-code-editor .token.keyword, .ew-code-editor .token.atrule, .ew-code-editor .token.important { color: #c792ea; }
.ew-code-editor .token.string, .ew-code-editor .token.char, .ew-code-editor .token.attr-value, .ew-code-editor .token.url { color: #a8d982; }
.ew-code-editor .token.number, .ew-code-editor .token.boolean, .ew-code-editor .token.constant { color: #f2a65a; }
.ew-code-editor .token.variable, .ew-code-editor .token.tag { color: #f07178; }
.ew-code-editor .token.function, .ew-code-editor .token.class-name { color: #6cb6ff; }
.ew-code-editor .token.attr-name, .ew-code-editor .token.property, .ew-code-editor .token.selector { color: #ffcb6b; }
.ew-code-editor .token.delimiter { color: #4fd1c5; font-weight: 600; }   /* <?php ?> */
@media (max-width: 575.98px) {
    table.ew-table.ew-table-stack > tbody > tr > td[data-label] .ew-screen-target { justify-content: flex-end; text-align: right; }   /* Kartenliste: rechtsbündig wie die anderen Werte */
    table.ew-table.ew-table-stack > tbody > tr > td.ew-col-lock { width: auto; }
    .ew-screen-stage-wrap { padding: 12px; }
    .ew-screen-stage.ew-screen-portrait { width: 100%; height: auto; }
}

/* Segment-Auswahl (z. B. 2FA aus/E-Mail/SMS, Tag/Woche) */
.ew-seg { display: inline-flex; flex-wrap: wrap; max-width: 100%; gap: 2px; padding: 3px; border-radius: var(--ew-radius); background-color: var(--ew-hover); border: 1px solid var(--ew-line); }   /* bricht bei wenig Platz um (Smartphone) */
.ew-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ew-seg label,
.ew-seg .ew-seg-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    margin: 0;
    padding: 5px 12px;
    border-radius: 6px;
    color: var(--ew-text-soft);
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}
.ew-seg input:checked + label,
.ew-seg .ew-seg-item.active { background-color: var(--ew-active); color: var(--ew-text); }
.ew-seg input:focus-visible + label { box-shadow: var(--ew-focus-ring); }
.ew-seg-block { display: flex; }

/* Formular-Abschnitt: Titel + Kurztext links, Felder rechts */
.ew-form-section { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; padding: 20px 0; border-top: 1px solid var(--ew-line); }
.ew-form-section:first-child { border-top: 0; padding-top: 0; }
.ew-form-section > * { min-width: 0; }   /* Inhalt darf schmaler werden statt seitlich überzustehen (z. B. Auswahl mit Vorschau auf 375 px) */
.ew-form-section-title { font-weight: 600; }
.ew-form-section-desc { margin-top: 2px; color: var(--ew-text-muted); font-size: 12px; }
@media (max-width: 767.98px) {
    .ew-form-section { grid-template-columns: 1fr; gap: 10px; }
}

/* Einstellungen mit Live-Vorschau (ui_preview_layout_start(), seit 2026-11-17): Vorschau rechts (side, läuft ab 1200 px mit) oder oben über
   die ganze Breite (top); oben bleibt sie ab 768 px unter der Kopfzeile stehen, die Karten laufen darunter durch. Abschnitte: ui_section_start().
   Höhe der festen Kopfzeile: --bs-app-header-height (Metronic, im neuen Rahmen 74 px), sonst --ew-header-height */
.ew-pv-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px 24px; align-items: start; }
.ew-pv-layout-side { grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); grid-template-areas: "main pv"; }
.ew-pv-layout-side > .ew-pv { grid-area: pv; }
.ew-pv-layout-side > .ew-pv-main { grid-area: main; }
.ew-pv, .ew-pv-main { min-width: 0; }
.ew-pv-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-bottom: 8px; }
.ew-pv-title { font-weight: 600; }
.ew-pv-sub { color: var(--ew-text-muted); font-size: 12px; }
.ew-pv-main > .ew-savebar { margin-top: 20px; }
.ew-section + .ew-section { margin-top: 22px; }
.ew-section-title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--ew-text); font-size: 14px; font-weight: 600; }
.ew-section > .ew-card + .ew-card { margin-top: 12px; }
@media (min-width: 1200px) {
    .ew-pv-layout-side > .ew-pv { position: sticky; top: calc(var(--bs-app-header-height, var(--ew-header-height, 60px)) + 16px);
        max-height: calc(100vh - var(--bs-app-header-height, var(--ew-header-height, 60px)) - 32px); overflow-y: auto; }
}
@media (max-width: 1199.98px) {
    .ew-pv-layout-side { grid-template-columns: minmax(0, 1fr); grid-template-areas: "pv" "main"; }
}
@media (min-width: 768px) and (max-width: 1199.98px) {
    .ew-pv-layout-side > .ew-pv { position: sticky; top: var(--bs-app-header-height, var(--ew-header-height, 60px)); z-index: 4; margin-top: -12px; padding: 12px 0 14px; background-color: var(--ew-bg); }
}
@media (min-width: 768px) {
    .ew-pv-layout-top > .ew-pv { position: sticky; top: var(--bs-app-header-height, var(--ew-header-height, 60px)); z-index: 4; margin-top: -12px; padding: 12px 0 14px; background-color: var(--ew-bg); }
}

/* Speicherleiste (erscheint bei Änderungen) */
.ew-savebar {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background-color: var(--ew-raised);
    border: 1px solid var(--ew-line-strong);
    border-radius: var(--ew-radius-card);
    box-shadow: var(--ew-shadow-float);
}
.ew-savebar-text { display: flex; align-items: center; gap: 8px; color: var(--ew-text-soft); }
.ew-savebar-text .ew-dot { color: var(--ew-warning); }
.ew-savebar .ew-btn:first-of-type { margin-left: auto; }


/* ---------- Wiederholgruppe (Metronic-Formrepeater), z. B. Zusatzoptionen am Lizenzserver ---------- */

.ew-addon {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.7fr) minmax(0, .8fr) minmax(0, .7fr) auto 38px;   /* letzte Spalte fest: erste Zeile hat keinen Löschknopf */
    align-items: end;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--ew-line);
}
.ew-addon:first-child { padding-top: 0; }
.ew-addon-check { height: 38px; }
.ew-addon-delete { height: 38px; width: 38px; }
.ew-addons-actions { display: flex; justify-content: space-between; gap: 8px; padding-top: 14px; }
@media (max-width: 767.98px) {
    .ew-addon { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* ---------- Bild-Upload (Dropzone) ---------- */

.ew-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 140px;
    padding: 20px;
    border: 1.5px dashed var(--ew-line-strong);
    border-radius: var(--ew-radius-card);
    background-color: var(--ew-hover);
    color: var(--ew-text-soft);
    text-align: center;
    cursor: pointer;
    transition: border-color var(--ew-transition), background-color var(--ew-transition);
}
.ew-dropzone:hover,
.ew-dropzone.dz-drag-hover { border-color: var(--ew-accent); background-color: var(--ew-accent-tint); }
.ew-dropzone-icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background-color: var(--ew-accent-tint); color: var(--ew-accent-text); font-size: 20px; }
.ew-dropzone-title { color: var(--ew-text); font-weight: 600; }
.ew-dropzone-hint { color: var(--ew-text-muted); font-size: 12px; }
.ew-dropzone .dz-preview,
.ew-dropzone .dz-message { display: none; }
.ew-dropzone.ew-uploading { pointer-events: none; opacity: .7; }
.ew-dropzone-progress { width: 60%; height: 4px; margin-top: 6px; border-radius: 2px; overflow: hidden; background-color: var(--ew-line); }
.ew-dropzone-progress span { display: block; height: 100%; width: 0; background-color: var(--ew-accent); transition: width .2s ease; }

.ew-image-preview {
    position: relative;
    display: inline-flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 100%;
    padding: 12px;
    border: 1px solid var(--ew-line-strong);
    border-radius: var(--ew-radius-card);
    background-color: var(--ew-hover);
}
.ew-image-preview img { display: block; flex: 0 1 auto; min-width: 0; max-width: 100%; max-height: 160px; border-radius: 6px; }
.ew-image-preview-actions { display: flex; flex: none; flex-direction: column; gap: 6px; }   /* Knöpfe untereinander neben dem Bild (spart Breite, Wunsch Nutzer 2026-11-14) */
.ew-image-preview-actions .ew-icon-btn { background-color: var(--ew-raised); border: 1px solid var(--ew-line-strong); color: var(--ew-text-soft); }
.ew-image-preview-actions .ew-icon-btn.ew-danger:hover { color: var(--ew-danger); }
/* ui_dropzone(…, array("class" => "ew-upload-paper")): Bild auf Weiß, z. B. Unterschriften (dunkle Tinte, oft transparent) */
.ew-upload-paper .ew-image-preview img { padding: 6px; background-color: #fff; }
/* "ew-upload-ink": Bild auf festem Dunkel (auch im hellen Modus), z. B. Logo für dunkle Flächen */
.ew-upload-ink .ew-image-preview img { padding: 6px; background-color: #0c1f28; }
/* ui_dropzone(…, array("kind" => "file")): Datei statt Bild – Symbol, Name als Link, Knöpfe nebeneinander (seit 2026-12-04) */
.ew-file-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--ew-line-strong);
    border-radius: var(--ew-radius-card);
    background-color: var(--ew-hover);
}
.ew-file-preview-icon { display: flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background-color: var(--ew-accent-tint); color: var(--ew-accent-text); font-size: 20px; }
.ew-file-preview-icon i { color: inherit; }
.ew-file-preview-name { flex: 1 1 auto; min-width: 0; color: var(--ew-text); font-weight: 600; overflow-wrap: anywhere; }
a.ew-file-preview-name[href]:hover { color: var(--ew-accent-text); text-decoration: underline; }
.ew-file-preview .ew-image-preview-actions { flex-direction: row; }


/* ---------- Hinweise, Fortschritt, Leer-Zustand ---------- */

.ew-alert { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: var(--ew-radius); background-color: var(--ew-neutral-tint); color: var(--ew-text); }
.ew-alert > .ew-icon { margin-top: 1px; font-size: 17px; }
.ew-alert-title { font-weight: 600; }

/* Fließtext mit Absätzen, Aufzählungen und Links (z. B. Systemmeldungen, einfache Formatierung) */
.ew-prose { overflow-wrap: anywhere; }
.ew-prose p, .ew-prose ul { margin: 0 0 6px; }
.ew-prose ul { padding-left: 18px; }
.ew-prose > :last-child { margin-bottom: 0; }
.ew-prose a { color: var(--ew-accent-text); text-decoration: underline; text-underline-offset: 2px; }
.ew-prose strong { font-weight: 600; }
.ew-alert-success { background-color: var(--ew-success-tint); }
.ew-alert-success > .ew-icon { color: var(--ew-success); }
.ew-alert-warning { background-color: var(--ew-warning-tint); }
.ew-alert-warning > .ew-icon { color: var(--ew-warning); }
.ew-alert-danger { background-color: var(--ew-danger-tint); }
.ew-alert-danger > .ew-icon { color: var(--ew-danger); }
.ew-alert-info { background-color: var(--ew-info-tint); }
.ew-alert-info > .ew-icon { color: var(--ew-info); }

/* Dezenter Hinweis über dem Seiteninhalt (z. B. Startpasswort, app/index.php): schmale Zeile mit blinkendem Punkt.
   Feste halbtransparente Farben und geerbte Schrift → passt auf neue (dunkle) und alte (helle) Seiten. */
.ew-notice { display: flex; align-items: baseline; gap: 10px; width: fit-content; max-width: 100%; margin: 0 0 16px; padding: 7px 12px;
             border: 1px solid rgba(255, 107, 125, .35); border-radius: 8px; background-color: rgba(255, 107, 125, .08); font-size: 13px; line-height: 1.45; }
.ew-notice .ew-dot { color: #ff6b7d; transform: translateY(-1px); }
.ew-notice strong { font-weight: 600; }
.ew-notice a { margin-left: 4px; color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.ew-notice a:hover { color: #ff6b7d; }
body.ew-body .ew-notice { color: var(--ew-text-soft); }   /* neues Design (dunkel): der Inhaltsbereich hat sonst Metronic-Dunkelgrau */
body.ew-body .ew-notice strong, body.ew-body .ew-notice a { color: var(--ew-text); }
body.ew-body .ew-notice a:hover { color: #ff6b7d; }

.ew-meter-box { min-width: 0; }
.ew-card-footer .ew-meter-box { flex: 0 1 280px; }
.ew-meter-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; font-size: 12px; }
.ew-meter-label { color: var(--ew-text); font-weight: 600; }
.ew-meter-value { color: var(--ew-text-muted); white-space: nowrap; }
.ew-meter { height: 6px; margin-top: 6px; overflow: hidden; border-radius: 3px; background-color: var(--ew-line); }
.ew-meter > span { display: block; height: 100%; border-radius: 3px; background-color: var(--ew-accent); }
.ew-meter.ew-meter-warning > span { background-color: var(--ew-warning); }
.ew-meter.ew-meter-danger > span { background-color: var(--ew-danger); }
/* Arbeit läuft gerade (ui_meter(…, true); Variante D in plans/mockups/meter_live.html, Entscheidung Nutzer 2026-10-26: 8 px, „zügiger“):
   Verlauf Lime ↔ Petrol mit schrägen hellen Streifen darüber, beides wandert nach rechts (Verlauf 240 px, Streifen 42 px je 2,5 s).
   Muster in px → jeder Balken gleich schnell. Bei „Bewegung reduzieren“ stehen Verlauf und Streifen. */
.ew-meter.ew-meter-live { height: 8px; border-radius: 4px; }
.ew-meter.ew-meter-live > span { border-radius: 4px;
    background-image: linear-gradient(135deg, var(--ew-meter-stripe) 25%, transparent 25%, transparent 50%, var(--ew-meter-stripe) 50%, var(--ew-meter-stripe) 75%, transparent 75%, transparent),
                      repeating-linear-gradient(90deg, var(--ew-accent) 0, var(--ew-meter-flow) 120px, var(--ew-accent) 240px);
    background-size: 14px 14px, 240px 100%; animation: ew-meter-live 2.5s linear infinite; }
@keyframes ew-meter-live { from { background-position: 0 0, 0 0; } to { background-position: 42px 0, 240px 0; } }
@media (prefers-reduced-motion: reduce) { .ew-meter.ew-meter-live > span { animation: none; } }

.ew-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 20px; text-align: center; }
.ew-empty-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: 6px; border-radius: 12px; background-color: var(--ew-neutral-tint); color: var(--ew-text-soft); font-size: 22px; }
.ew-empty-title { font-size: 15px; font-weight: 600; }
.ew-empty-text { max-width: 360px; margin-bottom: 8px; color: var(--ew-text-muted); }

/* Hinweise: Einträge im Fenster zur Glocke in der Kopfzeile (hints_entry_html(), gemeinsam für alle Apps) */
.ew-hint { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-top: 1px solid var(--ew-line); }
.ew-hint:first-child { padding-top: 0; border-top: 0; }
.ew-hint-icon { display: flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background-color: var(--ew-neutral-tint); color: var(--ew-text-soft); font-size: 17px; }
.ew-hint-icon .ew-icon { color: inherit; font-size: inherit; }
.ew-hint-success .ew-hint-icon { background-color: var(--ew-success-tint); color: var(--ew-success); }
.ew-hint-warning .ew-hint-icon { background-color: var(--ew-warning-tint); color: var(--ew-warning); }
.ew-hint-danger .ew-hint-icon { background-color: var(--ew-danger-tint); color: var(--ew-danger); }
.ew-hint-info .ew-hint-icon { background-color: var(--ew-info-tint); color: var(--ew-info); }
.ew-hint-main { flex: 1 1 auto; min-width: 0; }
.ew-hint-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-bottom: 2px; }
.ew-hint-name { color: var(--ew-text); font-weight: 600; }
.ew-hint-time { color: var(--ew-text-muted); font-size: 12px; white-space: nowrap; }
.ew-hint-text { color: var(--ew-text-soft); overflow-wrap: anywhere; }
.ew-hint-text strong, .ew-hint-text b { color: var(--ew-text); font-weight: 600; }
.ew-hint-text p, .ew-hint-text ul { margin: 0 0 6px; }
.ew-hint-text ul { padding-left: 18px; }
.ew-hint-text > :last-child { margin-bottom: 0; }
.ew-hint-text a { color: var(--ew-accent-text); text-decoration: underline; text-underline-offset: 2px; }
.ew-hint-actions { display: flex; flex: none; gap: 2px; margin-top: -4px; }
.ew-hint-note { margin-top: 2px; padding-top: 14px; border-top: 1px solid var(--ew-line); color: var(--ew-text-muted); font-size: 12px; }
/* Boxen oben auf den Startseiten (hints_start_html()), auch auf Seiten im alten Rahmen */
.ew-root.ew-hint-boxes { display: flex; flex-direction: column; gap: 8px; margin: 0 0 16px; background-color: transparent; }
.ew-hint-boxes:empty { display: none; }
.ew-hint-box > .ew-icon-btn { margin: -5px -6px -5px auto; }

/* ---------- Lichtschleier (Verlauf nur als Ausnahme: Wartebildschirm, Anmeldeseiten, hervorgehobene Kacheln) ---------- */

/* Zwei weiche Lichtflecken (Lime + Petrol) wandern sehr langsam. ui_lights() als erstes Kind eines Elements mit
   .ew-has-lights (der Wartebildschirm .ew-wait bringt Position und isolation selbst mit). Bewegung nur über transform,
   Kreisgröße über padding-bottom (auch ohne aspect-ratio). */
.ew-has-lights { position: relative; overflow: hidden; isolation: isolate; }
.ew-lights { position: absolute; inset: 0; z-index: -1; overflow: hidden; border-radius: inherit; pointer-events: none; }
.ew-lights::before,
.ew-lights::after { content: ""; position: absolute; width: 85%; height: 0; padding-bottom: 85%; border-radius: 50%; will-change: transform; }
.ew-lights::before {
    left: -25%;
    top: -45%;
    background: radial-gradient(closest-side, var(--ew-glow-1), var(--ew-glow-1-soft) 45%, transparent);
    animation: ew-lights-1 36s ease-in-out infinite alternate;
}
.ew-lights::after {
    right: -30%;
    bottom: -55%;
    background: radial-gradient(closest-side, var(--ew-glow-2), var(--ew-glow-2-soft) 45%, transparent);
    animation: ew-lights-2 48s ease-in-out infinite alternate;
}
@keyframes ew-lights-1 { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(40%, 25%) scale(1.15); } 100% { transform: translate(70%, 50%) scale(.95); } }
@keyframes ew-lights-2 { 0% { transform: translate(0, 0) scale(1.05); } 50% { transform: translate(-35%, -20%) scale(.9); } 100% { transform: translate(-65%, -40%) scale(1.1); } }
/* Flache Kachel (eine Listenzeile, z. B. System → Updates „Update verfügbar“): kleinere Lichtflecken, mittig in der Höhe
   (margin-top in % bezieht sich auf die Breite = halber Durchmesser), wandern nur waagrecht */
.ew-has-lights.ew-lights-flat .ew-lights::before,
.ew-has-lights.ew-lights-flat .ew-lights::after { top: 50%; bottom: auto; width: 45%; padding-bottom: 45%; margin-top: -22.5%; }
.ew-has-lights.ew-lights-flat .ew-lights::before { left: -15%; animation-name: ew-lights-flat-1; }
.ew-has-lights.ew-lights-flat .ew-lights::after { right: -20%; animation-name: ew-lights-flat-2; }
@keyframes ew-lights-flat-1 { 0% { transform: translateX(0) scale(1); } 50% { transform: translateX(60%) scale(1.1); } 100% { transform: translateX(110%) scale(.95); } }
@keyframes ew-lights-flat-2 { 0% { transform: translateX(0) scale(1.05); } 50% { transform: translateX(-55%) scale(.9); } 100% { transform: translateX(-100%) scale(1.1); } }
/* Komet am Rahmen (ui_lights(true), Kacheln mit Lichtschleier; Entscheidung Nutzer 2026-10-25, Variante A in
   plans/mockups/lights_border.html): eine kurze Lichtkante (Petrol → Lime) läuft in 14 s am 1-px-Rahmen entlang.
   Sieben weiche, runde Lichtpunkte statt eines Balkens – runde Punkte biegen sauber um die Ecken; der Abstand im Schweif
   ist in px (gleich lang auf jeder Kachel), offset-distance läuft auf dem geschlossenen Pfad über 0 % hinaus.
   Die Maske zeigt nur den Ring über dem Rahmen. Ohne offset-path: inset() (ältere Browser) bleibt der Rahmen ruhig. */
.ew-lights-ring { display: none; }
@supports (offset-path: inset(0 round 12px)) {
    /* Ring liegt auf dem Rahmen (außerhalb des Innenbereichs); die Lichtflecken schneidet .ew-lights selbst ab */
    .ew-has-lights:has(> .ew-lights-ring) { overflow: visible; }
    .ew-lights-ring { display: block; position: absolute; inset: -1px; z-index: 1; padding: 1px; border-radius: inherit; pointer-events: none;
        -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
        mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
    .ew-lights-ring > i { position: absolute; left: 0; top: 0; width: 44px; height: 44px;
        offset-path: inset(0 round var(--ew-radius-card)); offset-rotate: 0deg; offset-anchor: center;
        background: radial-gradient(closest-side, var(--ew-comet-c), transparent); animation: ew-comet 14s linear infinite; }
    .ew-lights-ring > i:nth-child(1) { --ew-comet-lag: 84px; --ew-comet-c: var(--ew-comet-2); opacity: .14; }
    .ew-lights-ring > i:nth-child(2) { --ew-comet-lag: 70px; --ew-comet-c: var(--ew-comet-2); opacity: .28; }
    .ew-lights-ring > i:nth-child(3) { --ew-comet-lag: 56px; --ew-comet-c: var(--ew-comet-2); opacity: .45; }
    .ew-lights-ring > i:nth-child(4) { --ew-comet-lag: 42px; --ew-comet-c: var(--ew-comet-2); opacity: .65; }
    .ew-lights-ring > i:nth-child(5) { --ew-comet-lag: 28px; --ew-comet-c: color-mix(in srgb, var(--ew-comet-1), var(--ew-comet-2)); opacity: .75; }
    .ew-lights-ring > i:nth-child(6) { --ew-comet-lag: 14px; --ew-comet-c: var(--ew-comet-1); opacity: .85; }
    .ew-lights-ring > i:nth-child(7) { --ew-comet-lag: 0px; --ew-comet-c: var(--ew-comet-1); }
}
@keyframes ew-comet { from { offset-distance: calc(0% - var(--ew-comet-lag)); } to { offset-distance: calc(100% - var(--ew-comet-lag)); } }
@media (prefers-reduced-motion: reduce) { .ew-lights::before, .ew-lights::after, .ew-has-lights.ew-lights-flat .ew-lights::before, .ew-has-lights.ew-lights-flat .ew-lights::after { animation: none; } .ew-lights-ring { display: none; } }

/* ---------- Datumsauswahl im Seiten-Design (ui_datepicker in ui.js, Formularfeld ui_date(); plans/todo.md) ---------- */

.ew-datepicker { position: fixed; z-index: 1070; width: 296px; max-width: calc(100vw - 16px); padding: 12px; border: 1px solid var(--ew-line-strong); border-radius: var(--ew-radius-card);
    background-color: var(--ew-raised); box-shadow: var(--ew-shadow-float); }
.ew-dp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.ew-dp-head .ew-icon-btn { margin: -4px -4px 0 0; }
.ew-dp-title { font-weight: 600; }
.ew-dp-value { color: var(--ew-text-soft); font-size: 12px; }
.ew-dp-quick { display: flex; gap: 5px; margin-bottom: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--ew-line); }   /* eine Zeile, Chips schrumpfen mit */
.ew-dp-quick .ew-chip { flex: 1 1 auto; justify-content: center; min-width: 0; height: 28px; padding: 0 6px; }
.ew-dp-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; font-weight: 600; }
.ew-dp-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.ew-dp-wd { padding: 4px 0; color: var(--ew-text-muted); font-size: 11px; font-weight: 600; text-align: center; }
.ew-dp-day { height: 34px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--ew-text); font: 500 13px/1 var(--ew-font); font-variant-numeric: tabular-nums;
    cursor: pointer; transition: background-color var(--ew-transition); }
.ew-dp-day:hover { background-color: var(--ew-active); }
.ew-dp-day:focus-visible { outline: none; box-shadow: var(--ew-focus-ring); }
.ew-dp-day.ew-dp-we { color: var(--ew-text-soft); }
.ew-dp-day.ew-dp-past { color: var(--ew-text-muted); }
.ew-dp-day.ew-dp-out { color: var(--ew-text-muted); opacity: .55; }
.ew-dp-day.ew-dp-today { box-shadow: inset 0 0 0 1px var(--ew-accent); color: var(--ew-accent-text); font-weight: 600; }
.ew-dp-day.ew-dp-sel { background-color: var(--ew-accent); box-shadow: none; color: var(--ew-on-accent); font-weight: 600; opacity: 1; }
.ew-dp-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--ew-line); }
/* Formularfeld ui_date(): Knopf im Aussehen eines Eingabefelds */
.ew-date-btn { display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer; }
.ew-date-btn .ew-icon { color: var(--ew-text-muted); }
.ew-date-text.ew-date-empty { color: var(--ew-text-muted); }

/* Personen als überlappende Avatare (z. B. Personen einer Aufgabenliste); als Knopf mit Fläche beim Überfahren */
.ew-avatar-stack { display: inline-flex; align-items: center; flex: none; min-height: 32px; padding: 2px 6px 2px 2px; border: 0; border-radius: 20px; background: none; color: inherit; cursor: pointer;
    transition: background-color var(--ew-transition); }
.ew-avatar-stack:hover { background-color: var(--ew-active); }
.ew-avatar-stack .ew-avatar { box-shadow: 0 0 0 2px var(--ew-avatar-ring, var(--ew-surface)); }
.ew-avatar-stack .ew-avatar + .ew-avatar { margin-left: -7px; }
.ew-avatar-stack .ew-badge { margin: 3px 0 3px 4px; }

/* Newsletter → Sendeprozess: ein Versand je Abschnitt der Karte (newsletter_send_group_html(),
   app_cms_pages/newsletter-settings/_send_functions.php) – Kopf, Fortschritt, Ende, Empfänger zum Aufklappen */
.ew-nlsend { padding: 14px 16px; border-top: 1px solid var(--ew-line); }
.ew-nlsend:first-child { border-top: 0; }
.ew-nlsend-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ew-nlsend-title { min-width: 0; color: var(--ew-text); font-weight: 600; overflow-wrap: anywhere; }
.ew-nlsend-head > .ew-badge { flex: none; }
.ew-nlsend-sub { margin: 2px 0 10px; color: var(--ew-text-soft); font-size: 12px; overflow-wrap: anywhere; }
.ew-nlsend-sub + .ew-nlsend-foot { margin-top: 0; }   /* abgeschlossen: ohne Fortschrittsbalken */
.ew-nlsend-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; }
.ew-nlsend-info { display: flex; flex-wrap: wrap; gap: 2px 8px; color: var(--ew-text-soft); font-size: 12px; }
.ew-nlsend-info > span + span::before { content: "·"; margin-right: 8px; color: var(--ew-text-muted); }
.ew-nlsend-toggle .ew-icon { transition: transform var(--ew-transition); }
.ew-nlsend-toggle[aria-expanded="true"] .ew-icon { transform: rotate(180deg); }
.ew-nlsend-recipients { margin-top: 12px; }
.ew-nlsend-search { display: flex; margin-bottom: 10px; }
.ew-nlsend-search .ew-search { flex: 0 1 320px; }
.ew-nlsend-recipients > .ew-table-wrap { border: 1px solid var(--ew-line); border-radius: 8px; }

/* Newsletter → Rechteverwaltung: freigegebene Benutzer je Liste als Badges (app_cms_pages/newsletter-rights/start.php);
   ebenso Feeds → Rechteverwaltung (app_cms_pages/feeds-rights/start.php, seit 2026-11-13) */
.ew-nlr-names { display: flex; flex-wrap: wrap; gap: 4px; }
.ew-nlr-names .ew-badge { white-space: normal; overflow-wrap: anywhere; }   /* lange Namen am Smartphone umbrechen */

/* Seitenmenü: Hinweis ohne Einträge und Knopf darunter (z. B. „Neue Liste“, newsletter-lists/_aside.php) */
.ew-aside-note { padding: 6px 12px; color: var(--ew-text-muted); font-size: 12px; }
.ew-aside-action { padding: 12px 8px 4px; }

/* Seitenbaum in der Seitenleiste: Webseite bearbeiten und Intern (app_cms_pages/website/_aside.php, seit 2026-11-17) – wie Seitenstruktur und
   Rechteverwaltung: Baumlinien senkrecht unter dem Pfeil des Eltern-Eintrags, Knick je Ebene gleich lang (auch ohne Pfeil), oberste Ebene ohne
   Linien; die ganze Zeile ist klickbar (::after am Knopf), der Pfeil liegt darüber. Einrückung je Ebene --ew-at-step. */
.ew-aside-tree { --ew-at-step: 18px; --ew-at-pad: 4px; }
.ew-aside-link.ew-at-node { gap: 4px; margin-bottom: 0; padding: 6px 8px 6px calc(var(--ew-at-pad) + var(--ew-depth, 0) * var(--ew-at-step)); }
.ew-aside-link.ew-at-node[hidden] { display: none !important; }   /* zugeklappt */
.ew-at-toggle, .ew-at-toggle-space { flex: none; width: 16px; height: 20px; }
.ew-at-toggle { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--ew-text-muted); cursor: pointer; }
.ew-at-toggle:hover, .ew-at-toggle:focus-visible { background-color: var(--ew-active); color: var(--ew-text); }
.ew-at-node .ew-at-toggle .ew-icon, .ew-at-node.active .ew-at-toggle .ew-icon { color: inherit; font-size: 12px; transition: transform var(--ew-transition); }
.ew-at-toggle[aria-expanded="false"] .ew-icon { transform: rotate(-90deg); }
.ew-at-main { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ew-at-main::after { content: ""; position: absolute; inset: 0; border-radius: var(--ew-radius); }
.ew-at-main:focus-visible { outline: 0; }
.ew-at-main:focus-visible::after { outline: 2px solid var(--ew-accent-line); outline-offset: -2px; }
.ew-at-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ew-at-end { display: inline-flex; flex: none; align-items: center; gap: 6px; margin-left: auto; }
.ew-at-flag { padding: 2px 5px; line-height: 1; }   /* ausgeblendet: oranges Auge */
.ew-at-node .ew-at-flag .ew-icon, .ew-at-node.active .ew-at-flag .ew-icon { color: inherit; }
.ew-at-node .ew-at-pw .ew-icon, .ew-at-node.active .ew-at-pw .ew-icon { color: var(--ew-danger); font-size: 15px; }   /* Passwort: roter Schlüssel */
/* Seite ohne Freigabe (Rolle Standard): blass, nicht klickbar; der Pfeil bleibt bedienbar */
.ew-at-off { cursor: default; }
.ew-aside-link.ew-at-off:hover { background-color: transparent; color: var(--ew-text-soft) !important; }
.ew-at-off .ew-at-main { opacity: .45; cursor: default; }
/* ausgeblendete Seiten und Ordner: Symbol und Titel abgedunkelt, Auge-/Schlüssel-Badge bleibt kräftig (Wunsch Nutzer 2026-11-17); ohne Freigabe ist die Zeile schon blass */
.ew-at-hidden .ew-at-main > .ew-icon, .ew-at-hidden .ew-at-title { opacity: .45; }
.ew-at-hidden.active .ew-at-main > .ew-icon, .ew-at-hidden.active .ew-at-title { opacity: .7; }   /* geöffnete Seite bleibt gut lesbar */
.ew-at-hidden.ew-at-off .ew-at-main > .ew-icon, .ew-at-hidden.ew-at-off .ew-at-title { opacity: 1; }
.ew-at-line { position: absolute; left: calc(var(--ew-at-pad) + (var(--ew-level, 1) - 1) * var(--ew-at-step) + 8px); background-color: var(--ew-line-strong); pointer-events: none; }
.ew-at-line-v { top: 0; bottom: 0; width: 1px; }
.ew-at-line-end { top: 0; height: 50%; width: 1px; }
.ew-at-line-h { top: 50%; height: 1px; width: calc(var(--ew-at-step) - 10px); }
/* eingeklappte Seitenleiste: nur Symbole */
[data-kt-app-sidebar-minimize="on"] .ew-app-aside:not(:hover) .ew-aside-link.ew-at-node { padding-left: 10px; padding-right: 10px; }
[data-kt-app-sidebar-minimize="on"] .ew-app-aside:not(:hover) .ew-at-node > .ew-at-main { display: flex; flex: none; }
[data-kt-app-sidebar-minimize="on"] .ew-app-aside:not(:hover) .ew-at-toggle,
[data-kt-app-sidebar-minimize="on"] .ew-app-aside:not(:hover) .ew-at-title,
[data-kt-app-sidebar-minimize="on"] .ew-app-aside:not(:hover) .ew-at-end,
[data-kt-app-sidebar-minimize="on"] .ew-app-aside:not(:hover) .ew-aside-note,
[data-kt-app-sidebar-minimize="on"] .ew-app-aside:not(:hover) .ew-aside-action { display: none; }

/* Newsletter → Liste → Layout: aufgebaut wie Einstellungen → E-Mail-Versand → Layout, nutzt die Klassen ew-mailtpl-… (seit 2026-11-12) */
/* Newsletter → Newsletter schreiben: Vorschau im Fenster (app_cms_pages/newsletter/start.php) */
.ew-nlw-preview-body { padding: 0; }
.ew-nlw-preview-body iframe { display: block; width: 100%; height: min(75vh, 900px); border: 0; background-color: #ffffff; }

/* Fenster „Einstellungen der Liste“: Erklärung zum Schalter „Öffentliche Liste“ als zwei Kacheln, die passende hervorgehoben */
.ew-nll-states { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.ew-nll-state { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 12px; border: 1px dashed var(--ew-line-strong);
    border-radius: 8px; color: var(--ew-text-soft); font-size: 12px; line-height: 1.5; transition: background-color var(--ew-transition), border-color var(--ew-transition); }
.ew-nll-state.is-current { border-style: solid; background-color: var(--ew-neutral-tint); color: var(--ew-text); }

/* Hilfsklassen für Abstände in ew-Layouts */
.ew-stack { display: flex; flex-direction: column; gap: 12px; }
.ew-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ew-grid { display: grid; gap: 12px; grid-template-columns: repeat(var(--ew-cols, 3), minmax(0, 1fr)); }
@media (max-width: 991.98px) { .ew-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .ew-grid { grid-template-columns: 1fr; } }

/* Newsletter → Automatischer Versand, Bearbeiten (app_cms_pages/newsletter-feeds/edit.php) */
.ew-nlf-span { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 8px; max-width: 360px; }   /* Vergangene/Zukünftige: Zahl + Einheit, untereinander */
.ew-calpdf-span { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 8px; max-width: 360px; }   /* Baustein Kalender-PDF (calendar_pdf_form.php, seit 2026-11-20): Zahl + Einheit */
.ew-calpdf-checks { display: flex; flex-wrap: wrap; gap: 8px 22px; }   /* Spalten (Datum und Titel fest) */
.ew-calpdf-checks .ew-check:has(input:disabled) { opacity: .5; cursor: default; }   /* Datum und Titel: immer im PDF, nicht abwählbar */
.ew-calpdf-logos .ew-choice-media { background-color: #fff; border-color: #e1e4ea; }   /* Logo-Vorschau immer auf Weiß wie im PDF */
.ew-calpdf-logos .ew-choice-media > span { color: #7e8299; font-size: 12px; }
.ew-nlf-new-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
/* angehaltener automatischer Versand: Zeile zurückgenommen (Schalter und Aktionen voll), Schalter im Kopf von Bearbeiten */
.ew-nlf-off > td:not(:first-child):not(.ew-col-actions) { opacity: .55; }
.ew-nlf-head-switch { display: inline-flex; align-items: center; margin-right: 8px; }
/* Newsletter schreiben (newsletter/start.php): Name mit Badge in derselben Zeile (Wunsch Nutzer 2026-11-12) */
.ew-nlw-name { font-weight: 600; overflow-wrap: anywhere; }
.ew-nlw-name .ew-badge { margin-left: 6px; vertical-align: 1px; }
/* Übersicht (start.php): Spalte „Versand“ – zuletzt (zurückgenommen), nächster Termin, „weitere …“ öffnet die Terminliste */
.ew-nlf-sched { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.ew-nlf-sched-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ew-nlf-dim { font-size: 12px; color: var(--ew-text-muted); }
.ew-nlf-dim .ew-badge { background: transparent; box-shadow: inset 0 0 0 1px var(--ew-line-strong); color: var(--ew-text-muted); font-weight: 500; }
.ew-nlf-more { padding: 0; border: 0; background: none; font-size: 12px; color: var(--ew-text-muted); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.ew-nlf-more:hover { color: var(--ew-text); }
.ew-nlf-dates { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ew-nlf-dates li { display: flex; align-items: center; gap: 6px; }
@media (max-width: 575.98px) { .ew-table-stack .ew-nlf-sched { align-items: flex-end; } }   /* Smartphone (gestapelte Tabelle): Werte stehen rechts */

/* Texteditor (CKEditor 5) im Seiten-Design: Farben über die CKEditor-Variablen, auch für das Link-Feld (liegt in .ck-body-wrapper am Seitenende) */
.ew-rte, .ew-body .ck-body-wrapper {
    --ck-font-face: var(--ew-font);
    --ck-font-size-base: 13px;
    --ck-border-radius: var(--ew-radius);
    --ck-color-base-background: var(--ew-input-bg);
    --ck-color-base-border: var(--ew-line-strong);
    --ck-color-base-foreground: var(--ew-surface);
    --ck-color-text: var(--ew-text);
    --ck-color-focus-border: var(--ew-accent);
    --ck-focus-ring: 1px solid var(--ew-accent);
    --ck-color-shadow-drop: rgba(0, 0, 0, .15);
    --ck-color-toolbar-background: var(--ew-surface);
    --ck-color-toolbar-border: var(--ew-line-strong);
    --ck-color-button-default-hover-background: var(--ew-hover);
    --ck-color-button-default-active-background: var(--ew-active);
    --ck-color-button-on-background: var(--ew-accent-tint);
    --ck-color-button-on-hover-background: var(--ew-accent-tint);
    --ck-color-button-on-color: var(--ew-accent-text);
    --ck-color-button-save: var(--ew-success);
    --ck-color-button-cancel: var(--ew-danger);
    --ck-color-panel-background: var(--ew-surface);
    --ck-color-panel-border: var(--ew-line-strong);
    --ck-color-dropdown-panel-background: var(--ew-surface);
    --ck-color-dropdown-panel-border: var(--ew-line-strong);
    --ck-color-input-background: var(--ew-input-bg);
    --ck-color-input-border: var(--ew-line-strong);
    --ck-color-input-text: var(--ew-text);
    --ck-color-labeled-field-label-background: var(--ew-surface);
    --ck-color-link-default: var(--ew-accent-text);
    --ck-color-tooltip-background: var(--ew-text);
    --ck-color-tooltip-text: var(--ew-surface);
    --ck-color-list-background: var(--ew-surface);
    --ck-color-list-button-hover-background: var(--ew-hover);
    --ck-color-list-button-on-background: var(--ew-accent-tint);
    --ck-color-list-button-on-background-focus: var(--ew-accent-tint);
    --ck-color-list-button-on-text: var(--ew-accent-text);
    --ck-color-switch-button-off-background: var(--ew-line-strong);
    --ck-color-switch-button-off-hover-background: var(--ew-line-strong);
    --ck-color-switch-button-on-background: var(--ew-accent);
    --ck-color-switch-button-on-hover-background: var(--ew-accent-hover);
    --ck-color-switch-button-inner-background: var(--ew-surface);
}
.ew-rte .ck.ck-editor__editable_inline { min-height: 160px; font-size: 14px; line-height: 1.55; }
.ew-rte .ck.ck-editor__editable_inline > :first-child { margin-top: .6em; }
.ew-rte .ck-content a { color: var(--ew-accent-text); }

/* Newsletter-Editor (app_cms_pages/newsletter/edit.php; Arbeitsfläche preview.php hat eigene Stile im iframe) */
.ew-nle-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
@media (max-width: 1199.98px) { .ew-nle-layout { grid-template-columns: minmax(0, 1fr); } }
.ew-nle-canvas { border: 1px solid var(--ew-line); border-radius: var(--ew-radius-card); overflow: hidden; background: var(--ew-surface); }
.ew-nle-canvas iframe { display: block; width: 100%; height: 600px; border: 0; }
.ew-nle-side { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 1200px) { .ew-nle-side { position: sticky; top: calc(var(--ew-header-height, 64px) + 16px); } }
.ew-nle-status { align-self: center; font-size: 12px; color: var(--ew-text-muted); white-space: nowrap; min-width: 0; }
.ew-nle-status.is-error { color: var(--ew-danger); font-weight: 600; }
.ew-nle-files { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.ew-nle-file { display: flex; align-items: center; gap: 8px; padding: 4px 0; min-width: 0; }
.ew-nle-file > .ew-icon { flex: none; color: var(--ew-text-muted); }
.ew-nle-file-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ew-text); }
.ew-nle-file-name:hover { text-decoration: underline; }
.ew-nle-files-drop { display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px dashed var(--ew-line-strong); border-radius: var(--ew-radius);
    cursor: pointer; color: var(--ew-text); transition: border-color var(--ew-transition, .15s), background-color var(--ew-transition, .15s); }
.ew-nle-files-drop > .ew-icon { font-size: 22px; color: var(--ew-text-muted); }
.ew-nle-files-drop:hover, .ew-nle-files-drop.dz-drag-hover, .ew-nle-files-drop:focus-visible { border-color: var(--ew-accent); background: var(--ew-accent-tint); outline: none; }
.ew-nle-files-drop.is-uploading { opacity: .6; pointer-events: none; }
.ew-nle-tips { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ew-text-soft); }
/* Vorschau-Kachel (ui_preview_tile): verkleinerte echte Darstellung, z. B. Bausteine im Newsletter-Editor (später auch Website) */
.ew-preview-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ew-preview-tile { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--ew-line-strong); border-radius: var(--ew-radius-card);
    background: var(--ew-surface); overflow: hidden; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.ew-preview-tile:hover, .ew-preview-tile:focus-visible { border-color: var(--ew-accent); box-shadow: 0 0 0 3px var(--ew-accent-tint); outline: none; }
.ew-preview-tile-view { position: relative; display: flex; justify-content: center; overflow: hidden; background: #fff; border-bottom: 1px solid var(--ew-line); }
.ew-preview-tile-view iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: top left; pointer-events: none; background: #fff; }
.ew-preview-tile-body { padding: 10px 12px 12px; }
.ew-preview-tile-title { font-weight: 600; color: var(--ew-text); }
.ew-preview-tile-desc { margin-top: 2px; font-size: 12px; color: var(--ew-text-muted); }
.ew-preview-tile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.ew-preview-tile-actions .ew-btn:first-child { margin-right: auto; }
.ew-preview-tile-static:hover { border-color: var(--ew-line-strong); box-shadow: none; }   /* ohne Klickfläche: kein Hover wie ein Knopf */
.ew-nle-preview-frame { display: block; width: 100%; margin: 0 auto; border: 0; transition: width .2s; }
.ew-nle-preview-frame.is-mobile { width: 390px; max-width: 100%; }
/* Feeds → Social Media (app_cms_pages/feeds-social, seit 2026-11-13): Profilbild, Kacheln der Beiträge; ausgeblendete abgeblendet */
.ew-sm-avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--ew-neutral-tint); }
.ew-sm-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.ew-sm-post { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--ew-line-strong); border-radius: var(--ew-radius-card);
    background: var(--ew-surface); overflow: hidden; transition: opacity .15s; }
.ew-sm-post-media { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; background: var(--ew-neutral-tint);
    color: var(--ew-text-muted); border-bottom: 1px solid var(--ew-line); }
.ew-sm-post-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ew-sm-post-media > .ew-icon { font-size: 28px; }
.ew-sm-post-type { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
    border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; }
.ew-sm-post-flag { position: absolute; left: 8px; top: 8px; display: none; }
.ew-sm-post-body { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; padding: 10px 12px 12px; min-width: 0; }
.ew-sm-post-text { font-size: 13px; color: var(--ew-text); overflow-wrap: anywhere; }
.ew-sm-post-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; }
.ew-sm-post-link { color: var(--ew-text-muted); }
.ew-sm-post-link:hover { color: var(--ew-accent-text); }
.ew-sm-post.is-hidden .ew-sm-post-media img, .ew-sm-post.is-hidden .ew-sm-post-text { opacity: .4; }
.ew-sm-post.is-hidden .ew-sm-post-flag { display: block; }
/* Feeds → Kalender (app_cms_pages/feeds-calendar, seit 2026-11-13): Farbpunkt des Kalenders, vergangene Termine blasser, Trennzeile „Ab jetzt“ */
.ew-fcal-dot { flex: none; display: inline-block; width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 3px var(--ew-neutral-tint); }
.ew-list-row.ew-fcal-past .ew-list-text { opacity: .6; }
.ew-list-row.ew-fcal-now { justify-content: center; padding-top: 4px; padding-bottom: 4px; font-weight: 600; color: var(--ew-accent-text); background: var(--ew-accent-tint); }
/* Feeds → Eigene Feeds (app_cms_pages/feeds-own, seit 2026-11-14): Vorschaubild in der Liste, unsichtbare Einträge blasser,
   Datumsfelder nebeneinander, Kacheln der weiteren Fotos und Videos */
.ew-fo-thumb { flex: none; width: 40px; height: 40px; border-radius: var(--ew-radius); object-fit: cover; background: var(--ew-neutral-tint); }
.ew-table tr.ew-fo-inactive .ew-col-main .ew-person-name, .ew-table tr.ew-fo-inactive .ew-fo-thumb { opacity: .55; }
.ew-fo-header-actions { display: flex; align-items: center; gap: 8px; }
.ew-fo-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ew-fo-switches { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 12px; }
.ew-fo-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.ew-fo-media-tile { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--ew-line-strong); border-radius: var(--ew-radius-card); overflow: hidden; background: var(--ew-surface); }
.ew-fo-media-thumb { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; background: var(--ew-neutral-tint); color: var(--ew-text-muted); }
.ew-fo-media-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ew-fo-media-thumb > .ew-icon { font-size: 26px; }
.ew-fo-media-type { position: absolute; top: 6px; right: 6px; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
    border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; font-size: 11px; }
.ew-fo-media-actions { display: flex; justify-content: space-between; gap: 2px; padding: 4px; }
/* Vorschau eines Eintrags (Klick auf Bild oder Überschrift, seit 2026-11-14) */
.ew-fo-thumb-btn { flex: none; display: inline-flex; padding: 0; border: 0; background: none; border-radius: var(--ew-radius); cursor: pointer; }
.ew-fo-thumb-btn:hover .ew-fo-thumb, .ew-fo-thumb-btn:focus-visible .ew-fo-thumb { box-shadow: 0 0 0 2px var(--ew-accent); }
.ew-fo-title-link { color: inherit; text-decoration: none; }
.ew-fo-title-link:hover, .ew-fo-title-link:focus-visible { color: inherit; text-decoration: underline; }
a.ew-fo-link { text-decoration: none; cursor: pointer; }   /* Direktlink eines Eintrags (Liste) */
a.ew-fo-link:hover, a.ew-fo-link:focus-visible { background-color: var(--ew-accent-tint); color: var(--ew-accent-text); }
a.ew-fo-link[hidden] { display: none; }
.ew-fo-preview-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ew-fo-preview-head-actions { margin-left: auto; flex-shrink: 0; display: flex; align-items: flex-start; gap: 8px; }
.ew-fo-preview-pic { display: block; max-width: 100%; max-height: 60vh; margin: 0 auto 16px; border-radius: var(--ew-radius-card); }
.ew-fo-preview-text { margin-bottom: 16px; }
.ew-fo-preview-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.ew-fo-preview-media img, .ew-fo-preview-media video { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--ew-radius); background: var(--ew-neutral-tint); }
@media (max-width: 575.98px) { .ew-fo-dates { grid-template-columns: minmax(0, 1fr); } }

/* Webseite → Einstellungen (website-settings, seit 2026-11-14): Markensymbole vor den Profilnamen gleich breit, damit die Namen bündig stehen */
.ew-ws-brand { display: inline-block; width: 18px; margin-right: 4px; text-align: center; color: var(--ew-text-muted); }
/* Sprachen: Flagge in der Listenzeile und im Kontextmenü */
.ew-ws-flag { flex: none; width: 24px; height: auto; border-radius: 3px; box-shadow: 0 0 0 1px var(--ew-line); }
.ew-dropdown-item .ew-ws-flag { width: 20px; }
.ew-ws-lang-menu { max-height: 420px; overflow-y: auto; }
.ew-ws-langs { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.ew-ws-langs .ew-check { margin-bottom: 0; }
/* Sprachen auf umgestellten Systemen (Stufe 7b von plans/website_editor.md, seit 2026-11-23): Modus als drei Karten, Füllstand je Sprache */
.ew-wl-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ew-wl-modes .ew-choice { height: 100%; margin-bottom: 0; }
.ew-wl-modes .ew-choice:has(input:disabled) { opacity: .55; cursor: not-allowed; }
@media (max-width: 991.98px) { .ew-wl-modes { grid-template-columns: minmax(0, 1fr); } }
.ew-wl-meter { height: 6px; max-width: 280px; margin-top: 7px; border-radius: 3px; background-color: var(--ew-hover); overflow: hidden; }
.ew-wl-meter > i { display: block; height: 100%; border-radius: 3px; background-color: var(--ew-success); }
.ew-wl-row .ew-list-end { display: flex; align-items: center; gap: 6px; }

/* Webseite → Rechteverwaltung (app_cms_pages/website-rights, seit 2026-11-15): Seitenbaum eingerückt nach Ebene, Ordner ohne Freigabe */
/* Seitenbaum mit Linien wie in der Seitenstruktur, Ordner auf-/zuklappbar (Wunsch Nutzer 2026-11-15, Variante C): Einrückung je Ebene
   --ew-wsr-step; Linien liegen in der Zelle (td hat 16 px Innenabstand links), senkrecht unter dem Pfeil des Eltern-Eintrags (Mitte der 18 px breiten Pfeil-Spalte), Knick auf halber Zeilenhöhe (Titel und Zusätze stehen in einer Zeile) bis zur Pfeil-Spalte – je Ebene gleich lang,
   auch bei Seiten ohne Pfeil (Wunsch Nutzer 2026-11-15) */
table.ew-wsr-table { --ew-wsr-step: 22px; }
.ew-wsr-tree { position: relative; }
.ew-wsr-page { display: flex; align-items: center; gap: 6px; padding-left: calc(var(--ew-depth, 0) * var(--ew-wsr-step)); }
.ew-wsr-page > .ew-icon { flex: none; margin-right: 4px; color: var(--ew-text-muted); }
.ew-wsr-title { min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.ew-wsr-sub { margin-left: 6px; font-size: 12px; font-weight: 400; color: var(--ew-text-muted); }
.ew-wsr-toggle, .ew-wsr-toggle-space { flex: none; width: 18px; height: 20px; }
.ew-wsr-toggle { display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--ew-text-muted); cursor: pointer; }
.ew-wsr-toggle:hover, .ew-wsr-toggle:focus-visible { background-color: var(--ew-active); color: var(--ew-text); }
.ew-wsr-toggle .ew-icon { font-size: 12px; transition: transform var(--ew-transition); }
.ew-wsr-toggle[aria-expanded="false"] .ew-icon { transform: rotate(-90deg); }
.ew-wsr-line { position: absolute; left: calc(16px + (var(--ew-level, 1) - 1) * var(--ew-wsr-step) + 9px); background-color: var(--ew-line-strong); pointer-events: none; }
.ew-wsr-line-v { top: 0; bottom: 0; width: 1px; }
.ew-wsr-line-end { top: 0; height: 50%; width: 1px; }
.ew-wsr-line-h { top: 50%; height: 1px; width: calc(var(--ew-wsr-step) - 11px); }
table.ew-wsr-table > tbody > tr[hidden] { display: none !important; }   /* zugeklappt (auch in der Kartenliste am Smartphone) */
/* Ordnerzeilen ohne eigene Tönung (getönt nur am 2026-11-15, auf Wunsch Nutzer 2026-11-16 zurückgenommen) */
@media (max-width: 767.98px) { table.ew-wsr-table { --ew-wsr-step: 16px; } }
@media (max-width: 575.98px) {   /* Kartenliste: nur Einrückung */
    table.ew-wsr-table { --ew-wsr-step: 12px; }
    .ew-wsr-line { display: none; }
}
.ew-wsr-flag { margin-left: 6px; padding: 2px 5px; vertical-align: 1px; }   /* gesperrt (rotes Schloss) / ausgeblendet (oranges Auge) hinter dem Seitentitel */
/* gleiche Spalten in allen Navigations-Karten (sonst richtet sich jede Tabelle nach ihren Titeln); Smartphone bleibt Kartenliste */
@media (min-width: 576px) {
    table.ew-wsr-table { table-layout: fixed; }
    table.ew-wsr-table > thead > tr > th:first-child { width: 50%; }
}

/* ---------- Webseite → Seitenstruktur (app_cms_pages/navigation, seit 2026-11-15) ----------
   jstree (Ziehen zum Sortieren/Verschieben) im neuen Design: Zeilen über die ganze Kachelbreite mit Trennlinie wie eine Tabelle,
   Ordnerzeilen ohne Tönung und Ordnersymbol gedämpft wie in der Rechteverwaltung (Wunsch Nutzer 2026-11-16), Baumlinien wie Webseite → Rechteverwaltung (senkrecht unter dem Pfeil des Eltern-Eintrags, Knick je
   Ebene gleich lang), Pfeil statt der jstree-Grafiken. Fläche der Zeile = ::before am Anker (z-index -1 im Baum, links weit über den Rand,
   .ew-nt-wrap schneidet ab), damit die Einrückung die Fläche nicht verkürzt. Knotentext: navigation_tree_json() (_navigation_functions.php). */
.ew-nt-wrap { padding: 0 16px; overflow-x: auto; overflow-y: hidden; }
.ew-nt { --ew-nt-row: 42px; --ew-nt-step: 24px; --ew-nt-ocl: 24px; position: relative; z-index: 0; padding: 0 0 2px; color: var(--ew-text); font-size: 14px; }
.ew-nt.jstree-default .jstree-node { min-height: var(--ew-nt-row); line-height: var(--ew-nt-row); margin-left: var(--ew-nt-step); min-width: 0; position: relative; background: none; }
.ew-nt.jstree-default .jstree-container-ul > .jstree-node { margin-left: 0; }
.ew-nt.jstree-default .jstree-icon,
.ew-nt.jstree-default .jstree-icon:empty { width: var(--ew-nt-ocl); height: var(--ew-nt-row); line-height: var(--ew-nt-row); background: none; }
.ew-nt.jstree-default .jstree-anchor { position: relative; display: inline-flex; align-items: center; gap: 8px; width: calc(100% - var(--ew-nt-ocl)); height: var(--ew-nt-row);
    line-height: 1.3; padding: 0 0 0 2px; color: var(--ew-text); background: none; box-shadow: none; border-radius: 0; cursor: pointer; }
.ew-nt.jstree-default .jstree-anchor::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: -2000px; right: -16px;
    border-bottom: 1px solid var(--ew-line); background-color: transparent; transition: background-color var(--ew-transition); pointer-events: none; }
.ew-nt.jstree-default .jstree-hovered,
.ew-nt.jstree-default .jstree-clicked { background: none; box-shadow: none; border-radius: 0; }
.ew-nt.jstree-default .jstree-hovered::before { background-color: var(--ew-hover); }
.ew-nt.jstree-default .jstree-clicked::before { background-color: var(--ew-accent-tint); }
.ew-nt.jstree-default .jstree-anchor:focus-visible::before { box-shadow: inset 0 0 0 2px var(--ew-accent-line); }
/* Symbol der Art (Seite, Ordner, Weiterleitung) */
.ew-nt.jstree-default .jstree-anchor > .jstree-themeicon { flex: none; width: 20px; height: auto; line-height: 1; margin: 0; font-size: 18px; color: var(--ew-text-muted); }
/* Pfeil zum Auf-/Zuklappen */
.ew-nt.jstree-default .jstree-ocl { position: relative; cursor: pointer; }
.ew-nt.jstree-default .jstree-leaf > .jstree-ocl { cursor: default; }
.ew-nt.jstree-default .jstree-open > .jstree-ocl::before,
.ew-nt.jstree-default .jstree-closed > .jstree-ocl::before { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px;
    border-right: 1.5px solid var(--ew-text-muted); border-bottom: 1.5px solid var(--ew-text-muted); transform: translate(-50%, -70%) rotate(45deg); transition: transform var(--ew-transition); }
.ew-nt.jstree-default .jstree-closed > .jstree-ocl::before { transform: translate(-70%, -50%) rotate(-45deg); }
.ew-nt.jstree-default .jstree-ocl:hover::before { border-color: var(--ew-text); }
/* Baumlinien (nicht auf der obersten Ebene): senkrecht durch den ganzen Eintrag samt Unterseiten, beim letzten nur bis zur Zeilenmitte */
.ew-nt.jstree-default .jstree-node > .jstree-children > .jstree-node::before,
.ew-nt.jstree-default .jstree-node > .jstree-children > .jstree-node::after { content: ""; position: absolute; left: calc(var(--ew-nt-ocl) / 2 - var(--ew-nt-step));
    background-color: var(--ew-line-strong); pointer-events: none; }
.ew-nt.jstree-default .jstree-node > .jstree-children > .jstree-node::before { top: 0; bottom: 0; width: 1px; }
.ew-nt.jstree-default .jstree-node > .jstree-children > .jstree-node.jstree-last::before { bottom: auto; height: calc(var(--ew-nt-row) / 2); }
.ew-nt.jstree-default .jstree-node > .jstree-children > .jstree-node::after { top: calc(var(--ew-nt-row) / 2); width: calc(var(--ew-nt-step) - var(--ew-nt-ocl) / 2 - 1px); height: 1px; }
/* Zeileninhalt: Titel, Badges (gesperrt/ausgeblendet), rechts Passwort und Adresse */
.ew-nt-row { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.ew-nt-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.ew-nt-fallback { font-style: italic; color: var(--ew-text-muted); }   /* Titel der weiteren Sprache fehlt: deutscher Titel */
.ew-nt-flag { flex: none; padding: 2px 5px; line-height: 1; }
.ew-nt-end { display: flex; align-items: center; gap: 10px; flex: 0 1 auto; min-width: 0; max-width: 45%; margin-left: auto; padding-left: 12px; }
.ew-nt-url { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--ew-text-muted); }
.ew-nt-pw { display: inline-flex; flex: none; color: var(--ew-danger); }
.ew-nt-pw .ew-icon { font-size: 15px; }
/* „+“ am Ordner (seit 2026-11-16): Seite oder Ordner unten im Ordner anlegen – Menü #ew_nt_add_menu in edit.php; immer sichtbar (Touch) */
.ew-nt-plus { flex: none; cursor: pointer; background-color: var(--ew-surface); }
.ew-nt-plus .ew-icon { font-size: 15px; }
.ew-nt-plus:hover,
.ew-nt-plus.show { border-color: var(--ew-accent-line); background-color: var(--ew-accent-tint); color: var(--ew-accent-text); }
.ew-nt-plus:focus-visible { outline: 2px solid var(--ew-accent-line); outline-offset: 1px; }
.ew-nt-add-dd { height: 0; }
.ew-nt-notes { flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; }
.ew-nt-legend { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 12px; color: var(--ew-text-muted); }
.ew-nt-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.ew-nt-lang-current { display: inline-flex; align-items: center; gap: 8px; }
.ew-nt-lang-current .ew-ws-flag { width: 20px; }
/* Hilfsbild beim Ziehen (hängt an body) und Einfügemarke */
#jstree-dnd.jstree-default { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--ew-radius); background-color: var(--ew-raised);
    color: var(--ew-text); box-shadow: var(--ew-shadow-float); font: 600 14px/1.3 var(--ew-font); }
#jstree-dnd.jstree-default .ew-nt-end,
#jstree-dnd.jstree-default .ew-nt-flag,
#jstree-dnd.jstree-default .jstree-copy { display: none; }
#jstree-marker { border-left-color: var(--ew-accent-line); color: var(--ew-accent-line); }
#jstree-marker::after { content: ""; position: absolute; left: 0; top: -1px; width: 240px; height: 2px; border-radius: 1px; background-color: var(--ew-accent-line); }
/* Fenster „Eintrag bearbeiten“ */
.ew-nte-langs { display: flex; flex-direction: column; gap: 6px; }
.ew-nte-addon { gap: 6px; white-space: nowrap; }
.ew-nte-addon .ew-ws-flag { width: 20px; }
/* Direktlink unter der Adresse: kleines Badge mit Link-Symbol (seit 2026-11-16) */
.ew-nte-link { display: flex; min-width: 0; margin-top: -1px; }
.ew-nte-link-badge { max-width: 100%; min-width: 0; font-size: 12px; font-weight: 500; }
.ew-nte-link-badge > span { min-width: 0; overflow-wrap: anywhere; }
/* eigene Farbe im Menü: Punkt vor der Adresse; Muster in der Legende */
.ew-nt-color { flex: none; display: inline-block; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 1px var(--ew-line-strong); }
.ew-nt-color-sample { background: conic-gradient(#e5484d, #f5a524, #c9ea2f, #30a46c, #0090ff, #8e4ec6, #e5484d); }
.ew-nte-color { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ew-nte-color-input { width: 64px; height: 36px; padding: 3px; }
/* umgestellte Systeme (Stufe 7e): Sichtbarkeit je Sprache, „… sperren“ ganz unten (Superadmin) */
.ew-nte-visrows { display: grid; gap: 8px; }
.ew-nte-visrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ew-nte-visrow .ew-ws-flag { width: 20px; }
.ew-nte-visname { min-width: 90px; color: var(--ew-text-soft); font-size: 13px; }
.ew-nte-off .ew-seg { opacity: .45; }
.ew-nte-lock { margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--ew-line); }
.ew-nte-path { overflow-wrap: anywhere; }
@media (max-width: 575.98px) {
    .ew-nt { --ew-nt-step: 16px; --ew-nt-row: 44px; }
    .ew-nt-url { display: none; }
}

/* ---------- Kachelkopf mit Titel (Vorlage, Styleguide → Seite; Wunsch Nutzer 2026-11-15) ----------
   Jede Kachel mit Titel bekommt den Kopf der Montage-Rechteübersicht (.ew-help-head in app_montage/styles/styles.php): getönt, kräftige
   Linie, Titel 18 px fett – neue Kacheln sind beim Scrollen schneller zu erkennen. ui_card_start() setzt ew-card-head-strong automatisch,
   sobald es einen Titel gibt; selbst gebaute Köpfe tragen die Klasse an der Karte. Symbol vor dem Titel optional (title_icon) als Lime-Kachel.
   Ausnahme ew-card-info: reine Info-Kachel (z. B. „Zugriff auf alle …“ mit Admins und Autoren) – ohne eigene Fläche, gestrichelter Rahmen,
   normaler Titel und gedämpftes Symbol, damit sie sich von den bearbeitbaren Kacheln abhebt.
   Abstand zwischen gestapelten Kacheln: --ew-card-gap (tokens.css), Regeln in layout.css (.ew-page) und hier (.ew-stack, Tabs). */
.ew-card.ew-card-head-strong > .ew-card-header { gap: 12px; padding: 14px 16px; background-color: var(--ew-active); border-bottom: 1px solid var(--ew-line-strong); border-radius: calc(var(--ew-radius-card) - 1px) calc(var(--ew-radius-card) - 1px) 0 0; }
.ew-card.ew-card-head-strong > .ew-card-header:last-child { border-bottom: 0; border-radius: calc(var(--ew-radius-card) - 1px); }   /* Kachel nur mit Kopf */
.ew-card.ew-card-head-strong > .ew-card-header .ew-card-title { font-size: 18px; font-weight: 700; }
.ew-card-title-icon { flex: none; font-size: 18px; color: var(--ew-text-muted); }   /* ui_card_start(title_icon) */
.ew-card-header > .ew-card-title-icon + .ew-card-title { margin-left: -2px; }
.ew-card.ew-card-head-strong > .ew-card-header > .ew-card-title-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: var(--ew-radius); background-color: var(--ew-accent-tint); color: var(--ew-accent-text); font-size: 18px; }
.ew-card.ew-card-head-strong > .ew-card-header > .ew-card-title-icon + .ew-card-title { margin-left: 0; }
.ew-card.ew-card-info { background-color: transparent; border-style: dashed; }
.ew-card.ew-card-info > .ew-card-header { border-bottom-style: dashed; }
/* Zurückgenommener Hinweis (Vorlage seit 2026-11-15, Wunsch Nutzer; Styleguide → Seite „Kacheln mit Titel“): klein, kursiv, gedämpft –
   z. B. „nur Admins und Autoren“ und „Ordner“ in den Rechteseiten; Farbe --ew-text-muted zu 70 % (im Dunklen dunkler, im Hellen heller) */
.ew-note { font-size: 12px; font-style: italic; color: var(--ew-text-muted); color: color-mix(in srgb, var(--ew-text-muted) 70%, transparent); }
/* gestapelte Kacheln: .ew-stack hat 12 px Lücke, Tabs keine */
.ew-stack > .ew-card + .ew-card { margin-top: calc(var(--ew-card-gap) - 12px); }
.tab-pane > .ew-card + .ew-card { margin-top: var(--ew-card-gap); }

/* Auswahlliste mit Vorschau (ui_select_preview, ui.js; seit 2026-11-16, z. B. Website-Builder → Einstellungen → Ecken): Knopf wie
   select.ew-input mit der gewählten Vorschau, Menü mit Radios als Zeilen (Radio unsichtbar, Fokus an der Zeile) */
.ew-select-preview { position: relative; }
.ew-select-preview-btn {
    display: flex;
    align-items: center;
    height: auto;
    min-height: 38px;
    padding: 5px 34px 5px 10px;
    text-align: left;
    cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, var(--ew-text-muted) 50%), linear-gradient(135deg, var(--ew-text-muted) 50%, transparent 50%);
    background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
    background-size: 5px 5px;
    background-repeat: no-repeat;
}
.ew-select-preview-btn[aria-expanded="true"] { border-color: var(--ew-accent); box-shadow: var(--ew-focus-ring); }
.dropdown-menu.ew-dropdown.ew-select-preview-menu { min-width: 100%; max-height: 340px; overflow-y: auto; }
.ew-select-preview-item { position: relative; white-space: normal; }
.ew-select-preview-item input { position: absolute; opacity: 0; pointer-events: none; }
.ew-select-preview-item:has(input:focus-visible) { background-color: var(--ew-active); box-shadow: var(--ew-focus-ring); }
.ew-select-preview-face { display: flex; flex: 1 1 auto; align-items: center; gap: 10px; min-width: 0; }
.ew-select-preview-title { min-width: 0; }
.ew-select-preview-btn .ew-select-preview-face { overflow: hidden; }   /* im Knopf: zu lange Wahl wird gekürzt (schmale Bildschirme) */
.ew-select-preview-btn .ew-select-preview-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ew-select-preview-sub { margin-left: auto; padding-left: 12px; color: var(--ew-text-muted); font-size: 12px; white-space: nowrap; }
.ew-select-preview-item.active .ew-select-preview-sub { color: inherit; }

/* Code-Feld (ui_code_editor, ui.js; seit 2026-11-16, Website-Builder): Textfeld mit durchsichtiger Schrift über der hervorgehobenen Kopie
   (Prism) – beide mit gleicher Schrift, gleichem Abstand und ohne Umbruch, damit die Zeichen genau übereinander liegen.
   Farben aus den Tokens (hell und dunkel lesbar). Rahmen-Klasse .ew-code-field (bis 2026-11-17 .ew-code-editor – die gehört dem Code-Editor unter
   TV → Panels: dessen Mindesthöhe und Farben mischten sich mit diesem Feld). Mit Mitwachsen (data-ew-code-grow) folgt die Höhe dem Inhalt (ui.js). */
.ew-code-field {
    position: relative;
    height: var(--ew-code-height, 420px);
    min-height: 0;
    overflow: hidden;
    background-color: var(--ew-input-bg);
    border: 1px solid var(--ew-line-strong);
    border-radius: var(--ew-radius);
    transition: border-color var(--ew-transition), box-shadow var(--ew-transition);
}
.ew-code-field:hover { border-color: var(--ew-text-muted); }
.ew-code-field:focus-within { border-color: var(--ew-accent); box-shadow: var(--ew-focus-ring); }
.ew-code-editor-hl,
.ew-code-editor-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 12px 14px;
    border: 0;
    overflow: auto;
    white-space: pre;
    word-wrap: normal;
    overflow-wrap: normal;
    font: 12.5px/1.6 SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0;
    tab-size: 4;
    -moz-tab-size: 4;
}
.ew-code-editor-hl { z-index: 0; background: transparent; color: var(--ew-text); pointer-events: none; }
.ew-code-editor-hl code { display: block; padding: 0; background: none; color: inherit; font: inherit; white-space: inherit; box-shadow: none; }
.ew-code-editor-input { z-index: 1; resize: none; background: transparent; color: transparent; caret-color: var(--ew-text); outline: none; }
.ew-code-editor-input::placeholder { color: var(--ew-text-muted); }
.ew-code-editor-input::selection { background-color: var(--ew-accent-tint); color: transparent; }
.ew-code-field .token.comment, .ew-code-field .token.prolog, .ew-code-field .token.doctype, .ew-code-field .token.cdata { color: var(--ew-text-muted); font-style: italic; }
.ew-code-field .token.punctuation { color: var(--ew-text-soft); }
.ew-code-field .token.tag, .ew-code-field .token.property, .ew-code-field .token.keyword { color: var(--ew-info); }
.ew-code-field .token.attr-name, .ew-code-field .token.selector, .ew-code-field .token.function { color: var(--ew-warning); }
.ew-code-field .token.attr-value, .ew-code-field .token.string, .ew-code-field .token.url { color: var(--ew-success); }
.ew-code-field .token.number, .ew-code-field .token.boolean, .ew-code-field .token.entity, .ew-code-field .token.atrule, .ew-code-field .token.important { color: var(--ew-danger); }
.ew-code-field .token.tag .token.punctuation { color: var(--ew-text-soft); }
.ew-code-field .token.attr-value .token.punctuation { color: var(--ew-success); }

/* Website-Builder (app_cms_pages/website-builder, neues Design seit 2026-11-16): Farbfeld mit Hex-Wert, Ecken-Vorschau in der Hauptfarbe
   der Webseite (--ew-wsb-main am Rahmen, zieht beim Ändern der Hauptfarbe mit), technische Angaben der Installation */
.ew-wsb-color { display: flex; align-items: center; gap: 10px; }
.ew-wsb-color input[type="color"].ew-input { width: 64px; }
.ew-wsb-color-hex { color: var(--ew-text-soft); text-transform: uppercase; }
.ew-wsb-radius { flex: none; width: 48px; height: 30px; background-color: var(--ew-wsb-main, var(--ew-accent)); border: 1px solid var(--ew-line-strong); }
.ew-wsb-paths .ew-list-row { align-items: baseline; }
.ew-wsb-paths .ew-list-title { flex: none; width: 140px; color: var(--ew-text-soft); font-weight: 500; }
.ew-wsb-paths .ew-mono { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 575.98px) {
    .ew-wsb-paths .ew-list-row { flex-direction: column; gap: 2px; }
    .ew-wsb-paths .ew-list-title { width: auto; }
}
/* Website-Builder → Navigation: Farben als Raster (Zeile = Farbe, Spalten oben / beim Scrollen); auf dem Smartphone untereinander, dann
   steht die Spalte über jeder Zelle (.ew-wsb-color-col). Logos als Auswahlkarten auf der Hintergrundfarbe der Leiste. */
.ew-wsb-color-grid { display: grid; grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1fr); gap: 14px 24px; align-items: start; }
.ew-wsb-color-head { color: var(--ew-text-soft); font-size: 12px; font-weight: 600; }
.ew-wsb-color-label { padding-top: 9px; font-weight: 500; }
.ew-wsb-color-cell { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ew-wsb-color-col { display: none; color: var(--ew-text-muted); font-size: 12px; }
.ew-wsb-logo-choices .ew-choice { margin-bottom: 0; }
.ew-wsb-logo-media { height: 64px; }
.ew-wsb-logo-missing { color: #7a8c97; font-size: 12px; font-style: italic; }
@media (max-width: 767.98px) {
    .ew-wsb-color-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .ew-wsb-color-head { display: none; }
    .ew-wsb-color-label { grid-column: 1 / -1; padding-top: 6px; border-top: 1px solid var(--ew-line); }
    .ew-wsb-color-label:nth-child(4) { padding-top: 0; border-top: 0; }
    .ew-wsb-color-col { display: block; }
}
@media (max-width: 420px) {
    .ew-wsb-color-grid { grid-template-columns: minmax(0, 1fr); }
}
/* Website-Builder → Hervorhebung: Vorschau eines hervorgehobenen Bereichs in den Farben der Webseite (CSS-Variablen --wsb-* am Formular,
   ziehen beim Ändern mit) und Auswahlkarten für den Übergang (Bogen/Schräge, Formen wie website/index.php) */
.ew-wsb-hl-preview { overflow: hidden; background: var(--wsb-bg1, #ffffff); border: 1px solid var(--ew-line); border-radius: var(--ew-radius); }
.ew-wsb-hl-page { padding: 14px 20px; color: #7a8c97; font-size: 12px; }
.ew-wsb-hl-edge-wrap { display: block; color: var(--wsb-bg2); line-height: 0; }
.ew-wsb-hl-edge-wrap[hidden] { display: none; }
.ew-wsb-hl-edge { display: block; width: 100%; height: auto; }
.ew-wsb-hl-edge-start { margin-bottom: -1px; }
.ew-wsb-hl-edge-end { margin-top: -1px; }
.ew-wsb-hl-block { padding: 22px 20px; background: var(--wsb-bg2-fill, var(--wsb-bg2)); color: var(--wsb-text); }   /* -fill: Farbe oder Verlauf (seit 2026-12-03) */
.ew-wsb-hl-edge-end { color: var(--wsb-bg2-end, var(--wsb-bg2)); }   /* Übergang unten in der letzten Farbe des Verlaufs */
.ew-wsb-hl-block .ew-wsb-hl-icon { font-size: 26px; color: var(--wsb-main2); }
.ew-wsb-hl-head { margin: 6px 0 4px; color: var(--wsb-head); font-size: 18px; font-weight: 600; }
.ew-wsb-hl-text { color: var(--wsb-text); }
.ew-wsb-hl-link { color: var(--wsb-link); text-decoration: underline; cursor: pointer; }
.ew-wsb-hl-link:hover { color: var(--wsb-link-hover); }
.ew-wsb-trans-choices .ew-choice { margin-bottom: 0; }
.ew-wsb-trans-media { flex-direction: column; align-items: stretch; justify-content: center; height: 72px; padding: 10px 0; background: var(--wsb-bg1, #ffffff); color: var(--wsb-bg2); }
.ew-wsb-trans-edge { display: block; flex: none; width: 100%; height: 12px; }
.ew-wsb-trans-band { display: block; flex: none; height: 14px; margin: -1px 0; background: var(--wsb-bg2); }
.ew-wsb-dim { opacity: .55; }
/* Einstellung zu einem Schalter in derselben Card (Website-Builder → Buttons, seit 2026-12-03): unter der Schalter-Zeile, bündig mit deren Text */
.ew-wsb-switch-sub { padding: 0 16px 14px 88px; }   /* 88px = Schalter + Symbol, Text der Zeile beginnt dort */
@media (max-width: 575.98px) { .ew-wsb-switch-sub { padding-left: 16px; } }
.ew-wsb-css-frame { padding: 4px 0; color: var(--ew-text-soft); font-size: 12.5px; }
/* Website-Builder → Navigation: Vorschau oben (website_builder_nav_preview(), seit 2026-11-17) – Leiste oben und beim Scrollen mit Sub-Navigation in
   den Farben der Webseite (--wsb-<Feld> am Formular, wie website/inc/styles/navigation.php); Schalter als Klassen am Rahmen */
.ew-wsb-nav-pv { display: grid; gap: 8px; }
.ew-wsb-nav-pv-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: center; }
.ew-wsb-nav-pv-label { color: var(--ew-text-soft); font-size: 12px; font-weight: 500; }
.ew-wsb-nav-pv-note { display: none; color: var(--ew-text-muted); font-weight: 400; }
.ew-wsb-nav-pv.is-nobg .ew-wsb-nav-pv-note { display: block; }
.ew-wsb-nav-pv-stage { overflow: hidden; background-color: var(--wsb-color_bg1, #ffffff); border: 1px solid var(--ew-line); border-radius: var(--ew-radius); }
.ew-wsb-nav-pv.is-nobg .ew-wsb-nav-pv-stage-top { background: linear-gradient(120deg, #8c9ca6 0%, #46535c 55%, #2a343a 100%); }   /* Titelbild als Muster */
.ew-wsb-nav-pv-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 8px 16px; }
.ew-wsb-nav-pv-top { background-color: var(--wsb-color_nav_bg); }
.ew-wsb-nav-pv.is-nobg .ew-wsb-nav-pv-top { background-color: transparent; }
.ew-wsb-nav-pv-sticky { min-height: 48px; background-color: var(--wsb-color_nav_bg2); }
.ew-wsb-nav-pv-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ew-wsb-nav-pv-brand img { display: block; max-width: 160px; max-height: 36px; }
.ew-wsb-nav-pv-sticky .ew-wsb-nav-pv-brand img { max-height: 30px; }
.ew-wsb-nav-pv-brand [hidden] { display: none; }
.ew-wsb-nav-pv-missing { color: #7a8c97; font-size: 12px; font-style: italic; white-space: nowrap; }
.ew-wsb-nav-pv-title { display: none; overflow: hidden; color: var(--wsb-color_nav_text); font-size: 16px; font-weight: 700; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.ew-wsb-nav-pv-sticky .ew-wsb-nav-pv-title { color: var(--wsb-color_nav2_text); }
.ew-wsb-nav-pv.is-title .ew-wsb-nav-pv-title { display: block; }
.ew-wsb-nav-pv-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 18px; font-size: 13px; }
.ew-wsb-nav-pv-link { color: var(--wsb-color_nav_link); white-space: nowrap; cursor: default; }
.ew-wsb-nav-pv-link:hover, .ew-wsb-nav-pv-link.is-active { color: var(--wsb-color_nav_link_hover); }
.ew-wsb-nav-pv-sticky .ew-wsb-nav-pv-link, .ew-wsb-nav-pv-sub .ew-wsb-nav-pv-link { color: var(--wsb-color_nav2_link); }
.ew-wsb-nav-pv-sticky .ew-wsb-nav-pv-link:hover, .ew-wsb-nav-pv-sticky .ew-wsb-nav-pv-link.is-active,
.ew-wsb-nav-pv-sub .ew-wsb-nav-pv-link:hover, .ew-wsb-nav-pv-sub .ew-wsb-nav-pv-link.is-active { color: var(--wsb-color_nav2_link_hover); }
.ew-wsb-nav-pv-sub { display: none; justify-content: center; flex-wrap: wrap; gap: 2px 18px; padding: 5px 16px; background-color: var(--wsb-color_nav_bg2); box-shadow: inset 0 1px 0 rgba(127, 127, 127, .18); font-size: 12px; }
.ew-wsb-nav-pv.is-subnav .ew-wsb-nav-pv-sub { display: flex; }
.ew-wsb-nav-pv.is-bold .ew-wsb-nav-pv-link { font-weight: 700; }
.ew-wsb-nav-pv.is-upper .ew-wsb-nav-pv-link { text-transform: uppercase; }
/* „Unterstrich mit Animation“ (seit 2026-12-03): Muster des CSS aus web_style_switches.php (nav_underline) – Strich in der Hauptfarbe, wächst von der Mitte */
.ew-wsb-nav-pv.is-underline .ew-wsb-nav-pv-link { position: relative; }
.ew-wsb-nav-pv.is-underline .ew-wsb-nav-pv-link::before { content: ""; position: absolute; bottom: -6px; left: 50%; width: 100%; height: 2px; border-radius: 2px;
    background: var(--wsb-color_main); transform: scale3d(0, 1, 1) translateX(-50%); transform-origin: center center; transition: transform .3s cubic-bezier(.22, .61, .36, 1); }
.ew-wsb-nav-pv.is-underline .ew-wsb-nav-pv-link:hover::before, .ew-wsb-nav-pv.is-underline .ew-wsb-nav-pv-link.is-active::before { transform: scale3d(1, 1, 1) translateX(-50%); }
.ew-wsb-nav-pv.is-underline .ew-wsb-nav-pv-sub { padding-bottom: 9px; }   /* Platz für den Strich unter der Sub-Navigation */
/* Website-Builder → Info-Zeile: Vorschau oben (seit 2026-11-17) – HTML im iframe mit dem CSS der Webseite, Höhe passt das Skript an */
.ew-wsb-info-pv-frame { display: block; width: 100%; height: 40px; border: 1px solid var(--ew-line); border-radius: var(--ew-radius); background-color: #ffffff; }
.ew-wsb-info-pv-frame[hidden], .ew-wsb-info-pv-empty[hidden] { display: none; }
.ew-wsb-info-pv-empty { padding: 10px 14px; border: 1px dashed var(--ew-line-strong); border-radius: var(--ew-radius); color: var(--ew-text-muted); font-size: 12px; }
/* Website-Builder → Überschrift, Text (seit 2026-11-17): Vorschau-Rahmen mit dem CSS der Webseite (website_builder_site_frame(), Höhe folgt
   dem Inhalt) und Listen mit Vorschau für Schrift – Schriftart in sich selbst, Schriftdicke, Unterstrich, Größe, Linienabstand, Kerning als Muster */
.ew-wsb-site-frame { display: block; width: 100%; height: 120px; border: 1px solid var(--ew-line); border-radius: var(--ew-radius); background-color: #ffffff; }
.ew-wsb-pv-cards { display: flex; flex-direction: column; gap: 14px; }   /* website_builder_site_frames(): Karten untereinander, Titel über der Karte */
.ew-wsb-pv-card-title { margin-bottom: 6px; color: var(--ew-text-soft); font-size: 12px; font-weight: 600; }
.ew-wsb-font-name { font-size: 17px; line-height: 1.25; white-space: nowrap; }
.ew-wsb-weight-sample { flex: none; min-width: 110px; font-size: 17px; line-height: 1.25; white-space: nowrap; }
.ew-wsb-text-sample { flex: none; min-width: 150px; line-height: 1.3; white-space: nowrap; }
.ew-wsb-lh-sample { flex: none; display: block; min-width: 110px; padding-left: 8px; border-left: 2px solid var(--ew-line-strong); white-space: nowrap; }
.ew-wsb-ul-sample { flex: none; position: relative; display: inline-block; min-width: 64px; padding-bottom: 12px; }
.ew-wsb-ul-word { font-size: 16px; font-weight: 700; line-height: 1.2; }
.ew-wsb-ul-bar { position: absolute; left: 0; right: 0; bottom: 2px; border-radius: 3px; }
.ew-select-preview-btn .ew-wsb-lh-sample { max-height: 1.2em; overflow: hidden; line-height: 1.2 !important; }   /* im Knopf nur die erste Zeile */
.ew-tab.ew-wsb-has-css::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background-color: var(--ew-accent); }
/* Website-Builder → Überschrift, Text: Textformate (seit 2026-12-03, website_builder_text_formats_html()) – ab 1200 px unter der Vorschau, darunter
   am Ende der Einstellungen (die Vorschau steht dort oben und läuft mit). Muster der Markierung mit dem CSS unter „Markierung“ (--eway-color-main/-main2 an der Karte) */
.ew-wsb-fmt-in-pv { margin-top: 14px; }
.ew-wsb-fmt-in-main { margin-top: 22px; }
@media (max-width: 1199.98px) { .ew-wsb-fmt-in-pv { display: none; } }
@media (min-width: 1200px) { .ew-wsb-fmt-in-main { display: none; } }
.ew-wsb-fmt-list { display: grid; grid-template-columns: max-content max-content minmax(0, 1fr); align-items: center; column-gap: 14px; padding: 4px 16px 0; }
.ew-wsb-fmt-row { display: contents; }
.ew-wsb-fmt-row > * { padding: 7px 0; border-top: 1px solid var(--ew-line); }
.ew-wsb-fmt-row:first-child > * { border-top: 0; }
.ew-wsb-fmt-codes { display: flex; flex-wrap: wrap; gap: 4px; }
.ew-wsb-fmt-code { padding: 1px 6px; border-radius: 4px; background-color: var(--ew-bg); color: var(--ew-text); white-space: nowrap; }
.ew-wsb-fmt-sample { min-width: 40px; color: var(--ew-text); font-size: 15px; line-height: 1.2; white-space: nowrap; }
.ew-wsb-fmt-desc { color: var(--ew-text-soft); font-size: 12px; }
.ew-wsb-fmt-light { font-weight: 300; }
.ew-wsb-fmt-bold { font-weight: 800; }
.ew-wsb-fmt-sample i.ew-wsb-fmt-star { color: inherit; font-size: 13px; }   /* i.bi färbt Metronic sonst grau */
.ew-wsb-fmt-sample i.ew-wsb-fmt-gold { color: rgb(201, 135, 32); }   /* wie .text-gold der Webseite (website/inc/styles/eway.php) */
.ew-wsb-fmt-shy { display: inline-block; font-size: 11px; line-height: 1.25; }
.ew-wsb-fmt-note { margin: 0; padding: 8px 16px 12px; border-top: 1px solid var(--ew-line); }
/* Website-Builder → Markierung (seit 2026-12-03, mark.php): Beispiele zum Kopieren – Titel, Muster (Farben der Webseite als --eway-color-main/-main2
   an der Karte), Knopf, darunter der Code */
.ew-wsb-mark-example { padding: 12px 16px; border-top: 1px solid var(--ew-line); }
.ew-wsb-mark-example:first-child { border-top: 0; }
.ew-wsb-mark-example-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.ew-wsb-mark-example-title { flex: 1 1 200px; min-width: 0; font-weight: 600; color: var(--ew-text); }
.ew-wsb-mark-example-sample { flex: none; padding: 2px 8px; border-radius: 4px; background-color: #ffffff; color: #3f4254; font-size: 15px; line-height: 1.6; }
.ew-wsb-mark-example-code { margin: 8px 0 0; padding: 8px 10px; border-radius: 6px; background-color: var(--ew-bg); color: var(--ew-text); white-space: pre-wrap; overflow-wrap: anywhere; }
.ew-wsb-mark-example-note { margin: 0; padding: 10px 16px 12px; border-top: 1px solid var(--ew-line); }
/* Website-Builder → Cards (seit 2026-11-17): Muster-Card in der Rahmen-Liste – Fläche und Rahmen in der Farbe der Card (--wsb-cardN_bg am
   Formular), darin ein Bild-Platzhalter, der mit dem Rahmen nach innen rückt */
.ew-wsb-card-sample { display: inline-flex; flex: none; width: 64px; height: 40px; border-style: solid; border-radius: 4px; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.ew-wsb-card-sample > span { flex: 1 1 auto; background: repeating-linear-gradient(45deg, #9aa5ad 0 6px, #b6c0c7 6px 12px); }
/* Website-Builder → Buttons (seit 2026-11-17): Muster-Button in der Radius-Liste – Farben des Primär-Buttons, Schriftdicke und Großbuchstaben
   als Variablen am Formular (ziehen beim Ändern mit) */
.ew-wsb-btn-sample { display: inline-flex; flex: none; align-items: center; justify-content: center; min-width: 84px; padding: 6px 14px; font-size: 13px; line-height: 1.2;
    font-weight: var(--wsb-btn-weight, 400); text-transform: var(--wsb-btn-transform, none);
    background: var(--wsb-color_button_primary-bg, var(--wsb-color_button_primary, var(--ew-accent))); color: var(--wsb-color_button_primary_text, #ffffff); }   /* -bg: Farbe oder Verlauf (seit 2026-12-03) */
@media (max-width: 767.98px) {
    .ew-wsb-nav-pv-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .ew-wsb-nav-pv-label { display: flex; gap: 6px; }
    .ew-wsb-nav-pv-bar { flex-wrap: wrap; gap: 8px; }
    .ew-wsb-nav-pv-links { justify-content: flex-start; gap: 4px 12px; }
}

/* Kataloge → Einstellungen (app_cms_pages/catalogs/edit.php, seit 2026-11-17): Kategorien, Felder, Bausteine und Schablone (Schema statt Website-Nachbau) */
.ew-catset-intro { padding: 12px 16px 4px; }
.ew-catset-cats { display: flex; flex-direction: column; gap: 6px; }
.ew-catset-cat { display: flex; align-items: center; gap: 8px; }
.ew-catset-cat .ew-input { flex: 1 1 auto; min-width: 0; }
.ew-catset-cat-used { flex-shrink: 0; }
.ew-catset-field { padding: 12px 16px; border-top: 1px solid var(--ew-line); }
.ew-catset-intro + .ew-catset-field { border-top: 0; }
.ew-catset-field-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ew-catset-field-name { font-weight: 600; color: var(--ew-text); }
.ew-catset-field-body { margin-top: 10px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
.ew-catset-field-body > .ew-field { margin-bottom: 0; }
.ew-catset-field-body > .ew-field:only-child { grid-column: 1 / -1; }
.ew-catset-mods { display: flex; flex-direction: column; }
.ew-catset-mod { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--ew-line); }
.ew-catset-intro + .ew-catset-mods > .ew-catset-mod:first-child { border-top: 0; }
.ew-catset-mod-icon { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-top: 2px;
    border-radius: var(--ew-radius); background-color: var(--ew-accent-tint); color: var(--ew-accent-text); font-size: 18px; }
.ew-catset-mod-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ew-catset-mod-type { font-weight: 600; color: var(--ew-text); }
.ew-catset-mod-actions { flex-shrink: 0; display: flex; gap: 2px; margin-top: 2px; }
.ew-catset-mod:first-child .ew-catset-mod-move[data-dir="up"],
.ew-catset-mod:last-child .ew-catset-mod-move[data-dir="down"] { visibility: hidden; }
.ew-catset-mods-empty { padding: 4px 16px 12px; }
@media (max-width: 1199.98px) {   /* Schablone ist höher als die Vorschauen im Website-Builder: über den Einstellungen, ohne mitzulaufen */
    .ew-catset .ew-pv-layout-side > .ew-pv { position: static; margin-top: 0; padding: 0; }
}
@media (max-width: 575.98px) {
    .ew-catset-field-body { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .ew-catset .ew-field-row { grid-template-columns: minmax(0, 1fr) !important; gap: 10px; }
}

/* Schablone: Kästchen mit gestricheltem Rand, beschriftet mit der Bezeichnung des Felds; ausgeschaltete Felder blass mit „aus“ */
.ew-catpv { display: flex; flex-direction: column; gap: 14px; padding: 16px; border: 1px solid var(--ew-line); border-radius: var(--ew-radius-card);
    background-color: var(--ew-surface); font-size: 12px; color: var(--ew-text-soft); }
.ew-catpv-box { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 6px 8px; border: 1px dashed var(--ew-line-strong);
    border-radius: 6px; overflow-wrap: anywhere; }
.ew-catpv-box .ew-icon { font-size: 15px; flex-shrink: 0; }
.ew-catpv-head { display: grid; grid-template-columns: minmax(0, 35%) minmax(0, 1fr); gap: 12px; align-items: start; }   /* Bild wie auf der Webseite gut ein Drittel */
.ew-catpv-head-nopic { grid-template-columns: minmax(0, 1fr); }
.ew-catpv-pics { display: flex; flex-direction: column; gap: 4px; }
.ew-catpv-img { flex-direction: column; justify-content: center; aspect-ratio: 1 / 1; max-height: 170px; text-align: center; }
.ew-catpv-img .ew-icon { font-size: 22px; }
.ew-catpv-thumbs { display: flex; gap: 4px; }
.ew-catpv-thumb { flex: 1 1 0; aspect-ratio: 1 / 1; padding: 0; }
.ew-catpv-fields { display: flex; flex-direction: column; gap: 5px; }
.ew-catpv-meta { font-weight: 600; color: var(--ew-text); font-size: 11px; }
.ew-catpv-count { margin-left: auto; color: var(--ew-text-muted); font-size: 11px; white-space: nowrap; }
.ew-catpv-title { font-size: 15px; font-weight: 600; color: var(--ew-text); padding: 8px; }
.ew-catpv-sub { font-size: 13px; }
.ew-catpv-text { flex-direction: column; align-items: stretch; gap: 4px; }
.ew-catpv-info { align-self: flex-start; padding: 6px 14px; border-style: solid; border-width: 2px; font-weight: 600; color: var(--ew-text); }
.ew-catpv-off { opacity: .55; border-color: var(--ew-line); }
.ew-catpv-off > span:first-child { text-decoration: line-through; }
.ew-catpv-off-tag { margin-left: auto; padding: 0 6px; border-radius: var(--ew-radius-badge); background-color: var(--ew-neutral-tint); font-size: 11px; }
.ew-catpv-line { display: block; height: 6px; border-radius: 3px; background-color: var(--ew-line-strong); }
.ew-catpv-lines { display: flex; flex-direction: column; gap: 5px; flex: 1 1 auto; min-width: 0; }
.ew-catpv-mod { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--ew-line); }
.ew-catpv-mod-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ew-catpv-mod-title { font-size: 13px; font-weight: 600; color: var(--ew-text); padding-bottom: 2px; border-bottom: 2px solid var(--ew-accent); overflow-wrap: anywhere; }
.ew-catpv-mod-title.ew-catpv-empty { font-weight: 400; font-style: italic; color: var(--ew-text-muted); border-bottom-color: var(--ew-line-strong); }
.ew-catpv-mod-type { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; padding: 2px 8px; border-radius: var(--ew-radius-badge);
    background-color: var(--ew-accent-tint); color: var(--ew-accent-text); font-size: 11px; }
.ew-catpv-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 48px)); gap: 4px; }
.ew-catpv-sq { display: block; aspect-ratio: 1 / 1; border: 1px dashed var(--ew-line-strong); border-radius: 4px; }
.ew-catpv-video { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; width: 100%; max-width: 220px; border: 1px dashed var(--ew-line-strong); border-radius: 6px; font-size: 28px; }
.ew-catpv-dl { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ew-catpv-btn { padding: 2px 10px; border: 1px dashed var(--ew-line-strong); border-radius: 6px; font-size: 11px; }
.ew-catpv-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 90px)); gap: 6px; }
.ew-catpv-card { display: flex; flex-direction: column; gap: 4px; padding: 4px; border: 1px dashed var(--ew-line-strong); border-radius: 6px; }
.ew-catpv-card .ew-catpv-sq { border: 0; background-color: var(--ew-line); }
.ew-catpv-date { display: flex; align-items: center; gap: 8px; }
.ew-catpv-day { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex-shrink: 0; border: 1px dashed var(--ew-line-strong); border-radius: 6px; font-size: 16px; }
.ew-catpv-note { color: var(--ew-text-muted); font-size: 11px; }
.ew-catpv-warn { color: var(--ew-warning); }
.ew-catpv-none { padding: 8px; text-align: center; color: var(--ew-text-muted); font-style: italic; border-top: 1px solid var(--ew-line); }

/* Kataloge → Einträge (app_cms_pages/catalogs/catalogs.php, seit 2026-11-17; wie Feeds → Eigene Feeds) */
.ew-catl-header-actions { display: flex; align-items: center; gap: 8px; }
.ew-catl-thumb-link { flex: none; display: inline-flex; border-radius: var(--ew-radius); }
.ew-catl-thumb { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--ew-radius);
    object-fit: cover; background: var(--ew-neutral-tint); color: var(--ew-text-muted); font-size: 18px; }
.ew-catl-thumb-link:hover .ew-catl-thumb { box-shadow: 0 0 0 2px var(--ew-accent); }
/* Unsichtbare Einträge deutlich verblasst (Wunsch Nutzer 2026-11-17): Bild grau, Titel und Direktlink blass – Badge „unsichtbar“, Schalter und
   Aktionen bleiben kräftig, damit man den Eintrag sofort wieder einschalten kann */
.ew-table tr.ew-catl-inactive .ew-col-main .ew-catl-title, .ew-table tr.ew-catl-inactive .ew-catl-slug { opacity: .35; }
/* Badge „unsichtbar“ als Symbol (durchgestrichenes Auge) direkt vor dem Titel, bleibt kräftig */
.ew-catl-name { display: flex; align-items: center; min-width: 0; }   /* Badge mittig zur Titelzeile (vorher an der Grundlinie, gut 2 px zu hoch) */
.ew-catl-name > .ew-catl-state { display: inline-flex; flex-shrink: 0; margin-right: 8px; }
.ew-catl-name > .ew-catl-state:empty { display: none; }
.ew-catl-name > .ew-catl-title { min-width: 0; overflow-wrap: anywhere; }
.ew-catl-hidden { display: inline-flex; align-items: center; justify-content: center; padding: 2px 6px; }
.ew-catl-hidden .ew-icon { display: block; margin: 0; font-size: 14px; line-height: 1; }
.ew-table tr.ew-catl-inactive .ew-catl-thumb { opacity: .3; filter: grayscale(1); }
.ew-table tr.ew-catl-inactive > td { background-color: color-mix(in srgb, var(--ew-bg) 45%, transparent); }
.ew-catl-state:empty { display: none; }
.ew-catl-slug { font-family: var(--bs-font-monospace, monospace); font-size: 12px; color: var(--ew-text-soft); overflow-wrap: anywhere; }
.ew-catl-slug:hover { color: var(--ew-accent-text); }

/* Kataloge → Einträge als Kacheln (seit 2026-11-17, Wunsch Nutzer): Umschalter im Kartenkopf, Gruppen je Kategorie wie in der Tabelle */
.ew-catl-view { display: inline-flex; }
.ew-catl-view .ew-seg label { white-space: nowrap; }
.ew-catl-tiles-wrap { padding: 4px 16px 16px; }
.ew-catl-tgroup { margin: 16px -16px 12px; padding: 10px 16px; border-top: 2px solid var(--ew-accent-line); background-color: var(--ew-accent-tint); color: var(--ew-text); font-size: 14px; font-weight: 600; }
.ew-catl-tgroup:first-child { margin-top: -4px; border-top: 0; }
.ew-catl-tgroup.ew-catl-group-none { background-color: var(--ew-hover); }
.ew-catl-tgroup.ew-catl-group-none .ew-table-group-title > .ew-icon { color: var(--ew-text-muted); }
.ew-catl-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.ew-catl-tiles-wrap > .ew-catl-tiles:first-child { margin-top: 12px; }
.ew-catl-tile { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--ew-line-strong); border-radius: var(--ew-radius-card);
    background-color: var(--ew-surface); overflow: hidden; transition: border-color var(--ew-transition), box-shadow var(--ew-transition); }
.ew-catl-tile:hover { border-color: var(--ew-accent); box-shadow: 0 0 0 3px var(--ew-accent-tint); }
/* Bildfläche immer 4:3 – das Bild liegt absolut darin, damit Hoch-/Querformate die Fläche nicht strecken (Hinweis Nutzer 2026-11-17: Beschriftung
   saß bei unterschiedlich hohen Bildern unterschiedlich tief); flex: none, damit die Spalte der Kachel die Fläche nicht staucht */
.ew-catl-tile-img { position: relative; display: block; flex: none; aspect-ratio: 4 / 3; min-height: 0; overflow: hidden;
    background-color: var(--ew-neutral-tint); border-bottom: 1px solid var(--ew-line); }
.ew-catl-tile-img img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }   /* ganz zeigen, nicht beschneiden (Wunsch Nutzer 2026-11-17) – Rest der Fläche getönt */
.ew-catl-tile-noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--ew-text-muted); font-size: 28px; }
.ew-catl-tile-body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 6px; }
.ew-catl-tile-body .ew-catl-name { align-items: flex-start; font-weight: 600; color: var(--ew-text); }
.ew-catl-tile-body .ew-catl-name > .ew-catl-state { margin-top: 1px; }
.ew-catl-tile-body .ew-catl-title { color: var(--ew-text); text-decoration: none; }
.ew-catl-tile-body .ew-catl-title:hover { color: var(--ew-accent-text); }
.ew-catl-tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 8px 12px; }
.ew-catl-tile-foot .ew-switch { font-size: 12px; color: var(--ew-text-soft); }
.ew-catl-tile.ew-catl-inactive { background-color: color-mix(in srgb, var(--ew-bg) 45%, var(--ew-surface)); }
.ew-catl-tile.ew-catl-inactive .ew-catl-title, .ew-catl-tile.ew-catl-inactive .ew-catl-slug { opacity: .35; }
.ew-catl-tile.ew-catl-inactive .ew-catl-tile-img img, .ew-catl-tile.ew-catl-inactive .ew-catl-tile-noimg { opacity: .3; filter: grayscale(1); }
.ew-catl-tiles-none { padding: 12px 0 0; }
@media (max-width: 575.98px) {
    .ew-catl-tiles-wrap { padding: 4px 12px 12px; }
    .ew-catl-tgroup { margin-left: -12px; margin-right: -12px; padding-left: 12px; padding-right: 12px; }
    .ew-catl-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .ew-catl-tile-foot { padding-left: 10px; padding-right: 4px; }
    .ew-catl-tile-foot .ew-switch > span { display: none; }   /* nur der Schalter – „Sichtbar“ steht im aria-label */
}

/* Kataloge → Eintrag bearbeiten (app_cms_pages/catalogs/catalog.php, seit 2026-11-17; Aufbau wie der Newsletter-Editor):
   Arbeitsfläche über die volle Breite (iframe _edit.php, Höhe meldet die Arbeitsfläche), Leiste darüber, Fenster und Vorschau */
/* Leiste über der Arbeitsfläche (seit 2026-11-17 statt Leiste rechts, Wunsch Nutzer): Kategorie · Alternativlink · Direktlink in einer Zeile */
.ew-catx-bar { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 12px 24px; align-items: start; margin-bottom: 16px; }
.ew-catx-bar.ew-catx-bar-nocat { grid-template-columns: minmax(0, 1fr); }
.ew-catx-bar .ew-field { margin-bottom: 0; }
/* Direktlink als Link-Knopf „/c/…“ mit Stift daneben, darunter klein die volle Adresse (Wunsch Nutzer 2026-11-17) */
.ew-catx-direct-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ew-catx-direct-btn { min-width: 0; max-width: 100%; }
.ew-catx-direct-btn > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ew-catx-direct-full { margin-top: 4px; overflow-wrap: anywhere; }
@media (max-width: 767.98px) { .ew-catx-bar { grid-template-columns: minmax(0, 1fr); } }
.ew-catx-canvas { border: 1px solid var(--ew-line); border-radius: var(--ew-radius-card); overflow: hidden; background: #ffffff; }
.ew-catx-canvas iframe { display: block; width: 100%; height: 600px; border: 0; background: #ffffff; }
.ew-catx-preview-body { padding: 0; }
.ew-catx-preview-frame { display: block; width: 100%; height: min(75vh, 900px); margin: 0 auto; border: 0; background: #ffffff; transition: width .2s; }
.ew-catx-preview-frame.is-mobile { width: 390px; max-width: 100%; }
.ew-catx-pick-list { max-height: 55vh; overflow-y: auto; }
.ew-catx-pick-group { padding: 8px 16px 6px; border-top: 1px solid var(--ew-line); background-color: var(--ew-hover); color: var(--ew-text-soft); font-size: 12px; font-weight: 600; }
.ew-catx-pick-list > :first-child { border-top: 0; }

/* Neuer Website-Editor (app_cms_pages/website/_web_editor.php, seit 2026-11-22 Stufe 6b von plans/website_editor.md, Mockup
   plans/mockups/website_editor.html): Kopf mit Seite sichtbar/Modus/Gerät (bleibt oben stehen), Bühne mit der Seite im Rahmen (iframe _web_workspace.php,
   Höhe meldet die Arbeitsfläche). Gerät: Computer volle Breite, Tablet 768 px, Smartphone 390 px. Die Rahmen und Leisten der Module/Elemente
   liegen in der Arbeitsfläche selbst (Farben dort: Module Lime #c9ea2f, Elemente Violett #b49cff). */
.ew-root.ew-we { padding-left: 24px; padding-right: 24px; }
.ew-we .ew-page-actions { gap: 8px; }
.ew-we-seg .ew-seg-item { border: 0; background: transparent; font: inherit; }
.ew-we-seg .ew-seg-item .ew-icon { font-size: 16px; }
/* Kopf bleibt beim Rollen unter der Kopfzeile der App stehen (seit 2026-11-23: Vorschau, Gerät usw. ohne Hochrollen; ab 992 px); Hintergrund
   über die ganze Breite (Innenabstand der Seite dort 24 px), beim Stehenbleiben Linie mit Schatten (Klasse ew-we-stuck per Skript) */
@media (min-width: 992px) {   /* nur wo die Kopfzeile der App fest steht (schmaler rollt sie mit, der Kopf wäre zu hoch) */
    /* z-index unter der Seitenleiste (#kt_app_sidebar, 99) – sonst verdeckt der Kopf deren Knopf zum Einklappen, der in den Inhalt ragt */
    .ew-we > .ew-page-header { position: sticky; top: var(--bs-app-header-height, var(--ew-header-height, 60px)); z-index: 98;
        margin: -12px -24px 8px; padding: 12px 24px; background-color: var(--ew-bg); transition: box-shadow .15s; }
    .ew-we.ew-we-stuck > .ew-page-header { box-shadow: 0 1px 0 var(--ew-line), 0 10px 16px -12px rgba(0,0,0,.5); }
}
/* Adresse der Seite unter dem Titel (statt Pfad): klein, grau, eine Zeile, öffnet in neuem Tab */
.ew-we .ew-page-sub { min-width: 0; }
.ew-we-url { display: block; max-width: 100%; overflow: hidden; color: var(--ew-text-muted); font-size: 12px; text-decoration: none; text-overflow: ellipsis;
    white-space: nowrap; }
.ew-we-url:hover, .ew-we-url:focus-visible { color: var(--ew-text-soft); text-decoration: underline; }
/* Seite sichtbar: Schalter mit Auge statt Text (Hinweis im title) */
.ew-we-vis { display: inline-flex; align-items: center; margin-right: 4px; }
.ew-we-vis .ew-switch { gap: 7px; }
.ew-we-vis .ew-switch i { font-size: 19px; color: var(--ew-text-soft); }
.ew-we-vis .ew-switch input:checked ~ i { color: var(--ew-text); }
.ew-we-vis .ew-switch input:disabled, .ew-we-vis .ew-switch input:disabled ~ i { opacity: .4; cursor: not-allowed; }
/* Sprachseiten im Editor (Stufe 7c, Mockup plans/mockups/website_languages.html): Kürzel aller Sprachen mit Stand unter dem Titel, Adresse
   daneben; leer = gestrichelt (auch als Badge „leer“), Hinweis bei neu gefüllten (noch ausgeblendeten) Seiten, leere Sprachseite */
.ew-badge-empty { background: transparent; border: 1px dashed var(--ew-line-strong); color: var(--ew-text-muted); }
.ew-we-isempty > .ew-page-header .ew-page-title { opacity: .55; }   /* leere Sprachseite: deutscher Titel, blass */
.ew-we-subline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-width: 0; }
.ew-we-subline .ew-we-url { display: inline-block; min-width: 0; }
.ew-we-url-text:hover { color: var(--ew-text-muted); text-decoration: none; }
.ew-we-lchips { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.ew-we-lchip { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border: 1px solid var(--ew-line-strong); border-radius: 10px;
    background: transparent; color: var(--ew-text-soft); font-size: 11px; font-weight: 600; line-height: 1; text-decoration: none; }
.ew-we-lchip:hover, .ew-we-lchip:focus-visible { border-color: var(--ew-accent-line); color: var(--ew-text); }
.ew-we-lchip.active { border-color: var(--ew-accent-line); background: var(--ew-accent-tint); color: var(--ew-accent-text); }
.ew-we-lchip.ew-lchip-empty { border-style: dashed; color: var(--ew-text-muted); font-weight: 500; }
.ew-we-lchip .ew-icon { font-size: 12px; color: inherit; }
.ew-we-fresh { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--ew-warning) 40%, transparent);
    border-radius: var(--ew-radius-card); background: var(--ew-warning-tint); color: var(--ew-text); font-size: 13px; }
.ew-we-fresh[hidden] { display: none; }
.ew-we-fresh > .ew-icon { font-size: 18px; color: var(--ew-warning); }
.ew-we-fresh > span { flex: 1 1 260px; }
.ew-we-emptylang { padding: 56px 24px; border: 1px solid var(--ew-line-strong); border-radius: var(--ew-radius-card); background: var(--ew-surface); text-align: center; }
.ew-we-emptylang[hidden], .ew-we-stage[hidden] { display: none; }
.ew-we-emptylang-icon { display: inline-flex; }
.ew-we-emptylang-icon .ew-ws-flag { width: 40px; }
.ew-we-emptylang-icon .ew-icon { font-size: 38px; color: var(--ew-text-muted); }
.ew-we-emptylang h2 { margin: 14px 0 6px; color: var(--ew-text); font-size: 20px; font-weight: 600; }
.ew-we-emptylang p { max-width: 560px; margin: 0 auto 18px; color: var(--ew-text-soft); font-size: 14px; line-height: 1.5; }
.ew-we-emptylang-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
/* Webseite → Einstellungen → Feste Texte (Stufe 7g, website-settings/strings.php): je Text deutsches Vorbild, Eingabe, Stand */
.ew-st-tabs { margin-bottom: 14px; }
.ew-st-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.ew-st-bar .ew-search { flex: 0 1 320px; }
.ew-st-card { margin-bottom: 16px; }
.ew-st-card[hidden] { display: none; }
.ew-st-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 8px 16px; align-items: start; padding: 12px 18px; border-top: 1px solid var(--ew-line); }
.ew-st-row:first-of-type { border-top: 0; }
.ew-st-row[hidden] { display: none; }
.ew-st-row.ew-st-de { grid-template-columns: minmax(0, 1fr) auto; }
.ew-st-ref { color: var(--ew-text); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.ew-st-ref small { display: block; margin-bottom: 2px; color: var(--ew-text-muted); font-size: 11px; }
.ew-st-input .ew-help { margin-top: 4px; }
.ew-st-setting { padding: 8px 12px; border: 1px dashed var(--ew-line-strong); border-radius: var(--ew-radius); color: var(--ew-text-soft); font-size: 13px; line-height: 1.45; }
.ew-st-state { display: flex; align-items: center; gap: 6px; min-height: 38px; }
.ew-st-state [hidden] { display: none !important; }
@media (max-width: 767.98px) {
    .ew-st-row, .ew-st-row.ew-st-de { grid-template-columns: minmax(0, 1fr); }
    .ew-st-state { min-height: 0; }
}
/* Fenster „Von Deutsch übernehmen“ / „In andere Sprache kopieren“ (Stufe 7d, _api_web_lang_copy.php): Zeilen mit Haken, ohne Haken ausgegraut */
.ew-lc-list { display: grid; gap: 8px; }
.ew-lc-row { display: flex; align-items: center; gap: 12px; margin: 0; padding: 9px 12px; border: 1px solid var(--ew-line-strong); border-radius: var(--ew-radius);
    background: var(--ew-raised, var(--ew-surface)); cursor: pointer; }
.ew-lc-row input[type="checkbox"] { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--ew-accent); cursor: pointer; }
.ew-lc-row:has(> [data-ew-lc-all]) { border-style: dashed; background: transparent; }
.ew-lc-row:has(> input[name="m"]) { margin-left: 28px; }   /* Module unter „Alle Module“ eingerückt (Wunsch Nutzer 2026-11-24) */
.ew-lc-row .ew-ws-flag { width: 22px; }
.ew-lc-main { display: flex; flex-direction: column; min-width: 0; }
.ew-lc-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--ew-text); font-size: 14px; }
.ew-lc-title .ew-badge { font-size: 11px; }
.ew-lc-sub { margin-top: 2px; color: var(--ew-text-muted); font-size: 12px; overflow-wrap: anywhere; }
.ew-lc-sp { flex: none; width: 16px; }
.ew-lc-row.ew-lc-info { background: transparent; cursor: default; }
.ew-lc-row.ew-lc-off { background: transparent; }
.ew-lc-row.ew-lc-off .ew-lc-main, .ew-lc-row.ew-lc-off .ew-ws-flag { opacity: .38; }
.ew-lc-sum { margin-top: 12px; color: var(--ew-text-soft); font-size: 13px; }
.ew-lc-how { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 14px; }   /* „Texte: Kopieren / KI Übersetzen“ (seit 2026-11-24) */
.ew-lc-how-label { color: var(--ew-text-soft); font-size: 13px; font-weight: 600; }
.ew-lc-page { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; padding: 10px 12px; border-radius: var(--ew-radius); background: var(--ew-hover); }   /* Titel und Adresse („Von Deutsch übernehmen“), seit 2026-11-24 */
.ew-lc-page > .ew-icon { flex: none; margin-top: 2px; font-size: 18px; color: var(--ew-text-soft); }
.ew-lc-page-label { color: var(--ew-text-muted); font-size: 12px; }
.ew-lc-page-value { margin-top: 2px; color: var(--ew-text); font-size: 13px; overflow-wrap: anywhere; }
.ew-lc-sum:empty { display: none; }
.ew-lc-sum.ew-lc-bad { padding: 10px 12px; border-radius: var(--ew-radius); background: var(--ew-danger-tint); color: var(--ew-danger); }
.ew-lc-ai:not(:empty) { margin-top: 14px; font-size: 13px; }   /* Verbrauch der KI (seit 2026-11-29) */
.ew-lc-ai:not(:empty) + .ew-lc-sum { margin-top: 4px; }
/* „Von Deutsch übernehmen“ mit Wahl Kopieren/Übersetzen je Modul (seit 2026-11-28): Haken und Text im label, Wahl rechts daneben */
.ew-lc-row-how { cursor: default; }
.ew-lc-pick { display: flex; flex: 1 1 auto; align-items: center; gap: 12px; min-width: 0; margin: 0; cursor: pointer; }
.ew-lc-seg { flex: none; margin-left: auto; }
.ew-lc-seg .ew-seg label { padding-top: 4px; padding-bottom: 4px; font-size: 12px; }
.ew-lc-row-how.ew-lc-mod { margin-left: 28px; }
.ew-lc-row-how.ew-lc-allrow { border-style: dashed; background: transparent; }
.ew-lc-row-how.ew-lc-off .ew-lc-seg { opacity: .38; pointer-events: none; }
@media (max-width: 575.98px) {
    .ew-lc-row-how { flex-wrap: wrap; }
    .ew-lc-row-how .ew-lc-seg { margin-left: 28px; }
}
.ew-lc-langline { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; }
.ew-lc-langline .ew-ws-flag { width: 18px; }
/* Seitenleiste: Auswahl der Sprache über der Seitenstruktur, leere Seiten der Sprache blass und kursiv */
.ew-at-langdd { display: flex; margin: 0 0 10px; }
.ew-at-lang { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; padding: 7px 10px; border: 1px solid var(--ew-line-strong); border-radius: var(--ew-radius);
    background: var(--ew-input-bg, transparent); color: var(--ew-text); font-size: 13px; text-align: left; cursor: pointer; }
.ew-at-lang:hover, .ew-at-lang:focus-visible { border-color: var(--ew-accent-line); outline: 0; }
.ew-at-lang .ew-ws-flag { width: 20px; }
.ew-at-lang-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ew-at-lang-name small { color: var(--ew-text-muted); font-size: 12px; }
.ew-at-lang > .ew-icon:last-child { margin-left: auto; font-size: 12px; color: var(--ew-text-muted); }
.dropdown-menu.ew-dropdown.ew-at-lang-menu { min-width: 250px; }
.ew-at-lang-end { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.ew-at-lang-end .ew-badge { font-size: 11px; }
.ew-at-empty .ew-at-title { font-style: italic; opacity: .5; }
.ew-at-empty .ew-at-main > .ew-icon { opacity: .5; }
.ew-at-node .ew-badge-empty { padding: 1px 5px; font-size: 10px; }
[data-kt-app-sidebar-minimize="on"] .ew-app-aside:not(:hover) .ew-at-lang-name,
[data-kt-app-sidebar-minimize="on"] .ew-app-aside:not(:hover) .ew-at-lang > .ew-icon:last-child { display: none; }
.ew-we-stage { background: var(--ew-surface); border: 1px solid var(--ew-line-strong); border-radius: var(--ew-radius-card); padding: 18px; overflow-x: auto; }
.ew-we-paper { margin: 0 auto; width: 100%; max-width: 100%; background: #ffffff; border-radius: 8px; overflow: hidden; transition: max-width .25s; }
.ew-we-paper[data-device="tablet"] { max-width: 768px; }
.ew-we-paper[data-device="phone"] { max-width: 390px; }
.ew-we-frame { display: block; width: 100%; height: 600px; border: 0; background: #ffffff; }
.ew-we-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; font-size: 12px; color: var(--ew-text-soft); }
.ew-we-legend[hidden] { display: none; }
.ew-we-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ew-we-sw { display: inline-block; width: 16px; height: 10px; border-radius: 3px; }
.ew-we-sw-line { background: transparent; box-shadow: 0 0 0 1px #c9ea2f; }
@media (max-width: 767.98px) {
    .ew-root.ew-we { padding-left: 12px; padding-right: 12px; }
    .ew-we-stage { padding: 8px; }
}
/* Neuer Website-Editor: Fenster für Felder (#ew_we_modal, _api_web_field.php, seit Stufe 6c) */
.ew-we-daterow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 160px); gap: 0 12px; }
.ew-we-daterow > .ew-field, .ew-we-daterow > .ew-we-time { min-width: 0; }
.ew-we-icon-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 220px); gap: 8px; margin-bottom: 12px; }
.ew-we-icon-tools .ew-search { width: 100%; }
.ew-we-icons { max-height: 55vh; overflow-y: auto; }
.ew-we-icon-group[hidden], .ew-we-icon[hidden] { display: none; }
.ew-we-icon-head { position: sticky; top: 0; z-index: 1; padding: 6px 2px; background: var(--ew-surface); color: var(--ew-text-soft); font-size: 12px; font-weight: 600; }
.ew-we-icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px; margin-bottom: 10px; }
.ew-we-icon { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0; border: 1px solid var(--ew-line); border-radius: 8px;
    background: var(--ew-raised); color: var(--ew-text); font-size: 20px; cursor: pointer; content-visibility: auto; contain-intrinsic-size: 44px; }
.ew-we-icon:hover, .ew-we-icon:focus-visible { border-color: var(--ew-accent); outline: none; }
.ew-we-icon.active { border-color: var(--ew-accent); background: var(--ew-accent-tint); }
@media (max-width: 575.98px) { .ew-we-daterow, .ew-we-icon-tools { grid-template-columns: minmax(0, 1fr); } }
/* Neuer Website-Editor: Moduleinstellungen (_api_web_settings.php, seit Stufe 6c) – links Einstellungen, rechts das echte Modul verkleinert
   (iframe in echter Breite: Computer 1600 px, Smartphone 390 px, per Skript skaliert); unter 768 px die Vorschau oben */
.ew-we-set-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 24px; align-items: start; }
.ew-we-set-form { grid-column: 1; grid-row: 1; min-width: 0; }
.ew-we-set-prev { grid-column: 2; grid-row: 1; position: sticky; top: 0; min-width: 0; }
.ew-we-set-sec { margin: 18px 0 10px; color: var(--ew-text-muted); font-size: 12px; font-weight: 600; }
.ew-we-set-form > .ew-we-set-sec:first-child { margin-top: 0; }
.ew-we-set-form .ew-seg { flex-wrap: wrap; }
/* Karten im Fenster (seit 2026-11-24, wie bei den Präsentationen); Zeile = Schalter mit Zusatz dahinter (z. B. „Bild anzeigen“ · „komplett zeigen“) */
.ew-we-set-card .ew-card-body { display: flex; flex-direction: column; gap: 14px; }   /* fester Abstand – ausgeblendete Felder zählen nicht */
.ew-we-set-card .ew-card-body .ew-field { margin-bottom: 0; }
.ew-we-set-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
/* Quellen: Suchliste „… hinzufügen“, darunter je Quelle eine Zeile mit × (wie die Mitarbeiter in der Montage-App) */
.ew-we-src .ew-combo { margin-bottom: 10px; }
.ew-we-src-list .ew-list-row > .ew-icon:first-child { color: var(--ew-accent); }   /* aktive Quellen in Lime (Wunsch Nutzer 2026-11-24) */
.ew-we-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ew-we-inline .ew-label { margin: 0; }
.ew-we-checks { display: grid; gap: 10px; }
.ew-we-count { display: grid; grid-template-columns: minmax(0, 110px) minmax(0, 160px); gap: 8px; }
.ew-we-set-prevhead { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 8px; }
.ew-we-set-prevhead .ew-we-pv-dev { margin-left: auto; }
.ew-we-pv-frame { overflow: hidden; border: 1px solid var(--ew-line-strong); border-radius: 10px; background: #c9d1db; }
.ew-we-pv-chrome { display: flex; align-items: center; gap: 5px; padding: 6px 10px; background: #dfe4ea; color: #5a6277; font-size: 11px; font-weight: 500; }
.ew-we-pv-chrome i { width: 8px; height: 8px; border-radius: 50%; background: #b9c1cc; }
.ew-we-pv-chrome span { margin-left: 8px; }
.ew-we-pv-stage { position: relative; overflow: hidden; min-height: 80px; background: #ffffff; }
.ew-we-pv { position: absolute; top: 0; left: 0; border: 0; background: #ffffff; transform-origin: 0 0; }
.ew-we-pv-cap { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; color: var(--ew-text-muted); font-size: 12px; }
.ew-we-pv-line { flex: none; width: 18px; margin-top: 7px; border-top: 2px dashed #7d6bd6; }
@media (max-width: 767.98px) {
    .ew-we-set-grid { grid-template-columns: minmax(0, 1fr); }
    .ew-we-set-prev { grid-column: 1; grid-row: 1; position: static; }
    .ew-we-set-form { grid-column: 1; grid-row: 2; }
}
.ew-we-set-form .ew-seg label { flex: 0 1 auto; }
/* Neuer Website-Editor: Modul hinzufügen (Kacheln in einem Rahmen, seit Stufe 6c) */
.ew-we-add-head { gap: 12px; }
.ew-we-add-tools { display: grid; grid-template-columns: minmax(0, 260px); gap: 8px; margin-left: auto; }
/* Kategorie-Leiste wie „Art“ bei den Präsentationen (seit 2026-11-24, Stufe 8c); beim Suchen gedimmt – die Suche gilt für alle Kategorien */
.ew-we-add-cats { padding: 12px 16px 0; }
.ew-we-add-cats .ew-seg { flex-wrap: wrap; }
.ew-we-add-cats .ew-seg label { gap: 7px; }
.ew-we-add-cats.ew-we-add-searching .ew-seg label { opacity: .45; }
.ew-we-add-tools .ew-search { width: 100%; }
.ew-we-add-body { padding: 12px 16px; }
.ew-we-add-frame { display: block; width: 100%; height: min(68vh, 760px); border: 0; border-radius: 8px; background: transparent; }
@media (max-width: 767.98px) {
    .ew-we-add-head { flex-wrap: wrap; }
    .ew-we-add-tools { order: 3; grid-template-columns: minmax(0, 1fr); width: 100%; margin-left: 0; }
}

/* Neuer Website-Editor: Mehrere Bilder hochladen (_api_web_multi.php) – Liste mit Stand je Bild */
.ew-we-mup-list { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; margin: 14px 0 0; padding: 0; overflow-y: auto; list-style: none; }
.ew-we-mup-list:empty { display: none; }
.ew-we-mup-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 8px 12px;
    border: 1px solid var(--ew-line); border-radius: 8px; background-color: var(--ew-surface, transparent); font-size: 13px; }
/* fertig: ausblenden und zusammenschieben, danach entfernt (Skript) */
.ew-we-mup-item { max-height: 90px; transition: opacity .4s ease, max-height .4s ease, padding .4s ease, border-width .4s ease; }
.ew-we-mup-item.is-gone { max-height: 0; padding-top: 0; padding-bottom: 0; border-width: 0; overflow: hidden; opacity: 0; }
.ew-we-mup-name { overflow: hidden; color: var(--ew-text); text-overflow: ellipsis; white-space: nowrap; }
.ew-we-mup-state { color: var(--ew-text-muted); font-size: 12px; white-space: nowrap; }
.ew-we-mup-bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; overflow: hidden; background-color: var(--ew-line); }
.ew-we-mup-bar[hidden] { display: none; }
.ew-we-mup-bar > i { display: block; width: 0; height: 100%; background-color: var(--ew-accent); transition: width .15s ease; }
.ew-we-mup-item.is-up .ew-we-mup-state { color: var(--ew-text); font-weight: 600; }
/* läuft (hochladen bzw. verarbeiten): kleiner drehender Ring in Lime vor dem Stand */
.ew-we-mup-item.is-up .ew-we-mup-state { display: inline-flex; align-items: center; gap: 7px; }
.ew-we-mup-item.is-up .ew-we-mup-state::before { content: ""; flex-shrink: 0; width: 13px; height: 13px; border: 2px solid var(--ew-line);
    border-top-color: var(--ew-accent); border-right-color: var(--ew-accent); border-radius: 50%; animation: ew-dev-spin .75s linear infinite; }
.ew-we-mup-item.is-ok .ew-we-mup-state { color: var(--ew-success, #2f9e44); font-weight: 600; }
.ew-we-mup-item.is-error { border-color: var(--ew-danger, #e5484d); }
.ew-we-mup-item.is-error .ew-we-mup-state { color: var(--ew-danger, #e5484d); white-space: normal; text-align: right; }

/* Barrierefreiheit → Bild-Texte im neuen Design (accessibility/_pictext_new.php, seit 2026-11-23, Stufe 6d) */
.ew-pt-table td { vertical-align: top; }
.ew-pt-col-pic { width: 170px; }
.ew-pt-col-copy { width: 28%; }
.ew-pt-thumb { display: flex; align-items: center; justify-content: center; width: 150px; height: 100px; overflow: hidden; border-radius: 8px;
    background-color: var(--ew-pt-bg, #fff); border: 1px solid var(--ew-line); }   /* Hintergrund der Website (web_pictext_thumb_bg()), seit 2026-11-29 */
.ew-pt-thumb img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.ew-pt-where { margin-top: 6px; color: var(--ew-text-muted); font-size: 12px; line-height: 1.35; }
.ew-pt-alt { min-height: 64px; resize: vertical; }
.ew-pt-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.ew-pt-foot .ew-pt-len { margin-left: auto; color: var(--ew-text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.ew-pt-miss[hidden] { display: none; }
.ew-pt-row.ew-pt-saving { opacity: .6; }
.ew-pt-table tr.ew-pt-page > td { font-weight: 600; }
.ew-pt-table tr.ew-pt-page a { color: var(--ew-text); text-decoration: none; }
.ew-pt-table tr.ew-pt-page a:hover { text-decoration: underline; }
@media (max-width: 767.98px) {
    .ew-pt-table thead { display: none; }
    .ew-pt-table tr.ew-pt-row { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 10px 0; }
    .ew-pt-table tr.ew-pt-row > td { display: block; width: auto; border: 0; }
    .ew-pt-col-pic, .ew-pt-col-copy { width: auto; }
}

/* Barrierefreiheit → Infos im neuen Design (accessibility/start.php, seit 2026-11-29): Themenkarten mit „Was Sie beitragen“ / „Was wir umsetzen“ */
.ew-a11y-grid { --ew-cols: 3; gap: 16px; align-items: stretch; }
.ew-a11y-grid > .ew-card { margin: 0; }
.ew-a11y-grid + .ew-alert { margin-top: 20px; }
.ew-a11y-part + .ew-a11y-part { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--ew-line); }
.ew-a11y-part-title { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; color: var(--ew-text-soft); font-size: 12px; font-weight: 600; }
.ew-a11y-you .ew-a11y-part-title .ew-icon { color: var(--ew-accent-text); }
.ew-a11y-we .ew-a11y-part-title .ew-icon { color: var(--ew-success); }
.ew-a11y-list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--ew-text); }
.ew-a11y-list li { display: flex; align-items: flex-start; gap: 8px; }
.ew-a11y-list li > .ew-icon { flex: none; margin-top: 2px; color: var(--ew-success); }
.ew-a11y-dot { flex: none; width: 6px; height: 6px; margin: 7px 3px 0; border-radius: 50%; background-color: var(--ew-accent-line); }   /* accent-line: im hellen Modus dunkler als Lime */
.ew-a11y-list a { color: var(--ew-text); text-decoration: underline; text-decoration-color: var(--ew-accent-line); text-underline-offset: 3px; }
.ew-a11y-list a:hover { color: var(--ew-accent-text); }
@media (max-width: 1199.98px) { .ew-a11y-grid { --ew-cols: 2; } }

/* Checkliste von Prüfpunkten (ui_checklist(), seit 2026-12-04 – Barrierefreiheit → Check, Datenschutz / Impressum → Check): je Bereich eine Gruppenzeile, Titel mit Satz darunter,
   Art der Prüfung als Badges, Richtlinie (WCAG-Nummer mit Stufe, Name klein darunter); auf dem Smartphone untereinander */
.ew-checklist-table > tbody > tr.ew-checklist-row > td { vertical-align: top; }
.ew-checklist-col-how { width: 170px; }
.ew-checklist-col-rule { width: 240px; }
.ew-checklist-title { color: var(--ew-text); font-weight: 600; }
.ew-checklist-text { margin-top: 2px; color: var(--ew-text-soft); font-size: 12px; }
.ew-checklist-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; color: var(--ew-text); font-size: 12px; text-decoration: underline;
    text-decoration-color: var(--ew-accent-line); text-underline-offset: 3px; }
.ew-checklist-link:hover { color: var(--ew-accent-text); }
.ew-checklist-link .ew-icon { color: var(--ew-accent-text); }
.ew-checklist-how { display: flex; flex-wrap: wrap; gap: 4px; }
.ew-checklist-rule { color: var(--ew-text); font-size: 12px; font-weight: 600; white-space: nowrap; }
.ew-checklist-level { margin-left: 2px; color: var(--ew-text-muted); font-weight: 500; }
.ew-checklist-rule-sub { color: var(--ew-text-muted); font-size: 12px; }
@media (max-width: 767.98px) {
    .ew-checklist-table thead { display: none; }
    .ew-checklist-table tr.ew-checklist-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 10px 0; }
    .ew-checklist-table tr.ew-checklist-row > td { display: block; width: auto; border: 0; padding-top: 0; padding-bottom: 0; }
    .ew-checklist-table tr.ew-checklist-row > td:first-child { grid-column: 1 / -1; }
    .ew-checklist-table tr.ew-checklist-row > td.ew-checklist-col-rule { text-align: right; }
}

/* Fenster „Folien“ des Website-Editors (seit 2026-11-25, Stufe 10c – app_cms_pages/website/_api_web_slides.php): je Folie eine Karte mit Griff,
   Vorschaubild, Titel/Untertitel bzw. „ausgeblendet“, Pfeilen und Menü; ziehen = .is-drag, Ziel = .is-before/.is-after (Linie zwischen den Zeilen) */
.ew-we-slides-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ew-we-slide { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 8px; border: 1px solid var(--ew-line-strong);
    border-radius: var(--ew-radius-card); background: var(--ew-surface); transition: box-shadow var(--ew-transition), opacity var(--ew-transition); }
.ew-we-slide-grip { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 20px; align-self: stretch; color: var(--ew-text-muted);
    cursor: grab; touch-action: none; }
.ew-we-slide-grip:hover { color: var(--ew-text); }
.ew-we-slide-main { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; margin: 0; padding: 0; border: 0; background: none; color: inherit;
    text-align: left; cursor: pointer; }
.ew-we-slide-main:focus-visible { outline: none; box-shadow: var(--ew-focus-ring); border-radius: var(--ew-radius); }
.ew-we-slide-thumb { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 120px; height: 68px; overflow: hidden;
    border-radius: var(--ew-radius); background: var(--ew-neutral-tint); color: var(--ew-text-muted); font-size: 22px; }
.ew-we-slide-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ew-we-slide-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ew-we-slide-title { overflow: hidden; color: var(--ew-text); font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.ew-we-slide-title.is-empty { color: var(--ew-text-muted); font-weight: 500; }
.ew-we-slide-sub { overflow: hidden; color: var(--ew-text-muted); font-size: 12px; font-style: italic; white-space: nowrap; text-overflow: ellipsis; }
.ew-we-slide-off { display: none; }
.ew-we-slide.is-hidden .ew-we-slide-off { display: block; }
.ew-we-slide.is-hidden .ew-we-slide-sub { display: none; }
.ew-we-slide.is-hidden .ew-we-slide-thumb { opacity: .45; }
.ew-we-slide .ew-we-slide-show, .ew-we-slide.is-hidden .ew-we-slide-hide { display: none !important; }
.ew-we-slide.is-hidden .ew-we-slide-show { display: flex !important; }
.ew-we-slide-tools { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.ew-we-slide:first-child .ew-we-slide-up, .ew-we-slide:last-child .ew-we-slide-down { visibility: hidden; }
.ew-we-slide.is-drag { opacity: .45; }
.ew-we-slide { position: relative; }
.ew-we-slide.is-before::before, .ew-we-slide.is-after::after { content: ""; position: absolute; left: 4px; right: 4px; height: 3px; border-radius: 2px;
    background: var(--ew-accent); pointer-events: none; }   /* Ziel mittig im Abstand von 10px zwischen den Zeilen (Wunsch Nutzer 2026-11-25) */
.ew-we-slide.is-before::before { top: -7.5px; }
.ew-we-slide.is-after::after { bottom: -7.5px; }
.ew-we-slides-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ew-we-slides-add.ew-we-slides-add-top { margin: 0 0 10px; }   /* „Bilder am Anfang einfügen“ über der Liste (Stufe 10g) */
@media (max-width: 575.98px) {
    .ew-we-slide-thumb { width: 72px; height: 44px; }
    .ew-we-slide-main { gap: 10px; }
}

/* Karte „Aufbau“ im Fenster „Einstellungen“ des Website-Editors (seit 2026-11-25, Stufe 10d): Darstellungen einer Gruppe als Skizzen
   (web_editor_variant_sketch()), die aktuelle mit Lime-Rahmen; Klick wechselt sofort */
.ew-we-variants { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.ew-we-variant { display: flex; flex-direction: column; gap: 7px; margin: 0; padding: 7px 7px 8px; border: 1px solid var(--ew-line-strong); border-radius: var(--ew-radius);
    background: var(--ew-surface); color: var(--ew-text); font-size: 12px; font-weight: 600; line-height: 1.25; text-align: center; cursor: pointer;
    transition: border-color var(--ew-transition), box-shadow var(--ew-transition); }
.ew-we-variant:hover, .ew-we-variant:focus-visible { border-color: var(--ew-text-muted); outline: none; }
.ew-we-variant.is-current { border-color: var(--ew-accent); box-shadow: 0 0 0 1px var(--ew-accent); cursor: default; }
.ew-we-variant[disabled] { opacity: .45; cursor: not-allowed; }
.ew-we-variant-note { display: flex; align-items: flex-start; gap: 7px; margin-top: 10px; font-size: 12px; color: var(--ew-text-soft); }   /* Entwurf (Stufe 10g) */
.ew-we-variant-note .ew-icon { flex-shrink: 0; margin-top: 1px; color: var(--ew-accent); }
.ew-we-sk { position: relative; display: block; height: 58px; overflow: hidden; border-radius: 6px; background: var(--ew-neutral-tint); }
.ew-we-sk i, .ew-we-sk b, .ew-we-sk s, .ew-we-sk u { position: absolute; display: block; }
.ew-we-sk .ew-we-sk-img { border-radius: 3px; background: #85b7eb; }
.ew-we-sk .ew-we-sk-txt { display: flex; flex-direction: column; gap: 4px; }
.ew-we-sk .ew-we-sk-txt > *, .ew-we-sk .ew-we-sk-tile > * { position: static; }
.ew-we-sk b { height: 6px; width: 80%; border-radius: 2px; background: var(--ew-text-soft); }
.ew-we-sk s { height: 4px; width: 100%; border-radius: 2px; background: var(--ew-text-muted); opacity: .7; }
.ew-we-sk u { height: 7px; width: 42%; margin-top: 2px; border-radius: 2px; background: var(--ew-accent); }
.ew-we-sk-side .ew-we-sk-img { left: 7px; top: 8px; width: 40%; height: 42px; }
.ew-we-sk-side .ew-we-sk-txt { left: 52%; top: 12px; width: 40%; }
.ew-we-sk-card .ew-we-sk-img { left: 0; top: 0; width: 62%; height: 100%; border-radius: 0; }
.ew-we-sk-card .ew-we-sk-txt { left: 46%; top: 11px; width: 44%; padding: 5px; border-radius: 4px; background: var(--ew-surface); }
.ew-we-sk-wide .ew-we-sk-img { inset: 0; border-radius: 0; }
.ew-we-sk-wide .ew-we-sk-shade { left: 0; top: 0; width: 58%; height: 100%; background: linear-gradient(90deg, rgba(0,0,0,.5), transparent); }
.ew-we-sk-wide .ew-we-sk-txt { left: 8px; top: 13px; width: 38%; }
.ew-we-sk-wide .ew-we-sk-txt b { background: #ffffff; }
.ew-we-sk-wide .ew-we-sk-txt s { background: #e6edf1; }
.ew-we-sk-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 7px; }
.ew-we-sk-tiles .ew-we-sk-tile { position: static; display: flex; flex-direction: column; gap: 3px; }
.ew-we-sk-tiles .ew-we-sk-img { height: 20px; }
.ew-we-sk-tiles b { width: 90%; }
/* seit Stufe 10e: Überschrift groß/mittel, Text & Icon mit Icon oben/links */
.ew-we-sk-head .ew-we-sk-txt { left: 50%; top: 50%; width: 70%; align-items: center; transform: translate(-50%, -50%); }
.ew-we-sk-hbig b { height: 11px; width: 100%; }
.ew-we-sk-hsmall b { height: 7px; width: 70%; }
.ew-we-sk-head u { height: 3px; width: 26%; margin-top: 0; }
.ew-we-sk-head s { width: 55%; }
.ew-we-sk-icons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 9px 7px; }
.ew-we-sk-icons .ew-we-sk-tile { position: static; display: flex; gap: 4px; }
.ew-we-sk-icontop .ew-we-sk-tile { flex-direction: column; align-items: center; }
.ew-we-sk-iconleft .ew-we-sk-tile { flex-direction: row; align-items: flex-start; }
.ew-we-sk .ew-we-sk-dot { position: static; flex-shrink: 0; width: 13px; height: 13px; border-radius: 50%; background: var(--ew-accent); }
.ew-we-sk .ew-we-sk-lines { position: static; display: flex; flex: 1; flex-direction: column; gap: 3px; }
.ew-we-sk .ew-we-sk-lines > * { position: static; }
.ew-we-sk-icons b { width: 80%; }

/* ---------- TV → Infoscreens: Editor (seit 2026-11-25, plans/infoscreens.md) ---------- */
.ew-is-grip-cell { width: 34px; padding-right: 0 !important; }
.ew-is-drag { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 34px; border-radius: 6px; color: var(--ew-text-muted); cursor: grab; touch-action: none; }
.ew-is-drag:hover { background-color: var(--ew-hover); color: var(--ew-text); }
.ew-is-dnd, .ew-is-dnd * { cursor: grabbing !important; user-select: none; }
table.ew-table > tbody > tr.ew-is-dragging > td { background-color: var(--ew-active); }
tr.ew-is-page-off .ew-tile-icon, tr.ew-is-page-off .ew-person-sub { opacity: .55; }
.ew-is-color { display: flex; align-items: center; gap: 10px; }
.ew-is-color input[type="color"] { width: 56px; height: 40px; padding: 3px; flex: none; cursor: pointer; }
.ew-is-color-hex { color: var(--ew-text-muted); font-size: 13px; }
.ew-is-sample { --is-bg: #071d2d; --is-text: #ffffff; --is-accent: #fecc19; margin-top: 8px; padding: 12px; border-radius: var(--ew-radius-card); background-color: var(--is-bg); color: var(--is-text); }
.ew-is-sample-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 13px; }
.ew-is-sample-home { padding: 4px 10px; border-radius: 6px; background-color: var(--is-accent); color: #111; font-weight: 700; letter-spacing: .04em; }
.ew-is-sample-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ew-is-sample-tile { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 14px 12px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--is-text) 18%, transparent);
    background-color: color-mix(in srgb, var(--is-text) 8%, var(--is-bg)); font-weight: 700; }
.ew-is-sample-tile i { color: var(--is-accent); font-size: 20px; }
.ew-is-sample-tile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ew-is-logo-sample { display: flex; align-items: center; justify-content: center; height: 96px; margin-bottom: 6px; border-radius: var(--ew-radius-card); }
.ew-is-logo-sample img { max-height: 60px; max-width: 80%; }
.ew-is-icon-pick { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.ew-is-icon-current { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 10px;
    background-color: var(--ew-neutral-tint); color: var(--ew-text); font-size: 26px; }
.ew-is-icons-quick { flex: 1; min-width: 0; margin-bottom: 0; }
.ew-is-icons-all { margin-top: 10px; }
.ew-isq-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.ew-isq-question { font-weight: 600; overflow-wrap: anywhere; }
.ew-isq-form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.ew-isq-import { padding: 16px; }
.ew-isq-import-head { font-size: 16px; font-weight: 600; }
.ew-isq-sample { margin: 10px 0 0; padding-left: 18px; color: var(--ew-text-soft); }
.ew-isq-errors { max-height: 180px; overflow-y: auto; margin: 10px 0 0; padding-left: 18px; color: var(--ew-danger); font-size: 13px; }
/* Fenster „Spalten“ (seit Stufe 10f, _api_web_cols.php): wie „Folien“, statt Vorschaubild die Stelle der Spalte */
.ew-we-col-num { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 28px; height: 28px; border-radius: var(--ew-radius);
    background: var(--ew-neutral-tint); color: var(--ew-text-soft); font-size: 12px; font-weight: 700; }
/* Skizzen der Tabellen in der Karte „Aufbau“ (Stufe 10f): alt 8 schmale Spalten, neu 3 breite mit „+“ */
.ew-we-sk-table { display: grid; gap: 3px; padding: 8px; }
.ew-we-sk-table i { position: static; height: 9px; border-radius: 2px; background: var(--ew-text-muted); opacity: .55; }
.ew-we-sk-table i.ew-we-sk-th { background: var(--ew-text-soft); opacity: 1; }
.ew-we-sk-table i.ew-we-sk-add { background: var(--ew-accent); opacity: 1; }
/* Skizzen Bilder & Galerien, Cards (Stufe 10g) */
.ew-we-sk-piccenter .ew-we-sk-img { left: 15%; top: 7px; width: 70%; height: 44px; }   /* Einzelbild groß · mittel · klein */
.ew-we-sk-picmedium .ew-we-sk-img { left: 32%; top: 15px; width: 36%; height: 28px; }
.ew-we-sk-picsmall .ew-we-sk-img { left: 41%; top: 21px; width: 18%; height: 16px; }
/* Skizzen Videos (Stufe 10h) */
.ew-we-sk .ew-we-sk-vid { border-radius: 3px; background: #5b7088; }
.ew-we-sk .ew-we-sk-play { left: 50%; top: 50%; width: 0; height: 0; transform: translate(-35%, -50%); border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent #ffffff; }
.ew-we-sk-video .ew-we-sk-vid { left: 22%; top: 7px; width: 56%; height: 44px; }
.ew-we-sk-vtext .ew-we-sk-vid { inset: 0; border-radius: 0; }
.ew-we-sk-vtext .ew-we-sk-play { left: 76%; }
.ew-we-sk-vtext .ew-we-sk-txt { left: 8px; top: 13px; width: 40%; }
.ew-we-sk-vtext .ew-we-sk-txt b { background: #ffffff; }
.ew-we-sk-vtext .ew-we-sk-txt s { background: #e6edf1; }
.ew-we-sk-vcards .ew-we-sk-tile > .ew-we-sk-vid { position: relative; height: 20px; }
.ew-we-sk-vcards .ew-we-sk-play { border-width: 4px 0 4px 7px; }
/* Skizzen Seiten nebeneinander (Stufe 10i) */
.ew-we-sk-split { display: grid; gap: 6px; padding: 8px; }
.ew-we-sk-split .ew-we-sk-tile { position: static; display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: 4px; background: var(--ew-surface); }
.ew-we-sk-picwide .ew-we-sk-img { left: 0; top: 11px; width: 100%; height: 36px; border-radius: 0; }
.ew-we-sk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 7px; }
.ew-we-sk-grid .ew-we-sk-img { position: static; height: 20px; }
.ew-we-sk-gallin { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 6px 7px; }
.ew-we-sk-gallin .ew-we-sk-tile { position: relative; height: 46px; overflow: hidden; border-radius: 3px; background: #85b7eb; }
.ew-we-sk-gallin .ew-we-sk-tile > * { position: absolute; }
.ew-we-sk-gallin .ew-we-sk-tile > .ew-we-sk-shade { left: 0; right: 0; bottom: 0; height: 60%; background: linear-gradient(0deg, rgba(0,0,0,.55), transparent); }
.ew-we-sk-gallin .ew-we-sk-tile > b, .ew-we-sk-gallin .ew-we-sk-tile > s { left: 4px; background: #ffffff; }
.ew-we-sk-gallin .ew-we-sk-tile > b { bottom: 11px; width: 66%; height: 4px; }
.ew-we-sk-gallin .ew-we-sk-tile > s { bottom: 5px; width: 44%; height: 3px; opacity: .8; }
.ew-we-sk-glink u { width: 34%; height: 4px; margin: 1px auto 0; }
.ew-we-sk-glink .ew-we-sk-tile { align-items: center; }
.ew-we-sk-glink .ew-we-sk-img, .ew-we-sk-cardlink .ew-we-sk-img { align-self: stretch; }
.ew-we-sk-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 5px 10px; }
.ew-we-sk-cards .ew-we-sk-tile { position: static; display: flex; flex-direction: column; gap: 3px; padding: 3px; border-radius: 4px; background: var(--ew-surface); }
.ew-we-sk-cards .ew-we-sk-img { height: 18px; }
.ew-we-sk-cards u { width: 46%; height: 5px; margin-top: 1px; }
.ew-we-sk-cardlink .ew-we-sk-tile { align-items: center; box-shadow: 0 0 0 1.5px var(--ew-accent); }
/* Skizzen seit Stufe 10j: Feeds (Liste, Karten, Zeitleiste) und Termine (Liste, Datumskachel – je klein –, Karten) */
.ew-we-sk-rows { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 6px 10px; }
.ew-we-sk-rows .ew-we-sk-row { position: static; display: flex; align-items: stretch; gap: 6px; }
.ew-we-sk-rows .ew-we-sk-img { position: static; flex: 0 0 34%; height: 18px; }
.ew-we-sk-rows .ew-we-sk-lines { justify-content: center; }
.ew-we-sk-cards3 { grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 6px 7px; }
.ew-we-sk-cards3 .ew-we-sk-img { height: 16px; }
.ew-we-sk-cards3 .ew-we-sk-head { position: static; height: 12px; border-radius: 3px; background: #e0b000; }
.ew-we-sk-time .ew-we-sk-axis { left: 15px; top: 6px; bottom: 6px; width: 2px; background: var(--ew-text-muted); opacity: .5; }
.ew-we-sk-time { padding-left: 10px; }
.ew-we-sk-time .ew-we-sk-dot { width: 11px; height: 11px; margin-top: 1px; }
.ew-we-sk-cal .ew-we-sk-date { position: static; flex: 0 0 26%; border-radius: 2px; background: var(--ew-text-muted); opacity: .35; }
.ew-we-sk-cal .ew-we-sk-bar { padding-left: 4px; border-left: 3px solid #e0b000; }
.ew-we-sk-cal .ew-we-sk-day { position: static; flex: 0 0 18px; height: 18px; border-radius: 3px; background: #e0b000; }
.ew-we-sk-cal.ew-we-sk-sm { gap: 4px; }
.ew-we-sk-cal.ew-we-sk-sm .ew-we-sk-day { flex-basis: 11px; height: 11px; }
.ew-we-sk-cal.ew-we-sk-sm .ew-we-sk-date { flex-basis: 18%; }
.ew-we-sk-cal.ew-we-sk-sm b { height: 4px; }
.ew-we-sk-cal.ew-we-sk-sm s { height: 3px; }


/* ---------- Startseite EWAY CMS (seit 2026-11-26, plans/dashboard_cms.md) ---------- */
/* Kachel mit Symbol in Lime: ui_tile(…, array("variant" => "accent")) – Schnellzugriff (Wunsch Nutzer 2026-11-26) */
.ew-tile-accent .ew-tile-icon { background-color: var(--ew-accent-tint); color: var(--ew-accent-text); }
/* Kennzahl-Kachel (ui_stat_tile()): Zahl oder Zustand mit Symbol – grüner Haken statt „OK“ */
a.ew-stat-tile { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 14px 16px; color: var(--ew-text); text-decoration: none; transition: background-color var(--ew-transition); }
a.ew-stat-tile:hover { background-color: var(--ew-raised); color: var(--ew-text); }
.ew-stat-tile-state { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 30px; margin: 10px 0 4px; font-size: 15px; font-weight: 600; }
.ew-stat-tile-state > .ew-icon { flex: none; font-size: 28px; }
.ew-stat-tile-ok > .ew-icon { color: var(--ew-success); }
.ew-stat-tile-neutral > .ew-icon { color: var(--ew-text-muted); }
.ew-stat-tile-warning, .ew-stat-tile-warning > .ew-icon { color: var(--ew-warning); }
.ew-stat-tile-danger, .ew-stat-tile-danger > .ew-icon { color: var(--ew-danger); }
.ew-stat-tile-num { font-size: 26px; font-weight: 600; line-height: 1; }
.ew-stat-tile-sub { color: var(--ew-text-muted); font-size: 12px; }
.ew-stat-tile-action { margin-top: 10px; pointer-events: none; }
.ew-stat-tile-action .ew-icon { color: var(--ew-accent-text); }
a.ew-stat-tile:hover .ew-stat-tile-action { border-color: var(--ew-line-strong); background-color: var(--ew-active); }
/* Hinweis „… brauchen deine Aufmerksamkeit“: Punkte als Links */
.ew-dash-todo { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ew-dash-todo a { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid currentColor; border-radius: 999px; font-size: 12px; font-weight: 600; text-decoration: none; }
.ew-dash-todo a.ew-dash-todo-warning { color: var(--ew-warning); }
.ew-dash-todo a.ew-dash-todo-danger { color: var(--ew-danger); }
.ew-dash-todo a:hover { background-color: var(--ew-hover); }
.ew-dash-todo a .ew-icon { color: inherit; font-size: 12px; }
/* Links unter „Dein Paket“ (Vertrag ansehen · Paket wechseln) */
.ew-dash-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; }

/* ---------- Startseite EWAY CMS, Stufe 2 „freundlicher“ (seit 2026-11-27, plans/dashboard_cms.md Abschnitt 10, Mockup plans/mockups/dashboard_friendly.html) ---------- */
.ew-dash { display: flex; flex-direction: column; gap: var(--ew-card-gap); }
.ew-dash-notices { display: flex; flex-direction: column; gap: 8px; }
.ew-dash-notices > .ew-hint-boxes { margin: 0; }
/* Stufe 3 „gegliedert“ (seit 2026-12-02, Plan Abschnitt 11, Mockup plans/mockups/dashboard_sections.html): Bereich mit Zwischenüberschrift –
   deutlich mehr Abstand nach oben (Lücke der Seite + 28 px), Überschrift klein in Versalien mit Line-Icon und Linie bis zum Rand */
.ew-dash > .ew-dash-sec { margin-top: 28px; }
.ew-dash-sec { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ew-dash-sec-h { display: flex; align-items: center; gap: 10px; margin: 0 0 -2px; color: var(--ew-text-muted); font-size: 12.5px; font-weight: 700;
    line-height: 1.2; letter-spacing: .12em; text-transform: uppercase; }
.ew-dash-sec-h > .ew-icon { flex: none; color: inherit; font-size: 17px; }
.ew-dash-sec-h > .ew-dropdown-tag { flex: none; margin-left: 0; letter-spacing: normal; text-transform: none; }
.ew-dash-sec-h::after { content: ""; flex: 1; height: 1px; margin-left: 4px; background-color: var(--ew-line-strong); opacity: .7; }
.ew-dash-sec > .ew-dash-two + .ew-grid { margin-top: calc(var(--ew-card-gap) - 16px); }
.ew-dash-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ew-card-gap); align-items: stretch; }
/* Symbol in getönter Fläche – je Bereich eine eigene Farbe (Lime, Petrol, Violett, Amber …) */
.ew-dash-ic { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; font-size: 22px; }
.ew-dash-ic .ew-icon { color: inherit; font-size: inherit; }
.ew-dash-ic-sm { width: 40px; height: 40px; font-size: 20px; }
.ew-dash-ic-lime { background-color: var(--ew-accent-tint); color: var(--ew-accent-text); }
.ew-dash-ic-petrol { background-color: var(--ew-petrol-tint); color: var(--ew-petrol); }
.ew-dash-ic-violet { background-color: var(--ew-info-tint); color: var(--ew-info); }
.ew-dash-ic-amber { background-color: var(--ew-warning-tint); color: var(--ew-warning); }
.ew-dash-ic-red { background-color: var(--ew-danger-tint); color: var(--ew-danger); }
.ew-dash-ic-green { background-color: var(--ew-success-tint); color: var(--ew-success); }
.ew-dash-ic-grey { background-color: var(--ew-neutral-tint); color: var(--ew-text-soft); }
/* Webseiten-Kachel: links Begrüßung, Satz, Kurzinfos; rechts die Knöpfe und klein die Adresse der Webseite (Vorschau entfernt 2026-11-27) */
.ew-card.ew-dash-hero { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px;
    align-items: center; padding: 32px 34px; border-radius: 18px; }
.ew-dash-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(560px 340px at 6% 0%, var(--ew-glow-1), transparent 70%), radial-gradient(560px 380px at 100% 100%, var(--ew-glow-2), transparent 70%); }
.ew-dash-date { margin-bottom: 8px; color: var(--ew-text-muted); font-size: 13px; }
.ew-dash-hello { margin: 0; color: var(--ew-text); font-size: 32px; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }
.ew-dash-sentence { max-width: 32em; margin: 12px 0 0; color: var(--ew-text-soft); font-size: 17px; line-height: 1.55; }
.ew-dash-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.ew-dash-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border: 1px solid var(--ew-line); border-radius: 999px; background-color: var(--ew-hover); color: var(--ew-text); font-size: 13px; }
.ew-dash-pill .ew-icon { color: var(--ew-text-soft); }
.ew-dash-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.ew-dash-dot-ok { background-color: var(--ew-success); box-shadow: 0 0 0 4px var(--ew-success-tint); }
.ew-dash-dot-warn { background-color: var(--ew-warning); box-shadow: 0 0 0 4px var(--ew-warning-tint); }
.ew-dash-dot-off { background-color: var(--ew-text-muted); box-shadow: 0 0 0 4px var(--ew-neutral-tint); }
.ew-dash-hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; min-width: 0; max-width: 380px; }
.ew-dash-hero-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.ew-dash-hero-actions .ew-btn { min-height: 42px; padding-left: 18px; padding-right: 18px; }
.ew-dash-hero-url { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; color: var(--ew-text-muted); font-size: 12px; }
.ew-dash-hero-url span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ew-dash-hero-url .ew-icon { flex: none; color: inherit; font-size: 13px; }
/* Schnellzugriff (bis 2026-12-02 „Was möchtest du tun?“) – Spalten = Anzahl der Karten (Profi 4, Standard 3, Light 2); Karte nur mit Symbol (Lime),
   Titel und Kurzinfo (ohne beschreibenden Text seit Stufe 3); „Außerdem:“ als Kurzlinks */
.ew-dash-actions { display: grid; grid-template-columns: repeat(var(--ew-cols, 4), minmax(0, 1fr)); gap: 16px; }
a.ew-dash-action { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 18px 20px; border-radius: 16px; color: var(--ew-text); text-decoration: none;
    transition: transform var(--ew-transition), border-color var(--ew-transition), box-shadow var(--ew-transition); }
a.ew-dash-action:hover { transform: translateY(-2px); border-color: var(--ew-line-strong); box-shadow: var(--ew-shadow-float); color: var(--ew-text); }
.ew-dash-action-title { margin-bottom: -6px; font-size: 16px; font-weight: 600; }
.ew-dash-action-meta { display: flex; align-items: center; gap: 6px; color: var(--ew-text-muted); font-size: 12.5px; font-weight: 600; }
.ew-dash-action-meta.ew-dash-hot { color: var(--ew-accent-text); }
.ew-dash-action-meta .ew-icon { color: inherit; font-size: 13px; }
.ew-dash-more { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; color: var(--ew-text-muted); font-size: 13px; }
a.ew-dash-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border: 1px solid var(--ew-line-strong); border-radius: 999px; background-color: var(--ew-surface);
    color: var(--ew-text); font-size: 13px; text-decoration: none; }
a.ew-dash-chip:hover { background-color: var(--ew-hover); color: var(--ew-text); }
.ew-dash-chip .ew-icon { color: var(--ew-text-soft); }
.ew-dash-chip em { color: var(--ew-text-muted); font-style: normal; }
/* „Alles in Ordnung“: Haken-Zeile, Einzelheiten aufklappbar */
.ew-card.ew-dash-health, .ew-card.ew-dash-pkg { padding: 20px 22px; }
.ew-dash-health-head { display: flex; align-items: center; gap: 14px; }
.ew-dash-health-head > div > b { display: block; font-size: 17px; }
.ew-dash-health-head > div > span { color: var(--ew-text-soft); font-size: 13px; }
.ew-dash-health-ic { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%;
    background-color: var(--ew-success-tint); color: var(--ew-success); font-size: 28px; }
.ew-dash-health-ic .ew-icon { color: inherit; font-size: inherit; }
.ew-dash-health-ic-warn { background-color: var(--ew-warning-tint); color: var(--ew-warning); }
.ew-dash-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-top: 18px; padding: 14px 16px; border-radius: 12px; background-color: var(--ew-hover); font-size: 14px; }
.ew-dash-checks span { display: flex; align-items: center; gap: 8px; }
.ew-dash-checks .ew-icon, .ew-dash-health-list li > .ew-icon { font-size: 18px; }
.ew-dash-ok { color: var(--ew-success); }
.ew-dash-warn { color: var(--ew-warning); }
.ew-dash-muted { color: var(--ew-text-muted); }
.ew-dash-health details { margin-top: 14px; }
.ew-dash-health summary { display: inline-flex; align-items: center; gap: 4px; color: var(--ew-accent-text); font-size: 13px; font-weight: 600; cursor: pointer; list-style: none; }
.ew-dash-health summary::-webkit-details-marker { display: none; }
.ew-dash-health summary .ew-icon { color: inherit; font-size: 12px; transition: transform var(--ew-transition); }
.ew-dash-health details[open] summary .ew-icon { transform: rotate(90deg); }
.ew-dash-health-list { display: grid; gap: 12px; margin: 14px 0 0; padding: 0; list-style: none; }
.ew-dash-health-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; }
.ew-dash-health-list li > .ew-icon { margin-top: 2px; }
.ew-dash-health-list small { display: block; color: var(--ew-text-muted); font-size: 12.5px; }
.ew-dash-health-list a { color: var(--ew-text); text-decoration: none; }
.ew-dash-health-list a:hover { color: var(--ew-accent-text); }
/* „Dein Paket“: Ring für den Speicher (ab 75 % gelb, ab 90 % rot wie ui_meter()), schmale Balken für KI und SMS */
.ew-dash-pkg-row { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 22px; align-items: center; }
.ew-dash-ring { --p: 0; --c: var(--ew-accent); position: relative; display: grid; place-items: center; width: 124px; height: 124px; border-radius: 50%;
    background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--ew-active) 0); }
.ew-dash-ring::before { content: ""; position: absolute; inset: 11px; border-radius: 50%; background-color: var(--ew-surface); }
.ew-dash-ring > span { position: relative; font-size: 24px; font-weight: 700; line-height: 1.1; text-align: center; }
.ew-dash-ring small { display: block; color: var(--ew-text-muted); font-size: 11px; font-weight: 500; }
.ew-dash-ring-warning { --c: var(--ew-warning); }
.ew-dash-ring-danger { --c: var(--ew-danger); }
.ew-dash-pkg-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; }
.ew-dash-pkg-sub { margin-top: 4px; color: var(--ew-text-soft); font-size: 13px; }
.ew-dash-mini { margin-top: 12px; }
.ew-dash-mini-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 5px; color: var(--ew-text-soft); font-size: 12.5px; }
.ew-dash-mini-bar { height: 6px; overflow: hidden; border-radius: 999px; background-color: var(--ew-active); }
.ew-dash-mini-bar > span { display: block; height: 100%; border-radius: 999px; background-color: var(--ew-info); }
.ew-dash-mini-bar-petrol > span { background-color: var(--ew-petrol); }
.ew-dash-mini-bar-warning > span { background-color: var(--ew-warning); }
.ew-dash-mini-bar-danger > span { background-color: var(--ew-danger); }
.ew-dash-booked { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.ew-dash-booked span { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background-color: var(--ew-neutral-tint); color: var(--ew-text-soft); font-size: 12px; }
.ew-dash-booked .ew-icon { color: var(--ew-success); }
.ew-dash-pkg .ew-dash-links { margin-top: 12px; font-size: 13px; }
/* Erweiterungen: Karten mit Symbol in eigener Farbe (Petrol, KI Lila), Preis als Lime-Badge unten, gebuchte als grünes Badge „Aktiv · …“ (seit 2026-12-02) */
.ew-dash-offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.ew-card.ew-dash-offer { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; min-height: 200px; padding: 18px; border-radius: 16px;
    color: var(--ew-text); text-decoration: none; transition: transform var(--ew-transition), box-shadow var(--ew-transition); }
a.ew-card.ew-dash-offer:hover { transform: translateY(-2px); box-shadow: var(--ew-shadow-float); color: var(--ew-text); }
.ew-dash-offer::after { content: ""; position: absolute; top: -60px; right: -50px; z-index: 0; width: 140px; height: 140px; border-radius: 50%;
    background-color: var(--ew-dash-tint, var(--ew-accent-tint)); opacity: .7; pointer-events: none; }
.ew-dash-offer > * { position: relative; z-index: 1; }
.ew-dash-offer-title { font-weight: 600; }
.ew-dash-offer-title .ew-dropdown-tag { margin-left: 6px; }
.ew-dash-offer-text { color: var(--ew-text-soft); font-size: 13px; line-height: 1.5; }
.ew-dash-offer-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; color: var(--ew-text-muted); font-size: 12.5px; }
.ew-dash-offer-foot .ew-icon { color: inherit; }
.ew-dash-offer-foot .ew-badge { padding: 3px 10px; font-size: 12.5px; }
.ew-card.ew-dash-offer-ghost { border-style: dashed; opacity: .45; }
/* Hilfe (Tipp · Fragen): vorerst nur Superadmin, ganzer Bereich verblasst (Erinnerung, später umsetzen) */
.ew-dash-later { opacity: .5; }
.ew-card.ew-dash-tip { display: flex; align-items: flex-start; gap: 16px; padding: 20px 22px; }
.ew-dash-tip b { display: block; margin-bottom: 4px; }
.ew-dash-tip p { margin: 0; color: var(--ew-text-soft); font-size: 14px; line-height: 1.55; }
.ew-dash-tip-violet { background-image: linear-gradient(135deg, var(--ew-info-tint), transparent 65%); }
.ew-dash-go { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; color: var(--ew-accent-text); font-size: 13px; font-weight: 600; }
.ew-dash-go .ew-icon { color: inherit; font-size: 12px; }
/* Superadmin (bis 2026-12-02 gestrichelter Kasten „Technik“): Cronjob, Protokoll, Version, Server als Karten; Fehler → ganze Karte rot,
   Warnung → ganze Karte gelb (Tönung über der Kartenfläche, Rahmen und Name in der Farbe), letzter Protokolleintrag auf der Kartenfläche */
.ew-dash-sa-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ew-dash-sa-grid > a.ew-card { display: block; min-width: 0; padding: 16px 18px; border-radius: 16px; color: var(--ew-text); font-size: 13px; text-decoration: none;
    transition: transform var(--ew-transition), box-shadow var(--ew-transition); }
.ew-dash-sa-grid > a.ew-card:hover { transform: translateY(-2px); box-shadow: var(--ew-shadow-float); color: var(--ew-text); }
.ew-dash-sa-grid .ew-stat-tile-state { font-size: 15px; }
.ew-dash-sa-grid > a.ew-dash-sa-danger { border-color: var(--ew-danger); background: linear-gradient(var(--ew-danger-tint), var(--ew-danger-tint)), var(--ew-surface); }
.ew-dash-sa-grid > a.ew-dash-sa-warning { border-color: var(--ew-warning); background: linear-gradient(var(--ew-warning-tint), var(--ew-warning-tint)), var(--ew-surface); }
.ew-dash-sa-danger .ew-stat-label, .ew-dash-sa-danger .ew-stat-label .ew-icon { color: var(--ew-danger); }
.ew-dash-sa-warning .ew-stat-label, .ew-dash-sa-warning .ew-stat-label .ew-icon { color: var(--ew-warning); }
.ew-dash-sa-sub { color: var(--ew-text-muted); font-size: 12.5px; }
.ew-dash-sa-entry { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background-color: var(--ew-surface); color: var(--ew-text-soft); font-size: 12px; overflow-wrap: anywhere; }
.ew-dash-sa-danger .ew-dash-sa-entry b { color: var(--ew-danger); }
.ew-dash-sa-warning .ew-dash-sa-entry b { color: var(--ew-warning); }
/* Light-Paket: Karten Backup und Newsletter mit „Upgrade“ (ui_stat_tile()) zweispaltig */
.ew-dash .ew-grid { gap: 16px; }
@media (max-width: 1199.98px) {
    .ew-dash-actions-4 { --ew-cols: 2 !important; }
    .ew-dash-sa-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 991.98px) {
    .ew-card.ew-dash-hero { grid-template-columns: 1fr; gap: 20px; }
    .ew-dash-hero-side { align-items: flex-start; max-width: none; }
    .ew-dash-hero-actions { justify-content: flex-start; }
    .ew-dash-two { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
    .ew-dash { gap: 20px; }
    .ew-dash > .ew-dash-sec { margin-top: 18px; }
    .ew-dash-sec-h { font-size: 12px; }
    .ew-card.ew-dash-hero { padding: 22px; border-radius: 16px; }
    .ew-dash-hello { font-size: 26px; }
    .ew-dash-sentence { font-size: 15px; }
    .ew-dash-actions { --ew-cols: 2 !important; gap: 12px; }
    a.ew-dash-action { padding: 16px; }
    .ew-dash-pkg-row { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; }
    .ew-dash-ring { width: 96px; height: 96px; }
    .ew-dash-ring::before { inset: 9px; }
    .ew-dash-ring > span { font-size: 20px; }
}
@media (max-width: 575.98px) {
    .ew-dash .ew-grid, .ew-dash-sa-grid, .ew-dash-checks, .ew-dash-pkg-row { grid-template-columns: 1fr; }
}


/* ---------- Seite nicht gefunden (system_pages/404, seit 2026-11-27) ---------- */

.ew-root.ew-notfound { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; padding-left: 16px; padding-right: 16px; text-align: center; }
.ew-notfound-code { margin-bottom: 12px; font-size: 96px; font-weight: 700; line-height: 1; letter-spacing: -.04em; color: var(--ew-line-strong); }
.ew-root .ew-notfound-title { margin: 0 0 8px; font-size: 22px; font-weight: 600; color: var(--ew-text); }
.ew-notfound-text { max-width: 420px; margin: 0 0 24px; color: var(--ew-text-muted); }
@media (max-width: 575.98px) {
    .ew-notfound-code { font-size: 72px; }
}

/* Farbe oder Farbverlauf (seit 2026-12-03, Wunsch Nutzer): Feld ui_gradient() – Knopf mit Farbmuster und Kurztext – und das Fenster dazu
   (inc/js/gradient.js): Vorschau, Leiste mit Griffen, Linear/Radial mit Winkel, Farbwähler, HEX/RGB, Liste der Farben */
.ew-gradient-btn { display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; }
.ew-gradient-swatch { flex: none; width: 44px; height: 22px; border: 1px solid var(--ew-line-strong); border-radius: 4px; }
.ew-gradient-text { min-width: 0; overflow: hidden; color: var(--ew-text-soft); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ew-modal .ew-gp-dialog { max-width: min(800px, calc(100vw - 16px)); }
.ew-gp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; min-width: 0; margin-right: 12px; }
#ew_gp_modal .modal-header { justify-content: space-between; }
.ew-gp-preview { height: 96px; margin-bottom: 18px; border: 1px solid var(--ew-line); border-radius: var(--ew-radius-card); }
.ew-gp-barrow { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; margin-bottom: 22px; }
.ew-gp-bar { position: relative; flex: 1 1 300px; height: 30px; margin: 0 10px; cursor: copy; touch-action: none; }
.ew-gp-bar-fill { position: absolute; top: 0; right: 0; bottom: 0; left: 0; border: 1px solid var(--ew-line-strong); border-radius: 8px; }
.ew-gp-handle { position: absolute; top: 50%; width: 18px; height: 40px; margin: 0; padding: 3px; transform: translate(-50%, -50%); border: 2px solid var(--ew-text);
    border-radius: 9px; background-color: var(--ew-raised); cursor: grab; touch-action: none; }
.ew-gp-handle > span { display: block; width: 100%; height: 100%; border-radius: 5px; pointer-events: none; }
.ew-gp-handle.is-sel { z-index: 1; box-shadow: 0 0 0 4px var(--ew-active), 0 0 0 5px var(--ew-text-muted); }
.ew-gp-handle:focus-visible { outline: none; box-shadow: var(--ew-focus-ring); }
.ew-gp-kind { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ew-gp-angle { display: flex; align-items: center; gap: 10px; }
.ew-gp-dial { position: relative; flex: none; width: 40px; height: 40px; border: 2px solid var(--ew-text); border-radius: 50%; cursor: grab; touch-action: none; }
.ew-gp-dial:focus-visible { outline: none; box-shadow: var(--ew-focus-ring); }
.ew-gp-dial-arm { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; }
.ew-gp-dial-dot { position: absolute; top: 4px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background-color: var(--ew-text); }
.ew-gp-unit { position: relative; }
.ew-gp-unit > .ew-input { padding-right: 26px; }
.ew-gp-unit > span { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); color: var(--ew-text-muted); pointer-events: none; }
.ew-gp-angle .ew-gp-unit { width: 84px; }
.ew-gp-main { display: grid; grid-template-columns: 220px 160px minmax(0, 1fr); gap: 22px; align-items: start; }
.ew-gp-color-only .ew-gp-main { grid-template-columns: 260px minmax(0, 220px); }
.ew-gp-label { display: block; margin-bottom: 8px; color: var(--ew-text-muted); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.ew-gp-sv { position: relative; height: 170px; border-radius: var(--ew-radius); cursor: crosshair; touch-action: none;
    background-image: linear-gradient(to top, #000000, rgba(0, 0, 0, 0)), linear-gradient(to right, #ffffff, rgba(255, 255, 255, 0)); }
.ew-gp-sv-cursor { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 3px solid #ffffff; border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(0, 0, 0, .3); pointer-events: none; }
.ew-gp-sv-cursor:focus-visible { outline: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), var(--ew-focus-ring); }
.ew-gp-hue { position: relative; height: 14px; margin: 16px 6px 0; border-radius: 7px; cursor: pointer; touch-action: none;
    background: linear-gradient(to right, #ff0000 0%, #ffff00 16.66%, #00ff00 33.33%, #00ffff 50%, #0000ff 66.66%, #ff00ff 83.33%, #ff0000 100%); }
.ew-gp-hue-handle { position: absolute; top: 50%; width: 12px; height: 22px; transform: translate(-50%, -50%); border: 2px solid #ffffff; border-radius: 6px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .45); pointer-events: none; }
.ew-gp-hue-handle:focus-visible { outline: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .45), var(--ew-focus-ring); }
.ew-gp-rgb { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.ew-gp-rgb label { display: block; margin: 0; }
.ew-gp-rgb .ew-input { padding: 0 6px; text-align: center; }
.ew-gp-stops { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.ew-gp-stop { display: grid; grid-template-columns: 34px minmax(0, 1fr) 72px 26px; gap: 6px; align-items: center; padding: 4px; border-radius: var(--ew-radius); }
.ew-gp-stop.is-sel { background-color: var(--ew-active); }
.ew-gp-stop-swatch { width: 34px; height: 34px; padding: 0; border: 1px solid var(--ew-line-strong); border-radius: 6px; cursor: pointer; }
.ew-gp-stop.is-sel .ew-gp-stop-swatch { box-shadow: 0 0 0 2px var(--ew-raised), 0 0 0 4px var(--ew-text); }
.ew-gp-stop .ew-input { padding: 0 8px; }
.ew-gp-stop .ew-gp-unit > .ew-input { padding-right: 24px; }
@media (max-width: 767.98px) {
    .ew-gp-main, .ew-gp-color-only .ew-gp-main { grid-template-columns: minmax(0, 1fr); }
}
