/* ⭐ きっかけ */
.page-master #projectTable th:nth-child(5),
.page-master #projectTable td:nth-child(5) {
  min-width: 120px;
  max-width: 150px;
  white-space: normal;
}
.page-master #projectTable th:nth-child(6),
.page-master #projectTable td:nth-child(6) {
  min-width: 250px;
  max-width: 300px;
  white-space: normal;
}
.page-master #projectTable th:nth-child(7),
.page-master #projectTable td:nth-child(7) {
  min-width: 100px;
  max-width: 150px;
  white-space: normal;
}
.page-master #projectTable th:nth-child(10),
.page-master #projectTable td:nth-child(10) {
  min-width: 150px;
  max-width: 200px;
  white-space: normal;
  text-align: left;
}

.page-master #projectTable th:nth-child(12),
.page-master #projectTable td:nth-child(12) {
  min-width: 100px;
  max-width: 150px;
  white-space: normal;
  text-align: left;
}

.page-master #projectTable th:nth-child(13),
.page-master #projectTable td:nth-child(13) {
  min-width: 80px;
  max-width: 100px;
  white-space: normal;
  text-align: left;
}
.page-master #projectTable th:nth-child(14),
.page-master #projectTable td:nth-child(14) {
  min-width: 200px;
  max-width: 250px;
  white-space: normal;
  text-align: left;
}
.page-master #projectTable th:nth-child(8),
.page-master #projectTable td:nth-child(8) {
  text-align: left;
}

/* ⭐ chỉ BPO */
body[data-project-type="bpo"] #projectTable td:nth-child(8),
body[data-project-type="bpo"] #projectTable th:nth-child(8),

/* ⭐ chỉ SONOTA */
body[data-project-type="sonota"] #projectTable td:nth-child(8),
body[data-project-type="sonota"] #projectTable th:nth-child(10) {
  text-align: left;
  white-space: normal;
  line-height: 1.4;
}

body[data-project-type="bpo"] #projectTable td:nth-child(13),
body[data-project-type="bpo"] #projectTable th:nth-child(13),

/* ⭐ chỉ SONOTA */
body[data-project-type="sonota"] #projectTable td:nth-child(13),
body[data-project-type="sonota"] #projectTable th:nth-child(13) {
  min-width: 100px;
  max-width: 150px;
  white-space: normal;
  text-align: left;
}

.page-sonota .col-category,
.page-sonota .col-progress {
  display: none;
}

.page-sonota .field-category,
.page-sonota .field-progress {
  display: none;
}

th[data-sort] {
  cursor: pointer;
  user-select: none;
}

.sort-icon::after {
  content: '⇅';
  font-size: 12px;
  margin-left: 4px;
  color: #aaa;
}

th.sort-asc .sort-icon::after {
  content: '▲';
  color: #333;
}

th.sort-desc .sort-icon::after {
  content: '▼';
  color: #333;
}

.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-content.small {
  width: 320px;
  background: #fff;
  padding: 16px;
  border-radius: 8px;
}

.modal-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* modal edit */
#popup {
  z-index: 1000;
}

/* modal confirm */
#uploadConfirmModal {
  z-index: 2000;
}

/* =========================
 * ⭐ updated project highlight
 * ========================= */

/* =========================
 * ⭐ updated project highlight
 * ========================= */

.page-master #projectTable tr.recent-updated td {
  background: #dff5df !important;
}

/* =========================
 * ⭐ back from detail flash
 * ========================= */

.page-master #projectTable tr.back-highlight td {
  background: #ffe58f !important;
}

.page-master #projectTable tr.back-highlight:hover td {
  background: #ffd666 !important;
}

.page-master #projectTable tr.recent-updated td:first-child {
  box-shadow: inset 4px 0 0 #2e9b45;
}

.page-master #projectTable tr.recent-updated:hover td {
  background: #cfeecf !important;
}

/* =========================
 * Project filter responsive
 * ========================= */

.page-master .toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* ép ランク nằm cùng hàng */
.page-master .toolbar .break-line {
  display: none;
}

/* cụm select không bị co */
.page-master .toolbar select {
  min-width: 140px;
}

/* label không xuống dòng */
.page-master .toolbar label {
  white-space: nowrap;
}

/* laptop nhỏ */
@media (max-width: 1400px) {

  .page-master .toolbar {
    gap: 8px;
  }

  .page-master .toolbar select {
    min-width: 120px;
  }

  /* keyword nhỏ lại chút */
  .page-master .toolbar input[type="text"] {
    width: 160px;
  }
}