.mobile-filter-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    z-index: 25000 !important;
    align-items: flex-end;
    justify-content: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    touch-action: manipulation;
}

.mobile-filter-overlay.active {
    display: flex !important;
}

.mobile-filter-box {
    background: #fff;
    border-radius: 24px 24px 0 0;
    padding: 0.75rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
    width: 100%;
    max-width: 550px;
    max-height: 80vh;
    overflow-y: auto;
    animation: mobileFilterSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.25);
    -webkit-overflow-scrolling: touch;
}

.mobile-filter-handle {
    width: 36px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 10px;
    margin: 0 auto 0.4rem;
    cursor: pointer;
}

.mobile-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #f1f5f9;
}

.filter-header-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
}

.filter-close-btn {
    background: #f1f5f9;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: background 0.2s;
}

.filter-close-btn:active {
    background: #e2e8f0;
}

.mobile-filter-form {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.filter-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.filter-field label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding-left: 2px;
}

.filter-field select {
    width: 100%;
    height: 36px;
    padding: 0 0.55rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    font-size: 0.82rem;
    font-weight: 600;
    outline: none;
    background: #f8fafc;
    color: #0f172a;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 0.85rem;
    padding-right: 1.5rem;
}

.filter-field select:focus {
    border-color: #3b82f6;
    background-color: #fff;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.35rem;
}

.filter-submit-btn {
    flex: 1;
    height: 40px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border: none;
    border-radius: 11px;
    font-weight: 800;
    font-size: 0.88rem;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s, transform 0.1s;
}

.filter-submit-btn:active {
    transform: scale(0.98);
}

.filter-clear-btn {
    padding: 0 0.85rem;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fee2e2;
    border-radius: 11px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

@keyframes mobileFilterSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}