/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Core Styles */
html {
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f9fafb;
    color: #1a202c;
    line-height: 1.5;
    min-height: 100vh;
}

/* Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    padding-top: 4rem; /* Adjusted to match navbar height */
}

/* Sidebar Core */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background-color: #1f2937;
    color: #cbd5e0;
    padding-top: 4rem;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    z-index: 40;
    transition: transform 0.3s ease-in-out;
}

/* Sidebar Sections */
.sidebar-profile {
    text-align: center;
    padding: 1.5rem 1rem;
    background-color: #374151;
    margin-bottom: 1rem;
}

.profile-image {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    object-fit: cover;
}

.profile-name {
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.profile-email {
    color: #9CA3AF;
    font-size: 0.875rem;
}

/* Navigation Links */
.sidebar-nav {
    padding: 1rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #a0aec0;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
    text-decoration: none;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateX(4px);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-left: 4px solid #2563eb;
    padding-left: calc(1rem - 4px);
}

.nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    stroke: currentColor;
    stroke-width: 2;
}

/* Main Content */
.dashboard-main {
    flex: 1;
    padding: 1.5rem;
    transition: margin-left 0.3s ease-in-out;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        width: 80%;
        max-width: 300px;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .dashboard-main {
        margin-left: 0 !important;
        width: 100% !important;
    }

    #sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 35;
    }

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

@media (min-width: 1025px) {
    .sidebar {
        transform: translateX(0);
    }

    .dashboard-main {
        margin-left: 260px;
        padding: 2rem;
    }

    #sidebar-overlay {
        display: none !important;
    }
}

/* Utility Classes */
.min-h-screen {
    min-height: 100vh;
}

.overflow-hidden {
    overflow: hidden;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #111827;
        color: #F9FAFB;
    }
}
    /* Smooth transition for theme changes */
    html.transitioning,
    html.transitioning * {
        transition: background-color 200ms, border-color 200ms, color 200ms !important;
    }

    .dark {
        background-color: #1a1a1a;
        color: #ffffff;
    }
    
    .dark .bg-white {
        background-color: #2d2d2d;
    }
    
    /* Smooth transitions */
    body, button, div, i {
        transition: background-color 0.3s ease, color 0.3s ease;
    }
