
/* === NBL V3 - Ultra Modern Design === */

:root {
    /* Primary Colors - Blau */
    --primary: #2563eb;
    --primary-light: #60a5fa;
    --primary-dark: #1e40af;
    --primary-rgb: 37, 99, 235;

    /* Secondary Colors - Grün */
    --secondary: #10b981;
    --secondary-light: #34d399;
    --secondary-dark: #059669;
    --secondary-rgb: 16, 185, 129;

    /* Accent Colors */
    --accent-purple: #8b5cf6;
    --accent-orange: #f97316;
    --accent-pink: #ec4899;

    /* Neutral Colors */
    --neutral-900: #0f172a;
    --neutral-800: #1e293b;
    --neutral-700: #334155;
    --neutral-600: #475569;
    --neutral-500: #64748b;
    --neutral-400: #94a3b8;
    --neutral-300: #cbd5e1;
    --neutral-200: #e2e8f0;
    --neutral-100: #f1f5f9;
    --neutral-white: #ffffff;

    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-dark: #0f172a;
    --bg-sidebar: linear-gradient(180deg, #1e40af 0%, #2563eb 100%);
    --bg-footer: #1e293b;

    /* Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --text-inverse: #ffffff;

    /* Großzügiges Spacing System */
    --space-xs: 0.375rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    --space-5xl: 8rem;

    /* Modern Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    --font-size-xs: 0.7rem;
    --font-size-sm: 0.8rem;
    --font-size-base: 0.875rem;
    --font-size-lg: 0.95rem;
    --font-size-xl: 1.1rem;
    --font-size-2xl: 1.25rem;
    --font-size-3xl: 1.5rem;
    --font-size-4xl: 1.875rem;
    --font-size-5xl: 2.25rem;

    /* Dramatische Schatten */
    --shadow-xs: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-2xl: 0 35px 60px -15px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 30px rgba(var(--primary-rgb), 0.3);

    /* Smooth Transitions */
    --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Layout - Großzügig */
    --nav-height: 90px;
    --sidebar-width: 400px;
    --max-content-width: 1600px;
    --max-content-width-wide: 1600px;

    /* Status Colors */
    --danger: #dc2626;
    --danger-light: #ef4444;
    --danger-dark: #b91c1c;
    --danger-rgb: 220, 38, 38;
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --warning-dark: #d97706;
    --warning-rgb: 245, 158, 11;

    /* Additional Radius */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 999px;

    /* Additional Spacing */
    --space-2xs: 0.5rem;

    /* Z-Index Scale */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 500;
    --z-overlay: 900;
    --z-modal: 1000;
    --z-toast: 1100;
}

/* === KEYFRAME ANIMATIONS - EXTENDED === */

@keyframes slideInFromRight {
    from {
        transform: translateX(120px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromTop {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInFromBottom {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(var(--scale-from, 0.9));
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

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

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.8;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition-normal), opacity var(--transition-normal);
}

img.icon,
svg.icon {
    width: 20px !important;
    height: 20px !important;
    display: inline-block;
    vertical-align: middle;
}
svg.icon {
    color: var(--primary);
    transition: color var(--transition-normal);
}
a:hover svg.icon {
    color: var(--primary-light);
}

/* Icons in Buttons erben die Button-Textfarbe (statt Primary-Blau) */
.btn svg.icon,
.btn-primary svg.icon,
.btn-secondary svg.icon,
.btn-danger svg.icon,
.btn-warning svg.icon,
button svg.icon,
input[type="submit"] svg.icon,
input[type="button"] svg.icon {
    color: currentColor;
}
a.btn:hover svg.icon,
.btn:hover svg.icon,
button:hover svg.icon {
    color: currentColor;
}

/* Zurück-Navigation (dezenter Textlink mit Pfeil) */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 500;
    text-decoration: none;
    padding: var(--space-xs) 0;
    margin-bottom: var(--space-md);
    transition: color var(--transition-normal);
}
.back-link:hover {
    color: var(--primary);
    transform: none;
    text-decoration: none;
}
.back-link svg.icon {
    width: 16px !important;
    height: 16px !important;
    color: currentColor;
    transition: transform var(--transition-normal);
}
.back-link:hover svg.icon {
    transform: translateX(-3px);
    color: currentColor;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
}

a:hover {
    color: var(--primary-light);
    transform: translateX(2px);
}

a:active {
    transform: scale(0.98);
}

/* === TYPOGRAPHY === */

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--space-xl);
    letter-spacing: -0.03em;
    animation: fadeInUp 0.7s ease-out backwards;
}

h1 {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--space-xl);
    animation-delay: 0.1s;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: var(--font-size-2xl);
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-lg);
    font-weight: 700;
    position: relative;
    padding-bottom: var(--space-sm);
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 2px;
    animation: scaleIn 0.6s ease-out 0.3s backwards;
}

h3 {
    font-size: var(--font-size-xl);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
    font-weight: 700;
}

h4 {
    font-size: var(--font-size-lg);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
    font-weight: 600;
}

h5 {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

h6 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

h2 a {
    color: var(--text-primary);
    background: none;
    -webkit-text-fill-color: var(--text-primary);
}

h2 a:hover {
    color: var(--primary);
    -webkit-text-fill-color: var(--primary);
}

p {
    margin-bottom: var(--space-xl);
    font-size: var(--font-size-base);
    line-height: 1.9;
    animation: fadeIn 0.8s ease-out backwards;
    animation-delay: 0.3s;
}

.highlight {
    color: var(--primary);
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === GRADIENT TEXT === */
.sidebar-card h2, .sidebar-card h2 a, .sidebar-card .highlight, .user-profile-header .user-name, .user-profile-details .detail-item .highlight {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
/* === LAYOUT - FULLSCREEN STRUCTURE === */

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

.container {
    width: 100%;
    max-width: var(--max-content-width-wide);
    margin: 0 auto;
    padding: 0 var(--space-2xl);
}

/* === NAVIGATION - MODERN & SPACIOUS === */

.nav-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(203, 213, 225, 0.3);
    z-index: var(--z-sticky);
    transition: all var(--transition-normal);
    animation: slideInFromTop 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.nav-wrapper:hover {
    box-shadow: var(--shadow-xl);
    border-bottom-color: var(--primary-light);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 var(--space-2xl);
    max-width: var(--max-content-width-wide);
    margin: 0 auto;
}

.logo-container {
    --scale-from: 0.3;
    display: flex;
    align-items: center;
    animation: scaleIn 0.8s var(--transition-bounce);
    position: relative;
}

.logo-container img {
    height: 80px;
    width: auto;
    transition: all var(--transition-slow);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.07));
}

.logo-container:hover img {
    transform: scale(1.08) rotate(-2deg);
    filter: drop-shadow(0 8px 12px rgba(var(--primary-rgb), 0.2));
}

/* Menu */
.menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--space-sm);
}

.menu > li {
    position: relative;
    display: flex;
    align-items: center;
    animation: fadeInDown 0.5s ease-out backwards;
    animation-delay: calc(0.1s + var(--stagger, 0) * 0.05s);
}

.menu > li > a {
    display: flex;
    align-items: center;
    padding: var(--space-md) var(--space-xl);
    font-weight: 600;
    font-size: var(--font-size-base);
    transition: all var(--transition-normal);
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: width var(--transition-normal);
}

.menu > li > a:hover {
    color: var(--primary);
    background: var(--bg-tertiary);
    transform: translateY(-2px);
}

.menu > li > a:hover::after {
    width: 60%;
}

.menu > li > a.active {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: var(--text-inverse);
    font-weight: 700;
}

.menu > li > a.active::after {
    width: 60%;
    background: var(--text-inverse);
}

/* Dark Mode Toggle in Nav */
.nav-dark-toggle a {
    padding: var(--space-sm) !important;
    border-radius: 12px !important;
}

.nav-dark-toggle a::after {
    display: none !important;
}

.nav-dark-toggle svg {
    display: block;
    color: var(--text-secondary);
    transition: color var(--transition-normal);
}

.nav-dark-toggle a:hover svg {
    color: var(--primary);
}

/* Submenu - Modern Dropdown */
.sub-menu {
    position: absolute;
    top: calc(100%);
    left: 0;
    min-width: 280px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all var(--transition-normal);
    z-index: var(--z-dropdown);
    padding: var(--space-sm);
    overflow: hidden;
}

.sub-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
}

.menu > li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    animation: scaleIn 0.3s ease-out;
}

.sub-menu > li {
    display: block;
    width: 100%;
}

.sub-menu > li > a {
    display: flex;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    font-weight: 500;
    font-size: var(--font-size-base);
    transition: all var(--transition-normal);
    position: relative;
    border-radius: 10px;
    margin-bottom: var(--space-xs);
}

.sub-menu > li > a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: var(--primary);
    border-radius: 0 2px 2px 0;
    transition: height var(--transition-normal);
}

.sub-menu > li > a:hover {
    background: var(--bg-tertiary);
    color: var(--primary);
    padding-left: calc(var(--space-lg) + var(--space-sm));
    transform: translateX(4px);
}

.sub-menu > li > a:hover::before {
    height: 60%;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
    z-index: calc(var(--z-sticky) + 10);
    padding: 2px;
}

.hamburger div {
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-normal);
}

.hamburger.active div:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active div:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.hamburger.active div:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: calc(var(--z-sticky) - 1);
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* === MAIN CONTENT - SPACIOUS & MODERN === */

.content-wrapper {
    display: block;
    margin-top: calc(var(--nav-height) + var(--space-sm));
    padding-bottom: var(--space-3xl);
    min-height: 100vh;
    width: 100%;
    position: relative;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-2xl);
    padding-right: var(--space-2xl);
}

/* Content-Wrapper mit Sidebar - zentriert als Gesamtblock */
body:has(.sidebar) .content-wrapper {
    max-width: calc(var(--max-content-width) + var(--sidebar-width) + var(--space-2xl));
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-right: calc(var(--sidebar-width) + var(--space-2xl));
    display: flex;
    justify-content: center;
}

/* Sidebar wird relativ zum zentrierten Container positioniert */
body:has(.sidebar) .sidebar {
    right: max(0px, calc(50% - (var(--max-content-width) + var(--sidebar-width) + var(--space-2xl)) / 2));
}

.main-content {
    max-width: var(--max-content-width);
    width: 100%;
    background: var(--bg-primary);
    padding: var(--space-3xl) var(--space-2xl);
    margin: 0 auto var(--space-2xl);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    animation: fadeInUp 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid var(--neutral-200);
    position: relative;
    overflow: visible;
}

/* Main-Content ohne Sidebar - zentriert über gesamte Breite */
body:not(:has(.sidebar)) .main-content {
    max-width: var(--max-content-width);
    margin-left: auto;
    margin-right: auto;
}

