/**
 * ASSOX - Admin CSS Stylesheet
 * Version: 1.0.0
 */

/* ============================================
   RESET & BASE
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #16a34a;
    --success-hover: #15803d;
    --warning-color: #ea580c;
    --danger-color: #dc2626;
    --bg-color: #f8fafc;
    --sidebar-bg: #1e293b;
    --sidebar-text: #cbd5e1;
    --nav-active-bg: rgba(37, 99, 235, 0.2);
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* ============================================
   LOGIN PAGE
   ============================================ */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 520px;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.login-form {
    margin-bottom: 20px;
}

.login-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 13px;
}

.login-footer p {
    margin: 5px 0;
}

/* ============================================
   ADMIN LAYOUT
   ============================================ */

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    flex-shrink: 0;
}

.sidebar-logo {
    margin-bottom: 14px;
}

.sidebar-logo img {
    display: block;
    max-width: 90%;
    max-height: 200px;
    object-fit: contain;
    margin: 0 auto;
}

.sidebar-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--sidebar-text);
    margin-bottom: 4px;
}

.sidebar-header p {
    font-size: 12px;
    opacity: 0.6;
}

.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-scroll::-webkit-scrollbar {
    width: 4px;
}

.sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.sidebar-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sidebar-nav {
    padding: 20px 0;
}

