.report-table-shell {
  position: relative;
}

.report-evaluate-benefit-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  max-height: none;
  padding-bottom: 8px;
  border: 1px solid #c5d4e8;
  border-radius: 16px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 163, 214, 0.8) rgba(220, 231, 246, 0.75);
  box-shadow: 0 0 0 1px rgba(197, 212, 232, 0.35);
}

.report-kr-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  max-height: none;
  padding-bottom: 8px;
  border: 1px solid #c5d4e8;
  border-radius: 16px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 163, 214, 0.8) rgba(220, 231, 246, 0.75);
  box-shadow: 0 0 0 1px rgba(197, 212, 232, 0.35);
}

.report-kpi-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  max-height: none;
  padding-bottom: 8px;
  border: 1px solid #c5d4e8;
  border-radius: 16px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 163, 214, 0.8) rgba(220, 231, 246, 0.75);
  box-shadow: 0 0 0 1px rgba(197, 212, 232, 0.35);
}

.reb-floating-scroll {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(940px, calc(100vw - 28px));
  padding: 8px 10px;
  border-radius: 16px;
  border: 1px solid rgba(164, 190, 226, 0.36);
  background: linear-gradient(180deg, rgba(250, 253, 255, 0.44) 0%, rgba(237, 245, 255, 0.38) 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1085;
  opacity: 1;
  pointer-events: auto;
  transition: opacity .18s ease, transform .18s ease;
}

.reb-floating-scroll.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.reb-floating-scroll__btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.52);
  background: #ffffff;
  color: #1d4ed8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(30, 64, 175, 0.14);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.reb-floating-scroll__btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(59, 130, 246, 0.62);
  box-shadow: 0 8px 14px rgba(30, 64, 175, 0.2);
}

.reb-floating-scroll__btn:disabled {
  opacity: .45;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.reb-floating-scroll__toggle {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.52);
  background: rgba(255, 255, 255, 0.96);
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(30, 64, 175, 0.12);
  transition: all .18s ease;
}

.reb-floating-scroll__toggle:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.reb-floating-scroll__toggle-fab {
  position: fixed;
  right: 22px;
  bottom: calc(max(24px, env(safe-area-inset-bottom)) + 56px);
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
  z-index: 1085;
  transition: opacity .18s ease, transform .18s ease, background .18s ease, backdrop-filter .18s ease;
  cursor: pointer;
  opacity: 0.48;
  backdrop-filter: blur(6px);
}

.reb-floating-scroll__toggle-fab:hover:not(:disabled) {
  opacity: 1;
  backdrop-filter: none;
}

.reb-floating-scroll__toggle-fab:focus {
  outline: 2px solid rgba(16, 185, 129, 0.5);
  outline-offset: 2px;
}

.reb-floating-scroll__toggle-fab.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.fab-container {
  right: 22px;
  bottom: max(24px, env(safe-area-inset-bottom));
  gap: 12px;
}

.fab-btn,
.fab-top {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.reb-floating-scroll__viewport {
  flex: 1 1 auto;
  height: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 999px;
  border: 1px solid rgba(184, 203, 227, 0.92);
  background: linear-gradient(180deg, #e5eef9 0%, #dce7f5 100%);
  scrollbar-width: thin;
  scrollbar-color: rgba(49, 98, 177, 0.72) transparent;
}

.reb-floating-scroll__content {
  height: 1px;
  min-width: 100%;
}

.reb-floating-scroll__viewport::-webkit-scrollbar {
  height: 12px;
}

.reb-floating-scroll__viewport::-webkit-scrollbar-track {
  background: transparent;
}

.reb-floating-scroll__viewport::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(37, 99, 235, .9), rgba(29, 78, 216, .9));
  border: 2px solid transparent;
  background-clip: content-box;
}

@media (max-width: 991.98px) {
  .reb-floating-scroll {
    display: none !important;
  }
  .reb-floating-scroll__btn {
    display: none !important;
  }
}

@media (max-width: 1365.98px) {
  .reb-floating-scroll {
    display: none !important;
  }
}

.report-evaluate-benefit-table {
  width: 100% !important;
  min-width: 5600px !important;
  table-layout: fixed !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  --reb-sticky-col-1: 120px;
  --reb-sticky-shadow: none;
}

