/* ================================================================================
   BASE SITE CSS - Sidebar en Header
   FILE: static/admin_custom/base_site.css
   VERSION: 1.0
   DATE: 2025-01-14
   
   Styling voor:
   - Custom sidebar
   - Fixed header
   - Content shift
   - Responsive
================================================================================ */

/* ============================================================
   HIDE DJANGO'S DEFAULT SIDEBAR
============================================================ */
#nav-sidebar,
nav#nav-sidebar,
nav[aria-label="Sidebar"],
aside[role="complementary"],
.app-list {
    display: none !important;
}

/* ============================================================
   HEADER - Fixed top
============================================================ */
#header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 80px !important;
    background: linear-gradient(135deg, #4A6B7C 0%, #3D5A6B 100%) !important;
    border-bottom: none !important;
    z-index: 2000 !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 40px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

#branding {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
}

#branding h1 {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    margin: 0 !important;
}

#branding h1 a {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    text-decoration: none !important;
    color: #FFFFFF !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    transition: opacity 0.3s !important;
}

#branding h1 a:hover {
    opacity: 0.9 !important;
}

.klasso-brand__logo {
    height: 56px !important;
    width: auto !important;
    display: inline-block !important;
    filter: brightness(1.1) !important;
}

#user-tools {
    margin-left: auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    color: #FFFFFF !important;
}

#user-tools strong {
    color: #FFFFFF !important;
    font-weight: 600 !important;
}

#user-tools a {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #FFFFFF !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    transition: all 0.3s !important;
}

#user-tools a:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-1px) !important;
}

/* ============================================================
   CUSTOM SIDEBAR
============================================================ */
.custom-sidebar {
    position: fixed !important;
    left: 0 !important;
    top: 80px !important;
    width: 260px !important;
    height: calc(100vh - 80px) !important;
    background: linear-gradient(180deg, #34495E 0%, #2C3E50 100%) !important;
    overflow-y: auto !important;
    z-index: 1500 !important;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2) !important;
    display: block !important;
}

.custom-sidebar::-webkit-scrollbar {
    width: 6px;
}

.custom-sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.custom-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar-section {
    padding: 16px 24px 12px 24px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    color: #A8C5D1 !important;
    margin-top: 20px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.sidebar-section:first-child {
    margin-top: 8px !important;
}

.sidebar-link {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 14px 24px !important;
    color: #FFFFFF !important;
    text-decoration: none !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    transition: all 0.25s !important;
    border-left: 3px solid transparent !important;
    position: relative !important;
}

.sidebar-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: rgba(255, 255, 255, 0.1);
    transition: width 0.25s;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-left-color: #5B8FA3 !important;
    padding-left: 28px !important;
}

.sidebar-link:hover::before {
    width: 100%;
}

.sidebar-link.active {
    background: rgba(91, 143, 163, 0.3) !important;
    border-left-color: #5B8FA3 !important;
    font-weight: 600 !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

.sidebar-icon {
    font-size: 20px !important;
    width: 24px !important;
    text-align: center !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2)) !important;
}

/* ============================================================
   CONTENT SHIFT
============================================================ */
body {
    padding-top: 80px !important;
    background: #F5F7FA !important;
}

#content,
#content-main,
.main,
.colM,
.colMS {
    margin-left: 260px !important;
    padding: 40px !important;
    max-width: 1400px !important;
    margin-right: auto !important;
}

.breadcrumbs {
    margin-left: 260px !important;
    padding: 16px 40px !important;
    border-bottom: 1px solid #E2E8F0 !important;
    max-width: 1400px !important;
    margin-right: auto !important;
}

/* Hide sidebar toggle on desktop */
.toggle-nav-sidebar {
    display: none !important;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1024px) {
    .custom-sidebar {
        left: -260px;
        transition: left 0.3s;
    }

    .custom-sidebar.show {
        left: 0;
    }

    #content,
    #content-main,
    .breadcrumbs {
        margin-left: 0 !important;
    }

    .toggle-nav-sidebar {
        display: block !important;
        position: fixed;
        left: 20px;
        bottom: 20px;
        width: 50px;
        height: 50px;
        background: #34495E;
        color: white;
        border: none;
        border-radius: 50%;
        font-size: 24px;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        z-index: 2000;
    }
}