/* Vereins-Wechsler */
.tenant-switcher {
    padding: 10px 16px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.tenant-switcher-label {
    display: none;
}

.tenant-switcher-select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    color: white;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path d="M1 1l5 5 5-5" stroke="rgba(255,255,255,0.5)" stroke-width="1.5" fill="none" stroke-linecap="round"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.tenant-switcher-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.tenant-switcher-select option {
    background: #1e293b;
    color: white;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active {
    background-color: var(--nav-active-bg);
    border-left-color: var(--primary-color);
    color: white;
}

/* Elegante Icon-Darstellung im FontAwesome-Stil */
.nav-item {
    position: relative;
    padding-left: 48px;
    /* Platz für Icon */
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-color: currentColor;
    opacity: 0.7;
    transition: opacity 0.2s;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.nav-item:hover::before,
.nav-item.active::before {
    opacity: 1;
}

/* Icon-Definitionen mit SVG-Masken (FontAwesome-Stil) */
.nav-item[data-icon="dashboard"]::before {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="3" y="3" width="8" height="8" rx="1"/><rect x="3" y="13" width="8" height="8" rx="1"/><rect x="13" y="3" width="8" height="8" rx="1"/><rect x="13" y="13" width="8" height="8" rx="1"/></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="3" y="3" width="8" height="8" rx="1"/><rect x="3" y="13" width="8" height="8" rx="1"/><rect x="13" y="3" width="8" height="8" rx="1"/><rect x="13" y="13" width="8" height="8" rx="1"/></svg>');
}

.nav-item[data-icon="profile"]::before {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="12" cy="8" r="4"/><path d="M4 20c0-4 3.6-7 8-7s8 3 8 7"/></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="12" cy="8" r="4"/><path d="M4 20c0-4 3.6-7 8-7s8 3 8 7"/></svg>');
}

.nav-item[data-icon="members"]::before {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="9" cy="8" r="3"/><circle cx="16" cy="9" r="2.5"/><path d="M2 19c0-3 2.5-5 6-5s6 2 6 5"/><path d="M14 19c0-2 1.5-4 4.5-4s4.5 2 4.5 4"/></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="9" cy="8" r="3"/><circle cx="16" cy="9" r="2.5"/><path d="M2 19c0-3 2.5-5 6-5s6 2 6 5"/><path d="M14 19c0-2 1.5-4 4.5-4s4.5 2 4.5 4"/></svg>');
}

.nav-item[data-icon="events"]::before {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="3" y="6" width="18" height="15" rx="2" fill="none" stroke="currentColor" stroke-width="2"/><line x1="3" y1="10" x2="21" y2="10" stroke="currentColor" stroke-width="2"/><line x1="8" y1="3" x2="8" y2="7" stroke="currentColor" stroke-width="2"/><line x1="16" y1="3" x2="16" y2="7" stroke="currentColor" stroke-width="2"/></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="3" y="6" width="18" height="15" rx="2" fill="none" stroke="currentColor" stroke-width="2"/><line x1="3" y1="10" x2="21" y2="10" stroke="currentColor" stroke-width="2"/><line x1="8" y1="3" x2="8" y2="7" stroke="currentColor" stroke-width="2"/><line x1="16" y1="3" x2="16" y2="7" stroke="currentColor" stroke-width="2"/></svg>');
}

.nav-item[data-icon="finance"]::before {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9" stroke="currentColor" stroke-width="2" fill="none"/><path d="M12 6v12M8 10h5.5a2 2 0 010 4H8" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round"/></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9" stroke="currentColor" stroke-width="2" fill="none"/><path d="M12 6v12M8 10h5.5a2 2 0 010 4H8" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round"/></svg>');
}

.nav-item[data-icon="fees"]::before {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="2" y="5" width="20" height="14" rx="2" stroke="currentColor" stroke-width="2" fill="none"/><line x1="2" y1="10" x2="22" y2="10" stroke="currentColor" stroke-width="2"/><circle cx="7" cy="15" r="1.5" fill="currentColor"/></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="2" y="5" width="20" height="14" rx="2" stroke="currentColor" stroke-width="2" fill="none"/><line x1="2" y1="10" x2="22" y2="10" stroke="currentColor" stroke-width="2"/><circle cx="7" cy="15" r="1.5" fill="currentColor"/></svg>');
}

.nav-item[data-icon="settings"]::before {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="12" cy="12" r="3"/><path d="M12 1v3m0 16v3M4.22 4.22l2.12 2.12m11.32 11.32l2.12 2.12M1 12h3m16 0h3M4.22 19.78l2.12-2.12m11.32-11.32l2.12-2.12" stroke="currentColor" stroke-width="2" fill="none"/></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="12" cy="12" r="3"/><path d="M12 1v3m0 16v3M4.22 4.22l2.12 2.12m11.32 11.32l2.12 2.12M1 12h3m16 0h3M4.22 19.78l2.12-2.12m11.32-11.32l2.12-2.12" stroke="currentColor" stroke-width="2" fill="none"/></svg>');
}

.nav-item[data-icon="tenants"]::before {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 21V7l9-4 9 4v14" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"/><path d="M9 21V12h6v9" stroke="currentColor" stroke-width="2" fill="none"/><path d="M12 3v4" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 21V7l9-4 9 4v14" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"/><path d="M9 21V12h6v9" stroke="currentColor" stroke-width="2" fill="none"/><path d="M12 3v4" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>');
}

.nav-item[data-icon="users"]::before {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="9" cy="8" r="3" stroke="currentColor" stroke-width="2" fill="none"/><circle cx="16" cy="9" r="2.5" stroke="currentColor" stroke-width="2" fill="none"/><path d="M2 19c0-3 2.5-5 6-5s6 2 6 5" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round"/><path d="M14 19c0-2 1.5-4 4.5-4s4.5 2 4.5 4" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round"/></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="9" cy="8" r="3" stroke="currentColor" stroke-width="2" fill="none"/><circle cx="16" cy="9" r="2.5" stroke="currentColor" stroke-width="2" fill="none"/><path d="M2 19c0-3 2.5-5 6-5s6 2 6 5" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round"/><path d="M14 19c0-2 1.5-4 4.5-4s4.5 2 4.5 4" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round"/></svg>');
}

.nav-item[data-icon="logs"]::before {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="4" y="3" width="16" height="18" rx="2" stroke="currentColor" stroke-width="2" fill="none"/><line x1="8" y1="8" x2="16" y2="8" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><line x1="8" y1="12" x2="16" y2="12" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><line x1="8" y1="16" x2="12" y2="16" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="4" y="3" width="16" height="18" rx="2" stroke="currentColor" stroke-width="2" fill="none"/><line x1="8" y1="8" x2="16" y2="8" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><line x1="8" y1="12" x2="16" y2="12" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><line x1="8" y1="16" x2="12" y2="16" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>');
}

.nav-item[data-icon="documents"]::before {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"/><polyline points="14 2 14 8 20 8" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"/><line x1="8" y1="13" x2="16" y2="13" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><line x1="8" y1="17" x2="13" y2="17" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"/><polyline points="14 2 14 8 20 8" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"/><line x1="8" y1="13" x2="16" y2="13" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><line x1="8" y1="17" x2="13" y2="17" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>');
}

.nav-item[data-icon="calendar"]::before {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="18" rx="2" stroke="currentColor" stroke-width="2" fill="none"/><line x1="3" y1="10" x2="21" y2="10" stroke="currentColor" stroke-width="2"/><line x1="8" y1="2" x2="8" y2="6" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><line x1="16" y1="2" x2="16" y2="6" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="18" rx="2" stroke="currentColor" stroke-width="2" fill="none"/><line x1="3" y1="10" x2="21" y2="10" stroke="currentColor" stroke-width="2"/><line x1="8" y1="2" x2="8" y2="6" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><line x1="16" y1="2" x2="16" y2="6" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>');
}

.nav-item[data-icon="newsletter"]::before {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="2" y="4" width="20" height="16" rx="2" stroke="currentColor" stroke-width="2" fill="none"/><polyline points="2 4 12 13 22 4" stroke="currentColor" stroke-width="2" fill="none" stroke-linejoin="round"/></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="2" y="4" width="20" height="16" rx="2" stroke="currentColor" stroke-width="2" fill="none"/><polyline points="2 4 12 13 22 4" stroke="currentColor" stroke-width="2" fill="none" stroke-linejoin="round"/></svg>');
}

.nav-item[data-icon="logout"]::before {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4M16 17l5-5-5-5M21 12H9" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round"/></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4M16 17l5-5-5-5M21 12H9" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round"/></svg>');
}

.nav-item[data-icon="docs"]::before {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 19.5A2.5 2.5 0 016.5 17H20" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round"/><path d="M6.5 2H20v20H6.5A2.5 2.5 0 014 19.5v-15A2.5 2.5 0 016.5 2z" stroke="currentColor" stroke-width="2" fill="none" stroke-linejoin="round"/></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 19.5A2.5 2.5 0 016.5 17H20" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round"/><path d="M6.5 2H20v20H6.5A2.5 2.5 0 014 19.5v-15A2.5 2.5 0 016.5 2z" stroke="currentColor" stroke-width="2" fill="none" stroke-linejoin="round"/></svg>');
}

.nav-item[data-icon="inventory"]::before {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 8V20a1 1 0 01-1 1H4a1 1 0 01-1-1V8" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"/><path d="M23 3H1v5h22V3z" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"/><line x1="10" y1="12" x2="14" y2="12" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 8V20a1 1 0 01-1 1H4a1 1 0 01-1-1V8" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"/><path d="M23 3H1v5h22V3z" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"/><line x1="10" y1="12" x2="14" y2="12" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>');
}

.nav-item[data-icon="kitchen"]::before {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 2v7c0 1.1.9 2 2 2h4a2 2 0 002-2V2" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"/><line x1="7" y1="2" x2="7" y2="22" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><path d="M21 15V2a5 5 0 00-5 5v6c0 1.1.9 2 2 2h3" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"/><line x1="21" y1="15" x2="21" y2="22" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 2v7c0 1.1.9 2 2 2h4a2 2 0 002-2V2" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"/><line x1="7" y1="2" x2="7" y2="22" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><path d="M21 15V2a5 5 0 00-5 5v6c0 1.1.9 2 2 2h3" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"/><line x1="21" y1="15" x2="21" y2="22" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>');
}

.nav-item[data-icon="sales"]::before {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}

.nav-text {
    font-size: 15px;
    font-weight: 500;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.user-info-link {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 8px;
    transition: background 0.2s;
    border: 1px solid transparent;
}

.user-info-link:hover {
    background-color: rgba(255, 255, 255, 0.07);
}

.user-info-link.active {
    background-color: var(--nav-active-bg);
    border-color: var(--primary-color);
}

.user-avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-info {
    min-width: 0;
    overflow: hidden;
}

.user-info strong {
    display: block;
    color: var(--sidebar-text);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info small {
    display: block;
    color: var(--sidebar-text);
    font-size: 11px;
    opacity: 0.65;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    position: relative;
}

.logout-btn:hover {
    background-color: rgba(255, 255, 255, 0.07);
    color: white;
}

.logout-btn::before {
    content: '';
    display: block;
    width: 18px;
    height: 18px;
    background-color: currentColor;
    opacity: 0.7;
    transition: opacity 0.2s;
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4M16 17l5-5-5-5M21 12H9" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round"/></svg>');
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4M16 17l5-5-5-5M21 12H9" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round"/></svg>');
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.logout-btn:hover::before {
    opacity: 1;
}

/* ============================================
   PROFIL-SEITE
   ============================================ */

.profile-avatar-section {
    padding: 24px 30px;
}

.profile-avatar-wrap {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.profile-avatar-img {
    flex-shrink: 0;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.profile-avatar-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-initial {
    color: white;
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
    user-select: none;
}

.profile-avatar-actions {
    flex: 1;
    min-width: 0;
}

.profile-avatar-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 2px;
}

.profile-avatar-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
    word-break: break-all;
}

.profile-alert-error {
    color: var(--danger-color);
    font-size: 13px;
    margin: 8px 0 0;
}

.profile-alert-success {
    color: var(--success-color);
    font-size: 13px;
    margin: 8px 0 0;
}

@media (max-width: 480px) {
    .profile-avatar-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px 40px;
    min-height: 100vh;
}

.content-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
}

.content-header p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 5px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* ============================================
   FORMS
   ============================================ */

.form {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input:disabled {
    background-color: #f1f5f9;
    cursor: not-allowed;
    color: var(--text-muted);
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group input[type="file"] {
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    width: 100%;
    font-size: 14px;
}

.form-group input[type="date"],
.form-group input[type="time"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

/* Standalone-Select außerhalb von .form-group (z.B. Filter-Leisten) */
.form-select {
    padding: 7px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: var(--card-bg);
    color: var(--text-color);
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path d="M1 1l5 5 5-5" stroke="%236b7280" stroke-width="1.5" fill="none" stroke-linecap="round"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    box-sizing: border-box;
    vertical-align: middle;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #475569;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: var(--success-hover);
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background-color: #c2410c;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* ============================================
   STATS CARDS
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    padding: 16px 20px;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .07), 0 0 0 1px rgba(0, 0, 0, .04);
    display: flex;
    align-items: center;
    gap: 14px;
}

.stat-card-success {
    border-left: 3px solid var(--success-color);
}

.stat-card-warning {
    border-left: 3px solid var(--warning-color);
}

.stat-icon {
    width: 48px;
    min-width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.1;
    margin-bottom: 2px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================
   DASHBOARD — neue Kachel + Info-Bar Styles
   ============================================ */

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

.db-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.db-section-head h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.db-section-link {
    font-size: 13px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.db-section-link:hover {
    text-decoration: underline;
}

/* Event-Kacheln */
.event-tiles {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.event-tile {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .07), 0 0 0 1px rgba(0, 0, 0, .04);
    transition: transform 0.15s, box-shadow 0.15s;
}

.event-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1), 0 0 0 1px rgba(0, 0, 0, .05);
}

.event-tile-img {
    position: relative;
    height: 100px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 8px;
}

.event-tile-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(4px);
    border-radius: 6px;
    padding: 4px 8px;
    line-height: 1.1;
    color: white;
}

.event-tile-day {
    font-size: 20px;
    font-weight: 700;
}

.event-tile-month {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.85;
}

.event-tile-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    align-self: flex-end;
}

.event-tile-body {
    padding: 10px 12px 12px;
}

.event-tile-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.3;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-tile-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.event-tile-reg {
    margin-top: 5px;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
}

/* Info-Bar */
.db-info-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.db-info-item {
    background: white;
    border-radius: 10px;
    padding: 12px 18px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .07), 0 0 0 1px rgba(0, 0, 0, .04);
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s;
    flex: 1;
    min-width: 120px;
}

.db-info-item:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, .1), 0 0 0 1px rgba(0, 0, 0, .06);
}

.db-info-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.1;
}

.db-info-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.4;
}

