
.error-page {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.error-code span {
    font-size: 6rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.error-icon {
    margin: 1rem 0;
}

.error-actions .btn {
    min-width: 160px;
    margin: 0.25rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-page {
    animation: fadeInUp 0.5s ease-out;
}


/* ===== СТИЛИ ДЛЯ ФИЛЬТРОВ ===== */

/* Панель фильтров */
.filter-panel {
    background: white;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    animation: filterSlideDown 0.3s ease;
}

@keyframes filterSlideDown {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.filter-panel-inner {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-group-search {
    flex: 1;
}

.filter-group-search .filter-options {
    flex: 1;
}

.filter-group-actions {
    justify-content: flex-end;
    border-top: 1px solid #e9ecef;
    padding-top: 0.75rem;
    margin-top: 0.25rem;
}

.filter-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #495057;
    min-width: 80px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.filter-label i {
    color: #6c757d;
    font-size: 0.9rem;
}

.filter-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    flex-wrap: wrap;
}

.filter-divider {
    width: 100%;
    height: 1px;
    background: #e9ecef;
}

/* Кнопки статусов */
.filter-status-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.8rem;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    background: white;
    color: #495057;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-status-btn:hover {
    background: #f8f9fa;
    border-color: #0d6efd;
}

.filter-status-btn.active {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.filter-status-btn .badge-count {
    background: rgba(0, 0, 0, 0.08);
    padding: 0.05rem 0.4rem;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 600;
}

.filter-status-btn.active .badge-count {
    background: rgba(255, 255, 255, 0.2);
}

/* Кнопки типов */
.filter-type-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.8rem;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    background: white;
    color: #495057;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-type-btn:hover {
    background: #f8f9fa;
    border-color: #6f42c1;
}

.filter-type-btn.active {
    background: #6f42c1;
    color: white;
    border-color: #6f42c1;
}

.filter-type-btn .badge-count {
    background: rgba(0, 0, 0, 0.08);
    padding: 0.05rem 0.4rem;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 600;
}

.filter-type-btn.active .badge-count {
    background: rgba(255, 255, 255, 0.2);
}

/* Поле поиска */
#search-input {
    transition: all 0.3s ease;
    border-color: #ced4da;
}

#search-input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

#search-input::placeholder {
    color: #adb5bd;
    font-size: 0.8rem;
}

#search-type {
    transition: all 0.3s ease;
    border-color: #ced4da;
    cursor: pointer;
}

#search-type:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

/* Кнопки действий */
.filter-apply-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1.2rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #0d6efd, #0a58ca);
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
    text-decoration: none;
}

.filter-apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(13, 110, 253, 0.4);
    color: white;
}

.filter-apply-btn:active {
    transform: translateY(0);
}

.filter-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1.2rem;
    border: 1px solid #dc3545;
    border-radius: 8px;
    background: white;
    color: #dc3545;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.filter-reset-btn:hover {
    background: #dc3545;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    text-decoration: none;
}

.filter-apply-btn-outline {
    background: transparent;
    color: #6c757d;
    box-shadow: none;
    border: 1px solid #ced4da;
}

.filter-apply-btn-outline:hover {
    background: #f8f9fa;
    color: #495057;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Кнопка переключения фильтров */
.filter-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1.2rem;
    border: 1px solid #ced4da;
    border-radius: 8px;
    background: white;
    color: #495057;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0.75rem;
}

.filter-toggle-btn:hover {
    background: #f8f9fa;
    border-color: #0d6efd;
    color: #0d6efd;
}

