/* ============================================
   FoxiCloud 2.0 - Oberfläche (App, Anmeldeseite, Freigaben)
   ROT als Primärfarbe + Darkmode (wie FoxiCloud V8)
   ============================================ */

:root {
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --primary-light: #f87171;
    --primary-rgb: 220, 38, 38;
    --accent-rgb: 249, 115, 22;
    --secondary: #b91c1c;
    --accent: #f97316;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    --bg-gradient-start: #7f1d1d;
    --bg-gradient-end: #1c1917;
    --app-bg: #f5f5f4;
    --card-bg: #ffffff;
    --sidebar-bg: #fafaf9;
    --text-primary: #1c1917;
    --text-secondary: #44403c;
    --text-muted: #78716c;
    --border-color: #e7e5e4;
    --input-bg: #ffffff;
    --input-border: #e7e5e4;
    --hover-bg: #f5f5f4;
    --active-bg: rgba(var(--primary-rgb), 0.09);
    --mention-bg: rgba(var(--accent-rgb), 0.10);
    --mention-border: #f97316;
    --code-bg: #f5f5f4;
    --shadow-color: rgba(0, 0, 0, 0.12);
    --radius: 14px;
    --sidebar-w: 280px;
    --members-w: 260px;
}

[data-theme="dark"] {
    --bg-gradient-start: #450a0a;
    --bg-gradient-end: #0c0a09;
    --app-bg: #0f0d0c;
    --card-bg: #1c1917;
    --sidebar-bg: #161413;
    --text-primary: #fafaf9;
    --text-secondary: #e7e5e4;
    --text-muted: #a8a29e;
    --border-color: #292524;
    --input-bg: #292524;
    --input-border: #44403c;
    --hover-bg: #23201e;
    --active-bg: rgba(248, 113, 113, 0.14);
    --mention-bg: rgba(var(--accent-rgb), 0.13);
    --code-bg: #292524;
    --shadow-color: rgba(0, 0, 0, 0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); }
button { font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: var(--text-primary); }
.me-1 { margin-right: .25rem; }

/* ============================================
   BUTTONS & FORMULARE
   ============================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: none; border-radius: 50px; padding: 11px 22px; font-weight: 700; cursor: pointer;
    text-decoration: none; transition: all .2s ease; font-size: .92rem; white-space: nowrap;
}
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; box-shadow: 0 8px 22px rgba(var(--primary-rgb), .3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(var(--primary-rgb), .45); color: #fff; }
.btn-secondary { background: var(--hover-bg); color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 7px 14px; font-size: .82rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

.field { margin-bottom: 14px; }
.field > label, .auth-form > label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 6px; color: var(--text-secondary); }
.field small, .auth-form small { color: var(--text-muted); font-weight: 400; }
.input, .field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field input[type=url], .field input[type=search], .field input[type=datetime-local], .field select, .field textarea {
    width: 100%; padding: 11px 14px; border-radius: 12px; border: 2px solid var(--input-border);
    background: var(--input-bg); outline: none; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 80px; }
.field input[type=file] { width: 100%; padding: 10px; border-radius: 12px; border: 2px dashed var(--input-border); background: var(--input-bg); cursor: pointer; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .13); }
.field-row { display: flex; gap: 12px; }
.field-row > * { flex: 1; }
.check { display: flex; align-items: center; gap: 10px; font-size: .9rem; cursor: pointer; margin: 6px 0 12px; color: var(--text-secondary); }
.check input { width: 18px; height: 18px; accent-color: var(--primary); flex-shrink: 0; }
.hint { font-size: .8rem; color: var(--text-muted); margin-top: 4px; }
.color-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.color-swatches button { width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.color-swatches button.sel { border-color: var(--text-primary); }

.alert { padding: 12px 14px; border-radius: 12px; font-size: .9rem; margin-bottom: 14px; display: flex; gap: 8px; align-items: flex-start; text-align: left; }
.alert-error { background: rgba(239,68,68,.1); color: #b91c1c; border: 1px solid rgba(239,68,68,.25); }
.alert-success { background: rgba(16,185,129,.1); color: #047857; border: 1px solid rgba(16,185,129,.25); }
.alert-info { background: rgba(59,130,246,.1); color: #1d4ed8; border: 1px solid rgba(59,130,246,.25); }
[data-theme="dark"] .alert-error { color: #fca5a5; }
[data-theme="dark"] .alert-success { color: #6ee7b7; }
[data-theme="dark"] .alert-info { color: #93c5fd; }

.icon-btn {
    width: 38px; height: 38px; border-radius: 10px; border: none; background: transparent; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted);
    transition: background .15s, color .15s; position: relative; text-decoration: none; flex-shrink: 0;
}
.icon-btn:hover { background: var(--hover-bg); color: var(--primary); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; font-size: .8rem; }
.icon-btn.active { color: var(--primary); background: var(--active-bg); }

/* ============================================
   ANMELDUNG / WARTUNG
   ============================================ */
.auth-body {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
}
.auth-body::before {
    content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background: radial-gradient(circle at 15% 25%, rgba(248,113,113,.18) 0%, transparent 35%), radial-gradient(circle at 85% 75%, rgba(var(--accent-rgb), .12) 0%, transparent 35%);
}
.auth-box {
    position: relative; z-index: 1; background: var(--card-bg); border-radius: 26px; padding: 42px 38px; max-width: 440px; width: 100%;
    box-shadow: 0 30px 80px rgba(0,0,0,.35); border: 1px solid var(--border-color); text-align: center; overflow: hidden;
}
.auth-box::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary-light)); }
.auth-logo {
    width: 80px; height: 80px; margin: 0 auto 16px; border-radius: 22px; color: #fff; font-size: 2.1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary)); display: flex; align-items: center; justify-content: center;
    box-shadow: 0 16px 36px rgba(var(--primary-rgb), .35);
}
.auth-logo.spin i { animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-brand { font-weight: 900; text-transform: uppercase; letter-spacing: 2px; font-size: .75rem; color: var(--text-muted); }
.auth-title { font-size: 1.7rem; font-weight: 900; letter-spacing: -.8px; margin: 4px 0 6px; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.auth-text { color: var(--text-secondary); margin-bottom: 22px; }
.auth-muted { color: var(--text-muted); font-size: .9rem; }
.auth-form { text-align: left; }
.input-icon { position: relative; margin-bottom: 14px; }
.input-icon i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: .9rem; }
.input-icon input { width: 100%; padding: 12px 14px 12px 42px; border-radius: 12px; border: 2px solid var(--input-border); background: var(--input-bg); outline: none; transition: border-color .2s, box-shadow .2s; }
.input-icon input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .13); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.auth-switch { margin-top: 18px; font-size: .9rem; color: var(--text-secondary); }
.auth-switch a, .auth-link { font-weight: 700; text-decoration: none; }
.auth-link { display: inline-block; margin-top: 20px; font-size: .85rem; color: var(--text-muted); }
.auth-footer { margin-top: 22px; font-size: .75rem; color: var(--text-muted); }
.theme-fab { position: fixed; right: 20px; bottom: 20px; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border-color); background: var(--card-bg); cursor: pointer; z-index: 2; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.mt-countdown { display: flex; justify-content: center; gap: 10px; margin: 20px 0 12px; }
.mt-countdown div { background: var(--hover-bg); border: 1px solid var(--border-color); border-radius: 14px; padding: 10px 6px; min-width: 66px; }
.mt-countdown b { display: block; font-size: 1.7rem; font-weight: 900; color: var(--primary); font-variant-numeric: tabular-nums; line-height: 1.1; }
.mt-countdown span { font-size: .65rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); font-weight: 700; }
.mt-progress { height: 6px; border-radius: 6px; background: var(--border-color); overflow: hidden; margin: 18px 0; }
.mt-progress span { display: block; height: 100%; width: 40%; border-radius: 6px; background: linear-gradient(90deg, var(--primary), var(--accent)); animation: mtBar 1.8s ease-in-out infinite; }
@keyframes mtBar { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }


/* ============================================
   BAUSTEINE
   ============================================ */