.db-storage-bar {
    display: block;
    height: 3px;
    background: var(--border-color, #e2e8f0);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 5px;
    width: 100%;
}

.db-storage-bar span {
    display: block;
    height: 100%;
    border-radius: 2px;
}

@media (max-width: 900px) {
    .event-tiles {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .event-tiles {
        grid-template-columns: 1fr;
    }

    .db-info-item {
        min-width: 100px;
    }
}

/* ============================================
   CONTENT SECTIONS
   ============================================ */

.content-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.content-section h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-color);
}

.content-section p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.instruction-list {
    padding-left: 20px;
    color: var(--text-color);
}

.instruction-list li {
    margin-bottom: 10px;
}

/* ============================================
   TABLES
   ============================================ */

.table-responsive,
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead {
    background-color: #f8fafc;
}

.data-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.data-table tbody tr:hover {
    background-color: #f8fafc;
}

.data-table td.actions {
    white-space: nowrap;
}

.data-table td.actions .btn {
    margin-right: 5px;
}

/* ============================================
   BADGES
   ============================================ */

.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger,
.badge-error {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-purple {
    background-color: #f3e8ff;
    color: #6b21a8;
}

/* ============================================
   TABLE (Alias for data-table)
   ============================================ */

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table thead {
    background-color: #f8fafc;
}

.table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
}

.table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.table tbody tr:hover {
    background-color: #f8fafc;
}

.table td.actions {
    white-space: nowrap;
}

.table td.actions .btn {
    margin-right: 5px;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* ============================================
   INFO BOX
   ============================================ */

.info-box {
    background-color: #dbeafe;
    border-left: 4px solid var(--primary-color);
    padding: 15px 20px;
    border-radius: 4px;
    margin-top: 20px;
    font-size: 14px;
    color: #1e3a8a;
}

.info-box strong {
    font-weight: 600;
}

/* ============================================
   MOBILE HEADER
   ============================================ */

.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    align-items: center;
    padding: 0 16px;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(0, 0, 0, 0.18);
}

.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-right: 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
}

.hamburger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--sidebar-text);
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--sidebar-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sidebar Overlay (Backdrop) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 150;
}

.sidebar-overlay.active {
    display: block;
}

/* Sidebar Close Button (nur Mobile) */
.sidebar-close-btn {
    display: none;
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 6px;
    font-size: 20px;
    line-height: 1;
    border-radius: 4px;
    transition: all 0.2s;
}

