/* ==========================================================================
   SIDEBAR - Chiller Dark Theme (gebaseerd op dashboardsidebar.html)
   Aparte sidebar stylesheet voor makkelijker kleurenschema beheer
   ========================================================================== */

.page-wrapper {
    height: 100vh;
}

/* Sidebar Wrapper */
.sidebar-wrapper {
    width: 260px;
    height: 100vh;
    position: fixed;
    background-color: #31353D;
    top: 0;
    left: 0;
    transition: all 0.5s ease;
    z-index: 999;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #818896;
}

#sidebar {
    width: 260px;
    height: 100vh;
    background-color: #31353D;
    padding: 0;
    transition: all 0.5s ease;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
}

#sidebar.toggled {
    transform: translateX(-260px);
}

/* Custom Toggle Button */
#sidebar .custom-menu {
    display: inline-block;
    position: absolute;
    top: 20px;
    right: 0;
    z-index: 222;
    margin-right: -20px;
    transition: 0.3s;
}

#sidebar .custom-menu .btn {
    background: transparent;
    border-color: transparent;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    position: relative;
}

#sidebar .custom-menu button:focus {
    box-shadow: none;
}

#sidebar .custom-menu .btn:after {
    z-index: -1;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    content: "";
    transform: rotate(45deg);
    background: #31353d;
    border-radius: 10px;
}

#sidebar .custom-menu .btn i {
    margin-right: -40px;
    font-size: 14px;
    color: #fff;
}

/* Sidebar Content Scroll */
.sidebar-content {
    max-height: calc(100% - 10px);
    height: calc(100% - 10px);
    overflow-y: auto;
    position: relative;
}

.sidebar-content::-webkit-scrollbar {
    background: transparent;
    width: 5px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: #535965;
    border-radius: 10px;
}

/* Sidebar Brand */
.sidebar-brand {
    padding: 10px 20px;
    display: flex;
    align-items: center;
}

.sidebar-brand>a {
    text-transform: uppercase;
    font-weight: bold;
    flex-grow: 1;
    color: #818896;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sidebar-brand>a:hover {
    color: #19fffd;
}

.sidebar-brand .logo-container {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: 10px;
    border-radius: 8px;
    overflow: hidden;
}

.sidebar-brand .logo-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sidebar-brand .site-info {
    flex: 1;
    min-width: 0;
}

.sidebar-brand .site-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    display: block;
    line-height: 1.2;
    text-transform: uppercase;
}

.sidebar-brand .site-subtitle {
    font-size: 0.7rem;
    color: #818896;
    font-weight: 400;
    display: block;
    margin-top: 2px;
}

/* Sidebar Header / User Section */
.sidebar-header {
    padding: 20px;
    overflow: hidden;
    border-top: 1px solid #3a3f48;
}

.sidebar-header .user-pic {
    float: left;
    width: 60px;
    padding: 2px;
    border-radius: 12px;
    margin-right: 15px;
    overflow: hidden;
}

.sidebar-header .user-pic img {
    width: 100%;
    border-radius: 12px;
}

.sidebar-header .user-info {
    overflow: hidden;
}

.sidebar-header .user-info>span {
    display: block;
}

.sidebar-header .user-info .user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 2px;
}

.sidebar-header .user-info .user-role {
    font-size: 12px;
    color: #818896;
}

.sidebar-header .user-info .user-role .badge-role {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-weight: 500;
}

.sidebar-header .user-info .user-status {
    font-size: 11px;
    margin-top: 4px;
    color: #818896;
}

.sidebar-header .user-info .user-status i {
    font-size: 8px;
    margin-right: 4px;
    color: #28a745;
}

/* User Avatar (fallback als geen foto) */
.user-avatar-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 0;
    transition: opacity 0.3s ease;
}

.user-avatar-container:hover {
    opacity: 0.9;
    color: inherit;
    text-decoration: none;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-right: 15px;
}

.user-details {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.user-details .user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    display: block;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-details .user-role {
    font-size: 12px;
}

.user-details .user-status {
    font-size: 11px;
    margin-top: 4px;
}

.user-details .user-status i {
    font-size: 8px;
    margin-right: 4px;
    color: #28a745;
}

/* Sidebar Search */
.sidebar-search>div {
    padding: 10px 20px;
    border-top: 1px solid #3a3f48;
    border-bottom: 1px solid #3a3f48;
}

.sidebar-search input,
.sidebar-search .input-group-text {
    background: #3a3f48;
    border: none;
    color: #818896;
    font-size: 0.85rem;
}

.sidebar-search input::placeholder {
    color: #6c757d;
}

.sidebar-search input:focus {
    background: #3a3f48;
    color: #fff;
    box-shadow: none;
    outline: none;
}

.sidebar-search .input-group-text i {
    color: #898989;
}

/* Sidebar Menu */
.sidebar-menu {
    padding-bottom: 10px;
}

#sidebar ul>li {
    padding: 0;
}

#sidebar .sidebar-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Menu Items */
.sidebar-menu>ul>li a {
    padding: 7px 30px 7px 20px;
    line-height: 30px;
    font-size: 14px;
    color: #818896;
    position: relative;
    font-weight: 400;
    display: block;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sidebar-menu>ul>li a:hover {
    color: #818896;
}

#sidebar ul li:hover>a i {
    color: #19fffd;
}

