/* Meet — Cal.com-Look: dunkelgrau/schwarz mit Weiß, clean, minimal.
   Dunkel ist Default; hell folgt dem Systemtheme oder data-theme="light". */

:root {
    --bg: #0f0f0f;
    --bg-elev: #171717;
    --surface: #1c1c1c;
    --surface-hover: #242424;
    --border: #2b2b2b;
    --border-strong: #3a3a3a;
    --text: #f3f4f6;
    --text-muted: #9ca3af;
    --text-faint: #6b7280;
    --primary: #ffffff;
    --primary-text: #111111;
    --primary-hover: #e5e5e5;
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, .12);
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, .12);
    --info: #60a5fa;
    --info-bg: rgba(96, 165, 250, .12);
    --warn: #f59e0b;
    --warn-bg: rgba(245, 158, 11, .12);
    --focus: rgba(255, 255, 255, .35);
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color-scheme: dark;
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --bg: #f5f5f5;
        --bg-elev: #ffffff;
        --surface: #ffffff;
        --surface-hover: #f5f5f5;
        --border: #e5e5e5;
        --border-strong: #d4d4d4;
        --text: #111111;
        --text-muted: #6b7280;
        --text-faint: #9ca3af;
        --primary: #111111;
        --primary-text: #ffffff;
        --primary-hover: #2a2a2a;
        --focus: rgba(17, 17, 17, .25);
        --shadow: 0 1px 2px rgba(0, 0, 0, .06);
        color-scheme: light;
    }
}

:root[data-theme="light"] {
    --bg: #f5f5f5;
    --bg-elev: #ffffff;
    --surface: #ffffff;
    --surface-hover: #f5f5f5;
    --border: #e5e5e5;
    --border-strong: #d4d4d4;
    --text: #111111;
    --text-muted: #6b7280;
    --text-faint: #9ca3af;
    --primary: #111111;
    --primary-text: #ffffff;
    --primary-hover: #2a2a2a;
    --focus: rgba(17, 17, 17, .25);
    --shadow: 0 1px 2px rgba(0, 0, 0, .06);
    color-scheme: light;
}

/* --- Basis ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; font-weight: 600; }
h2 { font-size: 1.15rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 1rem; }
a { color: inherit; }
code, pre { font-family: var(--mono); font-size: .9em; }
pre { white-space: pre-wrap; word-break: break-word; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.text-center { text-align: center; }
.link-muted { color: var(--text-muted); text-decoration: none; }
.link-muted:hover { color: var(--text); text-decoration: underline; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.row:has(> .field) { align-items: flex-end; } /* Feldzeilen: Eingabefelder unten bündig, auch wenn ein Label umbricht */
.row-between { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.page-head.row-between > :first-child, .row-between.is-head > :first-child { flex: 1 1 260px; min-width: 0; }

/* --- Auth-Layout ------------------------------------------------------ */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    gap: 1.5rem;
}
.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 1.25rem; margin-bottom: 1.25rem; }
.brand { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.5rem; font-weight: 600; }
.brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 8px;
    background: var(--primary); color: var(--primary-text); font-weight: 700;
}
.brand-name { font-size: 1.05rem; }

/* --- Formulare -------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label { font-size: .875rem; font-weight: 500; }
.hint, .field .hint { font-size: .8rem; color: var(--text-muted); }
p.hint { margin: .25rem 0 0; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="url"], input[type="tel"], input[type="search"], input[type="date"], input[type="time"],
input[type="datetime-local"], input[type="month"], select, textarea {
    width: 100%;
    font: inherit;
    color: var(--text);
    background: var(--bg-elev);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: .45rem .75rem;
    min-height: 40px;   /* Formularfelder einheitlich 40 px (Paket 111) */
    transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--text-muted);
    box-shadow: 0 0 0 3px var(--focus);
}
/* Schieberegler (Paket 106): kein Feld-Rahmen und kein Fokus-Kasten beim Ziehen; Tastatur-Fokus dezent als Outline */
input[type="range"] { border: 0; padding: 0; background: transparent; box-shadow: none; }
input[type="range"]:focus { box-shadow: none; outline: none; }
input[type="range"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
textarea { min-height: 6rem; resize: vertical; }
input:disabled, select:disabled, textarea:disabled { opacity: .5; cursor: not-allowed; }
input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"] { width: auto; }
input::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
input::-webkit-calendar-picker-indicator:hover { opacity: 1; }
select {
    appearance: none; -webkit-appearance: none;
    padding-right: 2.2rem;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5l5 5 5-5' fill='none' stroke='%239ca3af' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat; background-position: right .8rem center;
}
select[multiple] { background-image: none; padding-right: .75rem; }
input[type="checkbox"], input[type="radio"] {
    appearance: none; -webkit-appearance: none;
    width: 18px; height: 18px; margin: 0; flex: 0 0 18px;
    border: 1.5px solid var(--border-strong); border-radius: 5px;
    background: var(--bg-elev); display: inline-grid; place-content: center;
    cursor: pointer; vertical-align: -4px; transition: border-color .15s, background .15s;
}
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]::before, input[type="radio"]::before {
    content: ""; width: 10px; height: 10px; transform: scale(0); transition: transform .12s;
    background: var(--primary-text);
    clip-path: polygon(14% 44%, 0 62%, 40% 100%, 100% 20%, 84% 6%, 40% 66%);
}
input[type="radio"]::before { width: 8px; height: 8px; border-radius: 50%; clip-path: none; }
input[type="checkbox"]:checked, input[type="radio"]:checked { background: var(--primary); border-color: var(--primary); }
input[type="checkbox"]:checked::before, input[type="radio"]:checked::before { transform: scale(1); }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); }
input[type="checkbox"]:hover:not(:checked), input[type="radio"]:hover:not(:checked) { border-color: var(--text-muted); }
input[type="color"] {
    appearance: none; -webkit-appearance: none;
    width: 38px; height: 38px; padding: 0; border: 1px solid var(--border-strong); border-radius: 50%;
    background: var(--bg-elev); cursor: pointer; overflow: hidden;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 3px; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 50%; }
input[type="color"]::-moz-color-swatch { border: none; border-radius: 50%; }
input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-field { display: inline-flex; align-items: center; gap: .6rem; position: relative; cursor: pointer; font-size: .9rem; }
.file-field:focus-within .btn { box-shadow: 0 0 0 3px var(--focus); }
.file-name { color: var(--text-muted); word-break: break-all; }
.code-input { font-family: var(--mono); font-size: 1.25rem; letter-spacing: .3em; text-align: center; }
.checkbox { display: flex; align-items: center; gap: .5rem; font-size: .9rem; cursor: pointer; }
/* Schalter (Ein/Aus-Einstellungen): <input type="checkbox" class="switch" role="switch"> — Checkboxen bleiben für Auswahllisten */
input[type="checkbox"].switch {
    width: 36px; height: 20px; flex: 0 0 36px; border-radius: 999px; border: none;
    background: var(--border-strong); place-content: center start; padding: 0 2px; vertical-align: -5px;
}
input[type="checkbox"].switch::before {
    width: 16px; height: 16px; border-radius: 50%; clip-path: none; transform: none;
    background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s;
}
input[type="checkbox"].switch:checked { background: var(--primary); }
input[type="checkbox"].switch:checked::before { transform: translateX(16px); background: var(--primary-text); }
input[type="checkbox"].switch:hover:not(:checked) { background: var(--text-muted); }
input[type="checkbox"].switch:disabled { opacity: .5; cursor: not-allowed; }
.checkbox:has(> .switch) { gap: .65rem; }
.share-invites li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .5rem 0; border-bottom: 1px solid var(--border); }
.share-invites li:last-child { border-bottom: none; }
.share-invite-main { min-width: 0; overflow-wrap: anywhere; }
.share-invite-side { display: flex; align-items: center; gap: .35rem; flex: 0 0 auto; }
.switch-list { display: grid; gap: .7rem; }
.note-icon { color: var(--text-muted); cursor: help; }
.note-line { color: var(--text-muted); font-size: .82rem; }
/* Event-Termine: Beginn – Ende ✕; bricht in schmalen Spalten sauber um */
.date-times { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.date-times input { flex: 1 1 200px; min-width: 0; }
.date-times > button { margin-left: auto; }
.date-times > .muted { display: none; } /* Beginn/Ende stehen je nach Breite neben- oder untereinander */
/* ↑ ↓ ✕ in Listenzeilen bleiben zusammen */
.row-tools { display: inline-flex; flex: 0 0 auto; margin-left: auto; }
/* Textfelder mit Vorschlagsliste (datalist): eigener Pfeil wie bei Auswahlfeldern statt des nativen Dreiecks */
input[list] {
    padding-right: 2.2rem;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5l5 5 5-5' fill='none' stroke='%239ca3af' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat; background-position: right .8rem center;
}
input[list]::-webkit-calendar-picker-indicator { opacity: 0; cursor: pointer; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem; align-items: end; }
.form-row > .field { margin: 0; }
.hint.switch-hint { margin: .15rem 0 0 calc(36px + .65rem); }

/* --- Buttons ---------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    font: inherit; font-weight: 500; font-size: .9rem;
    min-height: 36px; padding: .35rem .9rem;   /* alle Knöpfe 36 px, in Zeilen .btn-sm 32 px (Paket 111) */
    border-radius: var(--radius); white-space: nowrap;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--surface-hover); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); }
.btn-primary { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn-danger:hover { background: var(--danger-bg); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-hover); }
.btn-sm { min-height: 32px; padding: .25rem .7rem; font-size: .8rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* --- Alerts ----------------------------------------------------------- */
.alert {
    padding: .7rem .9rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: .9rem;
    margin-bottom: 1rem;
}
.alert-error { background: var(--danger-bg); border-color: var(--danger); }
.alert-success { background: var(--success-bg); border-color: var(--success); }
.alert-info { background: var(--info-bg); border-color: var(--info); }
.alert-warn { background: var(--warn-bg); border-color: var(--warn); }

/* --- Karten & Tabellen ------------------------------------------------ */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-weight: 500; color: var(--text-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.table tr:last-child td { border-bottom: none; }
.badge {
    display: inline-block; height: 22px; line-height: 20px; padding: 0 .55rem; border-radius: 999px; white-space: nowrap; vertical-align: middle;
    font-size: .75rem; font-weight: 500; border: 1px solid var(--border-strong); color: var(--text-muted); text-decoration: none;
}
/* Varianten getönt statt umrandet (Paket 111, Bausteine der Mockups) */
.badge-success { color: var(--success); background: var(--success-bg); border-color: transparent; }
.badge-danger { color: var(--danger); background: var(--danger-bg); border-color: transparent; }
.badge-warn { color: var(--warn); background: var(--warn-bg); border-color: transparent; }
.badge-info { color: var(--info); background: var(--info-bg); border-color: transparent; }
/* Kalender prüfen: Auffälligkeiten + Rohdaten (Bugfix 83.1) */
.check-issues { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: .5rem; line-height: 1.45; }
.mono-sm { font-family: var(--mono); font-size: .78rem; color: var(--text-muted); }

/* --- Fehlerseite ------------------------------------------------------ */
.error-page { text-align: center; }
.error-code { font-size: 3rem; font-weight: 700; color: var(--text-faint); margin: 0; }
.error-details {
    text-align: left; font-size: .75rem; background: var(--bg-elev);
    border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem; margin-top: 1.5rem;
    max-height: 40vh; overflow: auto;
}

/* --- Footer ----------------------------------------------------------- */
.legal { display: flex; gap: 1rem; font-size: .8rem; }
.legal a { color: var(--text-faint); text-decoration: none; }
.legal a:hover { color: var(--text-muted); }

/* --- App-Layout: Topbar, Subnav, Container ---------------------------- */
.topbar { background: var(--bg-elev); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40; }
.topbar-inner, .subnav-inner, .container {
    max-width: 1200px; margin: 0 auto; padding: 0 1.25rem;
}
.topbar-inner { display: flex; align-items: center; gap: 1.5rem; height: 56px; }
.topbar .brand { margin: 0; text-decoration: none; }
/* Hochgeladenes Logo (Admin → Erscheinungsbild): helles Logo im hellen, dunkles (oder umgekehrtes helles) im dunklen Schema */
.brand-logo { height: 32px; width: auto; max-width: 200px; object-fit: contain; display: block; }
.brand-auth .brand-logo { height: 40px; max-width: 240px; }
.brand-logo-light { display: none; }
.brand-logo-dark.is-inverted { filter: invert(1) hue-rotate(180deg); }
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .brand-logo-light { display: block; }
    :root:not([data-theme="dark"]) .brand-logo-dark { display: none; }
}
:root[data-theme="light"] .brand-logo-light { display: block; }
:root[data-theme="light"] .brand-logo-dark { display: none; }
.nav { display: flex; gap: .25rem; flex: 1; }
.nav-link, .subnav-link {
    padding: .4rem .7rem; border-radius: var(--radius); text-decoration: none;
    color: var(--text-muted); font-size: .9rem; font-weight: 500;
}
.nav-link:hover, .subnav-link:hover { background: var(--surface-hover); color: var(--text); }
.nav-link.is-active, .subnav-link.is-active { color: var(--text); background: var(--surface-hover); }
.topbar-user { position: relative; margin-left: auto; }
.topbar .brand-name { white-space: nowrap; }
/* Volle Breite (Paket 113): Hauptpunkte + „+ Neu“ + Kontext-Pille passen in 1200 px — Org-Kontext ohne App-Namen (wie am Handy), Name in der Pille gekürzt */
@media (min-width: 1151px) {
    .topbar-inner { gap: 1rem; }
    .topbar.is-org .brand-name { display: none; }
    .topbar .user-btn .user-name { max-width: 150px; }
}
@media (min-width: 1151px) and (max-width: 1279px) {
    .topbar .user-name { display: none; }
}
/* Mittlere Breite (Tablet quer, kleine Laptops): 8 Menüpunkte passen nur ohne Nutzernamen und mit engeren Abständen */
@media (min-width: 768px) and (max-width: 1150px) {
    .topbar-inner { gap: .75rem; }
    .topbar .nav { gap: 0; }
    .topbar .nav-link { padding: .4rem .5rem; font-size: .85rem; }
    .topbar .user-name { display: none; }
}
.user-btn {
    display: inline-flex; align-items: center; gap: .55rem; font: inherit; font-size: .9rem; font-weight: 500;
    padding: .3rem .6rem .3rem .3rem; border-radius: 999px; border: 1px solid var(--border);   /* einheitlich mit Rahmen (Paket 73) */
    background: transparent; color: var(--text); cursor: pointer;
}
.user-btn:hover, .user-btn.is-active, .user-btn[aria-expanded="true"] { background: var(--surface-hover); border-color: var(--border); }
.user-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); }
.avatar-sm { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; letter-spacing: -.02em; }
.avatar-sm.avatar-initial { background: var(--primary); color: var(--primary-text); border: 0; font-weight: 600; font-size: .68rem; }
.chev { width: 8px; height: 8px; border-right: 1.5px solid var(--text-muted); border-bottom: 1.5px solid var(--text-muted); transform: translateY(-2px) rotate(45deg); }
.menu {
    position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; z-index: 50;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35); padding: .35rem;
}
.menu-head { display: flex; flex-direction: column; padding: .5rem .7rem .6rem; font-size: .85rem; border-bottom: 1px solid var(--border); margin-bottom: .35rem; }
.menu-head .faint { font-size: .78rem; word-break: break-all; }
.menu form { margin: 0; }
.menu-item {
    display: block; width: 100%; text-align: left; font: inherit; font-size: .9rem;
    padding: .5rem .7rem; border-radius: var(--radius); border: 0; background: transparent;
    color: var(--text); text-decoration: none; cursor: pointer;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-hover); outline: none; }
