/* ===== Kiểu dùng chung mọi trang (khách, nhân viên, laptop quầy) — luật BAN-DO mục 0b =====
   Hộp thông báo (SweetAlert2): không hiệu ứng nảy / phóng to, biểu tượng nhỏ đứng yên một màu,
   phông Inter, chỉ mờ dần 0,15 s. Nạp TRƯỚC css riêng của từng trang. */

:root {
    --noir-den: #18181b; --noir-chu: #18181b; --noir-phu: #52525b; --noir-nhat: #a1a1aa;
    --noir-vien: #e4e4e7; --noir-nen-phu: #f4f4f5; --noir-do: #ef4444;
    --noir-bo-nho: 6px; --noir-bo: 10px; --noir-bo-lon: 16px;
}

/* --- Nút chưa đặt màu: iPhone tự tô chữ xanh (vd "+ Thêm máy") -> mặc định chữ đen. Nút có class riêng vẫn theo class --- */
button { color: var(--noir-chu); }
/* Nút / ô nhập không tự nhận phông của trang: đặt Inter (chỗ nào ghi phông riêng thì vẫn theo chỗ đó) */
button, input, select, textarea { font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif; }

/* --- Hộp giữa màn --- */
.swal2-container { z-index: 5000 !important; }
.swal2-popup { font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif !important; }
.swal2-popup:not(.swal2-toast) { border-radius: var(--noir-bo-lon) !important; padding: 24px !important; width: min(400px, calc(100vw - 32px)) !important; }
.swal2-popup:not(.swal2-toast) .swal2-title { font-size: 20px !important; font-weight: 700 !important; color: var(--noir-chu) !important; padding: 0 !important; margin: 0 0 8px !important; line-height: 1.3 !important; }
.swal2-popup:not(.swal2-toast) .swal2-html-container { font-size: 14px !important; line-height: 1.5 !important; color: var(--noir-phu) !important; margin: 0 !important; padding: 0 !important; }
.swal2-actions { gap: 8px !important; margin: 16px 0 0 !important; width: 100% !important; flex-wrap: nowrap !important; }
.swal2-styled { font-family: inherit !important; border-radius: var(--noir-bo) !important; font-weight: 600 !important; font-size: 16px !important;
    box-shadow: none !important; padding: 12px 16px !important; min-height: 44px; margin: 0 !important; flex: 1 1 0; }
