:root {
    --primary-color: #4e73df;
    --secondary-color: #1cc88a;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --dark-color: #5a5c69;
    --light-color: #f8f9fc;
    --sidebar-width: 280px;
    --header-height: 60px;
    --footer-height: 60px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fc;
    color: #333;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #4e73df 0%, #224abe 100%);
    color: white;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: var(--transition-speed);
    overflow-y: auto;
    box-shadow: 3px 0 10px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.sidebar-menu {
    padding: 20px 0;
}

.sidebar-menu .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 12px 25px;
    font-weight: 500;
    transition: var(--transition-speed);
    border-radius: 0 30px 30px 0;
    margin: 5px 0;
    display: flex;
    align-items: center;
}

.sidebar-menu .nav-link:hover,
.sidebar-menu .nav-link.active {
    color: white;
    background: rgba(255,255,255,0.1);
    padding-left: 30px;
}

.sidebar-menu .nav-link.active {
    background: rgba(255,255,255,0.15);
    border-left: 4px solid white;
}

.sidebar-footer {
    padding: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: var(--transition-speed);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    height: var(--header-height);
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 900;
}

/* Page Content Styles */
.page-content {
    flex: 1;
    padding: 20px;
    background-color: #f8f9fc;
    overflow-y: auto;
}

/* Footer Styles */
.footer {
    height: var(--footer-height);
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    position: sticky;
    bottom: 0;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
}

.card-header {
    background: white;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    padding: 15px 20px;
}

.card-body {
    padding: 20px;
}

/* Chart Styles */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Stats Cards */
.stats-card {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    color: white;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-3px);
}

.stats-card .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 10px 0;
}

.stats-card .stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

.stats-card.primary {
    background: linear-gradient(135deg, #4e73df 0%, #3a57c5 100%);
}

.stats-card.success {
    background: linear-gradient(135deg, #1cc88a 0%, #17a673 100%);
}

.stats-card.warning {
    background: linear-gradient(135deg, #f6c23e 0%, #e6af1e 100%);
}

.stats-card.danger {
    background: linear-gradient(135deg, #e74a3b 0%, #d93728 100%);
}

/* Table Styles */
.table-responsive {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.table {
    min-width: 100%;
    background: white;
}

.table th {
    background-color: #f8f9fc;
    font-weight: 600;
    color: #5a5c69;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fc;
}

/* Filter Section */
.filter-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.filter-section .row {
    align-items: end;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #4e73df 0%, #3a57c5 100%);
    border: none;
    padding: 8px 20px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3a57c5 0%, #2d46a1 100%);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #1cc88a 0%, #17a673 100%);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, #f6c23e 0%, #e6af1e 100%);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, #e74a3b 0%, #d93728 100%);
    border: none;
}

/* Modal Styles */
.modal-content {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-header {
    background: linear-gradient(135deg, #4e73df 0%, #3a57c5 100%);
    color: white;
    border-radius: 15px 15px 0 0 !important;
}

/* Responsive Design */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .main-content.sidebar-show {
        margin-left: var(--sidebar-width);
    }
}

@media (max-width: 768px) {
    .stats-card .stat-number {
        font-size: 2rem;
    }

    .filter-section {
        padding: 15px;
    }

    .chart-container {
        height: 250px;
    }
}

@media (max-width: 576px) {
    .stats-card .stat-number {
        font-size: 1.8rem;
    }

    .card-body {
        padding: 15px;
    }

    .chart-container {
        height: 200px;
    }

    .sidebar-header h3 {
        font-size: 1.2rem;
    }
}

/* Loading Animation */
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(78, 115, 223, 0.2);
    border-top: 5px solid #4e73df;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c5c7d0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a9b4;
}