/* Root Variables */
:root {
    --primary: #003366;
    --primary-dark: #002244;
    --secondary: #0066CC;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --background: #F4F7FB;
    --card-bg: #ffffff;
    --border-radius: 12px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.12);
    --sidebar-width: 260px;
    --navbar-height: 64px;
    --font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: var(--background);
    color: #1e293b;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--primary);
    color: #fff;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 12px;
}

.sidebar-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.sidebar-brand span {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-section:last-child {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 8px;
    gap: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.nav-item i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar-custom {
    height: var(--navbar-height);
    background: var(--card-bg);
    border-bottom: 1px solid #e2e8f0;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 999;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--primary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.menu-toggle:hover {
    background: #f1f5f9;
}

.page-title {
    font-weight: 600;
    color: var(--primary);
    margin: 0;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification-badge {
    position: relative;
    cursor: pointer;
    font-size: 22px;
    color: #64748b;
    transition: color 0.2s;
}

.notification-badge:hover {
    color: var(--primary);
}

.notification-badge .badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 18px;
    text-align: center;
    font-weight: 600;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 4px 12px 4px 4px;
    border-radius: 50px;
    transition: background 0.2s;
}

.user-profile:hover {
    background: #f1f5f9;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-name {
    font-weight: 600;
    font-size: 13px;
    color: #1e293b;
}

.user-role {
    font-size: 11px;
    color: #94a3b8;
}

/* Page Content */
.page-content {
    padding: 24px 32px;
    flex: 1;
}

/* Cards */
.card-custom {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: none;
    transition: box-shadow 0.2s;
    overflow: hidden;
}

.card-custom:hover {
    box-shadow: var(--shadow-hover);
}

.card-custom .card-header {
    background: transparent;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-custom .card-title {
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.card-custom .card-body {
    padding: 20px 24px;
}

.view-all {
    color: var(--secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.view-all:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .navbar-custom {
        padding: 0 16px;
    }
    
    .page-content {
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .user-info {
        display: none;
    }
    
    .navbar-right {
        gap: 12px;
    }
}

@media (max-width: 576px) {
    .page-title {
        font-size: 16px;
    }
    
    .notification-badge {
        font-size: 18px;
    }
}