@font-face {
  font-family: 'Roboto';
  src: url('/fonts/roboto-regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'Roboto';
  src: url('/fonts/roboto-medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: 'Roboto';
  src: url('/fonts/roboto-bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

* {
  font-family: 'Roboto', sans-serif;
}

*, *::before, *::after, html, body, button, input, select, textarea {
  font-family: 'Roboto', sans-serif !important;
}

/**
 * THI DUA VKSND LAO CAI - PHONG CACH HOANG GIA CHUAN HOA CLASS
 * File CSS tap trung thay the toan bo Inline Styles
 */

/* ═══ 1. CONG THUC CHAM DIEM ══════════════════════════════════════════════ */
.badge-formula-name {
  color: #dc2626;
  font-weight: 800;
  font-size: 13.2px;
  margin-bottom: 4px;
  display: block;
}

.box-formula-content {
  color: #1e3a8a;
  font-weight: 500;
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  line-height: 1.4;
  word-break: break-word;
  display: block;
}

/* ═══ 2. O NHAP LIEU SO PHANG PHIU ════════════════════════════════════════ */
.input-thidua-number {
  width: 48px;
  padding: 3px 6px;
  border: 1.5px solid #cbd5e1;
  border-radius: 4px;
  font-size: 13.2px;
  font-weight: 600;
  text-align: right;
  outline: none;
  transition: all .2s;
  background-color: #ffffff;
}

.input-thidua-number:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,.15);
}

/* Triet tieu hoan toan 2 mui ten tang giam so */
.input-thidua-number::-webkit-outer-spin-button,
.input-thidua-number::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.input-thidua-number,
input[type=number] {
  -moz-appearance: textfield;
}

/* O Tong bi khoa muc tieu */
.input-tong-locked {
  background-color: #f1f5f9 !important;
  cursor: not-allowed !important;
  color: #1e3a8a !important;
  font-weight: 700 !important;
  border-color: #cbd5e1;
}

/* O nhap lieu bi disable do khoa cuoi nam hoac da tham dinh */
.input-thidua-disabled {
  background-color: #f1f5f9 !important;
  cursor: not-allowed !important;
  color: #64748b !important;
}

/* ═══ 3. CAC COT BANG GRID TOI UU DO RONG ══════════════════════════════════ */
.col-stt {
  width: 50px;
  text-align: center;
  font-weight: 700;
  color: #0f2b5c;
}

.col-stt-sm {
  width: 44px;
  text-align: center;
}

.col-stt-lc {
  width: 70px;
  text-align: center;
  font-weight: 700;
  color: #0f2b5c;
}

.col-stt-tc {
  width: 90px;
  text-align: center;
  color: #64748b;
  font-weight: 600;
}

.col-tieu-chi {
  min-width: 220px;
  text-align: left;
}

.col-diem-goc {
  width: 60px;
  text-align: center;
  font-weight: 700;
  color: #0284c7;
  font-size: 13.2px;
}

.col-cach-tinh {
  min-width: 160px;
  text-align: left;
}

.col-nhap-lieu {
  width: 155px;
  text-align: center;
}

.col-tu-cham {
  width: 65px;
  text-align: center;
  font-weight: 800;
  font-size: 13.2px;
  color: #1e3a8a;
}

.col-minh-chung {
  width: 130px;
  text-align: center;
}

.col-ghi-chu {
  min-width: 140px;
  text-align: left;
}

.col-trang-thai {
  width: 90px;
  text-align: center;
}

.col-tham-dinh-header {
  min-width: 130px;
  background: #831843 !important;
  color: #fff !important;
  text-align: center;
}

.col-ly-do-header {
  width: 130px;
  background: #831843 !important;
  color: #fff !important;
}

.col-kq-header {
  width: 70px;
  background: #831843 !important;
  color: #fff !important;
  text-align: center;
}

.col-thao-tac {
  width: 85px;
  text-align: center;
  white-space: nowrap;
}

.col-nhom-don-vi {
  width: 150px;
  text-align: left;
}

/* ═══ 4. DINH DANG BANG PHANG GRID BO VIEN XANH MUOT ══════════════════════ */
.grid-container-thidua {
  overflow-x: auto;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(15,43,92,.06);
}

.table-thidua-royal {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.table-thidua-royal thead th {
  background: linear-gradient(135deg, #091e42 0%, #0f2b5c 100%);
  color: #ffffff;
  padding: 11px 8px;
  font-weight: 700;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,.15);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 5;
}

.table-thidua-royal thead th:last-child {
  border-right: none;
}

.table-thidua-royal tbody tr {
  border-bottom: 1px solid #e2e8f0;
  transition: background .12s;
}

.table-thidua-royal tbody tr:nth-child(even) {
  background: #f8fafc;
}

.table-thidua-royal tbody tr:hover {
  background: #f1f7ff;
}

.table-thidua-royal tbody td {
  padding: 8px;
  vertical-align: middle;
  border-right: 1px solid #e2e8f0;
}

.table-thidua-royal tbody td:last-child {
  border-right: none;
}

/* ═══ 5. TIEN ICH CLASS THAY THE TOAN BO INLINE STYLES ═════════════════════ */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }
.nowrap { white-space: nowrap !important; }
.d-none { display: none !important; }
.d-flex { display: flex !important; }

.text-muted-italic {
  color: #94a3b8 !important;
  font-style: italic !important;
  font-size: 13.1px !important;
}

.text-empty-table {
  text-align: center !important;
  padding: 35px !important;
  color: #94a3b8 !important;
  font-weight: 600 !important;
}

.text-score-diem {
  text-align: center !important;
  font-weight: 700 !important;
  color: #0284c7 !important;
  font-size: 13.2px !important;
}

.text-score-tu-cham {
  text-align: center !important;
  font-weight: 800 !important;
  font-size: 15px !important;
  color: #1e3a8a !important;
  
}

.score-highlight-red {
  color: #dc2626 !important;
  font-size: 17px !important;
  font-weight: 800 !important;
}

/* Button & Upload tags */
.btn-upload-pdf-tag {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13.1px;
  font-weight: 700;
  color: #0f2b5c;
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  padding: 3px 8px;
  border-radius: 5px;
  user-select: none;
}

.btn-upload-pdf-disabled {
  cursor: not-allowed;
  opacity: 0.8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13.1px;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  padding: 3px 8px;
  border-radius: 5px;
  user-select: none;
}

.btn-delete-pdf-locked {
  opacity: .5;
  cursor: not-allowed !important;
}

.btn-reopen-appraisal {
  background: #fff;
  border: 1.5px solid #cbd5e1;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13.2px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
}

/* Flex utilities */
.pdf-info-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-icon-header {
  font-size: 20px;
  flex-shrink: 0;
}

.header-title-main {
  font-size: 19px;
  font-weight: 800;
  color: #0f2b5c;
  margin: 0;
}

.header-sub-desc {
  font-size: 12.5px;
  color: #64748b;
  margin-top: 3px;
}

.header-flex-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-action-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.banner-icon-lg {
  font-size: 26px;
}

.banner-icon-xl {
  font-size: 28px;
}

.banner-title-text {
  font-size: 14.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.banner-desc-text {
  font-size: 13.2px;
  font-weight: 500;
  margin-top: 2px;
}

/* Status banners */
.banner-final-locked {
  background: #fef2f2;
  border: 1.5px solid #f87171;
  border-left: 6px solid #dc2626;
  border-radius: 10px;
  padding: 14px 20px;
  margin-bottom: 20px;
  align-items: center;
  gap: 14px;
  color: #991b1b;
  box-shadow: 0 2px 8px rgba(220,38,38,.12);
}

.banner-return-warning {
  background: #fff7ed;
  border: 1.5px solid #fb923c;
  border-left: 6px solid #ea580c;
  border-radius: 10px;
  padding: 14px 20px;
  margin-bottom: 20px;
  align-items: center;
  gap: 14px;
  color: #9a3412;
  box-shadow: 0 2px 8px rgba(234,88,12,.12);
}

.banner-periodic-info {
  background: #eff6ff;
  border: 1.5px solid #93c5fd;
  border-left: 6px solid #2563eb;
  border-radius: 10px;
  padding: 14px 20px;
  margin-bottom: 20px;
  align-items: center;
  gap: 14px;
  color: #1e40af;
  box-shadow: 0 2px 8px rgba(37,99,235,.12);
}

.banner-admin-finalized {
  background: #eff6ff;
  border: 1.5px solid #93c5fd;
  border-left: 6px solid #1e3a8a;
  border-radius: 10px;
  padding: 14px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #1e3a8a;
  box-shadow: 0 2px 8px rgba(30,58,138,.12);
}

.btn-send-final-locked {
  background: #b91c1c !important;
  border-color: #ef4444 !important;
  cursor: not-allowed !important;
}

.badge-status-da-nop {
  background: #fef2f2 !important;
  color: #991b1b !important;
  border: 1px solid #f87171 !important;
  font-weight: 700 !important;
}

.badge-status-tra-lai {
  background: #fff7ed !important;
  color: #c2410c !important;
  border: 1px solid #fdba74 !important;
  font-weight: 700 !important;
}

.badge-status-dinh-ky {
  background: #dcfce7 !important;
  color: #15803d !important;
  border: 1px solid #86efac !important;
  font-weight: 700 !important;
}

.badge-status-chua-gui {
  background: #f1f5f9 !important;
  color: #64748b !important;
  border: 1px solid #cbd5e1 !important;
}

.badge-status-da-td {
  background: #1e3a8a !important;
  color: #fff !important;
  border: 1px solid #1e40af !important;
}

.badge-status-dang-td {
  background: #fef3c7 !important;
  color: #b45309 !important;
  border: 1px solid #fde68a !important;
}

.badge-status-chua-td {
  background: #f1f5f9 !important;
  color: #64748b !important;
  border: 1px solid #cbd5e1 !important;
}

.btn-save-draft-disabled {
  background: #94a3b8 !important;
  border-color: #cbd5e1 !important;
  cursor: not-allowed !important;
}

.btn-submit-final-disabled {
  background: #1e3a8a !important;
  border-color: #3b82f6 !important;
  cursor: not-allowed !important;
}

.td-radio-label-chua { color: #64748b; }
.td-radio-label-dat { color: #15803d; }
.td-radio-label-bacbo { color: #dc2626; }

.mb-14 { margin-bottom: 14px !important; }
.bulk-formula-label { font-size: 13.2px; font-weight: 700; color: #0f2b5c; display: flex; align-items: center; gap: 6px; }
.text-muted-sm { color: #94a3b8 !important; font-size: 13.2px !important; }
.grid-2col-gap12 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.edit-tieuchi-ta { min-height: 90px; }
.sub-notice-text { font-size: 13.2px; opacity: .7; margin-top: 8px; display: block; }
.d-flex-gap14-center { display: flex !important; align-items: center !important; gap: 14px !important; }
.text-primary-dark { color: #1e40af !important; }
.text-return-dark { color: #7c2d12 !important; }
.score-progress-label { margin-left: 14px; font-size: 12.5px; }
.badge-td-done-text { color: #1e3a8a; font-weight: 800; }
.badge-td-doing-text { color: #b45309; font-weight: 800; }
.badge-td-none-text { color: #64748b; font-weight: 800; }
.text-success-desc { font-size: 12.5px; margin-top: 3px; color: #15803d; }

/* ═══ 6. CHUAN HOA PHANG TOAN BO BANG GRID VA NUT THAO TAC ═════════════════ */
.table-thidua-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  background: #ffffff;
}

.table-thidua-grid thead th {
  background: linear-gradient(135deg, #091e42 0%, #0f2b5c 100%);
  color: #ffffff;
  padding: 11px 8px;
  font-weight: 700;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,.15);
  white-space: nowrap;
}

.table-thidua-grid thead th:last-child {
  border-right: none;
}

.table-thidua-grid tbody tr {
  border-bottom: 1px solid #e2e8f0;
  transition: background .12s;
}

.table-thidua-grid tbody tr:nth-child(even) {
  background: #f8fafc;
}

.table-thidua-grid tbody tr:hover {
  background: #f1f7ff;
}

.table-thidua-grid tbody td {
  padding: 8px;
  vertical-align: middle;
  border-right: 1px solid #e2e8f0;
}

.table-thidua-grid tbody td:last-child {
  border-right: none;
}

.modal-pdf-popup {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15,43,92,.3);
  border: 1px solid #cbd5e1;
}

.btn-thidua-action {
  background: linear-gradient(135deg, #0f2b5c 0%, #1e40af 100%);
  color: #ffffff !important;
  border: none;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 13.2px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(15,43,92,.25);
  transition: all .2s;
  text-decoration: none;
}

.btn-thidua-action:hover {
  background: linear-gradient(135deg, #091e42 0%, #153e75 100%);
  box-shadow: 0 4px 12px rgba(15,43,92,.35);
  transform: translateY(-1px);
}

/* ═══ 7. BO SUNG CLASS THAY THE TOAN BO INLINE STYLES TRONG CAC VIEW ═══════ */
/* Cau hinh cong thuc */
.grid-2col-gap22 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 24px; }
.form-label-bold { display: block; font-size: 13.2px; font-weight: 700; color: #374151; margin-bottom: 6px; }
.select-thidua-royal { width: 100%; padding: 10px 14px; border: 1.5px solid #d1d5db; border-radius: 8px; font-size: 13.2px; background: #f9fafb; color: #1e293b; cursor: pointer; }
.action-bar-right { text-align: right; margin-bottom: 28px; }
.divider-subtle { border: none; border-top: 1px solid #e2e8f0; margin-bottom: 22px; }

/* Cong thuc danh muc */
.table-cong-thuc { 
  width: 100% !important; 
  border-collapse: collapse !important; 
  font-size: 13.2px !important; 
  table-layout: fixed !important;
}
.tr-header-cong-thuc { background: linear-gradient(135deg, #091e42, #0f2b5c) !important; color: #fff !important; }
.th-stt-round-left { padding: 12px 10px !important; text-align: center !important; width: 55px !important; border-radius: 8px 0 0 0 !important; }
.th-cong-thuc-name { padding: 12px 12px !important; text-align: left !important; width: 175px !important; }
.th-cong-thuc-cond { padding: 12px 12px !important; text-align: left !important; width: 220px !important; }
.th-cong-thuc-guide { padding: 12px 12px !important; text-align: left !important; width: calc((100% - 450px) / 2) !important; font-weight: 700 !important; }
.th-cong-thuc-calc { padding: 12px 12px !important; text-align: left !important; width: calc((100% - 450px) / 2) !important; font-weight: 700 !important; border-radius: 0 8px 0 0 !important; }
.td-huong-dan-nhap { padding: 8px 10px !important; vertical-align: top !important; width: calc((100% - 450px) / 2) !important; }
.tr-cong-thuc-row { border-bottom: 1px solid #e2e8f0 !important; transition: background .15s !important; }
.tr-cong-thuc-row:hover { background: #f0f7ff !important; }
.td-stt-gold { padding: 10px 8px !important; text-align: center !important; font-weight: 700 !important; color: #d4af37 !important; vertical-align: top !important; }
.badge-stt-circle { display: inline-flex !important; align-items: center !important; justify-content: center !important; width: 28px !important; height: 28px !important; background: #091e42 !important; border-radius: 50% !important; color: #d4af37 !important; font-size: 13.2px !important; }
.td-ten-cong-thuc { padding: 10px 12px !important; font-weight: 700 !important; color: #0f2b5c !important; vertical-align: top !important; }
.td-dieu-kien { padding: 10px 12px !important; color: #334155 !important; vertical-align: top !important; }
.code-dieu-kien { padding: 3px 6px !important; font-size: 13.2px !important; color: #0369a1 !important; font-weight: 600 !important; background: #e0f2fe !important; border: 1px solid #bae6fd !important; border-radius: 4px !important; display: inline-block !important; word-break: break-word !important; }
.td-cach-tinh { padding: 8px 10px !important; vertical-align: top !important; width: calc((100% - 450px) / 2) !important; }
.badge-cach-tinh { background: #f0fdf4 !important; border: 1px solid #bbf7d0 !important; border-radius: 6px !important; padding: 4px 10px !important; display: inline-block !important; font-weight: normal !important; text-transform: none !important; }
.alert-cong-thuc-note { margin-top: 20px !important; padding: 14px 18px !important; background: #fef9ec !important; border: 1px solid #fde68a !important; border-radius: 8px !important; font-size: 13.2px !important; color: #92400e !important; }

.textarea-cell-wrapper {
  position: relative !important;
  width: 100% !important;
  display: block !important;
}

.edit-huong-dan-nhap,
.edit-cach-tinh-diem {
  width: 100% !important;
  box-sizing: border-box !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 6px !important;
  padding: 8px 10px !important;
  padding-bottom: 24px !important;
  font-family: inherit !important;
  font-size: 12.5px !important;
  line-height: 1.45 !important;
  color: #1e293b !important;
  background: #ffffff !important;
  resize: vertical !important;
  min-height: 80px !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease !important;
}

.edit-huong-dan-nhap:focus,
.edit-cach-tinh-diem:focus {
  outline: none !important;
  border-color: #2563eb !important;
  background: #f8fafc !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

.save-status-indicator {
  position: absolute !important;
  bottom: 5px !important;
  right: 8px !important;
  font-size: 13.1px !important;
  font-weight: 700 !important;
  color: #15803d !important;
  background: rgba(240, 253, 244, 0.95) !important;
  border: 1px solid #86efac !important;
  border-radius: 4px !important;
  padding: 1px 7px !important;
  pointer-events: none !important;
  opacity: 0 !important;
  transition: opacity 0.25s ease !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  z-index: 2 !important;
}

.save-status-indicator.show {
  opacity: 1 !important;
}

.save-status-indicator.saving {
  color: #0369a1 !important;
  background: rgba(240, 249, 255, 0.95) !important;
  border-color: #7dd3fc !important;
}

.save-status-indicator.error {
  color: #b91c1c !important;
  background: rgba(254, 242, 242, 0.95) !important;
  border-color: #fca5a5 !important;
}

.ten-cong-thuc-title {
  font-weight: 700 !important;
  color: #0f2b5c !important;
  line-height: 1.4 !important;
}
.badge-ma-dinh-danh {
  margin-top: 4px !important;
}
.badge-ma-dinh-danh code {
  font-size: 13.1px !important;
  color: #64748b !important;
  background: #f1f5f9 !important;
  padding: 2px 5px !important;
  border-radius: 4px !important;
}

/* Dashboard */
.dashboard-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-bottom: 28px; }
.card-stat-gold { text-align: center; border-top: 4px solid #d4af37; }
.card-stat-green { text-align: center; border-top: 4px solid #22c55e; }
.card-stat-amber { text-align: center; border-top: 4px solid #f59e0b; }
.card-stat-red { text-align: center; border-top: 4px solid #ef4444; }
.stat-icon { font-size: 36px; margin-bottom: 8px; }
.stat-val-navy { font-size: 28px; font-weight: 800; color: #0f2b5c; }
.stat-val-green { font-size: 28px; font-weight: 800; color: #15803d; }
.stat-val-amber { font-size: 28px; font-weight: 800; color: #d97706; }
.stat-val-red { font-size: 28px; font-weight: 800; color: #dc2626; }
.stat-label { font-size: 13.2px; color: #64748b; margin-top: 4px; }

/* Cau hinh muc tieu */
.header-flex-between { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.title-muc-tieu { font-size: 14.5px; color: #0f2b5c; }
.desc-muc-tieu { font-size: 13.2px; color: #64748b; margin-top: 3px; }
.text-success { color: #15803d !important; }
.text-muted { color: #64748b !important; }
.col-muc-tieu-stt { width: 65px; text-align: center; }
.col-muc-tieu-tieuchi { min-width: 260px; text-align: left; }
.col-muc-tieu-diem { width: 75px; text-align: center; }
.col-muc-tieu-cachtinh { min-width: 160px; text-align: left; }
.col-muc-tieu-trangthai { width: 140px; text-align: center; }
.col-muc-tieu-thietlap { width: 140px; text-align: center; }
.text-tieuchi-title { font-size: 12.5px; color: #1e293b; line-height: 1.45; }
.text-cach-tinh-sm { font-size: 13.2px; color: #475569; }
.action-bar-end { margin-top: 18px; display: flex; justify-content: flex-end; }

/* Cau hinh don vi */
.text-muted-desc { font-size: 13.2px; color: #64748b; margin-top: 4px; }
.table-header-bar { margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.table-header-title { font-size: 15px; font-weight: 700; color: #0f2b5c; }
.search-box-input { padding: 6px 12px; border: 1.5px solid #cbd5e1; border-radius: 6px; font-size: 12.5px; width: 220px; }
.col-tab-phan { width: 130px; }
.badge-tag-amber { background: #fef3c7 !important; color: #92400e !important; border-color: #fde68a !important; margin: 1px !important; }
.modal-field-title { font-size: 13.2px; font-weight: 600; color: #334155; margin-bottom: 12px; }
.text-primary-navy { color: #0f2b5c; font-weight: 800; }
.modal-field-desc { font-size: 12.5px; color: #64748b; margin-bottom: 10px; }

/* Quan ly nop */
.col-don-vi { min-width: 240px; text-align: left; }
.col-nhom-ad { width: 140px; text-align: center; }
.col-trang-thai-nop { width: 160px; text-align: center; }
.col-trang-thai-td { width: 170px; text-align: center; }
.col-tieuchi-nop { width: 110px; text-align: center; }
.col-thu-hoi { width: 155px; text-align: center; }
.col-thao-tac-lg { width: 160px; text-align: center; }
.badge-group-pill { display: inline-block; padding: 2px 10px; border-radius: 12px; background: #f1f5f9; border: 1px solid #cbd5e1; font-size: 11.5px; font-weight: 600; color: #334155; }
.ten-don-vi-text { color: #0f2b5c; font-size: 13.2px; font-weight: 700; }
.cell-count-navy { text-align: center; font-weight: 700; color: #0f2b5c; }

/* Index view */
.btn-hub-portal { background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important; border-color: #3b82f6 !important; box-shadow: 0 2px 6px rgba(29, 78, 216, 0.35) !important; margin-right: 8px !important; }
.mb-16 { margin-bottom: 16px !important; }
.empty-box-dashed { border: 2px dashed #cbd5e1; border-radius: 10px; padding: 50px; text-align: center; color: #94a3b8; }
.col-stt-90 { width: 90px; text-align: center; }
.col-stt-100 { width: 100px; text-align: center; }
.col-diem-120 { width: 120px; text-align: center; }
.cell-actions { text-align: center; white-space: nowrap; }
.text-stt-tc { text-align: center; color: #64748b; font-weight: 600; }

/* Cap do phan cap tieu chi Indent */
.indent-level-0 { font-weight: 600; color: #0f2b5c; }
.indent-level-1 { padding-left: 20px !important; color: #334155; }
.indent-level-2 { padding-left: 32px !important; color: #475569; }
.indent-level-3 { padding-left: 44px !important; color: #64748b; }
.indent-level-4 { padding-left: 56px !important; color: #64748b; }


/* ═══════════════════════════════════════════════════════════════════════════
   KHUNG HOÀNG GIA 1400PX - ÉP CỨNG TOÀN HỆ THỐNG - KHÔNG ĐÀM PHÁN
   Ghi đè mọi class cha, mọi Bootstrap, mọi inline style
   ═══════════════════════════════════════════════════════════════════════════ */

/* 1. BODY: layout dọc, nền xám nhạt */
body {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh !important;
  background: #f0f4f8 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 2. TOPBAR (header băng ngang): full-width nhưng nội dung bên trong tự căn giữa 1400px */
.topbar {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.topbar-left,
.topbar-right,
.topbar > * {
  /* Topbar tự co giãn theo toàn chiều ngang — không giới hạn */
}

/* 3. NAVBAR NGANG (top-navbar-container): kẹp trong khung 1400px, căn giữa */
.top-navbar-container {
  max-width: 1400px !important;
  width: calc(100% - 40px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

/* 4. APP-WRAPPER: bung full để main-area có thể tự căn giữa */
.app-wrapper {
  display: block !important;
  width: 100% !important;
  flex: 1 !important;
}

/* 5. MAIN-AREA: đây là vùng nội dung chính — ép cứng 1400px căn giữa */
.main-area {
  max-width: 1400px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 16px 20px 32px !important;
  box-sizing: border-box !important;
  background: transparent !important;
}

/* 6. PAGE-CONTENT-WRAPPER nếu có: cùng khung 1400px */
.page-content-wrapper {
  max-width: 1400px !important;
  margin: 0 auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* 7. Bất kỳ container Bootstrap nào bên trong main-area: không được vượt 100% */
.main-area .container,
.main-area .container-fluid,
.main-area .container-xl,
.main-area .container-xxl {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* 8. Triệt tiêu sidebar dọc hoàn toàn (phòng ngừa) */
.sidebar,
nav.sidebar,
.admin-sidebar,
nav.admin-sidebar {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  overflow: hidden !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MÀNG BỌC TỐI CAO 1400PX - CƯỠNG BỨC TOÀN HỆ THỐNG
   ═══════════════════════════════════════════════════════════════════════════ */
header, .navbar, .navbar-container, .container-fluid, .wrapper, #content-wrapper, .main-panel, .main-content, .main-area {
    max-width: 1400px !important;
    margin: 0 auto !important;
    float: none !important;
    box-shadow: 0 0 15px rgba(0,0,0,0.05);
    background: #ffffff;
    position: relative;
}
body, .main-panel, .main-content {
    margin-left: 0 !important;
    padding-left: 0 !important;
    width: 100% !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   9. HORIZONTAL TOP NAVIGATION BAR (1400PX FLAT CONTAINER)
   ═══════════════════════════════════════════════════════════════════════════ */
body > .top-navbar-container,
.top-navbar-container {
  max-width: 1400px !important;
  width: 100% !important;
  margin: 0 auto 16px auto !important;
  background: linear-gradient(135deg, #091e42 0%, #0d2759 55%, #102f6a 100%);
  border-radius: 8px;
  border: 1.5px solid #d4af37;
  box-shadow: 0 4px 14px rgba(15, 43, 92, 0.25);
  padding: 4px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Roboto', sans-serif !important;
  font-size: 13.2px !important;
  position: relative;
  z-index: 100;
  box-sizing: border-box !important;
}

.top-navbar-brand-badge {
  color: #d4af37;
  font-weight: 800;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  white-space: nowrap;
}

.top-navbar-brand-badge .brand-icon {
  font-size: 14px;
}

.top-navbar-brand-badge .brand-text {
  font-family: 'Roboto', sans-serif !important;
  font-size: 11.5px !important;
  color: #d4af37;
}

.navbar-nav,
.top-navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.navbar-nav .nav-item,
.top-nav-item {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* UNIFORM ROBOTO FONT SIZE 12 FOR ALL MAIN MENU ANCHORS */
.navbar-nav .nav-link,
.top-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  color: #e2e8f0;
  text-decoration: none;
  font-size: 13.2px !important;
  font-family: 'Roboto', sans-serif !important;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  line-height: 1.4;
}

.navbar-nav .nav-link:hover,
.top-nav-link:hover {
  background: rgba(212, 175, 55, 0.18);
  color: #fde047;
  border-color: rgba(212, 175, 55, 0.4);
}

.navbar-nav .nav-link.active,
.top-nav-link.active {
  background: linear-gradient(135deg, #0f2b5c 0%, #173b75 100%);
  color: #fde047;
  border-color: #d4af37;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.nav-icon {
  font-size: 14px;
  line-height: 1;
}

.dropdown-toggle::after,
.top-nav-dropdown-toggle::after {
  content: ' ▾';
  font-size: 10px;
  margin-left: 2px;
}

/* ═══ STRICT DROPDOWN TRIGGER RULE & ZERO-PIXEL LAYOUT BUFFER GAPS ═══ */
.navbar-nav .dropdown:hover .dropdown-menu,
.navbar-nav .dropdown-menu:hover,
.top-nav-item:hover .top-dropdown-menu,
.top-dropdown-menu:hover {
  display: block !important;
  margin-top: 0 !important;
  z-index: 9999 !important;
}

.navbar-nav .dropdown-menu,
.top-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  z-index: 9999 !important;
  min-width: 230px;
  box-shadow: none !important;
}

.top-dropdown-menu-inner {
  background: #0a1f44;
  border: 1.5px solid #d4af37;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  padding: 5px 0;
  list-style: none;
  margin: 0;
}

/* UNIFORM ROBOTO FONT SIZE 12 FOR ALL SUB-MENU LINKS */
.dropdown-item,
.top-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 13.2px !important;
  font-family: 'Roboto', sans-serif !important;
  font-weight: 500;
  transition: all 0.15s ease;
  white-space: nowrap;
  background: transparent;
  line-height: 1.4;
}

.dropdown-item:hover,
.top-dropdown-item:hover {
  background: rgba(212, 175, 55, 0.22);
  color: #fde047;
  font-weight: 700;
  padding-left: 19px;
}

.dropdown-item.active,
.top-dropdown-item.active {
  background: rgba(212, 175, 55, 0.28);
  color: #fde047;
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════════════════
   10. QUAN LY TIEN DO NOP & THAM DINH (quan-ly-nop.ejs STYLES)
   ═══════════════════════════════════════════════════════════════════════════ */
.progress-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
  padding: 26px;
  margin-bottom: 28px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform .15s, box-shadow .15s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
}

.stat-icon {
  font-size: 32px;
  line-height: 1;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 22px;
  font-weight: 800;
  color: #0f2b5c;
  line-height: 1.2;
}

.stat-label {
  font-size: 13.2px;
  color: #64748b;
  font-weight: 600;
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.stat-da-gui { border-left: 5px solid #16a34a; }
.stat-da-gui .stat-value { color: #15803d; }
.stat-chua-gui { border-left: 5px solid #94a3b8; }
.stat-chua-gui .stat-value { color: #475569; }
.stat-da-td { border-left: 5px solid #1e3a8a; }
.stat-da-td .stat-value { color: #1e3a8a; }
.stat-dang-td { border-left: 5px solid #d97706; }
.stat-dang-td .stat-value { color: #b45309; }

.filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-control {
  padding: 8px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13.2px;
  background: #fff;
  color: #1e293b;
  outline: none;
  font-weight: 500;
}

.nav-tabs-donvi {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-tab-btn {
  font-family: 'Roboto', sans-serif;
  font-size: 13.2px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all .18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  outline: none;
}

.nav-tab-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f2b5c;
}

.nav-tab-btn.active {
  background: #0f2b5c;
  border-color: #0f2b5c;
  color: #fde047;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(15,43,92,.25);
}

.search-input {
  min-width: 240px;
}

.grid-wrap {
  overflow-x: auto;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.progress-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.2px;
}

.progress-table thead tr {
  background: linear-gradient(135deg, #091e42 0%, #0f2b5c 100%);
  color: #ffffff;
}

.progress-table thead th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
  font-size: 12.5px;
  border-right: 1px solid rgba(255,255,255,.15);
  white-space: nowrap;
}

.progress-table thead th:last-child {
  border-right: none;
}

.progress-table tbody tr {
  border-bottom: 1px solid #e2e8f0;
  transition: background .12s;
}

.progress-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.progress-table tbody tr:hover {
  background: #eff6ff;
}

.progress-table tbody td {
  padding: 11px 14px;
  vertical-align: middle;
  border-right: 1px solid #e2e8f0;
  color: #1e293b;
}

.progress-table tbody td:last-child {
  border-right: none;
}

.badge-unit-type {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 13.1px;
  font-weight: 700;
  margin-left: 6px;
}

.badge-cap-tinh {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

.badge-cap-khu-vuc {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 13.2px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-da-gui {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.badge-chua-gui {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.badge-td-chua {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.badge-td-dang {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-td-dinhky {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
}

.badge-td-da {
  background: #1e3a8a;
  color: #ffffff;
  border: 1px solid #1e40af;
  box-shadow: 0 1px 4px rgba(30,58,138,.3);
}

.btn-tham-dinh {
  background: linear-gradient(135deg, #091e42 0%, #0f2b5c 100%);
  color: #fde047;
  border: 1.5px solid #d4af37;
  padding: 7px 15px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(15,43,92,.25);
  transition: all .2s;
  white-space: nowrap;
}

.btn-tham-dinh:hover {
  background: linear-gradient(135deg, #0f2b5c 0%, #153e75 100%);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15,43,92,.35);
}

.btn-tham-dinh:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
  filter: grayscale(1);
  background: #94a3b8;
  color: #f1f5f9;
  border-color: #cbd5e1;
}

.btn-thu-hoi {
  background: #64748b;
  color: #ffffff;
  border: 1.5px solid #475569;
  padding: 7px 13px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(71,85,105,.25);
  transition: all .2s;
  white-space: nowrap;
  text-decoration: none;
}

.btn-thu-hoi:hover {
  background: #475569;
  border-color: #334155;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(51,65,85,.35);
}

.page-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.page-heading-row .page-heading {
  margin-bottom: 0;
}

.btn-master-reset {
  background: #dc2626;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 9px 16px;
  font-size: 13.2px;
  font-weight: 800;
  letter-spacing: .2px;
  cursor: pointer;
  box-shadow: none;
  white-space: nowrap;
}

.btn-master-reset:hover {
  background: #b91c1c;
}

.btn-master-reset:disabled {
  opacity: .65;
  cursor: not-allowed;
}

.col-ngay-cap-nhat {
  width: 140px;
}

.cell-ngay-cap-nhat {
  font-size: 13.2px;
  color: #475569;
  font-weight: 500;
  text-align: center;
}

.btn-tham-dinh-group {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.btn-tham-dinh-tuan {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  padding: 6px 10px !important;
  font-size: 13.2px !important;
}

.btn-tham-dinh-cuoinam {
  background: linear-gradient(135deg, #091e42 0%, #0f2b5c 100%) !important;
  padding: 6px 10px !important;
  font-size: 13.2px !important;
}
/* ═══════════════════════════════════════════════════════════════════════════
   11. GIAO DIỆN NHẬP LIỆU VÀ TỰ CHẤM (MIGRATED FROM VIEW TEMPLATES)
   ═══════════════════════════════════════════════════════════════════════════ */
.input-grid-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 16px rgba(0,0,0,.06);
    padding: 24px;
    margin-bottom: 30px;
  }
  .input-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1.5px solid #e2e8f0;
  }
  .input-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .header-title-main {
    font-size: 18px;
    font-weight: 800;
    color: #0f2b5c;
    margin: 0;
  }
  .header-sub-desc {
    font-size: 13.2px;
    color: #64748b;
  }
  .filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }
  .filter-select, .search-box-input {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    font-size: 13.2px;
    outline: none;
    font-family: 'Roboto', sans-serif;
  }
  .filter-select:focus, .search-box-input:focus {
    border-color: #0f2b5c;
  }
  .nav-tabs {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
  }
  .nav-tab-btn {
    font-family: 'Roboto', sans-serif;
    font-size: 13.2px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 6px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    transition: all .18s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    outline: none;
  }
  .nav-tab-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f2b5c;
  }
  .nav-tab-btn.active {
    background: #0f2b5c;
    border-color: #0f2b5c;
    color: #fde047;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(15,43,92,.25);
  }

  /* BẢNG GRID PHẲNG */
  .grid-container {
    overflow-x: auto;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
  }
  .table-report {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.2px;
  }
  .table-report thead th {
    background: linear-gradient(135deg, #091e42 0%, #0f2b5c 100%);
    color: #ffffff;
    padding: 10px 8px;
    font-weight: 700;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,.15);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 5;
    font-size: 13.2px;
  }
  .table-report tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background .12s;
  }
  .table-report tbody tr:nth-child(even) { background: #f8fafc; }
  .table-report tbody tr:hover { background: #f1f7ff; }
  .table-report tbody td {
    padding: 6px 8px;
    vertical-align: middle;
    border-right: 1px solid #e2e8f0;
    font-size: 13.2px;
  }
  .row-level-1 { background: #f8fafc !important; border-top: 1.5px solid #cbd5e1 !important; border-bottom: 1.5px solid #cbd5e1 !important; font-size: 13.2px; }
  .row-level-1:hover { background: #f1f5f9 !important; }
  .row-level-2 { background: #f1f5f9 !important; border-top: 1.5px solid #cbd5e1 !important; border-bottom: 1.5px solid #cbd5e1 !important; font-size: 13.2px; }
  .row-level-2:hover { background: #e2e8f0 !important; }
  .row-level-3 td.col-tieu-chi { font-weight: 400 !important; color: #1e293b; font-family: 'Roboto', sans-serif; font-size: 13.2px; }
  .row-level-3 td.col-stt-lc { font-weight: 400 !important; color: #334155; text-align: center; font-family: 'Roboto', sans-serif; font-size: 13.2px; }
  .row-level-0 td.col-tieu-chi { font-weight: 700 !important; color: #0f2b5c; font-family: 'Roboto', sans-serif; font-size: 13.2px; }
  .row-level-0 td.col-stt-lc { font-weight: 700 !important; color: #0f2b5c; text-align: center; font-family: 'Roboto', sans-serif; font-size: 13.2px; }

  /* Ô TEXTBOX NHẬP LIỆU */
  .input-field-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }
  .input-sub-row {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .input-label-tag {
    font-size: 10.5px;
    font-weight: 600;
    color: #64748b;
    width: 60px;
    flex-shrink: 0;
    text-align: left;
  }
  .ml-1 { margin-left: 0.25rem; }
  .mt-1 { margin-top: 0.25rem; }
  .d-block { display: block; }
  .text-info { color: #0ea5e9; cursor: pointer; text-decoration: none; }
  .text-info:hover { text-decoration: underline; }
  .input-textbox {
    width: 48px;
    padding: 3px 6px;
    border: 1.5px solid #cbd5e1;
    border-radius: 4px;
    font-size: 13.2px;
    font-weight: 600;
    text-align: right;
    outline: none;
    transition: all .2s;
  }
  input::-webkit-outer-spin-button,
  input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  input[type=number] {
    -moz-appearance: textfield;
  }
  .input-textbox:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,.15);
    background: #fff;
  }
  .input-textbox[readonly] {
    background-color: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
    cursor: not-allowed;
  }
  .input-textbox.input-error {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
    color: #b91c1c !important;
  }
  .error-msg-tag {
    color: #dc2626;
    font-size: 10.5px;
    font-weight: 700;
    margin-top: 2px;
    display: none;
  }

  /* BADGE CÔNG THỨC */
  .badge-formula-name {
    display: inline-block;
    padding: 2px 6px;
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    border-radius: 4px;
    font-size: 13.1px;
    font-weight: 700;
    margin-bottom: 2px;
  }
  .box-formula-content {
    font-size: 13.1px;
    color: #475569;
    line-height: 1.35;
  }
  .text-muted-italic {
    font-size: 13.1px;
    font-style: italic;
    color: #94a3b8;
  }

  /* TRẠNG THÁI & ĐIỂM HIỆN TẠI */
  .status-badge {
    display: inline-block;
    padding: 3px 6px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 11.5px;
  }
  .status-vuot { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
  .status-dat { background: #e0f2fe; color: #0369a1; border: 1px solid #7dd3fc; }
  .status-chuadat { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
  .status-chuacham { background: #f1f5f9; color: #64748b; border: 1px solid #cbd5e1; }

  /* TÀI LIỆU MINH CHỨNG VÀ GHI CHÚ */
  .btn-upload-pdf-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 13.1px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
  }
  .btn-upload-pdf-tag:hover { background: #e2e8f0; border-color: #94a3b8; }
  .txt-ghi-chu-input {
    width: 140px;
    height: 48px;
    padding: 4px 6px;
    border: 1.5px solid #cbd5e1;
    border-radius: 5px;
    font-size: 11.5px;
    resize: vertical;
    outline: none;
    transition: border-color .2s;
  }
  .txt-ghi-chu-input:focus {
    border-color: #2563eb;
    background: #fff;
  }

  /* DẢI 3 NÚT BẤM (ĐẦU TRANG & CHÂN TRANG) */
  .btn-save-all {
    background: linear-gradient(135deg, #091e42 0%, #0f2b5c 50%, #153e75 100%);
    color: #fde047;
    border: 2px solid #d4af37;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13.2px;
    font-weight: 800;
    letter-spacing: .3px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(15,43,92,.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .2s;
  }
  .btn-save-all:hover {
    background: linear-gradient(135deg, #0f2b5c 0%, #153e75 100%);
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(15,43,92,.4);
  }
  .btn-save-all:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
    background: #94a3b8 !important;
    border-color: #cbd5e1 !important;
    color: #e2e8f0 !important;
    box-shadow: none !important;
  }
  .btn-send-periodic {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: 2px solid #38bdf8;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13.2px;
    font-weight: 800;
    letter-spacing: .3px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(2,132,199,.35);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .2s;
  }
  .btn-send-periodic:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(2,132,199,.45);
  }
  .btn-send-periodic:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none !important;
  }
  .btn-send-final {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    color: #ffffff;
    border: 2px solid #fdba74;
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 13.2px;
    font-weight: 800;
    letter-spacing: .3px;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(234, 88, 12, .4);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .2s;
  }
  .btn-send-final:hover {
    background: linear-gradient(135deg, #c2410c 0%, #9a3412 100%);
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(234, 88, 12, .5);
  }
  .btn-send-final:disabled {
    opacity: .85;
    cursor: not-allowed;
    transform: none;
    box-shadow: none !important;
  }
  .bottom-action-bar {
    position: sticky;
    bottom: 0;
    background: #ffffff;
    padding: 14px 20px;
    border-top: 2px solid #d4af37;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 -4px 14px rgba(0,0,0,.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 20;
    margin-top: 16px;
  }
  .score-summary-pill {
    font-size: 14px;
    font-weight: 700;
    color: #0f2b5c;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  /* PDF MODAL & UPLOAD */
  #pdfModalOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    z-index: 99999;
    align-items: center;
    justify-content: center;
  }
  #pdfModalOverlay.active { display: flex; }
  #pdfModalBox {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
    width: 90vw;
    max-width: 1100px;
    height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  #pdfModalHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: linear-gradient(135deg,#091e42,#0f2b5c);
    color: #fde047;
    font-weight: 800;
    font-size: 14.5px;
    gap: 10px;
    flex-shrink: 0;
  }
  #pdfModalTitle { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #pdfModalClose {
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 5px 14px;
    font-size: 13.2px;
    font-weight: 800;
    cursor: pointer;
    flex-shrink: 0;
  }
  #pdfModalClose:hover { background: #b91c1c; }
  #pdfModalFrame { flex: 1; width: 100%; border: none; }
  .pdf-cell-wrap { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
  .pdf-name-display {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13.1px;
    font-weight: 700;
    color: #0369a1;
    cursor: pointer;
    text-decoration: underline;
    word-break: break-all;
    max-width: 280px;
  }
  .pdf-name-display:hover { color: #0284c7; }
  .btn-delete-pdf {
    background: #dc2626;
    color: #ffffff;
    border: 1px solid #b91c1c;
    border-radius: 4px;
    font-size: 13.1px;
    font-weight: 700;
    padding: 3px 8px;
    cursor: pointer;
    margin-top: 3px;
  }
  .btn-delete-pdf:hover { background: #b91c1c; }
  .upload-spinner { font-size: 13.1px; color: #64748b; font-style: italic; display: none; }
  .upload-spinner.active { display: inline-block; }
  .auto-save-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 13.1px;
    font-weight: 700;
    color: #15803d;
    background: #dcfce7;
    border: 1px solid #86efac;
    padding: 2px 7px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    transform: translateY(2px);
    margin-top: 4px;
  }
  .auto-save-tag.active { opacity: 1; transform: translateY(0); }

  /* MINI POPUP */
  .popup-huong-dan-mini {
    position: absolute;
    display: none;
    width: 320px;
    max-width: 350px;
    background: #ffffff;
    border: 1.5px solid #0d9488;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    padding: 10px 14px;
    font-family: 'Roboto', sans-serif;
  }
  .popup-huong-dan-mini.show { display: block; }
  .popup-mini-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 6px;
    margin-bottom: 8px;
    border-bottom: 1px solid #ccfbf1;
  }
  .popup-mini-title { font-size: 13.2px; font-weight: 700; color: #0f766e; }
  .popup-mini-close { cursor: pointer; color: #ef4444; font-weight: bold; font-size: 16px; border: none; background: transparent; }
  .popup-mini-body { font-size: 13.2px; line-height: 1.55; color: #334155; white-space: pre-wrap; word-break: break-word; max-height: 250px; overflow-y: auto; }

  /* BANNERS */
  .lock-banner, .return-banner, .periodic-banner {
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 16px;
    align-items: center;
    gap: 12px;
  }
  .banner-final-locked { background: #fee2e2; border: 1.5px solid #ef4444; color: #991b1b; }
  @keyframes pulse-amber {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
  }
  .banner-return-warning {
    background: #fef3c7;
    border: 2px solid #f59e0b;
    color: #92400e;
    animation: pulse-amber 2s infinite;
  }
  .banner-periodic-info { background: #e0f2fe; border: 1.5px solid #0ea5e9; color: #075985; }
  .banner-icon-xl { font-size: 24px; flex-shrink: 0; }
  .banner-title-text { font-size: 13.2px; font-weight: 800; text-transform: uppercase; margin-bottom: 2px; }
  .banner-desc-text { font-size: 12.5px; line-height: 1.4; }
  .d-none { display: none !important; }
  .d-flex { display: flex !important; }

  /* TOGGLE CỘT */
  .table-report thead tr.col-toggle-row th {
    background: #eaeaea !important;
    color: #475569 !important;
    padding: 2px 4px !important;
    height: 22px;
    font-weight: 500;
    white-space: nowrap;
    position: sticky;
    top: 40px;
    z-index: 6;
    border-right: 1px solid #d4d4d4;
    vertical-align: middle;
    text-align: center;
  }
  .col-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #64748b;
    font-size: 13.2px;
    border-radius: 3px;
  }
  .col-toggle-btn:hover { background: #d4d4d4; color: #0f2b5c; }
  .col-toggle-btn.is-collapsed { color: #1d4ed8; background: #dbeafe; }
  .table-report th.column-hidden, .table-report td.column-hidden {
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    overflow: hidden !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: center !important;
  }
  .table-report thead tr:first-child th.column-hidden,
  .table-report tbody td.column-hidden { font-size: 0 !important; line-height: 0 !important; color: transparent !important; }
  .table-report tbody td.column-hidden > * { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   12. GIAO DIỆN THẨM ĐỊNH ADMIN (MIGRATED FROM NHAP-LIEU.EJS)
   ═══════════════════════════════════════════════════════════════════════════ */
.input-grid-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 16px rgba(0,0,0,.06);
    padding: 24px;
    margin-bottom: 30px;
  }
  .input-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1.5px solid #e2e8f0;
  }
  .input-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .unit-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eff6ff;
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13.2px;
    font-weight: 700;
  }
  .filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }
  .filter-select, .search-box-input {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    font-size: 13.2px;
    outline: none;
    font-family: 'Roboto', sans-serif;
  }
  .filter-select:focus, .search-box-input:focus {
    border-color: #0f2b5c;
  }
  .nav-tabs {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
  }
  .nav-tab-btn {
    font-family: 'Roboto', sans-serif;
    font-size: 13.2px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 6px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    transition: all .18s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    outline: none;
  }
  .nav-tab-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f2b5c;
  }
  .nav-tab-btn.active {
    background: #0f2b5c;
    border-color: #0f2b5c;
    color: #fde047;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(15,43,92,.25);
  }

  /* BẢNG GRID PHẲNG */
  .grid-container {
    overflow-x: auto;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
  }
  .table-report {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.2px;
  }
  .table-report thead th {
    background: linear-gradient(135deg, #091e42 0%, #0f2b5c 100%);
    color: #ffffff;
    padding: 10px 8px;
    font-weight: 700;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,.15);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 5;
    font-size: 13.2px;
  }
  .table-report tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background .12s;
  }
  .table-report tbody tr:nth-child(even) { background: #f8fafc; }
  .table-report tbody tr:hover { background: #f1f7ff; }
  .table-report tbody td {
    padding: 6px 8px;
    vertical-align: middle;
    border-right: 1px solid #e2e8f0;
    font-size: 13.2px;
  }
  .indent-level-0 { font-weight: 600; color: #0f2b5c; font-size: 13.2px; }
  .indent-level-1 { padding-left: 20px !important; color: #334155; font-size: 13.2px; }
  .indent-level-2 { padding-left: 32px !important; color: #475569; font-size: 13.2px; }
  .row-parent-group { background: #f8fafc !important; border-top: 1.5px solid #cbd5e1; }
  .row-parent-group:hover { background: #f1f5f9 !important; }
  .tieu-chi-parent-title { font-weight: 700 !important; font-size: 13.2px !important; color: #0f2b5c !important; }
  .tieu-chi-child-title { margin-left: 20px; font-weight: 400 !important; font-size: 13.2px; color: #334155; }
  .badge-parent-group { display: inline-block; padding: 2px 8px; background: #e2e8f0; color: #475569; border-radius: 4px; font-size: 13.1px; font-weight: 600; }
  .row-level-1 { background: #f8fafc !important; border-top: 1.5px solid #cbd5e1 !important; border-bottom: 1.5px solid #cbd5e1 !important; font-size: 13.2px; }
  .row-level-1:hover { background: #f1f5f9 !important; }
  .row-level-2 { background: #f1f5f9 !important; border-top: 1.5px solid #cbd5e1 !important; border-bottom: 1.5px solid #cbd5e1 !important; font-size: 13.2px; }
  .row-level-2:hover { background: #e2e8f0 !important; }
  .row-level-3 td.col-tieu-chi { font-weight: 400 !important; color: #1e293b; font-family: 'Roboto', sans-serif; font-size: 13.2px; }
  .row-level-3 td.col-stt-lc { font-weight: 400 !important; color: #334155; text-align: center; font-family: 'Roboto', sans-serif; font-size: 13.2px; }
  .row-level-0 td.col-tieu-chi { font-weight: 400 !important; color: #1e293b; font-family: 'Roboto', sans-serif; font-size: 13.2px; }
  .row-level-0 td.col-stt-lc { font-weight: 400 !important; color: #334155; text-align: center; font-family: 'Roboto', sans-serif; font-size: 13.2px; }
  .row-leaf-orphan-root td.col-tieu-chi { font-weight: 700 !important; color: #0f2b5c !important; font-family: 'Roboto', sans-serif; font-size: 13.2px; }
  .row-leaf-orphan-root td.col-stt-lc { font-weight: 700 !important; color: #0f2b5c !important; text-align: center; font-family: 'Roboto', sans-serif; font-size: 13.2px; }

  /* Ô TEXTBOX NHẬP LIỆU */
  .input-field-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }
  .input-sub-row {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .input-label-tag {
    font-size: 10.5px;
    font-weight: 600;
    color: #64748b;
    width: 60px;
    flex-shrink: 0;
  }
  .input-textbox {
    width: 40px;
    padding: 3px 6px;
    border: 1.5px solid #cbd5e1;
    border-radius: 4px;
    font-size: 13.2px;
    font-weight: 600;
    text-align: right;
    outline: none;
    transition: all .2s;
  }
  /* Triệt tiêu hoàn toàn 2 mũi tên lên xuống của ô input type="number" */
  input::-webkit-outer-spin-button,
  input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  input[type=number] {
    -moz-appearance: textfield;
  }
  .input-textbox:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,.15);
    background: #fff;
  }
  .input-textbox[readonly] {
    background-color: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
    cursor: not-allowed;
  }
  .input-textbox.input-error {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
    color: #b91c1c !important;
  }
  .error-msg-tag {
    color: #dc2626;
    font-size: 10.5px;
    font-weight: 700;
    margin-top: 2px;
    display: none;
  }

  /* BADGE CÔNG THỨC */
  .formula-title-tag {
    color: #dc2626;
    font-weight: 800;
    font-size: 13.2px;
    margin-bottom: 2px;
  }
  .formula-desc-box {
    background-color: #eff6ff;
    color: #1e3a8a;
    font-weight: 500;
    padding: 4px 6px;
    border-radius: 5px;
    border: 1px solid #bfdbfe;
    font-size: 13.1px;
    line-height: 1.35;
  }

  /* TRẠNG THÁI & ĐIỂM HIỆN TẠI */
  .status-badge {
    display: inline-block;
    padding: 3px 6px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 11.5px;
  }
  .status-vuot { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
  .status-dat { background: #e0f2fe; color: #0369a1; border: 1px solid #7dd3fc; }
  .status-chuadat { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
  .status-chuacham { background: #f1f5f9; color: #64748b; border: 1px solid #cbd5e1; }

  /* CỘT TÀI LIỆU & GHI CHÚ */
  .btn-view-pdf {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #0284c7;
    color: #ffffff;
    font-size: 13.1px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid #0369a1;
    transition: all .15s;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(2,132,199,.25);
    cursor: pointer;
    font-family: inherit;
  }
  .btn-view-pdf:hover {
    background: #0369a1;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(2,132,199,.35);
  }
  .no-pdf-text {
    color: #94a3b8;
    font-size: 11.5px;
    font-style: italic;
  }
  .display-ghi-chu {
    max-width: 285px;
    min-width: 250px;
    max-height: 140px;
    overflow-y: auto;
    font-size: 11.5px;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 5px 7px;
    line-height: 1.35;
    word-break: break-word;
    white-space: pre-wrap;

  }
  .display-ghi-chu-empty {
    color: #94a3b8;
    font-style: italic;
    background: transparent;
    border: none;
    padding: 0;
  }

  /* RADIO THẨM ĐỊNH */
  .review-radio-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 13.1px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
  }
  .review-radio-group label {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
  }
  .txt-ly-do-reject {
    width: 100%;
    min-height: 36px;
    padding: 4px 6px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    border-radius: 5px;
    font-size: 13.1px;
    font-family: 'Roboto', sans-serif;
    resize: vertical;
    outline: none;
    transition: border-color .2s, background .2s;
  }
  .txt-ly-do-reject:focus { border-color: #93c5fd; box-shadow: 0 0 0 2px rgba(147,197,253,.25); }

  /* CỘT THẨM ĐỊNH ADMIN (2-column layout) */
  .col-tham-dinh-merged {
    vertical-align: top;
    padding: 5px 6px !important;
    min-width: 180px;
  }
  .td-select-thamdinh {
    font-size: 11.5px;
    padding: 4px 6px;
    border-radius: 5px;
    border: 1.5px solid #cbd5e1;
    font-family: 'Roboto', sans-serif;
    width: 100%;
    cursor: pointer;
    transition: border-color .2s;
    background: #fff;
  }
  .td-select-thamdinh:focus { border-color: #3b82f6; outline: none; }
  .td-select-thamdinh option[value="chap_nhan"] { color: #15803d; }
  .td-select-thamdinh option[value="khong_chap_nhan"] { color: #b91c1c; }

  /* CỘT KQ THẨM ĐỊNH */
  .col-kq-td { min-width: 70px; }
  .col-kq-td-header { font-weight: 700; background: #831843 !important;}

  /* NÚT LƯU BÁO CÁO (ĐẦU TRANG & CHÂN TRANG) */
  .btn-save-all {
    background: linear-gradient(135deg, #091e42 0%, #0f2b5c 50%, #153e75 100%);
    color: #fde047;
    border: 2px solid #d4af37;
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 13.2px;
    font-weight: 800;
    letter-spacing: .3px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(15,43,92,.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all .2s;
  }
  .btn-save-all:hover {
    background: linear-gradient(135deg, #0f2b5c 0%, #153e75 100%);
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(15,43,92,.4);
  }
  .btn-save-all:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
    background: #94a3b8 !important;
    border-color: #cbd5e1 !important;
    color: #e2e8f0 !important;
    box-shadow: none !important;
  }

  /* 3 NÚT THẨM ĐỊNH RÕ RÀNG */
  .btn-save-report {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    color: #ffffff;
    border: 1.5px solid #2dd4bf;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13.2px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(15,118,110,.25);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all .2s;
  }
  .btn-save-report:hover {
    background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(15,118,110,.35);
  }
  .btn-save-draft {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: 1.5px solid #38bdf8;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13.2px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(3,105,161,.25);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all .2s;
  }
  .btn-save-draft:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(3,105,161,.35);
  }
  .btn-submit-final {
    background: linear-gradient(135deg, #091e42 0%, #0f2b5c 50%, #153e75 100%);
    color: #fde047;
    border: 2px solid #d4af37;
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 13.2px;
    font-weight: 800;
    letter-spacing: .3px;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(15,43,92,.35);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all .2s;
  }
  .btn-submit-final:hover {
    background: linear-gradient(135deg, #0f2b5c 0%, #153e75 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(15,43,92,.45);
  }
  .btn-save-report:disabled, .btn-save-draft:disabled, .btn-submit-final:disabled {
    opacity: .75;
    cursor: not-allowed;
    transform: none;
    box-shadow: none !important;
  }

  /* NÚT TRẢ LẠI HỒ SƠ YÊU CẦU SỬA ĐỔI (MÀU ĐỎ HÀNH CHÍNH CHUYÊN SÂU) */
  .btn-tra-lai {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff;
    border: 1.5px solid #ef4444;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13.2px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 10px rgba(220,38,38,.3);
    transition: all .2s;
    letter-spacing: .2px;
  }
  .btn-tra-lai:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(220,38,38,.4);
  }
  .btn-tra-lai:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none !important;
  }

  .badge-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: 700;
  }

  .bottom-action-bar {
    position: sticky;
    bottom: 0;
    background: #ffffff;
    padding: 14px 20px;
    border-top: 2px solid #d4af37;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 -4px 14px rgba(0,0,0,.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 20;
    margin-top: 16px;
  }
  .score-summary-pill {
    font-size: 14px;
    font-weight: 700;
    color: #0f2b5c;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  /* ═══ PDF POPUP MODAL ═══════════════════════════════════════════════════════ */
  #pdfModalOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
  }
  #pdfModalOverlay.active { display: flex; }
  #pdfModalBox {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    width: 92vw;
    max-width: 1150px;
    height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalPopIn 0.2s ease-out;
  }
  @keyframes modalPopIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
  }
  #pdfModalHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: linear-gradient(135deg, #091e42 0%, #0f2b5c 100%);
    color: #fde047;
    font-weight: 800;
    font-size: 15px;
    gap: 12px;
    flex-shrink: 0;
  }
  #pdfModalTitle { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #pdfModalClose {
    background: #dc2626;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13.2px;
    font-weight: 800;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
  #pdfModalClose:hover { background: #b91c1c; transform: scale(1.03); }
  #pdfModalFrame {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
    background: #525659;
  }

  /* NÚT THU HỒI THẨM ĐỊNH */
  .btn-thu-hoi {
    background: #64748b;
    color: #ffffff;
    border: 1.5px solid #475569;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13.2px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .15s;
    white-space: nowrap;
  }
  .btn-thu-hoi:hover {
    background: #475569;
    border-color: #334155;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(51,65,85,.35);
  }

  .auto-save-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 13.1px;
    font-weight: 700;
    color: #15803d;
    background: #dcfce7;
    border: 1px solid #86efac;
    padding: 2px 7px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    transform: translateY(2px);
    margin-top: 4px;
  }
  .auto-save-tag.active {
    opacity: 1;
    transform: translateY(0);
  }

  /* HÀNG PHỤ ẨN/HIỆN CỘT */
  .table-report thead tr.col-toggle-row th {
    background: #eaeaea !important;
    color: #475569 !important;
    padding: 2px 4px !important;
    height: 22px;
    font-weight: 500;
    white-space: nowrap;
    position: sticky;
    top: 40px;
    z-index: 6;
    border-right: 1px solid #d4d4d4;
    vertical-align: middle;
    text-align: center;
  }
  .col-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 16px;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #64748b;
    font-size: 13.2px;
    line-height: 1;
    border-radius: 3px;
  }
  .col-toggle-btn:hover {
    background: #d4d4d4;
    color: #0f2b5c;
  }
  .col-toggle-btn.is-collapsed {
    color: #1d4ed8;
    background: #dbeafe;
  }
  .table-report th.column-hidden,
  .table-report td.column-hidden {
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    overflow: hidden !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: center !important;
  }
  .table-report thead tr:first-child th.column-hidden {
    font-size: 0 !important;
    line-height: 0 !important;
    color: transparent !important;
  }
  .table-report tbody td.column-hidden {
    font-size: 0 !important;
    line-height: 0 !important;
    color: transparent !important;
  }
  .table-report tbody td.column-hidden > * {
    display: none !important;
  }
  .table-report thead tr.col-toggle-row th.column-hidden {
    font-size: 13.2px !important;
    line-height: 1 !important;
    color: #475569 !important;
    padding: 2px 0 !important;
  }

/* ═══════════════════════════════════════════════════════════════════════════
   13. AUTO-SAVE NOTIFICATION TAG & LAYOUT FIX
   ═══════════════════════════════════════════════════════════════════════════ */
.auto-save-tag {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  font-size: 13.1px !important;
  font-weight: 700 !important;
  color: #15803d !important;
  background: #dcfce7 !important;
  border: 1px solid #86efac !important;
  padding: 2px 7px !important;
  border-radius: 4px !important;
  white-space: nowrap !important;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  transform: translateY(2px);
  margin-top: 4px !important;
}
.auto-save-tag.active {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Top navigation spacing and responsiveness */
.top-navbar-container {
  max-width: 1400px !important;
  margin: 0 auto 16px auto !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 4px 10px !important;
}
.top-navbar-nav {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  flex-wrap: wrap !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
.top-nav-link {
  font-family: 'Roboto', sans-serif !important;
  font-size: 13.2px !important;
  padding: 6px 10px !important;
  white-space: nowrap !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODE NAVIGATION BAR FOR WORKSPACE TABS
   ═══════════════════════════════════════════════════════════════════════════ */
.mode-navigation-bar {
  display: flex !important;
  gap: 10px !important;
  margin-bottom: 20px !important;
  border-bottom: 2px solid #e2e8f0 !important;
  padding-bottom: 12px !important;
  align-items: center !important;
}
.mode-navigation-bar .nav-tab-btn {
  text-decoration: none !important;
  font-size: 13.2px !important;
  padding: 8px 18px !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: all 0.2s ease !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOPBAR 100% FULL-WIDTH VỚI RUỘT TRONG KHÓA CHẶT 1400PX CĂN GIỮA (ROYAL FLEXBOX)
   ═══════════════════════════════════════════════════════════════════════════ */
header.topbar,
header,
.topbar,
.header-app {
  width: 100% !important;
  max-width: 100% !important;
  background: #0b2240 !important;
  padding: 12px 0 !important;
  box-sizing: border-box !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  border-bottom: 3.5px solid #d4af37 !important;
  box-shadow: 0 4px 18px rgba(0, 34, 68, 0.4) !important;
}

.topbar-content-container,
.topbar-inner-container {
  max-width: 1400px !important;
  margin: 0 auto !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 15px !important;
  box-sizing: border-box !important;
  gap: 16px !important;
}

/* PHÂN KHU 1: BRAND LOGO VÀ TIÊU ĐỀ HỆ THỐNG */
.brand-section,
.topbar-left {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  text-decoration: none !important;
  flex-shrink: 0 !important;
}

.brand-logo,
.topbar-logo {
  height: 50px !important;
  width: auto !important;
  max-height: 50px !important;
  object-fit: contain !important;
  display: block !important;
  flex-shrink: 0 !important;
}

.brand-title,
.topbar-title-group {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

.brand-title-main,
.topbar-main {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  line-height: 1.25 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.brand-title-sub,
.topbar-sub {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  font-size: 12.5px !important;
  color: #ffffff !important;
  font-weight: 400 !important;
  margin: 3px 0 0 0 !important;
  padding: 0 !important;
  line-height: 1.25 !important;
  opacity: 0.95 !important;
}

/* PHÂN KHU 2: THÔNG TIN TÀI KHOẢN BADGE BO TRÒN */
.user-account-section {
  display: flex !important;
  align-items: center !important;
}

.user-badge-royal,
.user-pill {
  background: rgba(255, 255, 255, 0.12) !important;
  padding: 6px 14px !important;
  border-radius: 20px !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  box-sizing: border-box !important;
}

.user-name-label {
  font-family: 'Roboto', sans-serif !important;
  font-size: 13.2px !important;
  color: #ffffff !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
}

.user-name-label strong {
  color: #ffffff !important;
  font-weight: 700 !important;
}

.role-badge-royal {
  padding: 3px 10px !important;
  border-radius: 12px !important;
  font-size: 13.1px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  display: inline-block !important;
  white-space: nowrap !important;
}

.role-badge-royal.role-admin-tong,
.role-badge.admin {
  background: #dc2626 !important;
  color: #ffffff !important;
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.6) !important;
}

.role-badge-royal.role-unit-user,
.role-badge.user {
  background: #0284c7 !important;
  color: #ffffff !important;
}

/* PHÂN KHU 3: BỘ ĐÔI 2 NÚT BẤM TIỆN ÍCH */
.header-actions-section,
.topbar-right {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
}

.btn-royal-action {
  font-family: 'Roboto', sans-serif !important;
  font-size: 13.2px !important;
  font-weight: 600 !important;
  padding: 7px 14px !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  line-height: 1.2 !important;
}

/* Nút [🏠 Hub Portal / Trở về trang chủ] - Xanh dương thẫm */
.btn-hub-portal,
.btn-top.btn-home {
  background: #1d4ed8 !important;
  color: #ffffff !important;
  border: 1px solid #3b82f6 !important;
}

.btn-hub-portal:hover,
.btn-top.btn-home:hover {
  background: #1e40af !important;
  border-color: #60a5fa !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

/* Nút [Đăng xuất ➡️] - Đỏ đô */
.btn-logout-royal,
.btn-top.btn-logout {
  background: #991b1b !important;
  color: #ffffff !important;
  border: 1px solid #b91c1c !important;
}

.btn-logout-royal:hover,
.btn-top.btn-logout:hover {
  background: #7f1d1d !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

.top-navbar-container, .container-fluid, .wrapper, #content-wrapper, .main-panel, .main-content, .main-area {
  max-width: 1400px !important;
  margin: 0 auto !important;
  float: none !important;
  box-shadow: 0 0 15px rgba(0,0,0,0.05);
  background: #ffffff;
  position: relative;
  box-sizing: border-box !important;
}

/* Page heading standalone rule */
.page-heading,
.header-title-main {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #002244 !important;
  margin: 0 0 10px 0 !important;
  padding: 0 !important;
  line-height: 1.35 !important;
  display: block !important;
}
.page-desc {
font-size: 14px !important;
  font-weight: 400 !important;
  color: #000000 !important;
  margin: 0 0 10px 0 !important;
  padding: 0 !important;
  line-height: 1.35 !important;
  display: block !important;
}

/* Autosave status badge */
.autosave-status {
  color: #28a745 !important;
  font-size: 13.1px !important;
  font-weight: bold !important;
  position: absolute !important;
  right: 5px !important;
  top: 2px !important;
  z-index: 10 !important;
  pointer-events: none !important;
  transition: opacity 0.25s ease !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   POPUP HƯỚNG DẪN NHẬP SỐ LIỆU (DÍNH CHẶT DÒNG CHỈ TIÊU, KHÔNG NHẢY VỊ TRÍ)
   ═══════════════════════════════════════════════════════════════════════════ */
.huong-dan-wrapper {
  position: relative !important;
  display: inline-block !important;
}

.popup-huong-dan {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  z-index: 1000 !important;
  display: none;
  width: 280px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-sizing: border-box !important;
  text-align: left !important;
}

.popup-huong-dan.show {
  display: block !important;
}

.popup-huong-dan-header {
  background: #0f2d59 !important;
  color: #ffffff !important;
  padding: 6px 10px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  border-top-left-radius: 5px !important;
  border-top-right-radius: 5px !important;
}

.popup-huong-dan-close {
  background: transparent !important;
  border: none !important;
  color: #ffffff !important;
  font-size: 16px !important;
  cursor: pointer !important;
  line-height: 1 !important;
  padding: 0 4px !important;
  opacity: 0.8 !important;
}
.popup-huong-dan-close:hover {
  opacity: 1 !important;
}

.popup-huong-dan-body {
  padding: 8px 10px !important;
  font-size: 11.5px !important;
  color: #334155 !important;
  line-height: 1.45 !important;
  max-height: 180px !important;
  overflow-y: auto !important;
  white-space: pre-wrap !important;
  background: #ffffff !important;
  border-bottom-left-radius: 5px !important;
  border-bottom-right-radius: 5px !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BIỂU TƯỢNG LOA THÔNG BÁO HAI CHIỀU TRÊN TOPBAR / MENU NGANG
   ═══════════════════════════════════════════════════════════════════════════ */
.top-navbar-right-section {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin-left: auto !important;
}

.thidua-notify-wrapper {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
}

.btn-thidua-notify {
  position: relative !important;
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 8px !important;
  padding: 5px 9px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
  line-height: 1 !important;
}

.btn-thidua-notify:hover {
  background: rgba(255, 255, 255, 0.22) !important;
  border-color: rgba(255, 255, 255, 0.45) !important;
  transform: translateY(-1px) !important;
}

.btn-thidua-notify .notify-icon {
  font-size: 16px !important;
  line-height: 1 !important;
}

.notify-badge {
  position: absolute !important;
  top: -5px !important;
  right: -7px !important;
  background: #dc2626 !important; /* Đỏ tươi */
  color: #ffffff !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  min-width: 17px !important;
  height: 17px !important;
  line-height: 17px !important;
  border-radius: 9999px !important;
  text-align: center !important;
  padding: 0 4px !important;
  box-shadow: 0 2px 5px rgba(220, 38, 38, 0.6) !important;
  box-sizing: border-box !important;
}

.notification-dropdown {
  position: absolute !important;
  right: 0 !important;
  top: calc(100% + 8px) !important;
  width: 360px !important;
  max-height: 400px !important; /* Khóa chiều cao nhất định */
  overflow-y: auto !important;   /* Tự động sinh thanh kéo cuộn nếu danh sách dài */
  background: #ffffff !important;
  border: 1px solid #ddd !important;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
  z-index: 9999 !important;
  border-radius: 8px !important;
  display: none;
}

.notification-dropdown.show {
  display: block !important;
}

.notify-dropdown-header {
  padding: 10px 14px !important;
  background: #0b2240 !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  border-top-left-radius: 7px !important;
  border-top-right-radius: 7px !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
}

.notify-header-title {
  font-size: 13.2px !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
  color: #ffffff !important;
}

.btn-mark-all-read {
  background: rgba(255, 255, 255, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: #e2e8f0 !important;
  font-size: 10.5px !important;
  padding: 3px 8px !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.btn-mark-all-read:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  color: #ffffff !important;
}

.notify-dropdown-list {
  padding: 0 !important;
  margin: 0 !important;
}

.notify-item {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  padding: 10px 12px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  transition: background 0.15s ease !important;
  text-decoration: none !important;
}

.notify-item:hover {
  background: #f8fafc !important;
}

.notify-item.unread {
  background: #eff6ff !important;
  border-left: 3.5px solid #2563eb !important;
}

.notify-item-icon {
  font-size: 16px !important;
  line-height: 1.2 !important;
  flex-shrink: 0 !important;
  margin-top: 2px !important;
}

.notify-item-content {
  flex: 1 !important;
  min-width: 0 !important;
}

.notify-item-msg {
  font-size: 13.2px !important;
  color: #1e293b !important;
  line-height: 1.4 !important;
  word-break: break-word !important;
  font-weight: 500 !important;
}

.notify-item.unread .notify-item-msg {
  font-weight: 700 !important;
  color: #0f172a !important;
}

.notify-item-time {
  font-size: 10.5px !important;
  color: #64748b !important;
  margin-top: 4px !important;
}

.notify-empty-state {
  padding: 24px 16px !important;
  text-align: center !important;
  color: #94a3b8 !important;
  font-size: 13.2px !important;
  font-style: italic !important;
}

.top-nav-user-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 20px !important;
  padding: 4px 12px !important;
  color: #ffffff !important;
  font-size: 13.2px !important;
}

.top-nav-user-badge .user-avatar-icon {
  font-size: 13.2px !important;
}

.top-nav-user-badge .user-display-name {
  font-weight: 700 !important;
  color: #f8fafc !important;
  max-width: 140px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.role-pill-badge {
  font-size: 10px !important;
  font-weight: 800 !important;
  padding: 2px 6px !important;
  border-radius: 10px !important;
  letter-spacing: 0.3px !important;
}

.role-pill-badge.role-admin {
  background: #dc2626 !important;
  color: #ffffff !important;
}

.role-pill-badge.role-unit {
  background: #0284c7 !important;
  color: #ffffff !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   THANH TỔNG ĐIỂM ĐỐI CHIẾU SONG PHƯƠNG (TỰ TÍNH VS SAU THẨM ĐỊNH)
   ══════════════════════════════════════════════════════════════════════════ */
.thanh-tong-diem-doi-chieu {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: #fff9e6 !important;
    border: 1px solid #ffeba8 !important;
    padding: 15px !important;
    border-radius: 8px !important;
    gap: 20px !important;
    margin-bottom: 18px !important;
    box-shadow: 0 4px 12px rgba(202, 138, 4, 0.12) !important;
}
.khoi-diem-trai, .khoi-diem-phai {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    min-width: 0 !important;
}
.vach-ngan-doi-chieu {
    width: 1px !important;
    background: #fde68a !important;
    align-self: stretch !important;
    min-height: 55px !important;
}
.dong-tong-diem {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}
.tieu-de-tong-diem {
    font-family: 'Roboto', sans-serif !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    color: #0f2b5c !important;
}
.so-diem-highlight {
    font-family: 'Roboto', sans-serif !important;
    font-weight: 700 !important;
    font-size: 20px !important;
    color: #0f2b5c !important;
    background: #ffffff !important;
    border: 1.5px solid #ca8a04 !important;
    padding: 3px 14px !important;
    border-radius: 6px !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.06) !important;
}
.so-diem-highlight-thamdinh {
    color: #065f46 !important;
    border-color: #059669 !important;
}
.don-vi-diem {
    font-family: 'Roboto', sans-serif !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    color: #854d0e !important;
}
.dai-badge-tabs {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
}
.badge-tab-item {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: #ffffff !important;
    border-radius: 6px !important;
    padding: 3px 8px !important;
    font-family: 'Roboto', sans-serif !important;
    font-size: 13.2px !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
}
.badge-tab-item.badge-tab-a {
    border: 1.5px solid #0284c7 !important;
    color: #0369a1 !important;
}
.badge-tab-item.badge-tab-a strong {
    color: #0c4a6e !important;
    font-size: 13.2px !important;
}
.badge-tab-item.badge-tab-c {
    border: 1.5px solid #eab308 !important;
    color: #a16207 !important;
}
.badge-tab-item.badge-tab-c strong {
    color: #713f12 !important;
    font-size: 13.2px !important;
}
.badge-tab-item.badge-tab-d {
    border: 1.5px solid #ef4444 !important;
    color: #b91c1c !important;
}
.badge-tab-item.badge-tab-d strong {
    color: #7f1d1d !important;
    font-size: 13.2px !important;
}
.badge-tab-item.badge-tab-b {
    border: 1.5px solid #10b981 !important;
    color: #047857 !important;
}
.badge-tab-item.badge-tab-b strong {
    color: #064e3b !important;
    font-size: 13.2px !important;
}
.khoi-dang-tham-dinh {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
    min-height: 48px !important;
    background: #f8fafc !important;
    border: 1.5px dashed #cbd5e1 !important;
    border-radius: 6px !important;
    color: #64748b !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    font-family: 'Roboto', sans-serif !important;
    letter-spacing: 0.3px !important;
}

/* Nút Trả lại hồ sơ khi bị khóa cứng */
.btn-tra-lai:disabled, .btn-tra-lai-disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    filter: grayscale(0.8) !important;
    box-shadow: none !important;
    transform: none !important;
}




/* ============================================================
   KPS / RADIO / HEADER COLOR STYLES - PHASE 9
   ============================================================ */
.col-trang-thai { display: none !important; }
.status-kps { display:inline-block; padding:2px 8px; background:#e2e8f0; color:#475569; font-weight:700; font-size:10.5px; border-radius:10px; letter-spacing:0.5px; border:1px solid #cbd5e1; }
.chk-kps-label { display:flex; align-items:center; gap:4px; cursor:pointer; margin-bottom:3px; font-size:11px; color:#475569; user-select:none; }
.chk-kps-label:hover { color:#1e40af; }
.chk-kps-label input[type="checkbox"] { width:13px; height:13px; cursor:pointer; accent-color:#3b82f6; }
.chk-kps-label.input-thidua-disabled { opacity:0.5; cursor:not-allowed; }
.table-thidua-royal thead th.col-nhap-lieu.th-data-col { background:#0369a1 !important; color:#fff !important; font-weight:700 !important; }
.table-thidua-royal thead th.col-tu-cham.th-data-col { background:#0369a1 !important; color:#fff !important; font-weight:700 !important; }
.table-thidua-royal thead th.col-ghi-chu.th-data-col { background:#0369a1 !important; color:#fff !important; font-weight:700 !important; }
.td-radio-group { display:flex; flex-direction:column; gap:4px; }
.td-radio-group label { display:flex; align-items:center; gap:5px; cursor:pointer; font-size:11.5px; user-select:none; padding:2px 4px; border-radius:4px; transition:background 0.15s; }
.td-radio-group label:hover { background:#f0f9ff; }
.td-radio-group input[type="radio"] { width:14px; height:14px; cursor:pointer; accent-color:#2563eb; flex-shrink:0; }
.col-tu-cham .preview-trang-thai, .col-tu-cham .status-badge { font-size:11px; margin-top:4px; width: 50px;}

/* ============================================================

/* ============================================================
   FOOTER CHUẨN PHOM THIẾT BỊ
   ============================================================ */
footer.page-footer {
  width: 100% !important;
  background: #ffffff !important;
  border-top: 1px solid #e8e8e8 !important;
  padding: 15px 0 !important;
  margin-top: auto !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

footer.page-footer .page-footer-inner {
  max-width: 1400px !important;
  margin: 0 auto !important;
  width: 100% !important;
  text-align: left !important;
  padding: 0 15px !important;
  color: #666666 !important;
  font-size: 13.2px !important;
  box-sizing: border-box !important;
}

/* ============================================================
   CỘT KẾT QUẢ THẨM ĐỊNH - CO GỌN TỐI ĐA
   ============================================================ */
.col-ket-qua-tham-dinh {
    width: 49px !important;
    max-width: 49px !important;
    white-space: nowrap !important;
    text-align: center !important;
    padding: 8px 4px !important;
    font-size: 13.2px !important;
}

.status-badge.preview-xac-dinh-kq{
    white-space: normal !important;      /* XÓA BỎ phong tỏa hàng ngang, cho phép xuống dòng tự do */
    word-break: break-word !important;   /* Tự động ngắt từ thông minh khi chạm vách cột */
    display: block !important;           /* Chuyển từ inline-block sang block để chiếm trọn 100% bề ngang ô */
    width: 100% !important;
    max-width: 50px !important;          /* Thu nhỏ dải băng bọc chữ lại vừa khít với lòng ô Kết quả */
    margin: 4px auto 0 auto !important;  /* Căn giữa ngay ngắn, tạo khoảng cách nhẹ với số điểm bên trên */
    padding: 3px 2px !important;         /* Gọt mỏng padding biên để tăng diện tích hiển thị cho chữ */
    text-align: center !important;
    line-height: 1.2 !important;         /* Thu hẹp khoảng cách giữa dòng trên và dòng dưới khi chữ bị bẻ đôi */
    font-size: 11px !important;
}