.menu-sep { border: 0; border-top: 1px solid var(--border); margin: .35rem 0; }
.nav-burger { display: none; width: 40px; height: 40px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: transparent; color: var(--text); cursor: pointer; align-items: center; justify-content: center; }
.nav-burger:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); }
.subnav { background: var(--bg-elev); border-bottom: 1px solid var(--border); position: sticky; top: 56px; z-index: 39; }
.subnav-inner { display: flex; gap: .25rem; height: 44px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.subnav-inner::-webkit-scrollbar { display: none; }
.subnav-inner > a { white-space: nowrap; flex: 0 0 auto; }
.container { padding-top: 2rem; padding-bottom: 3rem; }
/* Footer (Impressum/Datenschutz) immer am Seitenende, auch bei kurzen Seiten (Paket 88) */
body.layout-app, body.layout-admin { display: flex; flex-direction: column; min-height: 100dvh; }
body.layout-app > main.container, body.layout-admin > main.container { flex: 1 0 auto; width: 100%; }
.legal { flex-wrap: wrap; justify-content: center; }
/* Seitenkopf einheitlich: Titel links, Aktionen rechts in einer Zeile; Filter/Tabs darunter in .toolbar */
.page-head { margin-bottom: 1.25rem; }
.page-head h1 { font-size: 1.5rem; line-height: 1.2; margin: 0; }
.page-head h1 + p, .page-head .muted { margin: .25rem 0 0; }
.page-head > p:first-child, .page-head > div > p:first-child { margin: 0 0 .35rem; font-size: .9rem; }
.page-head.row-between { flex-wrap: nowrap; align-items: center; }
.page-head.row-between > :first-child { flex: 1 1 auto; }
.page-head.row-between > .btn, .page-head.row-between > form, .page-head.row-between > .badge { flex: 0 0 auto; }
.page-actions { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; flex: 0 0 auto; flex-wrap: nowrap; }
.page-actions > form { margin: 0; }
.toolbar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: -.25rem 0 1rem; }
.toolbar input[type="search"], .toolbar input[type="text"] { flex: 1 1 220px; max-width: 360px; min-width: 0; }
.toolbar select { width: auto; max-width: 240px; }
.toolbar input[type="date"] { width: auto; }
.toolbar .spacer { flex: 1 1 auto; }
.toolbar :is(input:not([type="checkbox"]):not([type="radio"]), select, .ss-button) { min-height: 36px; height: 36px; padding-top: 0; padding-bottom: 0; font-size: .9rem; }
.toolbar > .btn, .toolbar > form > .btn { min-height: 36px; }
.tabs + .toolbar { margin-top: -.5rem; }
/* „⋯“-Aktionsmenü (data-menu): Menü wird per JS fest positioniert, damit Tabellen/Karten es nicht abschneiden */
.more { position: relative; display: inline-block; }
.more > .btn { width: 32px; height: 32px; min-height: 32px; padding: 0; font-size: 1rem; letter-spacing: .05em; color: var(--text-muted); }
.more > .btn:hover, .more > .btn[aria-expanded="true"] { color: var(--text); }
.more .menu { position: fixed; right: auto; top: auto; min-width: 200px; max-width: calc(100vw - 1rem); }
.color-field { display: flex; flex-direction: column; gap: .5rem; }
.swatches { display: flex; flex-wrap: wrap; gap: .35rem; }
.swatch { position: relative; width: 28px; height: 28px; margin: 0; cursor: pointer; }
.swatch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.swatch span { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%; background: var(--sw, transparent); border: 1px solid rgba(127,127,127,.35); font-size: .9rem; color: var(--text-muted); }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
.swatch input:focus-visible + span { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--primary); }
.swatch-none span { background: repeating-linear-gradient(135deg, transparent 0 5px, rgba(127,127,127,.35) 5px 6px); }
.swatch-custom span { background: var(--sw, conic-gradient(#ef4444, #eab308, #22c55e, #06b6d4, #3b82f6, #a855f7, #ef4444)); color: #fff; text-shadow: 0 0 2px rgba(0,0,0,.6); font-weight: 700; }
.color-custom { display: flex; gap: .5rem; align-items: center; }
.color-custom input[type="color"] { width: 44px; height: 36px; padding: 2px; }
.color-custom input[type="text"] { max-width: 130px; font-family: var(--mono); }
.menu-item.is-danger { color: var(--danger); }
.filter-empty { padding: 1rem 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.stat { display: flex; flex-direction: column; gap: .25rem; }
.stat-value { font-size: 2rem; font-weight: 600; line-height: 1; }
.stat-value.is-money { font-size: 1.6rem; white-space: nowrap; }   /* Umsatz-Kachel: Betrag + € in einer Zeile (Paket 97) */
.stat-label { color: var(--text-muted); font-size: .85rem; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0; font-size: .9rem; }
.dl dt { color: var(--text-muted); }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
ul.plain { margin: 0; padding-left: 1.1rem; }
.layout-app .legal, .layout-admin .legal { justify-content: center; padding-bottom: 1.5rem; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 1rem; align-items: start; }
.settings-grid .setting:first-of-type { padding-top: .5rem; }

/* --- 2FA / Profil ----------------------------------------------------- */
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.qr-wrap { display: flex; justify-content: center; padding: 1rem; background: #fff; border-radius: var(--radius); }
.qr-wrap img, .qr-wrap canvas { display: block; }
.secret-key { font-size: .95rem; letter-spacing: .05em; word-break: break-all; }
.code-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .4rem; }
.code-list code { font-size: 1rem; }
details > summary { list-style: none; cursor: pointer; width: fit-content; }
details > summary::-webkit-details-marker { display: none; }
.text-danger { color: var(--danger); }

/* --- Admin-Tabellen ------------------------------------------------- */
.card-link { text-decoration: none; color: inherit; transition: border-color .15s; }
.card-link:hover { border-color: var(--border-strong); }
.nowrap { white-space: nowrap; }
.lang-table input, .lang-table textarea { font-size: .85rem; padding: .35rem .5rem; }
.lang-table tr.has-override td:first-child { border-left: 3px solid var(--success); }
.audit-details { font-size: .75rem; margin: .4rem 0 0; max-width: 480px; }

/* --- Einstellungen ------------------------------------------------- */
.setting { padding: .9rem 0; border-bottom: 1px solid var(--border); }
.setting:last-of-type { border-bottom: none; }
.setting-head { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .35rem; }
.setting-head label { font-weight: 500; }
.setting-inherited { font-size: .8rem; color: var(--text-muted); }
.setting.is-overridden .setting-head label::after { content: " ●"; color: var(--success); font-size: .7em; }
.setting .hint { font-size: .8rem; color: var(--text-muted); margin: 0 0 .4rem; }
[data-inherit-disabled] { opacity: .45; pointer-events: none; }
.reminders { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.reminder-row { gap: .5rem; }
.tabs { display: flex; gap: .25rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs-sub { margin-top: -.5rem; font-size: .9rem; border-bottom-style: dashed; }   /* Unter-Tabs (Texte, Integrationen) */
.tab { padding: .5rem .8rem; text-decoration: none; color: var(--text-muted); font-size: .9rem; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; flex: 0 0 auto; }
.duty-tabs-bar > .tabs { flex: 1 1 auto; min-width: 0; }   /* Tab-Leiste teilt sich die Zeile mit dem Knopf und scrollt (Paket 89) */
.tabs.is-scrollable { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
.tabs.is-scrollable.is-end { -webkit-mask-image: none; mask-image: none; }
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); border-bottom-color: var(--text); }
.tab-external { margin-left: auto; }   /* Link rechts in der Tab-Leiste (Buchungsseite → öffentliche Seite) */
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem 1rem; margin: 0; min-width: 0; }
/* Pop-up (natives <dialog>): Verfügbarkeit → Ausnahme eintragen/bearbeiten */
dialog.dialog { width: min(680px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); padding: 1.25rem 1.5rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: 0 24px 64px rgba(0,0,0,.28); }
dialog.dialog::backdrop { background: rgba(0,0,0,.45); }
/* Pop-up mit eingebetteter Seite (Paket 50) */
dialog.modal-frame { width: min(1040px, calc(100vw - 2rem)); height: min(90dvh, 960px); max-height: calc(100dvh - 2rem); padding: 0; overflow: hidden; background: var(--bg); }
dialog.modal-frame iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--bg); }
.modal-close { position: absolute; top: .6rem; right: .6rem; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 1rem; line-height: 1; cursor: pointer; }
.modal-close:hover { background: var(--surface-hover); }
.layout-modal { background: var(--bg); }
.modal-page { padding: 1.25rem 1.5rem 1.5rem; padding-right: 3.5rem; }
.layout-modal .no-modal { display: none !important; }
.only-modal { display: none; }
.layout-modal .only-modal { display: inline; }
.layout-modal .grid-2:has(> .no-modal) { grid-template-columns: minmax(0, 1fr); }
.layout-modal .page-head { margin-bottom: 1rem; }
.modal-done { padding: 2rem 0; text-align: center; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.dialog-head h2 { margin: 0; font-size: 1.2rem; }
.dialog-tabs { margin-bottom: 1rem; }
.dialog-tabs .tab { background: none; border-top: 0; border-left: 0; border-right: 0; font: inherit; font-size: .9rem; font-weight: 500; cursor: pointer; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; position: sticky; bottom: -1rem; background: var(--surface); padding: .75rem 0 .25rem; border-top: 1px solid var(--border); }
@media (max-width: 767px) {
    dialog.dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; border: 0; padding: 1rem; }
    dialog.modal-frame { padding: 0; }
    .modal-page { padding: 1rem 1rem 1.5rem; padding-right: 3.25rem; }
}

/* --- Kalender / Tagesansicht -------------------------------------- */
.color-dot, .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; flex: none; }   /* ein Punkt-Stil (Paket 111) */
.color-picker { gap: .4rem; }
.color-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.color-option span { display: inline-block; width: 26px; height: 26px; border-radius: 50%; background: var(--c); border: 2px solid transparent; cursor: pointer; box-shadow: 0 0 0 1px var(--border-strong); }
.color-option input:checked + span { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg); }
.day-grid { position: relative; height: 1440px; --gutter: 56px; }
.day-hour { position: absolute; left: 0; right: 0; height: 60px; border-top: 1px solid var(--border); }
.day-hour span { position: absolute; left: 8px; top: -.55rem; font-size: .7rem; color: var(--text-faint); background: var(--surface); padding: 0 2px; }
.day-now { position: absolute; left: var(--gutter); right: 0; border-top: 2px solid var(--danger); z-index: 3; }
.day-block { position: absolute; border-radius: 6px; background: color-mix(in srgb, var(--c) 22%, var(--surface)); border-left: 3px solid var(--c); padding: 2px 6px; overflow: hidden; font-size: .75rem; line-height: 1.25; z-index: 2; }
.day-block-time { display: block; color: var(--text-muted); }
.day-block-title { display: block; font-weight: 500; }
.day-allday { display: inline-block; margin: .2rem .4rem .2rem 0; padding: .15rem .5rem; border-radius: 999px; background: color-mix(in srgb, var(--c) 22%, var(--surface)); border-left: 3px solid var(--c); font-size: .8rem; }

/* --- Verfügbarkeit --------------------------------------------------- */
.week { display: flex; flex-direction: column; gap: .4rem; }
.weekday { display: grid; grid-template-columns: 110px 1fr auto; gap: .5rem; align-items: start; padding: .5rem 0; border-bottom: 1px solid var(--border); }
.weekday:last-child { border-bottom: none; }
.weekday-name { font-weight: 500; padding-top: .45rem; }
.weekday-windows { display: flex; flex-direction: column; gap: .4rem; }
.window-row { gap: .4rem; }
.window-row input[type="time"] { max-width: 120px; }


/* --- Meeting-Typen --------------------------------------------------- */
.et-card { border-left: 4px solid var(--c); }
.et-card.is-muted { opacity: .6; }
.card-inline { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem; display: flex; flex-direction: column; gap: .4rem; }
[hidden] { display: none !important; }
.card-inline.is-linked { border-color: var(--success); }
.card-inline input[readonly] { opacity: .75; }
.card-inline .row > input[type="text"] { flex: 1 1 180px; min-width: 180px; }
.card-inline textarea, .card-inline .row > textarea { width: 100%; min-height: 4.5rem; font-size: .85rem; }
.day-block.is-booking { border-left-width: 5px; background: color-mix(in srgb, var(--c) 32%, var(--surface)); text-decoration: none; color: inherit; }

/* Buchungen (Cockpit) */
.slot-grid { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
.slot-pick { display: flex; align-items: center; justify-content: center; padding: .5rem; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-weight: 500; }
.slot-pick:hover { border-color: var(--border-strong); }
.slot-pick:has(input:checked) { border-color: var(--primary); background: var(--surface-hover); }
.divider { border: 0; border-top: 1px solid var(--border); margin: .5rem 0; }
.pub-status { font-weight: 600; margin: .2rem 0 .8rem; }
.pub-status-confirmed { color: var(--success); }
.pub-status-cancelled, .pub-status-rescheduled { color: var(--danger); }
.pub-status-pending_guest, .pub-status-pending_host { color: var(--warn); }
.avatar-preview { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: 0 0 72px; display: inline-flex; align-items: center; justify-content: center; }
.avatar-initial { background: var(--surface-hover); border: 1px solid var(--border); font-weight: 600; font-size: 1.4rem; letter-spacing: -.02em; }
.offer-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: .25rem; }
.offer-day { display: flex; align-items: center; justify-content: center; height: 34px; border-radius: 8px; font-size: .9rem; text-decoration: none; color: inherit; border: 1px solid var(--border); }
.offer-day.is-off { color: var(--text-faint); border-color: transparent; }
.offer-day.is-selected { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }

