:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #10b981;
    --bg-color: #f8fafc;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --sidebar-width: 260px;
    --transition-speed: 0.3s;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.03) 0%, transparent 20%),
                      radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.03) 0%, transparent 20%);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Glassmorphism Classes */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border-radius: 16px;
}

.glass-nav {
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

/* Base Wrapper */
.wrapper {
    display: flex;
    width: 100%;
}

/* Sidebar Custom */
#sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    transition: all var(--transition-speed);
    background: #ffffff;
    box-shadow: 1px 0 3px 0 rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

#sidebar .sidebar-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
}

#sidebar .sidebar-logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

#sidebar .sidebar-logo i {
    font-size: 1.8rem;
}

#sidebar ul.components {
    padding: 20px 0;
    flex-grow: 1;
    overflow-y: auto;
}

#sidebar ul p {
    color: var(--text-muted);
    padding: 10px 24px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 0;
}

#sidebar ul li {
    padding: 4px 16px;
}

#sidebar ul li a {
    padding: 12px 16px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 8px;
    text-decoration: none;
}

#sidebar ul li a i {
    width: 24px;
    font-size: 1.1rem;
    margin-right: 12px;
    text-align: center;
}

#sidebar ul li a:hover {
    color: var(--primary-color);
    background: #f8fafc;
}

#sidebar ul li.active > a {
    color: var(--primary-color);
    background: rgba(79, 70, 229, 0.08);
    font-weight: 600;
}

/* Main Content */
#content {
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    transition: all var(--transition-speed);
    margin-left: var(--sidebar-width);
}

/* Navbar */
.navbar {
    padding: 12px 24px;
}

.navbar .btn-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    padding: 6px 16px 6px 6px;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.2s;
}

.navbar .btn-profile:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.navbar .btn-profile img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 500;
    border-radius: 8px;
    padding: 10px 20px;
    transition: all 0.3s;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
    transform: translateY(-1px);
}

.btn-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: white;
    border: 1px solid #e2e8f0;
    color: var(--text-muted);
    transition: all 0.2s;
}
.btn-icon:hover {
    color: var(--primary-color);
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* Stats Cards */
.stat-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    background: white;
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.bg-primary-light { background-color: rgba(79, 70, 229, 0.1); color: var(--primary-color); }
.bg-success-light { background-color: rgba(16, 185, 129, 0.1); color: var(--secondary-color); }
.bg-warning-light { background-color: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.bg-danger-light { background-color: rgba(239, 68, 68, 0.1); color: #ef4444; }

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent; 
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1; 
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8; 
}

/* Animations */
.fade-in-up {
    animation: fadeInUp 0.4s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utilities */
.rounded-4 { border-radius: 1rem !important; }
.shadow-sm { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1) !important; }
.text-muted { color: var(--text-muted) !important; }

/* Responsive adjustments */
@media (max-width: 768px) {
    #sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    #sidebar.active {
        margin-left: 0;
    }
    #content {
        width: 100%;
        margin-left: 0;
    }
    #content.active {
        /* When sidebar is active, slide content over or overlay */
        transform: translateX(var(--sidebar-width));
    }
}