.sidebar-close-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }

    .sidebar-close-btn {
        display: block;
    }

    .sidebar {
        transform: translateX(-260px);
        transition: transform 0.3s ease;
        z-index: 160;
        padding-top: 60px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 80px 16px 20px;
    }

    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .content-header h2 {
        font-size: 22px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .stat-card {
        padding: 14px 16px;
    }

    .stat-value {
        font-size: 20px;
    }

    .data-table th,
    .data-table td,
    .table th,
    .table td {
        padding: 10px 8px;
        font-size: 13px;
    }

    .content-section {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .login-box {
        padding: 30px 20px;
    }
}

/* ============================================
   TABLE CARDS (Mobile Card Layout)
   ============================================ */

@media (max-width: 768px) {
    .table-cards {
        display: block;
    }

    .table-cards thead {
        display: none;
    }

    .table-cards tbody {
        display: block;
    }

    .table-cards tbody tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid var(--border-color);
        border-radius: 10px;
        padding: 4px 12px;
        background: var(--card-bg);
        box-shadow: var(--shadow);
    }

    .table-cards tbody td {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 9px 0;
        border-bottom: 1px solid var(--border-color);
        font-size: 14px;
        white-space: normal;
        gap: 2px;
        min-width: 0;
    }

    .table-cards tbody td>*,
    .table-cards tbody td>span {
        text-align: left;
        word-break: break-word;
        overflow-wrap: break-word;
        min-width: 0;
    }

    .table-cards tbody td br {
        display: none;
    }

    .table-cards tbody td:last-child {
        border-bottom: none;
    }

    .table-cards tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        flex-shrink: 0;
        margin-bottom: 3px;
    }

    .table-cards tbody td.actions {
        justify-content: flex-end;
        padding-top: 10px;
        gap: 8px;
        flex-wrap: wrap;
    }

    .table-cards tbody td.actions::before {
        display: none;
    }

    /* === Accordion: standardmäßig zugeklappt === */
    .table-cards tbody tr td:not(.card-header-cell) {
        display: none;
    }

    .table-cards tbody tr.open td:not(.card-header-cell) {
        display: flex;
    }

    /* Header-Zelle (Name): immer sichtbar, klickbar */
    .card-header-cell {
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        cursor: pointer;
        font-size: 15px;
        font-weight: 600;
        color: var(--text-color);
        padding: 13px 0;
        border-bottom: none;
        user-select: none;
        gap: 0;
        min-width: 0;
    }

    .card-header-cell .filename-text {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0;
        flex: 1;
    }

    .table-cards tbody tr.open .card-header-cell {
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 12px;
    }

    /* Kein Label für die Header-Zelle */
    .card-header-cell::before {
        display: none !important;
    }

    /* Chevron-Pfeil rechts */
    .card-header-cell::after {
        content: '';
        display: block;
        flex-shrink: 0;
        margin-left: auto;
        width: 18px;
        height: 18px;
        background-color: var(--text-muted);
        transition: transform 0.25s ease;
        mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"/></svg>');
        mask-size: contain;
        mask-repeat: no-repeat;
        mask-position: center;
        -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"/></svg>');
        -webkit-mask-size: contain;
        -webkit-mask-repeat: no-repeat;
        -webkit-mask-position: center;
    }

    .table-cards tbody tr.open .card-header-cell::after {
        transform: rotate(90deg);
    }

    /* Mitgliedsnummer (small) im Karten-Header: bündig zur Grundlinie und mit Abstand */
    .table-cards .card-header-cell br {
        display: none;
    }

    .table-cards .card-header-cell small {
        align-self: center;
        margin-left: 10px;
        flex-shrink: 0;
        font-weight: 400;
    }

    /* table-responsive / table-container braucht auf Mobile keinen overflow-x mehr bei card layout */
    .table-responsive:has(.table-cards),
    .table-container:has(.table-cards) {
        overflow-x: visible;
    }

    .main-content {
        overflow-x: hidden;
    }

    /* Suchleiste auf Mobile */
    .members-search-bar {
        flex-direction: column;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .members-search-bar h3 {
        margin-bottom: 0;
    }

    #liveSearchInput {
        width: 100%;
    }
}

/* ============================================
   BADGE-VARIANTEN
   ============================================ */

.badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    white-space: nowrap;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-secondary {
    background: #f1f5f9;
    color: var(--text-muted);
}

/* ============================================
   TAB-NAVIGATION
   ============================================ */

.tab-nav {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-link {
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-muted);
    transition: all 0.15s;
    white-space: nowrap;
}

.tab-link:hover {
    color: var(--text-color);
}

.tab-link.active {
    background: white;
    color: var(--text-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ============================================
   VERANSTALTUNGS-KARTEN (events.php)
   ============================================ */

.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.event-card {
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s;
}

.event-card:hover {
    box-shadow: var(--shadow-lg);
}

.event-card-img {
    height: 160px;
    overflow: hidden;
    background: #f1f5f9;
}

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

.event-card-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.event-card-header {
    margin-bottom: 8px;
}

.event-card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 8px;
    line-height: 1.3;
}

.event-card-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 10px;
    line-height: 1.7;
}

.event-card-desc {
    font-size: 14px;
    color: var(--text-color);
    margin: 0 0 16px;
    line-height: 1.5;
    flex: 1;
}

.event-card-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

/* ============================================
   FINANZTABELLE (finance.php)
   ============================================ */

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.finance-row td {
    vertical-align: top;
    padding: 12px 10px;
}

.finance-row-income td:first-child {
    border-left: 3px solid var(--success-color);
}

.finance-row-expense td:first-child {
    border-left: 3px solid var(--danger-color);
}

table tfoot tr td {
    padding: 12px 10px;
}

/* ============================================
   DOKUMENTE (documents.php)
   ============================================ */

.ftp-badge {
    display: inline-block;
    background: #f59e0b;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.5px;
}

.doc-icon {
    margin-right: 6px;
    font-style: normal;
}

@media (max-width: 768px) {
    .folder-row td {
        display: none;
    }

    .folder-row .card-header-cell {
        display: flex;
    }

    .folder-row .card-header-cell a {
        display: flex;
        align-items: center;
        width: 100%;
    }
}

@keyframes progress-pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.45;
    }

    100% {
        opacity: 1;
    }
}

.progress-processing {
    animation: progress-pulse 1.2s ease-in-out infinite;
}

.data-table .doc-name-link,
.data-table .doc-name-link:visited,
.data-table .doc-name-link:hover {
    color: inherit;
    text-decoration: none;
}

.docs-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.docs-inline-form {
    display: none;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
}

.docs-inline-form.active {
    display: block;
}

.docs-inline-form .form-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.docs-inline-form .form-row input,
.docs-inline-form .form-row select {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    background: var(--card-bg);
    color: var(--text-color);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    font-size: 14px;
    margin-bottom: 16px;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-sep {
    color: var(--text-muted);
}

.folder-row td {
    background: #f8fafc;
}

.file-size {
    white-space: nowrap;
    color: var(--text-muted);
    font-size: 13px;
}

.doc-description-snippet {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-muted);
    font-size: 13px;
}

/* ============================================
   FINANZTABELLE MOBIL (finance.php)
   ============================================ */

.fin-mobile-meta {
    display: none;
}

