/* CODE.NTT v1974 — HTML/SQL semantic desktop column-fit contract.
   Data-heavy HTML/SQL pages use the whole content width on desktop instead of
   forcing a second horizontal transport bar. Narrow/mobile screens keep the
   historical component-owned horizontal scroll from the module styles. */

@media (min-width:1100px){
  /* Only list/manage/report surfaces. Editor/runtime/detail code panes are not touched. */
  body[data-code="htmldsbai"] .table-responsive,
  body[data-code="htmlmanage"] .table-responsive,
  body[data-code="htmltypes"] .table-responsive,
  body[data-code="htmlcurriculum"] .table-responsive,
  body[data-code="htmlcoverage"] .table-responsive,
  body[data-code="htmlsubmitted"] .table-responsive,
  body[data-code="htmlroomsubmissions"] .table-responsive,
  body[data-code="htmlrank"] .table-responsive,
  body[data-code="htmlprogress"] .table-responsive,
  body[data-code="htmlstats"] .table-responsive,
  body[data-code="htmlsubmissionstats"] .table-responsive,
  body[data-code="sqlmanage"] .ntt-sql-table-scroll,
  body[data-code="sqladdroom"] .ntt-sql-table-scroll,
  body[data-code="sqlroommanage"] .ntt-room-table-scroll,
  body[data-code="sqlsubmitted"] .table-responsive,
  body[data-code="sqlrank"] .table-responsive,
  body[data-code="sqlprogress"] .table-responsive,
  body[data-code="sqlstats"] .table-responsive,
  body[data-code="sqlsubmissionstats"] .table-responsive,
  body[data-code="htmladdroom"] .ntt-room-table-scroll,
  body[data-code="htmlroommanage"] .ntt-room-table-scroll{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow-x:hidden!important;
  }

  body[data-code="htmldsbai"] .table-responsive>table,
  body[data-code="htmlmanage"] .table-responsive>table,
  body[data-code="htmltypes"] .table-responsive>table,
  body[data-code="htmlcurriculum"] .table-responsive>table,
  body[data-code="htmlcoverage"] .table-responsive>table,
  body[data-code="htmlsubmitted"] .table-responsive>table,
  body[data-code="htmlroomsubmissions"] .table-responsive>table,
  body[data-code="htmlrank"] .table-responsive>table,
  body[data-code="htmlprogress"] .table-responsive>table,
  body[data-code="htmlstats"] .table-responsive>table,
  body[data-code="htmlsubmissionstats"] .table-responsive>table,
  body[data-code="sqlsubmitted"] .table-responsive>table,
  body[data-code="sqlrank"] .table-responsive>table,
  body[data-code="sqlprogress"] .table-responsive>table,
  body[data-code="sqlstats"] .table-responsive>table,
  body[data-code="sqlsubmissionstats"] .table-responsive>table,
  body[data-code="sqlmanage"] .ntt-sql-table-scroll>table,
  body[data-code="sqladdroom"] .ntt-sql-table-scroll>table,
  body[data-code="sqlroommanage"] .ntt-room-table-scroll>table,
  body[data-code="htmladdroom"] .ntt-room-table-scroll>table,
  body[data-code="htmlroommanage"] .ntt-room-table-scroll>table{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    table-layout:fixed!important;
  }

  body[data-code="htmldsbai"] .table-responsive>table :is(th,td),
  body[data-code="htmlmanage"] .table-responsive>table :is(th,td),
  body[data-code="htmltypes"] .table-responsive>table :is(th,td),
  body[data-code="htmlcurriculum"] .table-responsive>table :is(th,td),
  body[data-code="htmlcoverage"] .table-responsive>table :is(th,td),
  body[data-code="htmlsubmitted"] .table-responsive>table :is(th,td),
  body[data-code="htmlroomsubmissions"] .table-responsive>table :is(th,td),
  body[data-code="htmlrank"] .table-responsive>table :is(th,td),
  body[data-code="htmlprogress"] .table-responsive>table :is(th,td),
  body[data-code="htmlstats"] .table-responsive>table :is(th,td),
  body[data-code="htmlsubmissionstats"] .table-responsive>table :is(th,td),
  body[data-code="sqlsubmitted"] .table-responsive>table :is(th,td),
  body[data-code="sqlrank"] .table-responsive>table :is(th,td),
  body[data-code="sqlprogress"] .table-responsive>table :is(th,td),
  body[data-code="sqlstats"] .table-responsive>table :is(th,td),
  body[data-code="sqlsubmissionstats"] .table-responsive>table :is(th,td),
  body[data-code="sqlmanage"] .ntt-sql-table-scroll>table :is(th,td),
  body[data-code="sqladdroom"] .ntt-sql-table-scroll>table :is(th,td),
  body[data-code="sqlroommanage"] .ntt-room-table-scroll>table :is(th,td),
  body[data-code="htmladdroom"] .ntt-room-table-scroll>table :is(th,td),
  body[data-code="htmlroommanage"] .ntt-room-table-scroll>table :is(th,td){
    min-width:0!important;
    max-width:none!important;
    overflow-wrap:anywhere;
    word-break:normal;
  }

  /* HTML library: descriptive columns get most of the width; numeric/status columns stay compact. */
  body[data-code="htmldsbai"] .ntt-html-list-table :is(th,td){width:auto!important;}
  body[data-code="htmldsbai"] .ntt-html-list-table :is(th,td):nth-child(1){width:9%!important;}
  body[data-code="htmldsbai"] .ntt-html-list-table :is(th,td):nth-child(2){width:23%!important;}
  body[data-code="htmldsbai"] .ntt-html-list-table :is(th,td):nth-child(3){width:11%!important;}
  body[data-code="htmldsbai"] .ntt-html-list-table :is(th,td):nth-child(4){width:12%!important;}
  body[data-code="htmldsbai"] .ntt-html-list-table :is(th,td):nth-child(5){width:6%!important;}
  body[data-code="htmldsbai"] .ntt-html-list-table :is(th,td):nth-child(6),
  body[data-code="htmldsbai"] .ntt-html-list-table :is(th,td):nth-child(7){width:7%!important;}
  body[data-code="htmldsbai"] .ntt-html-list-table :is(th,td):nth-child(8){width:7%!important;}
  body[data-code="htmldsbai"] .ntt-html-list-table :is(th,td):nth-child(9){width:6%!important;}
  body[data-code="htmldsbai"] .ntt-html-list-table :is(th,td):nth-child(10){width:7%!important;}
  body[data-code="htmldsbai"] .ntt-html-list-table :is(th,td):nth-child(11){width:5%!important;}

  /* HTML add-room: room-presence is informative, not a fixed 185px floor. */
  body[data-code="htmladdroom"] #nttHtmlProblemList .ntt-room-picker-table :is(th,td){width:auto!important;}
  body[data-code="htmladdroom"] #nttHtmlProblemList .ntt-room-picker-table .c-check{width:4%!important;}
  body[data-code="htmladdroom"] #nttHtmlProblemList .ntt-room-picker-table .c-small{width:6%!important;}
  body[data-code="htmladdroom"] #nttHtmlProblemList .ntt-room-picker-table .c-title{width:25%!important;}
  body[data-code="htmladdroom"] #nttHtmlProblemList .ntt-room-picker-table .c-meta{width:14%!important;}
  body[data-code="htmladdroom"] #nttHtmlProblemList .ntt-room-picker-table .ntt-room-awareness-cell{width:20%!important;min-width:0!important;max-width:none!important;}
  body[data-code="htmladdroom"] #nttHtmlProblemList .ntt-room-picker-table .c-actions{width:9%!important;}

  /* SQL manage/add-room: cancel historical pixel floors on desktop only. */
  body[data-code="sqlmanage"] .ntt-sql-manage-table :is(th,td),
  body[data-code="sqladdroom"] .ntt-sql-add-table :is(th,td){width:auto!important;}
  body[data-code="sqlmanage"] .ntt-sql-manage-table .c-stt{width:5%!important;}
  body[data-code="sqlmanage"] .ntt-sql-manage-table .c-problem{width:34%!important;}
  body[data-code="sqlmanage"] .ntt-sql-manage-table .c-phase{width:8%!important;}
  body[data-code="sqlmanage"] .ntt-sql-manage-table .c-small{width:5%!important;}
  body[data-code="sqlmanage"] .ntt-sql-manage-table .c-public{width:9%!important;}
  body[data-code="sqlmanage"] .ntt-sql-manage-table .c-support-content{width:8%!important;}
  body[data-code="sqlmanage"] .ntt-sql-manage-table .c-support-public{width:11%!important;}
  body[data-code="sqlmanage"] .ntt-sql-manage-table .c-action{width:10%!important;white-space:normal!important;}

  body[data-code="sqladdroom"] .ntt-sql-add-table .c-select{width:4%!important;}
  body[data-code="sqladdroom"] .ntt-sql-add-table .c-stt{width:5%!important;}
  body[data-code="sqladdroom"] .ntt-sql-add-table :is(th,td):nth-child(3){width:22%!important;}
  body[data-code="sqladdroom"] .ntt-sql-add-table :is(th,td):nth-child(4){width:8%!important;}
  body[data-code="sqladdroom"] .ntt-sql-add-table :is(th,td):nth-child(5),
  body[data-code="sqladdroom"] .ntt-sql-add-table :is(th,td):nth-child(6){width:6%!important;}
  body[data-code="sqladdroom"] .ntt-sql-add-table :is(th,td):nth-child(7){width:12%!important;}
  body[data-code="sqladdroom"] .ntt-sql-add-table :is(th,td):nth-child(8){width:17%!important;}
  body[data-code="sqladdroom"] .ntt-sql-add-table .ntt-room-awareness-cell{width:14%!important;min-width:0!important;max-width:none!important;}
  body[data-code="sqladdroom"] .ntt-sql-add-table .c-action{width:6%!important;white-space:normal!important;}

  /* Room settings (HTML + SQL): inputs shrink with their cell and bulk controls stack. */
  body[data-code="htmlroommanage"] .ntt-room-setting-table :is(th,td),
  body[data-code="sqlroommanage"] .ntt-room-setting-table :is(th,td){width:auto!important;white-space:normal!important;}
  body[data-code="htmlroommanage"] .ntt-room-setting-table .c-title,
  body[data-code="sqlroommanage"] .ntt-room-setting-table .c-title{width:22%!important;}
  body[data-code="htmlroommanage"] .ntt-room-setting-table .c-small,
  body[data-code="sqlroommanage"] .ntt-room-setting-table .c-small{width:5%!important;}
  body[data-code="htmlroommanage"] .ntt-room-setting-table .c-flag,
  body[data-code="sqlroommanage"] .ntt-room-setting-table .c-flag{width:6%!important;}
  body[data-code="htmlroommanage"] .ntt-room-setting-table .c-number,
  body[data-code="sqlroommanage"] .ntt-room-setting-table .c-number{width:7%!important;}
  body[data-code="htmlroommanage"] .ntt-room-setting-table .c-time,
  body[data-code="sqlroommanage"] .ntt-room-setting-table .c-time{width:10%!important;}
  body[data-code="htmlroommanage"] .ntt-room-setting-table .c-feedback,
  body[data-code="sqlroommanage"] .ntt-room-setting-table .c-feedback{width:10%!important;}
  body[data-code="htmlroommanage"] .ntt-room-setting-table .c-actions,
  body[data-code="sqlroommanage"] .ntt-room-setting-table .c-actions{width:10%!important;}
  body[data-code="htmlroommanage"] .ntt-room-setting-table :is(input[type="number"],input[type="datetime-local"],select,.form-control),
  body[data-code="sqlroommanage"] .ntt-room-setting-table :is(input[type="number"],input[type="datetime-local"],select,.form-control){
    width:100%!important;min-width:0!important;max-width:100%!important;
  }
  body[data-code="htmlroommanage"] .ntt-room-setting-table .ntt-room-row-actions,
  body[data-code="sqlroommanage"] .ntt-room-setting-table .ntt-room-row-actions{white-space:normal!important;}

  /* Reports/history keep route-specific semantic widths. v1972 forced every cell
     to width:auto under fixed layout, which made short STT/numeric columns compete
     equally with names/titles. Only wrapping policy is shared here. */
  body[data-code="htmlsubmitted"] .table-responsive>table :is(th,td),
  body[data-code="htmlroomsubmissions"] .table-responsive>table :is(th,td),
  body[data-code="htmlrank"] .table-responsive>table :is(th,td),
  body[data-code="htmlprogress"] .table-responsive>table :is(th,td),
  body[data-code="htmlstats"] .table-responsive>table :is(th,td),
  body[data-code="htmlsubmissionstats"] .table-responsive>table :is(th,td),
  body[data-code="sqlsubmitted"] .table-responsive>table :is(th,td),
  body[data-code="sqlrank"] .table-responsive>table :is(th,td),
  body[data-code="sqlprogress"] .table-responsive>table :is(th,td),
  body[data-code="sqlstats"] .table-responsive>table :is(th,td),
  body[data-code="sqlsubmissionstats"] .table-responsive>table :is(th,td){
    white-space:normal!important;
  }
  body[data-code="htmlsubmissionstats"] .ntt-substats-table .c-person,
  body[data-code="sqlsubmissionstats"] .ntt-substats-table .c-person{width:24%!important;}
  body[data-code="htmlsubmissionstats"] .ntt-substats-table .c-room,
  body[data-code="sqlsubmissionstats"] .ntt-substats-table .c-room{width:20%!important;}
  body[data-code="htmlsubmissionstats"] .ntt-substats-table .c-num,
  body[data-code="sqlsubmissionstats"] .ntt-substats-table .c-num{width:8%!important;}
  body[data-code="htmlsubmissionstats"] .ntt-substats-table .c-last,
  body[data-code="sqlsubmissionstats"] .ntt-substats-table .c-last{width:16%!important;}
}