body:not(:has(.sidebar)) .content-wrapper {
    display: flex;
    justify-content: center;
    max-width: 100%;
}

/* === SIDEBAR - GRADIENT BLUE DESIGN === */

.sidebar {
    width: var(--sidebar-width);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: var(--space-xl) var(--space-lg);
    animation: slideInFromRight 0.9s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow-y: auto;
    overflow-x: hidden;
    position: fixed;
    right: 0;
    top: var(--nav-height);
    bottom: 0;
    height: calc(100vh - var(--nav-height));
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08), -1px 0 0 rgba(255, 255, 255, 0.5) inset;
    z-index: calc(var(--z-sticky) - 1);
    border-left: 1px solid rgba(255, 255, 255, 0.5);
}

/* Sidebar Toggle Button - Kompakter Tab-Style */
.sidebar-toggle {
    display: none;
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 72px;
    font-size: 1.5rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    z-index: 1010;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: var(--space-xs);
    border-radius: 12px 0 0 12px;
    border: none;
    box-shadow: -2px 2px 12px rgba(var(--primary-rgb), 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                width 0.3s ease,
                box-shadow 0.3s ease;
    overflow: hidden;
}

.sidebar-toggle:hover {
    width: 28px;
    box-shadow: -3px 3px 16px rgba(var(--primary-rgb), 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.sidebar-toggle:active {
    transform: translateY(-50%) scale(0.97);
}


.sidebar-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(30px) saturate(160%);
    -webkit-backdrop-filter: blur(30px) saturate(160%);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-xl);
    transition: all var(--transition-normal);
    animation: fadeInUp 0.6s ease-out backwards;
    position: relative;
    overflow: visible;
    flex-shrink: 0;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.08),
                0 2px 8px rgba(0, 0, 0, 0.04),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
    animation-delay: calc(0.1s + var(--stagger, 0) * 0.1s);
}

.sidebar-card:hover {
    background: rgba(255, 255, 255, 0.75);
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.12),
                0 4px 12px rgba(0, 0, 0, 0.06),
                inset 0 1px 0 rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 1);
}

.sidebar-card h2 {
    margin: 0 0 var(--space-lg) 0;
    padding-bottom: var(--space-md);
    font-size: var(--font-size-lg);
    font-weight: 700;
    border-bottom: 1px solid rgba(203, 213, 225, 0.4);
    letter-spacing: -0.02em;
}

.sidebar-card h2::after,
.summary-card h2::after {
    display: none;
}

.sidebar-card p {
    margin: 0 0 var(--space-2xs);
    font-size: var(--font-size-sm);
    line-height: 1.4;
}

.sidebar-card p:last-child {
    margin-bottom: 0;
}

.sidebar-card a {
    color: var(--primary);
    transition: all var(--transition-normal);
    display: inline-block;
    font-weight: 500;
    width: 100%;
}

.sidebar-card a:hover {
    color: var(--primary-dark);
    transform: translateX(4px);
    text-decoration: none;
}

/* User Profile Card */
.user-profile-card .box-icon {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    flex-wrap: nowrap;
}

.user-profile-card .box-icon a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    transition: all var(--transition-normal);
    border: 1px solid rgba(203, 213, 225, 0.3);
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.user-profile-card .box-icon a:hover {
    background: rgba(var(--primary-rgb), 0.1);
    transform: translateY(-3px) scale(1.05);
    border-color: var(--primary-light);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 1);
}

.user-profile-card .box-icon svg {
    width: 22px;
    height: 22px;
    color: var(--primary);
    transition: color var(--transition-normal);
}

.user-profile-card .box-icon a:hover svg {
    color: var(--primary-dark);
}


.user-profile-header {
    margin-bottom: var(--space-md);
}

.user-profile-header .user-name {
    font-size: var(--font-size-base);
    font-weight: 700;
}

.user-profile-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.user-profile-details .detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    font-size: var(--font-size-sm);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--transition-normal);
    border: 1px solid rgba(203, 213, 225, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04),
                inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.user-profile-details .detail-item:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: translateX(3px);
    border-color: var(--primary-light);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.user-profile-details .detail-item a {
    color: var(--primary);
    font-weight: 500;
}

/* Event Cards */
.event-card {
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    border: 1px solid rgba(203, 213, 225, 0.3);
    transition: all var(--transition-normal);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03),
                inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.event-card:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: translateX(3px) scale(1.01);
    border-color: var(--primary-light);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.event-card .event-date {
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.event-card .event-title {
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-xs);
}

.event-card .event-important {
    color: var(--primary);
    font-weight: 700;
}

.event-card .no-decoration {
    text-decoration: none;
}

.event-card a {
    color: var(--primary);
    font-weight: 500;
}

/* === FOOTER - MODERN DARK FOOTER === */

.main-footer {
    background: var(--bg-footer);
    color: var(--neutral-300);
    padding: var(--space-3xl) 0;
    margin-top: auto;
    border-top: 3px solid var(--primary);
    animation: slideInFromBottom 0.8s ease-out;
    overflow: hidden;
    position: relative;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer-content p {
    margin: 0;
    font-size: var(--font-size-base);
    color: var(--neutral-300);
    font-weight: 500;
}

.footer-content a {
    color: var(--primary-light);
    transition: all var(--transition-normal);
    font-weight: 600;
}

.footer-content a:hover {
    color: var(--text-inverse);
    transform: translateX(4px);
}

/* === CALENDAR GRID - MODERN & SPACIOUS === */

.calendar-container {
    margin-bottom: var(--space-3xl);
    animation: fadeInUp 0.6s ease-out backwards;
    animation-delay: 0.4s;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    background: transparent;
    overflow: visible;
    box-shadow: none;
    border: none;
    padding: var(--space-md);
}

.calendar-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--text-inverse);
    padding: var(--space-lg);
    text-align: center;
    font-weight: 700;
    font-size: var(--font-size-base);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calendar-day {
    background: var(--bg-primary);
    min-height: 100px;
    padding: var(--space-sm);
    transition: all var(--transition-normal);
    cursor: pointer;
    border-radius: 14px;
    border: 2px solid var(--neutral-200);
    box-shadow: var(--shadow-xs);
}

.calendar-day:hover {
    background: var(--bg-tertiary);
    box-shadow: var(--shadow-xl);
    transform: translateY(-8px) scale(1.03);
    border-color: var(--primary-light);
}

.calendar-day-number {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.calendar-day.other-month {
    opacity: 0.4;
}

.calendar-day.other-month .calendar-day-number {
    color: var(--text-tertiary);
}

.calendar-day.today {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1) 0%, rgba(var(--secondary-rgb), 0.05) 100%);
    border: 3px solid var(--primary);
    box-shadow: var(--shadow-glow);
}

.calendar-day.today .calendar-day-number {
    color: var(--primary);
    font-weight: 800;
    font-size: var(--font-size-xl);
}

.calendar-events {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.calendar-event-dot {
    width: 12px;
    height: 12px;
    background: var(--primary);
    cursor: pointer;
    transition: all var(--transition-normal);
    border-radius: 50%;
    box-shadow: var(--shadow-xs);
    position: relative;
}

.calendar-event-dot:hover {
    transform: scale(1.5);
    box-shadow: var(--shadow-lg);
}

.calendar-event-dot.important {
    background: var(--danger);
    animation: pulse 2s infinite;
}

.calendar-event-dot.official {
    background: var(--secondary);
}

.calendar-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-fast), visibility var(--transition-fast);
    pointer-events: none;
    z-index: 500;
}

.calendar-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--bg-primary);
}

.calendar-tooltip-close {
    display: none;
}

@media (hover: hover) {
    .calendar-event-dot:hover .calendar-tooltip {
        opacity: 1;
        visibility: visible;
    }
}

.calendar-tooltip.touch-visible {
    opacity: 1;
    visibility: visible;
}

.calendar-tooltip.touch-visible {
    pointer-events: auto;
}

.calendar-tooltip.touch-visible .calendar-tooltip-close {
    display: inline-block;
    margin-right: var(--space-xs);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
    color: var(--text-secondary);
}

.calendar-tooltip.touch-visible .calendar-tooltip-close:hover {
    color: var(--text-primary);
}

.calendar-month-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-md);
}

.calendar-month-selector h2 {
    margin: 0;
    white-space: nowrap;
    font-size: var(--font-size-lg);
}

.calendar-nav-buttons {
    display: flex;
    gap: var(--space-md);
    flex-shrink: 0;
}

.calendar-nav-buttons button {
    padding: var(--space-md) var(--space-2xl);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--text-inverse);
    border: none;
    cursor: pointer;
    font-weight: 700;
    transition: all var(--transition-normal);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    font-size: var(--font-size-base);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calendar-nav-buttons button:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px) scale(1.05);
}

/* === TABLES - MODERN & SPACIOUS === */

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: var(--space-2xl) 0;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 2px solid var(--neutral-200);
    border-radius: var(--radius-xl);
    animation: fadeInUp 0.7s ease-out backwards;
    animation-delay: 0.3s;
}

table th {
    background: linear-gradient(135deg, var(--neutral-800) 0%, var(--neutral-700) 100%);
    color: var(--text-inverse);
    font-weight: 600;
    text-align: left;
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 2px solid var(--neutral-900);
    position: relative;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

table th:first-child {
    border-top-left-radius: calc(var(--radius-xl) - 2px);
}

table th:last-child {
    border-top-right-radius: calc(var(--radius-xl) - 2px);
}

table td {
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--neutral-200);
    background: var(--bg-primary);
    transition: all var(--transition-normal);
    max-width: 400px;
}

table tr:hover td {
    background: var(--bg-tertiary);
}

table tr:last-child td:first-child {
    border-bottom-left-radius: calc(var(--radius-xl) - 2px);
}

table tr:last-child td:last-child {
    border-bottom-right-radius: calc(var(--radius-xl) - 2px);
}

table tr:last-child td {
    border-bottom: none;
}

/* === FORMS - MODERN INPUT DESIGN === */

input, select, textarea {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    border: 2px solid var(--neutral-300);
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    background: var(--bg-primary);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-xs);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1), var(--shadow-lg);
    transform: translateY(-2px);
    background: var(--bg-primary);
}

input[type="checkbox"],
input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: var(--space-md);
    cursor: pointer;
    accent-color: var(--primary);
}

button,
input[type="submit"],
input[type="button"],
.btn,
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-sm) var(--space-xl);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: var(--font-size-base);
    cursor: pointer;
    border: none;
    text-decoration: none;
    gap: var(--space-xs);
    line-height: 1;
    margin-top: var(--space-xs);
    background-color: var(--primary);
    color: var(--text-inverse);
    box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.18);
    transition: background-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast), color var(--transition-fast);
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.btn:hover,
.btn-primary:hover {
    transform: translateY(-1px);
    background-color: var(--primary-dark);
    box-shadow: 0 8px 22px rgba(var(--primary-rgb), 0.24);
}