@media (max-width: 640px) {
    .finance-table {
        display: block;
    }

    .finance-table thead {
        display: none;
    }

    .finance-table tbody,
    .finance-table tfoot {
        display: block;
    }

    .finance-table tbody tr {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "date   amount"
            "desc   desc"
            ".      actions";
        row-gap: 2px;
        column-gap: 10px;
        padding: 10px 0;
        border-bottom: 1px solid var(--border-color);
    }

    .finance-table td {
        padding: 2px 0 !important;
        border: none !important;
    }

    .fin-col-date {
        grid-area: date;
        font-size: 11px;
        color: var(--text-muted);
        align-self: center;
    }

    .fin-col-desc {
        grid-area: desc;
        font-size: 13px;
    }

    .fin-col-amount {
        grid-area: amount;
        font-size: 14px;
        font-weight: 700;
        white-space: nowrap;
        text-align: right;
        align-self: center;
    }

    .fin-col-actions {
        grid-area: actions;
        justify-self: end;
    }

    .fin-col-cat,
    .fin-col-method,
    .fin-col-event {
        display: none !important;
    }

    .fin-mobile-meta {
        display: block;
        font-size: 11px;
        color: var(--text-muted);
        margin-top: 3px;
        line-height: 1.5;
    }

    .finance-table tfoot tr {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 12px;
        padding: 8px 0;
        border-top: 2px solid var(--border-color);
        font-weight: 700;
    }

    .finance-table tfoot td {
        padding: 0 !important;
        border: none !important;
    }

    .fin-tfoot-empty {
        display: none !important;
    }
}

/* ============================================
   KALENDER (calendar.php)
   ============================================ */

/* Verhindert horizontales Scrollen durch lange Eintrags-Texte */
.cal-main-overflow {
    overflow-x: hidden;
}

.cal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.cal-toolbar-left,
.cal-toolbar-center,
.cal-toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cal-period {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    min-width: 160px;
    text-align: center;
    padding: 0 4px;
}

/* Filter-Panel */
.cal-filter-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 16px;
    display: none;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.cal-filter-panel.open {
    display: flex;
}

/* Legende */
.cal-legend {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    font-size: 13px;
    align-items: center;
}

.cal-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cal-legend-dot {
    width: 13px;
    height: 13px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* Monatsansicht */
.cal-month {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.cal-month-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--sidebar-bg);
}

.cal-wdh {
    color: var(--sidebar-text);
    text-align: center;
    padding: 9px 4px;
    font-size: 12px;
    font-weight: 600;
}

.cal-month-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border-color);
}

.cal-cell {
    background: var(--card-bg);
    min-height: 108px;
    min-width: 0;
    overflow: hidden;
    padding: 6px;
    vertical-align: top;
}

.cal-cell-empty {
    background: #f8fafc;
}

.cal-cell-num {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    line-height: 1;
}

.cal-cell-today .cal-cell-num {
    background: var(--primary-color);
    color: #fff;
}

.cal-cell-weekend .cal-cell-num {
    color: var(--text-muted);
}

.cal-ev {
    font-size: 11px;
    padding: 2px 5px;
    border-radius: 3px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    cursor: default;
    line-height: 1.4;
}

.cal-ev-planned {
    background: var(--sec-ev-bg);
    color: var(--sec-ev-text);
}

.cal-ev-confirmed {
    background: #dcfce7;
    color: #166534;
}

.cal-ev-cancelled {
    background: #fee2e2;
    color: #991b1b;
    text-decoration: line-through;
    opacity: .75;
}

.cal-ev-done {
    background: #f1f5f9;
    color: #64748b;
}

.cal-ev-clickable {
    cursor: pointer !important;
}

.cal-ev-clickable:hover {
    filter: brightness(.93);
}

/* Mehrtägige Veranstaltungen */
.cal-ev-cont {
    border-radius: 0 3px 3px 0;
    margin-left: 0;
    padding-left: 7px;
}

.cal-ev-start {
    border-radius: 3px 0 0 3px;
}

.cal-ev-middle {
    border-radius: 0;
}

/* Detailmodal */
.cal-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.cal-modal-overlay.open {
    display: flex;
}

.cal-modal-box {
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .22);
    width: 100%;
    max-width: 440px;
    padding: 24px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.cal-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
}

.cal-modal-close:hover {
    color: var(--text-color);
}

.cal-modal-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 28px 14px 0;
    line-height: 1.3;
}

.cal-modal-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-color);
    align-items: flex-start;
}

.cal-modal-row span:first-child {
    color: var(--text-muted);
    min-width: 80px;
    flex-shrink: 0;
}

.cal-modal-desc {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
}

.cal-modal-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.cal-modal-link {
    display: inline-block;
    margin-top: 14px;
    font-size: 13px;
    color: var(--primary-color);
    text-decoration: none;
}

.cal-modal-link:hover {
    text-decoration: underline;
}

.cal-bday {
    font-size: 11px;
    padding: 2px 5px;
    border-radius: 3px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #fef9c3;
    color: #92400e;
    display: block;
    line-height: 1.4;
}

.cal-more {
    font-size: 10px;
    color: var(--text-muted);
}

/* Navigations-Toolbar Desktop/Mobile */
.cal-nav-desktop {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cal-nav-mobile {
    display: none;
    align-items: center;
    gap: 6px;
}

/* Jahresansicht (Spalten-Layout) */
.cal-year-stripe {
    display: flex;
    gap: 1px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--border-color);
}

.cal-stripe-col {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
}

.cal-stripe-mhdr {
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    text-align: center;
    padding: 6px 3px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px solid var(--border-color);
}

.cal-stripe-mhdr:hover {
    opacity: .82;
}

.cal-stripe-day {
    display: flex;
    align-items: center;
    padding: 1px 4px;
    height: 18px;
    font-size: 10px;
    color: var(--text-color);
    cursor: pointer;
    border-top: 1px solid var(--border-color);
    gap: 3px;
}

.cal-stripe-day:hover {
    filter: brightness(.95);
}

.cal-stripe-day.has-ev {
    background: var(--sec-ev-bg);
}

.cal-stripe-day.has-bd {
    background: #fef9c3;
}

.cal-stripe-day.has-hd .cal-stripe-dnum {
    color: #c00 !important;
    font-weight: 700;
}

.cal-stripe-day.has-hd .cal-stripe-wd {
    color: #c00 !important;
}

