/* Zentrale CSS für Dashboard - Modernisiertes Design */
:root {
    --primary: #0d6efd;
    --secondary: #6c757d;
    --success: #198754;
    --info: #0dcaf0;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #212529;
    --sidebar-width: 280px;
    --header-height: 60px;
}

body {
    background-color: #f5f8fa;
    font-family: 'Poppins', 'Roboto', sans-serif;
    overflow-x: hidden;
}

/* Sidebar Styling */
.sidebar-container {
    position: fixed;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(135deg, #0a1628 0%, #1a365d 100%);
    color: #fff;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.sidebar {
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    padding: 0;
}

.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.sidebar .user-welcome {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.sidebar .nav-link {
    padding: 0.8rem 1.5rem;
    color: rgba(255, 255, 255, 0.85);
    border-left: 3px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.sidebar .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border-left: 3px solid #ffffff;
    font-weight: 500;
}

.sidebar .nav-icon {
    margin-right: 10px;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sidebar .nav-text {
    font-size: 0.95rem;
}

.sidebar-divider {
    height: 0;
    margin: 1rem 0;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0 1.5rem;
}

/* Header Styling */
.header {
    height: var(--header-height);
    background: linear-gradient(90deg, #0a1628 0%, #1a365d 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 990;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header .logo-container {
    display: flex;
    align-items: center;
}

.header .logo {
    height: 40px;
    margin-right: 1rem;
    /* Optionaler Filter, um das Logo für dunklen Hintergrund anzupassen */
    filter: brightness(1.2);
}

.header .brand-text {
    font-weight: 600;
    font-size: 1.25rem;
    color: #ffffff; /* Weiße Schrift für den Brand-Text */
}

.header .user-menu {
    display: flex;
    align-items: center;
}

.header .user-email {
    font-size: 0.9rem;
    margin-right: 0.5rem;
    color: #ffffff; /* Weiße Schrift für die Email-Adresse */
}

.header .dropdown-toggle::after {
    vertical-align: middle;
    color: #ffffff; /* Weiße Farbe für den Dropdown-Pfeil */
}

.header .user-avatar, .sidebar .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2); /* Heller für den Avatar im dunklen Header */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff; /* Weiße Schrift für den Avatar */
    font-weight: 600;
    margin-right: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3); /* Dezenter Rand */
}

.header .dropdown-menu {
    min-width: 12rem;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    background-color: #ffffff; /* Weißer Hintergrund für das Dropdown */
}

.header .dropdown-item {
    padding: 0.6rem 1.5rem;
    color: #1e3a8a; /* Blau für die Dropdown-Items, passend zum Header */
    font-size: 0.9rem;
}

.header .dropdown-item:hover,
.header .dropdown-item:focus {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary);
}

.header .dropdown-divider {
    margin: 0.3rem 0;
}

/* Main Content Styling */
.main-content-wrapper {
    margin-left: var(--sidebar-width);
    min-height: calc(100vh - var(--header-height));
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column; /* Stellt sicher, dass Elemente untereinander angezeigt werden */
    align-items: center; /* Zentriert horizontal */
}

.main-content {
    padding: 1.5rem;
    width: 100%;
}

/* Desktop-Ansicht: Inhalt auf 70% Breite beschränken */
@media (min-width: 992px) {
    .main-content {
        width: 60%;
    }
}

/* Footer-Ausrichtung sicherstellen */
.footer {
    width: 100%; /* Volle Breite im Wrapper */
    align-self: flex-end; /* Am unteren Ende des Flex-Containers */
}

.content-header {
    margin-bottom: 1.5rem;
}

.content-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.breadcrumb-item {
    font-size: 0.85rem;
}

.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Footer Styling */
.footer {
    background: #fff;
    padding: 1rem 1.5rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.85rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Media Queries for Responsive Design */
@media (max-width: 991.98px) {
    .sidebar-container {
        transform: translateX(-100%);
    }
    
    .sidebar-container.show {
        transform: translateX(0);
    }
    
    .main-content-wrapper {
        margin-left: 0;
    }
    
    .sidebar-toggler {
        display: block !important;
    }
}

/* Helper Classes */
.sidebar-toggler {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #495057;
}

/* Animation */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