.report-evaluate-benefit-table th,
.report-evaluate-benefit-table td {
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word;
  vertical-align: top !important;
  line-height: 1.4;
  padding: 8px 10px !important;
  min-width: 84px;
}

.report-evaluate-benefit-table col.reb-col-prov { width: 130px; }
.report-evaluate-benefit-table col.reb-col-quant { width: 95px; }
.report-evaluate-benefit-table col.reb-col-text { width: 300px; }
.report-evaluate-benefit-table col.reb-col-score { width: 95px; }

.report-evaluate-benefit-table th {
  text-align: center;
  font-weight: 600;
}

.report-evaluate-benefit-table th:nth-child(1),
.report-evaluate-benefit-table td:nth-child(1) {
  min-width: var(--reb-sticky-col-1);
}

.report-evaluate-benefit-table th:nth-child(2),
.report-evaluate-benefit-table td:nth-child(2) {
  min-width: 90px;
  text-align: center;
}

/* Freeze first 2 columns for horizontal scroll (header row 1 only) */
.report-evaluate-benefit-table thead tr:first-child th:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 13;
  background: var(--rpt-table-head-bg, linear-gradient(180deg, #fbfdff 0%, #eef4fc 48%, #e5eefb 100%));
  background-clip: border-box;
  border-right: 1px solid #c5d4e8 !important;
  box-shadow: inset -1px 0 0 #c9daef, var(--reb-sticky-shadow);
}

.report-evaluate-benefit-table thead tr:first-child th:nth-child(2) {
  position: sticky;
  left: calc(var(--reb-sticky-col-1) - 1px);
  z-index: 12;
  background: var(--rpt-table-head-bg, linear-gradient(180deg, #fbfdff 0%, #eef4fc 48%, #e5eefb 100%));
  background-clip: border-box;
  border-left: 1px solid #c5d4e8 !important;
  border-right: 1px solid #c5d4e8 !important;
  box-shadow: inset -1px 0 0 #c9daef, var(--reb-sticky-shadow);
}

.report-evaluate-benefit-table tbody td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 8;
  background-clip: border-box;
  border-right: 1px solid #d4e1f3 !important;
  box-shadow: inset -1px 0 0 #d4e1f3, var(--reb-sticky-shadow);
}

.report-evaluate-benefit-table tbody td:nth-child(2) {
  position: sticky;
  left: calc(var(--reb-sticky-col-1) - 1px);
  z-index: 7;
  background-clip: border-box;
  border-left: 1px solid #d4e1f3 !important;
  border-right: 1px solid #d4e1f3 !important;
  box-shadow: inset -1px 0 0 #d4e1f3, var(--reb-sticky-shadow);
}

.report-evaluate-benefit-table thead tr:nth-child(n+2) th {
  position: static !important;
  left: auto !important;
  z-index: auto !important;
  box-shadow: none !important;
}

/* คอลัมน์ข้อความ จุดเด่น/ปรับปรุง/แนวทาง */
.report-evaluate-benefit-table th:nth-child(3),
.report-evaluate-benefit-table th:nth-child(4),
.report-evaluate-benefit-table th:nth-child(5),
.report-evaluate-benefit-table th:nth-child(7),
.report-evaluate-benefit-table th:nth-child(8),
.report-evaluate-benefit-table th:nth-child(9),
.report-evaluate-benefit-table th:nth-child(11),
.report-evaluate-benefit-table th:nth-child(12),
.report-evaluate-benefit-table th:nth-child(13),
.report-evaluate-benefit-table th:nth-child(15),
.report-evaluate-benefit-table th:nth-child(16),
.report-evaluate-benefit-table th:nth-child(17),
.report-evaluate-benefit-table th:nth-child(19),
.report-evaluate-benefit-table th:nth-child(20),
.report-evaluate-benefit-table th:nth-child(21),
.report-evaluate-benefit-table th:nth-child(23),
.report-evaluate-benefit-table th:nth-child(24),
.report-evaluate-benefit-table th:nth-child(25),
.report-evaluate-benefit-table td:nth-child(3),
.report-evaluate-benefit-table td:nth-child(4),
.report-evaluate-benefit-table td:nth-child(5),
.report-evaluate-benefit-table td:nth-child(7),
.report-evaluate-benefit-table td:nth-child(8),
.report-evaluate-benefit-table td:nth-child(9),
.report-evaluate-benefit-table td:nth-child(11),
.report-evaluate-benefit-table td:nth-child(12),
.report-evaluate-benefit-table td:nth-child(13),
.report-evaluate-benefit-table td:nth-child(15),
.report-evaluate-benefit-table td:nth-child(16),
.report-evaluate-benefit-table td:nth-child(17),
.report-evaluate-benefit-table td:nth-child(19),
.report-evaluate-benefit-table td:nth-child(20),
.report-evaluate-benefit-table td:nth-child(21),
.report-evaluate-benefit-table td:nth-child(23),
.report-evaluate-benefit-table td:nth-child(24),
.report-evaluate-benefit-table td:nth-child(25) {
  min-width: 300px;
}

.report-evaluate-benefit-table td {
  text-align: left;
}

.report-evaluate-benefit-table th:nth-child(1),
.report-evaluate-benefit-table td:nth-child(1),
.report-evaluate-benefit-table th:nth-child(2),
.report-evaluate-benefit-table td:nth-child(2),
.report-evaluate-benefit-table td:nth-child(6),
.report-evaluate-benefit-table td:nth-child(10),
.report-evaluate-benefit-table td:nth-child(14),
.report-evaluate-benefit-table td:nth-child(18),
.report-evaluate-benefit-table td:nth-child(22),
.report-evaluate-benefit-table td:nth-child(27),
.report-evaluate-benefit-table td:nth-child(28),
.report-evaluate-benefit-table td:nth-child(29),
.report-evaluate-benefit-table td:nth-child(30) {
  white-space: nowrap !important;
  min-width: 95px;
  text-align: center;
}

.report-evaluate-benefit-table td:nth-child(3),
.report-evaluate-benefit-table td:nth-child(4),
.report-evaluate-benefit-table td:nth-child(5),
.report-evaluate-benefit-table td:nth-child(7),
.report-evaluate-benefit-table td:nth-child(8),
.report-evaluate-benefit-table td:nth-child(9),
.report-evaluate-benefit-table td:nth-child(11),
.report-evaluate-benefit-table td:nth-child(12),
.report-evaluate-benefit-table td:nth-child(13),
.report-evaluate-benefit-table td:nth-child(15),
.report-evaluate-benefit-table td:nth-child(16),
.report-evaluate-benefit-table td:nth-child(17),
.report-evaluate-benefit-table td:nth-child(19),
.report-evaluate-benefit-table td:nth-child(20),
.report-evaluate-benefit-table td:nth-child(21),
.report-evaluate-benefit-table td:nth-child(24),
.report-evaluate-benefit-table td:nth-child(25),
.report-evaluate-benefit-table td:nth-child(26) {
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  line-break: auto;
  text-align: left !important;
  text-justify: auto;
  word-spacing: normal;
}

.report-evaluate-benefit-table th:nth-child(3),
.report-evaluate-benefit-table th:nth-child(4),
.report-evaluate-benefit-table th:nth-child(5),
.report-evaluate-benefit-table th:nth-child(7),
.report-evaluate-benefit-table th:nth-child(8),
.report-evaluate-benefit-table th:nth-child(9),
.report-evaluate-benefit-table th:nth-child(11),
.report-evaluate-benefit-table th:nth-child(12),
.report-evaluate-benefit-table th:nth-child(13),
.report-evaluate-benefit-table th:nth-child(15),
.report-evaluate-benefit-table th:nth-child(16),
.report-evaluate-benefit-table th:nth-child(17),
.report-evaluate-benefit-table th:nth-child(19),
.report-evaluate-benefit-table th:nth-child(20),
.report-evaluate-benefit-table th:nth-child(21),
.report-evaluate-benefit-table th:nth-child(24),
.report-evaluate-benefit-table th:nth-child(25),
.report-evaluate-benefit-table th:nth-child(26) {
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  line-break: auto;
}

.report-evaluate-benefit-table td:nth-child(26) {
  text-align: left !important;
}

.report-evaluate-benefit-table td:nth-child(6),
.report-evaluate-benefit-table td:nth-child(10),
.report-evaluate-benefit-table td:nth-child(14),
.report-evaluate-benefit-table td:nth-child(18),
.report-evaluate-benefit-table td:nth-child(22),
.report-evaluate-benefit-table td:nth-child(23) {
  text-align: center !important;
  vertical-align: top !important;
}

#evaluateBenefitTableWrap .report-evaluate-benefit-wrap {
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

#evaluateBenefitTableWrap .report-evaluate-benefit-table.table-bordered {
  border: 0 !important;
}

#evaluateBenefitTableWrap .report-evaluate-benefit-table thead tr:first-child th {
  border-top: 0 !important;
}

