/* public/css/dashboard.css */
:root {
    --sidebar-width: 240px;
    --primary-dark: #1e222d;
    --sidebar-dark: #1a1f2c;
    --active-link: #1c64f2;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-dark);
    z-index: 99;
    display: flex;
    flex-direction: column;
    padding: 0;
    color: #fff;
}

/* Dashboard header */
.sidebar-header {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    gap: 12px;
}

.sidebar-header .dashboard-icon {
    width: 36px;
    height: 36px;
    background-color: #1c64f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: white;
}

/* Navigation links */
.sidebar .nav {
    flex-grow: 1;
    padding: 0 0 1rem 0;
    overflow-y: auto;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    margin: 0;
    border-radius: 0;
    border-left: 3px solid transparent;
}

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

.sidebar .nav-link.active {
    background-color: rgba(28, 100, 242, 0.1);
    color: white;
    border-left: 3px solid var(--active-link);
}

.sidebar .nav-link i {
    margin-right: 0.75rem;
    width: 24px;
    font-size: 18px;
    text-align: center;
}

/* User profile */
.user-profile {
    padding: 1rem 1.5rem;
    background-color: rgba(0, 0, 0, 0.15);
    margin-top: auto;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.75rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background-color: #1c64f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: white;
    margin: 0;
    font-size: 0.95rem;
}

.user-role {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    margin: 0;
}

.logout-btn {
    background-color: #ef4444;
    border: none;
    width: 100%;
    color: white;
    padding: 0.5rem;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background-color: #dc2626;
}

/* Main content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    min-height: 100vh;
}

.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.sidebar-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #1c64f2;
    color: white;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

/* ปรับตำแหน่ง sidebar เมื่อ toggle ถูกกด */
body.sidebar-open .main-content {
    margin-left: 0;
}


/* Responsive */
@media (max-width: 768px) {
    .sidebar-toggle {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
}