/* Main Layout */
:root {
    --sidebar-width: 260px;
    --header-height: 60px;
    --primary-color: #0d6efd;
    --sidebar-bg: #212529;
    --sidebar-text: #e9ecef;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f4f6f9;
    margin: 0;
    overflow-x: hidden;
}

/* Sidebar Styling */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    z-index: 1000;
    transition: width 0.3s;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    background-color: rgba(0,0,0,0.1);
    font-weight: bold;
    font-size: 1.2rem;
    color: #fff;
}

.user-box {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    color: #adb5bd;
}

.sidebar .nav-item-title {
    padding: 15px 20px 5px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6c757d;
    font-weight: 700;
}

.sidebar ul.nav {
    padding: 0;
    margin: 0;
    list-style: none;
}

.sidebar ul.nav li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #ced4da;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar ul.nav li a:hover {
    background-color: rgba(255,255,255,0.05);
    color: #fff;
    border-left-color: var(--primary-color);
    padding-left: 25px; /* Slide effect */
}

.sidebar ul.nav li a i {
    width: 25px;
    text-align: center;
    margin-right: 10px;
}

/* Main Content Area */
.content {
    margin-left: var(--sidebar-width);
    padding: 20px;
    padding-top: calc(var(--header-height) + 20px);
    transition: margin-left 0.3s;
    min-height: 100vh;
}

/* Topbar Styling */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 999;
    transition: left 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.topbar .user-name {
    font-weight: 500;
    color: #333;
}

.logout-btn {
    padding: 6px 15px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #495057;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.logout-btn:hover {
    background-color: #f8f9fa;
    border-color: #cdd4da;
    color: #dc3545;
}

/* Card Improvements */
.card {
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.04);
    margin-bottom: 20px;
    background: #fff;
    border-radius: 8px;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 600;
    padding: 15px 20px;
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar { left: -260px; }
    .content { margin-left: 0; }
    .topbar { left: 0; }
    
    .sidebar.active { left: 0; }
    .content.active { margin-left: 0; filter: blur(2px); }
}