/* --- Kalender: Ansichten -------------------------------------------- */
/* Kalender-Werkzeugzeile (Paket 113): links ‹ Heute › + Datum + Zeitraum, rechts „Freie Zeiten“ + Ansicht; .cal-head gehört dem Raster */
.toolbar.cal-tools { flex-wrap: nowrap; justify-content: space-between; margin: 0 0 .75rem; }
.cal-tools-left, .cal-tools-right { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.cal-tools-left { flex: 1 1 auto; }
.cal-tools-right { flex: 0 1 auto; justify-content: flex-end; }
.cal-tools .seg { flex: 0 0 auto; }
.cal-step span { padding: 0 .75rem; }
.cal-step a:first-child span, .cal-step a:last-child span { font-size: 1.1rem; padding: 0 .7rem; }
.cal-date { position: relative; display: flex; margin: 0; }
.cal-date .icon-btn { width: 36px; height: 36px; min-height: 36px; padding: 0; border: 1px solid var(--border-strong); }
.cal-date input[type="date"] { position: absolute; inset: 0; width: 36px; height: 36px; opacity: 0; pointer-events: none; }
.cal-date.is-plain .icon-btn { display: none; }
.cal-date.is-plain input[type="date"] { position: static; width: auto; opacity: 1; pointer-events: auto; height: 36px; min-height: 36px; padding-top: 0; padding-bottom: 0; }
.cal-range { font-size: .95rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cal-slots > summary { max-width: 260px; }
.cal-slots > summary.is-on { border-color: var(--primary); }
.cal-slots-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cal-slots-panel { width: 320px; gap: .5rem; }
.cal-slots-panel .hint { margin: 0; }
.cal-slots-panel .search-field { max-width: none; flex: 0 0 auto; }
.cal-slots-panel .search-field input { padding-left: 2.1rem; height: 36px; min-height: 36px; }
.cal-slot-list { display: flex; flex-direction: column; max-height: 320px; overflow-y: auto; margin: 0 -.5rem; }
.cal-slot-opt { display: flex; align-items: center; gap: .6rem; min-height: 36px; padding: .35rem .5rem; border-radius: var(--radius); color: var(--text); text-decoration: none; font-size: .9rem; }
.cal-slot-opt:hover { background: var(--surface-hover); }
.cal-slot-opt .nm { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-slot-opt.is-active { font-weight: 600; }
.cal-slot-opt .ic { width: 16px; height: 16px; color: var(--primary); }
@media (max-width: 1023px) {
    .toolbar.cal-tools { flex-wrap: wrap; }
    .cal-tools-left, .cal-tools-right { flex: 1 1 100%; }
    .cal-tools-right { justify-content: flex-start; }
}
.seg-links a { display: block; color: inherit; text-decoration: none; }
.seg-links a + a span { border-left: 1px solid var(--border); }
.seg-links a:hover span { background: var(--surface-hover); }
.seg-links a.is-active span { background: var(--primary); color: var(--primary-text); }
.cal-card { padding: 0; overflow: hidden; --gutter: 56px; --min: 1px; }
.cal-card.is-mini { --min: .6px; --gutter: 48px; border: 0; border-radius: 0; margin: .75rem -1.25rem -1.25rem; border-top: 1px solid var(--border); }
.cal-card.is-mini .cal-scroll { max-height: 420px; }
.cal-card.is-mini .day-block { font-size: .7rem; padding: 1px 4px; }
.cal-card.is-mini .day-block-time { display: none; }
.cal-card.is-mini .cal-dayhead { display: none; }
.cal-card.is-mini .cal-head .cal-gutter { display: none; }
.cal-card.is-mini .cal-head { display: none; }
.cal-x { overflow-x: auto; }
.cal-head, .cal-allday, .cal-grid { display: grid; grid-template-columns: var(--gutter) repeat(var(--n), minmax(0, 1fr)); }
.cal-dayhead { padding: .5rem .3rem; text-align: center; border-left: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cal-dayhead a { display: flex; flex-direction: column; align-items: center; gap: .1rem; text-decoration: none; color: var(--text-muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; }
.cal-dnum { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; font-size: 1.15rem; font-weight: 600; color: var(--text); text-transform: none; letter-spacing: 0; line-height: 1; }
.cal-dayhead.is-today .cal-dnum { width: 30px; border-radius: 50%; background: var(--primary); color: var(--primary-text); }
.cal-gutter { border-bottom: 1px solid var(--border); font-size: .7rem; padding: .3rem .4rem; }
.cal-allday > div { border-left: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: .25rem .3rem; min-height: 30px; }
.cal-allday .day-allday { display: block; margin: .15rem 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .75rem; }
.cal-scroll { max-height: 70vh; overflow-y: auto; }
.cal-grid { height: calc(1440 * var(--min)); position: relative; }
.cal-hours { position: relative; }
.cal-hours span { position: absolute; left: 8px; transform: translateY(-.55rem); font-size: .7rem; color: var(--text-faint); }
.cal-col { position: relative; border-left: 1px solid var(--border); }
.cal-col.is-today { background: color-mix(in srgb, var(--primary) 3%, transparent); }
.cal-col .day-hour { left: 0; right: 0; height: calc(60 * var(--min)); }
.cal-col .day-now { left: 0; }
.day-block.is-slot { z-index: 1; background: transparent; border: 1px dashed var(--c); border-left-width: 3px; color: var(--text-muted); text-decoration: none; padding: 1px 5px; line-height: 1.1; }
.day-block.is-slot:hover { background: color-mix(in srgb, var(--c) 18%, var(--surface)); color: var(--text); z-index: 4; }
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-mhead { padding: .5rem .4rem; text-align: center; font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.cal-mday { min-height: 110px; padding: .35rem; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.cal-mday:nth-child(7n + 1) { border-right: none; }
.cal-mday.is-out { background: color-mix(in srgb, var(--bg) 55%, transparent); }
.cal-mday.is-out .cal-mnum { color: var(--text-faint); }
.cal-mnum { align-self: flex-start; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; text-decoration: none; color: var(--text); font-size: .85rem; font-weight: 500; }
.cal-mnum:hover { background: var(--surface-hover); }
.cal-mday.is-today .cal-mnum { background: var(--primary); color: var(--primary-text); }
.cal-mitem { display: flex; align-items: center; gap: .3rem; font-size: .75rem; text-decoration: none; color: inherit; min-width: 0; padding: .05rem .25rem; border-radius: 4px; }
.cal-mitem .dot { background: var(--c); flex: 0 0 auto; }
.cal-mtext { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-mitem.is-booking { background: color-mix(in srgb, var(--c) 22%, var(--surface)); }
a.cal-mitem:hover { background: var(--surface-hover); }
.cal-mmore, .cal-mslots, .cal-aslots { font-size: .72rem; color: var(--text-muted); text-decoration: none; padding: 0 .25rem; }
.cal-mslots, .cal-aslots { color: var(--info); }
.cal-mmore:hover, .cal-mslots:hover, .cal-aslots:hover { text-decoration: underline; }
.cal-agenda { display: flex; flex-direction: column; gap: 1.25rem; }
.cal-aday h3 { font-size: .95rem; margin-bottom: .4rem; }
.cal-aday h3 a { text-decoration: none; }
.cal-aday h3 a:hover { text-decoration: underline; }
.cal-aitem, .today-item { display: grid; grid-template-columns: 110px 1fr auto; gap: .75rem; align-items: baseline; padding: .4rem .6rem; border-left: 3px solid var(--c); border-radius: 4px; margin-bottom: .25rem; text-decoration: none; color: inherit; font-size: .9rem; }
.cal-aitem.is-booking, .today-item.is-booking { background: color-mix(in srgb, var(--c) 18%, var(--surface)); }
a.cal-aitem:hover, a.today-item:hover { background: var(--surface-hover); }
.cal-atime, .today-time { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.cal-atitle, .today-title { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cal-aslots { display: inline-block; margin-top: .2rem; }
.today-list { list-style: none; margin: .75rem 0 0; padding: 0; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); grid-auto-rows: 1fr; gap: .5rem; }
.today-group { margin: .75rem 0 0; }
.today-group + .today-group { margin-top: .9rem; }
.today-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: .3rem; }
.today-slots { display: flex; flex-wrap: wrap; gap: .35rem; }
.today-slot { display: inline-block; padding: .25rem .55rem; border: 1px dashed var(--c, var(--border-strong)); border-radius: 6px; font-size: .8rem; text-decoration: none; color: var(--text); }
.today-slot:hover { background: var(--surface-hover); }
.quick-tile { display: flex; align-items: center; justify-content: center; gap: .4rem; text-align: center; padding: .6rem .6rem; min-height: 60px; border: 1px solid var(--border-strong); border-radius: var(--radius); text-decoration: none; color: var(--text); font-weight: 500; font-size: .9rem; line-height: 1.25; background: var(--surface); transition: background .15s, border-color .15s; }
.quick-tile:hover { background: var(--surface-hover); border-color: var(--text-muted); }

.mail-logo-preview { display: inline-block; padding: .5rem .75rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .4rem; }
.mail-logo-preview img { display: block; max-height: 40px; max-width: 200px; }
.mail-logo-preview.is-dark { background: #111; border-color: #333; }
.mail-logo-preview.is-icon { display: inline-flex; align-items: center; gap: .6rem; }
.mail-logo-preview.is-icon img { width: 32px; height: 32px; border-radius: 6px; }

video.cover-preview { background: #000; }
.logo-preview { display: block; max-width: 240px; max-height: 90px; object-fit: contain; margin-bottom: .4rem; padding: .5rem; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.sound-preview { display: block; width: 100%; max-width: 320px; height: 36px; margin-bottom: .4rem; }
.cover-preview { display: block; width: 100%; max-width: 320px; aspect-ratio: 16 / 5; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: .4rem; }

.view-toggle { display: inline-flex; }
.view-toggle .btn { border-radius: 0; min-height: 36px; padding: 0 .7rem; font-size: 1rem; line-height: 1; }
.view-toggle .btn:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.view-toggle .btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; margin-left: -1px; }
.view-toggle .btn.is-active { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
tr.is-muted td { opacity: .6; }
.m-only { display: none; }   /* nur in Handy-Karten sichtbar (Paket 93) */
.is-override > label::after, label.is-override::after { content: " ●"; color: var(--success); font-size: .7em; }

/* --- Mobile (bis 767 px) --------------------------------------------- */
@media (max-width: 767px) {
    .topbar-inner, .subnav-inner, .container { padding-left: 1rem; padding-right: 1rem; }
    .subnav { top: 0; position: static; }
    .container { padding-top: 1.25rem; padding-bottom: 2rem; }
    h1, .page-head h1 { font-size: 1.3rem; }
    .page-head.row-between { gap: .5rem; }
    .page-head.row-between > :first-child { flex: 1 1 auto; min-width: 0; }
    .page-actions { gap: .35rem; }
    .page-actions .btn-label { display: none; }   /* Handy: „+ Neu“ → „+“ */
    .toolbar input[type="search"], .toolbar input[type="text"] { max-width: none; }
    .dl { grid-template-columns: 1fr; gap: .1rem .5rem; }
    .dl dd { margin-bottom: .5rem; }
    .table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .card { padding: 1rem; }
    .stack > .btn, .stack > form > .btn, .stack > div > .btn-primary:only-child { width: 100%; }
    .weekday { grid-template-columns: 1fr; }
    .day-grid, .cal-card { --gutter: 44px; }
    .day-hour span, .cal-hours span { left: 4px; }
    .cal-card.is-multi .cal-head, .cal-card.is-multi .cal-allday, .cal-card.is-multi .cal-grid { min-width: calc(var(--gutter) + var(--n) * 120px); }
    .cal-tools-right { flex-wrap: wrap; }
    .cal-tools-right .cal-views { flex: 1 1 100%; min-width: 0; order: -1; }
    .cal-tools-right .cal-views > a { flex: 1 1 auto; }
    .cal-tools-right .cal-views span { justify-content: center; padding: 0 .55rem; }
    .cal-slots { flex: 1 1 auto; }
    .cal-slots > summary { width: 100%; max-width: none; justify-content: center; }
    .row-between.is-head { flex-wrap: nowrap; align-items: flex-start; gap: .5rem; }
    .row-between.is-head > :first-child { flex: 1 1 auto; min-width: 0; }
    /* Tabellen als Karten (Paket 93): .table.is-cards, Zellen-Klassen m-lead (links oben), m-top (rechts oben), m-full (eigene Zeile),
       m-end (nach rechts), m-hide (aus), m-meta (kleine Zeile), m-arrow (Öffnen-Link = ganze Karte antippbar), m-pad (Karte ohne Innenabstand) */
    .table.is-cards { display: block; overflow: visible; }
    .table.is-cards thead { display: none; }
    .table.is-cards tbody, .table.is-cards td { display: block; }
    .table.is-cards tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .6rem; padding: .75rem 0; border-bottom: 1px solid var(--border); position: relative; }
    .table.is-cards.m-pad tr { padding-left: 1rem; padding-right: 1rem; }
    .table.is-cards tr:last-child { border-bottom: 0; }
    .table.is-cards:not(.m-pad) tr:first-child { padding-top: .25rem; }
    .table.is-cards:not(.m-pad) tr:last-child { padding-bottom: 0; }
    .table.is-cards td { padding: 0; border: 0; min-width: 0; white-space: normal; text-align: left !important; }
    .table.is-cards .m-lead { order: -2; flex: 1 1 0; }
    .table.is-cards .m-top { order: -1; margin-left: auto; }
    .table.is-cards .m-full { flex: 1 1 100%; }
    .table.is-cards .m-end { margin-left: auto; }
    .table.is-cards .m-hide, .table.is-cards br.m-br { display: none; }
    .table.is-cards .m-meta { font-size: .85rem; color: var(--text-muted); }
    .table.is-cards .m-meta + .m-meta:not(.m-full)::before { content: "·"; margin-right: .6rem; }
    .table.is-cards .m-only { display: inline-block; }
    .table.is-cards tr:has(> td.m-check) { padding-left: 2.6rem; }
    .table.is-cards td.m-check { position: absolute; left: 1rem; top: .85rem; }
    .table.is-cards .m-actions .row { justify-content: flex-start !important; flex-wrap: wrap; }
    .table.is-cards td.nowrap { white-space: nowrap; }
    .table.is-cards .m-clip { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .table.is-cards .badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
    .table.is-cards tr:has(.m-arrow) { padding-right: 1.75rem; }
    .table.is-cards.m-pad tr:has(.m-arrow) { padding-right: 2.5rem; }
    .table.is-cards td.m-arrow { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
    .table.is-cards.m-pad td.m-arrow { right: 1rem; }
    .table.is-cards .m-arrow .btn { font-size: 0; padding: 0; border: 0; background: none; min-height: 0; box-shadow: none; }
    .table.is-cards .m-arrow .btn::before { content: "›"; font-size: 1.6rem; line-height: 1; color: var(--text-muted); }
    .table.is-cards .m-arrow .btn::after { content: ""; position: absolute; inset: -100vh -100vw; }   /* deckt die Karte ab (tr ist position: relative, clip über overflow) */
    .table.is-cards tr:has(.m-arrow) { overflow: hidden; }
    .table.is-cards tr:has(.m-arrow) :is(a, button, input, select, label):not(.m-arrow .btn) { position: relative; z-index: 1; }
    .cal-card.is-mini { margin: .75rem -1rem -1rem; }
    .cal-mday { min-height: 64px; padding: .2rem; }
    .cal-mtext, .cal-mmore { display: none; }
    .cal-mitem { padding: 0; }
    .cal-aitem, .today-item { grid-template-columns: 1fr; gap: .1rem; }
    .grid-2 { grid-template-columns: minmax(0, 1fr); }   /* Spalte darf schmaler als breite Tabellen werden (die scrollen dann) */
    .settings-grid { grid-template-columns: 1fr; }
    .auth-card { padding: 1.5rem 1.25rem; }
    .row > .field { flex: 1 1 100% !important; }
}

/* Events: Gästeliste, Scanner, Anzeige (P4-E2) */
.stat-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.inline { display: inline; }
.et-dates { font-size: .85rem; }
.et-dates a { display: inline-block; margin-right: .6rem; }
ul.et-dates li { margin: .15rem 0; }
.scan-camera-off { text-align: center; padding: 1.5rem; color: #fff; }

/* Vollbild-Scanner (Einlass-Team): Kopf, Kamera links, Suche + zuletzt eingecheckt rechts; immer hell */
.layout-scanner { background: #f4f5f7; color: #111827; }
.scanner { min-height: 100dvh; display: flex; flex-direction: column; }
.scanner-head { display: flex; align-items: center; gap: .75rem 1rem; padding: .65rem 1rem; background: #fff; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; z-index: 5; }
.scanner-logo { height: 40px; width: auto; max-width: 140px; object-fit: contain; flex: none; }
.scanner-logo-initial { width: 40px; border-radius: 10px; background: var(--c, var(--primary)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem; }
.scanner-title { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; line-height: 1.25; }
.scanner-title strong { font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scanner-title .muted { font-size: .85rem; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scanner-count { display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: .1rem; text-align: right; flex: none; }
.scanner-count strong { font-size: 1.6rem; font-variant-numeric: tabular-nums; line-height: 1; }
.scanner-count > span { color: #6b7280; font-variant-numeric: tabular-nums; }
.scanner-count small { grid-column: 1 / -1; font-size: .72rem; color: #6b7280; text-transform: uppercase; letter-spacing: .04em; }
.scanner-mode { flex: none; }
.scanner-close, .scanner-switch { flex: none; }
.scanner-body { flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1rem; padding: 1rem; align-items: start; max-width: 1280px; width: 100%; margin: 0 auto; }
.scanner-main { display: flex; flex-direction: column; gap: .75rem; min-width: 0; }
.scanner-stage { position: relative; background: #0b0d12; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; max-height: calc(100dvh - 190px); display: flex; align-items: center; justify-content: center; }
.scanner-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner-aim { display: none; position: absolute; width: min(56%, 320px); aspect-ratio: 1; border: 3px solid rgba(255,255,255,.85); border-radius: 18px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.25); pointer-events: none; }
.scanner.has-camera .scanner-aim { display: block; }
.is-mode-out .scanner-aim { border-color: #fbbf24; }
.scanner-stage .scan-camera-off { position: relative; z-index: 1; }
.scanner-stage .scan-camera-off .btn { background: #fff; color: #111827; border-color: #fff; }
.scanner-result { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; padding: 1.25rem; text-align: center; color: #fff; cursor: pointer; }
.scanner-result.is-ok { background: #16a34a; }
.scanner-result.is-fail { background: #dc2626; }
.scanner-result-mark { font-size: clamp(4rem, 12vw, 7rem); line-height: 1; font-weight: 700; }
.scanner-result-name { font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 700; line-height: 1.15; }
.scanner-result-text { font-size: clamp(1rem, 2.4vw, 1.35rem); opacity: .95; }
.scanner-result-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin-top: .5rem; }
.scanner-result-meta span { background: rgba(255,255,255,.2); border-radius: 999px; padding: .2rem .7rem; font-size: .95rem; font-variant-numeric: tabular-nums; }
.scanner-manual { display: flex; gap: .5rem; }
.scanner-manual input { flex: 1 1 auto; min-width: 0; font-size: 1.1rem; letter-spacing: .08em; text-transform: uppercase; background: #fff; }
.scanner-side { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; max-height: calc(100dvh - 100px); overflow: auto; position: sticky; top: 76px; }
.scanner-side-title { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #6b7280; margin: .4rem 0 0; display: block; }
.scanner-search input { width: 100%; margin-top: .35rem; background: #fff; }
.scanner-list { margin: 0; }
.scanner-list > li { padding: .55rem 0; border-bottom: 1px solid #eef0f3; }
.scanner-list > li:last-child { border-bottom: 0; }
.scanner-guest { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.scanner-guest > div { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .4rem; }
.scanner-guest strong { overflow-wrap: anywhere; }
.scanner-guest .faint { flex-basis: 100%; font-size: .82rem; }
.scanner-guest .btn { flex: none; }
[data-search-results]:not([hidden]) { border: 1px solid #e5e7eb; border-radius: 12px; padding: 0 .75rem; }
@media (max-width: 900px) {
    .scanner-body { grid-template-columns: minmax(0, 1fr); padding: .75rem; }
    .scanner-side { position: static; max-height: none; }
    .scanner-stage { aspect-ratio: 1; max-height: 62dvh; }
}
@media (max-width: 600px) {
    .scanner-head { flex-wrap: wrap; padding: .5rem .75rem; gap: .5rem .75rem; }
    .scanner-logo { height: 32px; max-width: 96px; }
    .scanner-title { flex: 1 1 calc(100% - 96px - 132px - 3rem); }
    .scanner-close, .scanner-switch { order: 1; }
    .scanner-switch span { display: none; }
    .scanner-count { order: 2; }
    .scanner-mode { order: 3; flex: 1 1 auto; display: flex; }
    .scanner-mode .btn { flex: 1 1 0; }
    .scanner-close span { display: none; }
}
/* Scanner-App: Terminauswahl (Paket 84) */
.scan-pick { max-width: 720px; width: 100%; margin: 0 auto; padding: 1rem; display: flex; flex-direction: column; gap: .75rem; }
.scan-pick-list { display: flex; flex-direction: column; gap: .6rem; margin: 0; }
.scan-pick-item { display: flex; align-items: center; gap: .9rem; padding: .9rem 1rem; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; color: inherit; text-decoration: none; }
.scan-pick-item:hover { border-color: #c7cbd1; }
.scan-pick-item.is-open { border-color: #16a34a; box-shadow: inset 4px 0 0 #16a34a; }
.scan-pick-item .scanner-logo-initial { height: 40px; }
.scan-pick-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.scan-pick-main strong { overflow-wrap: anywhere; }
.scan-pick-main .muted { color: #6b7280; font-size: .88rem; }
.scan-pick-side { text-align: right; flex: none; font-size: .85rem; color: #6b7280; }
.scan-pick-side .badge { color: #16a34a; border-color: #16a34a; }
.scan-pick-empty { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 1.25rem; color: #6b7280; margin: 0; }
.layout-display { background: var(--bg); }
.display { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.display-card { text-align: center; max-width: 560px; width: 100%; }
.display-title { font-size: 2.2rem; margin: 0 0 .25rem; }
.display-sub { color: var(--text-muted); font-size: 1.1rem; margin: 0 0 1.5rem; }
.display-qr { display: inline-block; background: #fff; padding: 14px; border-radius: 14px; }
.display-qr img, .display-qr canvas { display: block; }
.display-hint { font-size: 1.15rem; margin: 1rem 0 .5rem; }
.display-count { font-size: 1.6rem; font-weight: 600; margin: .5rem 0 1.5rem; }
@media (max-width: 767px) {
    .display-title { font-size: 1.6rem; }
    .display-qr { padding: 10px; }
}

/* Vorlagen-Editor (Split-View) + Buchungsseiten-Vorschau (H2) */
.grid-templates { display: grid; grid-template-columns: 220px minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.tpl-nav { padding: .5rem; display: flex; flex-direction: column; gap: .1rem; position: sticky; top: 72px; max-height: calc(100vh - 90px); overflow-y: auto; }
.tpl-group { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); padding: .6rem .6rem .25rem; }
.tpl-link { display: block; padding: .4rem .6rem; border-radius: 8px; color: var(--text); text-decoration: none; font-size: .9rem; border-left: 3px solid transparent; }
.tpl-link:hover { background: var(--surface-hover); }
.tpl-link.is-active { background: var(--surface-hover); font-weight: 600; }
.tpl-link.has-override { border-left-color: var(--success); }
.tpl-form textarea { font-family: var(--mono); font-size: .85rem; }
.tpl-base summary { cursor: pointer; }
.tpl-base-text { white-space: pre-wrap; font-size: .8rem; color: var(--text-muted); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: .5rem .6rem; margin: .35rem 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.chip { font-family: var(--mono); font-size: .75rem; padding: .2rem .5rem; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text); cursor: pointer; }
.chip:hover { background: var(--surface-hover); }
.tpl-subject { margin: 0 0 .5rem; font-size: .9rem; word-break: break-word; }
.tpl-frame-wrap { background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.tpl-frame { display: block; width: 100%; height: 100%; min-height: 420px; border: 0; background: #fff; }

.tpl-text { white-space: pre-wrap; font-size: .85rem; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: .75rem; margin: 0; }
.page-preview { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: .75rem; display: flex; justify-content: center; }
.page-preview iframe { width: 100%; height: 640px; border: 0; border-radius: 8px; background: #fff; transition: width .2s; }
.page-preview.is-mobile iframe { width: 375px; }
@media (max-width: 1000px) {
    .grid-templates { grid-template-columns: 1fr; }
    .tpl-nav { position: static; max-height: none; flex-direction: row; flex-wrap: wrap; }
    .tpl-group { width: 100%; }
}

/* Kiosk-Modus (Tablet am Einlass) */
/* Kiosk (Design „hell & minimal“): Pfeil zur Kamera, Logo, Eventname, Scan-Hinweis; Ergebnis füllt den Bildschirm */
.kiosk { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9rem; padding: 1.5rem; text-align: center; background: #fff; color: #111827; }
.kiosk-arrow { position: fixed; top: .5rem; left: 50%; transform: translateX(-50%); font-size: 3.5rem; line-height: 1; color: var(--c, var(--primary)); animation: kiosk-bounce 1.6s ease-in-out infinite; }
@keyframes kiosk-bounce { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -12px); } }
.kiosk-logo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; }
.kiosk-logo-img { width: auto; height: auto; max-width: min(320px, 70vw); max-height: 120px; border-radius: 0; object-fit: contain; }
.kiosk-logo-initial { background: var(--c, var(--primary)); color: #fff; font-size: 2.5rem; font-weight: 600; }
.kiosk-title { font-size: clamp(2rem, 5vw, 3.25rem); margin: .5rem 0 0; letter-spacing: -.01em; }
.kiosk-date { margin: 0; font-size: 1.15rem; color: #6b7280; }
.kiosk-scan { margin: 2.5rem 0 0; font-size: clamp(1.25rem, 3vw, 1.75rem); font-weight: 600; color: var(--c, var(--primary)); }
.kiosk-scan span { color: #9ca3af; font-weight: 500; }
.kiosk-video { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.kiosk-off { color: #111827; margin-top: 1rem; }
.kiosk-result { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 2rem; text-align: center; color: #fff; }
.kiosk-result.is-ok { background: #16a34a; }
.kiosk-result.is-fail { background: #dc2626; }
.kiosk-result-icon { font-size: clamp(8rem, 30vw, 16rem); line-height: 1; font-weight: 700; }
.kiosk-result-name { font-size: clamp(2rem, 6vw, 3.5rem); font-weight: 700; }
.kiosk-result-text { font-size: clamp(1.25rem, 3.5vw, 2rem); opacity: .9; }
@media (prefers-reduced-motion: reduce) { .kiosk-arrow { animation: none; } }

/* Ein Bildschirm: Block füllt die Höhe (JS setzt height), nur Innenbereiche scrollen */
@media (min-width: 768px) {
    .cal-card[data-fill-viewport] { display: flex; flex-direction: column; }
    .cal-card[data-fill-viewport] .cal-x { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
    .cal-card[data-fill-viewport] .cal-scroll { flex: 1 1 auto; min-height: 0; max-height: none; }
}
.grid-templates[data-fill-viewport] { align-items: stretch; }
.grid-templates[data-fill-viewport] > .card { min-height: 0; overflow-y: auto; }
.grid-templates[data-fill-viewport] .tpl-nav { position: static; max-height: none; }
.grid-templates[data-fill-viewport] .tpl-preview { display: flex; flex-direction: column; overflow: hidden; }
.grid-templates[data-fill-viewport] .tpl-frame-wrap { flex: 1 1 auto; min-height: 0; display: flex; }
.grid-templates[data-fill-viewport] .tpl-frame { flex: 1 1 auto; height: auto; min-height: 0; }
.grid-templates[data-fill-viewport] .tpl-text { flex: 1 1 auto; overflow: auto; }
@media (max-width: 999px) { .grid-templates[data-fill-viewport] > .card { overflow: visible; } }
.kiosk-setup { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.kiosk-setup-qr { background: #fff; padding: 8px; border-radius: 8px; line-height: 0; }

/* Durchsuchbare Auswahl (select-search.js) */
.ss { position: relative; width: 100%; max-width: 100%; min-width: 0; }
.row > .ss { width: auto; flex: 1 1 200px; }
.filter-bar > select, .filter-bar > .ss, .filter-bar > input { flex: 1 1 180px; width: auto; max-width: 260px; } /* in Filterleisten: Breite wie das Original-Select (Inline-Stil wird übernommen) */
.ss-button {
    width: 100%; text-align: left; font: inherit; color: var(--text); background: var(--bg-elev);
    border: 1px solid var(--border-strong); border-radius: var(--radius); padding: .55rem 2.2rem .55rem .75rem; cursor: pointer;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 40px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5l5 5 5-5' fill='none' stroke='%239ca3af' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat; background-position: right .8rem center;
}
.ss-button:focus { outline: none; border-color: var(--text-muted); box-shadow: 0 0 0 3px var(--focus); }
.ss-button:disabled { opacity: .5; cursor: not-allowed; }
.ss-panel { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 4px); min-width: 220px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow); padding: .4rem; }
.ss-input { margin-bottom: .35rem; }
.ss-list { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow-y: auto; }
.ss-list li { padding: .45rem .6rem; border-radius: 6px; cursor: pointer; font-size: .92rem; }
.ss-list li.is-active { background: var(--surface-hover); }
.ss-list li.is-selected { font-weight: 600; }
.ss-list li.is-disabled { opacity: .45; cursor: not-allowed; }
.ss-list li.ss-empty { color: var(--text-muted); cursor: default; }
.ac-wrap { position: relative; }
.ac-panel { top: 100%; }
.log-view { margin: 0; padding: 1rem; font: 12px/1.5 var(--mono, monospace); white-space: pre-wrap; word-break: break-word; max-height: 75vh; overflow: auto; }

/* Paket 49: Filterleisten auf dem Handy kompakt (zwei Auswahlen nebeneinander, Suche + Knopf in einer Zeile) */
@media (max-width: 767px) {
    .filter-bar > select, .filter-bar > .ss { flex: 1 1 calc(50% - .25rem); max-width: none; min-width: 0; }
    .filter-bar > input { flex: 1 1 0; max-width: none; min-width: 0; }
}

/* Paket 52: Auswahl der Buchungsseiten-Ansicht (Admin) mit Mini-Vorschau */
.design-pick { border: 0; padding: 0; margin: .5rem 0 0; }
.design-pick legend { font-weight: 600; font-size: .9rem; margin-bottom: .5rem; padding: 0; }
.design-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.design-option { position: relative; display: flex; flex-direction: column; gap: .25rem; padding: .6rem; border: 1px solid var(--border); border-radius: var(--radius-lg); cursor: pointer; margin: 0; }
.design-option input { position: absolute; opacity: 0; }
.design-option:has(input:checked) { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.design-option:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.design-thumb { display: grid; gap: 4px; height: 64px; padding: 6px; border-radius: 8px; background: var(--bg); border: 1px solid var(--border); margin-bottom: .2rem; }
.design-thumb i { display: block; border-radius: 3px; background: var(--border-strong, var(--border)); }
.design-thumb-calcom { grid-template-rows: repeat(4, 1fr); }
.design-thumb-calendly { grid-template-columns: repeat(2, 1fr); }
.design-thumb-calendly i { background: none; border: 1px solid var(--border-strong, var(--border)); position: relative; }
.design-thumb-calendly i::before { content: ''; position: absolute; top: 3px; left: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.design-thumb-classic { grid-template-rows: repeat(4, 1fr); }
.design-thumb-classic i { border-left: 3px solid var(--primary); }

/* Paket 55: Segment-Umschalter (z. B. „Per E-Mail senden | Nur Link erstellen“) */
.seg { display: inline-flex; height: 36px; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; max-width: 100%; }
.seg::-webkit-scrollbar { display: none; }
.seg > label, .seg-links > a { flex: 0 0 auto; }   /* zu schmal → seitlich scrollen statt abschneiden (Paket 89) */
.seg label { margin: 0; cursor: pointer; }
/* Zwei gleich breite Optionen, die immer ganz sichtbar sind (Sendungen: Vorhandenes | Individuelles Meeting, Paket 98) */
@media (max-width: 767px) {
    .seg.seg-fill { display: flex; width: 100%; }
    .seg.seg-fill > a { flex: 1 1 0; min-width: 0; text-align: center; }
    .seg.seg-fill > a span { display: flex; align-items: center; justify-content: center; height: 100%; }
}
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg > label, .seg > a { display: flex; }
.seg span { display: flex; align-items: center; gap: .35rem; height: 100%; padding: 0 .8rem; font-size: .9rem; white-space: nowrap; color: var(--text-muted); }
.seg input:checked + span, .seg-links a.is-active span { color: var(--primary-text); }
.seg label + label span { border-left: 1px solid var(--border); }
.seg label:hover input:not(:checked) + span, .seg-links a:not(.is-active):hover span { color: var(--text); }
.seg input:checked + span { background: var(--primary); color: var(--primary-text); }
.seg input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: -2px; }

/* Reihenfolge der Buchungsseite (Paket 61) */
.order-list { display: flex; flex-direction: column; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.order-row { display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: grab; }
.order-row.is-section { background: var(--surface-hover); border-style: dashed; margin-top: .5rem; }
.order-row.is-dragging { opacity: .5; }
.order-grip { color: var(--text-muted); letter-spacing: -.15em; user-select: none; }
.order-name { flex: 1 1 auto; min-width: 0; }
.order-title { flex: 1 1 auto; min-width: 0; font-weight: 600; }
.order-actions { display: flex; gap: .15rem; flex: 0 0 auto; }

/* Statistik (Paket 62): Balken, Heatmap, Querbalken — nur CSS, Farbe über --info */
.stats-filter { margin-bottom: 1rem; }
.stats-export { margin: 0 0 1rem; align-items: center; }
.stats-kpis { margin-bottom: 1rem; }
.stat-delta { font-size: .78rem; font-weight: 600; white-space: nowrap; color: var(--text-muted); }
.stat-delta.is-good { color: var(--success); }
.stat-delta.is-bad { color: var(--danger); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 180px; padding-top: 1.2rem; }
.bar-col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; }
.bar { position: relative; display: block; height: var(--h); min-height: 2px; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--info) 75%, transparent); }
.bar-n { position: absolute; top: -1.15rem; left: 0; right: 0; text-align: center; font-size: .68rem; color: var(--text-muted); }
.bar-label { display: block; height: 1.2rem; margin-top: .25rem; font-size: .68rem; color: var(--text-muted); text-align: center; white-space: nowrap; overflow: visible; }
.heatmap { border-collapse: separate; border-spacing: 2px; font-size: .72rem; }
.heatmap th { font-weight: 500; color: var(--text-muted); padding: 0 .25rem; text-align: center; }
.heatmap tbody th { text-align: right; }
.heatmap td { width: 1.7rem; height: 1.5rem; text-align: center; border-radius: 4px; color: var(--text); background: color-mix(in srgb, var(--info) calc(var(--i) * 85%), var(--surface-hover)); }
.hbar { display: grid; grid-template-columns: minmax(7rem, 9rem) 1fr 2.5rem; align-items: center; gap: .6rem; font-size: .88rem; }
.hbar-track { height: .7rem; border-radius: 999px; background: var(--surface-hover); overflow: hidden; }
.hbar-fill { display: block; height: 100%; width: var(--w); background: color-mix(in srgb, var(--info) 75%, transparent); border-radius: 999px; }
.hbar-n { text-align: right; color: var(--text-muted); }
.table .num { text-align: right; white-space: nowrap; }
.stats-top li { padding: .2rem 0; }
@media (max-width: 767px) {
    .bars { height: 140px; gap: 2px; }
    .bar-n { display: none; }
    .bar-label.is-minor { visibility: hidden; }
    .stats-filter .seg { flex-wrap: wrap; }
    .hbar { grid-template-columns: 6.5rem 1fr 2rem; }
}

/* Paket 64: Duties + Kontaktgruppen */
.section-title { margin: 1.5rem 0 .5rem; font-size: 1rem; }
.duty-meta { display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-size: .88rem; margin: -.5rem 0 1rem; }
.duty-desc { margin-bottom: 1rem; }
.duty-window { scroll-margin-top: 5rem; }
.duty-window.is-open { border-left: 3px solid var(--danger); }
.duty-window.is-muted { opacity: .6; }
.duty-people { display: flex; flex-direction: column; gap: .6rem; margin-top: .4rem; }
.duty-group-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: .2rem; }
.duty-person { padding: .3rem 0; border-top: 1px solid var(--border); gap: .5rem; flex-wrap: nowrap; }
.duty-person > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.duty-other { font-size: .82rem; margin: 0; }
.dw-list { display: flex; flex-direction: column; gap: .5rem; }
.dw-row { display: grid; grid-template-columns: minmax(8.5rem, 1.2fr) minmax(5.5rem, .8fr) minmax(5.5rem, .8fr) minmax(4.5rem, .6fr) minmax(8rem, 1.6fr) auto; gap: .5rem; align-items: end; }
.dw-row .field { margin: 0; }
.dw-row .field label { font-size: .78rem; }
.dw-row + .dw-row .field label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.dw-tools { gap: .75rem 1rem; align-items: center; }
.dw-repeat { gap: .4rem; align-items: center; flex-wrap: wrap; }
.dw-repeat select, .dw-repeat input { width: auto; margin: 0; }
.dw-repeat select { max-width: 11rem; }
.col-check { width: 2rem; }
.chip-checks { gap: .35rem 1rem; }
.check-list { display: flex; flex-direction: column; gap: .2rem; max-height: 16rem; overflow: auto; padding: .25rem .5rem; border: 1px solid var(--border); border-radius: var(--radius); }
@media (max-width: 767px) {
    .dw-row { grid-template-columns: 1fr 1fr 1fr; padding: .6rem 0; border-top: 1px solid var(--border); }
    .dw-row:first-child { border-top: 0; }
    .dw-row .dw-date { grid-column: 1 / -1; }
    .dw-row .dw-label { grid-column: 1 / 3; }
    .dw-row + .dw-row .field label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}
.toolbar > .ss { width: auto; flex: 0 1 240px; max-width: 240px; }   /* Such-Auswahl in Filterzeilen (Kontakte: Gruppe) */
@media (max-width: 767px) { .toolbar > .ss, .toolbar.filter-bar > .ss { flex: 1 1 calc(50% - .25rem); max-width: none; min-width: 0; } }   /* Handy: wie die übrigen Auswahlen (Paket 93) */
.day-block.is-duty, .cal-mitem.is-duty, .cal-aitem.is-duty { border-left-style: dashed; }   /* Duty-Fenster im Kalender (Paket 65) */

/* Paket 67: Feedbackmodus */
.feedback-fab { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60; width: 52px; height: 52px; border-radius: 50%; border: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--text); color: var(--bg); box-shadow: 0 8px 24px rgba(0,0,0,.25); cursor: pointer; transition: transform .15s; }
.feedback-fab:hover { transform: scale(1.06); }
.feedback-fab:active { transform: scale(.96); }
.feedback-toast { position: fixed; right: 1.25rem; bottom: 5.25rem; z-index: 61; padding: .55rem .9rem; border-radius: 10px; background: var(--text); color: var(--bg); font-size: .9rem; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.feedback-dialog { width: min(560px, calc(100vw - 2rem)); }
.feedback-item.is-done { opacity: .6; }
.feedback-title { display: block; }
.feedback-body { margin: .35rem 0 0; white-space: normal; overflow-wrap: anywhere; }
.feedback-meta { margin: .4rem 0 0; font-size: .8rem; }
.feedback-url { overflow-wrap: anywhere; }
.feedback-check { flex: 0 0 auto; }
.feedback-tick { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--border-strong); background: transparent; color: var(--success); font-weight: 700; line-height: 1; cursor: pointer; padding: 0; margin-top: .1rem; }
.feedback-tick.is-done { border-color: var(--success); background: var(--success-bg); }
@media (max-width: 767px) { .feedback-fab { right: 1rem; bottom: 1rem; } .feedback-toast { right: 1rem; bottom: 4.75rem; } }
@media print { .feedback-fab { display: none; } }
body:has(.feedback-fab) main.container { padding-bottom: 5.5rem; }   /* letzter Listeneintrag nicht unter dem Plus-Knopf */

/* Paket 68.1: Kontext im Nutzermenü rechts */
.user-btn .user-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.ctx-initial { background: var(--surface-hover); border: 1px solid var(--border); font-weight: 600; font-size: .68rem; letter-spacing: -.02em; }
.menu-label { padding: .35rem .7rem .2rem; font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
#usermenu { min-width: 250px; }
#usermenu .menu-item.is-current { font-weight: 600; background: var(--surface-hover); }
#usermenu { max-height: calc(100dvh - 80px); overflow-y: auto; }
.table-wrap { overflow-x: auto; max-width: 100%; }   /* breite Tabellen scrollen innerhalb der Karte statt die Seite zu verbreitern */
/* Round-Robin-Hosts im Meeting-Formular: Person | Plan | Priorität (Paket 75) */
.host-grid { display: flex; flex-direction: column; gap: .35rem; }
.host-grid-head, .host-grid-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(140px, 220px) 84px; gap: .5rem; align-items: center; }
.host-grid-head { font-size: .78rem; color: var(--text-muted); }
.host-grid-row .checkbox { margin: 0; min-width: 0; }
.host-grid-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.host-grid-name .faint { font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.host-grid-row select, .host-grid-row input[type=number] { width: 100%; }
@media (max-width: 767px) {
    .host-grid-head { display: none; }
    .host-grid-row { grid-template-columns: minmax(0, 1fr) 76px; padding-bottom: .4rem; border-bottom: 1px solid var(--border); }
    .host-grid-row .checkbox { grid-column: 1 / -1; }
}
/* Zugangsliste als Chips (Paket 76) */
.access-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.access-chips:empty { display: none; }
.access-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .25rem .2rem .6rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-hover); font-size: .85rem; max-width: 100%; overflow-wrap: anywhere; }
.access-chip.access-group { border-style: dashed; }
.access-x { border: 0; background: transparent; color: var(--text-muted); cursor: pointer; padding: 0 .3rem; font-size: .8rem; line-height: 1; }
.access-x:hover { color: var(--text); }
.access-add { position: relative; display: flex; gap: .5rem; }
.access-add input { flex: 1; min-width: 0; }
.access-suggest { position: absolute; top: 100%; left: 0; right: 0; z-index: 30; margin: .25rem 0 0; padding: .25rem; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); max-height: 240px; overflow: auto; }
.access-suggest li { padding: .4rem .55rem; border-radius: 6px; cursor: pointer; font-size: .9rem; }
.access-suggest li:hover { background: var(--surface-hover); }


/* Archiv (Paket 77): Zeilen umbrechen auf dem Handy, Knöpfe rutschen unter den Namen */
.archive-list { padding: 0; }
.archive-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 16px; }
.archive-row + .archive-row { border-top: 1px solid var(--border); }
.archive-name { min-width: 0; flex: 1 1 220px; overflow-wrap: anywhere; }
.archive-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* E-Mail-Log (Paket 78) */
.mail-meta { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; }
.mail-meta dt { color: var(--text-muted); }
.mail-meta dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.mail-error { color: var(--danger); white-space: pre-wrap; font-size: .875rem; }
.mail-frame { margin-bottom: 16px; }
.mail-frame .tpl-frame { min-height: 640px; }
.mail-raw { margin-top: 12px; }
.mail-raw summary { cursor: pointer; font-weight: 600; }
.mail-raw pre { margin: 12px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .8125rem; max-height: 480px; overflow: auto; }
@media (max-width: 767px) {
    .mail-meta { grid-template-columns: 1fr; gap: 2px; }
    .mail-meta dd { margin-bottom: 8px; }
    .mail-frame .tpl-frame { min-height: 520px; }
}

/* Dateiprüfung Admin → Übersicht (Bugfix 78.1) */
.files-problems { margin: .5rem 0 0; padding-left: 1.2rem; max-height: 260px; overflow: auto; font-size: .875rem; }
.files-problems code { overflow-wrap: anywhere; }

/* Admin-Statistik (Paket 81): Mehrfachauswahl, Plattform-Karte */
.field > .label { display: block; font-size: .875rem; font-weight: 500; }
.multi-pick { position: relative; }
.multi-pick > summary { list-style: none; cursor: pointer; display: block; width: 100%; font: inherit; font-weight: 400; color: var(--text); background: var(--bg-elev) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5l5 5 5-5' fill='none' stroke='%239ca3af' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat right .8rem center; border: 1px solid var(--border-strong); border-radius: var(--radius); padding: .55rem 2.2rem .55rem .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.multi-pick > summary::-webkit-details-marker { display: none; }
.multi-pick[open] > summary { border-color: var(--text-muted); box-shadow: 0 0 0 3px var(--focus); }
.multi-pick-menu { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; min-width: 260px; max-width: 360px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: .5rem; }
.multi-pick-list { max-height: 260px; overflow: auto; display: flex; flex-direction: column; gap: .15rem; margin-top: .4rem; }
.multi-pick-list .checkbox { padding: .2rem .25rem; font-size: .9rem; }
.platform-stats .stats-kpis { margin: 0; }
.bars-sm { height: 110px; }

/* Admin-Übersicht (Paket 83): Badges auf dem Handy unter den Titel statt darüber */
@media (max-width: 767px) {
    .page-head.dash-head { flex-wrap: wrap; }
    .page-head.dash-head > h1 { flex: 1 1 100%; }
    .page-head.dash-head .page-actions { flex: 1 1 100%; justify-content: flex-start; flex-wrap: wrap; }
}

/* Duty-Pop-up „+ Termin hinzufügen“ (Paket 83) */
.duty-windows-form .dw-tools { padding-top: .25rem; border-top: 1px solid var(--border); }
.duty-windows-foot { gap: .75rem; align-items: center; flex-wrap: wrap; }

/* App installieren (Paket 84) */
dialog.install-dialog { width: min(460px, calc(100vw - 2rem)); }
.install-app { display: flex; align-items: center; gap: .8rem; }
.install-app img { border-radius: 12px; border: 1px solid var(--border); flex: none; }
.install-app > div { display: flex; flex-direction: column; min-width: 0; }

/* Kiosk-App: Kopplung, Bezeichnung, verstecktes Abmelden (Paket 87) */
.kiosk-pair-cam { position: relative; width: min(420px, 82vw); aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: #0b0d12; }
.kiosk-pair-cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.kiosk-pair-aim { position: absolute; inset: 18%; border: 3px solid rgba(255,255,255,.85); border-radius: 16px; pointer-events: none; }
.kiosk-pair .kiosk-scan { margin-top: .5rem; }
.kiosk-pair-hint { max-width: 32rem; margin: 0; }
.kiosk-label-form { width: min(420px, 90vw); }
.kiosk-label-form input { font-size: 1.2rem; text-align: center; }
.kiosk-device-label { position: fixed; bottom: .6rem; left: 0; right: 0; margin: 0; text-align: center; font-size: .85rem; color: #9ca3af; }
.kiosk-corner { position: fixed; top: 0; left: 0; width: 64px; height: 64px; z-index: 150; }
dialog.kiosk-logout { width: min(420px, calc(100vw - 2rem)); background: #fff; color: #111827; }
.kiosk-steps { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .25rem; }
.kiosk-devices-card { gap: .75rem; }
/* Admin → Feedback: Modus-Schalter kompakt unter dem Titel (Paket 88) */
.feedback-mode { margin: .4rem 0 0; }
.feedback-mode .checkbox { font-size: .875rem; }

/* Admin → Übersicht: Systemstatus (Paket 94) */
.sys-card { margin-bottom: 1rem; }
.sys-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.sys-row { display: grid; grid-template-columns: .7rem 9rem minmax(0, 1fr); gap: .6rem; align-items: baseline; font-size: .9rem; }
.sys-dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--success); align-self: center; }
.sys-dot.is-warn { background: var(--warn); }
.sys-dot.is-error { background: var(--danger); }
.sys-area { color: var(--text-muted); }
.sys-text { overflow-wrap: anywhere; }
@media (max-width: 767px) { .sys-row { grid-template-columns: .7rem minmax(0, 1fr); } .sys-text { grid-column: 2; } }

/* --- Navigation „Variante A“ (Paket 101): Dropdowns, „+ Neu“, Profilmenü, Handy-Drawer — Farben aus den bestehenden Variablen --- */
.nav { align-items: center; gap: .1rem; min-width: 0; }
.nav-group { position: relative; }
.nav-group > .nav-link { display: inline-flex; align-items: center; gap: .45rem; font: inherit; font-size: .9rem; font-weight: 500; border: 0; background: transparent; cursor: pointer; white-space: nowrap; }
.nav-link { white-space: nowrap; }
.nav-group > .nav-link .chev, .qn-btn .chev { width: 6px; height: 6px; border-color: currentColor; opacity: .7; }
.nav-group > .nav-link[aria-expanded="true"] { background: var(--surface-hover); color: var(--text); }
.nav-group > .nav-link:focus-visible, .qn-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); }
.nav-menu { left: 0; right: auto; min-width: 240px; }
.menu { box-shadow: 0 16px 40px rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .08); }
.menu .menu-item { display: flex; align-items: center; gap: .65rem; }
.menu .menu-item > .ic { width: 18px; height: 18px; flex: none; color: var(--text-muted); }
.menu .menu-item.is-current { font-weight: 600; background: var(--surface-hover); }
.qn-text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; line-height: 1.25; }
.qn-text small { color: var(--text-faint); font-size: .76rem; font-weight: 400; }
.menu kbd, .qn-foot kbd { font: inherit; font-size: .72rem; line-height: 1.5; padding: 0 .4rem; border: 1px solid var(--border); border-radius: 5px; background: var(--bg); color: var(--text-muted); }
.menu-item > kbd { margin-left: auto; }
.menu-check { margin-left: auto; display: inline-flex; }
.menu-check .ic { width: 16px; height: 16px; }
.menu-note { display: block; padding: .4rem .7rem; color: var(--text-faint); font-size: .85rem; }
.menu-label { text-transform: none; letter-spacing: 0; font-weight: 600; font-size: .74rem; color: var(--text-faint); padding: .5rem .7rem .25rem; }
.quick-new { position: relative; margin-left: auto; }
.quick-new + .topbar-user { margin-left: 0; }
.qn-btn { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .75rem; white-space: nowrap; }
.qn-btn .ic { width: 16px; height: 16px; }
.qn-menu { width: 320px; }
.qn-sub > summary { list-style: none; }
.qn-sub > summary::-webkit-details-marker, .drawer-ctx > summary::-webkit-details-marker, .drawer-group > summary::-webkit-details-marker { display: none; }
.qn-sub[open] > summary { background: var(--surface-hover); }
.qn-arrow { margin-left: auto; display: inline-flex; color: var(--text-muted); }
.qn-arrow .ic { width: 14px; height: 14px; }
.qn-flyout { position: absolute; right: calc(100% + .6rem); top: -.35rem; width: 270px; z-index: 51; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 16px 40px rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .08); padding: .35rem; max-height: 70vh; overflow-y: auto; }
.qn-type { justify-content: space-between; }
.qn-type > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.qn-type .faint { flex: none; font-size: .8rem; }
.qn-foot { border-top: 1px solid var(--border); margin: .35rem -.35rem -.35rem; padding: .55rem 1rem; font-size: .76rem; color: var(--text-faint); }
.user-menu { width: 300px; }
.menu-head { flex-direction: row; align-items: center; gap: .65rem; }
.menu-head > span { display: flex; flex-direction: column; min-width: 0; }
.menu-head .avatar-sm { width: 34px; height: 34px; flex: none; }
.menu-theme { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .35rem .7rem; font-size: .85rem; color: var(--text-muted); }
.seg-mini { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.seg-mini button { font: inherit; font-size: .78rem; padding: .25rem .6rem; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; }
.seg-mini button + button { border-left: 1px solid var(--border); }
.seg-mini button:hover { background: var(--surface-hover); color: var(--text); }
.seg-mini button.is-on { background: var(--primary); color: var(--primary-text); }
.topbar-title { display: none; }
.tab .tab-count { font-weight: 500; }
.when-seg { margin: 0 0 .75rem; }
/* Auswahlliste (Kiosk koppeln) */
.pick-row { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); min-height: 56px; }
.pick-row:last-child { border-bottom: 0; }
.pick-row:hover { background: var(--surface-hover); }
.pick-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.pick-main { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.pick-arrow { display: inline-flex; color: var(--text-muted); }
/* Handy-Drawer (von links) */
.drawer { position: fixed; inset: 0; z-index: 70; }
.drawer[hidden] { display: none; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .4); }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(336px, 88vw); display: flex; flex-direction: column; gap: .5rem; overflow-y: auto; overscroll-behavior: contain;
    padding: .6rem .75rem calc(.75rem + env(safe-area-inset-bottom)); background: var(--bg-elev); border-left: 1px solid var(--border); box-shadow: 0 0 40px rgba(0, 0, 0, .25); animation: drawer-in .18s ease-out; }
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .drawer-panel { animation: none; } }
body.drawer-open { overflow: hidden; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 44px; }
.drawer-head .brand { text-decoration: none; min-width: 0; overflow: hidden; }
.drawer-close { width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: var(--radius); background: transparent; color: var(--text); cursor: pointer; }
.drawer-close .ic { width: 20px; height: 20px; }
.drawer-close:hover { background: var(--surface-hover); }
.drawer-ctx { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.drawer-ctx > summary { display: flex; align-items: center; gap: .65rem; min-height: 48px; padding: .45rem .7rem; list-style: none; cursor: pointer; }
.drawer-ctx > summary > .ic { color: var(--text-muted); }
.drawer-ctx-text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; line-height: 1.2; }
.drawer-ctx-text small { color: var(--text-faint); font-size: .74rem; }
.drawer-ctx-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-ctx-list { margin: 0; padding: 0 .35rem .35rem; border-top: 1px solid var(--border); }
.drawer-label { margin: .4rem .25rem 0; font-size: .74rem; font-weight: 600; color: var(--text-faint); }
.drawer-nav { display: flex; flex-direction: column; gap: .1rem; margin-top: .4rem; }
.drawer-link { display: flex; align-items: center; gap: .75rem; width: 100%; min-height: 44px; padding: .5rem .65rem; border: 0; border-radius: var(--radius); background: transparent; color: var(--text); font: inherit; font-size: .95rem; text-align: left; text-decoration: none; cursor: pointer; }
.drawer-link .ic { width: 18px; height: 18px; flex: none; color: var(--text-muted); }
.drawer-link:hover, .drawer-link.is-active, .drawer-link.is-current { background: var(--surface-hover); }
.drawer-link.is-active, .drawer-link.is-current { font-weight: 600; }
.drawer-group > summary { list-style: none; }
.drawer-arrow { margin-left: auto; display: inline-flex; transition: transform .15s; }
.drawer-arrow .ic { width: 14px; height: 14px; }
.drawer-group[open] .drawer-arrow { transform: rotate(90deg); }
.drawer-sub { display: flex; flex-direction: column; padding: .1rem 0 .35rem 2.45rem; }
.drawer-sublink { display: flex; align-items: center; min-height: 42px; padding: .4rem .6rem; border-radius: var(--radius); color: var(--text-muted); text-decoration: none; font-size: .92rem; }
.drawer-sublink:hover { background: var(--surface-hover); color: var(--text); }
.drawer-sublink.is-current { color: var(--text); font-weight: 600; background: var(--surface-hover); }
/* Mittlere Breite: „+ Neu“ ohne Text, damit die Hauptpunkte passen */
@media (min-width: 768px) and (max-width: 1150px) {
    .qn-btn .qn-label, .qn-btn .chev { display: none; }
    .qn-btn { padding: .4rem .55rem; }
}
@media (max-width: 767px) {
    .topbar-inner { flex-wrap: nowrap; height: 56px; gap: .5rem; padding-left: 1rem; padding-right: .5rem; }
    .topbar .nav { display: none; }
    .nav-burger { display: inline-flex; flex: none; border: 0; width: 44px; height: 44px; order: 5; margin-right: -.25rem; }   /* ☰ ganz rechts (Paket 103) */
    .nav-burger .ic { width: 22px; height: 22px; }
    .topbar-inner > .brand { display: none; }
    .topbar-title { display: block; flex: 1 1 auto; min-width: 0; font-weight: 600; font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .topbar.is-admin .topbar-inner > .brand { display: flex; flex: 1 1 auto; min-width: 0; overflow: hidden; }
    .topbar.is-admin .nav { display: flex; flex: none; }
    .quick-new { margin-left: 0; flex: none; }
    .qn-btn { width: 40px; height: 40px; padding: 0; border-radius: 50%; justify-content: center; }
    .qn-btn .qn-label, .qn-btn .chev { display: none; }
    .qn-btn .ic { width: 20px; height: 20px; }
    .qn-menu { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 85dvh; overflow-y: auto; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        padding: .5rem .5rem calc(.75rem + env(safe-area-inset-bottom)); box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .4); }
    .qn-flyout { position: static; width: auto; max-height: none; border: 0; box-shadow: none; padding: 0 0 .25rem 2.2rem; }
    .qn-foot { display: none; }
    .qn-menu .menu-item, .user-menu .menu-item { min-height: 44px; }
    .menu kbd { display: none; }
    .topbar:not(.is-admin) .topbar-user { display: none; }   /* Handy: ein Menü — Profil/Konto stehen im ☰-Menü (Paket 103) */
    .topbar-user { flex: none; margin-left: 0; }
    .topbar-user .user-btn { padding: .2rem; border: 0; }
    .topbar-user .user-name, .topbar-user .user-btn > .chev { display: none; }
    .topbar-user .avatar-sm { width: 34px; height: 34px; }
    .topbar-user .menu { position: fixed; left: .75rem; right: .75rem; top: 62px; width: auto; min-width: 0; max-height: calc(100dvh - 76px); overflow-y: auto; }
    .when-seg { width: 100%; }
}
/* Gästeliste: Statusfilter mit Zahlen (Paket 102) */
.guest-status { margin: 0 0 .75rem; }
.seg-n { font-weight: 500; color: var(--text-faint); margin-left: .2rem; }
.seg-links a.is-active .seg-n { color: inherit; opacity: .75; }
/* Schnellzugriff-Kacheln (Paket 103): Handy-Menü (2 Spalten) und Übersicht (Raster) */
.qtiles { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.qtiles.is-wide { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.qtile { display: flex; flex-direction: column; justify-content: space-between; gap: .6rem; min-height: 78px; padding: .75rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); text-decoration: none; font-size: .86rem; font-weight: 600; line-height: 1.2; transition: background .15s, border-color .15s; }
.qtile .ic { width: 20px; height: 20px; }
.qtile.is-accent { background: var(--surface-hover); }
.qtile:hover { border-color: var(--text-muted); }
.qtile:active { transform: scale(.98); }
.qtile-n { font-weight: 500; color: var(--text-faint); }
/* Handy-Menü: Konto-Bereich (Paket 103) */
.drawer-me { display: flex; align-items: center; gap: .65rem; min-height: 48px; padding: .45rem .7rem; }
.drawer-me .avatar-sm, .drawer-ctx > summary .avatar-sm { width: 34px; height: 34px; flex: none; }
.drawer-account { display: flex; flex-direction: column; gap: .1rem; padding-top: .1rem; }
.drawer-account form { margin: 0; }
.drawer-theme { padding: .4rem .65rem; min-height: 44px; }
.drawer-nav + .drawer-label { margin-top: .5rem; padding-top: .6rem; border-top: 1px solid var(--border); }
.btn-danger-text { color: var(--danger); }   /* z. B. „Sperren“ in Listen (Paket 106) */

/* Ticket-QR im Pop-up (Paket 107) — weißer Grund auch im Dunkelmodus, damit Scanner den Code lesen */
.ticket-qr { display: flex; flex-direction: column; align-items: center; gap: .75rem; text-align: center; }
.ticket-qr-img { width: min(280px, 100%); height: auto; background: #fff; padding: .6rem; border-radius: 10px; border: 1px solid var(--border); image-rendering: pixelated; }
.ticket-qr-meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .4rem .6rem; }

/* --- Paket 111: Listenzeilen, leere Listen, Menü-Zähler ------------------- */
/* Listenzeile: ganze Zeile klickbar (a.row-link deckt sie ab), Knöpfe/Menüs liegen darüber; ⋯ immer letzte Spalte rechts */
.lrow-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.lrow-head, .lrow { display: grid; align-items: center; gap: .9rem; padding: 0 .5rem 0 1rem; grid-template-columns: var(--cols, minmax(0, 1fr) auto 40px); }
.lrow-head { min-height: 40px; font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint); border-bottom: 1px solid var(--border); }
.lrow { position: relative; min-height: 60px; padding-top: .5rem; padding-bottom: .5rem; border-top: 1px solid var(--border); }
.lrow-head + .lrow, .lrow:first-child { border-top: 0; }
.lrow:hover { background: var(--surface-hover); }
.lrow.is-muted > :not(.row-link):not(.row-more) { opacity: .6; }
.row-link { position: absolute; inset: 0; z-index: 1; }
.row-link:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.lrow :is(a:not(.row-link), button, form, input, select, label, .more, details) { position: relative; z-index: 2; }
.lrow .row-more { justify-self: end; display: flex; align-items: center; gap: .25rem; }
.lrow-title { display: flex; align-items: center; gap: .55rem; font-weight: 600; min-width: 0; }
.lrow-title > .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow-sub { margin-top: .1rem; font-size: .85rem; color: var(--text-muted); }
.lrow-title:has(> .dot) + .lrow-sub { padding-left: calc(10px + .55rem); }   /* bündig unter dem Namen, wenn ein Punkt davor steht */
.lrow-cell { font-size: .875rem; color: var(--text-muted); }
@media (max-width: 767px) {
    .lrow-head { display: none; }
    .lrow { grid-template-columns: minmax(0, 1fr) auto; padding-right: .35rem; }
    .lrow > .lrow-cell.m-hide { display: none; }
}
/* Leere Liste: kurzer Hinweis + derselbe Anlegen-Knopf wie im Seitenkopf */
.empty { display: flex; flex-direction: column; align-items: center; gap: .6rem; padding: 2rem 1rem; text-align: center; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); }
.empty strong { font-size: 1rem; }
.empty p { margin: 0; max-width: 48ch; font-size: .875rem; color: var(--text-muted); }
.card > .empty { border: 0; padding: 1.25rem .5rem; background: transparent; }
/* Zähler im Hauptmenü (offene Freigaben, früher in den Termine-Tabs) */
.nav-count { margin-left: auto; height: 18px; line-height: 18px; min-width: 18px; padding: 0 .35rem; text-align: center; font-size: .7rem; font-weight: 600; }
.nav-group > .nav-link { position: relative; }
.nav-dot { position: absolute; top: 5px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px var(--bg-elev); }

/* --- Paket 112a: Werkzeugzeile, Filter-Klappmenü, Chips, Buchungszeilen, Sammelleiste ----- */
.toolbar.list-tools { flex-wrap: nowrap; margin: 0 0 .75rem; }
.toolbar.list-tools .when-seg { margin: 0; flex: 0 0 auto; }
.search-field { position: relative; display: flex; align-items: center; flex: 1 1 240px; max-width: 420px; min-width: 0; margin: 0; }
.search-field .ic { position: absolute; left: .7rem; width: 16px; height: 16px; color: var(--text-faint); pointer-events: none; }
.toolbar .search-field input[type="search"] { padding-left: 2.1rem; max-width: none; flex: 1 1 auto; width: 100%; }
.filter-pop { position: relative; flex: 0 0 auto; }
.filter-pop > summary { list-style: none; gap: .4rem; }
.filter-pop > summary::-webkit-details-marker { display: none; }
.filter-pop > summary .ic { width: 16px; height: 16px; }
.filter-pop[open] > summary { background: var(--surface-hover); }
.fp-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 .3rem; border-radius: 9px; background: var(--primary); color: var(--primary-text); font-size: .7rem; font-weight: 700; }
.filter-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 300px; display: flex; flex-direction: column; gap: .75rem; padding: 1rem; background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: 0 12px 32px rgba(0, 0, 0, .18); }
.filter-panel .field label { font-size: .8rem; }
.filter-panel select, .filter-panel .ss-button { height: 36px; min-height: 36px; padding-top: 0; padding-bottom: 0; font-size: .9rem; }
.filter-panel-foot { padding-top: .25rem; border-top: 1px solid var(--border); }
.fchips { display: flex; flex-wrap: wrap; gap: .4rem; margin: -.25rem 0 .75rem; }
.fchip { display: inline-flex; align-items: center; gap: .35rem; height: 28px; padding: 0 .4rem 0 .7rem; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text); font-size: .8rem; text-decoration: none; }
.fchip span { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; color: var(--text-muted); }
.fchip:hover span { background: var(--surface-hover); color: var(--text); }
/* Tagesgruppen in Listen */
.lrow-day { padding: .9rem 1rem .4rem; font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint); border-top: 1px solid var(--border); background: var(--bg-elev); }
.lrow-head + .lrow-day { border-top: 0; }
.lrow-day + .lrow { border-top: 0; }
/* Buchungszeile: Zeit · Meeting · Gast · Status · ⋯ */
.brows .lrow, .brows .lrow-head { --cols: 92px minmax(0, 1.3fr) minmax(0, 1fr) minmax(130px, auto) 40px; }
.b-time strong { display: block; font-variant-numeric: tabular-nums; }
.b-time span, .b-mail { display: block; font-size: .8rem; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-guest { min-width: 0; }
.b-guest-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-status { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.b-by { font-size: .8rem; }
@media (max-width: 1023px) {
    .toolbar.list-tools { flex-wrap: wrap; }
    .toolbar.list-tools .when-seg { flex: 1 1 100%; }
}
@media (max-width: 767px) {
    .search-field { max-width: none; }
    /* Filter als Blatt von unten */
    .filter-pop[open]::before { content: ""; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 60; }
    .filter-panel { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; z-index: 61; border-radius: 16px 16px 0 0; padding: 1rem 1rem calc(1.25rem + env(safe-area-inset-bottom)); max-height: 85dvh; overflow-y: auto; }
    .filter-panel select, .filter-panel .ss-button { height: 44px; min-height: 44px; }
    /* Buchung als Karte: Zeit links, Meeting/Gast/Status in der Mitte, › rechts */
    .brows .lrow { grid-template-columns: 52px minmax(0, 1fr) 14px; grid-template-areas: "time type arrow" "time guest arrow" "time status arrow"; row-gap: .15rem; padding: .7rem .6rem .7rem .9rem; }
    .brows .lrow::after { content: "›"; grid-area: arrow; align-self: center; color: var(--text-faint); font-size: 1.2rem; }
    .brows .b-time { grid-area: time; align-self: start; }
    .brows .b-type { grid-area: type; }
    .brows .b-guest { grid-area: guest; font-size: .875rem; }
    .brows .b-status { grid-area: status; }
    .brows .b-status:empty { display: none; }
    .brows .row-more, .brows .b-by { display: none; }
    .brows .lrow-title { font-size: .9rem; }
    .lrow-day { padding-left: .9rem; }
}
.orows .lrow, .orows .lrow-head { --cols: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) 100px 40px; }
.toolbar.list-tools .hint { flex: 1 1 200px; min-width: 0; }
@media (max-width: 767px) {
    .orows .lrow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who status" "type type" "slots slots"; row-gap: .15rem; }
    .orows .o-who { grid-area: who; } .orows .o-status { grid-area: status; } .orows .o-type { grid-area: type; } .orows .o-slots { grid-area: slots; font-size: .8rem; }
    .orows .row-more { display: none; }
}
.list-title { margin: 1.5rem 0 .6rem; font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint); }
.page-head + .list-title { margin-top: 0; }
.srows .lrow { --cols: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) 100px 40px; }
.srows-recent .lrow { --cols: minmax(0, 1.2fr) minmax(0, 1fr) auto; padding-right: 1rem; }
@media (max-width: 767px) {
    .srows .lrow { grid-template-columns: minmax(0, 1fr) auto auto; }
    .srows .lrow > .lrow-cell { grid-column: 1 / -1; order: 2; font-size: .8rem; }   /* Ziel/Gültigkeit unter Name, Status und ⋯ */
    .srows-recent .lrow { grid-template-columns: minmax(0, 1fr) auto; }
}
/* Kontakte: Häkchen · Person · Gruppen · Buchungen · zuletzt · ⋯ */
.crows .lrow, .crows .lrow-head { --cols: minmax(0, 2fr) minmax(0, 1.2fr) 90px 150px 40px; }
.crows.has-check .lrow, .crows.has-check .lrow-head { --cols: 24px minmax(0, 2fr) minmax(0, 1.2fr) 90px 150px 40px; }
.c-check { display: flex; align-items: center; margin: 0; }
.c-who { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.c-mail { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-groups { display: flex; flex-wrap: wrap; gap: .3rem; min-width: 0; }
.initials { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-hover); border: 1px solid var(--border); font-size: .75rem; font-weight: 700; color: var(--text); }
.grows .lrow { --cols: minmax(0, 1fr) auto 40px; }
.grow-form { flex-wrap: nowrap; gap: .5rem; }
.grow-form input { max-width: 320px; min-height: 36px; height: 36px; padding-top: 0; padding-bottom: 0; }
/* Sammelleiste: schwebt unten, erscheint erst bei Auswahl */
.bulk-bar { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 45; display: flex; align-items: center; gap: .5rem; max-width: calc(100vw - 2rem); padding: .5rem .5rem .5rem 1rem; border-radius: var(--radius-lg); background: var(--primary); color: var(--primary-text); box-shadow: 0 12px 32px rgba(0, 0, 0, .25); }
.bulk-bar[hidden] { display: none; }
.bulk-count { font-size: .9rem; font-weight: 600; white-space: nowrap; }
.bulk-bar select { width: auto; max-width: 200px; min-height: 32px; height: 32px; padding-top: 0; padding-bottom: 0; font-size: .85rem; }
.bulk-bar .btn { background: transparent; color: var(--primary-text); border-color: color-mix(in srgb, var(--primary-text) 35%, transparent); }
.bulk-bar .btn:hover { background: color-mix(in srgb, var(--primary-text) 12%, transparent); }
.bulk-x { width: 32px; height: 32px; border: 0; border-radius: var(--radius); background: transparent; color: var(--primary-text); font-size: 1.2rem; cursor: pointer; }
.bulk-x:hover { background: color-mix(in srgb, var(--primary-text) 12%, transparent); }
@media (max-width: 767px) {
    .crows .lrow, .crows.has-check .lrow { grid-template-columns: minmax(0, 1fr) auto; }
    .crows.has-check .lrow { grid-template-columns: 24px minmax(0, 1fr) auto; }
    .crows .c-groups:empty, .crows .c-last, .crows .c-count { display: none; }
    .crows .c-groups { grid-column: 1 / -1; order: 2; }
    .crows.has-check .c-groups { grid-column: 2 / -1; }
    .bulk-bar { left: .75rem; right: .75rem; bottom: .75rem; transform: none; flex-wrap: wrap; max-width: none; }
    .grows .lrow { grid-template-columns: minmax(0, 1fr) 40px; }
    .grows .lrow > .lrow-cell { display: none; }
}
.lrow:has(input[data-check-all-item]:checked) { background: var(--info-bg); }   /* ausgewählte Zeile (Sammelleiste) */
.o-who .lrow-sub, .srows .lrow-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg > a > span, .seg > label > span { flex: 1 1 auto; justify-content: center; }   /* gleich breite Optionen füllen ihre Fläche (seg-fill) */
.filter-panel select, .filter-panel .ss { width: 100%; max-width: none; flex: none; }
@media (max-width: 767px) {
    .brows .lrow { grid-template-columns: 60px minmax(0, 1fr) 14px; }
    .brows .b-time span { font-size: .72rem; }
    .brows .lrow-title { flex-wrap: wrap; row-gap: .2rem; }
    .brows .lrow-title > .nm { white-space: normal; flex: 0 1 auto; min-width: 0; }   /* Punkt + Name bleiben zusammen, Abzeichen darunter */
    .brows .lrow-title:has(> .dot) + .lrow-sub { padding-left: 0; }
    .bulk-bar .btn { flex: 1 1 40%; }
    .brows .lrow-title .badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
}
/* Tablet hochkant (768–1023 px): die Hauptpunkte passen nicht in die Leiste → Menü über ☰ wie am Handy (Paket 112) */
@media (min-width: 768px) and (max-width: 1023px) {
    .topbar .nav { display: none; }
    .topbar.is-admin .nav { display: flex; }
    .nav-burger { display: inline-flex; flex: none; order: 5; }
    .quick-new { margin-left: auto; }
}
@media (max-width: 1279px) {   /* schmalere Meeting-Spalte: Name bleibt sichtbar, Abzeichen rutschen darunter */
    .brows .lrow-title { flex-wrap: wrap; row-gap: .2rem; }
    .brows .lrow-title > .nm { white-space: normal; flex: 0 1 auto; min-width: 0; }
    .brows .lrow-title:has(> .dot) + .lrow-sub { padding-left: 0; }
}
@media (max-width: 767px) {   /* Handy: Punkt + Name in einer Zeile (Name bricht selbst um), Abzeichen darunter */
    .brows .lrow-title { display: grid; grid-template-columns: 10px minmax(0, 1fr); column-gap: .55rem; row-gap: .2rem; align-items: start; }
    .brows .lrow-title > .dot { margin-top: .4em; }
    .brows .lrow-title > .badge, .brows .lrow-title > .faint { grid-column: 2; justify-self: start; }
}

/* --- Paket 112b: Meetings, Events, Pläne, Ausnahmen, Feeds, Duties, Orgs, Webhooks ------------- */
.btn-link { border: 0; background: none; padding: 0; font: inherit; font-size: .85rem; color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.btn-link:hover { color: var(--text); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius); color: var(--text-muted); }
.icon-btn:hover { background: var(--surface-hover); color: var(--text); }
.icon-btn .ic { width: 18px; height: 18px; }
.lrow .row-more { gap: .15rem; }
.lrow-title > code.nm { font-family: var(--mono); font-size: .85rem; font-weight: 500; }
.lrow-title .badge .ic { width: 12px; height: 12px; vertical-align: -1px; }
.lrow-cell .lrow-sub, .x-when .lrow-sub, .f-status .lrow-sub { display: block; font-size: .78rem; }
/* Meetings: Liste + klickbare Raster-Karten */
.mrows .lrow, .mrows .lrow-head { --cols: minmax(0, 2fr) 80px 120px minmax(0, 1.4fr) 90px 40px; }
.m-path a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; }
.et-card.is-linked { position: relative; display: flex; flex-direction: column; gap: .5rem; }
.et-card.is-linked:hover { border-color: var(--border-strong); }
.et-card.is-linked :is(a:not(.row-link), button, form, .more) { position: relative; z-index: 2; }
.et-card .lrow-title { flex-wrap: wrap; }
.et-card-meta { margin: 0; font-size: .875rem; }
.et-card-path { font-size: .8rem; align-self: flex-start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Events: Kopf je Event + Terminzeilen */
.ev-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.ev-card.is-muted .ev-head > :not(.row-link):not(.row-more) { opacity: .6; }
.ev-head { --cols: minmax(0, 1fr) 40px; min-height: 72px; padding-top: .8rem; padding-bottom: .8rem; }
.ev-name { font-size: 1.05rem; }
.ev-dates-head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.2fr) 76px; gap: .9rem; padding: .45rem .5rem .45rem 1rem; border-top: 1px solid var(--border); background: var(--bg-elev); font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint); }
.ev-dates-head span:nth-child(2) { grid-column: 3; }
.ev-date { --cols: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.2fr) 76px; min-height: 56px; }
.ev-when strong { font-weight: 600; font-size: .9rem; }
.ev-cap { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.cap-bar { display: block; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; max-width: 220px; }
.cap-bar i { display: block; height: 100%; background: var(--success); border-radius: 3px; }
.ev-more > summary { list-style: none; cursor: pointer; padding: .6rem 1rem; border-top: 1px solid var(--border); font-size: .85rem; font-weight: 500; color: var(--text-muted); }
.ev-more > summary::-webkit-details-marker { display: none; }
.ev-more > summary:hover { color: var(--text); background: var(--surface-hover); }
.ev-more:not([open]) .when-open, .ev-more[open] .when-closed { display: none; }
.ev-more[open] > summary { order: 2; }
.ev-more[open] { display: flex; flex-direction: column; }
.ev-none { margin: 0; padding: .9rem 1rem; border-top: 1px solid var(--border); }
.ev-foot { padding: .6rem 1rem; border-top: 1px solid var(--border); font-size: .85rem; }
#event-list.stack { gap: 1rem; }
/* Pläne, Ausnahmen, Feeds, Duties, Orgs, Webhooks */
.prows .lrow, .prows .lrow-head { --cols: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) 40px; }
.xrows .lrow, .xrows .lrow-head { --cols: minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) 40px; }
.x-when strong { display: block; }
.x-when .faint { font-size: .8rem; }
.frows .lrow, .frows .lrow-head { --cols: minmax(0, 2fr) minmax(0, 1fr) 90px minmax(0, 1.2fr) 40px; }
.f-url { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drows .lrow { --cols: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr) 40px; }
.grows-org .lrow, .grows-org .lrow-head { --cols: minmax(0, 2fr) 120px minmax(0, 1fr) auto; }
.wrows .lrow { --cols: minmax(0, 1fr) auto 40px; }
@media (max-width: 767px) {
    .mrows .lrow { grid-template-columns: minmax(0, 1fr) auto; }
    .mrows .m-dur, .mrows .m-kind, .mrows .m-path { display: none; }
    .mrows .m-status { display: none; }
    .ev-dates-head { display: none; }
    .ev-date { grid-template-columns: minmax(0, 1fr) auto; row-gap: .25rem; }
    .ev-date .ev-where, .ev-date .ev-cap { grid-column: 1 / 2; }
    .ev-date .row-more { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
    .prows .lrow { grid-template-columns: minmax(0, 1fr) auto; }
    .prows .lrow > .lrow-cell { grid-column: 1; font-size: .8rem; }
    .prows .row-more { grid-column: 2; grid-row: 1 / span 3; }
    .xrows .lrow, .frows .lrow, .drows .lrow, .grows-org .lrow, .wrows .lrow { grid-template-columns: minmax(0, 1fr) auto; }
    .xrows .lrow > :not(.row-link):not(.row-more), .frows .lrow > :not(.row-link):not(.row-more), .drows .lrow > :not(.row-link):not(.row-more), .grows-org .lrow > :not(.row-link):not(.row-more) { grid-column: 1; }
    .xrows .row-more, .frows .row-more, .drows .row-more, .grows-org .row-more { grid-column: 2; grid-row: 1 / span 5; align-self: center; }
    .xrows .lrow-cell:empty, .frows .f-busy { display: none; }
}
@media (max-width: 767px) {   /* Karten am Handy kompakt: kleine Zeilenabstände statt der Spaltenlücke */
    .xrows .lrow, .frows .lrow, .drows .lrow, .grows-org .lrow, .wrows .lrow, .prows .lrow, .mrows .lrow, .ev-date { row-gap: .25rem; }
    .ev-more > summary { display: block; width: 100%; }
}
/* Mehrfachauswahl im Klappfeld (Paket 112.2): sieht aus wie eine Auswahl, öffnet Häkchenliste mit Suche */
.multi-pick { position: relative; }
.multi-pick > summary { list-style: none; }
.multi-pick > summary::-webkit-details-marker { display: none; }
.multi-pick-btn { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 40px; padding: .45rem .75rem; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--bg-elev); color: var(--text); cursor: pointer; }
.multi-pick-btn > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.multi-pick-btn .chev { width: 7px; height: 7px; border-right: 1.6px solid var(--text-muted); border-bottom: 1.6px solid var(--text-muted); transform: rotate(45deg) translateY(-2px); flex: none; }
.multi-pick[open] > .multi-pick-btn { border-color: var(--text-muted); box-shadow: 0 0 0 3px var(--focus); }
.multi-panel { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; display: flex; flex-direction: column; gap: .35rem; max-height: 300px; padding: .6rem; background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: 0 12px 32px rgba(0, 0, 0, .18); }
.multi-panel input[type="search"] { min-height: 36px; height: 36px; padding-top: 0; padding-bottom: 0; }
.multi-all { padding-bottom: .35rem; border-bottom: 1px solid var(--border); }
.multi-list { display: flex; flex-direction: column; gap: .35rem; overflow-y: auto; min-height: 0; }
/* Buchungsseite-Editor (Paket 113): Abschnitte links (sticky), Formular, mitlaufende Vorschau rechts; unter 1200 px Chip-Leiste + Vorschau als Überlagerung */
main.container:has(> .editor) { max-width: 1440px; }
main.container:has(> .editor) > .alert { position: fixed; top: 72px; left: 50%; transform: translateX(-50%); z-index: 45; width: min(560px, calc(100vw - 2rem)); margin: 0; box-shadow: 0 12px 32px rgba(0, 0, 0, .18); cursor: pointer; }
.editor { display: grid; grid-template-columns: 168px minmax(0, 1fr) minmax(360px, 420px); gap: 1.25rem; align-items: start; }
.editor-nav { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 2px; }
.editor-nav a { display: block; padding: .45rem .7rem; border-radius: var(--radius); color: var(--text-muted); text-decoration: none; font-size: .9rem; white-space: nowrap; }
.editor-nav a:hover { background: var(--surface-hover); color: var(--text); }
.editor-nav a.is-active { background: var(--surface-hover); color: var(--text); font-weight: 600; }
.editor-main { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.editor-sec { scroll-margin-top: 80px; margin: 0; }
.editor-sec > h2 { margin: 0 0 1rem; font-size: 1.05rem; }
.editor-save { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: flex-end; gap: .75rem; margin: -.25rem 0 0; padding: .75rem 0; background: var(--bg); border-top: 1px solid var(--border); }
.editor-unsaved { font-size: .85rem; color: var(--text-muted); }
.editor-unsaved::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: .4rem; border-radius: 50%; background: var(--warn); vertical-align: middle; }
.editor-preview { position: sticky; top: 76px; display: flex; flex-direction: column; gap: .6rem; height: calc(100dvh - 92px); min-height: 420px; padding: .75rem; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.editor-preview-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.editor-preview-head .row { gap: .35rem; flex-wrap: nowrap; }
.editor-preview-head .view-toggle .btn { min-height: 32px; font-size: .8rem; padding: 0 .55rem; }
.editor-preview-close, .editor-preview-btn { display: none; }
.page-preview.is-fit { flex: 1 1 auto; min-height: 0; padding: 0; overflow: hidden; display: block; position: relative; }
.page-preview.is-fit iframe { position: absolute; left: 0; top: 0; height: 100%; transform-origin: 0 0; border-radius: 0; transition: none; }
.embed-domain { padding: .35rem 0; border-bottom: 1px solid var(--border); }
.embed-add { margin-top: .5rem; flex-wrap: nowrap; }
.embed-add input { flex: 1 1 auto; min-width: 0; }
@media (max-width: 1199px) {
    .editor { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
    .editor-nav { top: 57px; z-index: 20; flex-direction: row; overflow-x: auto; scrollbar-width: none; margin: 0 -1.25rem; padding: .5rem 1.25rem; background: var(--bg); border-bottom: 1px solid var(--border); }
    .editor-nav::-webkit-scrollbar { display: none; }
    .editor-nav a { flex: 0 0 auto; border: 1px solid var(--border); border-radius: 999px; padding: .3rem .8rem; }
    .editor-sec { scroll-margin-top: 120px; }
    .editor-preview-btn { display: inline-flex; }
    .editor-preview { display: none; }
    .editor.is-preview-open .editor-preview { display: flex; position: fixed; inset: 64px 1rem 1rem auto; width: min(480px, calc(100vw - 2rem)); height: auto; z-index: 70; box-shadow: 0 16px 48px rgba(0, 0, 0, .3); }
    .editor.is-preview-open .editor-preview-close { display: inline-flex; }
}
@media (max-width: 767px) {
    .editor-nav { margin: 0 -1rem; padding: .5rem 1rem; }
    .page-head.editor-head { flex-wrap: wrap; }
    .page-head.editor-head > :first-child { flex: 1 1 100%; }
    .editor-head .page-actions { flex: 1 1 100%; justify-content: flex-start; }
    .editor.is-preview-open .editor-preview { inset: 0; width: auto; border-radius: 0; border: 0; padding-top: calc(.75rem + env(safe-area-inset-top)); }
    .editor-save { margin-left: -1rem; margin-right: -1rem; padding-left: 1rem; padding-right: 1rem; }
    .editor-save .btn { flex: 1 1 auto; }
    main.container:has(> .editor) > .alert { top: 64px; }
}
/* Org-Inhalte in der persönlichen Ansicht (Paket 114): Umschalter in der Werkzeugzeile, Abschnitte je Organisation */
.toolbar .ctx-seg { flex: 0 1 auto; min-width: 0; }
:is(#et-list, #event-list, #duty-list) > .list-title:first-child { margin-top: 0; }
@media (max-width: 767px) { .toolbar .ctx-seg { flex: 1 1 100%; } }
