:root {
    --primary-color: #4f46e5;
    --secondary-color: #4338ca;
    --dark-bg: #0f172a;
    --light-bg: #f8fafc;
    --sidebar-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --sidebar-width: 260px;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-primary);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    border-right: 1px solid var(--border-color);
    z-index: 1000;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.brand-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), #06b6d4);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.nav-category {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 700;
    padding: 20px 20px 8px;
    letter-spacing: 0.5px;
}

.sidebar-menu {
    list-style: none;
    padding: 0 0 20px 0;
    margin: 0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-menu li a:hover, .sidebar-menu li a.active {
    color: var(--primary-color);
    background: #f1f5f9;
    border-left: 3px solid var(--primary-color);
}

.sidebar-menu li a i {
    margin-right: 12px;
    font-size: 18px;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: all 0.3s ease;
}

.topbar {
    background: #ffffff;
    height: 70px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 999;
}

.content-wrapper {
    padding: 30px;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    margin-bottom: 24px;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
    font-weight: 600;
}

.stat-card {
    padding: 24px;
    border-radius: 16px;
    background: white;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* Tables */
.table th {
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    padding: 1rem;
    white-space: nowrap;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    color: var(--text-primary);
}

/* Login Page */
.login-bg {
    background: linear-gradient(135deg, #e0e7ff 0%, #ede9fe 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    overflow: hidden;
    width: 100%;
    max-width: 1000px;
}

.login-image {
    background: url('https://images.unsplash.com/photo-1586528116311-ad8ed3c84a0d?q=80&w=800&auto=format&fit=crop') center/cover;
    min-height: 100%;
    position: relative;
}

.login-image::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.2), rgba(0,0,0,0.6));
}

.login-form-wrapper {
    padding: 60px;
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .main-content {
        margin-left: 0;
    }
    .login-form-wrapper {
        padding: 40px 30px;
    }
}

/* Mobile Sidebar Open State */
body.sidebar-open .sidebar {
    transform: translateX(0);
}

/* Utility */
.font-outfit {
    font-family: 'Outfit', sans-serif;
}

.font-monospace {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875em;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Sidebar open overlay for mobile */
body.sidebar-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
}

/* Badge pill utilities */
.badge-pill-sm {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
}

/* Print styles */
@media print {
    .sidebar,
    .topbar,
    .modal-footer,
    button {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
    }
    .modal-dialog {
        max-width: 100%;
        margin: 0;
    }
    .modal-content {
        border: none;
        box-shadow: none;
    }
    .modal {
        position: static;
        display: block;
    }
    .modal-backdrop {
        display: none;
    }
}
