/* RepairFlow V1.4 — Professional Compact UI
   Mục tiêu: giảm khoảng trống, tăng mật độ thông tin nhưng giữ vùng bấm và chữ dễ đọc. */

:root{
  --v14-gap:10px;
  --v14-radius:10px;
}

/* Nhịp trang gọn hơn trên desktop. */
@media (min-width:901px){
  .content{padding-top:16px;padding-bottom:28px}
  .page-heading{margin-bottom:12px}
  .page-heading .eyebrow{margin-bottom:3px}
  .page-heading h1{font-size:23px;line-height:1.2;letter-spacing:-.02em}
  .page-heading>p:not(.eyebrow){margin-top:4px;font-size:12px;line-height:1.4}
  .panel{border-radius:var(--v14-radius)}
}

/* ===== Báo lỗi sản phẩm: one-screen desktop layout ===== */
body[data-page="reports.create"] .content{padding-top:12px}
body[data-page="reports.create"] .report-page-heading{margin-bottom:9px}
body[data-page="reports.create"] .report-page-heading .eyebrow{display:none}
body[data-page="reports.create"] .report-page-heading h1{margin:0;font-size:22px}
body[data-page="reports.create"] .report-page-heading>p{margin:3px 0 0;color:var(--rf-muted);font-size:11.5px}
body[data-page="reports.create"] .report-create-shell{max-width:1380px}
body[data-page="reports.create"] .report-create-form{gap:10px}
body[data-page="reports.create"] .report-section{padding:12px 14px}
body[data-page="reports.create"] .report-section-heading{gap:9px;margin-bottom:10px;padding:0}
body[data-page="reports.create"] .report-section-heading h2{font-size:14px;line-height:1.25}
body[data-page="reports.create"] .report-section-heading p{margin-top:2px;font-size:10.5px;line-height:1.35}
body[data-page="reports.create"] .report-section-icon{width:26px;height:26px;border-radius:7px;font-size:9px}

/* Sản phẩm: Serial/quét và lựa chọn sản phẩm nằm cùng hàng, ít khoảng trống. */
body[data-page="reports.create"] .report-product-grid{grid-template-columns:minmax(420px,.95fr) minmax(420px,1.05fr);gap:12px}
body[data-page="reports.create"] .report-serial-pane{grid-template-columns:86px minmax(0,1fr);gap:9px;padding-right:12px}
body[data-page="reports.create"] .report-create-form .scan-camera-trigger{height:54px;padding:6px 8px;gap:3px;border-radius:8px;font-size:11px}
body[data-page="reports.create"] .report-create-form .scan-camera-trigger .ui-icon{width:18px;height:18px}
body[data-page="reports.create"] .report-serial-pane input{min-height:36px;margin-top:3px;padding:7px 9px;font-size:12.5px}
body[data-page="reports.create"] .product-picker-trigger{min-height:54px;padding:7px 9px;border-radius:8px}
body[data-page="reports.create"] .product-picker-trigger-copy small{font-size:9px}
body[data-page="reports.create"] .product-picker-trigger-copy strong{margin-top:2px;font-size:12px}
body[data-page="reports.create"] .product-picker-trigger>.button{min-height:34px;padding:6px 9px;font-size:11px}
body[data-page="reports.create"] .product-select-row .resolved-product{margin-top:6px;padding:6px 9px}
body[data-page="reports.create"] .resolved-product strong{font-size:11.5px}
body[data-page="reports.create"] .resolved-product span{font-size:10px}
body[data-page="reports.create"] .scan-message{margin-top:7px;padding:7px 9px;font-size:11px}

/* Nội dung chính: phần thông tin rộng hơn, ảnh/video gọn hơn. */
body[data-page="reports.create"] .report-details-grid{grid-template-columns:minmax(0,1.22fr) minmax(330px,.78fr);gap:10px;align-items:stretch}
body[data-page="reports.create"] .report-details-grid label{font-size:11px}
body[data-page="reports.create"] .report-details-grid select,
body[data-page="reports.create"] .report-details-grid textarea{min-height:36px;margin-top:3px;padding:7px 9px;font-size:12px}
body[data-page="reports.create"] .report-severity-block{margin-top:9px}
body[data-page="reports.create"] .report-severity-block h3{margin-bottom:6px;font-size:11px}
body[data-page="reports.create"] .report-severity-block .severity-options{gap:6px}
body[data-page="reports.create"] .report-severity-block .severity-options>label>span{min-height:34px;padding:6px 8px;font-size:11px}
body[data-page="reports.create"] .report-defect-content{margin-top:10px;padding-top:9px}
body[data-page="reports.create"] .report-subsection-heading{margin-bottom:7px}
body[data-page="reports.create"] .report-subsection-heading .report-section-icon{width:24px;height:24px}
body[data-page="reports.create"] .report-notes-label{margin-top:7px}
body[data-page="reports.create"] .report-notes-label textarea{min-height:48px;max-height:76px;resize:vertical}
body[data-page="reports.create"] .field-hint{font-size:9.5px}