button:active,
input[type="submit"]:active,
input[type="button"]:active,
.btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-secondary {
    background-color: var(--neutral-200);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.btn-secondary:hover {
    background-color: var(--neutral-300);
    color: var(--text-primary);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

.btn-danger {
    background-color: var(--danger);
    color: var(--text-inverse);
    box-shadow: 0 6px 16px rgba(var(--danger-rgb), 0.2);
}

.btn-danger:hover {
    background-color: var(--danger-dark);
    color: var(--text-inverse);
    box-shadow: 0 8px 22px rgba(var(--danger-rgb), 0.3);
}

.btn-sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-sm);
}

.btn-lg {
    padding: var(--space-md) var(--space-2xl);
    font-size: var(--font-size-lg);
}

/* Form Sections */
.form-section {
    margin-bottom: var(--space-xl);
}

.form-section > label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.form-section .form-help {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

.form-row {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.form-row > * {
    flex: 1;
    min-width: 200px;
}

/* Form Actions - Button Group Container */
.form-actions {
    margin-top: var(--space-2xl);
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.form-actions .btn,
.form-actions button,
.form-actions input[type="submit"] {
    margin-top: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-sm);
    min-width: 120px;
}

/* BC-Auswahl Cards */
.bc-selection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.bc-option {
    position: relative;
}

.bc-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.bc-option-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-sm);
    background: var(--bg-secondary);
    border: 2px solid var(--neutral-200);
    border-radius: var(--radius-md);
    font-weight: 600;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
    text-align: center;
}

.bc-option input[type="radio"]:checked + .bc-option-label {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: var(--primary);
    color: var(--text-inverse);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.bc-option input[type="radio"]:hover + .bc-option-label {
    border-color: var(--primary-light);
    background: rgba(var(--primary-rgb), 0.05);
}

.bc-option input[type="radio"]:checked:hover + .bc-option-label {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.bc-custom-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.bc-custom-wrapper span {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.bc-custom-wrapper input[type="text"] {
    flex: 1;
}

/* Info Box */
.info-box {
    background: rgba(var(--primary-rgb), 0.05);
    border: 1px solid rgba(var(--primary-rgb), 0.15);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-top: var(--space-sm);
}

.info-box ul {
    margin: 0;
    padding-left: var(--space-lg);
}

.info-box li {
    margin-bottom: var(--space-xs);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.info-box code {
    background: rgba(var(--primary-rgb), 0.1);
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    font-size: var(--font-size-xs);
}

/* === PHOTO GALLERY - MODERN GRID === */

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-xl);
    margin: var(--space-2xl) 0;
}

.photo-item {
    --scale-from: 0.5;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
    background: var(--bg-primary);
    border: 2px solid var(--neutral-200);
    border-radius: var(--radius-xl);
    animation: scaleIn 0.5s ease-out backwards;
    position: relative;
    animation-delay: calc(0.05s + var(--stagger, 0) * 0.05s);
}

.photo-item:hover {
    box-shadow: var(--shadow-2xl);
    transform: translateY(-12px) scale(1.03);
    border-color: var(--primary-light);
}

.photo-item .gallery-image {
    overflow: hidden;
    background: var(--neutral-100);
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-item .gallery-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--neutral-100);
    transition: all var(--transition-normal);
}

.photo-item:hover .gallery-image img {
    transform: scale(1.08);
}

/* Karten-Link: erbt Farbe vom umgebenden Text und bringt keinen eigenen Hover-Versatz (sonst jittert der Inhalt gegenüber dem Card-Lift) */
.photo-item > a,
.photo-item > a:hover,
.photo-item > a:focus,
.photo-item > a:active {
    display: block;
    color: inherit;
    text-decoration: none;
    transform: none;
}

.photo-item .gallery-info {
    padding: var(--space-md) var(--space-md) var(--space-lg);
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
}

/* Titel: klare Hierarchie, zweizeiliger Clamp, nicht in Linkblau */
.photo-item .gallery-info h3 {
    margin: 0;
    font-size: var(--font-size-lg);
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta-Zeile (Bilder / Kommentare / Views) */
.photo-item .gallery-info h3 + p {
    margin: 0;
    font-size: var(--font-size-xs);
    color: var(--text-muted, var(--text-secondary));
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.photo-item .gallery-info h3 + p i {
    font-style: normal;
}

/* Beschreibung (drittes Element) */
.photo-item .gallery-info h3 + p + p {
    margin: var(--space-2xs) 0 0;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.photo-item h4 {
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-xs);
    font-weight: 700;
}

.photo-item .buttons {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    width: 100%;
}

/* Inline-Audio-Player (Lieder-Liste) */
.lied-player {
    display: block;
    width: 100%;
    max-width: 420px;
    margin-top: var(--space-xs);
    height: 34px;
    border-radius: var(--radius-md);
    outline: none;
}

.lied-player::-webkit-media-controls-panel {
    background: var(--bg-secondary, var(--neutral-100));
}

/* Photo-Action-Leiste (SVG-Icon-Buttons mit CSS-Tooltips) */
.photo-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2xs);
    padding: var(--space-xs) var(--space-sm);
    background: var(--neutral-50, rgba(0, 0, 0, 0.02));
    border-top: 1px solid var(--neutral-200);
}

/* Inline-Form in der Action-Leiste (z. B. Profilbild-Toggle): per display:contents aus
   dem Layout-Baum entfernen, damit der Button exakt wie die <a>-Nachbarn wirkt
   (kein Form-Margin, keine zusätzliche Flex-Schachtel). */
.photo-actions form {
    display: contents;
}

/* Generischer Icon-Button mit CSS-Tooltip – wird in Photo-Actions und Kommentaren verwendet */
.action-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    vertical-align: middle;
    border: 0;
    padding: 0;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    background: transparent;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition-normal), color var(--transition-normal), transform var(--transition-normal);
}

.action-btn:hover,
.action-btn:focus-visible {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    outline: none;
}

.action-btn--danger:hover,
.action-btn--danger:focus-visible {
    background: var(--danger, #dc2626);
}

.action-btn--pending {
    color: var(--text-muted, var(--text-secondary));
    cursor: default;
    opacity: 0.7;
}

.action-btn--pending:hover {
    background: transparent;
    color: var(--text-muted, var(--text-secondary));
    transform: none;
}

.action-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Kleinere Inline-Variante für Text-Kontexte (z. B. neben Kommentaren) */
.action-btn--inline {
    width: 26px;
    height: 26px;
    margin-left: var(--space-2xs);
}

.action-btn--inline svg {
    width: 14px;
    height: 14px;
}

/* CSS-Tooltip über data-tooltip – löst title-Attribut ab (schneller, theme-bar) */
.action-btn[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding: 4px 8px;
    background: var(--text-primary);
    color: #fff;
    font-size: var(--font-size-xs);
    font-weight: 500;
    white-space: nowrap;
    border-radius: var(--radius-sm);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-fast, 0.15s), transform var(--transition-fast, 0.15s);
    z-index: 10;
}

.action-btn[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--text-primary);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-fast, 0.15s);
    z-index: 10;
}

.action-btn[data-tooltip]:hover::after,
.action-btn[data-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.action-btn[data-tooltip]:hover::before,
.action-btn[data-tooltip]:focus-visible::before {
    opacity: 1;
}

/* User Grid */
.user-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    margin: var(--space-2xl) 0;
}

.user-grid-scroll {
    max-height: 390px;
    overflow-y: auto;
    padding: var(--space-md) var(--space-md);
    border: 2px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    background: var(--bg-secondary, var(--neutral-100));
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.04);
}

/* intern.php: großzügigere Abstände zwischen Inhaltsblöcken */
.intern-content > h2 {
    margin-top: var(--space-3xl, 4rem);
}

.intern-content > h2:first-of-type {
    margin-top: var(--space-2xl);
}

.intern-content .user-grid,
.intern-content .user-grid-scroll,
.intern-content .mobile-table,
.intern-content form,
.intern-content table,
.intern-content .timeline-slider-wrapper,
.intern-content .birthday-banner,
.intern-content .alert {
    margin-bottom: var(--space-2xl);
}

.user-grid-scroll .user-grid {
    margin-top: 0;
    margin-bottom: 0;
}

.user-container {
    display: flex;
    align-items: center;
    padding: var(--space-sm);
    background: var(--bg-primary);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    animation: fadeInUp 0.5s ease-out backwards;
}

.user-container:hover {
    box-shadow: var(--shadow-2xl);
    transform: translateY(-8px) scale(1.03);
    background: var(--bg-tertiary);
    border-color: var(--primary-light);
}

.user-container .img-loading-wrap {
    width: auto;
    flex-shrink: 0;
    aspect-ratio: unset;
}

.user-container img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    margin-right: var(--space-xs);
    flex-shrink: 0;
    border: 3px solid var(--neutral-200);
    border-radius: 50%;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.user-container:hover img {
    border-color: var(--primary);
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-xl);
}

/* Reduzierter Hover im scrollbaren Grid, damit der Effekt nicht vom overflow:auto beschnitten wird */
.user-grid-scroll .user-container:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.user-grid-scroll .user-container:hover img {
    transform: scale(1.04);
    box-shadow: var(--shadow-md);
}

.user-container p {
    margin: 0;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* === LIGHTBOX === */

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease-in-out;
}

.lightbox-content {
    max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: opacity 0.25s ease-in-out, transform 0.25s ease-in-out;
}

.lightbox-content.loading {
    opacity: 0.5;
}

.lightbox-content.loaded {
    opacity: 1;
    transform: scale(1);
}

.lightbox .close,
.lightbox .arrow {
    position: absolute;
    color: #fff;
    font-size: 48px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    transition: all var(--transition-normal);
}

.lightbox .close {
    top: 20px;
    right: 30px;
    line-height: 1;
}

.lightbox .close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg) scale(1.1);
}

.lightbox .arrow {
    top: 50%;
    transform: translateY(-50%);
    user-select: none;
}

.lightbox .arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox .prev {
    left: 30px;
}

.lightbox .next {
    right: 30px;
}

.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 30px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    z-index: 10001;
}

/* === EVENT GALLERY SLIDESHOW === */

.event-gallery-section {
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--neutral-200);
}

