/* RTM OS — nhập ngược từ Excel (js/rtm-import.js)
   Modal gắn vào document.body ⇒ KHÔNG dùng tiền tố #workspace-rtm-os và không
   dùng biến --primary (cùng lý do đã ghi ở đầu rtm-po.css / rtm-health.css). */

/* ── cụm nút Xuất / Nhập trên thanh bước ─────────────────────────────────── */
/* Thanh bước đã có flex-wrap, và .rtm-step-cta vốn giữ margin-left:auto. Chuyển
   cái auto đó sang cụm công cụ để Xuất/Nhập đứng ngay trước nút hành động chính;
   flex:0 0 auto để ở 1280px hai nút xuống dòng nguyên cụm chứ không bị bóp chữ. */
#workspace-rtm-os .rtm-step-tools { display: inline-flex; gap: 6px; align-items: center; margin-left: auto; padding-right: 8px; flex: 0 0 auto; }
#workspace-rtm-os .rtm-step-tools .rtm-mini-btn { white-space: nowrap; }
#workspace-rtm-os .rtm-stepper .rtm-step-cta { margin-left: 0; }

/* ── modal ───────────────────────────────────────────────────────────────── */
.rtmi-ov .rtmi-m { width: 1120px; max-width: calc(100vw - 40px); }
.rtmi-ov .rtm-modal-b { max-height: 78vh; overflow: auto; }

.rtmi-note {
  display: flex; gap: 9px; align-items: flex-start; background: #F5F6F8; border: 1px solid #E6E9EF;
  border-left: 3px solid #579BFC; border-radius: 8px; padding: 10px 13px; margin: 0 0 12px;
  font-size: 12.5px; color: #323338; line-height: 1.55;
}
.rtmi-drop {
  border: 2px dashed #D0D4E4; border-radius: 8px; background: #FAFBFD; padding: 26px 16px;
  text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
}
.rtmi-drop:hover, .rtmi-drop.on { border-color: #0073EA; background: #F5FAFF; }
.rtmi-drop-t { font-size: 14px; font-weight: 700; color: #323338; display: flex; align-items: center; justify-content: center; gap: 8px; }
.rtmi-drop-s { font-size: 12px; color: #676879; margin-top: 5px; }
.rtmi-alt { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; margin: 10px 0 4px; }
.rtmi-sm { font-size: 11.5px; color: #676879; }

.rtmi-load, .rtmi-err { display: flex; align-items: center; gap: 9px; padding: 20px 4px; color: #676879; font-size: 13px; }
.rtmi-err { color: #9F1239; background: #FCE8EB; border: 1px solid #F5C2CB; border-radius: 8px; padding: 12px 14px; }

.rtmi-h { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: #9699A6; font-weight: 700; margin: 16px 0 7px; }
.rtmi-count { font-size: 13px; color: #323338; margin: 0 0 9px; font-variant-numeric: tabular-nums; }
.rtmi-count b { font-variant-numeric: tabular-nums; }
.rtmi-count b.ok { color: #0E9F90; }
.rtmi-count b.bad { color: #E2445C; }

.rtmi-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.rtmi-f { display: flex; flex-direction: column; gap: 3px; flex: 1 1 220px; }
.rtmi-f span { font-size: 11.5px; color: #676879; font-weight: 700; }
.rtmi-f select { border: 1px solid #D0D4E4; border-radius: 4px; padding: 5px 8px; font-size: 12.5px; background: #fff; color: #323338; }

.rtmi-warn {
  background: #FCE8EB; border: 1px solid #F5C2CB; border-radius: 8px; padding: 9px 12px;
  margin: 0 0 10px; font-size: 12.5px; color: #9F1239; line-height: 1.6;
}
.rtmi-only { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #323338; margin: 0 0 8px; cursor: pointer; }
.rtmi-only input { width: auto; }

.rtmi-tw { max-height: 380px; overflow: auto; border: 1px solid #E6E9EF; border-radius: 8px; background: #fff; }
.rtmi-t { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.rtmi-t thead th {
  position: sticky; top: 0; z-index: 1; background: #F5F6F8; color: #676879; font-weight: 700;
  text-align: left; padding: 6px 10px; border-bottom: 1px solid #E6E9EF;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .3px; white-space: nowrap;
}
.rtmi-t td { padding: 5px 10px; border-bottom: 1px solid #F1F3F7; }
.rtmi-t td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rtmi-t td.mut { color: #9699A6; }
.rtmi-t tr.red { background: #FCE8EB; }
.rtmi-t tr.yel { background: #FFF4E5; }
.rtmi-t tr.doi { background: #F0F9FF; }
.rtmi-t small.up { color: #0E9F90; font-weight: 700; }
.rtmi-t small.dn { color: #E2445C; font-weight: 700; }
.rtmi-ly { max-width: 230px; font-size: 11.5px; color: #676879; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.rtmi-flag { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 99px; white-space: nowrap; }
.rtmi-flag.red { background: #E2445C; color: #fff; }
.rtmi-flag.yel { background: #FDAB3D; color: #fff; }
.rtmi-flag.ok { background: #E5F9F0; color: #0E9F90; }
.rtmi-flag.mut { background: #F1F3F7; color: #9699A6; }

.rtmi-f2 { display: flex; align-items: center; gap: 10px; justify-content: flex-end; margin-top: 12px; padding-top: 11px; border-top: 1px solid #E6E9EF; }
.rtmi-ov .rtm-mini-btn {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
  padding: 5px 11px; border-radius: 4px; border: 1px solid #0073EA; background: #fff; color: #0073EA; cursor: pointer;
}
.rtmi-ov .rtm-mini-btn:hover { background: #F5FAFF; }
.rtmi-ov .rtm-btn-pri {
  background: #0073EA; border: 1px solid #0073EA; color: #fff; font-weight: 700;
  font-size: 13px; padding: 7px 16px; border-radius: 4px; cursor: pointer;
}
.rtmi-ov .rtm-btn-pri:hover:not(:disabled) { background: #0060B9; }
.rtmi-ov .rtm-btn-pri:disabled { opacity: .5; cursor: default; }
.rtmi-ov .ic { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; width: 16px; height: 16px; }
.rtmi-ov .ic.s14 { width: 14px; height: 14px; }