#sidebar ul li a span {
    text-transform: capitalize;
    display: inline-block;
}

#sidebar ul li a i {
    margin-right: 10px;
    font-size: 12px;
    width: 30px;
    height: 30px;
    color: #818896;
    line-height: 30px;
    background: #3a3f48;
    text-align: center;
    border-radius: 4px;
    transition: color 0.3s ease;
}

#sidebar ul li a span.badge {
    float: right;
    margin-top: 8px;
    margin-left: 5px;
}

/* Header Menu (Group Labels) */
.sidebar-menu .header-menu span {
    font-weight: bold;
    font-size: 14px;
    padding: 15px 20px 5px 20px;
    display: inline-block;
    color: #818896;
}

/* Dropdown Toggle */
.sidebar-menu .dropdown-toggle {
    position: relative;
}

.sidebar-menu .dropdown-toggle::after {
    position: absolute;
    right: 18px;
    border: none !important;
    color: #c9c9c9;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    content: '\f105';
    top: 10px;
    transition: transform 0.3s ease;
}

.sidebar-menu .dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(90deg);
}

/* Submenu Styling */
.sidebar-menu .submenu {
    background-color: #3A3F48;
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu .submenu>li {
    padding-left: 15px !important;
    position: relative;
}

.sidebar-menu .submenu>li a:before {
    content: "\f111";
    font-family: "Font Awesome 5 Free";
    font-weight: 400;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    margin-right: 10px;
    font-size: 8px;
}

.sidebar-menu .submenu>li a {
    color: #b8bfce;
    position: relative;
    padding: 4px 24px 4px 20px !important;
    font-size: 13px !important;
}

.sidebar-menu .submenu>li a:hover {
    color: #19fffd;
}

/* Active state */
#sidebar ul>li.active>a {
    color: #19fffd;
}

#sidebar ul>li.active>a span {
    color: #19fffd;
    font-weight: 500;
}

#sidebar ul>li.active>a i {
    color: #19fffd;
}

/* Badge Sonar Animation */
.badge-sonar {
    display: inline-block;
    background: #980303;
    border-radius: 50%;
    height: 8px;
    width: 8px;
    position: absolute;
    top: 0;
}

/* Sidebar Footer */
.sidebar-footer {
    position: absolute;
    width: 100%;
    bottom: 0 !important;
    display: flex;
    background: #3a3f48;
    box-shadow: 0px -1px 5px #282c33;
    border-top: 1px solid #464a52;
}

.sidebar-footer a {
    flex-grow: 1;
    text-align: center;
    line-height: 30px;
    color: #818896;
    padding: 10px 0;
    position: relative;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-footer a:hover {
    color: #19fffd;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-footer a i {
    font-size: 1rem;
}

.sidebar-footer>a .notification {
    position: absolute;
    top: 0;
}

/* Sidebar Dividers */
.sidebar-divider {
    border-color: #3a3f48;
    margin: 0;
    opacity: 0.5;
}

/* Sidebar Toggle Button */
#sidebarCollapse {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
    background: #31353d;
    color: white;
    padding: 0;
    border-radius: 0;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
}

#sidebarCollapse:after {
    z-index: -1;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    content: "";
    transform: rotate(45deg);
    background: #31353d;
    border-radius: 10px;
}

#sidebarCollapse:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

#sidebarCollapse:active {
    transform: scale(0.98);
}

#sidebarCollapse i {
    font-size: 1rem;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

#sidebarCollapse:hover i {
    color: #19fffd;
}

/* Mobile Responsive Sidebar */
@media (max-width: 768px) {

    #sidebar,
    .sidebar-wrapper {
        position: fixed;
        z-index: 1000;
        left: 0;
        width: 260px;
        top: 0;
        height: 100%;
        transition: transform 0.5s ease;
        transform: translateX(-260px);
    }

    #sidebar.active,
    .sidebar-wrapper.active {
        transform: translateX(0);
    }

    #sidebar::-webkit-scrollbar {
        width: 0;
        background: transparent;
    }

    main {
        padding: 10px;
        margin-left: 0;
        transition: margin-left 0.3s;
    }

    #sidebarCollapse {
        display: flex;
    }

    /* Mobiele layout aanpassingen */
    .flex-container {
        flex-direction: column;
    }

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

    .container {
        max-width: 100%;
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Moderne card styling voor mobiel */
    .card {
        margin-bottom: 1.5rem !important;
        border-radius: 12px !important;
        border: 1px solid #e1e5e9 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
        overflow: visible !important;
    }

    .card-body {
        padding: 1.25rem 1rem !important;
    }

    .card-header {
        padding: 1rem !important;
        font-size: 0.95rem !important;
        overflow: visible !important;
    }

    /* Verbeterde grid spacing op mobiel */
    .row.g-3 {
        --bs-gutter-x: 1rem !important;
        --bs-gutter-y: 1.25rem !important;
        margin: 0 !important;
    }

    .col-12.col-md-6.col-xl-4 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    /* Sidebar overlay achtergrond */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
    }

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

/* Desktop: Content margin voor vaste sidebar */
@media (min-width: 769px) {
    .content-wrapper {
        margin-left: 260px;
    }

    #sidebarCollapse {
        display: none !important;
    }
}