.avatar { --size: 38px; width: var(--size); height: var(--size); border-radius: 30%; position: relative; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: calc(var(--size) * .42); text-transform: uppercase; user-select: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.avatar .dot { position: absolute; right: -2px; bottom: -2px; width: calc(var(--size) * .32); height: calc(var(--size) * .32); min-width: 9px; min-height: 9px; border-radius: 50%; border: 2px solid var(--sidebar-bg); background: #a8a29e; }
.dot.online { background: var(--success) !important; }
.dot.away { background: var(--warning) !important; }
.dot.busy { background: var(--danger) !important; }
.dot.offline, .dot.invisible { background: #a8a29e !important; }
.avatar.lg { --size: 84px; border-radius: 26px; }
.modal-root .modal { position: fixed; inset: 0; background: rgba(12,10,9,.55); backdrop-filter: blur(3px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fadeIn .15s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card { background: var(--card-bg); border-radius: 20px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.4); border: 1px solid var(--border-color); animation: popIn .2s cubic-bezier(.34,1.56,.64,1); overflow: hidden; }
.modal-card.wide { max-width: 720px; }
@keyframes popIn { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 10px; }
.modal-head h3 { font-size: 1.15rem; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.modal-head h3 i { color: var(--primary); }
.modal-body { padding: 8px 20px 16px; overflow-y: auto; }
.modal-foot { padding: 12px 20px 18px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--border-color); flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-color); margin: 0 -20px 16px; padding: 0 20px; overflow-x: auto; }
.tabs button { border: none; background: none; padding: 10px 12px; font-weight: 700; font-size: .85rem; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; cursor: pointer; }
.list-item:hover { background: var(--hover-bg); }
.list-item > div { flex: 1; min-width: 0; }
.list-item b { display: block; font-size: .92rem; }
.list-item small { color: var(--text-muted); font-size: .78rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.popover { position: fixed; z-index: 120; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 14px; box-shadow: 0 18px 50px var(--shadow-color); padding: 6px; display: none; min-width: 200px; max-width: calc(100vw - 16px); }
.popover.show { display: block; animation: fadeIn .1s ease; }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 9px; cursor: pointer; font-size: .88rem; border: none; background: none; width: 100%; text-align: left; color: var(--text-primary); }
.menu-item:hover { background: var(--hover-bg); }
.menu-item i { width: 18px; text-align: center; color: var(--text-muted); }
.menu-item.danger, .menu-item.danger i { color: var(--danger); }
.menu-item.checked::after { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; margin-left: auto; color: var(--primary); font-size: .8rem; }
.menu-sep { height: 1px; background: var(--border-color); margin: 4px 6px; }

.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: calc(100vw - 36px); }
.toast { background: var(--card-bg); border: 1px solid var(--border-color); border-left: 4px solid var(--primary); border-radius: 12px; padding: 12px 16px; box-shadow: 0 12px 34px var(--shadow-color); font-size: .88rem; min-width: 240px; max-width: 380px; animation: toastIn .25s ease; cursor: pointer; }
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast b { display: block; margin-bottom: 2px; }
@keyframes toastIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.ann { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 1px solid; position: relative; text-align: left; font-size: .9rem; animation: slideDown .35s ease; }
@keyframes slideDown { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
.ann-icon { font-size: 1.2rem; margin-top: 2px; flex-shrink: 0; }
.ann-body { flex: 1; min-width: 0; color: var(--text-primary); overflow-wrap: anywhere; }
.ann-body b { display: block; margin-bottom: 2px; }
.ann-img-x { display: block; max-width: 100%; max-height: 110px; border-radius: 10px; margin-top: 8px; cursor: zoom-in; }
.ann-x { position: absolute; top: 6px; right: 6px; }
.ann-info { background: rgba(59, 130, 246, .09); border-color: rgba(59, 130, 246, .3); } .ann-info .ann-icon { color: var(--info); }
.ann-success { background: rgba(16, 185, 129, .09); border-color: rgba(16, 185, 129, .3); } .ann-success .ann-icon { color: var(--success); }
.ann-warning { background: rgba(245, 158, 11, .11); border-color: rgba(245, 158, 11, .35); } .ann-warning .ann-icon { color: var(--warning); }
.ann-danger { background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .35); } .ann-danger .ann-icon { color: var(--danger); }
.ann-event { background: rgba(var(--primary-rgb), .08); border-color: rgba(var(--primary-rgb), .3); } .ann-event .ann-icon { color: var(--primary); }
.ann-party { background: linear-gradient(135deg, rgba(234, 179, 8, .14), rgba(168, 85, 247, .12)); border-color: rgba(234, 179, 8, .4); } .ann-party .ann-icon { color: #ca8a04; }
.ann-christmas { background: linear-gradient(135deg, rgba(21, 128, 61, .12), rgba(200, 30, 30, .1)); border-color: rgba(21, 128, 61, .35); } .ann-christmas .ann-icon { color: #15803d; }

/* ============================================
   ANMELDESEITE (im Backend gestaltbar)
   ============================================ */
.lp-body {
    min-height: 100vh; background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    background-attachment: fixed; color: var(--text-primary);
}
.lp-body::before {
    content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background: radial-gradient(circle at 12% 20%, rgba(255,255,255,.08) 0%, transparent 32%), radial-gradient(circle at 88% 80%, rgba(var(--accent-rgb), .14) 0%, transparent 36%);
}
.lp-preview-bar { position: sticky; top: 0; z-index: 10; background: #f59e0b; color: #1c1917; font-weight: 700; text-align: center; padding: 8px; font-size: .85rem; }
.lp-preview-bar a { color: #1c1917; }
.lp { position: relative; z-index: 1; min-height: 100vh; display: flex; gap: 40px; padding: 40px; max-width: 1320px; margin: 0 auto; align-items: flex-start; }
.lp-info-right { flex-direction: row-reverse; }
.lp-center { justify-content: center; align-items: center; }
.lp-info { flex: 1; min-width: 0; color: #fff; padding-top: 10px; }
.lp-brand { display: flex; align-items: center; gap: 14px; font-weight: 900; font-size: 1.3rem; margin-bottom: 34px; letter-spacing: -.3px; }
.lp-brand small { display: block; font-size: .78rem; font-weight: 500; opacity: .75; letter-spacing: 0; }
.lp-brand .brand-logo { width: 50px; height: 50px; border-radius: 15px; font-size: 1.35rem; background: rgba(255,255,255,.16); box-shadow: none; border: 1px solid rgba(255,255,255,.25); }
.lp-logo-img { max-height: 54px; max-width: 220px; object-fit: contain; }
.lp-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 30px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); font-size: .8rem; font-weight: 700; backdrop-filter: blur(6px); }
.lp-headline { font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 900; letter-spacing: -1.5px; line-height: 1.08; margin: 16px 0 14px; }
.lp-intro { font-size: 1.05rem; line-height: 1.65; opacity: .9; max-width: 640px; }
.lp-intro a, .lp-section a { color: #fff; }
.lp-row { display: flex; gap: 14px; flex-wrap: wrap; margin: 26px 0 8px; }
.lp-status { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(8px); font-size: .88rem; }
.lp-status small { display: block; opacity: .85; font-size: .8rem; margin-top: 2px; }
.lp-dot { width: 12px; height: 12px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.25); animation: lpPulse 2s infinite; flex-shrink: 0; }
.lp-status-planned .lp-dot { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245,158,11,.25); }
@keyframes lpPulse { 50% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } }
.lp-stats { display: flex; gap: 6px; padding: 8px; border-radius: 16px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(8px); }
.lp-stats div { padding: 4px 14px; text-align: center; }
.lp-stats div + div { border-left: 1px solid rgba(255,255,255,.18); }
.lp-stats b { display: block; font-size: 1.25rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.lp-stats span { font-size: .72rem; opacity: .8; text-transform: uppercase; letter-spacing: .8px; font-weight: 700; }
.lp-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 26px 0; }
.lp-feature { display: flex; gap: 12px; padding: 14px; border-radius: 16px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); transition: background .2s, transform .2s; }
.lp-feature:hover { background: rgba(255,255,255,.14); transform: translateY(-2px); }
.lp-feature i { width: 38px; height: 38px; border-radius: 11px; background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lp-feature b { display: block; font-size: .92rem; }
.lp-feature span { font-size: .82rem; opacity: .82; line-height: 1.45; }
.lp-section { margin: 26px 0; }
.lp-section h2 { font-size: 1rem; font-weight: 800; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; text-transform: uppercase; letter-spacing: 1px; opacity: .9; }
.lp-section .ann { margin-bottom: 10px; background: rgba(255,255,255,.95); }
.lp-section .ann small { color: var(--text-muted); font-size: .75rem; }
[data-theme="dark"] .lp-section .ann { background: rgba(28,25,23,.92); }
.lp-faq { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 14px; margin-bottom: 8px; }
.lp-faq summary { padding: 12px 16px; cursor: pointer; font-weight: 700; font-size: .92rem; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: '\f078'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: .75rem; transition: transform .2s; }
.lp-faq[open] summary::after { transform: rotate(180deg); }
.lp-faq div { padding: 0 16px 14px; font-size: .88rem; opacity: .88; line-height: 1.55; }
.lp-support p { opacity: .88; margin-bottom: 10px; }
.lp-contact { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-contact a, .lp-contact span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 30px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); color: #fff; text-decoration: none; font-size: .85rem; font-weight: 600; }
.lp-contact a:hover { background: rgba(255,255,255,.22); }
.lp-auth { width: 430px; flex-shrink: 0; position: sticky; top: 40px; }
.lp-center .lp-auth { position: static; }
.lp-card { background: var(--card-bg); border-radius: 26px; padding: 36px 34px 26px; box-shadow: 0 30px 80px rgba(0,0,0,.35); border: 1px solid var(--border-color); position: relative; overflow: hidden; }
.lp-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary-light)); }
.lp-center .lp-card { text-align: center; }
.lp-card .auth-logo img { max-width: 60px; max-height: 60px; }
.lp-card-title { font-size: 1.6rem; font-weight: 900; letter-spacing: -.6px; margin-bottom: 6px; }
.lp-card .auth-text { margin-bottom: 18px; font-size: .92rem; }
.lp-forgot { float: right; font-weight: 600; font-size: .8rem; text-decoration: none; }
.lp-note { margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: var(--hover-bg); font-size: .85rem; color: var(--text-secondary); }
.lp-secure { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--border-color); font-size: .75rem; color: var(--text-muted); text-align: center; }
.lp-secure i { color: var(--success); }
.lp-footer { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; margin-top: 16px; font-size: .8rem; color: rgba(255,255,255,.8); }
.lp-footer a { color: #fff; text-decoration: none; font-weight: 600; }
.lp-footer a:hover { text-decoration: underline; }
.pw-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: none; background: none; cursor: pointer; color: var(--text-muted); padding: 6px; }
.input-icon .pw-eye i { position: static; transform: none; }
.otp-input { letter-spacing: 6px; font-size: 1.3rem !important; font-variant-numeric: tabular-nums; text-align: center; }
.legal-box { max-width: 760px; text-align: left; }
.legal-text { line-height: 1.65; color: var(--text-secondary); font-size: .95rem; }

