:root {
    --primary-color: #4e73df;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fc;
    overflow-x: hidden;
}

/* Gradient Background */
.bg-gradient-primary {
    background: linear-gradient(180deg, var(--primary-color) 0%, #224abe 100%);
    min-height: 100vh;
}

/* Cards */
.card {
    border-radius: 0.75rem;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0,0,0,.175);
}

/* Buttons */
.btn {
    border-radius: 0.5rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-color);
    border: none;
}

.btn-primary:hover {
    background: #224abe;
    transform: translateY(-2px);
}

/* Tables */
.table {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table thead th {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem;
}

.table tbody tr:hover {
    background-color: rgba(78, 115, 223, 0.05);
}

/* Modal Styles */
.modal-content {
    border-radius: 1rem;
    overflow: hidden;
}

.modal-header {
    border: none;
}

.modal-footer {
    border: none;
}

/* Form Controls */
.form-control, .form-select {
    border-radius: 0.5rem;
    padding: 0.6rem 1rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.input-group-text {
    border-radius: 0.5rem 0 0 0.5rem;
    background-color: #f8f9fc;
}

/* Alert */
.alert {
    border-radius: 0.5rem;
    border: none;
}

/* Badge */
.badge {
    padding: 0.35rem 0.65rem;
    border-radius: 0.375rem;
    font-weight: 500;
}

/* Navigation */
.navbar {
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,.075);
}

/* Dashboard Stats */
.card-stats {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Mobile First Responsive */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .display-6 {
        font-size: 1.75rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.875rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #224abe;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    display: none;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Print Styles */
@media print {
    .sidebar, .navbar, .btn, .modal-footer {
        display: none !important;
    }
    
    #page-content-wrapper {
        margin: 0 !important;
        padding: 0 !important;
    }
}