        :root {
            --bg-dark: #121212;
            --bg-card: #1e1e1e;
            --text-main: #e0e0e0;
            --accent: #e91e63;
            --edit: #ffb74d;
            --save: #4caf50;
            --warning: #ff5252;
        }

        body {
            font-family: 'Segoe UI', sans-serif;
            max-width: 800px;
            margin: 20px auto;
            padding: 20px;
            background-color: var(--bg-dark);
            color: var(--text-main);
        }

        .box {
            border: 1px solid #333;
            padding: 20px;
            border-radius: 12px;
            background: var(--bg-card);
            margin-bottom: 25px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        }

        h1,
        h2 {
            color: #fff;
            margin-top: 0;
            text-align: center;
            letter-spacing: 1px;
        }

        h1 span {
            color: var(--accent);
        }

        input,
        textarea,
        button {
            width: 100%;
            padding: 12px;
            margin: 8px 0;
            border: 1px solid #444;
            border-radius: 8px;
            box-sizing: border-box;
            background: #2a2a2a;
            color: #fff;
            font-size: 15px;
        }

        textarea {
            height: 100px;
            resize: vertical;
        }
        #description::-webkit-resizer {
            background: linear-gradient(135deg, transparent 40%, #666 40%, #888 60%, transparent 60%),
                        linear-gradient(135deg, transparent 60%, #666 60%, #888 80%, transparent 80%);
            width: 18px;
            height: 18px;
        }

        .grid-2 {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }

        .img-input-row {
            display: flex;
            align-items: center;
            gap: 10px;
            position: relative;
        }

        .info-trigger {
            background: #444;
            color: #fff;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            cursor: help;
            font-size: 14px;
            flex-shrink: 0;
        }

        .info-trigger:hover .tooltip {
            display: block;
        }

        .tooltip {
            display: none;
            position: absolute;
            bottom: 40px;
            right: 0;
            background: #333;
            color: #fff;
            padding: 10px;
            border-radius: 8px;
            border: 1px solid var(--accent);
            width: 250px;
            z-index: 100;
            font-size: 1rem;
            line-height: 1.4;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
        }

        /* Mapping Preview Map */
        #mapping-preview-map {
            width: 100%;
            height: 300px;
            border-radius: 8px;
            margin-top: 20px;
            border: 1px solid #444;
            background: #2a2a2a;
        }


        .floor-card {
            background: #252525;
            padding: 15px;
            border-radius: 10px;
            border: 1px solid #383838;
            margin-bottom: 20px;
            position: relative;
        }

        .style-selector {
            display: flex;
            gap: 8px;
            margin: 10px 0;
            flex-wrap: wrap;
        }

        .style-opt {
            background: #333;
            padding: 6px 12px;
            border-radius: 15px;
            cursor: pointer;
            border: 1px solid transparent;
            font-size: 0.8em;
            transition: 0.2s;
        }

        .style-opt.active {
            border-color: var(--accent);
            background: #444;
        }

        .style-opt input {
            display: none;
        }

        .multi-slider-container {
            position: relative;
            height: 35px;
            background: #111;
            border-radius: 6px;
            overflow: hidden;
            display: flex;
            margin: 10px 0;
            border: 1px solid #000;
            user-select: none;
            touch-action: none;
        }

        .segment {
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 0.75em;
            color: white;
        }

        .seg-Salsa {
            background: #f44336;
        }

        .seg-Bachata {
            background: #2196f3;
        }

        .seg-Kizomba {
            background: #9c27b0;
        }

        .seg-Andere {
            background: #00bcd4;
        }

        .split-handle {
            position: absolute;
            top: 0;
            width: 34px;
            height: 100%;
            background: transparent;
            cursor: ew-resize;
            transform: translateX(-50%);
            z-index: 10;
            display: flex;
            justify-content: center;
        }

        .split-handle::after {
            content: '';
            width: 4px;
            height: 100%;
            background: rgba(255, 255, 255, 0.5);
            box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
        }

        .save-btn {
            background: var(--accent);
            font-weight: bold;
            font-size: 1.1em;
            margin-top: 0; /*damit SAVE und PREVIEW Button gleich hoch sind*/
            cursor: pointer;
            border: none;
        }

        .save-btn:disabled {
            background: #555;
            cursor: not-allowed;
        }

        /* Recurrence Toggle */
        .recurrence-toggle-row {
            display: flex;
            align-items: center;
            gap: 12px;
            margin: 20px 0 6px;
            padding-top: 12px;
            border-top: 1px solid #2a2a2a;
        }
        .toggle-switch {
            position: relative;
            width: 44px;
            height: 24px;
            flex-shrink: 0;
        }
        .toggle-switch input { display: none; }
        .toggle-slider {
            position: absolute;
            inset: 0;
            background: #444;
            border-radius: 12px;
            cursor: pointer;
            transition: background 0.2s;
        }
        .toggle-slider::before {
            content: '';
            position: absolute;
            width: 18px;
            height: 18px;
            left: 3px;
            top: 3px;
            background: #fff;
            border-radius: 50%;
            transition: transform 0.2s;
        }
        .toggle-switch input:checked + .toggle-slider { background: var(--accent); }
        .toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }
        .recurrence-toggle-label {
            font-size: 0.95rem;
            color: var(--text-main);
            cursor: pointer;
            user-select: none;
        }

        /* Recurrence options section — voller Streifen, keine Seitenränder */
        #recurrence-options {
            background: rgba(233, 30, 99, 0.06);
            border-top: 1px solid rgba(233, 30, 99, 0.3);
            border-bottom: 1px solid rgba(233, 30, 99, 0.3);
            border-left: none;
            border-right: none;
            border-radius: 0;
            padding: 14px 20px;
            margin: 6px -20px 8px;
        }
        .recurrence-group { margin-bottom: 14px; }
        .recurrence-group label.group-label {
            display: block;
            font-size: 0.68rem;
            color: #888;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 12px;
            width: auto;
            padding: 0;
            background: none;
            border: none;
            font-weight: 600;
        }
        .radio-row {
            display: flex;
            gap: 8px;
        }
        .radio-row label {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 8px 10px;
            background: #2a2a2a;
            border: 1px solid #444;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.88rem;
            margin: 0;
            transition: border-color 0.15s, background 0.15s;
        }
        .radio-row label:has(input:checked) {
            border-color: var(--accent);
            background: rgba(233, 30, 99, 0.12);
        }
        .radio-row input[type="radio"] { display: none; }
        .r-short { display: none; }
        .r-long  { display: inline; }
        .recurrence-end-section { display: flex; flex-direction: column; gap: 8px; }
        .recurrence-end-row {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .recurrence-end-row label {
            display: flex;
            align-items: center;
            gap: 8px;
            width: auto;
            margin: 0;
            padding: 7px 14px;
            background: #2a2a2a;
            border: 1px solid #444;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.9rem;
            white-space: nowrap;
            transition: border-color 0.15s, background 0.15s;
        }
        .recurrence-end-row label:has(input[type="radio"]:checked) {
            border-color: var(--accent);
            background: rgba(233, 30, 99, 0.12);
        }
        .recurrence-end-row input[type="radio"] { width: auto; margin: 0; padding: 0; }
        .recurrence-end-row input[type="number"],
        .recurrence-end-row input[type="date"] {
            width: 140px;
            padding: 7px 10px;
            margin: 0;
            font-size: 0.9rem;
        }
        #recurrence-count::-webkit-outer-spin-button,
        #recurrence-count::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
        @media (max-width: 600px) {
            #recurrence-count-label { display: none; }
            #recurrence-end-group > div { gap: 4px !important; }
            #lbl-nach, #lbl-am { padding: 3px 10px !important; font-size: 0.82rem !important; }
            #recurrence-count-wrap { height: 30px !important; }
            #recurrence-count-wrap button { width: 30px !important; height: 30px !important; }
            #recurrence-count { width: 42px !important; height: 30px !important; }
            .r-short { display: inline; }
            .r-long  { display: none; }
            .radio-row label { font-size: 0.8rem; padding: 7px 6px; }
        }
        input[type="datetime-local"],
        input[type="date"],
        input[type="time"] { color-scheme: dark; }
        #recurrence-count { -moz-appearance: textfield; }
        .coeditor-chip {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 5px 10px;
            background: #1e1e1e;
            border: 1px solid #444;
            border-radius: 20px;
            cursor: pointer;
            font-size: 0.8rem;
            color: #aaa;
            user-select: none;
            transition: border-color 0.15s, background 0.15s;
            white-space: nowrap;
        }
        .coeditor-chip.selected {
            border-color: #ffc107;
            background: rgba(255,193,7,0.12);
            color: #ffc107;
        }
        .coeditor-chip img {
            width: 20px; height: 20px;
            border-radius: 50%;
            object-fit: cover;
            flex-shrink: 0;
        }
        .coeditor-chip-avatar {
            width: 20px; height: 20px;
            border-radius: 50%;
            background: #444;
            display: flex; align-items: center; justify-content: center;
            font-size: 0.65rem;
            color: #aaa;
            flex-shrink: 0;
        }
        .custom-date-slot {
            display: flex;
            gap: 6px;
            align-items: center;
            padding: 3px 0;
        }
        .custom-date-display {
            min-width: 96px;
            text-align: center;
            font-size: 0.88rem;
            font-weight: 600;
            color: #fff;
            cursor: pointer;
            padding: 4px 8px;
            background: #2a2a2a;
            border: 1px solid #444;
            border-radius: 6px;
            white-space: nowrap;
            user-select: none;
        }
        .custom-date-display:hover { border-color: #666; }
        .cd-num { color:#555; font-size:0.7rem; min-width:12px; text-align:right; flex-shrink:0; user-select:none; }
        .cd-time-display {
            min-width:40px; text-align:center; font-size:0.82rem; font-weight:600;
            color:#555; padding:3px 5px; background:#2a2a2a; border:1px solid #3a3a3a;
            border-radius:6px; white-space:nowrap; user-select:none; cursor:default;
        }
        .cd-time-display.is-custom { color:#fff; }
        .dp-type-btn.ende-btn { color:#666; border-color:#3a3a3a; background:transparent; cursor:default; opacity:0.8; }

        /* Series edit modal */
        #series-modal-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.75);
            z-index: 9999;
            align-items: center;
            justify-content: center;
        }
        #series-modal-overlay.active { display: flex; }
        #series-modal {
            background: var(--bg-card);
            border: 1px solid #444;
            border-radius: 14px;
            padding: 28px;
            max-width: 420px;
            width: 90%;
            box-shadow: 0 8px 40px rgba(0,0,0,0.6);
        }
        #series-modal h3 {
            margin: 0 0 8px;
            color: var(--accent);
            text-align: left;
        }
        #series-modal p {
            color: #aaa;
            font-size: 0.9rem;
            margin: 0 0 20px;
        }
        .series-modal-btn {
            display: block;
            width: 100%;
            padding: 12px;
            margin: 8px 0;
            border-radius: 8px;
            border: 1px solid #555;
            background: #2a2a2a;
            color: #fff;
            font-size: 0.95rem;
            cursor: pointer;
            text-align: left;
            transition: border-color 0.15s, background 0.15s;
        }
        .series-modal-btn:hover { border-color: var(--accent); background: rgba(233,30,99,0.1); }
        .series-modal-cancel {
            background: none;
            border: none;
            color: #888;
            font-size: 0.85rem;
            cursor: pointer;
            display: block;
            margin: 12px auto 0;
            padding: 0;
            width: auto;
        }

        .event-item {
            border-bottom: 1px solid #333;
            padding: 12px 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .btn-small {
            width: auto;
            padding: 6px 12px;
            font-size: 0.8em;
            cursor: pointer;
            border-radius: 6px;
            border: none;
            color: white;
            font-weight: bold;
        }

        .hidden {
            display: none;
        }

        label {
            font-size: 0.75em;
            color: #888;
            margin-left: 5px;
            text-transform: uppercase;
            font-weight: bold;
        }

        /* Preview Modal */
        #preview-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.92);
            z-index: 10000;
            overflow-y: auto;
            box-sizing: border-box;
        }

        #preview-modal.active {
            display: block;
        }

        .preview-content {
            width: 100%;
            max-width: 420px;
            margin: 0 auto;
            padding: 60px 20px 40px;
            box-sizing: border-box;
            position: relative;
        }

        .preview-section-label {
            font-size: 0.7rem;
            color: #666;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            margin-bottom: 8px;
            padding-left: 2px;
        }

        .preview-section {
            margin-bottom: 24px;
        }

        .preview-close {
            position: fixed;
            top: 16px;
            left: 50%;
            transform: translateX(-50%);
            background: var(--accent);
            color: white;
            border: none;
            padding: 8px 20px;
            border-radius: 20px;
            cursor: pointer;
            font-weight: bold;
            font-size: 0.8rem;
            z-index: 10001;
            white-space: nowrap;
        }

        /* Tab-Styles */
        .admin-tabs {
            display: flex;
            width: 100%;
            gap: 0;
            margin: 0;
            padding: 0;
            border-bottom: 2px solid #333;
            background: var(--bg-dark);
            position: sticky;
            top: 0;
            z-index: 1000;
            overflow: hidden;
            flex-wrap: nowrap;
        }
        /* Icon-only wenn Platz eng wird */
        .admin-tabs.tabs-compact .tab-text { display: none; }
        /* Scroll nur als letzter Ausweg — feste Breite damit Tabs wirklich überlaufen */
        .admin-tabs.tabs-overflow {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
        }
        .admin-tabs.tabs-overflow::-webkit-scrollbar { display: none; }
        .admin-tabs.tabs-overflow .admin-tab-btn { flex: 0 0 40px; }

        .admin-tab-btn {
            flex: 1;
            min-width: 0;
            padding: 10px 6px;
            background: transparent;
            color: #aaa;
            border: none;
            border-bottom: 3px solid transparent;
            cursor: pointer;
            font-weight: bold;
            font-size: 0.8rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            transition: all 0.2s;
            white-space: nowrap;
            margin: 0;
            border-radius: 0;
            box-sizing: border-box;
        }

        .admin-tab-btn:hover {
            color: #ccc;
            background: rgba(255, 255, 255, 0.05);
        }

        .admin-tab-btn.active {
            color: var(--accent);
            border-bottom-color: var(--accent);
            background: rgba(255, 255, 255, 0.03);
        }

        .tab-icon {
            display: flex;
            align-items: center;
            flex-shrink: 0;
        }
        .tab-icon svg { display: block; }

        .tab-text {
            white-space: nowrap;
        }

        /* Mobile: Nur Icons */
        @media (max-width: 768px) {
            .tab-icon svg { width: 22px; height: 22px; }
            #mobile-tab-title {
                display: flex !important;
            }
        }

        /* Desktop: Icon + Text — aber nur wenn NICHT compact */
        @media (min-width: 769px) {
            #mobile-tab-title {
                display: none !important;
            }
        }

        /* Compact mode (text hidden from tabs): always show title bar */
        .admin-tabs.tabs-compact ~ #mobile-tab-title {
            display: flex !important;
        }

        .admin-tab-content {
            display: block;
            margin-top: 0;
            padding-top: 0;
        }

        .admin-tab-content.hidden {
            display: none;
        }

        /* Erste Box in Tab-Content direkt an Tab-Leiste anschließen */
        .admin-tab-content > .box:first-child {
            margin-top: 0;
        }

        /* Flyer Vollbild Modal */
        #flyer-fullscreen-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.95);
            z-index: 10001;
            justify-content: center;
            align-items: center;
            padding: 20px;
            cursor: pointer;
        }

        #flyer-fullscreen-modal.active {
            display: flex;
        }

        #flyer-fullscreen-modal img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            border-radius: 8px;
        }

        /* Event-Item mit Flyer */
        .event-item-with-flyer {
            display: flex;
            gap: 15px;
            align-items: flex-start;
            padding: 15px;
            border: 1px solid #333;
            border-radius: 8px;
            margin-bottom: 15px;
            background: rgba(0, 0, 0, 0.2);
        }

        .event-flyer-preview {
            flex-shrink: 0;
            width: 80px;
            height: 120px;
            background: #1a1a1a;
            border-radius: 8px;
            overflow: hidden;
            border: 1px solid #444;
            cursor: pointer;
            transition: transform 0.2s;
        }

        .event-flyer-preview:hover {
            transform: scale(1.05);
            border-color: var(--accent);
        }

        .event-flyer-preview img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .event-item-details {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        /* Flyer im Editiermodus */
        #edit-flyer-container { display: none !important; }

        #img-preview-wrap {
            position: relative;
            border-radius: 8px;
            overflow: hidden;
            cursor: pointer;
            margin-top: 2px;
        }
        #img-preview-wrap img {
            width: 100%;
            max-height: 220px;
            object-fit: cover;
            display: block;
            border-radius: 8px;
            transition: filter 0.2s;
        }
        #img-preview-wrap:hover img { filter: brightness(0.65); }
        #img-edit-hint {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.2s;
            color: #fff;
            font-size: 0.92rem;
            font-weight: 600;
            letter-spacing: 0.02em;
        }
        #img-preview-wrap:hover #img-edit-hint { opacity: 1; }
        #img-warn {
            display: none;
            align-items: center;
            gap: 6px;
            color: #f5a623;
            font-size: 0.85rem;
            margin-top: 4px;
            padding: 4px 2px;
        }

        /* Confidence-Score Ampel-Styles */
        .confidence-indicator {
            display: inline-block;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            margin-left: 8px;
            vertical-align: middle;
        }

        .confidence-green {
            background: var(--save);
            box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
        }

        .confidence-yellow {
            background: #ff9800;
            box-shadow: 0 0 8px rgba(255, 152, 0, 0.6);
        }

        .confidence-red {
            background: #f44336;
            box-shadow: 0 0 8px rgba(244, 67, 54, 0.6);
        }

        /* Input-Felder mit Confidence-Border */
        .field-with-confidence {
            position: relative;
        }

        .field-with-confidence.confidence-green input,
        .field-with-confidence.confidence-green textarea {
            border: 1px solid var(--save);
            /* Nur Rahmenfarbe (grün), kein Hintergrund */
        }

        .field-with-confidence.confidence-yellow input,
        .field-with-confidence.confidence-yellow textarea {
            border: 1px solid #ff9800;
            /* Nur Rahmenfarbe (gelb), kein Hintergrund */
        }

        .field-with-confidence.confidence-red input,
        .field-with-confidence.confidence-red textarea {
            border: 1px solid #f44336;
            /* Nur Rahmenfarbe (rot), kein Hintergrund */
        }

        .confidence-reason {
            font-size: 0.75em;
            color: #ff9800;
            font-style: italic;
            margin-top: 4px;
            margin-left: 5px;
        }

        /* Ampel-Bar in Event-Liste */
        .confidence-bar {
            display: flex;
            gap: 4px;
            margin-top: 8px;
        }

        .confidence-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            flex-shrink: 0;
        }

        /* Zeitblock-Manager */
        .time-blocks-container {
            margin-top: 8px;
        }

        .time-block-item {
            display: flex;
            gap: 6px;
            align-items: center;
            padding: 4px 0;
            margin-bottom: 0;
            flex-wrap: nowrap;
        }

        .time-block-item input[type="text"] {
            flex: 0 0 120px;
            /* Textfeld schmaler (120px fix) */
            margin: 0;
            min-width: 80px;
        }

        .time-block-item input[type="time"] {
            flex: 1;
            min-width: 80px;
            /* Time-Inputs flexibel, aber mind. 80px */
            margin: 0;
        }

        .time-block-label {
            min-width: 100px;
            font-weight: bold;
            color: var(--accent);
        }

        /* Bestätigungs-Button */
        .confirm-all-btn {
            background: var(--save);
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: bold;
            margin-top: 15px;
            width: 100%;
        }

        .confirm-all-btn.confirmed {
            background: #ff9800;
        }

        .confirm-all-btn:hover {
            opacity: 0.9;
        }
        
        .pulsing-badge {
            animation: pulse-badge 1.5s ease-in-out infinite;
        }
        
        @keyframes pulse-badge {
            0%, 100% {
                opacity: 1;
                transform: scale(1);
            }
            50% {
                opacity: 0.7;
                transform: scale(1.2);
            }
        }
        
        .event-click-link {
            cursor: pointer;
            color: var(--accent);
            font-weight: bold;
            text-decoration: none;
            transition: all 0.2s;
        }
        .event-click-link:hover {
            text-decoration: underline;
            filter: brightness(1.2);
        }
        
        .event-detail-link {
            cursor: pointer;
            color: var(--accent);
            font-weight: bold;
            text-decoration: underline;
        }

        /* Superadmin-Tab-Styling */
        /* Rollen-basierte Tab-Sichtbarkeit */
        .admin-tab-btn.superadmin-tab { display: none !important; }
        body.is-superadmin .admin-tab-btn.superadmin-tab { display: flex !important; }
        /* Notes-Tab: für beide Rollen sichtbar */
        body.is-superadmin .admin-tab-btn[data-tab="notes"] { display: flex !important; }
        /* Admin: Tab-Text immer sichtbar außer bei sehr kleinen Screens */
        @media (min-width: 360px) {
            body.is-admin .tab-text { display: inline !important; }
            body.is-admin #mobile-tab-title { display: none !important; }
        }
        @media (max-width: 359px) {
            body.is-admin #mobile-tab-title { display: block !important; }
        }

        .admin-tab-btn.superadmin-tab {
            background: rgba(255, 193, 7, 0.04);
            color: #888;
        }
        .admin-tab-btn.superadmin-tab:hover {
            color: #ffc107;
            background: rgba(255, 193, 7, 0.09);
        }
        .admin-tab-btn.superadmin-tab.active {
            color: #ffc107;
            border-bottom-color: #ffc107;
            background: rgba(255, 193, 7, 0.12);
        }

        /* User-Tab KPI-Karten */
        .user-kpi-card {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 10px;
            padding: 10px 8px;
            text-align: center;
            cursor: pointer;
            transition: border-color 0.15s;
        }
        .user-kpi-card:hover { border-color: rgba(255,193,7,0.4); }
        .user-kpi-card.kpi-active { border-color: #ffc107; background: rgba(255,193,7,0.06); }
        #kpi-detail-panel {
            background: var(--surface);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 10px;
            padding: 14px;
            font-size: 0.82rem;
        }
        .kpi-chart { display: flex; align-items: flex-end; gap: 3px; height: 80px; margin: 10px 0 4px; }
        .kpi-bar-wrap { display: flex; flex-direction: column; align-items: center; flex: 1; height: 100%; justify-content: flex-end; gap: 2px; }
        .kpi-bar { width: 100%; border-radius: 3px 3px 0 0; min-height: 2px; background: rgba(255,193,7,0.7); transition: background 0.2s; }
        .kpi-bar:hover { background: #ffc107; }
        .kpi-bar-lbl { font-size: 0.55rem; color: #555; white-space: nowrap; }
        .kpi-bar-val { font-size: 0.6rem; color: #888; }
        .kpi-mini-user { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
        .kpi-mini-user:last-child { border-bottom: none; }
        .kpi-label {
            font-size: 0.68rem;
            color: #888;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            margin-bottom: 6px;
        }
        .kpi-value {
            font-size: 1.5rem;
            font-weight: bold;
            color: #ffc107;
        }
        .u-entry {
            border-bottom: 1px solid rgba(255,255,255,0.06);
            padding: 6px 0 4px;
        }
        .u-entry.has-note { border-bottom-color: rgba(251,191,36,0.2); }
        .user-row {
            display: grid;
            grid-template-columns: 32px 1fr auto 28px;
            gap: 8px;
            padding: 2px 0;
            font-size: 0.82rem;
            align-items: center;
        }
        .u-sort-val {
            text-align: right;
            font-size: 1.05rem;
            font-weight: 700;
            color: var(--accent);
            white-space: nowrap;
            line-height: 1.2;
        }
        .u-sort-val small {
            display: block;
            font-size: 0.62rem;
            font-weight: 400;
            color: #555;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }
        .u-stats {
            display: flex;
            flex-wrap: wrap;
            gap: 2px 10px;
            padding: 3px 0 4px 40px;
        }
        .u-stat {
            font-size: 0.72rem;
            color: #666;
            white-space: nowrap;
        }
        .u-sort-bar {
            display: flex;
            flex-wrap: wrap;
            gap: 4px 8px;
            padding: 0 0 10px 0;
            align-items: center;
        }
        .u-sort-chip {
            font-size: 0.7rem;
            color: #555;
            cursor: pointer;
            padding: 2px 6px;
            border-radius: 4px;
            user-select: none;
            border: 1px solid transparent;
        }
        .u-sort-chip:hover { color: #aaa; }
        .u-sort-chip.active { color: #ccc; border-color: rgba(255,255,255,0.12); }
        .u-avatar {
            width: 28px; height: 28px; border-radius: 50%;
            background: #444; display: flex; align-items: center; justify-content: center;
            font-size: 0.75rem; font-weight: bold; color: #fff;
            overflow: hidden; flex-shrink: 0;
        }
        .u-avatar-wrap { position: relative; display: inline-flex; flex-shrink: 0; cursor: pointer; }
        .u-avatar-wrap:hover .u-avatar { outline: 2px solid rgba(233,30,99,0.6); }
        .u-avatar-wrap:hover img { opacity: 0.85; }
        .u-online-dot { position: absolute; bottom: 0; right: 0; width: 9px; height: 9px;
            background: #22c55e; border-radius: 50%; border: 2px solid var(--surface, #1a1a1a); }
        .u-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
        .u-provider {
            display: inline-flex; align-items: center; justify-content: center;
            width: 16px; height: 16px; border-radius: 50%; font-size: 0.6rem;
            font-weight: bold; vertical-align: middle; margin-left: 4px;
            flex-shrink: 0;
        }
        .u-provider-google { background: #4285f4; color: #fff; }
        .u-provider-email  { background: #555; color: #ccc; }
        .u-note-btn {
            background: none; border: none; cursor: pointer; padding: 4px;
            border-radius: 4px; color: #555; display: flex; align-items: center;
            justify-content: center; transition: color 0.15s;
        }
        .u-note-btn:hover { color: #fbbf24; }
        .u-note-btn.has-note { color: #fbbf24; }
        .admin-note-panel {
            margin: -2px 0 0 0;
            padding: 8px 12px;
            background: rgba(251,191,36,0.05);
            border: 1px solid rgba(251,191,36,0.2);
            border-top: none;
            border-radius: 0 0 6px 6px;
        }
        .admin-note-panel textarea {
            width: 100%; box-sizing: border-box; background: transparent; border: none;
            color: #ccc; font-size: 0.8rem; resize: none; outline: none;
            font-family: inherit; line-height: 1.5; display: block; overflow: hidden;
            field-sizing: content; min-height: 1.5em;
        }
        .admin-note-panel textarea::placeholder { color: #555; }
        /* Custom Date Picker */
        #dp-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.65); z-index:9998; }
        #dp-popup {
            display:none; position:fixed; top:50%; left:50%;
            transform:translate(-50%,-50%);
            width:min(340px,95vw); max-height:92vh; overflow-y:auto;
            background:#1a1a1a; border:1px solid #333; border-radius:16px;
            z-index:9999; padding:16px; box-shadow:0 12px 40px rgba(0,0,0,0.9);
            -webkit-overflow-scrolling:touch; box-sizing:border-box;
        }
        #dp-btn {
            display:inline-flex; align-items:center; gap:8px; padding:8px 12px;
            background:#1e1e1e; border:1px solid #444; border-radius:8px;
            cursor:pointer; font-size:0.9rem; color:#fff;
            min-height:38px; box-sizing:border-box; user-select:none; flex-shrink:0;
        }
        #dp-btn:hover { border-color:#e91e63; }
        .dp-month-nav { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
        .dp-month-nav button {
            background:#333; border:none; color:#fff; width:34px; height:34px;
            border-radius:8px; cursor:pointer; font-size:1.2rem; display:flex;
            align-items:center; justify-content:center; padding:0;
        }
        .dp-month-nav button:hover { background:#e91e63; }
        #dp-month-label { font-weight:700; font-size:1rem; color:#fff; }
        .dp-weekdays {
            display:grid; grid-template-columns:repeat(7,1fr); gap:2px; margin-bottom:4px;
        }
        .dp-weekdays span {
            text-align:center; font-size:0.7rem; font-weight:700; color:#666;
            padding:2px 0; text-transform:uppercase;
        }
        .dp-weekdays span.dp-weekend { color:#e91e63; }
        .dp-days { display:grid; grid-template-columns:repeat(7,1fr); gap:3px; }
        .dp-day {
            aspect-ratio:1; display:flex; align-items:center; justify-content:center;
            font-size:0.88rem; border-radius:8px; cursor:pointer; color:#ccc;
            transition:background 0.12s;
        }
        .dp-day:hover:not(.dp-empty) { background:rgba(233,30,99,0.25); }
        .dp-day.dp-today { border:1px solid rgba(233,30,99,0.5); color:#e91e63; }
        .dp-day.dp-selected { background:#e91e63 !important; color:#fff; font-weight:700; border:none; }
        .dp-day.dp-weekend { color:#e87aa0; }
        .dp-day.dp-empty { cursor:default; }
        #dp-details {
            display:inline-flex; align-items:center; gap:6px;
        }

        /* Hint Bubbles */
        .hint-bubble {
            position: fixed;
            background: rgba(42, 42, 42, 0.96);
            color: #aaa;
            border: 1px solid rgba(255,255,255,0.09);
            border-radius: 10px;
            padding: 9px 13px;
            font-size: 0.82rem;
            font-weight: 400;
            line-height: 1.45;
            max-width: 210px;
            z-index: 8888;
            pointer-events: none;
            opacity: 0;
            transform: translateY(4px);
            transition: opacity 0.3s, transform 0.3s;
            box-shadow: 0 3px 14px rgba(0,0,0,0.5);
        }
        .hint-bubble.visible {
            opacity: 1;
            transform: translateY(0);
        }
        .hint-bubble-tail {
            position: absolute;
            bottom: 100%;
            width: 0;
            height: 0;
            border-left: 9px solid transparent;
            border-right: 9px solid transparent;
            border-bottom: 14px solid rgba(42, 42, 42, 0.96);
            margin-bottom: -1px;
        }
        .dp-il-btn {
            width:26px; height:26px; background:#2a2a2a; border:1px solid #444;
            border-radius:6px; color:#fff; font-size:1rem; cursor:pointer; padding:0;
            flex-shrink:0;
        }
        .dp-il-btn:hover { background:#e91e63; border-color:#e91e63; }
        .dp-il-val { min-width:44px; text-align:center; font-size:1rem; font-weight:700; color:#fff; white-space:nowrap; }
        .notes-md-preview {
            min-height: 200px; color: #ccc; line-height: 1.65; font-size: 0.93rem;
        }
        /* Inline Markdown Editor (Typora-style) */
        #notes-ce { outline:none; min-height:200px; }
        #notes-ce .mde-line { min-height:1.55em; padding:2px 0; cursor:text; border-radius:4px; line-height:1.6; }
        #notes-ce .mde-line:empty::before { content:'\00a0'; }
        #notes-ce .mde-line.mde-editing { font-family:monospace; font-size:0.88rem; color:#ddd; background:rgba(255,255,255,0.05); padding:2px 8px; margin:0 -8px; white-space:pre-wrap; caret-color:#e91e63; }
        #notes-ce .md-li-wrap { display:flex; gap:8px; }
        #notes-ce .md-bullet { color:#888; min-width:18px; flex-shrink:0; font-size:0.9em; }
        #notes-ce .md-cb-wrap { display:flex; align-items:baseline; gap:7px; cursor:pointer; user-select:none; }
        #notes-ce .md-cb-icon { flex-shrink:0; min-width:14px; font-size:0.9rem; line-height:1.6; }
        #notes-ce .md-cb-open .md-cb-icon { color:#555; }
        #notes-ce .md-cb-ok   .md-cb-icon { color:#4caf50; font-weight:700; }
        #notes-ce .md-cb-no   .md-cb-icon { color:#555; }
        #notes-ce .md-cb-ok   .md-cb-text { color:#4caf50; }
        #notes-ce .md-cb-no   .md-cb-text { color:#555; }
        #notes-ce .md-done { color:#4caf50; }
        /* Notes Toolbar */
        #notes-toolbar { display:none; flex-wrap:wrap; gap:3px; align-items:center; padding:0 0 10px; margin-bottom:6px; border-bottom:1px solid #222; }
        .ntb { width:auto; padding:5px 10px; margin:0; border-radius:7px; background:#1e1e1e; border:1px solid #2a2a2a; color:#aaa; cursor:pointer; font-size:0.82rem; line-height:1.3; transition:background 0.12s,color 0.12s; flex-shrink:0; }
        .ntb:hover { background:#2a2a2a; color:#fff; border-color:#444; }
        .ntb b { font-weight:800; color:inherit; }
        .ntb i { font-style:italic; color:inherit; }
        .ntb-sep { width:1px; height:20px; background:#2a2a2a; margin:0 3px; align-self:center; flex-shrink:0; }
        #notes-mode-btn { transition:background 0.12s,color 0.12s; }
        #notes-mode-btn.visual-active { background:#e91e63 !important; border-color:#e91e63 !important; color:#fff !important; }
        /* Markdown-Hilfe Modal */
        #notes-info-modal { display:none; position:fixed; inset:0; z-index:99999; background:rgba(0,0,0,0.72); backdrop-filter:blur(4px); -webkit-backdrop-filter:blur(4px); align-items:center; justify-content:center; }
        #notes-info-modal.open { display:flex; }
        .notes-md-preview h1 { font-size:1.4rem; color:#fff; font-weight:700; margin:20px 0 6px; border-top:1px solid #555; padding-top:8px; text-align:left; letter-spacing:0; }
        .notes-md-preview h2 { font-size:1.2rem; color:#fff; font-weight:700; margin:14px 0 5px; text-align:left; letter-spacing:0; }
        .notes-md-preview h3 { font-size:1.05rem; color:#ccc; font-weight:700; margin:10px 0 4px; border-left:3px solid #e91e63; padding-left:8px; text-align:left; letter-spacing:0; }
        /* Override: Mobile-Regel versteckt sonst h2/h3 als first-child in .mde-line */
        #notes-ce .mde-line h1, #notes-ce .mde-line h2, #notes-ce .mde-line h3,
        #notes-ce .mde-line h4, #notes-ce .mde-line h5, #notes-ce .mde-line h6 { display:block !important; }
        .notes-md-preview ul, .notes-md-preview ol { padding-left:20px; margin:4px 0 8px; }
        .notes-md-preview li { margin:2px 0; }
        .notes-md-preview li:has(input[type="checkbox"]:checked) { color:#4caf50; list-style:none; margin-left:-20px; padding-left:0; }
        .notes-md-preview li:has(input[type="checkbox"]:not(:checked)) { color:#ccc; list-style:none; margin-left:-20px; padding-left:0; }
        .notes-md-preview strong { color:#fff; }
        .notes-md-preview em { color:#aaa; }
        .notes-md-preview code { background:#1a1a1a; padding:1px 5px; border-radius:4px; font-size:0.85rem; color:#e91e63; }
        .notes-md-preview pre { background:#1a1a1a; padding:10px; border-radius:8px; overflow-x:auto; }
        .notes-md-preview pre code { color:#ccc; background:none; }
        .notes-md-preview blockquote { border-left:3px solid #e91e63; margin:8px 0; padding:4px 12px; color:#888; }
        .notes-md-preview hr { border:none; border-top:1px solid #666; margin:12px 0; }
        .notes-md-preview p { margin:4px 0 8px; }
        .notes-md-preview a { color:#e91e63; }

        .dp-type-btn {
            padding:5px 14px; border-radius:20px; border:1px solid #444;
            background:transparent; color:#777; font-size:0.82rem; font-weight:600;
            cursor:pointer; transition:all 0.15s; width:auto; flex-shrink:0;
        }
        .dp-type-btn.active { background:rgba(233,30,99,0.18); color:#e91e63; border-color:#e91e63; }

        @keyframes slideInRight {
            from {
                transform: translateX(100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }
        #lightning-assign-btn:hover {
            background: #f57c00 !important;
            transform: scale(1.02);
            transition: all 0.2s ease;
        }

                #news-cover-dropzone.dz-over { border-color: var(--accent,#e91e63); background: rgba(233,30,99,0.06); }
                @keyframes spin { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
            </style>

/* CSP Chunk 6: Hover effects (replaces onmouseover/onmouseleave) */
#admin-back-link:hover { color: #aaa !important; }
#notes-floating-save-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(233,30,99,0.55); }