.event-gallery-section h2 {
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.event-gallery-slideshow {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto var(--space-xl);
    background: var(--neutral-900);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.slideshow-container {
    position: relative;
    width: 100%;
    padding-bottom: 66.67%; /* 3:2 Aspect Ratio */
}

.slideshow-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.25s ease-in-out;
}

.slideshow-slide.active {
    opacity: 1;
}

.slideshow-slide img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

.slideshow-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.slideshow-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.slideshow-nav.prev { left: 12px; }
.slideshow-nav.next { right: 12px; }

.slideshow-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.slideshow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.slideshow-dot.active {
    background: white;
    transform: scale(1.2);
}

.gallery-link-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

/* Sidebar Gallery Preview */
.gallery-preview-card {
    display: block;
    margin-bottom: var(--space-md);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-secondary);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.gallery-preview-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.gallery-preview-images {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
    overflow: hidden;
}

.gallery-thumb {
    position: relative;
    padding-bottom: 100%;
    overflow: hidden;
    background: var(--neutral-200);
}

.gallery-thumb img {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.gallery-preview-info {
    padding: var(--space-sm) var(--space-md);
}

.gallery-preview-info h3 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-preview-info .gallery-date {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.gallery-preview-info .gallery-intern-badge {
    display: inline-block;
    font-size: 10px;
    padding: 2px 6px;
    background: var(--primary);
    color: var(--text-inverse);
    border-radius: var(--radius-xs);
    margin-left: var(--space-xs);
}

/* Drag-Drop Upload Area */
.drag-drop-container {
    width: 100%;
    height: 100px;
    border: 2px dashed #999;
    text-align: center;
    cursor: pointer;
    padding: 20px;
    transition: background-color 0.3s;
    margin-bottom: 10px;
}

.drag-drop-container.drag-over {
    background-color: #f0f0f0;
}

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

.text-center { text-align: center; }
.text-right { text-align: right; }

/* Text Utilities */
.text-warning { color: var(--warning); font-weight: 600; }

/* Spacing Utilities */
.mt-2 { margin-top: var(--space-sm); }

/* Display Utilities */
.d-inline { display: inline; }

/* Font Weight Utilities */
.fw-bold { font-weight: bold; }

/* Vertical Align */
.valign-top { vertical-align: top; }

/* Table Bordered */
.table-bordered {
    border-collapse: collapse;
}
.table-bordered th,
.table-bordered td {
    border: 1px solid var(--neutral-300);
    padding: var(--space-sm) var(--space-md);
}

/* Input Sizing Utilities */
.input-xs { max-width: 60px; }
.input-sm { width: 100%; }
.input-md { max-width: 100%; }
.input-lg { max-width: 400px; }

/* Text Size */
.text-sm { font-size: var(--font-size-sm); }

/* Width Utilities */
.w-100 { width: 100%; }

/* Row Highlight (table row background) */
.row-highlight {
    background-color: var(--primary-50, #e8f0fe) !important;
}

/* Button Block */
.btn-block {
    width: 100%;
    padding: var(--space-md);
    font-size: var(--font-size-lg);
}

/* Button Warning */
.btn-warning {
    background-color: var(--warning);
    color: var(--text-inverse);
    box-shadow: 0 6px 16px rgba(var(--warning-rgb), 0.2);
}
.btn-warning:hover {
    background-color: var(--warning-dark);
    box-shadow: 0 8px 22px rgba(var(--warning-rgb), 0.3);
}

/* Info Message */
.info-message {
    background-color: rgba(var(--primary-rgb), 0.08);
    border-left: 4px solid var(--primary);
    color: var(--primary-dark);
    padding: var(--space-md);
    border-radius: var(--radius-xs);
    margin-bottom: var(--space-md);
}

.info-message p { margin: 0; }

/* Birthday Banner (index.php) */
.birthday-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--neutral-800);
    border-radius: 5px;
    margin: 10px 0;
    padding: 10px;
}
.birthday-banner h2 { color: var(--text-inverse); }
.birthday-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 8px 0;
    object-fit: cover;
}
.birthday-name {
    background-color: #fff;
    margin: 5px;
    padding: 5px;
    border-radius: 3px;
}

/* Gallery Placeholder */
.gallery-placeholder {
    height: 180px;
    background-color: var(--bg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* CSV Preview (charge_csv-booking.php) */
.csv-preview {
    background: var(--bg-secondary);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    margin-top: var(--space-xl);
    border: 2px solid var(--neutral-200);
}
.csv-preview h4 { margin: 0 0 var(--space-md) 0; }
.csv-preview pre {
    background: white;
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-size: var(--font-size-sm);
}
.csv-preview .csv-hint {
    margin: var(--space-sm) 0 0 0;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* Mail Preview (massmail.php, massmail_details.php) */
.mail-preview-wrapper {
    border: 1px solid #d7dfe9;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #f4f7fb;
}
.mail-preview-frame {
    width: 100%;
    min-height: 520px;
    border: 0;
    background: #fff;
}
.mail-preview-label {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    margin: 0 0 var(--space-sm);
}

/* Recipe Details (inventory_article.php) */
.recipe-details {
    padding-left: 1rem;
    margin-top: 0.25rem;
}

/* Form Helpers */
.form-hint {
    display: block;
    margin-top: 5px;
    color: var(--text-tertiary);
    font-size: var(--font-size-xs);
}

.input-readonly {
    background-color: var(--neutral-100);
    cursor: not-allowed;
}

/* Profile Pictures */
.profile-pic-sm {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.alert {
    padding: var(--space-lg) var(--space-xl);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xl);
    border-left: 6px solid transparent;
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    font-size: var(--font-size-base);
    line-height: 1.5;
    color: var(--text-primary);
    animation: slideInLeft 0.4s ease-out;
}

.alert strong {
    font-weight: 700;
}

.alert h4,
.alert h3 {
    margin: 0 0 var(--space-sm) 0;
    font-weight: 700;
    color: inherit;
}

.alert p {
    margin: var(--space-xs) 0;
}

.alert ul {
    margin: var(--space-sm) 0 var(--space-sm) var(--space-lg);
    padding-left: var(--space-lg);
}

.alert ul:last-child {
    margin-bottom: 0;
}

.alert a {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.alert a:hover {
    text-decoration: none;
}

.alert--info {
    background: rgba(var(--primary-rgb), 0.08);
    border-color: var(--primary);
    color: var(--primary-dark);
}

.alert--success {
    background: rgba(var(--secondary-rgb), 0.1);
    border-color: var(--secondary);
    color: var(--secondary-dark);
}

.alert--error {
    background: rgba(var(--danger-rgb), 0.1);
    border-color: var(--danger);
    color: var(--danger-dark);
}

.alert--warning {
    background: rgba(var(--warning-rgb), 0.1);
    border-color: var(--warning);
    color: var(--warning-dark);
}

/* File Categories (files.php) */
.file-categories {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    flex-wrap: wrap;
}

.file-category-card {
    flex: 1;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg) var(--space-md);
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    border: 2px solid var(--neutral-200);
    transition: all var(--transition-normal);
    text-decoration: none;
    color: var(--text-secondary);
    text-align: center;
}

.file-category-card svg {
    width: 36px;
    height: 36px;
    color: var(--primary);
    transition: all var(--transition-normal);
}

.file-category-card span {
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.file-category-card:hover,
.file-category-card.active {
    border-color: var(--primary);
    background: var(--bg-tertiary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    color: var(--primary);
}

.file-category-card:hover svg,
.file-category-card.active svg {
    transform: scale(1.15);
}

/* reCAPTCHA */
.grecaptcha-badge {
    visibility: hidden;
    display: none;
}

/* Trauer-Modus */
.cross {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    z-index: var(--z-toast);
    opacity: 0.4;
    transition: opacity var(--transition-normal);
}

.cross:hover {
    opacity: 0.8;
}

/* === STAGGER ANIMATION DELAYS === */
.menu > li:nth-child(1), .sidebar-card:nth-child(1), .photo-item:nth-child(1), .summary-card:nth-child(1) { --stagger: 1; }
.menu > li:nth-child(2), .sidebar-card:nth-child(2), .photo-item:nth-child(2), .summary-card:nth-child(2) { --stagger: 2; }
.menu > li:nth-child(3), .sidebar-card:nth-child(3), .photo-item:nth-child(3), .summary-card:nth-child(3) { --stagger: 3; }
.menu > li:nth-child(4), .sidebar-card:nth-child(4), .photo-item:nth-child(4), .summary-card:nth-child(4) { --stagger: 4; }
.menu > li:nth-child(5), .sidebar-card:nth-child(5), .photo-item:nth-child(5) { --stagger: 5; }
.menu > li:nth-child(6), .sidebar-card:nth-child(6), .photo-item:nth-child(6) { --stagger: 6; }
.menu > li:nth-child(7), .sidebar-card:nth-child(7), .photo-item:nth-child(7) { --stagger: 7; }
.menu > li:nth-child(8), .sidebar-card:nth-child(8), .photo-item:nth-child(8) { --stagger: 8; }
/* === RESPONSIVE DESIGN === */

/* Mobile Table Wrapper */
.mobile-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    background-color: var(--bg-primary);
    border: none;
    box-shadow: none;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-2xl);
    padding: 0;
    animation: fadeInUp 0.6s ease-out;
}

.mobile-table table {
    margin: 0;
    width: max-content !important;
    min-width: 100%;
    border: none;
    box-shadow: none;
    border-radius: var(--radius-lg);
}

.mobile-table th:first-child {
    border-top-left-radius: var(--radius-lg);
}

.mobile-table th:last-child {
    border-top-right-radius: var(--radius-lg);
}

.mobile-table tr:last-child td:first-child {
    border-bottom-left-radius: var(--radius-lg);
}

.mobile-table tr:last-child td:last-child {
    border-bottom-right-radius: var(--radius-lg);
}

/* === ACCESSIBILITY & PERFORMANCE === */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus Styles - Enhanced */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(var(--primary-rgb), 0.2);
}

/* Print Styles */
@media print {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .nav-wrapper,
    .sidebar,
    .main-footer,
    .hamburger,
    .menu-overlay {
        display: none !important;
    }

    .content-wrapper {
        padding: 0;
    }

    .main-content {
        box-shadow: none;
        padding: 2rem;
        margin: 0;
        border: none;
        border-radius: 0;
    }

    body {
        background: white;
    }

    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        color: black;
        background: none;
        -webkit-text-fill-color: black;
    }

    table {
        page-break-inside: avoid;
        border: 1px solid #000;
    }

    a {
        text-decoration: underline;
        color: #000;
    }
}

/* Scrollbar Styles - Modern */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--neutral-100);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 6px;
    border: 2px solid var(--neutral-100);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

/* === PUBLIC PAGES - MODERN DESIGN === */

/* Hero Header */
.public-hero {
    position: relative;
    width: 100%;
    margin: 0;
    margin-bottom: var(--space-4xl);
    height: 100vh;
    min-height: 650px;
    max-height: 900px;
    overflow: hidden;
    border-radius: 0;
}

.public-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease-out;
}

