/* ===== БОКОВАЯ ПАНЕЛЬ ФИЛЬТРА ===== */
#cartFilterSidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 380px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    transition: right 0.3s ease;
    z-index: 1050;
    display: flex !important;
    flex-direction: column;
}

#cartFilterSidebar.active {
    right: 0;
}

.cart-filter-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: #f8f9fa;
}

.cart-filter-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.cart-filter-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-filter-body .form-label {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
}

.cart-filter-body .form-control,
.cart-filter-body .form-select {
    font-size: 13px;
    padding: 6px 12px;
}

.cart-filter-body .input-group-text {
    font-size: 12px;
    padding: 4px 10px;
}

.cart-filter-footer {
    padding: 12px 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    background: #f8f9fa;
}

.cart-filter-footer .btn {
    flex: 1;
    font-size: 13px;
}

/* Оверлей */
#cartFilterOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 1049;
    display: none;
}

#cartFilterOverlay.active {
    display: block;
}

/* Кнопка открытия фильтра */
#cartFilterToggle {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1040;
    border-radius: 4px 0 0 4px;
    box-shadow: -2px 0 8px rgba(0,0,0,0.1);
    padding: 12px 8px;
    transition: right 0.3s ease;
}

#cartFilterToggle.active {
    right: 380px;
}

#filterBadge {
    font-size: 10px;
    padding: 1px 6px;
    margin-left: 4px;
    vertical-align: top;
}

/* Адаптивность */
@media (max-width: 576px) {
    #cartFilterSidebar {
        width: 100%;
        right: -100%;
    }

    #cartFilterSidebar.active {
        right: 0;
    }

    #cartFilterToggle.active {
        right: 100%;
    }
}


/* Стили для тикетов */
.ticket-messages .well {
    padding: 15px;
    margin-bottom: 15px;
}
.ticket-messages .well:last-child {
    margin-bottom: 0;
}
.ticket-messages .well hr {
    margin-top: 10px;
    margin-bottom: 10px;
}
.ticket-messages .message-text {
    word-wrap: break-word;
}
.ticket-messages .attachments ul {
    margin-top: 5px;
    margin-bottom: 0;
}
.ticket-messages .attachments li {
    padding: 2px 0;
}

/* Баджи статусов */
.badge.bg-secondary {
    background-color: #6c757d;
}
.badge.bg-warning {
    background-color: #ffc107;
    color: #000;
}
.badge.bg-danger {
    background-color: #dc3545;
}
.badge.bg-info {
    background-color: #17a2b8;
}
.badge.bg-success {
    background-color: #28a745;
}
.badge.bg-primary {
    background-color: #007bff;
}

/* Форма */
.border-dashed {
    border: 2px dashed #dee2e6 !important;
}
.rounded-4 {
    border-radius: 1rem !important;
}