/* Ép layout desktop */
body, #container {
    min-width: 1024px;
}

/* Cho phép cuộn ngang nếu nội dung rộng hơn */
html, body {
    overflow-x: auto;
}

/* Ngăn responsive tự ẩn sidebar khi màn hình hẹp */
@media (max-width: 1024px) {
    #nav-sidebar {
        transform: none !important;
    }
}

/* Màu nền cho từng trạng thái */
tr.row-success {
    background-color: #d4edda !important; /* xanh nhạt */
}
tr.row-danger {
    background-color: #f8d7da !important; /* đỏ nhạt */
}
tr.row-warning {
    background-color: #fff3cd !important; /* vàng nhạt */
}

/* Làm mờ và disable input trong list view khi is_found = False */
tr.not-found td.field-condition_actual input,
tr.not-found td.field-status_actual input,
tr.not-found td.field-condition_actual select,
tr.not-found td.field-status_actual select {
    color: #999;
    background-color: #f5f5f5;
    pointer-events: none; /* không cho click/chỉnh sửa */
}

/* Icon calendar cho Flatpickr */
input.flatpickr-date, input.vDateField {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 18px;
    padding-right: 32px !important;
}

/* Thu nhỏ textarea xuống 1 dòng cho configuration, notes, description */
.field-configuration textarea,
.field-notes textarea,
.field-license textarea,
.field-description textarea {
    height: 2.5em !important;
    min-height: 2.5em !important;
    resize: vertical !important;
}

/* Expand/collapse cho sidebar menu */
#nav-sidebar details {
    margin-bottom: 4px;
}
#nav-sidebar summary {
    cursor: pointer;
    padding: 6px 8px;
    font-weight: bold;
    border-bottom: 1px solid var(--hairline-color);
}
