:root {
    --primary-color: #5a67d8;
    --primary-light: #7f9cf5;
    --primary-dark: #4c51bf;
    --secondary-color: #667eea;
    --accent-color: #9f7aea;
    --dark-color: #2d3748;
    --light-color: #f7fafc;
    --success-color: #48bb78;
    --warning-color: #ed8936;
    --danger-color: #f56565;
    --info-color: #4299e1;
    --sidebar-width: 260px;
    --transition-speed: 0.3s;
    --transition-easing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
body {
    background-color: #f8fafc;
    color: #4a5568;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--dark-color);
    letter-spacing: -0.025em;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 0.875rem 1.5rem;
    position: relative;
    z-index: 30;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: 0.5px;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
}

.navbar-brand i {
    font-size: 1.5rem;
    margin-right: 0.75rem;
}

/* Sidebar */
.sidebar {
    background: white;
    width: var(--sidebar-width);
    min-height: calc(100vh - 64px);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.02);
    border-right: 1px solid rgba(0, 0, 0, 0.03);
    transition: all var(--transition-speed) var(--transition-easing);
    position: relative;
    z-index: 20;
}

.sidebar .nav-link {
    color: #4a5568;
    padding: 0.75rem 1.5rem;
    margin: 0.25rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s var(--transition-easing);
    display: flex;
    align-items: center;
}

.sidebar .nav-link:hover {
    background-color: rgba(90, 103, 216, 0.08);
    color: var(--primary-color);
    transform: translateX(4px);
}

.sidebar .nav-link.active {
    background-color: rgba(90, 103, 216, 0.12);
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(90, 103, 216, 0.1), 0 2px 4px -1px rgba(90, 103, 216, 0.06);
}

.sidebar .nav-link i {
    margin-right: 12px;
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    width: calc(100% - var(--sidebar-width));
    transition: all var(--transition-speed) var(--transition-easing);
    min-height: calc(100vh - 64px);
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    transition: all var(--transition-speed) var(--transition-easing);
    overflow: hidden;
    background: white;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-light), var(--primary-color));
    opacity: 0;
    transition: opacity var(--transition-speed) var(--transition-easing);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    background-color: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    padding: 1.25rem 1.5rem;
    border-radius: 12px 12px 0 0 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h6 {
    margin: 0;
    font-size: 1rem;
    color: var(--dark-color);
}

.card-body {
    padding: 1.5rem;
}

/* Status Cards */
.status-card {
    border-left: 4px solid;
    border-radius: 10px;
    transition: all var(--transition-speed) var(--transition-easing);
    position: relative;
    overflow: hidden;
}

.status-card::after {
    content: '';
    position: absolute;
    top: -10px;
    right: -10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    opacity: 0.1;
    transition: all var(--transition-speed) var(--transition-easing);
}

.status-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.status-card:hover::after {
    transform: scale(1.5);
}

.status-card.border-left-warning::after {
    background-color: var(--warning-color);
}

.status-card.border-left-info::after {
    background-color: var(--info-color);
}

.status-card.border-left-danger::after {
    background-color: var(--danger-color);
}

.status-card.border-left-success::after {
    background-color: var(--success-color);
}

.status-card .card-body {
    padding: 1.25rem;
    position: relative;
    z-index: 1;
}

.status-card .bi {
    font-size: 2rem;
    opacity: 0.8;
    transition: all var(--transition-speed) var(--transition-easing);
}

.status-card:hover .bi {
    transform: scale(1.1);
}

.status-card .text-xs {
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: #718096;
}

.status-card .h4 {
    font-weight: 700;
    color: var(--dark-color);
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 280px;
    margin: 0 auto;
}

/* Table Styling */
.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.table thead th {
    background-color: #f8fafc;
    color: #64748b;
    font-weight: 600;
    border-bottom: 1px solid #edf2f7;
    padding: 0.875rem 1.25rem;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.table tbody td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #edf2f7;
    vertical-align: middle;
    transition: background-color 0.2s ease;
}

.table tbody tr:hover td {
    background-color: #f8fafc;
}

/* Badges */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 6px;
    font-size: 0.75rem;
}

.badge.bg-primary {
    background-color: rgba(90, 103, 216, 0.1) !important;
    color: var(--primary-color) !important;
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.2s var(--transition-easing);
    border: none;
    font-size: 0.875rem;
}

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
}

.btn-primary {
    background-color: var(--primary-color);
    background-image: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    box-shadow: 0 2px 4px rgba(90, 103, 216, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(90, 103, 216, 0.3);
}

/* Dropdown Menu */
.dropdown-menu {
    border: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    color: #4a5568;
}

.dropdown-item:hover {
    background-color: rgba(90, 103, 216, 0.08);
    color: var(--primary-color);
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .sidebar {
        margin-left: -260px;
        position: relative;
        z-index: 1000;
        height: calc(100vh - 64px);
    }
    
    .sidebar.show {
        margin-left: 0;
    }
    
    .main-content {
        width: 100%;
        margin-left: 0;
        padding: 1.5rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn var(--transition-speed) var(--transition-easing);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Utility Classes */
.shadow-soft {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
}

.rounded-xl {
    border-radius: 12px;
}

.opacity-90 {
    opacity: 0.9;
}