@media (min-width:1100px){
  body[data-code="htmldsbai"] .ntt-html-list-table :is(th,td){white-space:normal!important;}
}


/* v1973 semantic column allocation: compact metadata stays compact; human-readable
   identity/title fields get the room. Percentages intentionally sum to ~100%. */
@media (min-width:1100px){

  /* HTML manage: STT/select/metrics stay compact; problem identity and actions get space. */
  body[data-code="htmlmanage"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(1){width:4%!important}
  body[data-code="htmlmanage"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(2){width:4%!important}
  body[data-code="htmlmanage"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(3){width:24%!important}
  body[data-code="htmlmanage"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(4){width:10%!important}
  body[data-code="htmlmanage"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(5){width:5%!important}
  body[data-code="htmlmanage"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(6){width:13%!important}
  body[data-code="htmlmanage"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(7){width:6%!important}
  body[data-code="htmlmanage"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(8){width:8%!important}
  body[data-code="htmlmanage"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(9),
  body[data-code="htmlmanage"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(10),
  body[data-code="htmlmanage"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(11){width:5%!important}
  body[data-code="htmlmanage"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(12){width:11%!important}

  /* Coverage has three different data shapes; none should inherit equal columns. */
  body[data-code="htmlcoverage"] .ntt-html-coverage-lessons[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(1){width:4%!important}
  body[data-code="htmlcoverage"] .ntt-html-coverage-lessons[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(2){width:6%!important}
  body[data-code="htmlcoverage"] .ntt-html-coverage-lessons[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(3){width:22%!important}
  body[data-code="htmlcoverage"] .ntt-html-coverage-lessons[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(n+4):nth-child(-n+8){width:7.2%!important}
  body[data-code="htmlcoverage"] .ntt-html-coverage-lessons[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(9){width:22%!important}
  body[data-code="htmlcoverage"] .ntt-html-coverage-lessons[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(10){width:10%!important}

  body[data-code="htmlcoverage"] .ntt-html-coverage-nodes[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(1){width:4%!important}
  body[data-code="htmlcoverage"] .ntt-html-coverage-nodes[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(2){width:8%!important}
  body[data-code="htmlcoverage"] .ntt-html-coverage-nodes[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(3){width:20%!important}
  body[data-code="htmlcoverage"] .ntt-html-coverage-nodes[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(4){width:14%!important}
  body[data-code="htmlcoverage"] .ntt-html-coverage-nodes[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(n+5):nth-child(-n+7){width:6%!important}
  body[data-code="htmlcoverage"] .ntt-html-coverage-nodes[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(n+8):nth-child(-n+10){width:12%!important}

  body[data-code="htmlcoverage"] .ntt-html-coverage-properties[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(1){width:4%!important}
  body[data-code="htmlcoverage"] .ntt-html-coverage-properties[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(2){width:20%!important}
  body[data-code="htmlcoverage"] .ntt-html-coverage-properties[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(3),
  body[data-code="htmlcoverage"] .ntt-html-coverage-properties[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(4){width:10%!important}
  body[data-code="htmlcoverage"] .ntt-html-coverage-properties[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(5){width:20%!important}
  body[data-code="htmlcoverage"] .ntt-html-coverage-properties[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(6){width:36%!important}

  /* HTML types: shared STT is injected by v1886, then Mã/Tên gets the dominant column. */
  body[data-code="htmltypes"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(1){width:4%!important}
  body[data-code="htmltypes"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(2){width:36%!important}
  body[data-code="htmltypes"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(3){width:14%!important}
  body[data-code="htmltypes"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(4){width:18%!important}
  body[data-code="htmltypes"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(5){width:7%!important;white-space:nowrap!important}
  body[data-code="htmltypes"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(6){width:10%!important}
  body[data-code="htmltypes"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(7){width:11%!important}

  /* Curriculum owns STT server-side so colgroup and cells stay aligned. */
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table col.c-stt{width:4%!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table col.c-order{width:8%!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table col.c-phase{width:9%!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table col.c-name{width:18%!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table col.c-skills{width:14%!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table col.c-prerequisite{width:12%!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table col.c-difficulty{width:5%!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table col.c-template{width:8%!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table col.c-variation{width:5%!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table col.c-generated{width:5%!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table col.c-reference{width:6%!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table col.c-readiness{width:6%!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table .c-stt{width:4%!important;white-space:nowrap!important;text-align:right!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table .c-skills{white-space:nowrap!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table .c-name{overflow-wrap:anywhere}

  /* HTML rank/progress: names are deliberately much wider than STT/rank/numeric columns. */
  body[data-code="htmlrank"] .ntt-html-report-table :is(th,td):nth-child(1){width:3.5%!important}
  body[data-code="htmlrank"] .ntt-html-report-table :is(th,td):nth-child(2){width:4.5%!important}
  body[data-code="htmlrank"] .ntt-html-report-table :is(th,td):nth-child(3){width:5.5%!important}
  body[data-code="htmlrank"] .ntt-html-report-table :is(th,td):nth-child(4){width:8%!important}
  body[data-code="htmlrank"] .ntt-html-report-table :is(th,td):nth-child(5){width:16%!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis}
  body[data-code="htmlrank"] .ntt-html-report-table :is(th,td):nth-child(6){width:7%!important}
  body[data-code="htmlrank"] .ntt-html-report-table :is(th,td):nth-child(n+7):nth-child(-n+13){width:6%!important}
  body[data-code="htmlrank"] .ntt-html-report-table :is(th,td):nth-child(14){width:13.5%!important;white-space:nowrap!important}

  body[data-code="htmlprogress"] .ntt-html-report-table :is(th,td):nth-child(1){width:4%!important}
  body[data-code="htmlprogress"] .ntt-html-report-table :is(th,td):nth-child(2){width:6%!important}
  body[data-code="htmlprogress"] .ntt-html-report-table :is(th,td):nth-child(3){width:9%!important}
  body[data-code="htmlprogress"] .ntt-html-report-table :is(th,td):nth-child(4){width:17%!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis}
  body[data-code="htmlprogress"] .ntt-html-report-table :is(th,td):nth-child(5){width:7%!important}
  body[data-code="htmlprogress"] .ntt-html-report-table :is(th,td):nth-child(n+6):nth-child(-n+12){width:6%!important}
  body[data-code="htmlprogress"] .ntt-html-report-table :is(th,td):nth-child(13){width:15%!important;white-space:nowrap!important}

  body[data-code="htmlstats"] .ntt-html-report-table :is(th,td):nth-child(1){width:4%!important}
  body[data-code="htmlstats"] .ntt-html-report-table :is(th,td):nth-child(2){width:10%!important}
  body[data-code="htmlstats"] .ntt-html-report-table :is(th,td):nth-child(3){width:30%!important}
  body[data-code="htmlstats"] .ntt-html-report-table :is(th,td):nth-child(4){width:10%!important}
  body[data-code="htmlstats"] .ntt-html-report-table :is(th,td):nth-child(5){width:9%!important}
  body[data-code="htmlstats"] .ntt-html-report-table :is(th,td):nth-child(6){width:9%!important}
  body[data-code="htmlstats"] .ntt-html-report-table :is(th,td):nth-child(7){width:8%!important}
  body[data-code="htmlstats"] .ntt-html-report-table :is(th,td):nth-child(8){width:8%!important}
  body[data-code="htmlstats"] .ntt-html-report-table :is(th,td):nth-child(9){width:12%!important;white-space:normal!important}

  /* SQL reports mirror the same semantic principle. */
  body[data-code="sqlrank"] .ntt-sql-report-table :is(th,td):nth-child(1){width:4%!important}
  body[data-code="sqlrank"] .ntt-sql-report-table :is(th,td):nth-child(2){width:5%!important}
  body[data-code="sqlrank"] .ntt-sql-report-table :is(th,td):nth-child(3){width:9%!important}
  body[data-code="sqlrank"] .ntt-sql-report-table :is(th,td):nth-child(4){width:17%!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis}
  body[data-code="sqlrank"] .ntt-sql-report-table :is(th,td):nth-child(5){width:7%!important}
  body[data-code="sqlrank"] .ntt-sql-report-table :is(th,td):nth-child(n+6):nth-child(-n+12){width:6%!important}
  body[data-code="sqlrank"] .ntt-sql-report-table :is(th,td):nth-child(13){width:16%!important;white-space:nowrap!important}

  body[data-code="sqlprogress"] .ntt-sql-report-table :is(th,td):nth-child(1){width:4%!important}
  body[data-code="sqlprogress"] .ntt-sql-report-table :is(th,td):nth-child(2){width:10%!important}
  body[data-code="sqlprogress"] .ntt-sql-report-table :is(th,td):nth-child(3){width:20%!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis}
  body[data-code="sqlprogress"] .ntt-sql-report-table :is(th,td):nth-child(4){width:8%!important}
  body[data-code="sqlprogress"] .ntt-sql-report-table :is(th,td):nth-child(n+5):nth-child(-n+10){width:7%!important}
  body[data-code="sqlprogress"] .ntt-sql-report-table :is(th,td):nth-child(11){width:16%!important;white-space:nowrap!important}

  body[data-code="sqlstats"] .ntt-sql-report-table :is(th,td):nth-child(1){width:4%!important}
  body[data-code="sqlstats"] .ntt-sql-report-table :is(th,td):nth-child(2){width:8%!important}
  body[data-code="sqlstats"] .ntt-sql-report-table :is(th,td):nth-child(3){width:22%!important}
  body[data-code="sqlstats"] .ntt-sql-report-table :is(th,td):nth-child(4){width:9%!important}
  body[data-code="sqlstats"] .ntt-sql-report-table :is(th,td):nth-child(5){width:6%!important}
  body[data-code="sqlstats"] .ntt-sql-report-table :is(th,td):nth-child(6){width:8%!important}
  body[data-code="sqlstats"] .ntt-sql-report-table :is(th,td):nth-child(7),
  body[data-code="sqlstats"] .ntt-sql-report-table :is(th,td):nth-child(8),
  body[data-code="sqlstats"] .ntt-sql-report-table :is(th,td):nth-child(9){width:7%!important}
  body[data-code="sqlstats"] .ntt-sql-report-table :is(th,td):nth-child(10),
  body[data-code="sqlstats"] .ntt-sql-report-table :is(th,td):nth-child(11){width:6%!important}
  body[data-code="sqlstats"] .ntt-sql-report-table :is(th,td):nth-child(12){width:10%!important;white-space:normal!important}

  /* Submission statistics owns STT server-side in v1973. */
  body[data-code="htmlsubmissionstats"] .ntt-substats-table .c-stt,
  body[data-code="sqlsubmissionstats"] .ntt-substats-table .c-stt{width:5%!important;min-width:0!important;max-width:none!important;white-space:nowrap!important}
  body[data-code="htmlsubmissionstats"] .ntt-substats-table.is-site .c-person,
  body[data-code="sqlsubmissionstats"] .ntt-substats-table.is-site .c-person{width:25%!important;min-width:0!important}
  body[data-code="htmlsubmissionstats"] .ntt-substats-table.is-site .c-room,
  body[data-code="sqlsubmissionstats"] .ntt-substats-table.is-site .c-room{width:18%!important;min-width:0!important}
  body[data-code="htmlsubmissionstats"] .ntt-substats-table.is-site .c-num,
  body[data-code="sqlsubmissionstats"] .ntt-substats-table.is-site .c-num{width:8%!important}
  body[data-code="htmlsubmissionstats"] .ntt-substats-table.is-site .c-last,
  body[data-code="sqlsubmissionstats"] .ntt-substats-table.is-site .c-last{width:12%!important}
  body[data-code="htmlsubmissionstats"] .ntt-substats-table.is-room .c-person,
  body[data-code="sqlsubmissionstats"] .ntt-substats-table.is-room .c-person{width:35%!important;min-width:0!important}
  body[data-code="htmlsubmissionstats"] .ntt-substats-table.is-room .c-num,
  body[data-code="sqlsubmissionstats"] .ntt-substats-table.is-room .c-num{width:9%!important}
  body[data-code="htmlsubmissionstats"] .ntt-substats-table.is-room .c-last,
  body[data-code="sqlsubmissionstats"] .ntt-substats-table.is-room .c-last{width:15%!important}
}

/* Narrow screens keep intentional local scrolling and minimum readable widths. */
@media (max-width:1099px){
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table{width:1320px!important;min-width:1320px!important;table-layout:fixed!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table col.c-stt{width:54px!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table col.c-order{width:118px!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table col.c-phase{width:105px!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table col.c-name{width:250px!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table col.c-skills{width:165px!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table col.c-prerequisite{width:155px!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table col.c-difficulty{width:66px!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table col.c-template{width:105px!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table col.c-variation{width:72px!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table col.c-generated{width:72px!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table col.c-reference{width:88px!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table col.c-readiness{width:110px!important}
}

/* CODE.NTT v1974 — production-feedback refinement.
   These rules intentionally model the FINAL rendered column count, including
   the STT column injected by ui-table-stt.v1886.js.  Do not redistribute these
   tables with generic/equal-width rules. */
@media (min-width:1100px){
  /* HTML curriculum: user-requested 1/3 reduction of Prerequisite (12% -> 8%)
     is transferred to the terminal Publish readiness column (6% -> 10%). */
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table col.c-prerequisite{width:8%!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table col.c-readiness{width:10%!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table .c-readiness{overflow-wrap:normal!important;word-break:normal!important}

  /* HTML manage FINAL rendered shape = STT + select + 10 business columns.
     Actions need enough width to avoid one button per line. */
  body[data-code="htmlmanage"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(1){width:3%!important}
  body[data-code="htmlmanage"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(2){width:3%!important}
  body[data-code="htmlmanage"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(3){width:22%!important}
  body[data-code="htmlmanage"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(4){width:8%!important}
  body[data-code="htmlmanage"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(5){width:4%!important}
  body[data-code="htmlmanage"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(6){width:11%!important}
  body[data-code="htmlmanage"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(7){width:5%!important}
  body[data-code="htmlmanage"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(8){width:7%!important}
  body[data-code="htmlmanage"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(9),
  body[data-code="htmlmanage"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(10),
  body[data-code="htmlmanage"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(11){width:4%!important}
  body[data-code="htmlmanage"] .ntt-html-browser-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(12){width:25%!important}
  body[data-code="htmlmanage"] .ntt-html-manage-row .ntt-html-actions{margin-top:0!important;gap:4px!important;align-items:center}

  /* HTML library FINAL rendered shape = STT + 11 original columns.
     Code is compact; human-readable short name is the dominant field. */
  body[data-code="htmldsbai"] .ntt-html-list-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(1){width:3.5%!important}
  body[data-code="htmldsbai"] .ntt-html-list-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(2){width:7.5%!important;white-space:nowrap!important}
  body[data-code="htmldsbai"] .ntt-html-list-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(3){width:25%!important}
  body[data-code="htmldsbai"] .ntt-html-list-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(4){width:9.5%!important}
  body[data-code="htmldsbai"] .ntt-html-list-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(5){width:10.5%!important}
  body[data-code="htmldsbai"] .ntt-html-list-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(6){width:4.5%!important}
  body[data-code="htmldsbai"] .ntt-html-list-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(7),
  body[data-code="htmldsbai"] .ntt-html-list-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(8),
  body[data-code="htmldsbai"] .ntt-html-list-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(9){width:6%!important}
  body[data-code="htmldsbai"] .ntt-html-list-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(10){width:4.5%!important}
  body[data-code="htmldsbai"] .ntt-html-list-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(11){width:6%!important}
  body[data-code="htmldsbai"] .ntt-html-list-table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(12){width:11%!important}

  /* HTML submission history FINAL rendered shape = STT + 8 original columns.
     Explicit percentages also defeat the late-loaded v1790 pixel widths. */
  body[data-code="htmlsubmitted"] .ntt-html-submitted-browser .table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(1){width:4%!important;white-space:nowrap!important}
  body[data-code="htmlsubmitted"] .ntt-html-submitted-browser .table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(2){width:15%!important;white-space:nowrap!important}
  body[data-code="htmlsubmitted"] .ntt-html-submitted-browser .table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(3){width:29%!important}
  body[data-code="htmlsubmitted"] .ntt-html-submitted-browser .table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(4){width:10%!important}
  body[data-code="htmlsubmitted"] .ntt-html-submitted-browser .table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(5){width:12%!important}
  body[data-code="htmlsubmitted"] .ntt-html-submitted-browser .table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(6){width:5%!important;white-space:nowrap!important}
  body[data-code="htmlsubmitted"] .ntt-html-submitted-browser .table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(7){width:9%!important}
  body[data-code="htmlsubmitted"] .ntt-html-submitted-browser .table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(8){width:8%!important;white-space:nowrap!important}
  body[data-code="htmlsubmitted"] .ntt-html-submitted-browser .table[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(9){width:8%!important;white-space:nowrap!important}

  /* SQL submission history without candidate column: make Bài dominant. */
  body[data-code="sqlsubmitted"] .ntt-v1790-sql-submissions:not(.has-candidate)[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(1){width:4%!important;white-space:nowrap!important}
  body[data-code="sqlsubmitted"] .ntt-v1790-sql-submissions:not(.has-candidate)[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(2){width:13%!important;white-space:nowrap!important}
  body[data-code="sqlsubmitted"] .ntt-v1790-sql-submissions:not(.has-candidate)[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(3){width:47%!important}
  body[data-code="sqlsubmitted"] .ntt-v1790-sql-submissions:not(.has-candidate)[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(4){width:12%!important}
  body[data-code="sqlsubmitted"] .ntt-v1790-sql-submissions:not(.has-candidate)[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(5){width:5%!important;white-space:nowrap!important}
  body[data-code="sqlsubmitted"] .ntt-v1790-sql-submissions:not(.has-candidate)[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(6){width:9%!important;white-space:nowrap!important}
  body[data-code="sqlsubmitted"] .ntt-v1790-sql-submissions:not(.has-candidate)[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(7){width:10%!important;white-space:nowrap!important}

  /* Manager/room variant includes Học sinh, so keep identity wide without starving Bài. */
  body[data-code="sqlsubmitted"] .ntt-v1790-sql-submissions.has-candidate[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(1){width:4%!important;white-space:nowrap!important}
  body[data-code="sqlsubmitted"] .ntt-v1790-sql-submissions.has-candidate[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(2){width:12%!important;white-space:nowrap!important}
  body[data-code="sqlsubmitted"] .ntt-v1790-sql-submissions.has-candidate[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(3){width:16%!important}
  body[data-code="sqlsubmitted"] .ntt-v1790-sql-submissions.has-candidate[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(4){width:35%!important}
  body[data-code="sqlsubmitted"] .ntt-v1790-sql-submissions.has-candidate[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(5){width:11%!important}
  body[data-code="sqlsubmitted"] .ntt-v1790-sql-submissions.has-candidate[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(6){width:5%!important;white-space:nowrap!important}
  body[data-code="sqlsubmitted"] .ntt-v1790-sql-submissions.has-candidate[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(7){width:8%!important;white-space:nowrap!important}
  body[data-code="sqlsubmitted"] .ntt-v1790-sql-submissions.has-candidate[data-ntt-stt-owned="v1886"] :is(th,td):nth-child(8){width:9%!important;white-space:nowrap!important}
}

@media (max-width:1099px){
  /* Preserve local mobile scroll while transferring the same 50px budget. */
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table col.c-prerequisite{width:105px!important}
  body[data-code="htmlcurriculum"] .ntt-html-curriculum-table col.c-readiness{width:160px!important}
}

/* v2027: Quiz submission statistics — deliberate geometry for the real rendered shape.
   v1790 uses table-layout:fixed; without an explicit STT width the first column can absorb
   the whole spare budget and push “Thí sinh” into the middle of a wide screen. */
body[data-code="quizsubmissionstats"] .ntt-substats-table{table-layout:fixed!important}
body[data-code="quizsubmissionstats"] .ntt-substats-table .c-stt{width:56px!important;min-width:56px!important;max-width:56px!important;white-space:nowrap!important}
body[data-code="quizsubmissionstats"] .ntt-substats-table .c-num{width:90px!important;min-width:90px!important;max-width:90px!important;white-space:nowrap!important}
body[data-code="quizsubmissionstats"] .ntt-substats-table .c-last{width:180px!important;min-width:180px!important;max-width:180px!important;white-space:nowrap!important}
body[data-code="quizsubmissionstats"] .ntt-substats-table.is-room{min-width:980px!important}
body[data-code="quizsubmissionstats"] .ntt-substats-table.is-room .c-person{width:auto!important;min-width:300px!important;max-width:none!important;overflow-wrap:anywhere}
body[data-code="quizsubmissionstats"] .ntt-substats-table.is-site{min-width:1180px!important}
body[data-code="quizsubmissionstats"] .ntt-substats-table.is-site .c-person{width:28%!important;min-width:260px!important;max-width:none!important;overflow-wrap:anywhere}
body[data-code="quizsubmissionstats"] .ntt-substats-table.is-site .c-room{width:22%!important;min-width:210px!important;max-width:none!important;overflow-wrap:anywhere}
@media(max-width:1099px){
  body[data-code="quizsubmissionstats"] .ntt-substats-table .c-stt{width:52px!important;min-width:52px!important;max-width:52px!important}
  body[data-code="quizsubmissionstats"] .ntt-substats-table .c-num{width:82px!important;min-width:82px!important;max-width:82px!important}
  body[data-code="quizsubmissionstats"] .ntt-substats-table .c-last{width:165px!important;min-width:165px!important;max-width:165px!important}
}
