.calling-page-container {
    position: relative;
    min-height: 90vh;
    width: 100%;
}

.call-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    margin: 0.75rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.call-status-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.call-status-icon {
    font-size: 1.5rem;
    color: #4ade80;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.call-status-customer {
    font-weight: 600;
    font-size: 0.95rem;
    color: #e2e8f0;
    margin-left: 0.5rem;
}

.content-card {
    padding: 1.25rem !important;
    border-radius: 1rem !important;
    border: 1px solid #e3e3e3;
    box-shadow: 0 1px 0 rgba(0,0,0,.03);
}

.filter-panel {
    padding: 1rem;
    border: 1px solid #e9e9e9;
    border-radius: 1rem;
    background: #fff;
    margin-bottom: 1rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.filter-row {
    margin-bottom: .9rem;
}

.filter-label {
    font-weight: 600;
    margin-bottom: .35rem;
    color: #333;
}

.filter-control {
    position: relative;
}

.clear-x {
    position: absolute;
    right: .6rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: .7;
}

    .clear-x:hover {
        opacity: 1;
    }

.checkbox-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-top: .2rem;
}

.checkbox-text {
    color: #333;
}

.filter-actions {
    display: flex;
    justify-content: center;
    gap: .75rem;
    margin-top: .25rem;
}

.btn-search {
    --rz-primary: #d97706;
    min-width: 140px;
    border-radius: .6rem !important;
}

.btn-clear {
    min-width: 140px;
    border-radius: .6rem !important;
}

.orange-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #d97706;
    color: #fff;
    padding: .75rem 1rem;
    border-radius: .6rem;
    margin: .25rem 0 .75rem 0;
    font-weight: 600;
}

.grid-wrap {
    padding-top: .25rem;
}

.call-btn {
    border-radius: .6rem !important;
    width: 56px;
    height: 40px;
}

/* Header สีครีมเหมือนภาพ */
.rz-grid thead th {
    background: #f3e5d6;
    font-weight: 700;
}

/* ===== Compact Filter: label + control in one line ===== */
.filter-panel .filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px; /* ลดระยะห่างแนวตั้ง */
}

/* ความกว้าง label คงที่ เพื่อให้ control เรียงสวย */
.filter-panel .filter-label {
    flex: 0 0 170px; /* ปรับได้: 150-200 ตาม UI */
    white-space: nowrap; /* ไม่ให้ตัดบรรทัด */
    font-size: 13px;
    opacity: .9;
}

/* ให้ control กินพื้นที่ที่เหลือ */
.filter-panel .filter-control {
    flex: 1 1 auto;
    min-width: 0; /* สำคัญมากกับ flex + dropdown/textbox */
    position: relative; /* เผื่อปุ่ม clear-x absolute */
}

    /* ปรับ clear-x ให้เข้าที่ (ถ้าใช้ของเดิมอยู่แล้ว ให้แค่ตรวจว่าไม่ชน) */
    .filter-panel .filter-control .clear-x,
    .filter-panel .filter-control .clear-x:focus {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
    }

/* checkbox row ให้กินเต็มแถว */
.filter-panel .filter-row.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

/* ปุ่มค้นหา/ล้างไม่ต้องกินความสูงมาก */
.filter-panel .filter-actions {
    margin-top: 6px;
}

/* มือถือ/จอแคบ: กลับเป็นแนวตั้งเพื่อไม่ให้แน่นเกิน */
@media (max-width: 900px) {
    .filter-panel .filter-row {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .filter-panel .filter-label {
        flex: none;
        width: auto;
        white-space: normal;
    }
}

.rz-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