/* Öffentliche Freigaben */
.share-box { max-width: 760px; text-align: left; padding: 30px 32px; }
.share-top { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.share-top b { display: block; font-weight: 900; }
.share-top small { color: var(--text-muted); font-size: .85rem; }
.share-lock { width: 70px; height: 70px; border-radius: 50%; margin: 10px auto 12px; background: var(--active-bg); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.7rem; }
.share-box .auth-title, .share-box .auth-text { text-align: center; }
.share-file { text-align: center; }
.share-preview { display: block; max-width: 100%; max-height: 60vh; margin: 0 auto 16px; border-radius: 14px; background: var(--hover-bg); }
.share-pdf { width: 100%; height: 60vh; border: 1px solid var(--border-color); }
.share-icon { font-size: 4rem; color: var(--primary); margin: 10px 0 14px; }
.share-name { font-size: 1.3rem; font-weight: 800; word-break: break-word; margin-bottom: 4px; }
.share-file .btn { margin-top: 14px; }
.share-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.share-crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; }
.share-crumbs a { text-decoration: none; color: var(--text-primary); }
.share-crumbs a:hover { color: var(--primary); }
.share-crumbs .fa-chevron-right { font-size: .7rem; color: var(--text-muted); }
.share-list { border: 1px solid var(--border-color); border-radius: 14px; overflow: hidden; }
.share-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border-color); }
.share-row:last-child { border-bottom: none; }
.share-row:hover { background: var(--hover-bg); }
.share-ico { width: 22px; text-align: center; font-size: 1.15rem; }
.share-rname { flex: 1; min-width: 0; color: var(--text-primary); text-decoration: none; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-rname:hover { color: var(--primary); }
.share-upload { margin-top: 18px; }
.share-drop { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px; border: 2px dashed var(--input-border); border-radius: 16px; cursor: pointer; color: var(--text-secondary); text-align: center; margin-bottom: 8px; }
.share-drop.over { border-color: var(--primary); background: var(--active-bg); }
.share-drop i { font-size: 2rem; color: var(--primary); }
.share-drop input { display: none; }
.small { font-size: .8rem; }

/* Dateitypen-Farben */
.k-folder { color: #f59e0b; } .k-image, .k-image-other { color: #10b981; } .k-video, .k-video-other { color: #8b5cf6; } .k-audio { color: #ec4899; }
.k-pdf { color: #ef4444; } .k-text { color: #64748b; } .k-archive { color: #a16207; } .k-document { color: #2563eb; } .k-spreadsheet { color: #16a34a; }
.k-presentation { color: #ea580c; } .k-file { color: #94a3b8; }

/* ============================================
   APP-LAYOUT
   ============================================ */
.app-body { overflow: hidden; background: var(--app-bg); }
.app { display: flex; height: 100vh; height: 100dvh; width: 100%; }
.sidebar { width: 264px; flex-shrink: 0; background: var(--sidebar-bg); border-right: 1px solid var(--border-color); display: flex; flex-direction: column; z-index: 40; }
.sb-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 14px 12px 18px; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; text-decoration: none; color: var(--text-primary); }
.brand-logo { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(var(--primary-rgb), .35); flex-shrink: 0; }
.brand-text { font-weight: 900; font-size: 1.05rem; letter-spacing: -.3px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { display: block; font-size: .68rem; font-weight: 600; color: var(--text-muted); letter-spacing: 1px; }
.sb-close { display: none; }
.sb-maint { margin: 0 14px 10px; padding: 8px 12px; border-radius: 10px; background: rgba(245,158,11,.14); color: #b45309; font-size: .8rem; font-weight: 700; }
.sb-new { padding: 0 14px 12px; }
.sb-scroll { flex: 1; overflow-y: auto; padding: 0 10px 12px; scrollbar-width: thin; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 11px; color: var(--text-secondary); text-decoration: none; font-weight: 600; font-size: .92rem; position: relative; transition: background .12s; }
.nav-item > i { width: 18px; text-align: center; color: var(--text-muted); }
.nav-item span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item:hover { background: var(--hover-bg); }
.nav-item.active { background: var(--active-bg); color: var(--primary); }
.nav-item.active > i { color: var(--primary); }
.nav-item .cnt { background: var(--primary); color: #fff; border-radius: 10px; font-size: .7rem; padding: 1px 7px; }
.nav-toggle { border: none; background: none; color: var(--text-muted); width: 24px; height: 24px; border-radius: 6px; cursor: pointer; font-size: .7rem; }
.nav-toggle:hover { background: var(--border-color); }
.nav-toggle.open i { transform: rotate(90deg); }
.nav-toggle i { transition: transform .15s; }
.nav-sep { height: 1px; background: var(--border-color); margin: 8px 10px; }
.tree { padding-left: 14px; }
.tree:empty { display: none; }
.tree-item { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 8px; color: var(--text-secondary); text-decoration: none; font-size: .86rem; }
.tree-item:hover { background: var(--hover-bg); }
.tree-item.active { color: var(--primary); font-weight: 700; }
.tree-item > i.fa-folder, .tree-item > i.fa-folder-open { color: #f59e0b; }
.tree-item span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tree-item .nav-toggle { width: 20px; height: 20px; flex-shrink: 0; }
.tree-item .nav-toggle.none { visibility: hidden; }
.drop-hover { background: rgba(var(--primary-rgb), .14) !important; box-shadow: inset 0 0 0 2px var(--primary); color: var(--primary) !important; }
.sb-quota { padding: 12px 18px; border-top: 1px solid var(--border-color); font-size: .78rem; color: var(--text-muted); }
.sb-quota b { color: var(--text-primary); }
.meter { height: 7px; border-radius: 7px; background: var(--border-color); overflow: hidden; margin-top: 6px; }
.meter span { display: block; height: 100%; border-radius: 7px; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .4s; }
.meter.warn span { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.sb-me { border-top: 1px solid var(--border-color); padding: 10px; display: flex; align-items: center; gap: 4px; }
.me-btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: none; background: transparent; padding: 6px 8px; border-radius: 10px; cursor: pointer; text-align: left; }
.me-btn:hover { background: var(--hover-bg); }
.me-btn .me-name { font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-btn .me-sub { font-size: .74rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-btn > div { min-width: 0; }
.me-actions { display: flex; }
.me-actions .icon-btn { width: 32px; height: 32px; }
.sb-backdrop { display: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--card-bg); position: relative; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--border-color); min-height: 62px; }
.search-box { flex: 1; max-width: 620px; position: relative; }
.search-box > i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: .85rem; }
.search-box input { width: 100%; padding: 10px 70px 10px 40px; border-radius: 12px; border: 1px solid var(--border-color); background: var(--hover-bg); outline: none; font-size: .92rem; transition: all .15s; }
.search-box input:focus { background: var(--input-bg); border-color: var(--primary); box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .1); }
.search-box kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: .68rem; color: var(--text-muted); border: 1px solid var(--border-color); border-radius: 6px; padding: 2px 6px; font-family: inherit; background: var(--card-bg); }
.topbar-actions { margin-left: auto; display: flex; gap: 2px; }
.mobile-only { display: none; }
.view { flex: 1; overflow-y: auto; position: relative; scrollbar-width: thin; }
.loading-big { text-align: center; padding: 60px; color: var(--text-muted); font-size: 1.6rem; }
.view-pad { padding: 20px 26px 120px; }
.view-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.view-head h1 { font-size: 1.45rem; font-weight: 900; letter-spacing: -.5px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.view-head h1 i { color: var(--primary); font-size: 1.15rem; }
.view-head .actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--border-color); border-radius: 10px; overflow: hidden; }
.seg button { border: none; background: var(--card-bg); padding: 7px 11px; cursor: pointer; color: var(--text-muted); font-size: .85rem; font-weight: 600; }
.seg button + button { border-left: 1px solid var(--border-color); }
.seg button.active { background: var(--active-bg); color: var(--primary); }
.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-width: 0; }
.crumb { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; font-weight: 800; font-size: 1.2rem; color: var(--text-primary); text-decoration: none; letter-spacing: -.3px; max-width: 280px; }
.crumb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb.small { font-size: .95rem; font-weight: 700; color: var(--text-secondary); }
.crumb:hover { background: var(--hover-bg); }
.crumb i { color: var(--primary); }
.crumbs > .fa-chevron-right { font-size: .65rem; color: var(--text-muted); }
.empty { text-align: center; padding: 70px 20px; color: var(--text-muted); }
.empty .big { font-size: 3rem; margin-bottom: 10px; color: var(--border-color); }
.empty h3 { color: var(--text-primary); font-weight: 800; margin-bottom: 6px; }
.empty p { max-width: 420px; margin: 0 auto 16px; }
.hint-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--hover-bg); color: var(--text-secondary); font-size: .85rem; margin-bottom: 14px; }
.hint-bar i { color: var(--primary); }