.cal-stripe-day.has-ev.has-bd {
    background: linear-gradient(to right, var(--sec-ev-bg) 50%, #fef9c3 50%);
}

.cal-stripe-day.today {
    background: var(--primary-color) !important;
    color: #fff;
}

.cal-stripe-day.weekend {
    background: rgba(var(--primary-rgb, 37, 99, 235), 0.07);
}

.cal-stripe-day.has-ev.weekend {
    background: var(--sec-ev-bg);
}

.cal-stripe-day.has-bd.weekend {
    background: #fef9c3;
}

.cal-stripe-day.has-ev.has-bd.weekend {
    background: linear-gradient(to right, var(--sec-ev-bg) 50%, #fef9c3 50%);
}

.cal-stripe-day.weekend .cal-stripe-dnum {
    color: var(--primary-color);
    font-weight: 700;
}

.cal-stripe-day.weekend .cal-stripe-wd {
    color: var(--primary-color);
    opacity: .75;
}

.cal-stripe-day.has-hd.weekend .cal-stripe-dnum {
    color: #c00 !important;
}

.cal-stripe-day.has-hd.weekend .cal-stripe-wd {
    color: #c00 !important;
    opacity: 1;
}

/* Extra-Einträge */
.cal-stripe-day.has-ce {
    background: #f3e8ff;
}

.cal-stripe-day.has-ce.has-ev {
    background: linear-gradient(to right, var(--sec-ev-bg) 50%, #f3e8ff 50%);
}

.cal-stripe-day.has-ce.has-bd {
    background: linear-gradient(to right, #f3e8ff 50%, #fef9c3 50%);
}

.cal-stripe-day.has-ce.has-ev.has-bd {
    background: var(--sec-ev-bg);
}

.cal-stripe-day.has-ce.weekend {
    background: #f3e8ff;
}

.cal-stripe-day.has-ce.has-ev.weekend {
    background: var(--sec-ev-bg);
}

.cal-stripe-day.today .cal-stripe-dnum {
    color: #fff;
}

.cal-stripe-day.today .cal-stripe-wd {
    color: rgba(255, 255, 255, .75);
}

/* ============================================================
   Newsletter
   ============================================================ */

.nl-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: -1px;
    border-bottom: 2px solid var(--border-color);
    padding: 0 0 0 0;
}

.nl-tab-btn {
    padding: 9px 20px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    border-radius: 0;
    transition: color .15s, border-color .15s;
}

.nl-tab-btn:hover {
    color: var(--text-primary);
}

.nl-tab-btn.active {
    color: var(--primary-color, #3b82f6);
    border-bottom-color: var(--primary-color, #3b82f6);
}

.nl-hidden {
    display: none !important;
}

.nl-tab-panel {
    margin-top: 16px;
}

.nl-placeholder-box {
    background: var(--bg-secondary, #f5f5f5);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
}

.nl-placeholder-box summary {
    cursor: pointer;
    font-weight: 500;
    color: var(--text-muted);
}

.nl-placeholder-chip {
    display: inline-block;
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2px 8px;
    font-family: monospace;
    font-size: 12px;
    color: var(--primary-color, #3b82f6);
    transition: background .15s;
}

.nl-placeholder-chip:hover {
    background: var(--primary-color, #3b82f6);
    color: #fff;
    border-color: var(--primary-color, #3b82f6);
}

/* ============================================================
   Event-Anmeldung
   ============================================================ */

.event-reg-info {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 0 6px;
    margin: 0;
}

.event-reg-info.registered {
    color: var(--color-success, #16a34a);
}

.event-reg-info.waitlist {
    color: var(--color-warning, #d97706);
}

.event-reg-info.full {
    color: var(--color-danger, #dc2626);
}

.event-reg-info.closed {
    color: var(--text-muted);
}

.event-reg-block {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color, #e2e8f0);
}

.event-reg-block.no-border {
    border-top: none;
    padding-top: 0;
}

/* ── Newsletter Mehrabschnitts-Editor ── */
#nl-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nl-section-card {
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-color, #fff);
}

.nl-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--bg-secondary, #f8fafc);
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.nl-section-number {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nl-section-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nl-section-delete {
    background-color: transparent;
    color: var(--danger, #dc2626);
    border: 1px solid var(--danger, #dc2626);
}

.nl-section-delete:hover {
    background-color: var(--danger, #dc2626);
    color: #fff;
}

.nl-section-move-up,
.nl-section-move-down {
    background-color: var(--secondary-color, #64748b);
    color: #fff;
    border: 1px solid transparent;
}

.nl-section-move-up:hover,
.nl-section-move-down:hover {
    background-color: #475569;
    color: #fff;
}

/* Override: section editor border handled by card */
.nl-section-card .note-editor.note-frame {
    border: none;
    border-radius: 0;
}

/* ── Summernote Newsletter-Editor ── */
.note-editor.note-frame {
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    overflow: hidden;
}

.note-editor.note-frame .note-toolbar {
    background: var(--bg-secondary, #f8fafc);
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    padding: 6px 8px;
}

/* ============================================
   DOCS – Kontextsensitiver Hilfe-Button
   ============================================ */

.page-help-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 16px 10px 12px;
    background: var(--primary-color, #2563eb);
    color: #fff;
    border-radius: 999px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
    transition: background .2s, transform .15s, box-shadow .2s;
    white-space: nowrap;
}

.page-help-btn:hover {
    background: color-mix(in srgb, var(--primary-color, #2563eb) 85%, #000);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
    color: #fff;
}

.page-help-btn svg {
    flex-shrink: 0;
}

.page-help-btn-label {
    line-height: 1;
}

@media (max-width: 768px) {
    .page-help-btn {
        padding: 10px 12px;
        bottom: 20px;
        right: 16px;
    }

    .page-help-btn-label {
        display: none;
    }
}

/* ============================================
   DOCS – Hilfe & Dokumentation
   ============================================ */

.docs-main {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* ── Suche im Nav ─────────────────────────────────────── */

.docs-search-form {
    margin-bottom: 16px;
}

.docs-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.docs-search-input {
    width: 100%;
    padding: 7px 30px 7px 10px;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 6px;
    font-size: 13px;
    background: var(--bg-primary, #fff);
    color: var(--text-primary, #1e293b);
    transition: border-color .2s;
}

.docs-search-input:focus {
    outline: none;
    border-color: var(--primary-color, #2563eb);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color, #2563eb) 15%, transparent);
}

.docs-search-clear {
    position: absolute;
    right: 8px;
    font-size: 11px;
    color: var(--text-muted, #94a3b8);
    text-decoration: none;
    line-height: 1;
    padding: 2px;
}

.docs-search-clear:hover {
    color: var(--text-primary, #1e293b);
}

/* ── Drucken-Button im Header ─────────────────────────────────────── */

.docs-print-open {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Drucken-Modal ────────────────────────────────────────────────── */

.docs-print-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.docs-print-modal[hidden] {
    display: none;
}

.docs-print-modal-box {
    background: var(--bg-primary, #fff);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .2);
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.docs-print-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.docs-print-modal-head h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
    margin: 0;
}

.docs-print-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-muted, #94a3b8);
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
}

.docs-print-modal-close:hover {
    background: var(--bg-secondary, #f1f5f9);
    color: var(--text-primary, #1e293b);
}

.docs-print-modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.docs-print-quick {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.docs-print-quick-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    color: var(--text-primary, #1e293b);
}

.docs-print-custom-list {
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 280px;
    overflow-y: auto;
}

.docs-print-group-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-muted, #94a3b8);
    margin-bottom: 6px;
}

.docs-print-page-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    color: var(--text-primary, #1e293b);
    padding: 2px 0;
}

.docs-print-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--border-color, #e2e8f0);
}

.docs-print-modal-foot .btn {
    display: flex;
    align-items: center;
    gap: 6px;
}

.docs-layout {
    display: flex;
    gap: 32px;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* ── Nav-Sidebar ──────────────────────────────────────── */

.docs-nav {
    width: 220px;
    flex-shrink: 0;
    padding-right: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.docs-nav-scroll {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    min-height: 0;
}

.docs-nav-group {
    margin-bottom: 20px;
}

.docs-nav-group-title {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-muted, #94a3b8);
    padding: 0 8px 6px;
}

.docs-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.docs-nav-link {
    display: block;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-secondary, #475569);
    text-decoration: none;
    transition: background .15s, color .15s;
    line-height: 1.4;
}

.docs-nav-link:hover {
    background: var(--bg-secondary, #f1f5f9);
    color: var(--text-primary, #1e293b);
}

.docs-nav-link.active {
    background: color-mix(in srgb, var(--primary-color, #2563eb) 12%, transparent);
    color: var(--primary-color, #2563eb);
    font-weight: 600;
}

.docs-nav-print-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    margin-top: 16px;
    flex-shrink: 0;
}



.docs-content {
    flex: 1;
    min-width: 0;
    min-height: 0;
    line-height: 1.75;
    color: var(--text-primary, #1e293b);
    overflow-y: auto;
    padding-right: 8px;
}

.docs-content h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color, #e2e8f0);
    color: var(--text-primary, #1e293b);
}

.docs-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 36px 0 12px;
    color: var(--text-primary, #1e293b);
}

.docs-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 28px 0 8px;
    color: var(--text-primary, #1e293b);
}

.docs-content h4,
.docs-content h5,
.docs-content h6 {
    font-size: 1rem;
    font-weight: 600;
    margin: 20px 0 6px;
}

.docs-content p {
    margin: 0 0 14px;
}

.docs-content ul,
.docs-content ol {
    padding-left: 22px;
    margin: 0 0 14px;
}

.docs-content li {
    margin-bottom: 4px;
}

.docs-content a {
    color: var(--primary-color, #2563eb);
    text-decoration: underline;
}

.docs-content a:hover {
    opacity: .8;
}

.docs-content code {
    background: var(--bg-secondary, #f1f5f9);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: .875em;
    font-family: 'Courier New', Courier, monospace;
    color: var(--text-primary, #1e293b);
}

.docs-content pre {
    background: var(--bg-secondary, #f1f5f9);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    margin: 0 0 18px;
}

.docs-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: .875rem;
}

.docs-content blockquote {
    border-left: 4px solid var(--primary-color, #2563eb);
    margin: 0 0 18px;
    padding: 10px 16px;
    background: color-mix(in srgb, var(--primary-color, #2563eb) 8%, transparent);
    border-radius: 0 6px 6px 0;
    color: var(--text-secondary, #475569);
}

.docs-content blockquote p {
    margin: 0;
}

.docs-content hr {
    border: none;
    border-top: 1px solid var(--border-color, #e2e8f0);
    margin: 28px 0;
}

.docs-content strong {
    font-weight: 700;
}

.docs-content del {
    opacity: .6;
}

/* Tabellen */
.docs-table-wrap {
    overflow-x: auto;
    margin: 0 0 18px;
}

.docs-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.docs-content th {
    background: var(--bg-secondary, #f1f5f9);
    font-weight: 600;
    padding: 8px 12px;
    text-align: left;
    border: 1px solid var(--border-color, #e2e8f0);
    white-space: nowrap;
}

.docs-content td {
    padding: 7px 12px;
    border: 1px solid var(--border-color, #e2e8f0);
    vertical-align: top;
}

.docs-content tr:nth-child(even) td {
    background: color-mix(in srgb, var(--bg-secondary, #f8fafc) 50%, transparent);
}

/* Suchmarkierung */
.docs-content mark,
.docs-result-excerpt mark {
    background: #fef08a;
    color: inherit;
    border-radius: 2px;
    padding: 0 2px;
}

/* Suchergebnisse */
.docs-search-results {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.docs-search-result {
    padding: 16px;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    background: var(--bg-primary, #fff);
}

.docs-result-title {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    color: var(--primary-color, #2563eb);
    text-decoration: none;
    margin-bottom: 6px;
}

.docs-result-title:hover {
    text-decoration: underline;
}

.docs-result-excerpt {
    font-size: .875rem;
    color: var(--text-secondary, #475569);
    margin: 0;
    line-height: 1.6;
    font-family: 'Courier New', Courier, monospace;
}

.docs-empty,
.docs-not-found {
    color: var(--text-muted, #94a3b8);
    font-style: italic;
    padding: 32px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .docs-main {
        height: auto;
        overflow: visible;
    }

    .docs-layout {
        flex-direction: column;
        overflow: visible;
    }

    .docs-nav {
        width: 100%;
        overflow: visible;
        border-bottom: 1px solid var(--border-color, #e2e8f0);
        padding-bottom: 12px;
        margin-bottom: 8px;
    }

    .docs-content {
        overflow-y: visible;
    }

    .docs-search-input {
        width: 100%;
    }
}

.note-editor.note-frame .note-editable {
    background: #fff;
    color: var(--text-primary, #1e293b);
    font-size: 15px;
    line-height: 1.75;
    padding: 20px 24px;
    min-height: 320px;
}

/* Abstand zwischen floatenden Bildern und Text im Editor */
.note-editor.note-frame .note-editable img[style*="float: left"],
.note-editor.note-frame .note-editable img[style*="float:left"] {
    margin: 0 16px 10px 0;
}

.note-editor.note-frame .note-editable img[style*="float: right"],
.note-editor.note-frame .note-editable img[style*="float:right"] {
    margin: 0 0 10px 16px;
}

.note-editor.note-frame .note-statusbar {
    background: var(--bg-secondary, #f8fafc);
    border-top: 1px solid var(--border-color, #e2e8f0);
}

/* Override default Summernote-Lite button styles to match app */
.note-btn {
    background: transparent;
    border-color: var(--border-color, #e2e8f0);
    color: var(--text-primary, #1e293b);
}

.note-btn:hover,
.note-btn.active {
    background: var(--primary, #2563eb);
    border-color: var(--primary, #2563eb);
    color: #fff;
}

.cal-stripe-day.today .cal-stripe-evs {
    color: rgba(255, 255, 255, .9);
}

.cal-stripe-empty {
    height: 18px;
    border-top: 1px solid var(--border-color);
    background: #f8fafc;
}

.cal-stripe-dnum {
    font-size: 10px;
    font-weight: 600;
    min-width: 14px;
    text-align: right;
    flex-shrink: 0;
    line-height: 1;
}

.cal-stripe-wd {
    font-size: 9px;
    min-width: 16px;
    flex-shrink: 0;
    color: var(--text-muted);
}

.cal-stripe-evs {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 9px;
    color: #374151;
    margin-left: 2px;
}

/* Print-Kopf (nur im Druck sichtbar) */
.cal-print-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 4px;
    margin-bottom: 6px;
}

.cal-print-header strong {
    font-size: 14px;
}

.cal-print-header .cal-print-year {
    font-size: 22px;
    font-weight: 700;
    color: #111;
}

/* Kalender Responsive */
@media (max-width: 900px) {
    .cal-period {
        min-width: 130px;
        font-size: 15px;
    }
}

@media (max-width: 650px) {
    .cal-nav-desktop {
        display: none !important;
    }

    .cal-nav-mobile {
        display: flex !important;
    }

    .cal-year-stripe {
        overflow: visible;
        border: none;
        background: none;
        gap: 0;
    }

    .cal-stripe-col {
        display: none;
        min-width: 0;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        overflow: hidden;
    }

    .cal-stripe-col.active {
        display: flex;
    }

    .cal-toolbar {
        gap: 8px;
    }

    .cal-period {
        min-width: 110px;
        font-size: 14px;
    }
}

/* Kalender Print */
@media print {

    .sidebar,
    .sidebar-overlay,
    .mobile-header,
    .cal-toolbar,
    .cal-filter-panel,
    .cal-legend,
    .content-header,
    .no-print {
        display: none !important;
    }

    .admin-wrapper,
    .main-content {
        display: block !important;
    }

    .main-content {
        padding: 0 !important;
        margin-left: 0 !important;
        width: 100% !important;
    }

    .content-wrapper {
        padding: 4px 0 0 0 !important;
    }

    body {
        background: #fff !important;
    }

    .cal-print-header {
        display: flex !important;
    }

    .cal-cell {
        min-height: 58px !important;
    }

    .cal-month {
        break-inside: avoid;
    }

    .cal-year-stripe {
        overflow: hidden !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .cal-stripe-col {
        min-width: 0 !important;
    }

    .cal-stripe-mhdr {
        font-size: 9px !important;
        padding: 4px 2px !important;
    }

    .cal-stripe-day {
        font-size: 8px !important;
        height: 15px !important;
    }

    .cal-stripe-dnum {
        font-size: 8px !important;
        min-width: 11px !important;
    }

    .cal-stripe-wd {
        font-size: 7px !important;
        min-width: 12px !important;
    }

    .cal-stripe-evs {
        font-size: 6px !important;
    }

    .cal-stripe-empty {
        height: 15px !important;
    }

    .cal-stripe-day.today {
        background: transparent !important;
        color: var(--text-color) !important;
    }

    .cal-stripe-day.today .cal-stripe-dnum {
        color: var(--text-color) !important;
        font-weight: 700;
    }

    .cal-stripe-day.today .cal-stripe-wd {
        color: var(--text-muted) !important;
    }

    .cal-stripe-day.today .cal-stripe-evs {
        color: #374151 !important;
    }

    .cal-stripe-day.has-ev {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .cal-stripe-day.has-bd {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .cal-stripe-day.has-ce {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .cal-print-entries {
        display: block !important;
        margin-top: 0 !important;
        page-break-before: always;
        break-before: page;
    }

    .cal-print-entries table {
        font-size: 7px !important;
    }

    .cal-print-entries th,
    .cal-print-entries td {
        padding: 2px 4px !important;
    }

    .cal-stripe-day.has-hd .cal-stripe-dnum {
        color: #c00 !important;
    }

    .cal-stripe-day.has-hd .cal-stripe-wd {
        color: #c00 !important;
    }

    .cal-print-events {
        display: block !important;
        margin-top: 6px !important;
    }

    .cal-print-events table {
        font-size: 7px !important;
    }

    .cal-print-events th,
    .cal-print-events td {
        padding: 2px 4px !important;
    }

    .cal-year-stripe {
        background: #333 !important;
        border: 2px solid #333 !important;
        border-radius: 0 !important;
        gap: 2px !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .cal-stripe-col {
        background: #fff !important;
    }

    .cal-stripe-mhdr {
        background: #1e293b !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .cal-stripe-day {
        border-top-color: #aaa !important;
    }

    .cal-stripe-empty {
        border-top-color: #aaa !important;
        background: #f5f5f5 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .cal-stripe-dnum {
        color: #111 !important;
    }

    .cal-stripe-wd {
        color: #444 !important;
    }
}

/* ============================================
   E-MAIL-AKTIONSSEITEN
   (verify-email.php, cancel-email-change.php)
   ============================================ */

body.email-action-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.verification-container,
.cancellation-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 50px;
    width: 100%;
    max-width: 500px;
    margin: 20px;
    text-align: center;
}

.email-action-page .logo h1 {
    font-size: 36px;
    font-weight: 700;
    color: #2563eb;
    margin: 0 0 10px 0;
}

.email-action-page .logo p {
    color: #64748b;
    margin: 0 0 30px 0;
}

.success-icon,
.error-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.verification-container .message-box,
.cancellation-container .message-box {
    margin: 30px 0;
}

.verification-container .message-box h2,
.cancellation-container .message-box h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #1e293b;
}

.verification-container .message-box p,
.cancellation-container .message-box p {
    color: #64748b;
    line-height: 1.6;
}

.verification-container .btn-group,
.cancellation-container .btn-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 30px;
}

.verification-container .btn,
.cancellation-container .btn {
    padding: 12px 24px;
    border-radius: 8px;
}

.warning-box {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
    text-align: left;
}

/* ============================================
   UTILITY
   ============================================ */

.text-muted {
    color: var(--text-muted);
}

.text-danger {
    color: var(--danger-color);
}

.text-success {
    color: var(--success-color);
}

.d-none {
    display: none;
}

.d-inline {
    display: inline;
}

.d-flex {
    display: flex;
}

.nowrap {
    white-space: nowrap;
}

.fw-600 {
    font-weight: 600;
}

.fs-13 {
    font-size: 13px;
}

.cursor-pointer {
    cursor: pointer;
}

.mb-16 {
    margin-bottom: 16px;
}

.mt-20 {
    margin-top: 20px;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
    border: none;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

/* Finance split grid (Barkasse / Konto) */
.finance-split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

@media (max-width: 576px) {
    .finance-split-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .event-grid {
        grid-template-columns: 1fr;
    }

    .tab-nav {
        gap: 2px;
    }

    .tab-link {
        padding: 6px 12px;
        font-size: 13px;
    }
}