.filter-toggle-btn.active {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.filter-toggle-btn .toggle-icon {
    transition: transform 0.3s ease;
}

.filter-toggle-btn.active .toggle-icon {
    transform: rotate(180deg);
}

/* Бейдж с количеством активных фильтров */
.filter-toggle-btn .filter-badge {
    display: none;
    background: #0d6efd;
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    font-size: 0.7rem;
}

.filter-toggle-btn .filter-badge.active {
    display: inline-block;
}

@keyframes badgePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Подсветка активных полей */
.filter-group.has-value .filter-label {
    color: #0d6efd;
}

.filter-group.has-value .filter-label i {
    color: #0d6efd;
}

.filter-group.has-value .form-control,
.filter-group.has-value .form-select {
    border-color: #0d6efd;
    background-color: #f8fbff;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.1);
}

/* Панель активных фильтров */
.active-filters-bar {
    display: none;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    align-items: center;
}

.active-filters-bar.visible {
    display: flex;
}

.active-filters-bar .filter-label-text {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6c757d;
    margin-right: 0.25rem;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    font-size: 0.7rem;
    color: #495057;
    animation: tagAppear 0.3s ease;
}

.active-filter-tag .tag-icon {
    font-size: 0.6rem;
}

.active-filter-tag .tag-value {
    font-weight: 600;
    color: #0d6efd;
}

.active-filter-tag.tag-status {
    border-color: #198754;
}

.active-filter-tag.tag-status .tag-value {
    color: #198754;
}

.active-filter-tag.tag-type {
    border-color: #6f42c1;
}

.active-filter-tag.tag-type .tag-value {
    color: #6f42c1;
}

.active-filter-tag.tag-date {
    border-color: #fd7e14;
}

.active-filter-tag.tag-date .tag-value {
    color: #fd7e14;
}

.active-filter-tag.tag-search {
    border-color: #0d6efd;
}

.active-filter-tag.tag-search .tag-value {
    color: #0d6efd;
}

@keyframes tagAppear {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

.clear-all-filters {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.6rem;
    border: none;
    background: transparent;
    color: #dc3545;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.clear-all-filters:hover {
    background: #fce4e4;
    color: #b02a37;
}

/* Дата пикеры */
#date-from, #date-to {
    transition: all 0.3s ease;
    border-color: #ced4da;
    min-width: 140px;
}

#date-from:focus, #date-to:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

/* Адаптивность */
@media (max-width: 768px) {
    .filter-panel {
        padding: 0.75rem;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.4rem;
    }

    .filter-label {
        min-width: auto;
        font-size: 0.75rem;
    }

    .filter-options {
        width: 100%;
    }

    .filter-options .d-flex {
        width: 100%;
    }

    #search-input {
        min-width: 100px;
        width: 100%;
    }

    #search-type {
        width: 100%;
        min-width: auto;
    }

    .filter-status-btn, .filter-type-btn {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }

    .filter-apply-btn, .filter-reset-btn {
        flex: 1;
        justify-content: center;
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }

    .filter-group-actions {
        justify-content: stretch;
    }

    .filter-group-actions .d-flex {
        width: 100%;
    }

    .active-filters-bar {
        padding: 0.4rem 0.5rem;
        gap: 0.3rem;
    }

    .active-filter-tag {
        font-size: 0.6rem;
        padding: 0.15rem 0.4rem;
    }
}

/* Кнопки отделов */
.filter-dept-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.8rem;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    background: white;
    color: #495057;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-dept-btn:hover {
    background: #f8f9fa;
    border-color: #198754;
}

.filter-dept-btn.active {
    background: #198754;
    color: white;
    border-color: #198754;
}

.filter-dept-btn .badge-count {
    background: rgba(0, 0, 0, 0.08);
    padding: 0.05rem 0.4rem;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 600;
}

.filter-dept-btn.active .badge-count {
    background: rgba(255, 255, 255, 0.2);
}

/* Метка отдела, если только один */
.filter-dept-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 20px;
    color: #2e7d32;
    font-size: 0.8rem;
    font-weight: 500;
}

.filter-dept-label .badge-count {
    background: rgba(46, 125, 50, 0.15);
    padding: 0.05rem 0.4rem;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 600;
}

/* Активный тег для отдела */
.active-filter-tag.tag-department {
    border-color: #198754;
}

.active-filter-tag.tag-department .tag-value {
    color: #198754;
}

/* Подсветка группы "Отдел" */
.filter-group.has-value .filter-label {
    color: #198754;
}

.filter-group.has-value .filter-label i {
    color: #198754;
}