.public-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.75) 0%, rgba(30, 41, 59, 0.65) 50%, rgba(15, 23, 42, 0.75) 100%);
    color: var(--text-inverse);
    padding: var(--space-xl);
}

.public-hero-content {
    max-width: 1000px;
    text-align: center;
    animation: fadeInUp 1s ease-out;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    padding: var(--space-3xl) var(--space-2xl);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.public-hero-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-lg);
    background: rgba(var(--primary-rgb), 0.2);
    border: 1px solid rgba(var(--primary-rgb), 0.4);
    border-radius: 50px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--space-lg);
    animation: fadeIn 1.2s ease-out;
}

.public-hero-title {
    font-size: 4.5rem;
    font-weight: 900;
    margin: 0 0 var(--space-lg) 0;
    color: var(--text-inverse) !important;
    text-shadow: 0 4px 20px rgba(0,0,0,0.6);
    letter-spacing: -0.02em;
    line-height: 1.1;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: var(--text-inverse);
    background-clip: unset;
    animation: fadeInUp 1.4s ease-out;
}

.public-hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin: 0 0 var(--space-2xl) 0;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    line-height: 1.6;
    animation: fadeInUp 1.6s ease-out;
}

.public-hero-buttons {
    display: flex;
    gap: var(--space-lg);
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1.8s ease-out;
}

.public-hero-scroll-indicator {
    position: absolute;
    bottom: var(--space-2xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-sm);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: fadeIn 2s ease-out;
    cursor: pointer;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-left: 2px solid rgba(255, 255, 255, 0.7);
    border-bottom: 2px solid rgba(255, 255, 255, 0.7);
    transform: rotate(-45deg);
    animation: bounce 2s infinite;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: rotate(-45deg) translateY(0);
    }
    40% {
        transform: rotate(-45deg) translateY(-10px);
    }
    60% {
        transform: rotate(-45deg) translateY(-5px);
    }
}

/* Intro Section */
.public-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--space-3xl) auto;
}

.public-intro h2 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    margin: 0 0 var(--space-lg) 0;
}

.public-intro-text {
    font-size: var(--font-size-lg);
    line-height: 1.8;
}

/* Section Container */
.public-section {
    margin-bottom: var(--space-4xl);
}

.public-section h2 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    margin: 0 0 var(--space-2xl) 0;
    text-align: center;
}

.public-section-highlight {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.03) 0%, rgba(var(--secondary-rgb), 0.03) 100%);
    padding: var(--space-3xl) var(--space-xl);
    margin-left: calc(-1 * var(--space-xl));
    margin-right: calc(-1 * var(--space-xl));
    width: calc(100% + 2 * var(--space-xl));
    border-radius: 32px;
}

/* Value Rows (Image + Text alternating) */
.public-value-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
    margin-bottom: var(--space-4xl);
}

.public-value-row-reverse {
    direction: rtl;
}

.public-value-row-reverse > * {
    direction: ltr;
}

.public-value-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius-2xl);
}

.public-value-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--radius-2xl);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    transition: transform var(--transition-slow);
}

.public-value-row:hover .public-value-image img {
    transform: scale(1.03);
}

.public-value-content {
    padding: var(--space-xl);
}

.public-value-content h3 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 var(--space-lg) 0;
    line-height: 1.3;
}

.public-value-content p {
    font-size: var(--font-size-lg);
    line-height: 1.8;
    margin: 0;
}

.public-value-content a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.public-value-content a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Offer Grid - 2 Columns */
.public-offer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2xl);
}

.public-offer-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl);
    text-align: left;
    transition: all var(--transition-normal);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08),
                inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.public-offer-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12),
                inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.public-offer-card h3 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 var(--space-md) 0;
}

.public-offer-card p {
    font-size: var(--font-size-base);
    line-height: 1.8;
    margin: 0;
}

/* Call to Action Section - Liquid Glass */
.public-cta {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.15) 0%, rgba(var(--secondary-rgb), 0.15) 100%);
    backdrop-filter: blur(60px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 32px;
    padding: var(--space-3xl) var(--space-xl);
    text-align: center;
    color: var(--text-primary);
    box-shadow: 0 20px 60px rgba(var(--primary-rgb), 0.15),
                inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.public-cta h2 {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    margin: 0 0 var(--space-lg) 0;
    color: var(--text-primary);
}

.public-cta p {
    font-size: var(--font-size-lg);
    line-height: 1.8;
    margin: 0 0 var(--space-md) 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-secondary);
}

.public-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: border-color var(--transition-fast);
}

.public-link:hover {
    border-bottom-color: var(--primary);
}

/* Mobile Responsive */

/* === AKTIVE MITGLIEDER - SHOW_AKTIVE.PHP === */

.aktive-section {
    margin-bottom: var(--space-4xl);
}

.aktive-section h2 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 var(--space-xl) 0;
    padding-bottom: var(--space-md);
    border-bottom: 3px solid var(--primary);
}

.aktive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-xl);
}

.aktive-member {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06),
                inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.aktive-member:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12),
                inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.aktive-member-pic {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto var(--space-md) auto;
    display: block;
    border: 3px solid var(--primary-light);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.2);
}

.aktive-member-name {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

/* Mobile Responsive */

/* Selection Styles */
::selection {
    background: rgba(var(--primary-rgb), 0.2);
    color: var(--text-primary);
}

::-moz-selection {
    background: rgba(var(--primary-rgb), 0.2);
    color: var(--text-primary);
}

/* === PAGE-SPECIFIC MEMBER AREA STYLES === */

/* Statistik (statistik.php) */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-2xl) 0;
}

.stat-card {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-tertiary) 100%);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
    border: 2px solid var(--neutral-200);
    text-align: center;
    transition: all var(--transition-normal);
    animation: scaleIn 0.5s ease-out backwards;
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.stat-number {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-top: var(--space-xs);
    font-weight: 600;
}

.decade-row:hover {
    background: var(--bg-tertiary);
}

.decade-toggle {
    display: inline-block;
    width: 1em;
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    transition: transform var(--transition-fast);
}

.year-row td {
    font-size: var(--font-size-sm);
}

/* Verzeichnis Search Range (verzeichnis.php) */
.search-range-row {
    display: flex;
    gap: var(--space-xl);
}

.search-range-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.search-range-inputs {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.search-range-inputs input {
    max-width: 80px;
}

@media (max-width: 480px) {
    .search-range-row {
        flex-direction: column;
        gap: var(--space-md);
    }
}

.search-fieldset {
    border: 1px solid var(--border-color, #ccc);
    border-radius: var(--radius-md, 6px);
    padding: var(--space-md);
    margin: 0 0 var(--space-md) 0;
}

.search-fieldset > legend {
    padding: 0 var(--space-xs);
    font-weight: 600;
}

/* Timeline-Slider „Was ist zuletzt passiert" (intern.php)
   Nutzt die bestehende .photo-item-Struktur - hier nur Slider-Hülle, Icon-Wrap
   und farbige Kategorie-Badges. */
.timeline-slider-wrapper {
    position: relative;
    margin: var(--space-xl) 0 var(--space-2xl) 0;
    padding: 0 var(--space-xs);
}

.timeline-slider {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--space-xl);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    padding: var(--space-sm) var(--space-2xs);
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.timeline-slider .photo-item {
    flex: 0 0 260px;
    flex-shrink: 0;
    width: 260px;
    min-width: 260px;
    max-width: 260px;
    scroll-snap-align: start;
    margin: 0;
    box-sizing: border-box;
}

.timeline-slider .photo-item .gallery-image {
    height: 160px;
}

.timeline-slider .photo-item .gallery-image img {
    height: 100%;
}

.timeline-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--text-secondary);
}

.timeline-icon-wrap svg {
    width: 32px;
    height: 32px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.timeline-badge {
    display: inline-block;
    align-self: flex-start;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--neutral-100);
    color: var(--text-secondary);
    margin-bottom: var(--space-2xs);
}