#evaluateBenefitTableWrap .report-evaluate-benefit-table tr > *:first-child {
  border-left: 0 !important;
}

#evaluateBenefitTableWrap .report-evaluate-benefit-table tr > *:last-child {
  border-right: 0 !important;
}

#evaluateBenefitTableWrap .report-evaluate-benefit-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

.report-table-scroll {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: var(--rpt-table-radius, 20px);
  padding: 0;
  border: 1px solid var(--rpt-table-border-outer, #c9d7ea);
  background: transparent;
  box-shadow: var(--rpt-table-shadow, 0 4px 18px rgba(15, 23, 42, 0.04)),
              var(--rpt-table-shadow-bottom, 0 10px 14px -12px rgba(15, 23, 42, 0.55));
  scrollbar-width: thin;
  scrollbar-color: var(--rpt-scrollbar-thumb, rgba(124, 163, 214, 0.48)) var(--rpt-scrollbar-track, transparent);
}

.unified-report-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  table-layout: auto;
  background: var(--rpt-table-bg, #ffffff);
  border: 0;
  border-radius: calc(var(--rpt-table-radius, 20px) - 1px);
  font-size: 0.84rem;
  overflow: visible;
}

.unified-report-table thead th {
  position: static;
  top: auto;
  z-index: auto;
  background: var(--rpt-table-head-bg, linear-gradient(180deg, #fbfdff 0%, #eef4fc 48%, #e5eefb 100%));
  color: var(--rpt-table-head-color, #1b2f4c);
  font-weight: 600;
  text-align: center;
  white-space: normal;
  vertical-align: middle;
  border: 1px solid var(--rpt-table-border-head, #c5d4e8);
  line-height: 1.35;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  padding: var(--rpt-th-py, 11px) var(--rpt-th-px, 9px);
}

.unified-report-table thead tr:first-child th:first-child {
  border-top-left-radius: calc(var(--rpt-table-radius, 20px) - 1px);
}

.unified-report-table thead tr:first-child th:last-child {
  border-top-right-radius: calc(var(--rpt-table-radius, 20px) - 1px);
}

.unified-report-table thead tr:nth-child(2) th {
  background: linear-gradient(180deg, #eef4fb 0%, #e3edf9 100%);
  color: #30435f;
  font-size: 0.79rem;
}

.unified-report-table tbody td {
  border: 1px solid var(--rpt-table-border-cell-h, #d4deed);
  vertical-align: middle;
  color: var(--rpt-table-text, #111827);
  white-space: nowrap;
  line-height: 1.45;
  background: var(--rpt-table-bg, #ffffff);
  transition: background-color 0.15s ease, border-color 0.15s ease;
  padding: var(--rpt-td-py, 9px) var(--rpt-td-px, 8px);
}

.unified-report-table tbody tr:nth-child(even) td {
  background: var(--rpt-table-row-even, #f4f8fd);
}

.unified-report-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: calc(var(--rpt-table-radius, 20px) - 1px);
}

.unified-report-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: calc(var(--rpt-table-radius, 20px) - 1px);
}

.unified-report-table td.text-right,
.unified-report-table th.text-right {
  text-align: right;
}

.report-kpi-table thead th,
.report-kr-table thead th {
  max-width: 90px;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.5;
  padding: 7px 5px;
}

/* report-evaluate: non-sticky columns + wider qualitative column */
.report-evaluate-table {
  table-layout: auto !important;
  width: 100% !important;
  min-width: 1200px;
  border-collapse: collapse !important;
}

.report-evaluate-table thead th,
.report-evaluate-table tbody td {
  width: 80px !important;
  min-width: 80px !important;
  max-width: 80px !important;
  white-space: nowrap;
  text-align: center;
}

.report-evaluate-table thead th:nth-child(1),
.report-evaluate-table tbody td:nth-child(1) {
  width: 100px !important;
  min-width: 90px !important;
  max-width: 100px !important;
  text-align: left;
}

.report-evaluate-table thead th:nth-child(2),
.report-evaluate-table tbody td:nth-child(2) {
  width: 60px !important;
  min-width: 60px !important;
  max-width: 60px !important;
}

.report-evaluate-table thead th:nth-child(3),
.report-evaluate-table tbody td:nth-child(3) {
  width: 8px !important;
  min-width: 80px !important;
  max-width: 8px !important;
}

.report-evaluate-table thead th:nth-child(4),
.report-evaluate-table thead th:nth-child(5),
.report-evaluate-table thead th:nth-child(6),
.report-evaluate-table thead th:nth-child(7),
.report-evaluate-table thead th:nth-child(8),
.report-evaluate-table thead th:nth-child(9),
.report-evaluate-table thead th:nth-child(10),
.report-evaluate-table thead th:nth-child(11),
.report-evaluate-table thead th:nth-child(9),
.report-evaluate-table tbody td:nth-child(4),
.report-evaluate-table tbody td:nth-child(5),
.report-evaluate-table tbody td:nth-child(6),
.report-evaluate-table tbody td:nth-child(5),
.report-evaluate-table tbody td:nth-child(7),
.report-evaluate-table tbody td:nth-child(8),
.report-evaluate-table tbody td:nth-child(9),
.report-evaluate-table tbody td:nth-child(10),
.report-evaluate-table tbody td:nth-child(11){
  width: 50px !important;
  min-width: 50px !important;
  max-width: 50px !important;
}

#evaluateTableWrap .report-evaluate-table.table-bordered {
  border: 0 !important;
}

#evaluateTableWrap .report-evaluate-table thead tr:first-child th {
  border-top: 0 !important;
}

#evaluateTableWrap .report-evaluate-table tr > *:first-child {
  border-left: 0 !important;
}

#evaluateTableWrap .report-evaluate-table tr > *:last-child {
  border-right: 0 !important;
}

#evaluateTableWrap .report-evaluate-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

.report-kpi-table {
  table-layout: fixed !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  /* Safari: force overflow by explicit min-width (26 cols: 25×90 + 150) */
  min-width: 2400px;
}

.report-kr-table {
  table-layout: fixed !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  /* Safari: force overflow by explicit min-width (49 cols: 48×90 + 150) */
  min-width: 4470px;
}

.report-kpi-table thead th,
.report-kpi-table tbody td,
.report-kr-table thead th,
.report-kr-table tbody td {
  width: 90px;
  min-width: 90px;
  max-width: 90px;
}

.report-kpi-table thead tr:first-child th[rowspan="3"]:first-child,
.report-kpi-table tbody td:first-child,
.report-kr-table thead tr:first-child th[rowspan="3"]:first-child,
.report-kr-table tbody td:first-child {
  width: 150px !important;
  min-width: 150px !important;
  max-width: 150px !important;
}

.report-kpi-table thead th,
.report-kpi-table tbody td,
.report-kr-table thead th,
.report-kr-table tbody td {
  border: 1px solid var(--rpt-table-border-head, #c5d4e8) !important;
}

#kpiKrTableWrap,
#krTableWrap {
  border: 1px solid var(--rpt-table-border-head, #c5d4e8) !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  background: var(--rpt-table-bg, #ffffff);
}

.report-kpi-table thead tr:first-child th,
.report-kr-table thead tr:first-child th {
  border-top: 0 !important;
}

.report-kpi-table tr > *:first-child,
.report-kr-table tr > *:first-child {
  border-left: 0 !important;
}

.report-kpi-table tr > *:last-child,
.report-kr-table tr > *:last-child {
  border-right: 0 !important;
}

.report-kpi-table tbody tr:last-child td,
.report-kr-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

.report-kr-table thead tr:nth-child(2) th {
  font-size: 0.74rem;
  line-height: 1.5;
}

.report-kr-table thead tr:nth-child(3) th {
  font-size: 0.72rem;
  line-height: 1.5;
}

.report-kr-table tbody td {
  padding: 0.38rem 0.45rem;
  text-align: center;
  line-height: 1.5;
}

.report-kr-table .kr-h1 {
  background: #f8c9b3 !important;
}

.report-kr-table .kr-h2 {
  background: #c7e1f5 !important;
}

.report-kr-table .kr-h3 {
  background: #cce3cc !important;
}

.report-kr-table .kr-h4 {
  background: #edc8e5 !important;
}

.report-kr-table .kr-h5 {
  background: #a8c8e6 !important;
}

.report-kpi-table thead tr:first-child th[rowspan="3"]:first-child,
.report-kr-table thead tr:first-child th[rowspan="3"]:first-child {
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  z-index: 9;
  background: linear-gradient(180deg, #f7fbff 0%, #eaf3ff 55%, #e0ecff 100%);
  color: #0f2f63;
  font-weight: 700;
  box-shadow:
    inset -1px 0 0 #c9daef,
    8px 0 14px -12px rgba(30, 64, 110, 0.35);
}
.report-kpi-table tbody td:first-child,
.report-kr-table tbody td:first-child {
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  z-index: 6;
  box-shadow:
    inset -1px 0 0 #d4e1f3,
    8px 0 14px -12px rgba(30, 64, 110, 0.28);
  background-clip: padding-box;
  font-weight: 600;
  color: #123b73;
  text-align: left;
  padding-left: 12px;
}

.report-kpi-table tbody td:first-child:not([style*="background-color"]) {
  background: #f8fbff !important;
}

.report-kpi-table tbody tr:nth-child(even) td:first-child:not([style*="background-color"]) {
  background: #f1f7ff !important;
}

.report-kr-table tbody td:first-child {
  background: #f8fbff !important;
}

.report-kr-table tbody tr:nth-child(even) td:first-child {
  background: #f1f7ff !important;
}

/* ป้ายชื่อจังหวัดใต้คำว่า "อำเภอ" ตอน drill */
.kr-drill-prov-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1f4f8a;
  margin-top: 4px;
  white-space: normal;
  line-height: 1.4;
}

/* ปุ่มย้อนกลับใน header */
.kr-back-btn {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1.5px solid #3a6fa8 !important;
  background: #fff !important;
  color: #1a4b8a !important;
  box-shadow: 0 1px 4px rgba(30, 64, 110, 0.15);
  transition: background .15s, color .15s, box-shadow .15s;
  white-space: nowrap;
}

.kr-back-btn:hover,
.kr-back-btn:focus {
  background: #1a4b8a !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(30, 64, 110, 0.30);
  text-decoration: none;
}

.report-table-wrap.has-horizontal-scroll-nav .report-table-scroll-nav,
.rpt-table-wrap.has-horizontal-scroll-nav .report-table-scroll-nav {
  z-index: 30;
}

.report-kpi-table tbody td {
  padding: 0.38rem 0.45rem;
  line-height: 1.5;
}

.report-kr-table .kr-opt-detail-btn,
.report-kr-table .kr-opt-detail-btn:visited,
.report-kr-table .kr-detail-btn,
.report-kr-table .kr-detail-btn:visited {
  color: #2563eb !important;
  font-weight: 500;
  text-decoration: underline !important;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color .15s ease;
}

/* Province drill-down link — make visible blue instead of inheriting dark cell text colour */
.report-kr-table .js-report-kr-drill,
.report-kr-table .js-report-kr-drill:visited {
  color: #2563eb !important;
  font-weight: 500;
  text-decoration: underline;
  transition: color .15s ease;
}
.report-kr-table .kr-drill-cell {
  color: #2563eb !important;
  cursor: pointer;
}
.report-kr-table .kr-drill-cell-link {
  display: block;
  width: 100%;
  height: 100%;
  padding: 8px 10px;
  color: #2563eb !important;
  text-decoration: underline;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.45;
}

.report-kr-table .kr-drill-cell-link:visited {
  color: #2563eb !important;
}

.report-kr-table td:first-child,
.report-kr-table th:first-child {
  white-space: normal !important;
}
.report-kr-table .kr-drill-cell:hover .kr-drill-cell-link,
.report-kr-table .kr-drill-cell:focus .kr-drill-cell-link,
.report-kr-table .js-report-kr-drill:hover,
.report-kr-table .js-report-kr-drill:focus {
  color: #1d4ed8 !important;
  text-decoration: underline;
}

.report-kr-table .kr-opt-detail-btn:hover,
.report-kr-table .kr-opt-detail-btn:focus,
.report-kr-table .kr-detail-btn:hover,
.report-kr-table .kr-detail-btn:focus {
  color: #1d4ed8 !important;
}

.report-kr-table .kr-opt-gated-trigger,
.report-kr-table .kr-detail-gated-trigger {
  cursor: pointer;
  color: #64748b;
  font-weight: 500;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}

.report-kr-table .kr-opt-gated-trigger:hover,
.report-kr-table .kr-opt-gated-trigger:focus,
.report-kr-table .kr-detail-gated-trigger:hover,
.report-kr-table .kr-detail-gated-trigger:focus {
  color: #2563eb;
}

.report-kpi-table .js-kpi-detail-link,
.report-kpi-table .js-kpi-detail-link:visited {
  color: #003a8c !important;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all .15s ease;
}

.report-kpi-table .js-report-kpi-drill,
.report-kpi-table .js-report-kpi-drill:visited,
.report-kpi-table .kr-drill-cell-link,
.report-kpi-table .kr-drill-cell-link:visited {
  color: #003a8c !important;
  text-decoration: underline;
}

.report-kpi-table .js-report-kpi-drill {
  cursor: pointer;
}

.report-kpi-table .kr-drill-cell-link {
  display: block;
  width: 100%;
  height: 100%;
}

.report-kpi-table .js-kpi-detail-link:hover,
.report-kpi-table .js-kpi-detail-link:focus {
  color: #002766 !important;
  background: transparent !important;
  text-decoration: underline !important;
}

.report-kpi-table .kr-drill-cell-link:hover,
.report-kpi-table .kr-drill-cell-link:focus {
  color: #002766 !important;
  background: transparent !important;
  text-decoration: underline !important;
}

.report-kpi-table tbody tr:hover td:not([style*="background-color"]) {
  background: var(--rpt-table-bg, #ffffff) !important;
}

.report-kpi-table tbody tr:nth-child(even):hover td:not([style*="background-color"]) {
  background: var(--rpt-table-row-even, #f4f8fd) !important;
}

.report-kpi-table tbody tr:hover td {
  background-image: none !important;
}

.report-kpi-table tbody td[style*="background-color"] .js-kpi-detail-link:hover,
.report-kpi-table tbody td[style*="background-color"] .js-kpi-detail-link:focus {
  background: transparent;
}

#kpiKrLoadingPercent {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.1;
}

@media (max-width: 991.98px) {
  #kpiKrTableWrap,
  #krTableWrap {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: scroll !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
  }

  .unified-report-table {
    font-size: 0.84rem !important;
    width: auto !important;
    min-width: 0 !important;
  }

  .report-evaluate-benefit-table thead th:nth-child(1),
  .report-evaluate-benefit-table thead th:nth-child(2),
  .report-evaluate-benefit-table tbody td:nth-child(1),
  .report-evaluate-benefit-table tbody td:nth-child(2) {
    position: static !important;
    left: auto !important;
    z-index: auto !important;
    box-shadow: none !important;
  }

  .report-kpi-table,
  .report-kr-table {
    table-layout: fixed !important;
    border-collapse: collapse !important;
  }

  .report-kpi-table thead th,
  .report-kpi-table tbody td,
  .report-kr-table thead th,
  .report-kr-table tbody td {
    font-size: 0.84rem !important;
    padding: 7px 5px !important;
    width: 90px !important;
    min-width: 90px !important;
    max-width: 90px !important;
  }

  .report-kpi-table thead tr:first-child th[rowspan="3"]:first-child,
  .report-kpi-table tbody td:first-child,
  .report-kr-table thead tr:first-child th[rowspan="3"]:first-child,
  .report-kr-table tbody td:first-child {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
  }

  #kpiKrTableWrap > .report-kpi-table {
    width: calc(150px + (25 * 90px)) !important;
    min-width: calc(150px + (25 * 90px)) !important;
    max-width: none !important;
  }

  #krTableWrap > .report-kr-table {
    width: calc(150px + (48 * 90px)) !important;
    min-width: calc(150px + (48 * 90px)) !important;
    max-width: none !important;
  }

  #kpiKrTableWrap > .report-kpi-table th,
  #kpiKrTableWrap > .report-kpi-table td,
  #krTableWrap > .report-kr-table th,
  #krTableWrap > .report-kr-table td {
    white-space: nowrap !important;
  }
}