.swal2-styled:focus { box-shadow: 0 0 0 2px rgba(24, 24, 27, .25) !important; }
.swal2-styled.swal2-confirm { background: var(--noir-den) !important; color: #fff !important; }
.swal2-styled.swal2-deny { background: var(--noir-do) !important; color: #fff !important; }
.swal2-styled.swal2-cancel { background: #fff !important; color: var(--noir-chu) !important; border: 1px solid var(--noir-vien) !important; }
.swal2-input, .swal2-select, .swal2-textarea { font-family: inherit !important; font-size: 16px !important; border-radius: var(--noir-bo) !important;
    border: 1px solid #d4d4d8 !important; box-shadow: none !important; margin: 12px 0 0 !important; width: 100% !important; box-sizing: border-box; }
.swal2-input:focus, .swal2-textarea:focus { border-color: var(--noir-den) !important; box-shadow: 0 0 0 2px rgba(24, 24, 27, .08) !important; }
.swal2-validation-message { font-size: 14px !important; background: var(--noir-nen-phu) !important; color: var(--noir-chu) !important; }
.swal2-close { font-family: inherit !important; color: var(--noir-nhat) !important; }

/* Không hiệu ứng: chỉ mờ dần */
.swal2-show { animation: noir-hien .15s ease-out !important; }
.swal2-hide { animation: noir-an .1s ease-in forwards !important; }
.swal2-backdrop-show { animation: none !important; }
@keyframes noir-hien { from { opacity: 0 } to { opacity: 1 } }
@keyframes noir-an { from { opacity: 1 } to { opacity: 0 } }

/* Biểu tượng: nhỏ, nét mảnh, đứng yên, một màu (đỏ chỉ cho lỗi) */
.swal2-icon { width: 44px !important; height: 44px !important; margin: 0 auto 16px !important; border-width: 2px !important; zoom: 1 !important; }
.swal2-icon .swal2-icon-content { font-size: 28px !important; font-weight: 500 !important; }
.swal2-icon, .swal2-icon * { animation: none !important; }
.swal2-icon.swal2-warning, .swal2-icon.swal2-info, .swal2-icon.swal2-question { border-color: var(--noir-den) !important; color: var(--noir-den) !important; }
.swal2-icon.swal2-error { border-color: var(--noir-do) !important; color: var(--noir-do) !important; }
.swal2-icon.swal2-error [class^='swal2-x-mark-line'] { background-color: var(--noir-do) !important; height: 2px !important; width: 24px !important; top: 20px !important; }
.swal2-icon.swal2-error [class^='swal2-x-mark-line'][class$='left'] { left: 8px !important; }
.swal2-icon.swal2-error [class^='swal2-x-mark-line'][class$='right'] { right: 8px !important; }
/* Hộp "đã xong": KHÔNG biểu tượng ✓ (user ghét dấu tick; dấu vẽ lại bị đứt chỗ nối trên iPhone, 24/10/2026).
   Toast giữ chấm trạng thái (::before). */
.swal2-popup:not(.swal2-toast) .swal2-icon.swal2-success { display: none !important; }
.swal2-toast .swal2-icon.swal2-success { display: none !important; }
.swal2-icon.swal2-success { border-color: var(--noir-den) !important; color: var(--noir-den) !important; }
.swal2-icon.swal2-success [class^='swal2-success-line'] { background-color: var(--noir-den) !important; height: 2px !important; }
.swal2-icon.swal2-success .swal2-success-ring { border: 2px solid var(--noir-den) !important; top: -2px !important; left: -2px !important; width: 100% !important; height: 100% !important; }
.swal2-icon.swal2-success [class^='swal2-success-circular-line'], .swal2-icon.swal2-success .swal2-success-fix { display: none !important; }
.swal2-icon.swal2-success .swal2-success-line-tip { top: 23px !important; left: 9px !important; width: 10px !important; }
.swal2-icon.swal2-success .swal2-success-line-long { top: 19px !important; right: 8px !important; width: 20px !important; }

/* --- Thông báo nhỏ tự tắt (toast): thẻ trắng gọn vừa chữ, chấm nhỏ báo loại tin, không thanh đếm giờ --- */
.swal2-popup.swal2-toast { width: auto !important; max-width: min(360px, calc(100vw - 32px)) !important; display: flex !important; align-items: center !important; gap: 8px !important;
    background: #fff !important; color: var(--noir-chu) !important; border: 1px solid var(--noir-vien) !important; border-radius: var(--noir-bo) !important;
    padding: 8px 16px !important; box-shadow: 0 8px 24px rgba(24, 24, 27, .12) !important; }
.swal2-popup.swal2-toast::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--noir-den); }
.swal2-popup.swal2-toast.swal2-icon-error::before { background: var(--noir-do); }
.swal2-popup.swal2-toast .swal2-title { color: var(--noir-chu) !important; font-size: 14px !important; font-weight: 500 !important; margin: 0 !important; padding: 0 !important; text-align: left !important; }
.swal2-popup.swal2-toast .swal2-icon, .swal2-popup.swal2-toast .swal2-timer-progress-bar { display: none !important; }

/* Ô nhập trên điện thoại: tối thiểu 16px, iPhone khỏi tự phóng to trang khi chạm vào ô */
@media (hover: none) and (pointer: coarse) {
    input[type="text"], input[type="tel"], input[type="number"], input[type="password"], input[type="search"], input[type="email"], select, textarea { font-size: 16px !important; }
}

/* --- Dòng mở / đóng (details > summary): iPhone vẽ dấu ▶ mặc định thành emoji xanh -> bỏ, thay mũi tên nét cùng màu chữ (24/10/2026) --- */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; vertical-align: 2px;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); }
details[open] > summary::after { transform: rotate(45deg); vertical-align: 4px; }