.timeline-badge-member    { background: #e8f5e9; color: #2e7d32; }
.timeline-badge-bursch    { background: #e3f2fd; color: #1565c0; }
.timeline-badge-ahah      { background: #fff3e0; color: #e65100; }
.timeline-badge-file      { background: #ede7f6; color: #4527a0; }
.timeline-badge-gallery   { background: #fce4ec; color: #ad1457; }
.timeline-badge-event     { background: #fff9c4; color: #795548; }
.timeline-badge-views     { background: #e0f2f1; color: #00695c; }
.timeline-badge-konsument { background: #fff8e1; color: #ef6c00; }
.timeline-badge-logins    { background: #e1f5fe; color: #01579b; }
.timeline-badge-schulden  { background: #ffebee; color: #b71c1c; }

.timeline-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    max-width: 44px;
    max-height: 44px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border: 2px solid var(--neutral-200);
    background: var(--bg-primary);
    font-family: inherit;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    box-shadow: var(--shadow-lg);
    z-index: 2;
    color: var(--text-primary);
    transition: all var(--transition-normal);
}

.timeline-nav:hover {
    background: var(--bg-tertiary, var(--neutral-100));
    border-color: var(--primary-light);
    transform: translateY(-50%) scale(1.08);
    box-shadow: var(--shadow-xl);
}

.timeline-nav-prev { left: -14px; }
.timeline-nav-next { right: -14px; }

@media (max-width: 480px) {
    .timeline-nav { display: none; }
    .timeline-slider .photo-item { flex: 0 0 80%; }
    .timeline-slider { gap: var(--space-md); }
}

/* Kopier-/Auswahlschutz für Ergebnisliste (verzeichnis.php) */
.results-protected {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.results-protected a {
    -webkit-user-drag: none;
    user-drag: none;
}

@media print {
    .results-protected {
        visibility: hidden;
        position: relative;
    }
    .results-protected::after {
        content: "Die Ergebnisliste ist nicht für den Ausdruck freigegeben.";
        visibility: visible;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        font-weight: 700;
        color: #c00;
    }
}

/* FC Progress (charge_fc_progress.php) */
.fux-name {
    text-align: left;
    white-space: nowrap;
}

.fc-progress-cell-complete,
.brander-zugelassen {
    background-color: rgba(var(--secondary-rgb), 0.15);
    color: var(--secondary-dark);
    font-weight: bold;
}

.fc-progress-cell-incomplete {
    background-color: rgba(var(--danger-rgb), 0.1);
    color: var(--danger-dark);
}

.fc-progress-cell-empty {
    background-color: var(--bg-primary);
    color: var(--text-tertiary);
}

.fc-progress-cell-dates {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: var(--space-2xs);
    font-size: 0.75rem;
    line-height: 1.2;
    font-weight: normal;
}

.fc-progress-cell-dates a {
    color: inherit;
    text-decoration: none;
    opacity: 0.8;
}

.fc-progress-cell-dates a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* === ACCOUNTING & INVENTORY MODULES === */

/* Dashboard Header */
.dashboard-header {
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--space-2xl);
    border-bottom: 2px solid var(--neutral-200);
    padding-bottom: var(--space-lg);
    animation: fadeInDown 0.6s ease-out;
}

.dashboard-header h1 {
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

/* Dashboard Summary Cards */
.dashboard-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.summary-card {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-tertiary) 100%);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 2px solid var(--neutral-200);
    animation: scaleIn 0.5s ease-out backwards;
    animation-delay: calc(var(--stagger, 0) * 0.1s);
}

.summary-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.summary-card h2,
.summary-card h3 {
    font-size: var(--font-size-lg);
    margin-top: 0;
    margin-bottom: var(--space-md);
}

.summary-card .amount {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    margin-bottom: var(--space-sm);
    display: block;
}

.summary-card .description {
    font-size: var(--font-size-sm);
    color: var(--text-tertiary);
}

.summary-card.positive {
    border-left: 5px solid var(--secondary);
}

.summary-card.negative {
    border-left: 5px solid var(--danger);
}

.summary-card.detail-card {
    min-width: 200px;
}

/* Account Lists in Dashboard */
.accounts-overview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-xl);
}

.mobile-table h2,
.mobile-table h3 {
    margin-top: 0;
}

.mobile-table > p:last-of-type {
    margin-bottom: 0;
}

/* Accounting Admin Styles */
.indent {
    padding-left: 25px;
}

.main-account {
    font-weight: bold;
}

.highlight-row {
    background-color: rgba(var(--primary-rgb), 0.08);
    border-left: 3px solid var(--primary);
}

.pa-diff-row {
    font-weight: bold;
    color: var(--danger-dark);
    background-color: rgba(var(--danger-rgb), 0.1);
}

.inactive-account,
.row-inactive { opacity: 0.6; }

.badge-inactive {
    display: inline-block;
    background: var(--neutral-300);
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
    padding: 1px 6px;
    border-radius: var(--radius-xs);
    margin-left: 4px;
    font-weight: normal;
}

/* All tables inside mobile-table share consistent styling */
.mobile-table table,
.account-transactions {
    border-collapse: collapse;
    background: var(--bg-primary);
}

.account-transactions {
    width: 100%;
}

.mobile-table table td,
.account-transactions td {
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--neutral-200);
    transition: background-color var(--transition-fast);
}

.mobile-table table tr:hover,
.account-transactions tr:hover {
    background-color: var(--bg-tertiary);
}

/* Amount color indications */
td.positive,
.positive .amount,
.amount.positive,
p.positive,
span.positive {
    color: var(--secondary);
    font-weight: 600;
}

td.negative,
.negative .amount,
.amount.negative,
p.negative,
span.negative {
    color: var(--danger);
    font-weight: 600;
}

/* Account Actions */
.account-actions {
    margin-top: var(--space-xl);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

/* Form Styling for Accounting/Inventory */
.main-content form {
    margin-bottom: var(--space-lg);
}

.form-table {
    width: 100%;
    margin-bottom: var(--space-lg);
}

.form-table td {
    padding: var(--space-md) var(--space-md) var(--space-md) 0;
    vertical-align: top;
}

.form-table label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 600;
}

/* Account Filters & Account Header - Unified Styling */
.account-filters,
.account-header {
    background-color: var(--bg-tertiary);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xl);
    border: 2px solid var(--neutral-200);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-md);
}

.account-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.account-header h2 {
    margin: 0;
    padding: 0;
    font-size: var(--font-size-xl);
}

.account-header h2::after {
    display: none;
}

.account-meta {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

.account-meta p {
    margin: 0;
}

.account-filters .filter-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    width: 100%;
}

.search-filter {
    flex-grow: 1;
    min-width: 250px;
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.search-filter input { flex: 1; }

.search-filter input,
.search-filter button,
.date-filter input[type="date"],
.date-filter select,
.date-filter button {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
}

.search-filter button,
.date-filter button { white-space: nowrap; }

.date-filter {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.date-filter label,
.date-filter input[type="date"],
.date-filter select,
.date-filter button { font-size: var(--font-size-sm); }

.date-filter label {
    font-weight: 600;
    white-space: nowrap;
}

/* Parent/Child Account Styles */
.parent-account-row {
    background-color: rgba(var(--primary-rgb), 0.05);
    font-weight: 600;
}

.child-account {
    opacity: 0.85;
}

.child-account-indent {
    padding-left: var(--space-2xl);
}

/* Child Accounts Filter */
.child-accounts-filter label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
}

.child-accounts-filter input[type="checkbox"] {
    cursor: pointer;
}

/* Filter Row Variants */
.filter-row-primary,
.filter-row-secondary {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    align-items: center;
}

/* Sortable Table Headers */
.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.sortable:hover {
    background-color: var(--neutral-300);
}

.sortable.active {
    background-color: var(--primary-light);
    color: var(--text-inverse);
}

/* Text Utilities */
.text-muted {
    color: var(--text-tertiary);
}

.text-danger,
.text-success { font-weight: 600; }
.text-danger { color: var(--danger); }
.text-success { color: var(--secondary); }

/* === SPLIT BOOKING PAGE STYLES === */

/* Grid Layout */
.grid-2-cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-group label {
    font-weight: 600;
    font-size: var(--font-size-sm);
}

/* Split Entries Section */
.split-entries-section {
    background: var(--bg-secondary);
    padding: var(--space-xl);
    border-radius: var(--radius-md);
    border: 2px solid var(--neutral-200);
}

#split-entries {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.split-entry {
    display: grid;
    grid-template-columns: 40px 1fr 200px 120px;
    gap: var(--space-md);
    align-items: end;
    padding: var(--space-md);
    background: white;
    border-radius: var(--radius-sm);
    border: 2px solid var(--neutral-200);
    transition: all var(--transition-normal);
}

.split-entry:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.split-entry-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--text-inverse);
    border-radius: 50%;
    font-weight: 700;
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-sm);
}

.account-select-container,
.amount-input-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.account-select-container label,
.amount-input-container label {
    font-weight: 600;
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

.remove-entry-container {
    display: flex;
    align-items: flex-end;
    padding-bottom: var(--space-xs);
}

.remove-entry-btn {
    padding: var(--space-sm) var(--space-md);
    background-color: var(--danger);
    color: var(--text-inverse);
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.remove-entry-btn:hover {
    background-color: var(--danger-dark);
    transform: translateY(-1px);
}

.remove-entry-btn.d-none {
    display: none;
}

.add-entry-btn {
    padding: var(--space-md) var(--space-lg);
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    color: var(--text-inverse);
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

.add-entry-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Balance Indicator */
.balance-indicator {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-sm);
    margin-top: var(--space-lg);
    font-weight: 600;
    font-size: var(--font-size-sm);
    text-align: center;
    transition: all var(--transition-normal);
}

.balance-valid {
    background-color: rgba(var(--secondary-rgb), 0.1);
    border: 2px solid var(--secondary);
    color: var(--secondary-dark);
}

.balance-invalid {
    background-color: rgba(var(--danger-rgb), 0.1);
    border: 2px solid var(--danger);
    color: var(--danger-dark);
}

/* Select2 Overrides for Split Booking */
.select2-container--default .select2-selection--single {
    border: 2px solid var(--neutral-300);
    border-radius: var(--radius-sm);
    height: auto;
    min-height: 38px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-primary);
    line-height: 1.5;
    padding: var(--space-sm) 60px var(--space-sm) var(--space-md);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    right: var(--space-sm);
    top: 0;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--neutral-300);
    color: var(--text-primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.select2-container--default .select2-selection--single .select2-selection__clear:hover {
    background: var(--danger);
    color: var(--text-inverse);
}

.select2-container--default .select2-selection--single .select2-selection__clear span {
    display: block;
    line-height: 1;
}

.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.select2-dropdown {
    border: 2px solid var(--neutral-300);
    border-radius: var(--radius-sm);
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--primary);
}

/* === INVENTORY ARTICLE EDIT === */

.size-input-group {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: var(--space-2xs);
    align-items: start;
}

.size-preview {
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-tertiary);
    border-radius: 6px;
    color: var(--text-primary);
    font-weight: 500;
    border: 1px solid var(--neutral-200);
    min-height: 47px;
    display: flex;
    align-items: center;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin: var(--space-lg) 0;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--neutral-200);
}

.checkbox-group input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--secondary);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex: 1;
    cursor: pointer;
}

.checkbox-label strong {
    display: block;
    margin-bottom: 0.25rem;
}

.checkbox-help {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    line-height: 1.4;
    margin-top: 0.25rem;
    font-style: italic;
}

.alias-explanation {
    background: rgba(var(--primary-rgb), 0.15);
    border: 1px solid var(--primary-light);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    margin-bottom: var(--space-lg);
    color: var(--primary-dark);
    line-height: 1.6;
}

.alias-explanation strong {
    display: block;
    font-size: 1rem;
    margin-bottom: var(--space-2xs);
    color: var(--primary-dark);
}

.alias-explanation p {
    margin: var(--space-2xs) 0;
    font-size: var(--font-size-lg);
}

.mapping-container {
    background: var(--bg-primary);
    border-radius: 6px;
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.mapping-row {
    display: grid;
    grid-template-columns: 3fr 1fr 1.5fr auto;
    gap: var(--space-md);
    align-items: end;
    margin-bottom: var(--space-md);
    padding: 1.25rem;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--neutral-200);
}

.mapping-field {
    display: flex;
    flex-direction: column;
}

.mapping-field label {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-2xs);
}

.mapping-action {
    min-width: 100px;
}

.production-info {
    background: rgba(var(--primary-rgb), 0.15);
    border: 1px solid var(--primary-light);
    border-radius: 6px;
    padding: var(--space-md);
    margin-top: var(--space-md);
}

.production-info h4 {
    color: var(--primary-dark);
    margin: 0 0 var(--space-2xs) 0;
    font-size: 1rem;
    font-weight: 600;
}

/* === INVENTORY SPECIFIC STYLES === */

/* Article Rows - Clickable table rows */
.article-row {
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.article-row:hover {
    background-color: var(--bg-tertiary);
}

/* Article Info Display */
.article-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.article-size {
    font-size: var(--font-size-sm);
    color: var(--text-tertiary);
}

/* Type Badges for Products (inventory_article.php, inventory_pending_sales.php) */
.type-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-xs);
    font-size: var(--font-size-xs);
    font-weight: 600;
    margin-right: var(--space-xs);
}

