/* Netoforge Academy - Main Stylesheet
    Author: Onyeneto Chinedu
    Description: Responsive Dashboard with Glassmorphism and Modern UI/UX
*/

:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
    --primary-gradient: linear-gradient(180deg, #1e3c72, #2a5298);
    --transition-speed: 0.3s;
    --accent-blue: #0d6efd;
    --bg-light: #f4f6f9;
    --glass-shadow: 0 10px 30px rgba(0,0,0,0.1);
    --sidebar-bg: #1e1e2d; /* Unified dark theme base */
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-light);
    overflow-x: hidden;
    margin: 0;
}

/* --- SIDEBAR BASE --- */
#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    background: var(--primary-gradient);
    color: white;
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1100;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 4px 0 15px rgba(0,0,0,0.05);
}

#sidebar.active {
    min-width: var(--sidebar-collapsed-width);
    max-width: var(--sidebar-collapsed-width);
}

/* --- CONTENT AREA --- */
#content {
    width: 100%;
    margin-left: var(--sidebar-width);
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

#content.active {
    margin-left: var(--sidebar-collapsed-width);
}

/* --- TOPBAR --- */
.topbar {
    background: white;
    padding: 15px 25px;
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 1050;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

/* --- SIDEBAR ELEMENTS --- */
.sidebar-header {
    padding: 0 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 10px;
    height: 80px;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    transition: all var(--transition-speed);
}

.sidebar-header a {
    display: flex;
    align-items: center;
    text-decoration: none;
    width: 100%;
    transition: justify-content var(--transition-speed);
}

.sidebar-logo {
    transition: transform 0.3s ease, margin 0.3s ease;
    height: 40px;
    width: auto;
}

.sidebar-header:hover .sidebar-logo {
    transform: scale(1.05);
}

.tracking-tight {
    letter-spacing: -0.5px;
    white-space: nowrap;
}

#sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 12px 20px;
    border-radius: 8px;
    margin: 5px 15px;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

#sidebar .nav-link i {
    font-size: 1.1rem;
    min-width: 30px;
}

#sidebar .nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

#sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    color: #ffffff;
    border-left: 4px solid #fff;
    border-radius: 0 8px 8px 0;
    margin-left: 0;
    font-weight: 500;
}

/* --- SIDEBAR COLLAPSED LOGIC --- */
#sidebar.active .nav-link span, 
#sidebar.active .sidebar-header span,
#sidebar.active .sidebar-label,
#sidebar.active hr {
    display: none !important;
}

#sidebar.active .sidebar-header a {
    justify-content: center;
}

#sidebar.active .sidebar-logo {
    margin-right: 0 !important;
}

#sidebar.active .nav-link {
    justify-content: center;
    margin: 5px 10px;
    padding: 12px 0;
}

/* --- NOTIFICATIONS & DROPDOWNS --- */
.notif-badge {
    font-size: 0.65rem;
    padding: 0.25em 0.45em;
    transform: translate(-30%, -20%);
}

.notif-dropdown {
    width: 320px;
    border: none;
    border-radius: 12px;
    box-shadow: var(--glass-shadow) !important;
    padding: 0;
    overflow: hidden;
}

.notif-scroll-area {
    max-height: 380px;
    overflow-y: auto;
}

/* Custom Scrollbar for Premium Feel */
#sidebar::-webkit-scrollbar,
.notif-scroll-area::-webkit-scrollbar {
    width: 5px;
}

#sidebar::-webkit-scrollbar-track,
.notif-scroll-area::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

#sidebar::-webkit-scrollbar-thumb,
.notif-scroll-area::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.notif-item {
    border-bottom: 1px solid #f1f1f1;
    white-space: normal;
    padding: 15px 16px;
    transition: all 0.2s ease;
    display: block;
    text-decoration: none;
}

.notif-item:hover {
    background-color: #f8f9fa !important;
}

.notif-item.unread {
    background-color: #f8fbff !important;
    border-left: 3px solid var(--accent-blue) !important;
}

.unread-dot {
    height: 7px;
    width: 7px;
    background-color: var(--accent-blue);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 5px rgba(13, 110, 253, 0.5);
}

.notif-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* --- FLASH MESSAGES --- */
.flash-message {
    border: none;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* --- MOBILE RESPONSIVENESS --- */
#sidebarClose {
    display: none;
}

@media (max-width: 768px) {
    #sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    
    #sidebar.active {
        margin-left: 0 !important;
        min-width: var(--sidebar-width);
        max-width: var(--sidebar-width);
    }

    #sidebar.active .nav-link span, 
    #sidebar.active .sidebar-header span,
    #sidebar.active .sidebar-label {
        display: block !important;
    }

    #sidebarClose {
        display: block;
    }

    #content {
        margin-left: 0;
    }

    #content.active {
        margin-left: 0;
        filter: brightness(0.6);
        pointer-events: none;
    }

    .notif-dropdown {
        width: 290px;
        position: fixed !important;
        left: 50% !important;
        top: 70px !important;
        transform: translateX(-50%) !important;
    }
}