/* ============================================================================
   Quản lý xưởng nhôm — thanh lọc và biểu mẫu trên màn hình hẹp
   Tách khỏi app.css để tệp đó giữ dưới ngưỡng 800 dòng. Chỉ chứa quy tắc co giãn
   của `.filters` và `.form__actions`; không đụng tới dữ liệu hay quyền.
   ============================================================================ */

/* Thanh lọc trên điện thoại: mỗi ô chiếm trọn một dòng để nhãn không chen vào ô
   nhập, và mọi ô chạm được đều cao tối thiểu 44px. Chỉ áp trong `.content` để bộ
   chọn xưởng ở topbar giữ bố cục riêng của nó (bộ chọn đó cũng dùng lớp `.filters`
   nhưng phải nằm gọn một hàng). */
@media (max-width: 600px) {
    .content .filters {
        align-items: stretch;
    }

    .content .filters > input,
    .content .filters > select,
    .content .filters > label,
    .content .filters > .button,
    .content .filters > .filters__dates {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
    }

    .content .filters > .filters__label {
        margin-bottom: -4px;
    }

    /* Nhãn có ô đánh dấu: cả dòng là vùng chạm, không chỉ ô vuông 13px. */
    .content .filters > .filters__check {
        display: flex;
        align-items: center;
        gap: 8px;
        min-height: 44px;
    }

    .content .filters > input,
    .content .filters > select,
    .content .filters__dates > input,
    .content .filters > .button {
        min-height: 44px;
    }

    .content .filters > .button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .content .filters > .filters__dates {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .content .filters__dates > input {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
    }

    /* Nhãn dạng chữ ("Lập chứng từ:") chiếm một dòng riêng thay vì chen cạnh nút. */
    .content .filters > span:not(.filters__spacer) {
        flex: 1 1 100%;
    }

    .content .filters__spacer {
        display: none;
    }

    .notice {
        padding: 10px 12px;
    }
}

/* Nút thao tác biểu mẫu trên điện thoại: xếp dọc, mỗi nút trọn chiều rộng và đủ
   cao để chạm; chữ dài như "Lưu và xác nhận nhập kho" không còn bị bóp hoặc tràn. */
@media (max-width: 480px) {
    .form__actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .form__actions .button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 44px;
        text-align: center;
    }
}

/* Khoá nút submit và hiển thị trạng thái đang xử lý (F-TTM-01, VAL-M14-FIX-003). */
.button:disabled,
.button.is-submitting {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}