/* ---------- Dateiliste ---------- */
.flist { border: 1px solid var(--border-color); border-radius: 16px; overflow: hidden; user-select: none; }
.frow { display: grid; grid-template-columns: 34px 44px minmax(0, 1fr) 110px 150px 44px; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--border-color); cursor: default; position: relative; }
.frow:last-child { border-bottom: none; }
.frow.head { background: var(--sidebar-bg); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--text-muted); padding-top: 9px; padding-bottom: 9px; }
.frow.head button { border: none; background: none; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; text-align: left; padding: 0; }
.frow.head button.sorted { color: var(--primary); }
.frow:not(.head):hover { background: var(--hover-bg); }
.frow.sel { background: var(--active-bg); }
.frow .ck, .fcard .ck { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
.fic { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; overflow: hidden; background: var(--hover-bg); }
.fic img { width: 100%; height: 100%; object-fit: cover; }
.fname { min-width: 0; display: flex; align-items: center; gap: 8px; }
.fname a, .fname .nm { color: var(--text-primary); text-decoration: none; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.fname a:hover, .fname .nm:hover { color: var(--primary); }
.fname small { display: block; font-size: .74rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fname > div { min-width: 0; }
.fbadges { display: inline-flex; gap: 5px; color: var(--text-muted); font-size: .75rem; flex-shrink: 0; }
.fbadges .fa-star { color: #f59e0b; }
.fsize, .fdate { font-size: .82rem; color: var(--text-muted); white-space: nowrap; }
.frow .more { opacity: 0; }
.frow:hover .more, .frow.sel .more { opacity: 1; }
.frow.cut, .fcard.cut { opacity: .45; }
.frow.dragging, .fcard.dragging { opacity: .4; }
.frow.drop-hover, .fcard.drop-hover { border-radius: 10px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; user-select: none; }
.fcard { position: relative; border: 1px solid var(--border-color); border-radius: 16px; padding: 10px; cursor: default; background: var(--card-bg); transition: border-color .12s, box-shadow .12s; }
.fcard:hover { border-color: var(--primary-light); box-shadow: 0 8px 22px var(--shadow-color); }
.fcard.sel { border-color: var(--primary); background: var(--active-bg); }
.fcard .ck { position: absolute; top: 10px; left: 10px; z-index: 2; opacity: 0; }
.fcard:hover .ck, .fcard.sel .ck, .has-sel .fcard .ck { opacity: 1; }
.fcard .more { position: absolute; top: 6px; right: 6px; z-index: 2; background: var(--card-bg); opacity: 0; }
.fcard:hover .more { opacity: 1; }
.fcard .thumb { aspect-ratio: 4/3; border-radius: 12px; background: var(--hover-bg); display: flex; align-items: center; justify-content: center; font-size: 2.8rem; overflow: hidden; margin-bottom: 8px; }
.fcard .thumb img { width: 100%; height: 100%; object-fit: cover; }
.fcard .nm { font-weight: 600; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.fcard small { color: var(--text-muted); font-size: .75rem; display: flex; justify-content: space-between; gap: 6px; }
.rename-input { width: 100%; padding: 5px 8px; border-radius: 8px; border: 2px solid var(--primary); background: var(--input-bg); outline: none; font-weight: 600; }
.lasso { position: fixed; border: 1px solid var(--primary); background: rgba(var(--primary-rgb), .1); z-index: 50; pointer-events: none; border-radius: 3px; }
.drag-ghost { position: fixed; left: -1000px; top: -1000px; padding: 8px 14px; border-radius: 12px; background: var(--primary); color: #fff; font-weight: 700; font-size: .85rem; box-shadow: 0 10px 30px rgba(0,0,0,.25); white-space: nowrap; }
.drop-overlay { display: none; position: absolute; inset: 0; background: rgba(var(--primary-rgb), .1); border: 3px dashed var(--primary); z-index: 30; align-items: center; justify-content: center; backdrop-filter: blur(2px); pointer-events: none; }
.drop-overlay.show { display: flex; }
.drop-overlay div { background: var(--card-bg); padding: 26px 36px; border-radius: 18px; text-align: center; font-weight: 800; box-shadow: 0 20px 50px var(--shadow-color); }
.drop-overlay i { display: block; font-size: 2.4rem; color: var(--primary); margin-bottom: 8px; }
.drop-overlay small { display: block; color: var(--text-muted); font-weight: 600; margin-top: 4px; }

/* Auswahl-Leiste */
.selbar { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 140%); z-index: 60; background: #1c1917; color: #fff; border-radius: 16px; padding: 8px 10px 8px 16px; display: flex; align-items: center; gap: 4px; box-shadow: 0 18px 50px rgba(0,0,0,.35); transition: transform .25s cubic-bezier(.34,1.56,.64,1); max-width: calc(100vw - 24px); overflow-x: auto; }
.selbar:not(.show) { visibility: hidden; pointer-events: none; }
.selbar.show { transform: translate(-50%, 0); }
.selbar b { margin-right: 10px; white-space: nowrap; font-size: .9rem; }
.selbar button { border: none; background: transparent; color: #e7e5e4; padding: 8px 11px; border-radius: 10px; cursor: pointer; font-size: .85rem; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.selbar button:hover { background: rgba(255,255,255,.12); color: #fff; }
.selbar button.danger:hover { background: rgba(239,68,68,.3); }
[data-theme="dark"] .selbar { background: #f5f5f4; color: #1c1917; }
[data-theme="dark"] .selbar button { color: #44403c; }
[data-theme="dark"] .selbar button:hover { background: rgba(0,0,0,.08); color: #1c1917; }

/* Uploads */
.uploads { position: fixed; right: 18px; bottom: 18px; width: 380px; max-width: calc(100vw - 24px); background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 18px; box-shadow: 0 20px 60px var(--shadow-color); z-index: 70; display: none; overflow: hidden; }
.uploads.show { display: block; }
.up-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--sidebar-bg); border-bottom: 1px solid var(--border-color); font-weight: 800; font-size: .9rem; }
.up-head span { flex: 1; }
.up-head .meter { flex: 1; margin: 0; }
.up-list { max-height: 300px; overflow-y: auto; }
.uploads.min .up-list { display: none; }
.up-item { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--border-color); font-size: .85rem; }
.up-item:last-child { border-bottom: none; }
.up-item > i { width: 20px; text-align: center; }
.up-item > div { flex: 1; min-width: 0; }
.up-item b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.up-item small { color: var(--text-muted); font-size: .74rem; }
.up-item .meter { height: 4px; margin-top: 4px; }
.up-item.done > i { color: var(--success); }
.up-item.error > i, .up-item.error small { color: var(--danger); }

/* Details-Panel */
.details { width: 0; flex-shrink: 0; overflow: hidden; border-left: 1px solid var(--border-color); background: var(--sidebar-bg); transition: width .2s; }
.details.open { width: 350px; overflow-y: auto; }
.det-inner { width: 350px; padding: 16px 18px 40px; }
.det-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.det-head h3 { flex: 1; font-size: 1.02rem; font-weight: 800; word-break: break-word; }
.det-preview { aspect-ratio: 16/10; border-radius: 14px; background: var(--hover-bg); display: flex; align-items: center; justify-content: center; font-size: 3.5rem; overflow: hidden; margin-bottom: 14px; }
.det-preview img { width: 100%; height: 100%; object-fit: contain; }
.det-sec { margin: 16px 0 8px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .9px; color: var(--text-muted); display: flex; align-items: center; justify-content: space-between; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; font-size: .84rem; }
.kv span { color: var(--text-muted); }
.kv b { font-weight: 600; word-break: break-word; }
.det-list { display: flex; flex-direction: column; gap: 6px; }
.det-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--card-bg); border: 1px solid var(--border-color); font-size: .84rem; }
.det-row > div { flex: 1; min-width: 0; }
.det-row b { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.det-row small { color: var(--text-muted); font-size: .75rem; }
.det-row .avatar { --size: 30px; }
.act-item { display: flex; gap: 10px; font-size: .82rem; padding: 6px 0; color: var(--text-secondary); }
.act-item i { width: 26px; height: 26px; border-radius: 8px; background: var(--active-bg); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: .72rem; flex-shrink: 0; }
.act-item small { display: block; color: var(--text-muted); font-size: .72rem; }
.act-item b { color: var(--text-primary); }

/* Kontextmenü */
.ctxmenu { position: fixed; z-index: 130; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 14px; box-shadow: 0 18px 50px var(--shadow-color); padding: 6px; display: none; min-width: 220px; }
.ctxmenu.show { display: block; animation: fadeIn .08s ease; }
.menu-item kbd { margin-left: auto; font-size: .68rem; color: var(--text-muted); font-family: inherit; }
.menu-title { padding: 6px 12px 4px; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }

/* Ordnerauswahl (Verschieben/Kopieren) */
.picker { border: 1px solid var(--border-color); border-radius: 14px; max-height: 340px; overflow-y: auto; padding: 6px; }
.picker .tree-item { cursor: pointer; padding: 7px 8px; }
.picker .tree-item.picked { background: var(--active-bg); color: var(--primary); font-weight: 700; }
.picker .tree { padding-left: 16px; }

/* ---------- Betrachter ---------- */
.viewer { position: fixed; inset: 0; z-index: 150; background: rgba(12,10,9,.94); display: none; flex-direction: column; color: #fff; }
.viewer.show { display: flex; animation: fadeIn .15s ease; }
.vw-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: rgba(0,0,0,.35); }
.vw-bar .vw-title { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vw-bar .vw-title small { display: block; font-weight: 500; opacity: .7; font-size: .76rem; }
.vw-bar .icon-btn { color: #e7e5e4; }
.vw-bar .icon-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.vw-body { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; padding: 12px; }
.vw-body img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.5); transition: transform .2s; }
.vw-body video { max-width: 100%; max-height: 100%; border-radius: 8px; background: #000; }
.vw-body audio { width: min(560px, 90vw); }
.vw-body iframe { width: 100%; height: 100%; border: none; border-radius: 8px; background: #fff; }
.vw-body .vw-other { text-align: center; }
.vw-body .vw-other i { font-size: 5rem; margin-bottom: 16px; display: block; }
.vw-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; border-radius: 50%; border: none; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; font-size: 1.1rem; z-index: 2; }
.vw-nav:hover { background: rgba(255,255,255,.25); }
.vw-nav.prev { left: 16px; } .vw-nav.next { right: 16px; }
.vw-editor { width: 100%; height: 100%; max-width: 1100px; display: flex; flex-direction: column; background: var(--card-bg); color: var(--text-primary); border-radius: 14px; overflow: hidden; }
.vw-editor textarea { flex: 1; width: 100%; border: none; outline: none; resize: none; padding: 18px 20px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9rem; line-height: 1.55; background: var(--card-bg); color: var(--text-primary); tab-size: 4; }
.vw-editor .ed-bar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--border-color); font-size: .8rem; color: var(--text-muted); }
.vw-editor .ed-bar .btn { margin-left: auto; }
.md-preview { padding: 20px 26px; overflow-y: auto; line-height: 1.65; }
.md-preview h1, .md-preview h2, .md-preview h3 { margin: 14px 0 8px; }
.md-preview code { background: var(--code-bg); border-radius: 5px; padding: 1px 5px; }
.md-preview pre { background: var(--code-bg); padding: 12px; border-radius: 10px; overflow-x: auto; }

/* ---------- Übersicht ---------- */
.dash { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.dash .card { grid-column: span 6; margin: 0; }
.dash .card.wide { grid-column: span 12; }
.dash .card.third { grid-column: span 4; }
.card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 18px; padding: 18px 20px; box-shadow: 0 8px 26px var(--shadow-color); }
.card h2 { font-size: 1rem; font-weight: 800; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.card h2 i { color: var(--primary); }
.card h2 .right { margin-left: auto; font-size: .8rem; font-weight: 600; text-decoration: none; }
.hello { display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-radius: 20px; color: #fff; background: linear-gradient(135deg, var(--primary), var(--secondary) 55%, var(--accent)); box-shadow: 0 16px 40px rgba(var(--primary-rgb), .3); margin-bottom: 18px; position: relative; overflow: hidden; }
.hello::after { content: '\f0c2'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; right: -20px; top: -40px; font-size: 11rem; opacity: .1; }
.hello h1 { font-size: 1.55rem; font-weight: 900; letter-spacing: -.5px; }
.hello p { opacity: .9; }
.hello .avatar { --size: 60px; border: 3px solid rgba(255,255,255,.4); }
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; position: relative; z-index: 1; }
.quick button { border: none; background: rgba(255,255,255,.18); color: #fff; padding: 8px 14px; border-radius: 30px; cursor: pointer; font-weight: 700; font-size: .82rem; display: inline-flex; gap: 8px; align-items: center; }
.quick button:hover { background: rgba(255,255,255,.3); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.mini-stat { padding: 12px 14px; border-radius: 14px; background: var(--hover-bg); text-decoration: none; color: var(--text-primary); display: block; }
.mini-stat:hover { background: var(--active-bg); }
.mini-stat i { color: var(--primary); }
.mini-stat b { display: block; font-size: 1.35rem; font-weight: 900; margin-top: 4px; }
.mini-stat span { font-size: .78rem; color: var(--text-muted); }
.quota-big { display: flex; align-items: center; gap: 18px; }
.ring { --p: 0; width: 96px; height: 96px; border-radius: 50%; background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--border-color) 0); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ring::before { content: attr(data-label); width: 74px; height: 74px; border-radius: 50%; background: var(--card-bg); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1.05rem; }
.li-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; cursor: pointer; text-decoration: none; color: var(--text-primary); }
.li-row:hover { background: var(--hover-bg); }
.li-row > div { flex: 1; min-width: 0; }
.li-row b { display: block; font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-row small { font-size: .76rem; color: var(--text-muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-row .fic { width: 36px; height: 36px; font-size: 1.15rem; }
.ev-date { width: 44px; text-align: center; border-radius: 12px; background: var(--active-bg); color: var(--primary); padding: 4px 0; flex-shrink: 0; line-height: 1.1; }
.ev-date b { display: block; font-size: 1.1rem; font-weight: 900; }
.ev-date small { font-size: .65rem; text-transform: uppercase; font-weight: 800; color: inherit !important; }
.ann-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }

/* ---------- Kalender ---------- */
.cal { display: flex; height: 100%; }
.cal-side { width: 250px; flex-shrink: 0; border-right: 1px solid var(--border-color); padding: 16px 14px; overflow-y: auto; background: var(--sidebar-bg); }
.cal-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cal-head { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--border-color); flex-wrap: wrap; }
.cal-head h2 { font-size: 1.25rem; font-weight: 900; letter-spacing: -.4px; margin: 0 8px; min-width: 200px; }
.cal-head .seg { margin-left: auto; }
.cal-body { flex: 1; min-height: 0; overflow: auto; position: relative; }
.mini-cal { margin-bottom: 18px; }
.mini-cal .mc-head { display: flex; align-items: center; justify-content: space-between; font-weight: 800; font-size: .88rem; margin-bottom: 6px; }
.mini-cal table { width: 100%; border-collapse: collapse; text-align: center; font-size: .76rem; }
.mini-cal th { color: var(--text-muted); font-weight: 700; padding: 3px 0; }
.mini-cal td { padding: 1px; }
.mini-cal td button { width: 28px; height: 28px; border-radius: 50%; border: none; background: none; cursor: pointer; font-size: .76rem; color: var(--text-secondary); }
.mini-cal td button:hover { background: var(--hover-bg); }
.mini-cal td.other button { color: var(--text-muted); opacity: .5; }
.mini-cal td.today button { background: var(--primary); color: #fff; font-weight: 800; }
.mini-cal td.sel button { box-shadow: inset 0 0 0 2px var(--primary); }
.mini-cal td.has button { font-weight: 800; }
.cal-list-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; font-size: .88rem; }
.cal-list-item:hover { background: var(--hover-bg); }
.cal-list-item input { width: 17px; height: 17px; cursor: pointer; }
.cal-list-item span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-list-item .icon-btn { width: 26px; height: 26px; opacity: 0; }
.cal-list-item:hover .icon-btn { opacity: 1; }
.month { display: flex; flex-direction: column; min-height: 100%; }
.month-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); position: sticky; top: 0; z-index: 2; background: var(--card-bg); border-bottom: 1px solid var(--border-color); }
.month-grid { flex: 1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(110px, 1fr); }
.month .dow { text-align: center; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--text-muted); padding: 8px 0; }
.mday { border-right: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); padding: 4px; min-width: 0; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.mday:nth-child(7n) { border-right: none; }
.mday.other { background: var(--sidebar-bg); }
.mday.other .dnum { opacity: .45; }
.mday.weekend { background: rgba(var(--primary-rgb), .02); }
.mday .dnum { font-size: .8rem; font-weight: 700; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); flex-shrink: 0; }
.mday.today .dnum { background: var(--primary); color: #fff; }
.mday.drop-hover { background: var(--active-bg) !important; }
.ev { font-size: .76rem; padding: 2px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; color: #fff; background: var(--evc, var(--primary)); font-weight: 600; flex-shrink: 0; }
.ev.timed { background: transparent; color: var(--text-primary); display: flex; align-items: center; gap: 5px; }
.ev.timed::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--evc, var(--primary)); flex-shrink: 0; }
.ev.timed:hover { background: var(--hover-bg); }
.ev .t { font-weight: 700; opacity: .85; }
.ev.past { opacity: .6; }
.more-ev { font-size: .72rem; color: var(--text-muted); font-weight: 700; padding: 0 6px; }
.week { display: grid; grid-template-columns: 60px repeat(var(--days, 7), minmax(0, 1fr)); position: relative; }
.wk-head { position: sticky; top: 0; z-index: 3; background: var(--card-bg); border-bottom: 1px solid var(--border-color); text-align: center; padding: 8px 4px; font-size: .78rem; color: var(--text-muted); font-weight: 700; }
.wk-head b { display: block; font-size: 1.3rem; color: var(--text-primary); font-weight: 900; }
.wk-head.today b { color: var(--primary); }
.wk-allday { border-bottom: 1px solid var(--border-color); border-left: 1px solid var(--border-color); padding: 3px; min-height: 30px; display: flex; flex-direction: column; gap: 2px; }
.wk-label { font-size: .68rem; color: var(--text-muted); text-align: right; padding: 4px 6px 0 0; border-bottom: 1px solid var(--border-color); }
.wk-times { position: relative; }
.wk-hour { height: 48px; font-size: .68rem; color: var(--text-muted); text-align: right; padding-right: 6px; transform: translateY(-7px); }
.wk-col { position: relative; border-left: 1px solid var(--border-color); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 47px, var(--border-color) 47px, var(--border-color) 48px); cursor: pointer; }
.wk-col.today { background-color: rgba(var(--primary-rgb), .03); }
.wk-ev { position: absolute; left: 3px; right: 3px; border-radius: 8px; padding: 3px 6px; font-size: .74rem; color: #fff; background: var(--evc, var(--primary)); overflow: hidden; cursor: pointer; border: 1px solid rgba(255,255,255,.4); box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.wk-ev b { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: #ef4444; z-index: 2; }
.now-line::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; }
.agenda { padding: 10px 22px 60px; max-width: 900px; }
.ag-day { display: flex; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--border-color); }
.ag-date { width: 70px; flex-shrink: 0; text-align: center; }
.ag-date b { display: block; font-size: 1.6rem; font-weight: 900; line-height: 1; }
.ag-date small { color: var(--text-muted); font-weight: 700; font-size: .75rem; text-transform: uppercase; }
.ag-day.today .ag-date b { color: var(--primary); }
.ag-evs { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.ag-ev { display: flex; gap: 12px; align-items: flex-start; padding: 8px 12px; border-radius: 12px; cursor: pointer; border-left: 4px solid var(--evc, var(--primary)); background: var(--hover-bg); }
.ag-ev:hover { background: var(--active-bg); }
.ag-ev .tm { width: 100px; flex-shrink: 0; font-size: .82rem; color: var(--text-muted); font-weight: 700; }
.ag-ev b { display: block; }
.ag-ev small { color: var(--text-muted); }
.color-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.color-pick label { cursor: pointer; }
.color-pick input { display: none; }
.color-pick span { display: block; width: 26px; height: 26px; border-radius: 50%; border: 3px solid transparent; }
.color-pick input:checked + span { border-color: var(--text-primary); }
.days-pick { display: flex; gap: 4px; flex-wrap: wrap; }
.days-pick label { cursor: pointer; }
.days-pick input { display: none; }
.days-pick span { display: block; width: 36px; padding: 6px 0; text-align: center; border-radius: 9px; border: 1px solid var(--border-color); font-size: .78rem; font-weight: 700; }
.days-pick input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.ev-popup h4 { font-size: 1.05rem; font-weight: 800; display: flex; gap: 10px; align-items: center; }
.ev-popup h4::before { content: ''; width: 12px; height: 12px; border-radius: 4px; background: var(--evc, var(--primary)); flex-shrink: 0; }
.ev-popup .ev-meta { font-size: .85rem; color: var(--text-secondary); margin: 8px 0; display: flex; flex-direction: column; gap: 4px; }
.ev-popup .ev-meta i { width: 18px; color: var(--text-muted); }
.ev-popup .ev-desc { font-size: .85rem; white-space: pre-wrap; background: var(--hover-bg); padding: 8px 10px; border-radius: 10px; max-height: 160px; overflow-y: auto; }

/* ---------- Kontakte ---------- */
.ct { display: flex; height: 100%; }
.ct-list { width: 340px; flex-shrink: 0; border-right: 1px solid var(--border-color); display: flex; flex-direction: column; background: var(--sidebar-bg); }
.ct-tools { padding: 14px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--border-color); }
.ct-tools .row { display: flex; gap: 6px; }
.ct-tools .input { padding: 8px 12px; }
.ct-scroll { flex: 1; overflow-y: auto; padding: 6px; }
.ct-letter { font-size: .72rem; font-weight: 900; color: var(--primary); padding: 10px 10px 4px; position: sticky; top: -6px; background: var(--sidebar-bg); z-index: 1; }
.ct-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; cursor: pointer; }
.ct-item:hover { background: var(--hover-bg); }
.ct-item.active { background: var(--active-bg); }
.ct-item > div { flex: 1; min-width: 0; }
.ct-item b { display: block; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-item small { font-size: .75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.ct-item .avatar { --size: 38px; border-radius: 50%; }
.ct-item .fa-star { color: #f59e0b; font-size: .75rem; }
.ct-detail { flex: 1; min-width: 0; overflow-y: auto; }
.ct-card { max-width: 760px; margin: 0 auto; padding: 26px 30px 80px; }
.ct-top { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.ct-top .avatar { --size: 96px; border-radius: 50%; font-size: 2.2rem; }
.ct-top h1 { font-size: 1.6rem; font-weight: 900; letter-spacing: -.5px; }
.ct-top p { color: var(--text-muted); }
.ct-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ct-field { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border-color); }
.ct-field > i { width: 20px; color: var(--primary); margin-top: 3px; text-align: center; }
.ct-field > div { flex: 1; min-width: 0; }
.ct-field small { display: block; font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .6px; font-weight: 700; }
.ct-field a { color: var(--text-primary); text-decoration: none; }
.ct-field a:hover { color: var(--primary); }
.ct-field .val { margin-bottom: 6px; white-space: pre-wrap; word-break: break-word; }
.ct-field .val:last-child { margin-bottom: 0; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 20px; background: var(--active-bg); color: var(--primary); font-size: .75rem; font-weight: 700; margin: 0 4px 4px 0; }
.multi-row { display: flex; gap: 6px; margin-bottom: 6px; align-items: center; }
.multi-row select { width: 110px; flex-shrink: 0; }
.multi-row .input { flex: 1; min-width: 0; }
.addr-grid { display: grid; grid-template-columns: 110px 1fr 1fr; gap: 6px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--border-color); }
.addr-grid .full { grid-column: 2 / 4; }
.form-sec { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--text-muted); margin: 16px 0 8px; }

/* Einstellungen */
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qr-box { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.qr-box #qrcode { background: #fff; padding: 10px; border-radius: 12px; }
.qr-box code { font-size: .85rem; word-break: break-all; background: var(--code-bg); padding: 6px 10px; border-radius: 8px; display: inline-block; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: .72rem; font-weight: 700; background: var(--hover-bg); color: var(--text-secondary); border: 1px solid var(--border-color); }
.pill.green { background: rgba(16,185,129,.12); color: #047857; border-color: rgba(16,185,129,.3); }
.pill.red { background: rgba(239,68,68,.1); color: #b91c1c; border-color: rgba(239,68,68,.3); }
.pill.amber { background: rgba(245,158,11,.12); color: #b45309; border-color: rgba(245,158,11,.3); }
.pill.blue { background: rgba(59,130,246,.1); color: #1d4ed8; border-color: rgba(59,130,246,.3); }
.muted { color: var(--text-muted); }
.link-box { display: flex; gap: 6px; }
.link-box input { flex: 1; min-width: 0; font-family: ui-monospace, Consolas, monospace; font-size: .8rem; }
.user-hits { border: 1px solid var(--border-color); border-radius: 12px; margin-top: 6px; overflow: hidden; }
.user-hits:empty { display: none; }
.user-hits button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border: none; background: var(--card-bg); cursor: pointer; text-align: left; }
.user-hits button:hover { background: var(--hover-bg); }
.user-hits .avatar { --size: 26px; }

/* Backend: wiederholbare Zeilen (Anmeldeseite) */
.rep { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.rep-row { display: flex; gap: 8px; align-items: center; padding: 6px; border-radius: 12px; border: 1px dashed transparent; }
.rep-row.rep-col { align-items: flex-start; }
.rep-row:hover { border-color: var(--border-color); }
.rep-row.dragging { opacity: .5; }
.rep-row .input { flex: 1; min-width: 0; padding: 8px 12px; }
.rep-handle { cursor: grab; color: var(--text-muted); padding: 0 4px; }
.sticky-actions { position: sticky; bottom: 12px; z-index: 5; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; padding: 12px; box-shadow: 0 10px 30px var(--shadow-color); margin-bottom: 20px; }

/* ============================================
   MOBIL
   ============================================ */
@media (max-width: 1100px) {
    .details.open { position: fixed; right: 0; top: 0; bottom: 0; z-index: 60; box-shadow: -10px 0 40px var(--shadow-color); }
    .dash .card, .dash .card.third { grid-column: span 12; }
    .lp { flex-direction: column-reverse !important; align-items: stretch; padding: 24px; gap: 24px; }
    .lp-auth { width: 100%; max-width: 480px; margin: 0 auto; position: static; }
}
@media (max-width: 820px) {
    .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-105%); transition: transform .25s ease; }
    .app.sb-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
    .app.sb-open .sb-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 35; }
    .sb-close, .mobile-only { display: inline-flex; }
    .search-box kbd { display: none; }
    .view-pad { padding: 14px 14px 120px; }
    .frow { grid-template-columns: 30px 40px minmax(0, 1fr) 40px; }
    .frow .fsize, .frow .fdate, .frow.head .hsize, .frow.head .hdate { display: none; }
    .frow .more { opacity: 1; }
    .fgrid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .cal-side { display: none; }
    .cal-head h2 { min-width: 0; font-size: 1.05rem; }
    .month-grid { grid-auto-rows: minmax(80px, 1fr); }
    .ev .t { display: none; }
    .ct-list { width: 100%; }
    .ct.show-detail .ct-list { display: none; }
    .ct:not(.show-detail) .ct-detail { display: none; }
    .ct-card { padding: 16px 16px 80px; }
    .set-grid { grid-template-columns: 1fr; }
    .field-row { flex-direction: column; gap: 0; }
    .addr-grid { grid-template-columns: 1fr 1fr; }
    .addr-grid .full { grid-column: 1 / 3; }
    .lp-headline { font-size: 1.8rem; }
    .lp-stats { flex-wrap: wrap; }
    .uploads { right: 8px; bottom: 8px; }
}
@media (hover: none) {
    .frow .more, .fcard .more, .fcard .ck { opacity: 1; }
}

/* ============================================
   2.0.0 – Benachrichtigungen, Schlagwörter, Kommentare, Aufgaben,
   Notizen, Fotos, Speicheranalyse, Geräte, Branding
   ============================================ */
.brand-logo.brand-img { background: transparent; box-shadow: none; overflow: hidden; }
.brand-logo.brand-img img { width: 100%; height: 100%; object-fit: contain; }
.nav-count { font-style: normal; font-size: .7rem; font-weight: 800; color: var(--text-muted); background: var(--hover-bg); border-radius: 10px; padding: 1px 7px; }
.nav-count.hot { background: var(--primary); color: #fff; }
.sb-quota a { color: inherit; text-decoration: none; display: block; border-radius: 10px; margin: -6px -8px; padding: 6px 8px; }
.sb-quota a:hover { background: var(--hover-bg); }

/* Glocke */
.notif-btn { position: relative; }
.notif-badge { position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--danger); color: #fff; font-size: .64rem; font-weight: 800; display: flex; align-items: center; justify-content: center; padding: 0 4px; border: 2px solid var(--card-bg); }
.notif-btn.has > i { color: var(--primary); }
.notif-btn.ring > i { animation: bellRing .9s ease; }
@keyframes bellRing { 0%,100% { transform: rotate(0); } 15% { transform: rotate(16deg); } 30% { transform: rotate(-14deg); } 45% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }
.notif-panel { position: fixed; z-index: 120; width: min(400px, calc(100vw - 16px)); max-height: min(560px, calc(100vh - 80px)); display: flex; flex-direction: column; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 18px; box-shadow: 0 24px 60px var(--shadow-color); animation: popIn .18s ease; overflow: hidden; }
.np-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border-color); }
.np-head b { flex: 1; font-weight: 800; }
.np-head b i { color: var(--primary); margin-right: 6px; }
.np-list { overflow-y: auto; padding: 6px; }
.np-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 12px; cursor: pointer; position: relative; }
.np-item:hover { background: var(--hover-bg); }
.np-item.unread { background: var(--active-bg); }
.np-item.unread::before { content: ''; position: absolute; left: 3px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--primary); }
.np-item .avatar { --size: 34px; }
.np-ic { width: 34px; height: 34px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--hover-bg); color: var(--primary); }
.np-ic.t-broadcast { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; }
.np-ic.t-quota { background: rgba(245,158,11,.15); color: #d97706; }
.np-ic.t-link_upload { background: rgba(16,185,129,.14); color: #059669; }
.np-body { flex: 1; min-width: 0; font-size: .86rem; }
.np-body > b { display: block; font-weight: 700; line-height: 1.35; }
.np-text { color: var(--text-secondary); margin-top: 3px; max-height: 4.4em; overflow: hidden; overflow-wrap: anywhere; }
.np-item.expanded .np-text { max-height: none; }
.np-body small { color: var(--text-muted); font-size: .72rem; }
.np-item .icon-btn { opacity: 0; }
.np-item:hover .icon-btn { opacity: 1; }

/* Schlagwörter */
.tag-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.tag-tree { padding-left: 14px; }
.tag-item { gap: 8px; }
.tree-item .tag-dot, .task-nav .tag-dot { flex: 0 0 10px; }
.tag-item .nav-count { padding: 0 6px; }
.ftag, .tag-chip { --c: #57534e; display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 20px; font-size: .7rem; font-weight: 700; text-decoration: none; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
[data-theme="dark"] .ftag, [data-theme="dark"] .tag-chip { color: color-mix(in srgb, var(--c) 70%, #fff); }
.ftag:hover { background: color-mix(in srgb, var(--c) 22%, transparent); }
.tag-chip { font-size: .76rem; padding: 3px 10px; max-width: none; }
.tag-chip button { border: none; background: none; color: inherit; cursor: pointer; padding: 0 0 0 2px; font-size: .7rem; opacity: .7; }
.tag-chip button:hover { opacity: 1; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-pick-list { display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; }
.tag-pick { margin: 3px 0; }
.tag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tag-card { --c: #57534e; position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 16px; text-decoration: none; color: var(--text-primary); background: var(--card-bg); border: 1px solid var(--border-color); border-top: 4px solid var(--c); box-shadow: 0 6px 18px var(--shadow-color); transition: transform .12s; }
.tag-card:hover { transform: translateY(-2px); }
.tag-card b { font-size: 1rem; }
.tag-card small { color: var(--text-muted); }
.tag-card .tag-dot { width: 14px; height: 14px; }
.tag-card .icon-btn { position: absolute; top: 10px; right: 10px; }
.view-head h1 .tag-dot { width: 16px; height: 16px; }

/* Kommentare */
.cm-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.cm { display: flex; gap: 9px; }
.cm .avatar { --size: 28px; }
.cm-body { flex: 1; min-width: 0; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 4px 14px 14px 14px; padding: 7px 10px; font-size: .84rem; }
.cm-meta { display: flex; align-items: center; gap: 6px; }
.cm-meta b { font-weight: 700; }
.cm-meta small { color: var(--text-muted); font-size: .7rem; }
.cm-acts { margin-left: auto; display: none; gap: 2px; }
.cm:hover .cm-acts { display: inline-flex; }
.cm-acts button { border: none; background: none; color: var(--text-muted); cursor: pointer; font-size: .7rem; padding: 2px 4px; border-radius: 6px; }
.cm-acts button:hover { color: var(--primary); background: var(--hover-bg); }
.cm-text { overflow-wrap: anywhere; margin-top: 2px; color: var(--text-secondary); }
.cm-form { display: flex; gap: 6px; align-items: flex-end; }
.cm-form textarea { flex: 1; resize: vertical; min-height: 42px; font-size: .85rem; padding: 8px 10px; }

/* Aufgaben */
.view.view-flush { overflow: hidden; }
.task-app { display: flex; height: 100%; min-height: 0; }
.task-side { width: 250px; flex-shrink: 0; border-right: 1px solid var(--border-color); padding: 16px 10px; overflow-y: auto; background: var(--sidebar-bg); }
.task-main { flex: 1; min-width: 0; overflow-y: auto; padding: 20px 26px 120px; }
.task-nav { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--text-secondary); text-decoration: none; font-weight: 600; font-size: .9rem; }
.task-nav:hover { background: var(--hover-bg); }
.task-nav.active { background: var(--active-bg); color: var(--primary); }
.task-nav > i { width: 18px; text-align: center; }
.task-nav span:not(.tag-dot) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-nav em { font-style: normal; font-size: .72rem; font-weight: 800; color: var(--text-muted); }
.task-nav .tag-dot { margin: 0 4px; }
.task-sec { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 16px 6px 6px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .9px; color: var(--text-muted); }
.task-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.task-head h1 { font-size: 1.45rem; font-weight: 900; letter-spacing: -.5px; display: flex; gap: 10px; align-items: center; }
.task-head .actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.task-add { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 16px; border-radius: 14px; border: 1px solid var(--border-color); background: var(--card-bg); margin-bottom: 14px; box-shadow: 0 4px 14px var(--shadow-color); }
.task-add > i { color: var(--primary); }
.task-add input[type=text] { flex: 1; min-width: 0; border: none; outline: none; background: none; font-size: .95rem; padding: 6px 0; color: var(--text-primary); }
.task-add input[type=date] { border: 1px solid var(--border-color); border-radius: 9px; padding: 5px 8px; background: var(--input-bg); color: var(--text-secondary); font-size: .8rem; }
.task-list { display: flex; flex-direction: column; gap: 6px; }
.task { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--card-bg); border: 1px solid var(--border-color); transition: opacity .25s, transform .25s; }
.task:hover { border-color: var(--primary-light); }
.task.prio-3 { border-left: 4px solid #dc2626; }
.task.prio-2 { border-left: 4px solid #f59e0b; }
.task.prio-1 { border-left: 4px solid #3b82f6; }
.task.done .task-title { text-decoration: line-through; color: var(--text-muted); }
.task.ticking, .task-mini.ticking { opacity: .4; transform: translateX(8px); }
.task-check { border: none; background: none; cursor: pointer; font-size: 1.25rem; color: var(--text-muted); padding: 0; line-height: 1; margin-top: 1px; min-width: 22px; min-height: 22px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.task-check:hover { color: var(--success); }
.task.done .task-check { color: var(--success); }
.task-body { flex: 1; min-width: 0; cursor: pointer; }
.task-title { font-weight: 600; overflow-wrap: anywhere; }
.task-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .75rem; color: var(--text-muted); margin-top: 3px; }
.task-meta:empty { display: none; }
.task-meta .tl { display: inline-flex; align-items: center; gap: 5px; }
.task-meta .tn { max-width: 340px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-meta .prio { color: #d97706; }
.task.prio-3 .prio { color: #dc2626; }
.due { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.due.today { color: #2563eb; }
.due.overdue { color: var(--danger); }
.task-star { border: none; background: none; cursor: pointer; color: var(--text-muted); font-size: 1rem; padding: 2px; }
.task-star.on { color: #eab308; }
.due-quick { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 12px; }
.due-quick button { border: 1px solid var(--border-color); background: var(--hover-bg); border-radius: 20px; padding: 4px 11px; font-size: .78rem; cursor: pointer; color: var(--text-secondary); font-weight: 600; }
.due-quick button:hover { border-color: var(--primary); color: var(--primary); }
.task-mini { cursor: pointer; }
.task-mini .task-check { font-size: 1.15rem; }
.task-mini small .due { margin-left: 4px; }

/* Notizen */
.note-grid { column-width: 250px; column-gap: 14px; }
.note { --nb: var(--card-bg); --nbd: var(--border-color); break-inside: avoid; margin-bottom: 14px; background: var(--nb); border: 1px solid var(--nbd); border-radius: 16px; padding: 14px 16px 8px; cursor: pointer; box-shadow: 0 6px 18px var(--shadow-color); transition: transform .12s, box-shadow .12s; display: block; }
.note:hover { transform: translateY(-2px); box-shadow: 0 12px 28px var(--shadow-color); }
.note h3 { font-size: 1rem; font-weight: 800; margin-bottom: 6px; overflow-wrap: anywhere; }
.note-body { padding: 0 !important; max-height: 320px; overflow: hidden; font-size: .87rem; line-height: 1.5; color: var(--text-secondary); overflow-wrap: anywhere; }
.note-body h1, .note-body h2, .note-body h3 { font-size: .95rem; margin: 6px 0 4px; }
.note-foot { display: flex; align-items: center; gap: 2px; margin-top: 8px; }
.note-foot small { flex: 1; color: var(--text-muted); font-size: .72rem; }
.note-foot .icon-btn { opacity: .55; }
.note:hover .note-foot .icon-btn { opacity: 1; }
.nc-yellow { --nb: #fef9c3; --nbd: #fde68a; }  .nc-orange { --nb: #ffedd5; --nbd: #fed7aa; }  .nc-red { --nb: #fee2e2; --nbd: #fecaca; }
.nc-pink { --nb: #fce7f3; --nbd: #fbcfe8; }    .nc-purple { --nb: #ede9fe; --nbd: #ddd6fe; }  .nc-blue { --nb: #dbeafe; --nbd: #bfdbfe; }
.nc-teal { --nb: #ccfbf1; --nbd: #99f6e4; }    .nc-green { --nb: #dcfce7; --nbd: #bbf7d0; }   .nc-gray { --nb: #f1f5f9; --nbd: #e2e8f0; }
[data-theme="dark"] .nc-yellow { --nb: #3a3410; --nbd: #5c5115; } [data-theme="dark"] .nc-orange { --nb: #3b2312; --nbd: #5c3518; } [data-theme="dark"] .nc-red { --nb: #3b1717; --nbd: #5c2121; }
[data-theme="dark"] .nc-pink { --nb: #3a1729; --nbd: #5c2142; } [data-theme="dark"] .nc-purple { --nb: #2a1f45; --nbd: #3f2f69; } [data-theme="dark"] .nc-blue { --nb: #172745; --nbd: #213a69; }
[data-theme="dark"] .nc-teal { --nb: #0f3532; --nbd: #15514b; } [data-theme="dark"] .nc-green { --nb: #133220; --nbd: #1b4d2f; } [data-theme="dark"] .nc-gray { --nb: #1e2530; --nbd: #2e3846; }
.note-editor { --nb: var(--card-bg); --nbd: var(--border-color); background: var(--nb); border: 1px solid var(--nbd); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; min-height: 340px; }
.note-title-in { border: none; outline: none; background: none; font-size: 1.15rem; font-weight: 800; padding: 4px 0 8px; color: var(--text-primary); border-bottom: 1px solid var(--nbd); margin-bottom: 8px; }
.note-text-in { flex: 1; border: none; outline: none; background: none; resize: vertical; min-height: 280px; font: inherit; font-size: .93rem; line-height: 1.6; color: var(--text-primary); }
.note-prev { padding: 0 !important; min-height: 280px; }
.note-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.note-colors { display: flex; gap: 5px; margin-right: auto; flex-wrap: wrap; }
.ncs { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--nbd, var(--border-color)); background: var(--nb, var(--card-bg)); cursor: pointer; }
.ncs.nc-default { --nb: var(--card-bg); --nbd: var(--border-color); }
.ncs.sel { outline: 2px solid var(--primary); outline-offset: 2px; }
.note-mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.note-mini { --nb: var(--hover-bg); --nbd: var(--border-color); background: var(--nb); border: 1px solid var(--nbd); border-radius: 12px; padding: 10px 12px; text-decoration: none; color: var(--text-primary); display: block; }
.note-mini b { display: block; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-mini span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: .78rem; color: var(--text-secondary); margin-top: 2px; }
.search-box.sm { flex: 0 1 260px; }
.search-box.sm input { padding: 7px 12px 7px 36px; font-size: .85rem; }
.search-box.sm > i { left: 13px; }

/* Fotos */
.ph-group { margin-bottom: 22px; }
.ph-group h3 { font-size: 1rem; font-weight: 800; margin-bottom: 10px; position: sticky; top: 0; background: var(--app-bg); padding: 6px 0; z-index: 2; }
.ph-group h3 small { color: var(--text-muted); font-weight: 600; font-size: .78rem; margin-left: 6px; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.ph-size-l .ph-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.ph { position: relative; aspect-ratio: 1; border: none; padding: 0; border-radius: 10px; overflow: hidden; background: var(--hover-bg); cursor: pointer; color: var(--text-muted); font-size: 2rem; }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; display: block; }
.ph:hover img { transform: scale(1.06); }
.ph-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 42px; height: 42px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: .95rem; display: flex; align-items: center; justify-content: center; }
.ph-fav { position: absolute; top: 6px; right: 8px; color: #fbbf24; font-size: .85rem; text-shadow: 0 1px 4px rgba(0,0,0,.6); }

/* Speicher */
.st-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.st-donut { width: 170px; height: 170px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.st-donut > div { width: 112px; height: 112px; border-radius: 50%; background: var(--card-bg); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.st-donut b { font-size: 1.05rem; font-weight: 900; }
.st-donut small { font-size: .72rem; color: var(--text-muted); }
.st-legend { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 5px; }
.st-li { display: grid; grid-template-columns: 12px 20px 1fr auto 44px; align-items: center; gap: 8px; font-size: .85rem; }
.st-li.zero { opacity: .45; }
.st-li i { color: var(--text-muted); text-align: center; }
.st-li b { font-weight: 700; text-align: right; }
.st-li small { color: var(--text-muted); text-align: right; font-size: .72rem; }
.st-sw { width: 12px; height: 12px; border-radius: 4px; }
.st-action { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--border-color); }
.st-action:last-child { border-bottom: none; }
.st-action > i { width: 36px; height: 36px; border-radius: 11px; background: var(--hover-bg); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.st-action > div { flex: 1; min-width: 0; }
.st-action b { display: block; font-weight: 700; font-size: .9rem; }
.st-action small { color: var(--text-muted); font-size: .78rem; }
.st-size { font-weight: 700; font-size: .85rem; color: var(--text-secondary); white-space: nowrap; }
.dash .card.st-wide { grid-column: span 6; }

/* Geräte */
.dev-list { display: flex; flex-direction: column; gap: 8px; }
.dev { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border-color); background: var(--card-bg); }
.dev > div { flex: 1; min-width: 0; }
.dev b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; font-size: .9rem; }
.dev small { color: var(--text-muted); font-size: .76rem; display: block; margin-top: 2px; }
.dev-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--active-bg); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }

@media (max-width: 1100px) {
    .dash .card.st-wide { grid-column: span 12; }
}
@media (max-width: 820px) {
    .task-app { flex-direction: column; }
    .task-side { width: auto; border-right: none; border-bottom: 1px solid var(--border-color); padding: 8px; display: flex; gap: 4px; overflow-x: auto; overflow-y: hidden; flex-shrink: 0; }
    .task-side .task-smart { display: contents; }
    .task-side .task-sec { display: none; }
    .task-nav { white-space: nowrap; flex-shrink: 0; padding: 6px 10px; font-size: .82rem; }
    .task-main { padding: 14px 14px 120px; }
    .task-add input[type=date] { width: 120px; }
    .task-add .btn { display: none; }
    .ph-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 4px; }
    .note-grid { column-width: 160px; }
    .st-li { grid-template-columns: 12px 20px 1fr auto; }
    .st-li small { display: none; }
}
@media (hover: none) {
    .np-item .icon-btn, .cm-acts { opacity: 1; display: inline-flex; }
}

/* ============================================
   2.4.0 – Radio & Google-Kalender
   ============================================ */
/* Player-Leiste */
.radio-bar { position: fixed; left: calc(var(--sidebar-w) + 18px); bottom: 18px; z-index: 65; display: none; align-items: center; gap: 6px; width: min(720px, calc(100vw - var(--sidebar-w) - 36px)); padding: 8px 10px; border-radius: 18px; background: var(--card-bg); border: 1px solid var(--border-color); box-shadow: 0 18px 50px var(--shadow-color); animation: popIn .25s ease; }
.radio-bar.show { display: flex; }
.rb-logo { width: 46px; height: 46px; border-radius: 12px; overflow: hidden; flex-shrink: 0; position: relative; background: var(--hover-bg); }
.rb-logo img, .rd-logo img, .rs-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; z-index: 1; }
.rd-fb { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; font-size: 1rem; letter-spacing: .5px; }
.rb-info { flex: 1; min-width: 0; cursor: pointer; padding: 0 4px; }
.rb-info b { display: block; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-info small { display: block; font-size: .75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-live { display: inline-block; font-size: .58rem; font-weight: 900; letter-spacing: .8px; color: #fff; background: var(--danger); border-radius: 4px; padding: 1px 4px; margin-right: 3px; vertical-align: 1px; }
.rb-play { width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer; flex-shrink: 0; color: #fff; font-size: 1rem; background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: 0 6px 16px rgba(var(--primary-rgb), .35); display: inline-flex; align-items: center; justify-content: center; }
.rb-play:hover { transform: scale(1.06); }
.radio-bar .icon-btn.on { color: #eab308; }
.radio-bar [data-rb="sleep"].on { color: var(--primary); }
.radio-bar [data-rb="sleep"] em { font-style: normal; font-size: .62rem; font-weight: 800; margin-left: 2px; }
.rb-vol { display: flex; align-items: center; gap: 2px; }
.rb-vol input { width: 90px; accent-color: var(--primary); }
.rb-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; flex-shrink: 0; }
.rb-eq i { width: 3px; background: var(--primary); border-radius: 2px; animation: eq 1s ease-in-out infinite; }
.rb-eq i:nth-child(2) { animation-delay: -.3s; } .rb-eq i:nth-child(3) { animation-delay: -.6s; } .rb-eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 16px; } }
.nav-eq { height: 12px; }
.nav-eq[hidden] { display: none; }
body.has-radio .selbar { bottom: 96px; }
body.has-radio .toasts, body.has-radio .uploads { bottom: 96px; }
body.has-radio .main { padding-bottom: 84px; }

/* Senderliste */
.rd-sec { margin: 6px 0 10px; }
.rd-sec em { font-style: normal; color: var(--text-muted); font-weight: 700; margin-left: 4px; }
.rd-sec i { color: var(--primary); margin-right: 4px; }
.rd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.rd-card { position: relative; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 18px; padding: 10px; cursor: pointer; transition: transform .12s, box-shadow .12s, border-color .12s; box-shadow: 0 6px 18px var(--shadow-color); }
.rd-card:hover { transform: translateY(-2px); border-color: var(--primary-light); }
.rd-card.current { border-color: var(--primary); box-shadow: 0 10px 28px rgba(var(--primary-rgb), .22); }
.rd-art { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--hover-bg); }
.rd-logo { position: absolute; inset: 0; }
.rd-logo .rd-fb { font-size: 2rem; }
.rd-logo img { padding: 10%; }
.rd-play { position: absolute; right: 10px; bottom: 10px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer; color: #fff; font-size: 1rem; background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: 0 8px 20px rgba(0,0,0,.3); opacity: 0; transform: translateY(6px); transition: opacity .15s, transform .15s; display: flex; align-items: center; justify-content: center; }
.rd-card:hover .rd-play, .rd-card.current .rd-play { opacity: 1; transform: none; }
.rd-eq { position: absolute; left: 10px; bottom: 12px; z-index: 2; background: rgba(0,0,0,.45); padding: 4px 6px; border-radius: 8px; height: 24px; }
.rd-eq i { background: #fff; }
.rd-body { padding: 10px 4px 2px; min-width: 0; }
.rd-body b { display: block; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-body small { display: block; font-size: .74rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-now { font-size: .74rem; color: var(--primary); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.rd-acts { position: absolute; top: 14px; right: 14px; z-index: 2; display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.rd-acts .icon-btn { background: var(--card-bg); box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.rd-acts .icon-btn.on { color: #eab308; opacity: 1; }
.rd-card:hover .rd-acts { opacity: 1; }
.rd-card .rd-acts:has(.on) { opacity: 1; }
.re-logo-prev { width: 40px; height: 40px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--hover-bg); }
.re-logo-prev img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.rs-form { display: flex; gap: 8px; margin-bottom: 10px; }
.rs-form .search-box { max-width: none; }
.rs-form select { width: 190px; flex-shrink: 0; }
.rs-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.rs-tags button { border: 1px solid var(--border-color); background: var(--hover-bg); border-radius: 20px; padding: 4px 11px; font-size: .78rem; cursor: pointer; color: var(--text-secondary); font-weight: 600; }
.rs-tags button.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.rs-res { max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.rs-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; border: 1px solid var(--border-color); }
.rs-row > div { flex: 1; min-width: 0; }
.rs-row b { display: block; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-row small { display: block; font-size: .74rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-logo { width: 42px; height: 42px; border-radius: 10px; overflow: hidden; position: relative; flex-shrink: 0; background: var(--hover-bg); }

/* Google-Kalender */
.g-ic { font-size: .7rem; color: #4285f4; }
.g-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; border: 1px solid var(--border-color); background: var(--card-bg); margin-bottom: 8px; }
.g-card.on { border-color: rgba(66,133,244,.45); background: rgba(66,133,244,.06); }
.g-card > div:last-child { flex: 1; min-width: 0; }
.g-card b { display: block; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-card small { display: block; font-size: .72rem; color: var(--text-muted); line-height: 1.35; }
.g-logo { width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1rem; color: #4285f4; }
.g-actions { display: flex; gap: 6px; }
.g-actions .btn:first-child { flex: 1; }
.g-err { font-size: .75rem; color: var(--danger); background: rgba(239,68,68,.08); border-radius: 10px; padding: 7px 9px; margin-bottom: 8px; }
.g-list { display: flex; flex-direction: column; gap: 8px; }
.g-cal { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border-color); background: var(--hover-bg); cursor: pointer; }
.g-cal input { position: absolute; opacity: 0; pointer-events: none; }
.g-cal.on { border-color: rgba(var(--primary-rgb), .45); background: var(--active-bg); }
.g-cal.busy { opacity: .6; pointer-events: none; }
.g-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.g-name { flex: 1; min-width: 0; }
.g-name b { display: block; font-size: .92rem; }
.g-name small { color: var(--text-muted); font-size: .76rem; }
.g-cal .feat-sw { width: 40px; height: 23px; border-radius: 12px; background: var(--border-color); position: relative; flex-shrink: 0; transition: background .15s; }
.g-cal .feat-sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.g-cal.on .feat-sw { background: var(--primary); }
.g-cal.on .feat-sw::after { transform: translateX(17px); }

@media (max-width: 820px) {
    .radio-bar { left: 8px; right: 8px; bottom: 8px; width: auto; padding: 6px 8px; gap: 4px; }
    .rb-vol, .radio-bar [data-rb="prev"] { display: none; }
    .rb-logo { width: 40px; height: 40px; }
    .rd-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
    .rd-play, .rd-acts { opacity: 1; transform: none; }
    .rs-form { flex-direction: column; }
    .rs-form select { width: 100%; }
    body.has-radio .selbar, body.has-radio .toasts, body.has-radio .uploads { bottom: 74px; }
    body.has-radio .main { padding-bottom: 66px; }
}
@media (hover: none) {
    .rd-play, .rd-acts { opacity: 1; transform: none; }
}

/* 2.4.1 – gesperrte Funktionen ausblenden */
body.no-files_write [data-action="upload-files"], body.no-files_write .sb-new, body.no-files_write .dropzone-hint { display: none !important; }
body.no-calendar [data-action="new-event"], body.no-contacts [data-go="#/contacts/new"] { display: none !important; }
.imp-bar { position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 200; background: #f59e0b; color: #111; font-weight: 700; font-size: .82rem; padding: 6px 14px; border-radius: 0 0 14px 14px; box-shadow: 0 8px 20px rgba(0,0,0,.2); display: flex; gap: 10px; align-items: center; }
.imp-bar a { color: #111; text-decoration: underline; }