.type-badge.type-alias  { background: rgba(139, 92, 246, 0.12); color: var(--accent-purple); }
.type-badge.type-main   { background: rgba(var(--primary-rgb), 0.18); color: var(--primary-dark); }
.type-badge.type-direct { background: rgba(var(--primary-rgb), 0.08); color: var(--primary); }

.btn-filter {
    padding: var(--space-2xs) var(--space-md);
    background: var(--primary);
    color: var(--text-inverse);
    border: none;
    border-radius: var(--radius-xs);
    cursor: pointer;
    font-weight: 500;
}

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

/* Restbestand Info */
.restbestand-table {
    margin-bottom: var(--space-xl);
}

.missing-withdrawal {
    background: rgba(var(--danger-rgb), 0.05) !important;
    border-left: 3px solid var(--danger-light);
}

/* Result Card (inventory confirmations) */
.result-card {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1) 0%, rgba(var(--primary-rgb), 0.03) 100%);
    border: 2px solid var(--primary);
}

/* Badge (generic, used across site) */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-xs);
    font-size: var(--font-size-xs);
    font-weight: 500;
}

/* Expandable Rows */
.expandable-row {
    cursor: pointer;
    transition: background 0.2s;
}

.expandable-row:hover {
    background: var(--bg-secondary) !important;
}

.expandable-row td:first-child {
    position: relative;
    padding-left: 2rem;
}

.expand-icon {
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s;
    color: var(--text-tertiary);
    font-size: var(--font-size-xs);
}

.expandable-row.expanded .expand-icon {
    transform: translateY(-50%) rotate(90deg);
}

/* Detail Row (expandable table rows) */
.detail-row {
    display: none;
    background: var(--bg-tertiary);
}

.detail-row.visible {
    display: table-row;
}

.detail-row td {
    padding: 0;
    border-bottom: 1px solid var(--neutral-200);
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-base);
}

.detail-table td {
    padding: var(--space-2xs) var(--space-md);
    border-bottom: 1px solid var(--neutral-100);
    color: var(--text-secondary);
}

.detail-table tr:last-child td {
    border-bottom: none;
}

/* Number Inputs (Remaining & Stocktake) */
.remaining-input,
.stocktake-input {
    width: 80px;
    padding: 0.375rem 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--neutral-300);
    border-radius: var(--radius-xs);
    color: var(--text-primary);
    text-align: right;
    font-size: var(--font-size-base);
}

.remaining-input:hover,
.stocktake-input:hover {
    border-color: var(--neutral-400);
}

.remaining-input:focus,
.stocktake-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
}

.remaining-input::-webkit-inner-spin-button,
.remaining-input::-webkit-outer-spin-button,
.stocktake-input::-webkit-inner-spin-button,
.stocktake-input::-webkit-outer-spin-button {
    opacity: 1;
}

.restbestand-table tr:hover td {
    background: transparent;
}


/* === TOUCH & MOBILE OPTIMIZATIONS === */