/* Ảnh/video: bỏ vùng thả quá cao, ưu tiên hai hành động Camera/Thư viện. */
body[data-page="reports.create"] .report-attachment-picker{min-height:178px;padding:12px 10px;gap:7px;border-style:dashed;background:#fbfdff}
body[data-page="reports.create"] .report-attachment-picker .upload-icon{width:34px;height:34px;margin:0}
body[data-page="reports.create"] .report-attachment-picker .upload-icon .ui-icon{width:20px;height:20px}
body[data-page="reports.create"] .report-attachment-picker>b{font-size:12px}
body[data-page="reports.create"] .report-attachment-picker>small{font-size:9.5px;line-height:1.35;color:var(--rf-muted)}
body[data-page="reports.create"] .attachment-actions{gap:7px;margin:1px 0}
body[data-page="reports.create"] .attachment-actions .button{min-height:34px;padding:6px 9px;font-size:10.5px}
body[data-page="reports.create"] .file-summary{font-size:10px}
body[data-page="reports.create"] .file-previews{max-height:88px;overflow:auto}

/* Thanh gửi gọn và bám đáy, không che nội dung. */
body[data-page="reports.create"] .report-submit-row{bottom:8px;min-height:48px;padding:7px 9px;border-radius:9px;box-shadow:0 5px 18px rgba(15,23,42,.10)}
body[data-page="reports.create"] .report-submit-row>span{font-size:10.5px}
body[data-page="reports.create"] .report-submit-row .button{min-height:36px;padding:7px 12px;font-size:11.5px}

/* Bộ chọn sản phẩm: Model luôn đứng trước, danh sách mã là bước kế tiếp. */
body[data-page="reports.create"] .product-picker-dialog{width:min(780px,calc(100vw - 24px));border-radius:12px}
body[data-page="reports.create"] .product-picker-head{padding:13px 15px}
body[data-page="reports.create"] .product-picker-head h2{font-size:17px}
body[data-page="reports.create"] .product-picker-head p{font-size:11px}
body[data-page="reports.create"] .product-picker-form{grid-template-columns:220px minmax(0,1fr);gap:10px 12px;padding:12px 15px;max-height:calc(88dvh - 132px)}
body[data-page="reports.create"] .product-picker-form>label{margin:0}
body[data-page="reports.create"] .product-picker-form select,
body[data-page="reports.create"] .product-picker-form input[type="search"]{min-height:36px;margin-top:3px;font-size:12px}
body[data-page="reports.create"] .product-code-picker{grid-column:1/-1;margin:0}
body[data-page="reports.create"] .product-picker-form .product-choice-grid{max-height:290px}
body[data-page="reports.create"] .product-choice-body{min-height:58px;padding:7px 9px}
body[data-page="reports.create"] .product-picker-actions{padding:9px 15px}

/* Tablet/mobile: giữ vùng chạm đủ lớn và chuyển về một cột. */
@media(max-width:900px){
  body[data-page="reports.create"] .content{padding-top:10px}
  body[data-page="reports.create"] .report-page-heading{margin-bottom:8px}
  body[data-page="reports.create"] .report-product-grid,
  body[data-page="reports.create"] .report-details-grid{grid-template-columns:1fr}
  body[data-page="reports.create"] .report-serial-pane{grid-template-columns:88px minmax(0,1fr);padding:0 0 10px;border-right:0;border-bottom:1px solid var(--rf-border)}
  body[data-page="reports.create"] .report-create-form .scan-camera-trigger,
  body[data-page="reports.create"] .product-picker-trigger{min-height:54px}
  body[data-page="reports.create"] .report-attachment-picker{min-height:168px}
  body[data-page="reports.create"] .product-picker-form{grid-template-columns:1fr}
  body[data-page="reports.create"] .product-code-picker{grid-column:1}
}
@media(max-width:600px){
  body[data-page="reports.create"] .report-page-heading h1{font-size:20px}
  body[data-page="reports.create"] .report-page-heading>p{font-size:10.5px}
  body[data-page="reports.create"] .report-section{padding:11px}
  body[data-page="reports.create"] .report-section-heading p{display:none}
  body[data-page="reports.create"] .report-serial-pane{grid-template-columns:72px minmax(0,1fr)}
  body[data-page="reports.create"] .report-create-form .scan-camera-trigger span{display:block;font-size:9.5px}
  body[data-page="reports.create"] .report-severity-block .severity-options{grid-template-columns:repeat(3,minmax(0,1fr))}
  body[data-page="reports.create"] .severity-options b{font-size:10px}
  body[data-page="reports.create"] .attachment-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}
  body[data-page="reports.create"] .attachment-actions .button{justify-content:center}
  body[data-page="reports.create"] .report-submit-row{bottom:calc(72px + env(safe-area-inset-bottom));gap:7px}
  body[data-page="reports.create"] .report-submit-row>span{display:none}
}
