/* Container Utama */
.filter-row {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: flex-end;
    border: 1px solid #e8eaf0;
    padding: 16px 20px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Group & Label */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 160px;
}

.filter-group.search-wrapper {
    min-width: 220px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    letter-spacing: 0.01em;
}

/* Wrapper untuk Input Search dengan Ikon */
.search-input-wrapper {
    position: relative;
    width: 100%;
}

.search-input-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 16px;
    pointer-events: none;
    transition: color 0.2s ease;
}

/* Base Form Control (Input & Select) */
.filter-control {
    width: 100%;
    height: 38px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 13px;
    color: #111827;
    background: #ffffff;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

/* Khusus Input Search untuk memberi ruang pada ikon */
.filter-control.search-input {
    padding-left: 36px;
}

/* Styling Khusus Custom Select */
.filter-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-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='%3C%236b7280'%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 10px center;
    background-size: 16px;
    padding-right: 32px;
}

/* Focus & Hover States */
.filter-control:hover {
    border-color: #9ca3af;
}

.filter-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.search-input-wrapper:focus-within i {
    color: #3b82f6;
}

/* ==========================================
   Responsive Styles (Mobile & Tablet)
   ========================================== */

/* Tablet & Mobile (Layar <= 768px) */
@media (max-width: 768px) {
    .filter-row {
        gap: 12px;
        padding: 14px 16px;
        margin-bottom: 16px;
    }

    /* Setiap filter group otomatis mengambil 100% lebar layar */
    .filter-group,
    .filter-group.search-wrapper {
        flex: 1 1 100%;
        min-width: 100%;
    }

    /* Memperbesar tinggi input & font sedikit agar lebih nyaman di-tap jari */
    .filter-control {
        height: 42px;
        font-size: 14px;
    }

    /* Menyesuaikan posisi ikon search di input yang lebih tinggi */
    .search-input-wrapper i {
        font-size: 18px;
    }
}

/* Khusus Mobile Kecil (Layar <= 480px) - Opsional */
@media (max-width: 480px) {

    /* Jika ingin Tanggal Mulai & Tanggal Selesai berdampingan (2 kolom) */
    .filter-group:has(#startDate),
    .filter-group:has(#endDate) {
        flex: 1 1 calc(50% - 6px);
        min-width: calc(50% - 6px);
    }

    /* Custom Filter for Absensi Manual */
    .abs-manual-filter-row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
        padding: 16px 0;
        width: 100%;
        box-sizing: border-box;
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
        background: transparent;
    }

    .abs-manual-filter-input {
        padding: 0 12px;
        height: 42px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        font-size: 0.85rem;
        outline: none;
        color: #475569;
        flex: 1 1 100%;
        min-width: 100%;
        box-sizing: border-box;
        max-width: 100%;
        background: #fff;
    }

    @media (min-width: 500px) {
        .abs-manual-filter-input {
            flex: 1;
            min-width: 140px;
        }
    }
}