/* Touch-friendly target sizes (Apple HIG: 44px minimum) */
@media (hover: none) and (pointer: coarse) {
    button,
    input[type="submit"],
    input[type="button"],
    input[type="reset"],
    .btn,
    a.btn {
        min-height: 44px;
        min-width: 44px;
    }

    /* Navigation links */
    .menu > li > a,
    .sub-menu > li > a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Form elements */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="number"],
    input[type="search"],
    input[type="date"],
    select,
    textarea {
        min-height: 44px;
    }

    input[type="checkbox"],
    input[type="radio"] {
        width: 16px;
        height: 16px;
    }

    /* Table row actions */
    table a,
    table button {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Card clickable areas — p wraps each entry so highlight items match link heights */
    .sidebar-card p {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    .sidebar-card a {
        min-height: 44px;
    }

    /* Calendar touch targets */
    .calendar-day {
        min-height: 48px;
    }

    .calendar-nav-buttons button {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Safe Area Insets for notched devices */
@supports (padding: env(safe-area-inset-top)) {
    .page-wrapper {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }

    .nav-wrapper {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }

    .content-wrapper {
        padding-bottom: env(safe-area-inset-bottom);
    }

    /* Fixed elements need safe area consideration */
    .sidebar {
        padding-bottom: calc(var(--space-2xl) + env(safe-area-inset-bottom));
    }
}

/* Prevent text selection on interactive elements */
button,
.btn,
.menu a,
.hamburger {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Smooth momentum scrolling */
.sidebar,
.content-wrapper,
.menu,
table {
    -webkit-overflow-scrolling: touch;
}

/* === IMAGE LOADING PLACEHOLDER === */

@keyframes imgSpinner {
    to { transform: rotate(360deg); }
}

.img-loading-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.img-loading-wrap img {
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.img-loading-wrap.loaded {
    aspect-ratio: unset;
}

.img-loading-wrap.loaded img {
    opacity: 1;
    transform: scale(1);
}

.img-loading-wrap .img-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    border: 3px solid var(--neutral-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: imgSpinner 0.8s linear infinite;
    pointer-events: none;
}

.img-loading-wrap.loaded .img-spinner {
    display: none;
}

/* Remove tap highlight on mobile */
a,
button,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

/* Touch action optimization */
.menu,
.sidebar,
.photo-grid,
.user-grid {
    touch-action: pan-y;
}

/* Prevent pull-to-refresh on app-like pages */
@media (display-mode: standalone) {
    html, body {
        overscroll-behavior-y: contain;
    }
}

/* === RESPONSIVE DESIGN (CONSOLIDATED) === */

@media (max-width: 1600px) {
    body:has(.sidebar) .main-content {
        max-width: 900px;
    }

    body:not(:has(.sidebar)) .main-content {
        max-width: 1400px;
    }
}

@media (max-width: 1400px) {
    :root {
        --sidebar-width: 300px;
        --space-3xl: 3rem;
        --space-2xl: 2rem;
    }

    body:has(.sidebar) .content-wrapper {
        width: 90%;
    }

    .container {
        padding: 0 var(--space-xl);
    }

    body:has(.sidebar) .main-content {
        max-width: 100%;
    }

    .user-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-content {
        padding: var(--space-2xl) var(--space-xl);
    }

    .sidebar {
        width: var(--sidebar-width);
    }
}

@media (max-width: 1200px) {
    :root {
        --space-3xl: 2.5rem;
        --space-2xl: 1.5rem;
    }

    body:has(.sidebar) .main-content {
        max-width: 100%;
    }

    body:not(:has(.sidebar)) .main-content {
        max-width: 1100px;
    }

    .main-content {
        padding: var(--space-xl);
    }

    .container {
        padding: 0 var(--space-lg);
    }
}

@media (max-width: 1024px) {
    :root {
        --nav-height: 90px;
        --space-3xl: 2rem;
        --space-2xl: 1.5rem;
    }

    .content-wrapper,
    body:has(.sidebar) .content-wrapper,
    body:not(:has(.sidebar)) .content-wrapper {
        width: 100%;
        max-width: 100%;
        margin-top: calc(var(--nav-height) + var(--space-xs));
        padding-bottom: 0;
        margin-left: 0;
        padding-left: var(--space-xl);
        padding-right: var(--space-xl);
        display: block;
        justify-content: unset;
    }

    /* Off-Canvas Sidebar for Mobile/Tablet */
    .sidebar-toggle {
        display: flex;
    }

    .sidebar,
    body:has(.sidebar) .sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 380px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(40px) saturate(180%);
        -webkit-backdrop-filter: blur(40px) saturate(180%);
        overflow-y: auto;
        transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        z-index: 1001;
        padding: var(--space-2xl) var(--space-xl);
        box-shadow: -4px 0 32px rgba(0, 0, 0, 0.15);
        border-left: 1px solid rgba(255, 255, 255, 0.8);
        animation: none;
        margin: 0;
    }

    .sidebar.active,
    body:has(.sidebar) .sidebar.active {
        right: 0;
    }

    .sidebar-toggle.active {
        right: min(85%, 380px);
        background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
    }


    .main-content,
    body:not(:has(.sidebar)) .main-content {
        padding: var(--space-xl);
        max-width: 100%;
    }

    .user-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .split-entry {
        grid-template-columns: 40px 1fr 150px 100px;
    }
}


.show-mobile {
    display: none;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
    .show-mobile {
        display: inline !important;
    }

    /* Smaller form elements on mobile */
    input, select, textarea {
        padding: var(--space-sm) var(--space-md);
        font-size: var(--font-size-xs);
    }

    input[type="checkbox"],
    input[type="radio"] {
        width: 16px;
        height: 16px;
        margin-right: var(--space-sm);
    }

    button,
    input[type="submit"],
    input[type="button"],
    .btn {
        font-size: var(--font-size-sm);
        padding: var(--space-sm) var(--space-lg);
    }

    .checkbox-group {
        padding: var(--space-sm);
        gap: var(--space-xs);
        margin: var(--space-md) 0;
    }

    .checkbox-group input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }

    .calendar-month-selector h2 {
        font-size: var(--font-size-base);
    }

    table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        max-width: 100%;
        border-radius: var(--radius-md);
    }

    /* Wrapper for tables to handle overflow without breaking layout */
    main-content table {
        box-sizing: border-box;
    }

    .lightbox-content {
        max-width: 98vw;
        max-height: 98vh;
    }

    .lightbox .close {
        top: 10px;
        right: 10px;
        width: 50px;
        height: 50px;
        font-size: 36px;
    }

    .lightbox .arrow {
        width: 50px;
        height: 50px;
        font-size: 36px;
    }

    .lightbox .prev {
        left: 10px;
    }

    .lightbox .next {
        right: 10px;
    }

    .lightbox-counter {
        bottom: 20px;
        padding: 10px 20px;
        font-size: 14px;
    }

    :root {
        --nav-height: 90px;
        --font-size-4xl: 1.5rem;
        --font-size-3xl: 1.35rem;
        --font-size-2xl: 1.15rem;
        --font-size-xl: 1rem;
        --font-size-lg: 0.9rem;
        --space-3xl: 1.75rem;
        --space-2xl: 1.25rem;
        --space-xl: 1rem;
    }

    .content-wrapper,
    body:has(.sidebar) .content-wrapper {
        margin-top: calc(var(--nav-height) + var(--space-xs));
    }

    .main-content {
        padding: var(--space-lg);
        border-radius: var(--radius-lg);
    }

    .logo-container img {
        height: 75px;
    }

    .calendar-day {
        min-height: 80px;
        padding: var(--space-xs);
        font-size: var(--font-size-xs);
    }

    .calendar-day-number {
        font-size: var(--font-size-sm);
        margin-bottom: var(--space-xs);
    }

    .calendar-nav-buttons {
        flex-direction: row;
        gap: var(--space-sm);
    }

    table th,
    table td {
        padding: var(--space-sm);
        font-size: var(--font-size-sm);
    }

    .sidebar-card {
        margin-left: var(--space-xl);
        margin-right: var(--space-xl);
    }

    .user-grid {
        gap: var(--space-md);
    }

    .mobile-table {
        margin: var(--space-md) 0;
    }

    .public-hero {
        height: 100vh;
        min-height: 550px;
        max-height: 700px;
        border-radius: 0;
        margin-bottom: var(--space-2xl);
    }

    .public-hero-content {
        padding: var(--space-2xl) var(--space-lg);
    }

    .public-hero-badge {
        font-size: 0.75rem;
        padding: var(--space-xs) var(--space-md);
    }

    .public-hero-title {
        font-size: 2.5rem;
    }

    .public-hero-subtitle {
        font-size: 1.125rem;
        color: rgba(255, 255, 255, 0.9);
        margin-bottom: var(--space-xl);
    }

    .public-hero-buttons {
        flex-direction: column;
        gap: var(--space-md);
        width: 100%;
    }

    .public-hero-buttons .btn {
        width: 100%;
        padding: var(--space-md) var(--space-lg);
        font-size: var(--font-size-base);
    }

    .public-hero-scroll-indicator {
        bottom: var(--space-lg);
    }

    .public-intro {
        margin-bottom: var(--space-2xl);
    }

    .public-intro h2 {
        font-size: var(--font-size-2xl);
        margin-bottom: var(--space-md);
    }

    .public-section {
        margin-bottom: var(--space-2xl);
    }

    .public-section h2 {
        font-size: var(--font-size-2xl);
        margin-bottom: var(--space-xl);
    }

    .public-section-highlight {
        padding: var(--space-2xl) var(--space-lg);
        margin-left: calc(-1 * var(--space-lg));
        margin-right: calc(-1 * var(--space-lg));
        width: calc(100% + 2 * var(--space-lg));
        margin-bottom: var(--space-2xl);
    }

    /* Value rows stack on mobile */
    .public-value-row,
    .public-value-row-reverse {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
        direction: ltr;
        margin-bottom: var(--space-2xl);
    }

    .public-value-row:last-child {
        margin-bottom: 0;
    }

    .public-value-image img {
        height: 280px;
    }

    .public-value-content {
        padding: 0;
    }

    .public-offer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .public-cta {
        padding: var(--space-2xl) var(--space-lg);
        margin-top: var(--space-2xl);
    }

    .public-cta h2 {
        font-size: var(--font-size-2xl);
    }

    .public-cta .btn {
        padding: var(--space-md) var(--space-xl);
        font-size: var(--font-size-base);
    }

    .aktive-section {
        margin-bottom: var(--space-3xl);
    }

    .aktive-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: var(--space-md);
    }

    .aktive-member {
        padding: var(--space-md);
    }

    .aktive-member-pic {
        width: 60px;
        height: 60px;
    }

    .aktive-member-name {
        font-size: var(--font-size-sm);
    }

    .grid-2-cols {
        grid-template-columns: 1fr;
    }

    .split-entry {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .split-entry-number {
        margin-bottom: 0;
    }

    .remove-entry-container {
        padding-bottom: 0;
    }

    .dashboard-summary {
        grid-template-columns: 1fr;
    }

    .accounts-overview {
        grid-template-columns: 1fr;
    }

    .account-filters .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .search-filter {
        max-width: 100%;
    }

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

    .account-actions .btn,
    .account-actions button,
    .account-actions input[type="submit"] {
        width: 100%;
    }

    .size-input-group {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .mapping-row {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .mapping-action label {
        display: none;
    }
}

@media (max-width: 576px) {
    :root {
        --nav-height: 85px;
        --font-size-4xl: 1.35rem;
        --font-size-3xl: 1.25rem;
        --font-size-2xl: 1.1rem;
        --font-size-xl: 0.95rem;
        --font-size-lg: 0.85rem;
        --font-size-base: 0.8rem;
        --space-3xl: 1.5rem;
        --space-2xl: 1rem;
        --space-xl: 0.875rem;
    }

    .hamburger {
        display: flex;
    }

    .nav-container {
        padding: 0 var(--space-md);
    }

    .logo-container img {
        height: 65px;
    }

    .content-wrapper,
    body:has(.sidebar) .content-wrapper {
        margin-top: calc(var(--nav-height) + var(--space-xs));
        padding-right: var(--space-md);
        padding-left: var(--space-md);
    }

    .sidebar {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }

    .sidebar-card {
        margin-left: var(--space-md);
        margin-right: var(--space-md);
    }

    .menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 90%;
        max-width: 360px;
        height: 100vh;
        background: var(--bg-primary);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: calc(var(--nav-height) + var(--space-xl)) var(--space-xl) var(--space-xl);
        transition: left var(--transition-slow);
        box-shadow: var(--shadow-2xl);
        overflow-y: auto;
        gap: 0;
        z-index: var(--z-sticky);
        border-right: 2px solid var(--primary);
    }

    .menu.active {
        left: 0;
    }

    .menu > li {
        width: 100%;
        margin-bottom: var(--space-sm);
        display: flex;
        flex-direction: column;
    }

    .menu > li > a {
        width: 100%;
        padding: var(--space-md) var(--space-lg);
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.7);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border: 1px solid rgba(203, 213, 225, 0.4);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05),
                    inset 0 1px 0 rgba(255, 255, 255, 0.8);
        font-weight: 600;
        color: var(--text-primary);
    }

    .menu > li > a:hover,
    .menu > li > a.active {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
        background: rgba(var(--primary-rgb), 0.12);
        border-color: var(--primary-light);
        box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.12),
                    inset 0 1px 0 rgba(255, 255, 255, 1);
        color: var(--primary);
    }

    .nav-dark-toggle {
        width: auto !important;
        align-self: center;
    }

    .nav-dark-toggle a {
        width: auto !important;
        padding: var(--space-sm) var(--space-md) !important;
    }

    .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition-slow), padding var(--transition-slow);
        margin: 0;
        padding: 0;
        border: none;
        background: var(--bg-secondary);
        border-radius: 10px;
        width: 100%;
    }

    .sub-menu.open {
        max-height: 600px;
        padding: var(--space-sm) 0;
        margin-top: var(--space-sm);
    }

    .sub-menu > li {
        border-bottom: 1px solid var(--neutral-200);
        width: 100%;
    }

    .sub-menu > li:last-child {
        border-bottom: none;
    }

    .sub-menu > li > a {
        padding: var(--space-md) var(--space-lg);
        width: 100%;
        display: block;
        background: transparent;
    }

    .sub-menu > li > a:hover {
        background: var(--bg-tertiary);
    }

    body.menu-open {
        overflow: hidden;
    }

    .main-content {
        padding: var(--space-md);
        border-radius: var(--radius-md);
        margin-top: var(--space-2xl);
    }

    .container {
        padding: 0 var(--space-md);
    }

    .calendar-grid {
        gap: 2px;
        padding: var(--space-xs);
    }

    .calendar-day {
        min-height: 60px;
        padding: 4px;
        border-radius: var(--radius-sm);
        border-width: 1px;
    }

    .calendar-day-number {
        font-size: var(--font-size-xs);
        margin-bottom: 2px;
    }

    .calendar-event-dot {
        width: 8px;
        height: 8px;
    }

    .calendar-header {
        padding: var(--space-xs);
        font-size: var(--font-size-xs);
        border-radius: var(--radius-sm);
    }

    table {
        font-size: var(--font-size-sm);
        border-radius: var(--radius-md);
    }

    table th,
    table td {
        padding: var(--space-md);
        font-size: var(--font-size-sm);
    }

    button,
    input[type="submit"],
    input[type="button"] {
        margin-top: var(--space-xs);
        padding: var(--space-md) var(--space-xl);
        font-size: var(--font-size-sm);
    }

    .calendar-nav-buttons button {
        padding: var(--space-xs) var(--space-md);
        font-size: var(--font-size-xs);
    }

    .calendar-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .calendar-grid {
        min-width: 100%;
        overflow-x: auto;
    }

    h2::after {
        width: 60px;
        height: 3px;
    }

    .mobile-table,
    .mobile-table table,
    .dashboard-header {
        border-radius: var(--radius-md);
    }

    .mobile-table th:first-child {
        border-top-left-radius: var(--radius-md);
    }
    .mobile-table th:last-child {
        border-top-right-radius: var(--radius-md);
    }
    .mobile-table tr:last-child td:first-child {
        border-bottom-left-radius: var(--radius-md);
    }
    .mobile-table tr:last-child td:last-child {
        border-bottom-right-radius: var(--radius-md);
    }

    .summary-card {
        padding: var(--space-lg);
    }

    .summary-card .amount {
        font-size: var(--font-size-2xl);
    }

    .form-table td {
        display: block;
        padding: var(--space-sm) 0;
    }
}

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

    .public-hero {
        height: 100vh;
        min-height: 500px;
        max-height: 650px;
        border-radius: 0;
    }

    .public-hero-content {
        padding: var(--space-xl) var(--space-md);
    }

    .public-hero-badge {
        font-size: 0.7rem;
        padding: 6px 12px;
        margin-bottom: var(--space-md);
    }

    .public-hero-title {
        font-size: 2rem;
        margin-bottom: var(--space-md);
    }

    .public-hero-subtitle {
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.9);
        margin-bottom: var(--space-lg);
    }

    .public-hero-buttons .btn {
        padding: var(--space-sm) var(--space-lg);
        font-size: var(--font-size-sm);
    }

    .public-hero-scroll-indicator {
        bottom: var(--space-md);
        font-size: 0.7rem;
    }

    .scroll-arrow {
        width: 20px;
        height: 20px;
    }

    .public-value-image img {
        height: 220px;
    }

    .aktive-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }

    .aktive-member-pic {
        width: 50px;
        height: 50px;
    }
}

/* === Upload Progress (upload_progress.js) === */
.upload-progress {
    margin-top: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.upload-progress__title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.upload-progress__bar {
    height: 10px;
    background: var(--neutral-200);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-xs);
}

.upload-progress__bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-full);
    transition: width var(--transition-fast);
}

.upload-progress__meta {
    display: flex;
    justify-content: space-between;
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    margin-bottom: var(--space-xs);
}

.upload-progress__status {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    font-style: italic;
}

.upload-progress--error {
    border-color: var(--danger);
    background: rgba(var(--danger-rgb), 0.05);
}

.upload-progress--error .upload-progress__title {
    color: var(--danger);
}

.upload-progress--error .upload-progress__bar-fill {
    background: var(--danger);
}
