/* HỒ SƠ 365 RC254 — soạn hồ sơ nhanh, trạng thái rõ và thao tác an toàn. */

/* Một thanh thao tác duy nhất; bỏ cụm nút trùng ở đầu mục. */
#screenWs #mainPanel > .input-section-top-actions {
  display: none !important;
}

#screenWs #mainPanel .wizard-nav {
  position: sticky !important;
  bottom: 0;
  z-index: 45;
  margin: 18px -18px -18px !important;
  padding: 11px 18px calc(11px + env(safe-area-inset-bottom)) !important;
  border-top: 1px solid #cfded7 !important;
  background: rgba(255, 255, 255, 0.97) !important;
  box-shadow: 0 -10px 28px rgba(7, 65, 45, 0.12) !important;
  backdrop-filter: blur(10px);
}

.rc254-save-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  margin-right: auto;
  padding: 5px 9px;
  border: 1px solid #cbdcd4;
  border-radius: 999px;
  background: #f3f7f5;
  color: #47665a;
  font-size: 10.5px;
  font-weight: 850;
  white-space: nowrap;
}

.rc254-save-state::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.rc254-save-state.is-saving { color: #8a6509; background: #fff8df; border-color: #ead28c; }
.rc254-save-state.is-saved { color: #087044; background: #eaf7ef; border-color: #b9ddc8; }
.rc254-save-state.is-error { color: #a33d34; background: #fff0ed; border-color: #e6b6af; }
.rc254-save-state.is-readonly { color: #5f6e67; background: #eef2f0; border-color: #d5ded9; }

/* Chuyển nhanh giữa hai cách làm việc đã có sẵn. */
#screenWs .panel-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.rc254-mode-switch {
  display: inline-flex;
  gap: 3px;
  margin-left: auto;
  padding: 3px;
  border: 1px solid #c9d9d1;
  border-radius: 10px;
  background: #f3f7f5;
}

.rc254-mode-switch button {
  min-height: 30px;
  padding: 5px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #527065;
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 850;
}

.rc254-mode-switch button.is-active {
  background: #087052;
  color: #fff;
  box-shadow: 0 2px 7px rgba(8, 112, 82, 0.20);
}

/* Trạng thái từng mục giúp người dùng mở đúng việc còn lại trong một lần bấm. */
#screenWs .kb-link {
  grid-template-columns: 25px minmax(0, 1fr) auto;
}

.rc254-step-status {
  align-self: center;
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: #eef2f0;
  color: #6c7c74;
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.rc254-step-status.is-current { background: #e8f3ff; color: #175f9b; }
.rc254-step-status.is-complete { background: #e7f6ed; color: #087044; }
.rc254-step-status.is-review { background: #fff3dc; color: #8a5c08; }

/* Phản hồi bàn phím ngắn gọn, không che trường đang nhập. */
.rc254-shortcut-hint {
  margin: 8px 0 0;
  color: #6a7d73;
  font-size: 10px;
  line-height: 1.45;
}

.rc254-shortcut-hint kbd {
  padding: 1px 5px;
  border: 1px solid #cdd9d3;
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #fff;
  color: #315447;
  font: 800 9px/1.4 system-ui, sans-serif;
}

.rc254-quick-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 9px 11px;
  border: 1px solid #cfe1d8;
  border-radius: 10px;
  background: #f4faf7;
  color: #426257;
  font-size: 10.5px;
}

.rc254-quick-tools b { color: #174735; }
.rc254-quick-tools button {
  margin-left: auto;
  padding: 7px 10px;
  border: 1px solid #98c6b2;
  border-radius: 8px;
  background: #fff;
  color: #086441;
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 850;
}

/* Huy hiệu và hộp thông tin phiên bản. */
#rc254ReleaseBadge {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 100108;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 5px 11px 5px 6px;
  border: 1px solid #82b8a2;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  color: #164b39;
  box-shadow: 0 10px 28px rgba(6, 66, 44, 0.20);
  cursor: pointer;
  font: 700 11px/1.15 system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

#rc254ReleaseBadge .rc254-release-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #076a49;
  color: #fff;
  font-size: 15px;
}

#rc254ReleaseBadge small { display: block; color: #6d7f77; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
#rc254ReleaseBadge strong { display: block; color: #084d35; font-size: 12px; }

.rc254-overlay {
  position: fixed;
  inset: 0;
  z-index: 13080;
  display: none;
  place-items: center;
  padding: 16px;
  background: rgba(8, 27, 21, .68);
}

.rc254-overlay.show { display: grid; }
.rc254-card { width: min(720px, 96vw); max-height: 90vh; overflow: auto; border: 1px solid #cbdcd4; border-radius: 18px; background: #fff; box-shadow: 0 32px 90px rgba(0,0,0,.32); }
.rc254-card header { padding: 21px 23px 17px; border-bottom: 1px solid #e1ebe6; background: linear-gradient(135deg,#f3faf7,#fff); }
.rc254-card header small { color: #087052; font-size: 9px; font-weight: 900; letter-spacing: .09em; }
.rc254-card h2 { margin: 6px 0 0; color: #123e2f; font-size: 23px; }
.rc254-card header p { margin: 6px 0 0; color: #60736a; font-size: 12px; }
.rc254-card-body { padding: 18px 23px 22px; }
.rc254-release-list { display: grid; gap: 8px; }
.rc254-release-item { display: grid; grid-template-columns: 26px minmax(0,1fr); gap: 9px; padding: 10px 11px; border: 1px solid #e0e9e4; border-radius: 10px; }
.rc254-release-item > span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: #e7f5ed; color: #087044; font-weight: 900; }
.rc254-release-item b { display: block; color: #1b3f32; font-size: 12.5px; }
.rc254-release-item em { display: block; margin-top: 2px; color: #687a72; font-size: 11px; font-style: normal; line-height: 1.4; }
.rc254-audit { margin-top: 14px; padding: 10px 12px; border-radius: 9px; background: #f3f8f5; color: #31584a; font-size: 11px; font-weight: 800; }
.rc254-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.rc254-actions button { min-height: 38px; padding: 8px 13px; border: 1px solid #bad0c5; border-radius: 9px; background: #fff; color: #18533d; font-weight: 800; cursor: pointer; }
.rc254-actions .primary { border-color: #087052; background: #087052; color: #fff; }

@media (max-width: 760px) {
  #screenWs #mainPanel .wizard-nav { margin: 16px -14px -14px !important; padding-left: 12px !important; padding-right: 12px !important; }
  #screenWs #mainPanel .wizard-nav .rc254-save-state { grid-column: 1 / -1; justify-self: start; }
  .rc254-mode-switch { width: 100%; margin-left: 0; }
  .rc254-mode-switch button { flex: 1; }
  .rc254-step-status { display: none; }
  #rc254ReleaseBadge { left: 8px; bottom: 76px; }
}

@media print {
  #rc254ReleaseBadge,
  .rc254-overlay,
  .rc254-mode-switch,
  .rc254-save-state,
  .rc254-shortcut-hint { display: none !important; }
}
