:root {
    --primary-color: #1a5276;
    --secondary-color: #2e86c1;
    --success-color: #28b463;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --sidebar-width: 250px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
    min-height: 100vh;
    padding-top: 56px;
}

.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    z-index: 100;
    padding: 0;
    width: var(--sidebar-width);
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    overflow-y: auto;
    background-color: #f8f9fa !important;
}

.sidebar[dir="rtl"] {
    right: 0;
}

.sidebar[dir="ltr"] {
    left: 0;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: 10px 16px;
    border-radius: 8px;
    margin: 2px 8px;
    transition: all 0.2s;
}

.sidebar .nav-link:hover {
    background-color: #e9ecef;
    color: var(--primary-color);
}

.sidebar .nav-link i {
    margin-right: 8px;
}

main {
    min-height: calc(100vh - 56px);
}

html[dir="rtl"] main {
    margin-right: var(--sidebar-width) !important;
}

html[dir="ltr"] main {
    margin-left: var(--sidebar-width) !important;
}

.card {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

.card-header {
    background-color: #fff;
    border-bottom: 2px solid #f0f0f0;
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
}

.stat-card {
    border-radius: 16px;
    padding: 1.5rem;
}

.stat-card .icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.stat-card .number {
    font-size: 2rem;
    font-weight: 700;
}

.table th {
    font-weight: 600;
    border-top: none;
    background-color: #f8f9fa;
}

.btn {
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 500;
}

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

.form-control, .form-select {
    border-radius: 8px;
    padding: 10px 14px;
    border: 1.5px solid #dee2e6;
}

.form-control:focus, .form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(46, 134, 193, 0.15);
}

.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
}

.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dropdown-menu {
    border-radius: 10px;
    border: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.modal-content {
    border-radius: 16px;
    border: none;
}

.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
}

.rating-display {
    display: inline-flex;
    gap: 4px;
}

.rating-display .star {
    color: #f1c40f;
    font-size: 1.2rem;
}

.print-only {
    display: none;
}

@media print {
    .no-print { display: none !important; }
    .print-only { display: block !important; }
    body { background: white; }
    .card { box-shadow: none; border: 1px solid #ddd; }
}

/* Fix Select2 inside Bootstrap modals */
.modal .select2-container {
    z-index: 99999 !important;
    width: 100% !important;
}

.select2-container--bootstrap5 .select2-selection {
    border-radius: 8px !important;
    border: 1.5px solid #dee2e6 !important;
    min-height: 46px !important;
    padding: 6px 12px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 32px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 44px !important;
}

@media (max-width: 767.98px) {
    .sidebar {
        position: static !important;
        width: 100% !important;
    }
    html[dir="rtl"] main,
    html[dir="ltr"] main {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .d-flex {
        flex-direction: column;
    }
}
