* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
}

.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    background-color: #1a252f;
    border-bottom: 1px solid #34495e;
}

.sidebar-header h4 {
    margin: 0;
    color: white;
    font-size: 18px;
}

.sidebar-nav {
    padding: 10px 0;
}

.sidebar-nav .nav {
    list-style: none;
    padding: 0;
}

.sidebar-nav .nav-item {
    margin: 0;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-nav .nav-link:hover {
    background-color: #34495e;
    color: white;
}

.sidebar-nav .nav-link.active {
    background-color: #3498db;
    color: white;
}

.sidebar-nav .nav-link i {
    width: 24px;
    margin-right: 10px;
    text-align: center;
}

.sidebar-nav .nav-heading {
    padding: 15px 20px 5px;
    font-size: 11px;
    text-transform: uppercase;
    color: #7f8c8d;
    font-weight: 600;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.top-navbar {
    background-color: white;
    padding: 15px 30px;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.top-navbar h5 {
    margin: 0;
    color: #2c3e50;
}

.content-wrapper {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.panel {
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.panel-body {
    padding: 20px;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 10px;
}

/* Table */
.table {
    background: white;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Buttons */
.btn {
    margin-right: 5px;
}

.btn-xs {
    padding: 2px 8px;
    font-size: 12px;
}

/* Minimalistic buttons for experts table */
#expertsTable .btn-sm {
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid transparent;
    border-radius: 4px;
    margin-right: 8px;
    transition: all 0.2s ease;
}

#expertsTable .btn-sm:last-child {
    margin-right: 0;
}

#expertsTable .btn-sm i {
    font-size: 11px;
}

#expertsTable .btn-sm.btn-info {
    background-color: #e7f3ff;
    color: #0d6efd;
    border-color: #b3d9ff;
}

#expertsTable .btn-sm.btn-info:hover {
    background-color: #cfe2ff;
    border-color: #86b7fe;
}

#expertsTable .btn-sm.btn-danger {
    background-color: #fff5f5;
    color: #dc3545;
    border-color: #ffcccc;
}

#expertsTable .btn-sm.btn-danger:hover {
    background-color: #ffe0e0;
    border-color: #ff9999;
}

#expertsTable .btn-sm.btn-warning {
    background-color: #fffbf0;
    color: #ffc107;
    border-color: #ffe69c;
}

#expertsTable .btn-sm.btn-warning:hover {
    background-color: #fff3cd;
    border-color: #ffd966;
}

/* Cards */
.card {
    margin-bottom: 20px;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.card-title i {
    margin-right: 8px;
}

/* Switch */
.form-check-input:checked {
    background-color: #28a745;
    border-color: #28a745;
}

.form-check-input {
    cursor: pointer;
    width: 3em;
    height: 1.5em;
    transition: all 0.3s ease;
}

.form-check-input:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-check-label {
    cursor: pointer;
    margin-left: 0.5rem;
    user-select: none;
}

.status-switch {
    margin-top: 0.25rem;
}

.status-text {
    font-size: 0.875rem;
    color: #495057;
    font-weight: 500;
}

/* Modal */
.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.modal-title {
    color: #2c3e50;
    font-weight: 600;
}

/* Status badge */
.badge {
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
}

.badge.bg-purple {
    background-color: #6f42c1 !important;
    color: white;
}

.text-purple {
    color: #6f42c1 !important;
}

/* Category Selector */
.category-selector {
    position: relative;
}

.selected-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    min-height: 40px;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    background-color: #f8f9fa;
}

.category-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background-color: #007bff;
    color: white;
    border-radius: 20px;
    font-size: 14px;
    gap: 8px;
}

.category-tag .category-text {
    flex: 1;
}

.category-tag .remove-category {
    cursor: pointer;
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    margin-left: 4px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.category-tag .remove-category:hover {
    opacity: 1;
}

.category-tag .remove-category:focus {
    outline: none;
}

.selected-categories:empty::before {
    content: "Выберите категории из списка ниже";
    color: #6c757d;
    font-style: italic;
    font-size: 14px;
}

/* Select2 стили для Bootstrap 5 */
.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--multiple {
    min-height: 38px;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 2px 4px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #007bff;
    border: 1px solid #007bff;
    color: white;
    padding: 2px 8px;
    margin: 2px;
    border-radius: 0.25rem;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: white;
    margin-right: 5px;
    cursor: pointer;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #ffcccc;
}

.select2-container--default .select2-search--inline .select2-search__field {
    margin-top: 2px;
    padding: 0;
}

.select2-dropdown {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #007bff;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    
    .sidebar-nav .nav-link span {
        display: none;
    }
    
    .main-content {
        margin-left: 70px;
    }
    
    .content-wrapper {
        padding: 15px;
    }
}

