/* CODE.NTT core UI bundle v813. GENERATED FILE - run php cli_build_assets.php. */

/* ===== SOURCE: theme-modern.css ===== */
/*
  Modern UI Theme (override)
  - Safe: only CSS overrides, no PHP logic changes.
  - Loaded AFTER bootstrap + sb-admin.
*/

:root{
  --ui-bg: #f6f7fb;
  --ui-surface: #ffffff;
  --ui-text: #111827;
  --ui-muted: rgba(17,24,39,.62);
  --ui-border: rgba(17,24,39,.12);
  --ui-border-strong: rgba(17,24,39,.18);
  --ui-shadow-sm: 0 6px 18px rgba(0,0,0,.08);
  --ui-shadow-md: 0 10px 28px rgba(0,0,0,.12);
  --ui-radius: 16px;
  --ui-radius-sm: 12px;
  --sidebar-w: 240px;
}

/* Anti-clickjacking: shown back in footer.php if self == top */
html{ display:none; }

body{
  background: var(--ui-bg);
  color: var(--ui-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  /* SB-Admin sets margin-top; we override to a more modern/consistent spacing */
  margin-top: 64px;
}

@media(min-width:768px){
  body{ margin-top: 56px; }
}

/* Make the overall content look like a modern "surface" card */
#page-wrapper{
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow-sm);
  margin: 12px;
  padding: 16px;
  /* prevent fixed footer overlay */
  padding-bottom: 90px;
}

@media(max-width:767px){
  #page-wrapper{
    margin: 10px;
    padding: 14px;
    padding-bottom: 96px;
    border-radius: var(--ui-radius-sm);
  }
}

/* Reduce the very dark background from sb-admin */
#wrapper{
  background: transparent;
}

/* Fallback: sidebar width (if nav css not loaded) */
@media(min-width:768px){
  #wrapper{ padding-left: var(--sidebar-w); }
  .side-nav{ width: var(--sidebar-w); left: 0; margin-left: 0; }
  .side-nav>li>a{ width: var(--sidebar-w); }
}

/* Navbar (keep Bootstrap 3 structure, just "skin" it) */
.navbar.navbar-inverse{
  background-color: #111827;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(0,0,0,.20);
}

.navbar-inverse .navbar-nav>li>a,
.navbar-inverse .navbar-brand{
  color: rgba(255,255,255,.88);
}

.navbar-inverse .navbar-nav>li>a:hover,
.navbar-inverse .navbar-nav>li>a:focus{
  color: #ffffff;
  background: rgba(255,255,255,.08);
}

.navbar-inverse .navbar-nav>li.active>a,
.navbar-inverse .navbar-nav>li.active>a:hover,
.navbar-inverse .navbar-nav>li.active>a:focus{
  color: #ffffff;
  background: rgba(255,255,255,.14);
  border-radius: 10px;
  margin: 6px 4px;
}

/* Dropdown menus: subtle rounding + shadow */
.dropdown-menu{
  border-radius: 12px;
  box-shadow: var(--ui-shadow-md);
  border: 1px solid var(--ui-border);
}

/* Links */
a{ color: #2563eb; }
a:hover, a:focus{ color: #1d4ed8; }

/* Inputs: modern focus ring */
.form-control{
  border-radius: 10px;
  border-color: var(--ui-border);
}
.form-control:focus{
  border-color: rgba(37,99,235,.45);
  box-shadow: 0 0 0 3px rgba(37,99,235,.18);
}

/* Panels still used widely in SB-Admin; give them a softer modern look without changing HTML */
.panel{
  border-radius: 14px;
  border-color: var(--ui-border);
  box-shadow: 0 4px 14px rgba(0,0,0,.06);
}
.panel-heading{
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

/* Tables: slightly more spacious by default */
.table>thead>tr>th{
  border-bottom: 1px solid var(--ui-border-strong);
}
.table>tbody>tr>td{
  border-top: 1px solid var(--ui-border);
}

/* =========================================================
   Legacy inline styles moved from dulieu/header.php
   (kept to preserve current behaviour)
   ========================================================= */

/* Fixed sidenav, full height */
.sidenav{
  height: 100%;
  width: 225px;
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  background-color: #111;
  overflow-x: hidden;
  padding-top: 20px;
}

/* Style the sidenav links and the dropdown button */
.sidenav a, .dropdown-btn{
  padding: 0px 0px 0px 16px;
  text-decoration: none;
  font-size: 15px;
  color: #999;
  display: block;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  outline: none;
}

/* On mouse-over */
.sidenav a:hover, .dropdown-btn:hover{
  background-color: #000;
  color: #f1f1f1;
}

/* Main content (legacy) */
.main{
  margin-left: 225px;
  font-size: 20px;
  padding: 0px 10px;
}

/* Legacy active class (used in multiple places) */
.active{
  background-color: #000;
  color: #fff;
}

/* Dropdown container (hidden by default) */
.dropdown-container{
  display: none;
  background-color: #262626;
  padding-left: 8px;
}

/* Caret icon */
.fa-caret-down{
  float: right;
  padding-right: 8px;
}

/* Select options: legacy hack for long text */
select option{ width:0; }
select option:hover{ width:auto; }

@media screen and (max-height: 450px){
  .sidenav{ padding-top: 15px; }
  .sidenav a{ font-size: 18px; }
}

.footer{
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  background-color: #222222;
  color: #ffffff;
  text-align: center;
  z-index: 1000;
  border-top: 1px solid rgba(255,255,255,.08);
}

/* Checkbox pill */
.cb-inline{
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  white-space: nowrap;
  line-height: 1.2;
  padding: .25rem .5rem;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}

.cb-inline:hover{
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  border-color: rgba(0,0,0,.18);
}

.cb-inline:focus{
  background: rgba(0,0,255,1);
}

/* Selected state (modern browsers support :has) */
.cb-inline:has(input[type="checkbox"]:checked){
  background: #eefbf3;
  border-color: #34c36b;
  box-shadow: 0 3px 10px rgba(22,163,74,.18);
  color: #0b6b34;
}

.cb-inline:has(input[type="checkbox"]:checked):hover{
  background: #eefbf3;
  border-color: #34c36b;
  box-shadow: 0 3px 10px rgba(22,163,74,.18);
}

.cb-inline input[type="checkbox"]{
  width: 16px;
  height: 16px;
  margin: 0;
}

/* ===== SOURCE: theme-modern-nav.css ===== */
/*
  Modern Nav + Sidebar (Gói 02)
  - Safe overrides for Bootstrap 3 + SB Admin
  - Keeps routing/logic unchanged
*/

:root{
  --nav-bg: rgba(17,24,39,.92);
  --nav-fg: rgba(255,255,255,.88);
  --nav-fg-muted: rgba(255,255,255,.70);
  --nav-border: rgba(255,255,255,.10);

  --side-bg: #0b1220;
  --side-fg: rgba(255,255,255,.76);
  --side-fg-muted: rgba(255,255,255,.62);
  --side-hover: rgba(255,255,255,.08);
  --side-active: rgba(255,255,255,.12);
  --side-border: rgba(255,255,255,.10);
  --sidebar-w: 240px;
}

/* =====================
   Top Navbar
   ===================== */

#navbar1.navbar{
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: top .20s ease;
}

#navbar1 .navbar-brand.navbar-brand-modern{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 8px 16px;
  line-height: 1;
}

#navbar1 .navbar-brand .brand-logo{
  height: 26px;
  width: 26px;
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(0,0,0,.22);
}

#navbar1 .navbar-brand .brand-title{
  font-weight: 750;
  letter-spacing: .2px;
  font-size: 14px;
  color: var(--nav-fg);
}

#navbar1 .navbar-toggle{
  margin-top: 10px;
  margin-bottom: 10px;
  border-radius: 10px;
}

#navbar1 .navbar-nav>li>a{
  border-radius: 12px;
  margin: 6px 4px;
  padding: 10px 12px;
  color: var(--nav-fg-muted);
}

#navbar1 .navbar-nav>li>a:hover,
#navbar1 .navbar-nav>li>a:focus{
  color: #fff;
  background: rgba(255,255,255,.10);
}

#navbar1 .navbar-nav>li.active>a,
#navbar1 .navbar-nav>li.active>a:hover,
#navbar1 .navbar-nav>li.active>a:focus{
  color: #fff;
  background: rgba(255,255,255,.14);
}

/* Top-right dropdown (user menu) */
#navbar1 .top-nav>li>a{
  border-radius: 12px;
  margin: 6px 4px;
  padding: 10px 12px;
  color: var(--nav-fg-muted);
}

#navbar1 .top-nav>li>a:hover,
#navbar1 .top-nav>li>a:focus,
#navbar1 .top-nav>.open>a,
#navbar1 .top-nav>.open>a:hover,
#navbar1 .top-nav>.open>a:focus{
  color: #fff;
  background: rgba(255,255,255,.10);
}

#navbar1 .dropdown-menu{
  padding: 10px;
}

#navbar1 .dropdown-menu form{
  min-width: 260px;
}

#navbar1 .dropdown-menu input[type="text"],
#navbar1 .dropdown-menu input[type="password"]{
  width: 100%;
  margin: 6px 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--ui-border);
}

#navbar1 .dropdown-menu input[type="submit"]{
  width: 100%;
  border-radius: 10px;
  padding: 9px 10px;
  border: 0;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
}

#navbar1 .dropdown-menu input[type="submit"]:hover{
  filter: brightness(.95);
}



/* User menu label truncate + badge */
#navbar1 .me-user-menu .me-user-label{
  display: inline-block;
  max-width: 180px;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#navbar1 .me-user-menu .me-user-badge{
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 18px;
  background: rgba(255,255,255,.15);
  color: #fff;
}

#navbar1 .dropdown-menu.me-user-dropdown{
  padding: 6px 0;
}

#navbar1 .dropdown-menu.me-user-dropdown>li>a{
  padding: 10px 16px;
  white-space: nowrap;
}

#navbar1 .dropdown-menu.me-user-dropdown .me-dropdown-title{
  padding: 10px 16px;
  font-weight: 800;
  color: var(--ui-fg-muted);
}

#navbar1 .dropdown-menu.me-user-dropdown .me-login-form{
  padding: 10px 16px;
}

#navbar1 .dropdown-menu.me-user-dropdown .divider{
  margin: 6px 0;
}

/* =====================
   Sidebar
   ===================== */

@media(min-width:768px){
  /* Slightly wider sidebar for readability */
  #wrapper{ padding-left: var(--sidebar-w); }

  .side-nav{
    /* Ensure the left sidebar spans full viewport height (user feedback: sidebar was too short) */
    position: fixed !important;
    top: 56px;
    bottom: 0;
    height: calc(100vh - 56px);
    left: 0;
    margin-left: 0;
    width: var(--sidebar-w);
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--side-bg);
    border-right: 1px solid var(--side-border);
    box-shadow: 10px 0 24px rgba(0,0,0,.18);
    padding-bottom: 56px;
  }

  .side-nav>li>a{ width: var(--sidebar-w); }
}

/* Mobile: sidebar lives inside collapse; keep it readable */
@media(max-width:767px){
  #navbar1 .navbar-header{
    float: none;
    min-height: 0;
    padding-left: calc(env(safe-area-inset-left, 0px) + 56px);
  }
  #navbar1.navbar{
    left: 0;
    right: 0;
    width: auto;
    max-width: 100vw;
    overflow: visible;
  }
  #navbar1 .navbar-toggle{
    display: block !important;
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    left: calc(env(safe-area-inset-left, 0px) + 8px);
    right: auto;
    margin: 0;
    z-index: 1062;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--nav-border);
    background: var(--nav-bg);
    box-shadow: 0 10px 30px rgba(0,0,0,.28);
  }
  #navbar1 .navbar-toggle:hover,
  #navbar1 .navbar-toggle:focus{
    background: rgba(17,24,39,.98);
  }
  .navbar-ex1-collapse{
    background: var(--side-bg);
    border-top: 1px solid var(--side-border);
    max-height: calc(100vh - 56px);
    overflow-y: auto;
  }
  .side-nav{
    position: static;
    width: 100%;
    background: transparent;
  }

  body.me-mobile-button-only #navbar1.navbar{
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    min-height: 0;
  }
  body.me-mobile-button-only #navbar1 .navbar-header{
    float: none;
    min-height: 0;
    padding-left: calc(env(safe-area-inset-left, 0px) + 56px);
  }
  body.me-mobile-button-only #navbar1 .navbar-brand,
  body.me-mobile-button-only #navbar1 > #topbarNav,
  body.me-mobile-button-only #navbar1 > .top-nav{
    display: none !important;
  }
  body.me-mobile-button-only #navbar1 .navbar-toggle{
    display: block !important;
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    left: calc(env(safe-area-inset-left, 0px) + 8px);
    right: auto;
    margin: 0;
    z-index: 1062;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--nav-border);
    background: var(--nav-bg);
    box-shadow: 0 10px 30px rgba(0,0,0,.28);
  }
  body.me-mobile-button-only #navbar1 .navbar-toggle:hover,
  body.me-mobile-button-only #navbar1 .navbar-toggle:focus{
    background: rgba(17,24,39,.98);
  }
  body.me-mobile-button-only #navbar1 .navbar-ex1-collapse{
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 56px);
    right: 10px;
    left: 10px;
    width: auto;
    max-width: min(420px, calc(100vw - 20px));
    margin-left: 0;
    border: 1px solid var(--side-border);
    border-top: 1px solid var(--side-border);
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(0,0,0,.34);
    padding: 10px 0 14px;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
  }
  body.me-mobile-button-only #navbar1 .navbar-ex1-collapse.collapse{
    display: none !important;
  }
  body.me-mobile-button-only #navbar1 .navbar-ex1-collapse.collapse.in{
    display: block !important;
  }
  body.me-mobile-button-only #navbar1 .navbar-collapse{
    box-shadow: none;
  }
  body.me-mobile-button-only #navbar1 .me-mobile-menu-extra{
    padding: 4px 10px 10px;
    margin: 0 0 8px;
    border-bottom: 1px solid rgba(255,255,255,.10);
  }
  body.me-mobile-button-only #navbar1 .me-mobile-menu-extra > ul{
    float: none !important;
    margin: 0;
  }
  body.me-mobile-button-only #navbar1 .me-mobile-menu-extra #topbarNav,
  body.me-mobile-button-only #navbar1 .me-mobile-menu-extra .top-nav{
    display: block !important;
  }
  body.me-mobile-button-only #navbar1 .me-mobile-menu-extra .navbar-nav > li,
  body.me-mobile-button-only #navbar1 .me-mobile-menu-extra .top-nav > li{
    float: none;
    display: block;
  }
  body.me-mobile-button-only #navbar1 .me-mobile-menu-extra .navbar-nav > li > a,
  body.me-mobile-button-only #navbar1 .me-mobile-menu-extra .top-nav > li > a{
    margin: 4px 0;
    display: block;
  }
  body.me-mobile-button-only #navbar1 .me-mobile-menu-extra .top-nav > li > a .me-user-label{
    max-width: none;
  }
  body.me-mobile-button-only #navbar1 .me-mobile-menu-extra .dropdown > a.dropdown-toggle{
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(255,255,255,.08);
    user-select: none;
  }
  body.me-mobile-button-only #navbar1 .me-mobile-menu-extra .dropdown.open > a.dropdown-toggle,
  body.me-mobile-button-only #navbar1 .me-mobile-menu-extra .dropdown.me-mobile-open > a.dropdown-toggle{
    background: rgba(255,255,255,.08);
    color: #fff;
  }
  body.me-mobile-button-only #navbar1 .me-mobile-menu-extra .dropdown-menu,
  body.me-mobile-button-only #navbar1 .me-mobile-menu-extra .dropdown-menu.dropdown-menu-right{
    position: static;
    float: none;
    width: 100%;
    min-width: 0;
    margin-top: 6px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.10);
    box-shadow: none;
    background: rgba(7,12,20,.96);
  }
  body.me-mobile-button-only #navbar1 .me-mobile-menu-extra .dropdown > .dropdown-menu{
    display: none;
  }
  body.me-mobile-button-only #navbar1 .me-mobile-menu-extra .dropdown.open > .dropdown-menu,
  body.me-mobile-button-only #navbar1 .me-mobile-menu-extra .dropdown.me-mobile-open > .dropdown-menu{
    display: block;
  }
  body.me-mobile-button-only #navbar1 .side-nav{
    margin-top: 0;
    padding-top: 0;
  }
}



/* Sidebar resize handle (desktop) */
@media(min-width:768px){
  /* Keep sidebar scrollable; handle must NOT scroll with content */
  .sidebar-resizer-fixed{
    position: fixed;
    top: 56px;
    bottom: 0;
    height: calc(100vh - 56px);
    left: calc(var(--sidebar-w) - 4px);
    width: 8px;
    cursor: col-resize;
    z-index: 1050; /* above sidebar */
  }
  .sidebar-resizer-fixed::before{
    content: "";
    position: absolute;
    top: 0;
    left: 3px;
    width: 2px;
    height: 100%;
    background: rgba(255,255,255,.10);
    opacity: .28;
    transition: opacity .15s ease;
  }
  .sidebar-resizer-fixed:hover::before{
    opacity: .75;
  }

  /* Safety: hide legacy in-sidebar handle if it exists */
  .side-nav .sidebar-resizer{ display:none !important; }
}

body.sidebar-resizing{
  cursor: col-resize;
  user-select: none;
}

/* Navbar button for sidebar size */
#navbar1 .sidebar-size-toggle{
  color: rgba(255,255,255,.78);
  padding: 8px 10px;
  margin-left: 6px;
  border-radius: 10px;
}
#navbar1 .sidebar-size-toggle:hover,
#navbar1 .sidebar-size-toggle:focus{
  color: #fff;
  background: rgba(255,255,255,.10);
  outline: none;
}

/* Sidebar items */
.side-nav{
  padding-top: 6px;
}

.side-nav>li>a{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: var(--side-fg);
  border-radius: 10px;
  margin: 2px 8px;
}

.side-nav>li>a i.fa{
  display:inline-block !important;
  flex:0 0 18px;
  width: 18px;
  min-width:18px;
  text-align: center;
  opacity: .92;
  line-height:1;
}

.side-nav li a > i.fa:first-child{
  margin-right:2px;
}

.side-nav li a:hover,
.side-nav li a:focus{
  background: var(--side-hover) !important;
  color: #fff;
}

/* Active state for sidebar (override the legacy .active rule safely) */
.side-nav>li.active>a,
.side-nav>li.active>a:hover,
.side-nav>li.active>a:focus{
  background: var(--side-active) !important;
  color: #fff;
}

/* Sub-menus inside dropdown-container */
.dropdown-container{
  background: transparent !important;
  padding: 0 8px 4px 14px;
}

.dropdown-container ul{
  list-style: none;
  padding-left: 0;
  margin: 0;
  border-left: 1px dashed rgba(255,255,255,.16);
}

.dropdown-container li>a{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  margin: 2px 8px;
  border-radius: 10px;
  color: var(--side-fg-muted);
  text-decoration: none;
}

.dropdown-container li>a:hover{
  background: var(--side-hover);
  color: #fff;
}

.dropdown-container li.active>a{
  background: var(--side-active);
  color: #fff;
}

/* The project uses <font color=...> heavily; keep the hint but avoid neon */
.side-nav font{
  filter: saturate(.9);
}

/* =====================
   Custom dropdown buttons in menu.php
   NOTE: HTML structure is legacy (button contains li), so we skin it.
   ===================== */

.dropdown-btn{
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
}

/* Nav groups */
.nav-group-btn{
  margin-top: 6px;
}
.nav-group-btn li.nav-group-title{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 12px;
  opacity: .92;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.03);
}
.nav-group-btn li.nav-group-title .nav-group-text{
  flex:1;
}
.nav-group-btn:hover li.nav-group-title{
  background: rgba(255,255,255,.05);
}
.nav-group-container{
  padding: 2px 8px 6px 12px;
}
.nav-group-container ul.nav-group-list{
  border-left: none;
  padding-left: 0;
  margin: 0;
}

.dropdown-btn li{
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 2px 8px;
  border-radius: 10px;
  color: var(--side-fg);
}

.dropdown-btn:hover li{
  background: var(--side-hover);
  color: #fff;
}

.dropdown-btn.active li{
  background: var(--side-active);
  color: #fff;
}

.dropdown-btn .fa-caret-down{
  margin-left: auto;
  padding-right: 0;
  opacity: .85;
  transition: transform .16s ease;
}

.dropdown-btn.active .fa-caret-down{
  transform: rotate(180deg);
}

/* Improve scrollbar on desktop sidebar */
@media(min-width:768px){
  .side-nav{
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.22) transparent;
  }
  .side-nav::-webkit-scrollbar{ width: 10px; }
  .side-nav::-webkit-scrollbar-thumb{
    background: rgba(255,255,255,.18);
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: padding-box;
  }
}


/* Legacy fallback (in case some pages still use .sidenav/.main) */
@media(min-width:768px){
  .sidenav{ width: var(--sidebar-w); }
  .main{ margin-left: var(--sidebar-w); }
}


/* =========================================================
   v724 - Compact floating identity chip when top navbar hides
   Inspired by the small acrylic affordance at the top of Windows 11.
   v726: có thể kéo tạm thời nếu che control; vị trí không được lưu.
   ========================================================= */
.ntt-scroll-user-chip{
  position:fixed;
  z-index:1065;
  top:6px;
  left:50%;
  display:flex;
  align-items:center;
  gap:9px;
  max-width:min(420px,calc(100vw - 28px));
  min-width:180px;
  padding:9px 15px 8px 12px;
  border:1px solid rgba(37,56,88,.16);
  border-radius:13px;
  background:linear-gradient(180deg,rgba(255,255,255,.94),rgba(245,248,252,.88));
  color:#172033;
  box-shadow:0 8px 24px rgba(15,23,42,.16),0 1px 2px rgba(15,23,42,.10);
  -webkit-backdrop-filter:blur(18px) saturate(145%);
  backdrop-filter:blur(18px) saturate(145%);
  transform:translate(-50%,calc(-100% - 14px)) scale(.96);
  transform-origin:top center;
  opacity:0;
  visibility:hidden;
  pointer-events:auto;
  cursor:grab;
  user-select:none;
  -webkit-user-select:none;
  touch-action:none;
  transition:transform .22s cubic-bezier(.2,.8,.2,1),opacity .18s ease,visibility 0s linear .22s;
}
.ntt-scroll-user-chip.ntt-user-chip-dragging{
  cursor:grabbing;
  transition:none!important;
}
.ntt-scroll-user-chip.ntt-user-chip-moved{
  transform:none;
}
.ntt-scroll-user-chip-handle{
  position:absolute;
  top:3px;
  left:50%;
  width:46px;
  height:3px;
  border-radius:999px;
  transform:translateX(-50%);
  background:rgba(76,96,128,.30);
}
.ntt-scroll-user-chip-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 28px;
  width:28px;
  height:28px;
  margin-top:1px;
  border-radius:9px;
  background:linear-gradient(145deg,#e9f2ff,#dbe9fb);
  color:#285f9b;
  box-shadow:inset 0 0 0 1px rgba(40,95,155,.10);
  font-size:13px;
}
.ntt-scroll-user-chip-copy{
  display:flex;
  flex-direction:column;
  min-width:0;
  line-height:1.12;
}
.ntt-scroll-user-chip-name,
.ntt-scroll-user-chip-account{
  display:block;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.ntt-scroll-user-chip-name{
  max-width:330px;
  color:inherit;
  font-size:13px;
  font-weight:700;
  letter-spacing:.01em;
}
.ntt-scroll-user-chip-account{
  max-width:330px;
  margin-top:3px;
  color:#68758a;
  font-size:10.5px;
  font-weight:600;
}
body.me-navbar-hidden .ntt-scroll-user-chip{
  transform:translate(-50%,0) scale(1);
  opacity:1;
  visibility:visible;
  transition-delay:0s;
}
body[data-site-theme='dark'] .ntt-scroll-user-chip,
body.darkmode .ntt-scroll-user-chip,
body.dark-mode .ntt-scroll-user-chip,
body.theme-dark .ntt-scroll-user-chip{
  border-color:rgba(255,255,255,.12);
  background:linear-gradient(180deg,rgba(26,35,50,.94),rgba(16,24,38,.90));
  color:#f1f5fb;
  box-shadow:0 9px 28px rgba(0,0,0,.38),0 1px 2px rgba(0,0,0,.35);
}
body[data-site-theme='dark'] .ntt-scroll-user-chip-handle,
body.darkmode .ntt-scroll-user-chip-handle,
body.dark-mode .ntt-scroll-user-chip-handle,
body.theme-dark .ntt-scroll-user-chip-handle{
  background:rgba(220,230,245,.25);
}
body[data-site-theme='dark'] .ntt-scroll-user-chip-icon,
body.darkmode .ntt-scroll-user-chip-icon,
body.dark-mode .ntt-scroll-user-chip-icon,
body.theme-dark .ntt-scroll-user-chip-icon{
  background:linear-gradient(145deg,#243954,#1b2d45);
  color:#9fcbff;
  box-shadow:inset 0 0 0 1px rgba(159,203,255,.12);
}
body[data-site-theme='dark'] .ntt-scroll-user-chip-account,
body.darkmode .ntt-scroll-user-chip-account,
body.dark-mode .ntt-scroll-user-chip-account,
body.theme-dark .ntt-scroll-user-chip-account{
  color:#aebbd0;
}
@media (max-width:767px){
  .ntt-scroll-user-chip{display:none!important;}
}
@media (prefers-reduced-motion:reduce){
  .ntt-scroll-user-chip{transition:none!important;}
}

/* v725 - Khi trang không có topmenu, giữ thẻ tài khoản ở giữa mép trái. */
body.me-no-topmenu .ntt-scroll-user-chip{
  top:50%;
  left:6px;
  max-width:min(320px,calc(100vw - 18px));
  min-width:165px;
  padding:10px 14px 10px 15px;
  border-radius:0 13px 13px 0;
  transform:translateY(-50%) scale(1);
  transform-origin:left center;
  opacity:1;
  visibility:visible;
  transition-delay:0s;
}
body.me-no-topmenu .ntt-scroll-user-chip-handle{
  top:50%;
  left:3px;
  width:3px;
  height:44px;
  transform:translateY(-50%);
}
body.me-no-topmenu .ntt-scroll-user-chip-name,
body.me-no-topmenu .ntt-scroll-user-chip-account{
  max-width:250px;
}
/* Sau khi bê khỏi mép trái, hiển thị như một thẻ nổi độc lập. */
body.me-no-topmenu .ntt-scroll-user-chip.ntt-user-chip-moved{
  border-left:1px solid rgba(37,56,88,.16);
  border-radius:13px;
}
body.me-no-topmenu .ntt-scroll-user-chip.ntt-user-chip-moved .ntt-scroll-user-chip-handle{
  top:3px;
  left:50%;
  width:46px;
  height:3px;
  transform:translateX(-50%);
}
body[data-site-theme='dark'].me-no-topmenu .ntt-scroll-user-chip.ntt-user-chip-moved,
body.darkmode.me-no-topmenu .ntt-scroll-user-chip.ntt-user-chip-moved,
body.dark-mode.me-no-topmenu .ntt-scroll-user-chip.ntt-user-chip-moved,
body.theme-dark.me-no-topmenu .ntt-scroll-user-chip.ntt-user-chip-moved{
  border-left-color:rgba(255,255,255,.12);
}
@media (max-width:767px){
  body.me-no-topmenu .ntt-scroll-user-chip{
    display:flex!important;
    left:4px;
    min-width:145px;
    max-width:min(72vw,270px);
    padding:8px 11px 8px 13px;
  }
  body.me-no-topmenu .ntt-scroll-user-chip-icon{
    flex-basis:25px;width:25px;height:25px;
  }
  body.me-no-topmenu .ntt-scroll-user-chip-name{font-size:12px;}
  body.me-no-topmenu .ntt-scroll-user-chip-account{font-size:10px;}
}

/* v762: make the selected Trắc nghiệm submenu unmistakably active. */
.side-nav .dropdown-container li.quiz-nav-current > a,
.side-nav .dropdown-container li.active > a.quiz-nav-active,
.side-nav .dropdown-container a.quiz-nav-active[aria-current="page"]{
  background: var(--side-active) !important;
  color: #fff !important;
  box-shadow: inset 3px 0 0 rgba(255,255,255,.9), 0 0 0 1px rgba(255,255,255,.08) !important;
  font-weight: 800 !important;
}
.side-nav .dropdown-container li.quiz-nav-current > a i,
.side-nav .dropdown-container li.quiz-nav-current > a font,
.side-nav .dropdown-container a.quiz-nav-active[aria-current="page"] i,
.side-nav .dropdown-container a.quiz-nav-active[aria-current="page"] font{
  color: #fff !important;
  opacity: 1 !important;
}


/* v763: persistent active state for the exact Trắc nghiệm submenu after a page reload.
   v1398: generic current markers intentionally share this exact visual contract so
   every selected sidebar function matches Trắc nghiệm (bold white text + white left rail).
   This is intentionally stronger than hover/open-state styling. */
.side-nav a.ntt-quiz-current-link,
.side-nav li.quiz-nav-current > a,
.side-nav .dropdown-container a[data-quiz-current="1"],
.side-nav a.ntt-nav-current-link,
.side-nav li.ntt-nav-current > a{
  background: var(--side-active, #2563eb) !important;
  color: #fff !important;
  border-left: 4px solid #fff !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 3px 10px rgba(15,23,42,.16) !important;
  font-weight: 800 !important;
  opacity: 1 !important;
}
.side-nav a.ntt-quiz-current-link i,
.side-nav a.ntt-quiz-current-link font,
.side-nav li.quiz-nav-current > a i,
.side-nav li.quiz-nav-current > a font,
.side-nav .dropdown-container a[data-quiz-current="1"] i,
.side-nav .dropdown-container a[data-quiz-current="1"] font,
.side-nav a.ntt-nav-current-link i,
.side-nav a.ntt-nav-current-link font,
.side-nav li.ntt-nav-current > a i,
.side-nav li.ntt-nav-current > a font{
  color: #fff !important;
  opacity: 1 !important;
}
.side-nav a.ntt-quiz-current-link:hover,
.side-nav a.ntt-quiz-current-link:focus,
.side-nav a.ntt-nav-current-link:hover,
.side-nav a.ntt-nav-current-link:focus{
  background: var(--side-active, #2563eb) !important;
  color: #fff !important;
}

/* v3020 QA: #page-wrapper inherits width:100% AND a 12px left margin
   (10px on narrow screens) from the existing theme. Without constraining it,
   Bootstrap overflowed the viewport even before the new menu was added.
   Keep the same left gap while including it in the width budget. */
#page-wrapper {max-width:calc(100% - 12px);}

/* v3020 — user-switchable desktop floating sidebar, shared by learner/manager.
   No duplicate menu data or changed permission rules; desktop only. */
.ntt-sidebar-mode-row-v3020{
  position:sticky;
  top:0;
  z-index:2;
  list-style:none;
  margin:0;
  padding:8px 10px;
  background:var(--side-bg,#0b1220);
  border-bottom:1px solid rgba(255,255,255,.12);
}
.ntt-sidebar-mode-row-v3020[hidden]{display:none!important}
.ntt-sidebar-mode-button-v3020{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  width:100%;
  min-height:40px;
  padding:8px 10px;
  border:1px solid rgba(147,197,253,.55);
  border-radius:11px;
  background:rgba(37,99,235,.18);
  color:#f8fafc;
  font-size:13px;
  font-weight:650;
  line-height:1.35;
  cursor:pointer;
}
.ntt-sidebar-mode-button-v3020:hover,
.ntt-sidebar-mode-button-v3020:focus-visible{
  background:rgba(59,130,246,.34);
  color:#fff;
  outline:2px solid #93c5fd;
  outline-offset:2px;
}
.ntt-sidebar-mode-button-v3020 i{flex:none}
.ntt-floating-sidebar-launcher-v3020,
.ntt-floating-sidebar-backdrop-v3020{display:none!important}
@media(min-width:768px){
  body.ntt-sidebar-floating-v3020 #wrapper{padding-left:0!important}
  body.ntt-sidebar-floating-v3020 #page-wrapper{margin-left:12px!important}
  body.ntt-sidebar-floating-v3020 #navbar1 .side-nav{
    position:fixed!important;
    top:68px!important;
    bottom:12px!important;
    height:calc(100vh - 80px)!important;
    height:calc(100dvh - 80px)!important;
    left:12px!important;
    margin-left:0!important;
    width:min(var(--sidebar-w,240px),calc(100vw - 24px))!important;
    padding-bottom:22px;
    z-index:1040;
    transform:translate3d(calc(-100% - 36px),0,0);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    border:1px solid rgba(148,163,184,.3);
    border-radius:15px;
    box-shadow:0 18px 52px rgba(2,6,23,.38);
    transition:transform .2s ease,opacity .2s ease,visibility .2s;
  }
  body.ntt-sidebar-floating-v3020.ntt-sidebar-floating-open-v3020 #navbar1 .side-nav{
    transform:none;
    opacity:1;
    visibility:visible;
    pointer-events:auto;
  }
  body.ntt-sidebar-floating-v3020 #navbar1 .side-nav>li>a{width:100%!important}
  body.ntt-sidebar-floating-v3020 .sidebar-resizer-fixed,
  body.ntt-sidebar-floating-v3020 #navbar1 #btnSidebarToggle{display:none!important}
  body.ntt-sidebar-floating-v3020:not(.ntt-sidebar-floating-open-v3020) .ntt-floating-sidebar-launcher-v3020:not([hidden]){
    display:flex!important;
    align-items:center;
    gap:9px;
    position:fixed;
    top:70px;
    left:12px;
    z-index:1041;
    min-height:44px;
    padding:9px 14px;
    border:1px solid rgba(147,197,253,.65);
    border-radius:12px;
    background:#12223b;
    color:#fff;
    font-size:14px;
    font-weight:700;
    box-shadow:0 10px 28px rgba(2,6,23,.3);
    cursor:pointer;
  }
  body.ntt-sidebar-floating-v3020 .ntt-floating-sidebar-launcher-v3020:hover,
  body.ntt-sidebar-floating-v3020 .ntt-floating-sidebar-launcher-v3020:focus-visible{
    background:#1e3a65;
    outline:2px solid #93c5fd;
    outline-offset:2px;
  }
  body.ntt-sidebar-floating-v3020.ntt-sidebar-floating-open-v3020 .ntt-floating-sidebar-backdrop-v3020:not([hidden]){
    display:block!important;
    position:fixed;
    inset:56px 0 0;
    width:100%;
    height:auto;
    z-index:1028;
    padding:0;
    border:0;
    border-radius:0;
    background:rgba(2,6,23,.28);
    cursor:default;
  }
  body.ntt-sidebar-floating-v3020.me-navbar-hidden #navbar1 .side-nav{
    top:12px!important;
    bottom:12px!important;
    height:calc(100vh - 24px)!important;
    height:calc(100dvh - 24px)!important;
  }
  body.ntt-sidebar-floating-v3020.me-navbar-hidden .ntt-floating-sidebar-launcher-v3020{top:12px!important}
  body.ntt-sidebar-floating-v3020.me-navbar-hidden .ntt-floating-sidebar-backdrop-v3020{top:0!important}
}
@media(max-width:767px){
  .ntt-sidebar-mode-row-v3020{display:none!important}
}
@media(prefers-reduced-motion:reduce){
  body.ntt-sidebar-floating-v3020 #navbar1 .side-nav{transition:none!important}
}

/* ===== SOURCE: ui-searchable-select.v1.css ===== */

/* v778: searchable selects for long room/user/person lists. */
.ntt-search-select{position:relative;display:inline-block;vertical-align:middle;max-width:100%;width:min(100%,460px)}
.ntt-search-select-native{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;opacity:0!important;pointer-events:none!important}
.ntt-search-select-trigger{width:100%;min-height:36px;border:1px solid #d6dce5;border-radius:8px;background:#fff;color:#1f2937;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 10px;text-align:left;font:inherit;line-height:1.35;cursor:pointer;box-shadow:none}
.ntt-search-select-trigger:hover{border-color:#9fb8da;background:#fbfdff}.ntt-search-select.is-open .ntt-search-select-trigger{border-color:#3b82f6;box-shadow:0 0 0 3px rgba(59,130,246,.12)}
.ntt-search-select-value{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.ntt-search-select-icons{display:flex;align-items:center;gap:8px;flex:0 0 auto;color:#6b7280}.ntt-search-select-icons b{font-size:15px;color:#2563eb}.ntt-search-select-icons i{font-style:normal;font-size:11px}
.ntt-search-select-menu{box-sizing:border-box;position:fixed;z-index:2147483200;display:none;background:#fff;border:1px solid #ccd6e3;border-radius:12px;box-shadow:0 18px 44px rgba(15,23,42,.24);padding:8px;overflow:hidden;flex-direction:column;color:#172033}
.ntt-search-select-menu.is-open{display:flex}.ntt-search-select-search{display:flex;align-items:center;gap:7px;border:1px solid #cfd8e5;border-radius:9px;padding:0 9px;background:#fff;flex:0 0 auto}.ntt-search-select-search span{color:#2563eb;font-size:18px}.ntt-search-select-search input{width:100%;height:38px;border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;color:inherit;font:inherit;padding:0!important}
.ntt-search-select-info{font-size:11px;color:#6b7280;padding:6px 4px 4px;flex:0 0 auto}.ntt-search-select-list{overflow-x:hidden;overflow-y:auto;min-height:80px;max-height:330px;border-top:1px solid #eef1f5;padding-top:4px;padding-right:20px;overscroll-behavior:contain;scrollbar-width:none;touch-action:pan-y;-webkit-overflow-scrolling:touch;position:relative}
.ntt-search-select-list::-webkit-scrollbar{width:0;height:0}
.ntt-search-select-scroll-track{display:none;position:absolute;right:9px;width:13px;background:#e5e7eb;border:1px solid #cbd5e1;border-radius:9px;z-index:3;box-sizing:border-box;box-shadow:inset 0 0 0 1px rgba(255,255,255,.55);touch-action:none;cursor:pointer}
.ntt-search-select-scroll-thumb{position:absolute;left:2px;right:2px;top:0;min-height:38px;background:#64748b;border-radius:7px;box-shadow:0 1px 2px rgba(15,23,42,.25);cursor:grab;touch-action:none;will-change:transform}
.ntt-search-select-scroll-thumb:hover{background:#475569}.ntt-search-select-scroll-thumb.is-dragging{background:#334155;cursor:grabbing}
.ntt-search-select-option{width:100%;border:0;background:transparent;color:#1f2937;text-align:left;padding:8px 9px;border-radius:7px;display:flex;align-items:center;justify-content:space-between;gap:10px;font:inherit;cursor:pointer}.ntt-search-select-option:hover,.ntt-search-select-option:focus{background:#edf5ff;outline:0}.ntt-search-select-option.is-selected{background:#e8f1ff;color:#0b57d0;font-weight:600}.ntt-search-select-option:disabled{opacity:.45;cursor:not-allowed}.ntt-search-select-option-text{overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:break-word}.ntt-search-select-empty{padding:18px 10px;text-align:center;color:#6b7280}
body[data-site-theme="dark"] .ntt-search-select-trigger,html[data-theme="dark"] .ntt-search-select-trigger,body.dark-mode .ntt-search-select-trigger,body[data-site-theme="dark"] .ntt-search-select-menu,html[data-theme="dark"] .ntt-search-select-menu,body.dark-mode .ntt-search-select-menu,body[data-site-theme="dark"] .ntt-search-select-search,html[data-theme="dark"] .ntt-search-select-search,body.dark-mode .ntt-search-select-search{background:#111827;color:#e5e7eb;border-color:#374151}
body[data-site-theme="dark"] .ntt-search-select-option,html[data-theme="dark"] .ntt-search-select-option,body.dark-mode .ntt-search-select-option{color:#e5e7eb}body[data-site-theme="dark"] .ntt-search-select-option:hover,html[data-theme="dark"] .ntt-search-select-option:hover,body.dark-mode .ntt-search-select-option:hover{background:#1f2937}body[data-site-theme="dark"] .ntt-search-select-option.is-selected,html[data-theme="dark"] .ntt-search-select-option.is-selected,body.dark-mode .ntt-search-select-option.is-selected{background:#1e3a5f;color:#bfdbfe}
@media(max-width:768px){.ntt-search-select{width:100%;min-width:0!important}.ntt-search-select-menu{max-width:calc(100vw - 16px)}}


body[data-site-theme="dark"] .ntt-search-select-list,html[data-theme="dark"] .ntt-search-select-list,body.dark-mode .ntt-search-select-list{border-top-color:#334155}
body[data-site-theme="dark"] .ntt-search-select-scroll-track,html[data-theme="dark"] .ntt-search-select-scroll-track,body.dark-mode .ntt-search-select-scroll-track{background:#1f2937;border-color:#475569;box-shadow:inset 0 0 0 1px rgba(15,23,42,.45)}
body[data-site-theme="dark"] .ntt-search-select-scroll-thumb,html[data-theme="dark"] .ntt-search-select-scroll-thumb,body.dark-mode .ntt-search-select-scroll-thumb{background:#94a3b8}
body[data-site-theme="dark"] .ntt-search-select-scroll-thumb:hover,html[data-theme="dark"] .ntt-search-select-scroll-thumb:hover,body.dark-mode .ntt-search-select-scroll-thumb:hover{background:#cbd5e1}
body[data-site-theme="dark"] .ntt-search-select-scroll-thumb.is-dragging,html[data-theme="dark"] .ntt-search-select-scroll-thumb.is-dragging,body.dark-mode .ntt-search-select-scroll-thumb.is-dragging{background:#e2e8f0}

/* ===== SOURCE: components-modern.css ===== */
/*
  Modern Components (Gói 03)
  - Styling only: buttons, badges/labels, alerts, panels->cards, tables, pagination, modals.
  - Designed for Bootstrap 3 + SB Admin (keeps existing HTML/PHP logic unchanged).
*/

:root{
  --ui-primary: #2563eb;
  --ui-primary-600: #1d4ed8;
  --ui-success: #16a34a;
  --ui-danger: #dc2626;
  --ui-warning: #d97706;
  --ui-info: #0891b2;
}

/* ---------------------
   Buttons
   --------------------- */
.btn{
  border-radius: 12px;
  padding: 8px 14px;
  font-weight: 600;
  line-height: 1.2;
  transition: transform .04s ease, box-shadow .12s ease, background-color .12s ease, border-color .12s ease, color .12s ease;
}
.btn:active{ transform: translateY(1px); }
.btn:focus{
  outline: none;
  box-shadow: 0 0 0 3px rgba(37,99,235,.18);
}
.btn .fa{ margin-right: 6px; opacity: .92; }

.btn-default{
  background: #fff;
  border-color: var(--ui-border);
  color: var(--ui-text);
}
.btn-default:hover, .btn-default:focus{
  background: rgba(17,24,39,.02);
  border-color: var(--ui-border-strong);
  color: var(--ui-text);
}

.btn-primary{
  background: var(--ui-primary);
  border-color: var(--ui-primary);
}
.btn-primary:hover, .btn-primary:focus{
  background: var(--ui-primary-600);
  border-color: var(--ui-primary-600);
}

.btn-success{ background: var(--ui-success); border-color: var(--ui-success); }
.btn-success:hover, .btn-success:focus{ filter: brightness(.95); }

.btn-danger{ background: var(--ui-danger); border-color: var(--ui-danger); }
.btn-danger:hover, .btn-danger:focus{ filter: brightness(.95); }

.btn-warning{ background: var(--ui-warning); border-color: var(--ui-warning); }
.btn-warning:hover, .btn-warning:focus{ filter: brightness(.96); }

.btn-info{ background: var(--ui-info); border-color: var(--ui-info); }
.btn-info:hover, .btn-info:focus{ filter: brightness(.96); }

.btn-link{ border-radius: 10px; }

/* Buttons group spacing (Bootstrap 3 legacy layouts) */
.btn + .btn{ margin-left: 6px; }

/* ---------------------
   Forms
   --------------------- */
.form-control{
  border-radius: 12px; /* override theme-modern's 10px */
}
.input-group .form-control:first-child{
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}
.input-group .form-control:last-child{
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}
.input-group-addon{
  border-color: var(--ui-border);
  background: rgba(17,24,39,.03);
}
.help-block{ color: var(--ui-muted); }

/* ---------------------
   Panels -> Cards
   --------------------- */
.panel{
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  box-shadow: var(--ui-shadow-sm);
  overflow: hidden;
}
.panel-heading{
  background: rgba(17,24,39,.03);
  border-bottom: 1px solid var(--ui-border);
  padding: 12px 14px;
}

/* Ensure heading text always readable (Bootstrap panels often set white text on colored headings) */
.panel-heading,
.panel-heading a,
.panel-heading .panel-title,
.panel-heading .panel-title a{
  color: var(--ui-text);
  text-shadow: 0 1px 0 rgba(255,255,255,.65), 0 0 1px rgba(0,0,0,.18);
}
.panel-heading a:hover,
.panel-heading a:focus{
  color: var(--ui-text);
  text-decoration: none;
}

.panel-title{
  font-weight: 700;
  letter-spacing: .2px;
}
.panel-body{
  padding: 16px 14px;
}
.panel-footer{
  background: rgba(17,24,39,.02);
  border-top: 1px solid var(--ui-border);
}

/* Keep colored panels readable */
.panel-primary>.panel-heading{ background: rgba(37,99,235,.12); border-bottom-color: rgba(37,99,235,.20); color: var(--ui-text); }
.panel-success>.panel-heading{ background: rgba(22,163,74,.12); border-bottom-color: rgba(22,163,74,.18); color: var(--ui-text); }
.panel-warning>.panel-heading{ background: rgba(217,119,6,.12); border-bottom-color: rgba(217,119,6,.18); color: var(--ui-text); }
.panel-danger>.panel-heading{ background: rgba(220,38,38,.12); border-bottom-color: rgba(220,38,38,.18); color: var(--ui-text); }
.panel-info>.panel-heading{ background: rgba(8,145,178,.12); border-bottom-color: rgba(8,145,178,.18); color: var(--ui-text); }

/* ---------------------
   Tables
   --------------------- */
.table{ background: #fff; }
.table>thead>tr>th{
  background: rgba(17,24,39,.03);
  font-weight: 700;
  padding: 12px 14px;
}
.table>tbody>tr>td{
  padding: 11px 14px;
}
.table-hover>tbody>tr:hover{
  background: rgba(37,99,235,.05);
}
.table-condensed>thead>tr>th,
.table-condensed>tbody>tr>td{
  padding: 7px 10px;
}

/* Wrap provides border + radius */
.table-responsive.table-responsive-modern{
  border: 1px solid var(--ui-border);
  border-radius: 14px;
  overflow: auto;
  margin-bottom: 14px;
  background: #fff;
}
.table-responsive.table-responsive-modern .table{
  margin-bottom: 0;
}
.table-responsive.table-responsive-modern .table>thead>tr>th:first-child{ border-top-left-radius: 14px; }
.table-responsive.table-responsive-modern .table>thead>tr>th:last-child{ border-top-right-radius: 14px; }

/* If tables are already in .table-responsive, still style it */
.table-responsive:not(.table-responsive-modern){
  border: 1px solid var(--ui-border);
  border-radius: 14px;
  overflow: auto;
}
.table-responsive:not(.table-responsive-modern) .table{ margin-bottom: 0; }

/* ---------------------
   Labels / Badges (Bootstrap 3)
   --------------------- */
.label, .badge{
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .2px;
}
.label{
  display: inline-block;
  padding: .38em .68em;
  border: 1px solid transparent;
}
.badge{
  padding: .42em .62em;
}

.label-default{ background: rgba(17,24,39,.06); color: var(--ui-text); border-color: var(--ui-border); }
.label-primary{ background: rgba(37,99,235,.12); color: #1d4ed8; border-color: rgba(37,99,235,.24); }
.label-success{ background: rgba(22,163,74,.12); color: #166534; border-color: rgba(22,163,74,.22); }
.label-info{ background: rgba(8,145,178,.12); color: #155e75; border-color: rgba(8,145,178,.22); }
.label-warning{ background: rgba(217,119,6,.12); color: #92400e; border-color: rgba(217,119,6,.22); }
.label-danger{ background: rgba(220,38,38,.12); color: #991b1b; border-color: rgba(220,38,38,.22); }

.badge{ background: rgba(17,24,39,.10); color: var(--ui-text); }

/* ---------------------
   Alerts / Wells
   --------------------- */
.alert{
  border-radius: 14px;
  border: 1px solid var(--ui-border);
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}
.alert-success{ background: rgba(22,163,74,.10); border-color: rgba(22,163,74,.22); }
.alert-info{ background: rgba(8,145,178,.10); border-color: rgba(8,145,178,.22); }
.alert-warning{ background: rgba(217,119,6,.10); border-color: rgba(217,119,6,.22); }
.alert-danger{ background: rgba(220,38,38,.10); border-color: rgba(220,38,38,.22); }

.well{
  background: rgba(17,24,39,.03);
  border: 1px solid var(--ui-border);
  border-radius: 14px;
  box-shadow: none;
}

/* ---------------------
   Pagination
   --------------------- */
.pagination>li>a, .pagination>li>span{
  border-color: var(--ui-border);
  color: var(--ui-text);
}
.pagination>li>a:hover, .pagination>li>span:hover{
  background: rgba(37,99,235,.06);
  border-color: rgba(37,99,235,.20);
}
.pagination>.active>a, .pagination>.active>span,
.pagination>.active>a:hover, .pagination>.active>span:hover{
  background: rgba(37,99,235,.12);
  border-color: rgba(37,99,235,.24);
  color: #1d4ed8;
  font-weight: 800;
}
.pagination>li:first-child>a, .pagination>li:first-child>span{
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}
.pagination>li:last-child>a, .pagination>li:last-child>span{
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* ---------------------
   Modals
   --------------------- */
.modal-content{
  border-radius: 18px;
  border-color: var(--ui-border);
  box-shadow: var(--ui-shadow-md);
}
.modal-header{
  border-bottom: 1px solid var(--ui-border);
}
.modal-footer{
  border-top: 1px solid var(--ui-border);
}

/* ---------------------
   Misc
   --------------------- */
hr{ border-top: 1px solid var(--ui-border); }
pre{
  border-radius: 14px;
  border-color: var(--ui-border);
  background: rgba(17,24,39,.03);
}
code{ border-radius: 10px; }

/* Better spacing for common SB-Admin rows on small screens */
@media (max-width: 768px){
  .panel-body{ padding: 14px 12px; }
  .btn{ padding: 9px 14px; }
}


/* ---------------------
   Contrast helpers for bright backgrounds
   (make text readable on light/yellow surfaces)
   --------------------- */
.bg-warning, .bg-info, .bg-success{
  color: var(--ui-text) !important;
  text-shadow: 0 1px 0 rgba(255,255,255,.70), 0 0 1px rgba(0,0,0,.18);
}
.bg-primary, .bg-danger{
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.alert, .well, .modal-header, .page-header{
  color: var(--ui-text) !important;
  text-shadow: 0 1px 0 rgba(255,255,255,.65), 0 0 1px rgba(0,0,0,.18);
}
.alert a, .well a, .modal-header a{ color: inherit !important; }
.label-warning{ color: var(--ui-text) !important; }
.label{ text-shadow: 0 1px 1px rgba(0,0,0,.25); }
.label-warning, .label-default{ text-shadow: 0 1px 0 rgba(255,255,255,.6), 0 0 1px rgba(0,0,0,.15); }

/* ===== SOURCE: pages-modern.css ===== */
/* GÓI 04 - Page-level UI enhancements (modern look) */
:root{
  --nav-h: 56px;
  --content-max: 1180px;
  --surface: #ffffff;
  --surface-2: #f7f7f9;
  --border: rgba(0,0,0,.12);
  --text: rgba(0,0,0,.86);
  --muted: rgba(0,0,0,.62);
  --shadow-1: 0 6px 22px rgba(0,0,0,.08);
  --shadow-2: 0 10px 30px rgba(0,0,0,.12);
  --radius: 14px;
}

/* Make doc-like pages readable */
.modern-doc{
  max-width: var(--content-max);
  margin: 0 auto;
}
.modern-doc h1,.modern-doc h2,.modern-doc h3{
  color: var(--text);
  letter-spacing: .2px;
}
.modern-doc h2{
  margin-top: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.modern-doc p, .modern-doc li{
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
}
.modern-doc small{ color: var(--muted); }

.modern-doc pre{
  position: relative;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 12px;
  padding: 12px 12px;
  overflow: auto;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.modern-doc code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
}
.modern-doc .copy-btn{
  position: absolute;
  top: 8px;
  right: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}
.modern-doc .copy-btn:hover{ color: var(--text); box-shadow: var(--shadow-1); }

.call-to-action{
  max-width: var(--content-max);
  margin: 0 auto 14px auto;
  background: linear-gradient(180deg, #ffffff, #fbfbfd);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: var(--shadow-1);
}
.call-to-action h2{
  margin: 0 0 8px 0;
  border: 0;
  padding: 0;
}

/* =========================
   Lists (dsroom/dsbai) - multifreezer
   ========================= */
#freezer-example{
  width: 100%;
  /* JS will convert to viewport-based height */
  max-height: 520px;
  overflow: hidden;
  margin: 12px auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-1);
  background: var(--surface);
}
#freezer-example .table{
  margin-bottom: 0;
}
#freezer-example .table th,
#freezer-example .table td{
  white-space: normal !important;
  vertical-align: middle !important;
}
#freezer-example .table th{
  background: #f3f4f7 !important;
  color: var(--text) !important;
  outline: none !important;
  border-bottom: 1px solid var(--border) !important;
}
#freezer-example .table thead th{
  outline: none !important;
}
#freezer-example .table td{
  outline: none !important;
  border-top: 1px solid var(--border) !important;
}
#freezer-example .table col{
  background: transparent !important;
}

/* Make header row easier to scan */
#freezer-example .table thead th{
  font-weight: 600;
  font-size: 13px;
}

/* =========================
   Submit page (CodeMirror)
   ========================= */
/* Keep submit pages full width on desktop (do not constrain with content-max) */
/* textarea fallback (before CM init) */
textarea#code,
textarea.code-editor{
  width: 100% !important;
  min-height: 56vh !important;
  max-height: 70vh !important;
  resize: vertical;
  border-radius: 14px !important;
  border: 1px solid var(--border) !important;
  background: #ffffff !important;
  color: rgba(0,0,0,.88) !important;
  padding: 12px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
  font-size: 14px;
  line-height: 1.55 !important;
  box-shadow: var(--shadow-1) !important;
}

/* CodeMirror */
.CodeMirror{
  border-radius: 14px !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-1) !important;
  min-height: 56vh !important;

  /* IMPORTANT: do NOT lock CodeMirror height.
     - Allows auto-grow (page scroll) like before
     - Allows user to drag-resize via native resize handle */
  height: auto !important;
  max-height: none !important;
  resize: vertical;
  overflow: hidden;
	font-size: var(--cm-font-size, 14px);
  background: #ffffff;
  color: rgba(0,0,0,.88);
}

/* CodeMirror default CSS uses overflow: scroll !important (always shows scrollbar)
   => force auto so scrollbar only appears when needed */
.CodeMirror-scroll{
  overflow: auto !important;
}
.CodeMirror .CodeMirror-gutters{ border-right: 1px solid var(--border) !important; }
.CodeMirror-lines{ padding: 10px 0 !important; }
/* Một số trang CodeMirror copy font-size của textarea sang inline style cho <pre>
   => cần !important để nút +/- đổi cỡ chữ tác động cả nội dung */
.CodeMirror pre,
.CodeMirror-line,
.CodeMirror-code{
  font-size: inherit !important;
  color: inherit;
}

/* Editor dark mode (opt-in via body.editor-dark) */
body.editor-dark textarea#code,
body.editor-dark textarea.code-editor{
  background: #0b1220 !important;
  color: #e7eaf0 !important;
  border-color: rgba(255,255,255,.12) !important;
}
body.editor-dark .CodeMirror{
  background: #0b1220 !important;
  color: #e7eaf0 !important;
  border-color: rgba(255,255,255,.12) !important;
}
body.editor-dark .CodeMirror .CodeMirror-gutters{
  background: #0b1220 !important;
  border-right: 1px solid rgba(255,255,255,.10) !important;
}
body.editor-dark .CodeMirror-linenumber{ color: rgba(231,234,240,.55) !important; }
body.editor-dark .CodeMirror-cursor{ border-left: 2px solid rgba(231,234,240,.95) !important; }
body.editor-dark .CodeMirror-selected{ background: rgba(125,211,252,.28) !important; }

/* Make selection always visible in dark editor (including styleSelectedText addon) */
body.editor-dark span.CodeMirror-selectedtext{
  background: rgba(125,211,252,.28) !important;
  color: inherit !important;
}
body.editor-dark .CodeMirror-line::selection,
body.editor-dark .CodeMirror-line > span::selection,
body.editor-dark .CodeMirror-line > span > span::selection{
  background: rgba(125,211,252,.28) !important;
  color: inherit !important;
}

/* Token colors for dark editor */
body.editor-dark div.CodeMirror span.cm-comment{ color: rgba(231,234,240,.55) !important; }
body.editor-dark div.CodeMirror span.cm-keyword{ color: #7dd3fc !important; }
body.editor-dark div.CodeMirror span.cm-atom{ color: #fda4af !important; }
body.editor-dark div.CodeMirror span.cm-number{ color: #fbbf24 !important; }
body.editor-dark div.CodeMirror span.cm-def{ color: #93c5fd !important; }
body.editor-dark div.CodeMirror span.cm-variable{ color: #e5e7eb !important; }
body.editor-dark div.CodeMirror span.cm-variable-2{ color: #a7f3d0 !important; }
body.editor-dark div.CodeMirror span.cm-variable-3{ color: #fca5a5 !important; }
body.editor-dark div.CodeMirror span.cm-property{ color: #c4b5fd !important; }
body.editor-dark div.CodeMirror span.cm-operator{ color: #e5e7eb !important; }
body.editor-dark div.CodeMirror span.cm-string{ color: #86efac !important; }
body.editor-dark div.CodeMirror span.cm-string-2{ color: #fda4af !important; }
body.editor-dark div.CodeMirror span.cm-meta{ color: #fcd34d !important; }
body.editor-dark div.CodeMirror span.cm-qualifier{ color: #60a5fa !important; }
body.editor-dark div.CodeMirror span.cm-builtin{ color: #c084fc !important; }
body.editor-dark div.CodeMirror span.cm-bracket{ color: #e5e7eb !important; }
body.editor-dark div.CodeMirror span.cm-tag{ color: #fca5a5 !important; }
body.editor-dark div.CodeMirror span.cm-attribute{ color: #fcd34d !important; }
body.editor-dark div.CodeMirror span.cm-link{ color: #93c5fd !important; text-decoration: underline !important; }
body.editor-dark div.CodeMirror span.cm-error{ color: #fecaca !important; background: rgba(220,38,38,.12) !important; border-radius: 4px; }
body.editor-dark div.CodeMirror .CodeMirror-activeline-background{ background: rgba(255,255,255,.04) !important; }
body.editor-dark div.CodeMirror .CodeMirror-matchingbracket{ outline: 1px solid rgba(125,211,252,.45) !important; color: #e7eaf0 !important; }


/* Controls (language selectors, buttons) */
#ngonngu, #cppStdCham, select.inp{
  border-radius: 12px !important;
  border: 1px solid var(--border) !important;
  padding: 6px 10px !important;
  height: 34px;
}
#btnNopBai{
  padding: 8px 14px !important;
  border-radius: 12px !important;
}

/* =========================
   Running/status pages
   ========================= */
.status-box{
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  background: var(--surface) !important;
  box-shadow: var(--shadow-1) !important;
  font-size: 15px !important;
}

/* =========================
   Search form tables (#data-search)
   - Make first column wide enough so labels / controls don't wrap
   - Keep inputs/selects readable
   ========================= */
#data-search table{ table-layout: auto; }
#data-search table td:first-child,
#data-search table th:first-child{
  min-width: 150px !important;
  white-space: nowrap;
}
#data-search table td{ vertical-align: middle; }
#data-search table td input.form-control,
#data-search table td select{
  max-width: 100%;
}

/* Search dropdowns: make the "Tên bài / Nội dung" selector readable */
#data-search table td select{ width: auto; }
#data-search select[name="timbai_col"],
#data-search select[name="timtl_col"],
#data-search select[name="timde_col"]{
  width: 180px !important;
  min-width: 180px !important;
}
#data-search select[name="timbai_col"] + input[name="timbai"],
#data-search select[name="timtl_col"] + input,
#data-search select[name="timde_col"] + input{
  width: calc(100% - 190px) !important;
}



/* =========================
   Danh sách pages - keep table headers visible on page scroll
   ========================= */
body[class*="code-ds"] #freezer-example,
body[class*="code-ds"] .table-responsive{
  overflow-x: auto !important;
  overflow-y: visible !important;
  max-height: none !important;
}
body[class*="code-ds"] #freezer-example{
  width: 100% !important;
}
body[class*="code-ds"] .list-sticky-table{
  border-collapse: separate;
  border-spacing: 0;
}
body[class*="code-ds"] .list-sticky-table > thead > tr > th{
  z-index: 30;
  vertical-align: middle !important;
  background: #fff6bf !important;
  background-clip: padding-box;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.14), 0 1px 0 rgba(255,255,255,.7);
}
body[class*="code-ds"] .list-sticky-table > thead > tr > th a,
body[class*="code-ds"] .list-sticky-table > thead > tr > th b,
body[class*="code-ds"] .list-sticky-table > thead > tr > th center{
  color: inherit !important;
}
body[class*="code-ds"] .list-sticky-table > thead > tr > th input[type="checkbox"]{
  vertical-align: middle;
}
body.dark-mode[class*="code-ds"] .list-sticky-table > thead > tr > th,
body.dark[class*="code-ds"] .list-sticky-table > thead > tr > th{
  background: #4d4212 !important;
  color: #f3f0d7 !important;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.12), 0 1px 0 rgba(0,0,0,.18);
}


/* v187: danh sách ds* keep row 1 on page scroll, color like autorank */
.list-sticky-wrap,
#freezer-example{
  max-height:none !important;
}
.list-sticky-wrap .table,
#freezer-example .table{
  width:max-content;
  min-width:100%;
  border-collapse:separate !important;
  border-spacing:0 !important;
}
.list-sticky-wrap .table thead > tr:first-child > th,
.list-sticky-wrap .table thead > tr:first-child > td,
#freezer-example .table thead > tr:first-child > th,
#freezer-example .table thead > tr:first-child > td{
  background:linear-gradient(180deg,#f8fbff,#edf4ff) !important;
  background-color:#edf4ff !important;
  color:#14355d !important;
  vertical-align:middle !important;
}
.list-sticky-wrap .table thead > tr:first-child > th table,
.list-sticky-wrap .table thead > tr:first-child > td table,
.list-sticky-wrap .table thead > tr:first-child > th table tr,
.list-sticky-wrap .table thead > tr:first-child > td table tr,
.list-sticky-wrap .table thead > tr:first-child > th table th,
.list-sticky-wrap .table thead > tr:first-child > td table td,
#freezer-example .table thead > tr:first-child > th table,
#freezer-example .table thead > tr:first-child > td table,
#freezer-example .table thead > tr:first-child > th table tr,
#freezer-example .table thead > tr:first-child > td table tr,
#freezer-example .table thead > tr:first-child > th table th,
#freezer-example .table thead > tr:first-child > td table td{
  background:linear-gradient(180deg,#f8fbff,#edf4ff) !important;
  background-color:#edf4ff !important;
}


/* v188: ds* tables may be rendered directly as table.table (no #freezer-example wrapper).
   Wrap them at runtime and move only the real first header row on page scroll. */
body[class*="code-ds"] .list-sticky-wrap,
body[class*="code-ds"] #freezer-example{
  width:100% !important;
  overflow-x:auto !important;
  overflow-y:visible !important;
  max-height:none !important;
}
body[class*="code-ds"] table.list-sticky-table,
body[class*="code-ds"] .list-sticky-wrap .table,
body[class*="code-ds"] #freezer-example .table{
  width:max-content;
  min-width:100%;
  border-collapse:separate !important;
  border-spacing:0 !important;
}
body[class*="code-ds"] table.list-sticky-table > thead > tr > th,
body[class*="code-ds"] table.list-sticky-table > thead > tr > td,
body[class*="code-ds"] .list-sticky-wrap .table > thead > tr > th,
body[class*="code-ds"] .list-sticky-wrap .table > thead > tr > td,
body[class*="code-ds"] #freezer-example .table > thead > tr > th,
body[class*="code-ds"] #freezer-example .table > thead > tr > td{
  position:relative !important;
  top:auto !important;
  vertical-align:middle !important;
}
body[class*="code-ds"] table.list-sticky-table > thead > tr:first-child > th,
body[class*="code-ds"] table.list-sticky-table > thead > tr:first-child > td,
body[class*="code-ds"] .list-sticky-wrap .table > thead > tr:first-child > th,
body[class*="code-ds"] .list-sticky-wrap .table > thead > tr:first-child > td,
body[class*="code-ds"] #freezer-example .table > thead > tr:first-child > th,
body[class*="code-ds"] #freezer-example .table > thead > tr:first-child > td{
  background:linear-gradient(180deg,#f8fbff,#edf4ff) !important;
  background-color:#edf4ff !important;
  color:#14355d !important;
  box-shadow:0 1px 0 rgba(148,163,184,.18) !important;
}
body[class*="code-ds"] table.list-sticky-table > thead > tr:first-child table,
body[class*="code-ds"] table.list-sticky-table > thead > tr:first-child table tr,
body[class*="code-ds"] table.list-sticky-table > thead > tr:first-child table th,
body[class*="code-ds"] table.list-sticky-table > thead > tr:first-child table td,
body[class*="code-ds"] .list-sticky-wrap .table > thead > tr:first-child table,
body[class*="code-ds"] .list-sticky-wrap .table > thead > tr:first-child table tr,
body[class*="code-ds"] .list-sticky-wrap .table > thead > tr:first-child table th,
body[class*="code-ds"] .list-sticky-wrap .table > thead > tr:first-child table td,
body[class*="code-ds"] #freezer-example .table > thead > tr:first-child table,
body[class*="code-ds"] #freezer-example .table > thead > tr:first-child table tr,
body[class*="code-ds"] #freezer-example .table > thead > tr:first-child table th,
body[class*="code-ds"] #freezer-example .table > thead > tr:first-child table td{
  background:linear-gradient(180deg,#f8fbff,#edf4ff) !important;
  background-color:#edf4ff !important;
}

/* v843: search/filter panels are collapsed by default across legacy list pages.
   Existing toggles remain compatible: legacy mySH() uses inline display, while
   modern Rank/Hoi-dap flows use the is-open class. */
#myTK:not(.is-open){ display:none; }

/* v966: Settings/test table caption in suabai follows the shared site theme.
   The caption sits outside THEAD, so generic dark table-header rules do not reach it. */
table.ntt-test-settings-table > caption{
  caption-side:top;
  padding:8px 10px;
  background:var(--site-surface-2,#f7f9fc);
  color:var(--site-text,#1f2937);
  border:1px solid var(--site-border,#d7dee8);
  border-bottom:0;
  text-align:center;
}
table.ntt-test-settings-table > caption h3{
  margin:0;
  color:inherit!important;
}
body[data-site-theme="dark"] table.ntt-test-settings-table > caption,
body.dark-mode table.ntt-test-settings-table > caption,
body.dark table.ntt-test-settings-table > caption,
.theme-dark table.ntt-test-settings-table > caption{
  background:#172033!important;
  color:#e5e7eb!important;
  border-color:#334155!important;
}



/* v967: complete dark-theme coverage for the suabai per-test table. The route
   still has a legacy `th { background:#eee }` rule, so the table-specific dark
   selector must own both the caption and the actual header row. */
body[data-site-theme="dark"] table.ntt-test-settings-table th,
body.dark-mode table.ntt-test-settings-table th,
body.dark table.ntt-test-settings-table th,
.theme-dark table.ntt-test-settings-table th{
  background:#172033!important;
  color:#e5e7eb!important;
  border-color:#334155!important;
}
body[data-site-theme="dark"] table.ntt-test-settings-table td,
body.dark-mode table.ntt-test-settings-table td,
body.dark table.ntt-test-settings-table td,
.theme-dark table.ntt-test-settings-table td{
  background:#0f172a!important;
  color:#e5e7eb!important;
  border-color:#334155!important;
}
body[data-site-theme="dark"] table.ntt-test-settings-table input[readonly],
body.dark-mode table.ntt-test-settings-table input[readonly],
body.dark table.ntt-test-settings-table input[readonly],
.theme-dark table.ntt-test-settings-table input[readonly]{
  background:#111827!important;
  color:#e5e7eb!important;
  border-color:#475569!important;
}

/* v967: batch-account tools used by resetmk/udusif contained light inline
   surfaces (#f8fbff/#fff). Dark selectors intentionally use !important only on
   these semantic boxes so legacy inline colors cannot make the page unreadable. */
body[data-site-theme="dark"] .ntt-account-batch-box,
body.dark-mode .ntt-account-batch-box,
body.dark .ntt-account-batch-box,
.theme-dark .ntt-account-batch-box,
body[data-site-theme="dark"] .ntt-batch-choice-box,
body.dark-mode .ntt-batch-choice-box,
body.dark .ntt-batch-choice-box,
.theme-dark .ntt-batch-choice-box{
  background:#111827!important;
  color:#e5e7eb!important;
  border-color:#374151!important;
}
body[data-site-theme="dark"] .ntt-batch-choice-box .table,
body.dark-mode .ntt-batch-choice-box .table,
body.dark .ntt-batch-choice-box .table,
.theme-dark .ntt-batch-choice-box .table{
  background:#111827!important;
  color:#e5e7eb!important;
  border-color:#374151!important;
}
body[data-site-theme="dark"] .ntt-batch-choice-box .table th,
body.dark-mode .ntt-batch-choice-box .table th,
body.dark .ntt-batch-choice-box .table th,
.theme-dark .ntt-batch-choice-box .table th{
  background:#172033!important;
  color:#f8fafc!important;
  border-color:#475569!important;
}
body[data-site-theme="dark"] .ntt-batch-choice-box .table td,
body.dark-mode .ntt-batch-choice-box .table td,
body.dark .ntt-batch-choice-box .table td,
.theme-dark .ntt-batch-choice-box .table td{
  background:#0f172a!important;
  color:#e5e7eb!important;
  border-color:#374151!important;
}
body[data-site-theme="dark"] .ntt-batch-choice-box span,
body.dark-mode .ntt-batch-choice-box span,
body.dark .ntt-batch-choice-box span,
.theme-dark .ntt-batch-choice-box span,
body[data-site-theme="dark"] .ntt-account-batch-box span,
body.dark-mode .ntt-account-batch-box span,
body.dark .ntt-account-batch-box span,
.theme-dark .ntt-account-batch-box span{
  color:#cbd5e1!important;
}
body[data-site-theme="dark"] .ntt-batch-choice-box .table td.ntt-batch-choice-danger,
body.dark-mode .ntt-batch-choice-box .table td.ntt-batch-choice-danger,
body.dark .ntt-batch-choice-box .table td.ntt-batch-choice-danger,
.theme-dark .ntt-batch-choice-box .table td.ntt-batch-choice-danger{
  color:#fca5a5!important;
}
body[data-site-theme="dark"].code-resetmk font[color="red"],
body[data-site-theme="dark"].code-udusif font[color="red"],
body.dark-mode.code-resetmk font[color="red"],
body.dark-mode.code-udusif font[color="red"]{color:#fca5a5!important}
body[data-site-theme="dark"].code-resetmk font[color="green"],
body[data-site-theme="dark"].code-udusif font[color="green"],
body.dark-mode.code-resetmk font[color="green"],
body.dark-mode.code-udusif font[color="green"]{color:#86efac!important}

/* ===== SOURCE: table-stable.v1.css ===== */
/* v574: nạp sẵn đúng CSS cuối của bảng thường trong <head>.
   Chỉ tác động lên bảng đã được ui-pages xác định là danh sách thường.
   Không đụng .table-responsive/#freezer-example hoặc bảng data-ntt-freeze,
   vì các trang cuộn ngang/giữ cột trái có cơ chế freeze-scope riêng. */
.list-sticky-wrap{
  width:100% !important;
  overflow-x:auto !important;
  overflow-y:visible !important;
  margin:1em auto !important;
}

.list-sticky-wrap .table,
table.list-sticky-table{
  width:max-content !important;
  min-width:100% !important;
  border-collapse:separate !important;
  border-spacing:0 !important;
  margin-bottom:0 !important;
}

.list-sticky-wrap .table thead > tr > th,
.list-sticky-wrap .table thead > tr > td,
table.list-sticky-table thead > tr > th,
table.list-sticky-table thead > tr > td{
  position:relative !important;
  top:auto !important;
  vertical-align:middle !important;
}

.list-sticky-wrap .table tr.ntt-ds-header-sticky > th,
.list-sticky-wrap .table tr.ntt-ds-header-sticky > td,
table.list-sticky-table tr.ntt-ds-header-sticky > th,
table.list-sticky-table tr.ntt-ds-header-sticky > td{
  z-index:80 !important;
  will-change:transform;
}

.list-sticky-wrap .table thead > tr:first-child > th,
.list-sticky-wrap .table thead > tr:first-child > td,
table.list-sticky-table thead > tr:first-child > th,
table.list-sticky-table thead > tr:first-child > td{
  background:linear-gradient(180deg,#f8fbff,#edf4ff) !important;
  background-color:#edf4ff !important;
  color:#14355d !important;
}

.list-sticky-wrap .table thead > tr:first-child table,
.list-sticky-wrap .table thead > tr:first-child table tr,
.list-sticky-wrap .table thead > tr:first-child table th,
.list-sticky-wrap .table thead > tr:first-child table td,
table.list-sticky-table thead > tr:first-child table,
table.list-sticky-table thead > tr:first-child table tr,
table.list-sticky-table thead > tr:first-child table th,
table.list-sticky-table thead > tr:first-child table td{
  background:linear-gradient(180deg,#f8fbff,#edf4ff) !important;
  background-color:#edf4ff !important;
  color:#14355d !important;
}

.list-sticky-wrap .table th,
.list-sticky-wrap .table td,
table.list-sticky-table th,
table.list-sticky-table td{
  white-space:normal !important;
  vertical-align:middle !important;
}

body[data-site-theme="dark"] .list-sticky-wrap .table thead > tr:first-child > th,
body[data-site-theme="dark"] .list-sticky-wrap .table thead > tr:first-child > td,
body[data-site-theme="dark"] table.list-sticky-table thead > tr:first-child > th,
body[data-site-theme="dark"] table.list-sticky-table thead > tr:first-child > td{
  background:#243447 !important;
  background-color:#243447 !important;
  color:#f5f7fa !important;
  border-color:#3b4d63 !important;
}

/* CODE.NTT v777 - Public controls: gọn vừa đủ, không chiếm quá nhiều cột. */
select.ntt-public-select,
select[name="publicall"],
select[name="public[]"].cell-share,
.tl-public-col{
  min-width:180px !important;
  width:180px !important;
  max-width:200px !important;
  white-space:nowrap !important;
}
/* Bộ lọc Public cần rộng hơn một chút để đọc được các nhóm lọc. */
select.ntt-public-filter{
  min-width:240px !important;
  width:240px !important;
  max-width:280px !important;
  white-space:nowrap !important;
}
td:has(> select.ntt-public-select),
th:has(select.ntt-public-select),
td:has(> select[name="publicall"]),
th:has(select[name="publicall"]){
  min-width:200px !important;
  width:200px !important;
  max-width:220px !important;
}
@media (max-width:900px){
  select.ntt-public-select,
  select[name="publicall"],
  select[name="public[]"].cell-share,
  .tl-public-col{
    min-width:160px !important;
    width:160px !important;
    max-width:180px !important;
  }
  select.ntt-public-filter{
    min-width:200px !important;
    width:200px !important;
    max-width:240px !important;
  }
}

/* ===== SOURCE: admin-modern.css ===== */
/* GÓI 05 (v2): Admin / Logs / Rank - UI improvements (no logic changes)
   - Works even when opened directly (no ?CODE=rank), by targeting structural selectors.
*/

:root{
  --me-surface: #ffffff;
  --me-surface-2: rgba(248,249,251,0.98);
  --me-border: rgba(0,0,0,.10);
  --me-border-2: rgba(0,0,0,.12);
  --me-shadow: 0 6px 18px rgba(0,0,0,.05);
  --me-radius: 12px;
}

/* Generic page title */
.page-header, .me-page-header{
  border-bottom: 1px solid rgba(0,0,0,.08);
  padding-bottom: 10px;
  margin-top: 12px;
}

/* ---------------- Rank tables (scrolly_table) ---------------- */
/* Apply broadly so it works even when rank pages are opened directly (dht/rank.php) */
.scrolly_table{
  border: 1px solid var(--me-border);
  border-radius: var(--me-radius);
  overflow: auto;
  background: var(--me-surface);
  box-shadow: var(--me-shadow);
  -webkit-overflow-scrolling: touch;
}

/* Keep existing inline max-height but allow better viewport usage */
.scrolly_table[style*="max-height"]{
  max-height: min(72vh, 820px) !important;
}

/* Table inside scrolly_table */
.scrolly_table table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

/* Sticky header:
   - Prefer thead if exists
   - Otherwise make the FIRST ROW sticky (rank.php thường không có thead) */
.scrolly_table thead th,
.scrolly_table thead td{
  z-index: 4;
  background: var(--me-surface-2);
  border-bottom: 1px solid var(--me-border-2);
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.scrolly_table table tr:first-child > th,
.scrolly_table table tr:first-child > td{
  z-index: 3;
  background: var(--me-surface-2);
  border-bottom: 1px solid var(--me-border-2);
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}

/* Cells */
.scrolly_table td, .scrolly_table th{
  padding: 8px 10px;
  border-right: 1px solid rgba(0,0,0,.06);
  border-bottom: 1px solid rgba(0,0,0,.06);
  vertical-align: middle;
}
.scrolly_table tr td:last-child,
.scrolly_table tr th:last-child{ border-right: 0; }
.scrolly_table table tr:last-child td{ border-bottom: 0; }

/* Row hover */
.scrolly_table tbody tr:hover td{
  background: rgba(13,110,253,.04);
}

/* Rank toolbar */
.me-rank-toolbar{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 10px 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--me-border);
  border-radius: var(--me-radius);
  background: var(--me-surface);
  box-shadow: 0 3px 10px rgba(0,0,0,.03);
}
.me-rank-toolbar .me-label{
  font-weight: 600;
  opacity: .9;
}
.me-rank-toolbar .me-input{
  min-width: 220px;
  max-width: 420px;
}
.me-rank-toolbar .me-hint{
  font-size: 12px;
  opacity: .75;
}

/* Highlight filtered-out rows */
.me-row-hidden{ display: none !important; }



/* Standalone dark base: sync with global site dark mode */
body[data-site-theme="dark"],
body.me-log-dark{
  background: #0b1220;
  color: #e5e7eb;
}

/* ---------------- Logs viewer ---------------- */
/* Default: LIGHT (readable). Toggle dark via body.me-log-dark */
.me-log-toolbar{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items:center;
  margin: 10px 0 8px;
}
.me-log-toolbar .me-btn,
.me-log-toolbar .btn{
  appearance:none;
  border: 1px solid rgba(0,0,0,.18);
  background: rgba(255,255,255,.92);
  color: #111827;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
}
.me-log-toolbar .me-btn:hover,
.me-log-toolbar .btn:hover{
  background: #fff;
}
.me-log-toolbar .me-btn:active,
.me-log-toolbar .btn:active{
  transform: translateY(1px);
}

#log-box, pre.me-log, pre.prettyprint{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.5;
  background: #f7f8fb;
  color: #111827;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: var(--me-radius);
  padding: 12px 14px;
  overflow: auto;
  max-height: min(72vh, 860px);
  box-shadow: var(--me-shadow);
  white-space: pre-wrap;       /* wrap long lines for readability */
  word-break: break-word;
}

body.me-log-dark .me-log-toolbar .me-btn,
body.me-log-dark .me-log-toolbar .btn{
  background: rgba(15,23,42,.88);
  border-color: rgba(148,163,184,.25);
  color: #e5e7eb;
}
body.me-log-dark .me-log-toolbar .me-btn:hover,
body.me-log-dark .me-log-toolbar .btn:hover{
  background: rgba(15,23,42,.98);
}

body.me-log-dark #log-box,
body.me-log-dark pre.me-log,
body.me-log-dark pre.prettyprint{
  background: #0f172a;
  color: #e5e7eb;
  border-color: rgba(148,163,184,.22);
  /* Keep wrap even in dark mode for readability */
  white-space: pre-wrap;
  word-break: break-word;
}

/* Prettify syntax colors in dark mode (readable on dark background) */
body.me-log-dark pre.prettyprint .pln{ color:#e5e7eb; }
body.me-log-dark pre.prettyprint .com{ color:#94a3b8; }
body.me-log-dark pre.prettyprint .kwd{ color:#93c5fd; }
body.me-log-dark pre.prettyprint .str{ color:#34d399; }
body.me-log-dark pre.prettyprint .lit{ color:#fbbf24; }
body.me-log-dark pre.prettyprint .pun{ color:#e2e8f0; }
body.me-log-dark pre.prettyprint .typ{ color:#c4b5fd; }
body.me-log-dark pre.prettyprint .tag{ color:#fca5a5; }
body.me-log-dark pre.prettyprint .atn{ color:#fcd34d; }
body.me-log-dark pre.prettyprint .atv{ color:#34d399; }
body.me-log-dark pre.prettyprint .dec{ color:#fbbf24; }
body.me-log-dark pre.prettyprint a{ color:#93c5fd; }

/* Small improvements for history/admin tables */
.table.me-admin-table,
body[data-code^="admin"] .table,
body[data-code^="config"] .table{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: var(--me-radius);
  overflow: hidden;
}


/* Autorank container (#data-rank) as card */
#data-rank{
  border: 1px solid rgba(0,0,0,.10);
  border-radius: var(--me-radius);
  background: var(--me-surface);
  box-shadow: var(--me-shadow);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
#data-rank table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
#data-rank tr.me-row-hidden{ display:none !important; }
#data-rank thead th,
#data-rank tr:first-child th,
#data-rank tr:first-child td{
  z-index: 2;
  background: var(--me-surface-2);
  border-bottom: 1px solid rgba(0,0,0,.10);
}


/* ---------------- Layer (iframe) sizing ----------------
   Khi mở view code/log trong layer (iframe), khung <pre> đang bị giới hạn max-height:72vh
   nên bị "lọt" vào 1 frame nhỏ và cuộn dù layer còn dư. Quy tắc dưới đây chỉ áp dụng
   khi trang nằm trong iframe + là trang viewer (me-codeview/me-logview):
   - Body dùng flex để khung code/log ăn hết phần còn lại
   - Chỉ cuộn khi nội dung vượt quá chiều cao layer
*/
html.me-in-layer, body.me-in-layer{ height: 100%; }

body.me-in-layer.me-codeview,
body.me-in-layer.me-logview{
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body.me-in-layer.me-codeview #log-box,
body.me-in-layer.me-codeview pre.me-log,
body.me-in-layer.me-codeview pre.prettyprint,
body.me-in-layer.me-logview #log-box,
body.me-in-layer.me-logview pre.me-log,
body.me-in-layer.me-logview pre.prettyprint{
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

/* ===== SOURCE: table-zoom.v2.css ===== */
/* Table zoom controls (inline in heading) */
:root{
  --me-table-font-size: 14px;
  --me-table-tools-bg: rgba(0,0,0,0.04);
  --me-table-tools-border: rgba(0,0,0,0.12);
  --me-table-tools-pill: rgba(0,0,0,0.06);
}

body[data-site-theme="dark"]{
  --me-table-tools-bg: rgba(255,255,255,0.06);
  --me-table-tools-border: rgba(255,255,255,0.16);
  --me-table-tools-pill: rgba(255,255,255,0.10);
}

/* Global table font size */
table{ font-size: var(--me-table-font-size); }

/* Heading tool area */
.me-heading-tools{
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.panel-heading.me-has-heading-tools,
.box-header.me-has-heading-tools,
.card-header.me-has-heading-tools{
  padding-right: 12px; /* keep default, tools float right */
}

/* Make headings layout robust: title left, tools right */
.panel-heading.me-has-heading-tools,
.box-header.me-has-heading-tools,
.card-header.me-has-heading-tools{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.panel-heading.me-has-heading-tools .panel-title,
.panel-heading.me-has-heading-tools h1,
.panel-heading.me-has-heading-tools h2,
.panel-heading.me-has-heading-tools h3,
.panel-heading.me-has-heading-tools h4,
.panel-heading.me-has-heading-tools h5{
  margin: 0;
  min-width: 0;
}

.me-table-tools{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 10px;
  background: var(--me-table-tools-bg);
  border: 1px solid var(--me-table-tools-border);
}

.me-table-tools .btn{
  padding: 2px 6px;
  line-height: 1.2;
}

.me-table-tools .btn .fa{ margin: 0; }

.me-table-zoom-value{
  font-weight: 700;
  font-size: 12px;
  min-width: 42px;
  text-align: center;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--me-table-tools-pill);
  cursor: default;
  user-select: none;
}

/* Fallback for tables without a heading.
 * v736.2: keep the quick-filter/zoom tools in normal document flow so they
 * reserve their own row and never cover the table header. */
.me-table-overlay-tools{
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  width: max-content;
  max-width: 100%;
  margin: 0 0 8px auto;
}

/* v736.2: do not globally force .table-responsive to overflow:visible.
 * Bootstrap/page CSS can restore horizontal scrolling for wide tables. */

/* Compact quick filter (rank/autorank/rankweb) when placed in heading */
.me-rank-tools{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.me-rank-tools .me-input{
  height: 24px;
  padding: 2px 8px;
  font-size: 12px;
  width: 200px;
  max-width: 40vw;
}

.me-rank-tools .me-btn{
  height: 24px;
  padding: 2px 8px;
  font-size: 12px;
  line-height: 1.2;
}


/* Quick filter controls (in heading) */
.me-table-filter{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 10px;
  background: var(--me-table-tools-bg);
  border: 1px solid var(--me-table-tools-border);
}
.me-table-filter .me-table-filter-input{
  width: 220px;
  height: 24px;
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid var(--me-table-tools-border);
  background: transparent;
  box-shadow: none;
}
.me-table-filter .me-table-filter-input:focus{
  outline: none;
  box-shadow: 0 0 0 2px rgba(46, 141, 255, 0.20);
}
body[data-site-theme="dark"] .me-table-filter .me-table-filter-input{
  color: rgba(255,255,255,0.92);
}
.me-table-filter .me-table-filter-input::placeholder{
  color: rgba(0,0,0,0.55);
}
body[data-site-theme="dark"] .me-table-filter .me-table-filter-input::placeholder{
  color: rgba(255,255,255,0.55);
}
.me-table-filter .me-table-filter-clear{
  padding: 2px 6px;
  line-height: 1.2;
}


/* v218: ensure table zoom wins over page-specific fixed font sizes */
table[data-me-table-zoomable="1"]{
  font-size: var(--me-table-font-size) !important;
}

table[data-me-table-zoomable="1"] th,
table[data-me-table-zoomable="1"] td,
table[data-me-table-zoomable="1"] caption{
  font-size: inherit !important;
}

/* v774: do not force nested legacy markup to inherit one identical size.
 * Links, <font>, <small>, badges and other authored content keep their own
 * visual hierarchy/colors. JS only scales native form controls explicitly. */


/* v774: robust common zoom while preserving page-authored table styling.
 * JavaScript writes size only; color/background/weight are intentionally untouched. */
table[data-me-table-zoomable="1"]{
  font-size: var(--me-table-font-size, 14px) !important;
}
table[data-me-table-zoomable="1"] th,
table[data-me-table-zoomable="1"] td{
  line-height: 1.35;
}

/* ===== SOURCE: handmade-forms-modern.v1.css ===== */
/* Handmade / legacy forms modernizer
   - Covers old hand-written forms without changing PHP logic
   - Applied via js/me/handmade-forms-modern.v1.js
*/

:root{
  --hf-surface: rgba(255,255,255,.90);
  --hf-surface-2: rgba(248,250,252,.96);
  --hf-border: rgba(15,23,42,.10);
  --hf-border-strong: rgba(15,23,42,.16);
  --hf-text: #0f172a;
  --hf-muted: rgba(15,23,42,.64);
  --hf-primary: #2563eb;
  --hf-primary-soft: rgba(37,99,235,.12);
  --hf-shadow: 0 14px 36px rgba(15,23,42,.08);
  --hf-shadow-sm: 0 8px 22px rgba(15,23,42,.06);
  --hf-radius: 18px;
  --hf-radius-sm: 14px;
}

body[data-site-theme="dark"]{
  --hf-surface: rgba(15,23,42,.88);
  --hf-surface-2: rgba(20,31,52,.94);
  --hf-border: rgba(148,163,184,.22);
  --hf-border-strong: rgba(148,163,184,.30);
  --hf-text: #edf2ff;
  --hf-muted: rgba(226,232,240,.72);
  --hf-primary: #7aa2ff;
  --hf-primary-soft: rgba(122,162,255,.16);
  --hf-shadow: 0 18px 42px rgba(2,6,23,.34);
  --hf-shadow-sm: 0 12px 26px rgba(2,6,23,.22);
}

/* ---------- Form shell ---------- */
form.ntt-legacy-form{
  display:block;
  width:100%;
  max-width:100%;
  margin:0 0 18px;
  padding:18px 20px;
  border:1px solid var(--hf-border);
  border-radius:var(--hf-radius);
  background:linear-gradient(180deg, var(--hf-surface), var(--hf-surface-2));
  box-shadow:var(--hf-shadow-sm);
}

.panel-body > form.ntt-legacy-form:first-child:last-child,
.list-group > form.ntt-legacy-form:first-child:last-child,
.table-responsive + form.ntt-legacy-form{
  margin-top:14px;
}

form.ntt-legacy-form.ntt-form-compact{
  padding:14px 16px;
  border-radius:16px;
}

form.ntt-legacy-form .form-control,
form.ntt-legacy-form input[type="text"],
form.ntt-legacy-form input[type="password"],
form.ntt-legacy-form input[type="email"],
form.ntt-legacy-form input[type="number"],
form.ntt-legacy-form input[type="date"],
form.ntt-legacy-form input[type="time"],
form.ntt-legacy-form input[type="search"],
form.ntt-legacy-form input[type="url"],
form.ntt-legacy-form select,
form.ntt-legacy-form textarea{
  min-height:42px;
  border-radius:14px;
  border:1px solid var(--hf-border);
  background:#fff;
  color:var(--hf-text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
  transition:border-color .12s ease, box-shadow .12s ease, background-color .12s ease;
}

body[data-site-theme="dark"] form.ntt-legacy-form .form-control,
body[data-site-theme="dark"] form.ntt-legacy-form input[type="text"],
body[data-site-theme="dark"] form.ntt-legacy-form input[type="password"],
body[data-site-theme="dark"] form.ntt-legacy-form input[type="email"],
body[data-site-theme="dark"] form.ntt-legacy-form input[type="number"],
body[data-site-theme="dark"] form.ntt-legacy-form input[type="date"],
body[data-site-theme="dark"] form.ntt-legacy-form input[type="time"],
body[data-site-theme="dark"] form.ntt-legacy-form input[type="search"],
body[data-site-theme="dark"] form.ntt-legacy-form input[type="url"],
body[data-site-theme="dark"] form.ntt-legacy-form select,
body[data-site-theme="dark"] form.ntt-legacy-form textarea{
  background:var(--hf-surface-2);
  color:var(--hf-text);
  box-shadow:none;
}

form.ntt-legacy-form input::placeholder,
form.ntt-legacy-form textarea::placeholder{ color:var(--hf-muted); }

form.ntt-legacy-form .form-control:focus,
form.ntt-legacy-form input[type="text"]:focus,
form.ntt-legacy-form input[type="password"]:focus,
form.ntt-legacy-form input[type="email"]:focus,
form.ntt-legacy-form input[type="number"]:focus,
form.ntt-legacy-form input[type="date"]:focus,
form.ntt-legacy-form input[type="time"]:focus,
form.ntt-legacy-form input[type="search"]:focus,
form.ntt-legacy-form input[type="url"]:focus,
form.ntt-legacy-form select:focus,
form.ntt-legacy-form textarea:focus{
  border-color:var(--hf-primary);
  box-shadow:0 0 0 4px var(--hf-primary-soft);
  outline:none;
}

form.ntt-legacy-form textarea{
  min-height:110px;
  resize:vertical;
  line-height:1.55;
}

form.ntt-legacy-form select[multiple]{
  min-height:180px;
}

/* ---------- File input ---------- */
form.ntt-legacy-form .ntt-file-control,
form.ntt-legacy-form input[type="file"]{
  display:block;
  width:100%;
  max-width:100%;
  padding:10px 12px;
  border:1px dashed var(--hf-border-strong);
  border-radius:16px;
  background:rgba(255,255,255,.72);
  color:var(--hf-text);
}
body[data-site-theme="dark"] form.ntt-legacy-form .ntt-file-control,
body[data-site-theme="dark"] form.ntt-legacy-form input[type="file"]{
  background:rgba(15,23,42,.46);
}
form.ntt-legacy-form input[type="file"]::file-selector-button{
  margin-right:12px;
  padding:9px 14px;
  border:0;
  border-radius:12px;
  background:var(--hf-primary-soft);
  color:var(--hf-primary);
  font-weight:700;
  cursor:pointer;
}

/* ---------- Choice controls ---------- */
form.ntt-legacy-form input[type="checkbox"],
form.ntt-legacy-form input[type="radio"]{
  accent-color:var(--hf-primary);
  width:16px;
  height:16px;
  vertical-align:-2px;
}
form.ntt-legacy-form label{
  color:var(--hf-text);
  font-weight:600;
}
form.ntt-legacy-form .cb-inline,
form.ntt-legacy-form .ntt-choice-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin:0 10px 10px 0;
  padding:8px 12px;
  border:1px solid var(--hf-border);
  border-radius:999px;
  background:rgba(255,255,255,.66);
}
body[data-site-theme="dark"] form.ntt-legacy-form .cb-inline,
body[data-site-theme="dark"] form.ntt-legacy-form .ntt-choice-chip{
  background:rgba(30,41,59,.64);
}

/* ---------- Buttons ---------- */
form.ntt-legacy-form .btn,
form.ntt-legacy-form button,
form.ntt-legacy-form input[type="submit"],
form.ntt-legacy-form input[type="button"],
form.ntt-legacy-form input[type="reset"]{
  min-height:40px;
  border-radius:14px;
  font-weight:700;
}

form.ntt-legacy-form .ntt-form-actions,
form.ntt-legacy-form p.ntt-form-actions,
form.ntt-legacy-form .ntt-actions-inline{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin:16px 0 4px !important;
  text-align:center !important;
}

form.ntt-legacy-form p[align="center"]{
  text-align:center !important;
}

/* ---------- Small grid / setting tables ---------- */
form.ntt-legacy-form .ntt-form-grid-table,
.ntt-legacy-form-shell .ntt-form-grid-table{
  width:100% !important;
  max-width:100% !important;
  margin:0;
  border-collapse:separate !important;
  border-spacing:0 12px !important;
}

form.ntt-legacy-form .ntt-form-grid-table[width],
.ntt-legacy-form-shell .ntt-form-grid-table[width]{
  width:100% !important;
  max-width:100% !important;
}

form.ntt-legacy-form table[width="200%"],
form.ntt-legacy-form table[width='200%'],
.ntt-legacy-form-shell table[width="200%"],
.ntt-legacy-form-shell table[width='200%']{
  width:100% !important;
  max-width:100% !important;
}

form.ntt-legacy-form .ntt-form-grid-table tr,
.ntt-legacy-form-shell .ntt-form-grid-table tr{
  background:transparent;
}

form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td,
form.ntt-legacy-form .ntt-form-grid-table > tr > td,
form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > th,
form.ntt-legacy-form .ntt-form-grid-table > tr > th,
.ntt-legacy-form-shell .ntt-form-grid-table > tbody > tr > td,
.ntt-legacy-form-shell .ntt-form-grid-table > tr > td,
.ntt-legacy-form-shell .ntt-form-grid-table > tbody > tr > th,
.ntt-legacy-form-shell .ntt-form-grid-table > tr > th{
  padding:0 8px;
  border:0 !important;
  vertical-align:top;
}

form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:first-child,
form.ntt-legacy-form .ntt-form-grid-table > tr > td:first-child,
form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > th:first-child,
form.ntt-legacy-form .ntt-form-grid-table > tr > th:first-child,
.ntt-legacy-form-shell .ntt-form-grid-table > tbody > tr > td:first-child,
.ntt-legacy-form-shell .ntt-form-grid-table > tr > td:first-child,
.ntt-legacy-form-shell .ntt-form-grid-table > tbody > tr > th:first-child,
.ntt-legacy-form-shell .ntt-form-grid-table > tr > th:first-child{
  width:clamp(120px, 20%, 170px) !important;
  min-width:120px !important;
  max-width:170px !important;
  padding-top:10px;
  color:var(--hf-text);
  font-weight:700;
}

/* v857: a form-grid cell must be layout only, not a second visual control shell.
   Dense opt-out pages such as dsbaiallst already render controls this way.  The
   previous border/background/radius on the value cell made enhanced legacy
   forms (dsbaiweb/dsqtweb and many others) look as if every input/select had a
   double border.  Keep the grid/gutter, but let the real control own the visual
   surface everywhere. */
form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:last-child,
form.ntt-legacy-form .ntt-form-grid-table > tr > td:last-child,
form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > th:last-child,
form.ntt-legacy-form .ntt-form-grid-table > tr > th:last-child,
.ntt-legacy-form-shell .ntt-form-grid-table > tbody > tr > td:last-child,
.ntt-legacy-form-shell .ntt-form-grid-table > tr > td:last-child,
.ntt-legacy-form-shell .ntt-form-grid-table > tbody > tr > th:last-child,
.ntt-legacy-form-shell .ntt-form-grid-table > tr > th:last-child{
  padding:0 8px;
  border:0 !important;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}

body[data-site-theme="dark"] form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:last-child,
body[data-site-theme="dark"] form.ntt-legacy-form .ntt-form-grid-table > tr > td:last-child,
body[data-site-theme="dark"] form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > th:last-child,
body[data-site-theme="dark"] form.ntt-legacy-form .ntt-form-grid-table > tr > th:last-child,
body[data-site-theme="dark"] .ntt-legacy-form-shell .ntt-form-grid-table > tbody > tr > td:last-child,
body[data-site-theme="dark"] .ntt-legacy-form-shell .ntt-form-grid-table > tr > td:last-child,
body[data-site-theme="dark"] .ntt-legacy-form-shell .ntt-form-grid-table > tbody > tr > th:last-child,
body[data-site-theme="dark"] .ntt-legacy-form-shell .ntt-form-grid-table > tr > th:last-child{
  background:transparent;
  box-shadow:none;
}

form.ntt-legacy-form .ntt-form-grid-table .form-control,
form.ntt-legacy-form .ntt-form-grid-table input[type="text"],
form.ntt-legacy-form .ntt-form-grid-table input[type="number"],
form.ntt-legacy-form .ntt-form-grid-table input[type="email"],
form.ntt-legacy-form .ntt-form-grid-table input[type="password"],
form.ntt-legacy-form .ntt-form-grid-table select,
form.ntt-legacy-form .ntt-form-grid-table textarea,
form.ntt-legacy-form .ntt-form-grid-table input[type="file"],
.ntt-legacy-form-shell .ntt-form-grid-table .form-control,
.ntt-legacy-form-shell .ntt-form-grid-table input[type="text"],
.ntt-legacy-form-shell .ntt-form-grid-table input[type="number"],
.ntt-legacy-form-shell .ntt-form-grid-table input[type="email"],
.ntt-legacy-form-shell .ntt-form-grid-table input[type="password"],
.ntt-legacy-form-shell .ntt-form-grid-table select,
.ntt-legacy-form-shell .ntt-form-grid-table textarea,
.ntt-legacy-form-shell .ntt-form-grid-table input[type="file"]{
  width:100% !important;
}

/* ---------- Generic tables inside forms ---------- */
form.ntt-legacy-form table:not(.table):not(.ntt-form-grid-table){
  width:100%;
  max-width:100%;
}

form.ntt-legacy-form .table-responsive{
  border-radius:16px;
  border:1px solid var(--hf-border);
  background:rgba(255,255,255,.55);
}
body[data-site-theme="dark"] form.ntt-legacy-form .table-responsive{
  background:rgba(15,23,42,.42);
}

/* ---------- Text / notes ---------- */
form.ntt-legacy-form small,
form.ntt-legacy-form .help-block,
form.ntt-legacy-form .text-muted,
form.ntt-legacy-form font[color="darkred"],
form.ntt-legacy-form font[color="red"],
form.ntt-legacy-form font[color="blue"],
form.ntt-legacy-form h4,
form.ntt-legacy-form h5{
  color:var(--hf-muted) !important;
}

body[data-site-theme="dark"] form.ntt-legacy-form font[color="red"]{ color:#fca5a5 !important; }
body[data-site-theme="dark"] form.ntt-legacy-form font[color="blue"]{ color:#93c5fd !important; }

form.ntt-legacy-form hr{
  border-top:1px solid var(--hf-border);
}

/* ---------- Responsive ---------- */
@media (max-width: 991px){
  form.ntt-legacy-form{
    padding:16px;
    border-radius:16px;
  }
  form.ntt-legacy-form .ntt-form-grid-table,
  form.ntt-legacy-form .ntt-form-grid-table > tbody,
  form.ntt-legacy-form .ntt-form-grid-table > tbody > tr,
  form.ntt-legacy-form .ntt-form-grid-table > tr,
  .ntt-legacy-form-shell .ntt-form-grid-table,
  .ntt-legacy-form-shell .ntt-form-grid-table > tbody,
  .ntt-legacy-form-shell .ntt-form-grid-table > tbody > tr,
  .ntt-legacy-form-shell .ntt-form-grid-table > tr{
    display:block;
    width:100%;
  }
  form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td,
  form.ntt-legacy-form .ntt-form-grid-table > tr > td,
  form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > th,
  form.ntt-legacy-form .ntt-form-grid-table > tr > th,
  .ntt-legacy-form-shell .ntt-form-grid-table > tbody > tr > td,
  .ntt-legacy-form-shell .ntt-form-grid-table > tr > td,
  .ntt-legacy-form-shell .ntt-form-grid-table > tbody > tr > th,
  .ntt-legacy-form-shell .ntt-form-grid-table > tr > th{
    display:block;
    width:100% !important;
    min-width:0 !important;
    padding:0 0 10px !important;
  }
  form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:last-child,
  form.ntt-legacy-form .ntt-form-grid-table > tr > td:last-child,
  form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > th:last-child,
  form.ntt-legacy-form .ntt-form-grid-table > tr > th:last-child,
  .ntt-legacy-form-shell .ntt-form-grid-table > tbody > tr > td:last-child,
  .ntt-legacy-form-shell .ntt-form-grid-table > tr > td:last-child,
  .ntt-legacy-form-shell .ntt-form-grid-table > tbody > tr > th:last-child,
  .ntt-legacy-form-shell .ntt-form-grid-table > tr > th:last-child{
    padding:0 0 10px !important;
  }
}

@media (max-width: 640px){
  form.ntt-legacy-form{
    padding:14px;
  }
  form.ntt-legacy-form .ntt-form-actions,
  form.ntt-legacy-form p.ntt-form-actions,
  form.ntt-legacy-form .ntt-actions-inline{
    justify-content:stretch;
  }
  form.ntt-legacy-form .ntt-form-actions > .btn,
  form.ntt-legacy-form .ntt-form-actions > button,
  form.ntt-legacy-form .ntt-form-actions > input[type="submit"],
  form.ntt-legacy-form .ntt-form-actions > input[type="button"],
  form.ntt-legacy-form .ntt-form-actions > input[type="reset"]{
    flex:1 1 100%;
  }
}


/* ---------- Focus ownership (v856) ---------- */
/*
 * `ntt-form-row-active` remains a semantic/compatibility marker produced by
 * handmade-forms-modern.v1.js so legacy label relationships can still be
 * resolved.  It must NOT paint the whole row/cell/control.
 *
 * v855 exposed why: on enhanced legacy pages the row/cell halo stacked with
 * the shared control-focus ring, while dense opt-out pages such as
 * dsbaiallst only showed the shared ring and looked much cleaner.
 * The visual owner is now css/me/control-focus.v854.css only.
 */

/* Keep only the semantic label cue for legacy grid rows.  No cell/container
   background, border or shadow is added here. */
form.ntt-legacy-form .ntt-form-grid-table > tbody > tr.ntt-form-row-active > :first-child,
form.ntt-legacy-form .ntt-form-grid-table > tr.ntt-form-row-active > :first-child,
.ntt-legacy-form-shell .ntt-form-grid-table > tbody > tr.ntt-form-row-active > :first-child,
.ntt-legacy-form-shell .ntt-form-grid-table > tr.ntt-form-row-active > :first-child{
  color:var(--ntt-focus-label, var(--hf-primary)) !important;
  text-shadow:0 0 10px var(--ntt-focus-label-glow, rgba(37,99,235,.28));
}

form.ntt-legacy-form .ntt-form-grid-table > tbody > tr.ntt-form-row-active > :first-child :where(label,b,strong,span,font),
form.ntt-legacy-form .ntt-form-grid-table > tr.ntt-form-row-active > :first-child :where(label,b,strong,span,font),
.ntt-legacy-form-shell .ntt-form-grid-table > tbody > tr.ntt-form-row-active > :first-child :where(label,b,strong,span,font),
.ntt-legacy-form-shell .ntt-form-grid-table > tr.ntt-form-row-active > :first-child :where(label,b,strong,span,font){
  color:inherit !important;
}

/* ---------- Denser label/control spacing on key admin forms ---------- */
body[data-code="register"] form.ntt-legacy-form{
  max-width:1100px;
  margin-left:auto;
  margin-right:auto;
}

body[data-code="dsadmin"] form.ntt-legacy-form{
  width:100%;
  max-width:none;
  margin-left:0;
  margin-right:0;
  box-sizing:border-box;
}

body[data-code="register"] form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:first-child,
body[data-code="register"] form.ntt-legacy-form .ntt-form-grid-table > tr > td:first-child,
body[data-code="register"] form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > th:first-child,
body[data-code="register"] form.ntt-legacy-form .ntt-form-grid-table > tr > th:first-child,
body[data-code="dsadmin"] form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:first-child,
body[data-code="dsadmin"] form.ntt-legacy-form .ntt-form-grid-table > tr > td:first-child,
body[data-code="dsadmin"] form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > th:first-child,
body[data-code="dsadmin"] form.ntt-legacy-form .ntt-form-grid-table > tr > th:first-child{
  width:min(220px, 24%);
  min-width:150px;
  padding-right:8px;
}

body[data-code="register"] form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:last-child,
body[data-code="register"] form.ntt-legacy-form .ntt-form-grid-table > tr > td:last-child,
body[data-code="register"] form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > th:last-child,
body[data-code="register"] form.ntt-legacy-form .ntt-form-grid-table > tr > th:last-child,
body[data-code="dsadmin"] form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:last-child,
body[data-code="dsadmin"] form.ntt-legacy-form .ntt-form-grid-table > tr > td:last-child,
body[data-code="dsadmin"] form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > th:last-child,
body[data-code="dsadmin"] form.ntt-legacy-form .ntt-form-grid-table > tr > th:last-child{
  padding:10px 12px;
}


/* v317: tighten label/input spacing on addtvroom + addtvmn */
body[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table,
body.dark-mode[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table,
body.dark[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table,
body[data-code="addtvmn"] form.ntt-legacy-form .ntt-form-grid-table,
body.dark-mode[data-code="addtvmn"] form.ntt-legacy-form .ntt-form-grid-table,
body.dark[data-code="addtvmn"] form.ntt-legacy-form .ntt-form-grid-table{
  width:100% !important;
  max-width:none;
  margin:0;
  box-sizing:border-box;
  table-layout:fixed;
}

body[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:first-child,
body[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tr > td:first-child,
body.dark-mode[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:first-child,
body.dark-mode[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tr > td:first-child,
body.dark[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:first-child,
body.dark[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tr > td:first-child{
  width:168px;
  min-width:168px;
  padding-right:6px;
}

body[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:nth-child(2),
body[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tr > td:nth-child(2),
body.dark-mode[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:nth-child(2),
body.dark-mode[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tr > td:nth-child(2),
body.dark[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:nth-child(2),
body.dark[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tr > td:nth-child(2){
  width:88px;
  min-width:88px;
  padding:10px 6px 0 0 !important;
  text-align:center;
  white-space:nowrap;
  color:var(--hf-text);
  font-weight:600;
}

body[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:last-child,
body[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tr > td:last-child,
body.dark-mode[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:last-child,
body.dark-mode[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tr > td:last-child,
body.dark[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:last-child,
body.dark[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tr > td:last-child{
  padding:10px 12px !important;
}

body[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td[colspan],
body[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tr > td[colspan],
body.dark-mode[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td[colspan],
body.dark-mode[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tr > td[colspan],
body.dark[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td[colspan],
body.dark[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tr > td[colspan]{
  padding-left:0 !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}

body[data-code="addtvmn"] form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:first-child,
body[data-code="addtvmn"] form.ntt-legacy-form .ntt-form-grid-table > tr > td:first-child,
body.dark-mode[data-code="addtvmn"] form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:first-child,
body.dark-mode[data-code="addtvmn"] form.ntt-legacy-form .ntt-form-grid-table > tr > td:first-child,
body.dark[data-code="addtvmn"] form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:first-child,
body.dark[data-code="addtvmn"] form.ntt-legacy-form .ntt-form-grid-table > tr > td:first-child{
  width:180px;
  min-width:180px;
  padding-right:8px;
}

body[data-code="addtvmn"] form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:last-child,
body[data-code="addtvmn"] form.ntt-legacy-form .ntt-form-grid-table > tr > td:last-child,
body.dark-mode[data-code="addtvmn"] form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:last-child,
body.dark-mode[data-code="addtvmn"] form.ntt-legacy-form .ntt-form-grid-table > tr > td:last-child,
body.dark[data-code="addtvmn"] form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:last-child,
body.dark[data-code="addtvmn"] form.ntt-legacy-form .ntt-form-grid-table > tr > td:last-child{
  padding:10px 12px !important;
}

body[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table .form-control,
body[data-code="addtvmn"] form.ntt-legacy-form .ntt-form-grid-table .form-control,
body.dark-mode[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table .form-control,
body.dark-mode[data-code="addtvmn"] form.ntt-legacy-form .ntt-form-grid-table .form-control,
body.dark[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table .form-control,
body.dark[data-code="addtvmn"] form.ntt-legacy-form .ntt-form-grid-table .form-control{
  margin:0;
}

@media (max-width: 991px){
  body[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table,
  body[data-code="addtvmn"] form.ntt-legacy-form .ntt-form-grid-table,
  body.dark-mode[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table,
  body.dark-mode[data-code="addtvmn"] form.ntt-legacy-form .ntt-form-grid-table,
  body.dark[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table,
  body.dark[data-code="addtvmn"] form.ntt-legacy-form .ntt-form-grid-table{
    max-width:100%;
    table-layout:auto;
  }
  body[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:first-child,
  body[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tr > td:first-child,
  body[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:nth-child(2),
  body[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tr > td:nth-child(2),
  body[data-code="addtvmn"] form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:first-child,
  body[data-code="addtvmn"] form.ntt-legacy-form .ntt-form-grid-table > tr > td:first-child,
  body.dark-mode[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:first-child,
  body.dark-mode[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tr > td:first-child,
  body.dark-mode[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:nth-child(2),
  body.dark-mode[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tr > td:nth-child(2),
  body.dark-mode[data-code="addtvmn"] form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:first-child,
  body.dark-mode[data-code="addtvmn"] form.ntt-legacy-form .ntt-form-grid-table > tr > td:first-child,
  body.dark[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:first-child,
  body.dark[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tr > td:first-child,
  body.dark[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:nth-child(2),
  body.dark[data-code="addtvroom"] #myTK form.ntt-legacy-form .ntt-form-grid-table > tr > td:nth-child(2),
  body.dark[data-code="addtvmn"] form.ntt-legacy-form .ntt-form-grid-table > tbody > tr > td:first-child,
  body.dark[data-code="addtvmn"] form.ntt-legacy-form .ntt-form-grid-table > tr > td:first-child{
    width:100% !important;
    min-width:0 !important;
    padding-right:0 !important;
  }
}


/* ---------- Search rows / compact legacy lookup layout ---------- */
#data-search table#table1 > tbody > tr > td:first-child,
#data-search table#table1 > tr > td:first-child,
#data-search table[id^="table"] > tbody > tr > td:first-child,
#data-search table[id^="table"] > tr > td:first-child{
  width:130px !important;
  min-width:130px !important;
  white-space:nowrap;
}

#data-search table#table1 > tbody > tr > td:nth-child(2),
#data-search table#table1 > tr > td:nth-child(2),
#data-search table[id^="table"] > tbody > tr > td:nth-child(2),
#data-search table[id^="table"] > tr > td:nth-child(2){
  width:56px !important;
  min-width:56px !important;
  white-space:nowrap;
}

#data-search select[name="timbai_col"],
#data-search select[name="timtl_col"],
#data-search select[name="timde_col"]{
  width:180px !important;
  min-width:180px !important;
}

#data-search select[name="timbai_col"] + input.form-control,
#data-search select[name="timtl_col"] + input.form-control,
#data-search select[name="timde_col"] + input.form-control{
  width:calc(100% - 190px) !important;
  min-width:260px;
}

#data-search td > select[name="timbai_col"],
#data-search td > select[name="timtl_col"],
#data-search td > select[name="timde_col"]{
  margin-right:8px;
}

@media (max-width: 767px){
  #data-search select[name="timbai_col"],
  #data-search select[name="timtl_col"],
  #data-search select[name="timde_col"]{
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    margin:0 0 10px !important;
  }

  #data-search select[name="timbai_col"] + input.form-control,
  #data-search select[name="timtl_col"] + input.form-control,
  #data-search select[name="timde_col"] + input.form-control{
    width:100% !important;
    min-width:0 !important;
  }
}


/* v321: force wider search dropdowns and tighter label spacing even when pages use inline widths */
#data-search table#table1 td[width="150"],
#data-search table#table1 td[width="200"],
#data-search table[id^="table"] td[width="150"],
#data-search table[id^="table"] td[width="200"]{
  width:130px !important;
  min-width:130px !important;
}

#data-search table#table1 td[width="72"],
#data-search table#table1 td[width="50"],
#data-search table[id^="table"] td[width="72"],
#data-search table[id^="table"] td[width="50"]{
  width:56px !important;
  min-width:56px !important;
}

#data-search td > select[name="timbai_col"][style],
#data-search td > select[name="timtl_col"][style],
#data-search td > select[name="timde_col"][style]{
  width:180px !important;
  min-width:180px !important;
}

#data-search td > select[name="timbai_col"][style] + input[style],
#data-search td > select[name="timtl_col"][style] + input[style],
#data-search td > select[name="timde_col"][style] + input[style]{
  width:calc(100% - 190px) !important;
}


/* ---------- Search/filter form compacting across list modules ---------- */
#data-dsqtweb .ntt-form-grid-table > tbody > tr > td:first-child,
#data-dsqtweb .ntt-form-grid-table > tr > td:first-child,
#data-dsiproom .ntt-form-grid-table > tbody > tr > td:first-child,
#data-dsiproom .ntt-form-grid-table > tr > td:first-child,
#data-updateusers .ntt-form-grid-table > tbody > tr > td:first-child,
#data-updateusers .ntt-form-grid-table > tr > td:first-child,
#data-updateusersroom .ntt-form-grid-table > tbody > tr > td:first-child,
#data-updateusersroom .ntt-form-grid-table > tr > td:first-child,
#data-resetpass .ntt-form-grid-table > tbody > tr > td:first-child,
#data-resetpass .ntt-form-grid-table > tr > td:first-child,
#data-resetpassroom .ntt-form-grid-table > tbody > tr > td:first-child,
#data-resetpassroom .ntt-form-grid-table > tr > td:first-child,
#data-addremoveuser .ntt-form-grid-table > tbody > tr > td:first-child,
#data-addremoveuser .ntt-form-grid-table > tr > td:first-child{
  width:clamp(118px, 18%, 156px) !important;
  min-width:118px !important;
  max-width:156px !important;
}

#data-dsqtweb .ntt-form-grid-table,
#data-dsiproom .ntt-form-grid-table,
#data-updateusers .ntt-form-grid-table,
#data-updateusersroom .ntt-form-grid-table,
#data-resetpass .ntt-form-grid-table,
#data-resetpassroom .ntt-form-grid-table,
#data-addremoveuser .ntt-form-grid-table{
  width:100% !important;
  max-width:100% !important;
}

/* Safety: never reveal legacy hidden inputs */
form.ntt-legacy-form input[hidden],
form.ntt-legacy-form input[type="hidden"],
.ntt-legacy-form-shell input[hidden],
.ntt-legacy-form-shell input[type="hidden"]{
  display:none !important;
  width:0 !important;
  min-width:0 !important;
  max-width:0 !important;
  height:0 !important;
  min-height:0 !important;
  padding:0 !important;
  margin:0 !important;
  border:0 !important;
  box-shadow:none !important;
}

/* ===== SOURCE: search-expr.v1.css ===== */
/* Tìm kiếm thống nhất toàn web - v704 */
#myTK.panel { margin:8px 0 12px; border-radius:6px; box-shadow:none; }
#myTK .panel-heading { padding:6px 10px; min-height:32px; }
#myTK .panel-title { font-size:14px; line-height:20px; display:inline-block; margin:0; }
#myTK .panel-body { padding:8px 10px; }
#myTK .table-responsive { margin:0; }
#myTK table td, #myTK table th { padding-top:3px !important; padding-bottom:3px !important; vertical-align:middle; }
#myTK .form-control { height:30px; padding:4px 8px; font-size:13px; }
#myTK select.form-control, #myTK select { min-height:30px; }
#myTK .btn { padding-top:4px; padding-bottom:4px; }
.ntt-search-expr-input { border-radius:4px; min-height:30px; height:30px; padding-top:4px; padding-bottom:4px; font-size:13px; }
.ntt-search-expr-input.ntt-search-expr-invalid { border-color:#d9534f !important; box-shadow:0 0 0 1px rgba(217,83,79,.13); }
.ntt-search-expr-hint { display:inline-block; margin-left:8px; font-size:11px; font-weight:400; opacity:.9; white-space:nowrap; vertical-align:middle; }
.ntt-search-expr-hint code { padding:1px 3px; font-size:11px; background:rgba(255,255,255,.18); color:inherit; border-radius:3px; }
.ntt-search-expr-error { margin:5px 0 0; padding:5px 8px; font-size:12px; }
@media (max-width:767px){
  #myTK table, #myTK tbody, #myTK tr, #myTK td { display:block; width:100% !important; }
  #myTK td:first-child { padding-top:6px !important; font-weight:600; }
  .ntt-search-expr-hint { display:block; margin:3px 0 0; white-space:normal; }
}

/* ===== SOURCE: auth-modern.v1.css ===== */
/* Modern auth card */
.me-auth-page{
  max-width: 460px;
  margin: 18px auto 8px;
  padding: 0 12px;
}

.me-auth-card{
  position: relative;
  border: 1px solid rgba(148,163,184,.28);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.94));
  box-shadow: 0 24px 60px rgba(15,23,42,.12);
  overflow: hidden;
}

.me-auth-card::before{
  content: "";
  display:block;
  height: 5px;
  background: linear-gradient(90deg, #2563eb, #06b6d4, #22c55e);
}

.me-auth-card__body{
  padding: 24px 24px 20px;
}

.me-auth-card__icon{
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(37,99,235,.12);
  color: #2563eb;
  font-size: 24px;
  margin-bottom: 14px;
}

.me-auth-card__title{
  margin:0 0 6px;
  font-size: 26px;
  font-weight: 800;
  color:#0f172a;
}

.me-auth-card__subtitle{
  margin:0 0 18px;
  color:#475569;
  line-height:1.6;
}

.me-auth-form{
  display:grid;
  gap:14px;
}

.me-auth-field label{
  display:block;
  margin:0 0 7px;
  font-weight:700;
  color:#0f172a;
}

.me-auth-field .form-control{
  width:100%;
  height:46px;
  border-radius:14px;
  border:1px solid rgba(148,163,184,.42);
  background:#fff;
  color:#0f172a;
  padding:10px 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

.me-auth-field .form-control:focus{
  border-color:#2563eb;
  box-shadow:0 0 0 4px rgba(37,99,235,.14);
  outline:none;
}

.me-auth-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-top:4px;
}

.me-auth-actions .btn{
  min-height:44px;
  border-radius:14px;
  padding:10px 18px;
  font-weight:800;
}

.me-auth-actions .btn-primary{
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color:#1d4ed8;
  box-shadow:0 14px 28px rgba(37,99,235,.22);
}

.me-auth-help{
  margin-top:14px;
  color:#64748b;
  line-height:1.6;
}

.me-auth-note{
  max-width: 560px;
  margin: 18px auto 0;
  padding: 14px 16px;
  border-radius: 16px;
  border:1px solid rgba(148,163,184,.3);
  background: rgba(248,250,252,.9);
  color:#0f172a;
  line-height:1.6;
}

.me-auth-note a{ font-weight:700; }

body[data-site-theme="dark"] .me-auth-card{
  background: linear-gradient(180deg, rgba(15,23,42,.96), rgba(15,23,42,.9));
  border-color: rgba(71,85,105,.6);
  box-shadow: 0 24px 60px rgba(2,6,23,.38);
}
body[data-site-theme="dark"] .me-auth-card__title,
body[data-site-theme="dark"] .me-auth-field label,
body[data-site-theme="dark"] .me-auth-note{ color:#e5eefc; }
body[data-site-theme="dark"] .me-auth-card__subtitle,
body[data-site-theme="dark"] .me-auth-help{ color:#94a3b8; }
body[data-site-theme="dark"] .me-auth-card__icon{ background: rgba(96,165,250,.14); color:#93c5fd; }
body[data-site-theme="dark"] .me-auth-field .form-control{
  background:#0b1220;
  color:#e5eefc;
  border-color: rgba(71,85,105,.75);
  box-shadow:none;
}
body[data-site-theme="dark"] .me-auth-note{
  background: rgba(15,23,42,.86);
  border-color: rgba(71,85,105,.7);
}


.me-auth-page--wide{
  max-width: 760px;
}

.me-auth-card--join .me-auth-card__body{
  padding: 26px 28px 24px;
}

.me-auth-form--join{
  gap:16px;
}

.me-auth-field--inline{
  display:grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap:14px;
  align-items:center;
}

.me-auth-field--inline label{
  margin:0;
}

.me-auth-textarea.form-control,
.me-auth-field textarea.form-control{
  min-height: 112px;
  height: auto;
  resize: vertical;
  padding-top: 12px;
  line-height: 1.6;
}

@media (max-width: 767px){
  .me-auth-page--wide{ max-width: 560px; }
  .me-auth-field--inline{
    grid-template-columns: 1fr;
    gap:8px;
    align-items:stretch;
  }
}

body[data-site-theme="dark"] .me-auth-card--join .me-auth-help{
  color:#a5b4cc;
}

.me-auth-card--admin .me-auth-card__icon{ background: rgba(34,197,94,.14); color:#16a34a; }
body[data-site-theme="dark"] .me-auth-card--admin .me-auth-card__icon{ background: rgba(74,222,128,.12); color:#86efac; }

.me-auth-inline-alert{
  border-radius: 14px;
  border:1px solid rgba(239,68,68,.28);
}
.me-auth-captcha{
  border:1px solid rgba(148,163,184,.32);
  background: rgba(248,250,252,.82);
  border-radius: 16px;
  padding: 12px;
}
.me-auth-captcha__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
}
.me-auth-captcha__art svg{
  display:block;
  width:100%;
  max-width: 320px;
  height:auto;
  border-radius:14px;
}
.me-auth-captcha__hint{
  margin:8px 0 10px;
  color:#64748b;
  line-height:1.5;
  font-size:12px;
}
body[data-site-theme="dark"] .me-auth-captcha{
  background: rgba(11,18,32,.86);
  border-color: rgba(71,85,105,.75);
}
body[data-site-theme="dark"] .me-auth-captcha__hint{ color:#a5b4cc; }

.me-auth-captcha__risk{
  margin:0 0 10px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(245,158,11,.28);
  background: rgba(254,249,195,.72);
  color:#92400e;
  line-height:1.5;
  font-size:12px;
}
body[data-site-theme="dark"] .me-auth-captcha__risk{
  background: rgba(120,53,15,.24);
  border-color: rgba(251,191,36,.35);
  color:#fcd34d;
}

/* ===== SOURCE: center-notice-modern.v1.css ===== */
.me-center-notice-stage{
  min-height: min(68vh, 720px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px 8px 28px;
}

.me-center-notice{
  width:min(720px, calc(100vw - 42px));
  border-radius:24px;
  border:1px solid rgba(148,163,184,.26);
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.95));
  box-shadow:0 30px 80px rgba(15,23,42,.14);
  overflow:hidden;
}

.me-center-notice__bar{
  height:6px;
  background:linear-gradient(90deg, #2563eb, #06b6d4, #22c55e);
}
.me-center-notice--warning .me-center-notice__bar{
  background:linear-gradient(90deg, #f59e0b, #f97316, #ef4444);
}
.me-center-notice--danger .me-center-notice__bar{
  background:linear-gradient(90deg, #ef4444, #dc2626, #b91c1c);
}
.me-center-notice--success .me-center-notice__bar{
  background:linear-gradient(90deg, #22c55e, #10b981, #06b6d4);
}
.me-center-notice--info .me-center-notice__bar{
  background:linear-gradient(90deg, #2563eb, #3b82f6, #06b6d4);
}

.me-center-notice__body{
  padding: 26px 28px 24px;
}
.me-center-notice__head{
  display:flex;
  gap:16px;
  align-items:flex-start;
  margin-bottom:14px;
}
.me-center-notice__icon{
  width:58px;
  height:58px;
  flex:0 0 58px;
  border-radius:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:26px;
  background:rgba(37,99,235,.12);
  color:#2563eb;
}
.me-center-notice--warning .me-center-notice__icon{
  background:rgba(245,158,11,.14);
  color:#d97706;
}
.me-center-notice--danger .me-center-notice__icon{
  background:rgba(239,68,68,.14);
  color:#dc2626;
}
.me-center-notice--success .me-center-notice__icon{
  background:rgba(34,197,94,.14);
  color:#16a34a;
}

.me-center-notice__title{
  margin: 1px 0 6px;
  color:#0f172a;
  font-size:28px;
  line-height:1.22;
  font-weight:800;
}
.me-center-notice__subtitle{
  margin:0;
  color:#64748b;
  line-height:1.6;
}
.me-center-notice__content{
  color:#0f172a;
  line-height:1.75;
  font-size:16px;
}
.me-center-notice__content br + br{ display:none; }
.me-center-notice__content b,
.me-center-notice__content strong{ font-weight:800; }
.me-center-notice__content font[color="red"],
.me-center-notice__content .text-danger{ color:#dc2626 !important; }
.me-center-notice__content center{ display:block; text-align:left; }
.me-center-notice__content a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  margin: 10px 10px 0 0;
  padding: 10px 16px;
  border-radius: 13px;
  border:1px solid rgba(37,99,235,.22);
  background: rgba(37,99,235,.08);
  color:#1d4ed8 !important;
  text-decoration:none !important;
  font-weight:800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
.me-center-notice__content a:hover,
.me-center-notice__content a:focus{
  background: rgba(37,99,235,.14);
  border-color: rgba(37,99,235,.36);
}
.me-center-notice__content a[href*="CODE=login"]{
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color:#fff !important;
  border-color:#1d4ed8;
  box-shadow:0 14px 28px rgba(37,99,235,.2);
}
.me-center-notice__content .alert,
.me-center-notice__content .alert-dismissible{
  padding:0;
  margin:0;
  border:none;
  background:transparent;
  color:inherit;
  box-shadow:none;
}
.me-center-notice__content .close{ display:none; }
.me-center-notice__actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-top:16px;
}

body[data-site-theme="dark"] .me-center-notice{
  border-color: rgba(71,85,105,.58);
  background: linear-gradient(180deg, rgba(15,23,42,.98), rgba(15,23,42,.94));
  box-shadow:0 34px 90px rgba(2,6,23,.46);
}
body[data-site-theme="dark"] .me-center-notice__title,
body[data-site-theme="dark"] .me-center-notice__content{
  color:#e5eefc;
}
body[data-site-theme="dark"] .me-center-notice__subtitle{
  color:#94a3b8;
}
body[data-site-theme="dark"] .me-center-notice__icon{
  background:rgba(96,165,250,.14);
  color:#93c5fd;
}
body[data-site-theme="dark"] .me-center-notice--warning .me-center-notice__icon{
  background:rgba(245,158,11,.14);
  color:#fbbf24;
}
body[data-site-theme="dark"] .me-center-notice--danger .me-center-notice__icon{
  background:rgba(239,68,68,.14);
  color:#fca5a5;
}
body[data-site-theme="dark"] .me-center-notice--success .me-center-notice__icon{
  background:rgba(74,222,128,.12);
  color:#86efac;
}
body[data-site-theme="dark"] .me-center-notice__content a{
  border-color: rgba(96,165,250,.32);
  background: rgba(37,99,235,.16);
  color:#bfdbfe !important;
  box-shadow:none;
}
body[data-site-theme="dark"] .me-center-notice__content a:hover,
body[data-site-theme="dark"] .me-center-notice__content a:focus{
  background: rgba(37,99,235,.24);
  border-color: rgba(147,197,253,.4);
}
body[data-site-theme="dark"] .me-center-notice__content a[href*="CODE=login"]{
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color:#eff6ff !important;
  border-color:#3b82f6;
}

@media (max-width: 767px){
  .me-center-notice-stage{
    min-height: 54vh;
    padding-left: 0;
    padding-right: 0;
  }
  .me-center-notice{
    width: min(100%, calc(100vw - 24px));
    border-radius:20px;
  }
  .me-center-notice__body{
    padding:20px 18px 18px;
  }
  .me-center-notice__head{
    gap:12px;
  }
  .me-center-notice__icon{
    width:48px;
    height:48px;
    flex-basis:48px;
    border-radius:15px;
    font-size:22px;
  }
  .me-center-notice__title{
    font-size:22px;
  }
  .me-center-notice__content a{
    width:100%;
    margin-right:0;
  }
}

/* ===== SOURCE: site-theme.v3.css ===== */
/* UI GÓI 06 v3 - Site theme (Light/Dark) - high contrast, readable
   Marker: UI06V4
*/
:root{
  --site-bg:#f4f6f9;
  --site-surface:#ffffff;
  --site-surface-2:#f8fafc;
  --site-card:var(--site-surface);
  --site-soft:var(--site-surface-2);
  --site-text:#111827;
  --site-muted:#6b7280;
  --site-border:rgba(0,0,0,.12);
  --site-shadow:0 10px 28px rgba(0,0,0,.08);
  --site-link:#2563eb;
  --site-link-hover:#1d4ed8;
  --site-focus:rgba(37,99,235,.35);
  --site-navbar:#0f172a; /* keep navbar dark in both modes */
  --site-navbar-text:#ffffff;
  --site-navbar-muted:rgba(255,255,255,.75);
  --site-accent:#2563eb;
  --site-code-bg:#0b1220;
  --site-code-text:#e5e7eb;
}

body{ background:var(--site-bg); color:var(--site-text); }
a{ color:var(--site-link); }
a:hover,a:focus{ color:var(--site-link-hover); }

body[data-site-theme="dark"]{
  --site-bg:#0b1220;
  --site-surface:#0f172a;
  --site-surface-2:#111b31;
  --site-text:#e5e7eb;
  --site-muted:#aab4c5;
  --site-border:rgba(255,255,255,.14);
  --site-shadow:0 14px 34px rgba(0,0,0,.55);
  --site-link:#7aa2ff;
  --site-link-hover:#a5c1ff;
  --site-focus:rgba(122,162,255,.42);
}

/* Apply readable colors broadly (override legacy BS3 colors) */
body[data-site-theme="dark"],
body[data-site-theme="dark"] #wrapper,
body[data-site-theme="dark"] #page-wrapper,
body[data-site-theme="dark"] .container-fluid{
  color:var(--site-text);
}

body[data-site-theme="dark"] .panel,
body[data-site-theme="dark"] .well,
body[data-site-theme="dark"] .list-group-item,
body[data-site-theme="dark"] .dropdown-menu,
body[data-site-theme="dark"] .modal-content,
body[data-site-theme="dark"] .navbar-default{
  background:var(--site-surface);
  color:var(--site-text);
  border-color:var(--site-border);
}

body[data-site-theme="dark"] .panel-heading,
body[data-site-theme="dark"] .modal-header{
  background:var(--site-surface-2);
  color:var(--site-text);
  border-color:var(--site-border);
}

body[data-site-theme="dark"] .table,
body[data-site-theme="dark"] table{
  color:var(--site-text);
}
body[data-site-theme="dark"] .table>thead>tr>th{
  background:var(--site-surface-2);
  color:var(--site-text);
  border-bottom-color:var(--site-border);
}
body[data-site-theme="dark"] .table>tbody>tr>td,
body[data-site-theme="dark"] .table>tbody>tr>th{
  border-top-color:var(--site-border);
}
body[data-site-theme="dark"] .table-hover>tbody>tr:hover{
  background:rgba(255,255,255,.04);
}

body[data-site-theme="dark"] .form-control,
body[data-site-theme="dark"] select,
body[data-site-theme="dark"] textarea{
  background:var(--site-surface-2);
  color:var(--site-text);
  border-color:var(--site-border);
}
body[data-site-theme="dark"] .form-control::placeholder{ color:rgba(229,231,235,.55); }

/* Navbar brand + toggle button visible in dark */
.navbar-inverse, .navbar{ background:var(--site-navbar) !important; }
.navbar .navbar-brand, .navbar .navbar-nav>li>a{ color:var(--site-navbar-text) !important; }
.navbar .navbar-nav>li>a:hover{ color:var(--site-navbar-text) !important; opacity:.9; }

/* Focus visible */
/* v854: global focus suppression removed; control-focus.v854.css owns focus visibility. */
:focus-visible{
  box-shadow:0 0 0 3px var(--site-focus);
  border-radius:6px;
}

/* Skip link */
.skip-link{
  position:absolute; left:-9999px; top:10px;
  padding:8px 10px; background:#111827; color:#fff;
  border-radius:8px; z-index:99999; text-decoration:none;
}
.skip-link:focus{ left:10px; }

/* Small build stamp for verification */
.ui-build-stamp{
  display:inline-block;
  margin-left:10px;
  padding:2px 8px;
  border-radius:999px;
  background:rgba(255,255,255,.12);
  color:rgba(255,255,255,.9);
  font-size:12px;
  line-height:20px;
}


/* v4 contrast fix: ensure text inherits theme vars */
body[data-site-theme="dark"] .navbar,
body[data-site-theme="dark"] .navbar a,
body[data-site-theme="dark"] .navbar-nav>li>a,
body[data-site-theme="dark"] .dropdown-menu>li>a,
body[data-site-theme="dark"] #page-wrapper,
body[data-site-theme="dark"] .panel,
body[data-site-theme="dark"] .panel-heading,
body[data-site-theme="dark"] .panel-body,
body[data-site-theme="dark"] .table,
body[data-site-theme="dark"] .table>thead>tr>th,
body[data-site-theme="dark"] .table>tbody>tr>td,
body[data-site-theme="dark"] label,
body[data-site-theme="dark"] .help-block{
  color: var(--site-text) !important;
}
body[data-site-theme="dark"] .text-muted{ color: var(--site-muted) !important; }
body[data-site-theme="dark"] .panel-heading{ background: var(--site-surface-2) !important; border-color: var(--site-border) !important; }
body[data-site-theme="dark"] .table>thead>tr>th{ background: var(--site-surface-2) !important; }
body[data-site-theme="dark"] .form-control{
  background: var(--site-surface) !important;
  color: var(--site-text) !important;
  border-color: var(--site-border) !important;
}
body[data-site-theme="dark"] .dropdown-menu{
  background: var(--site-surface) !important;
  border-color: var(--site-border) !important;
}
body[data-site-theme="dark"] .dropdown-menu>li>a:hover{
  background: rgba(255,255,255,.06) !important;
}

/* Header copyright: keep in source but always invisible (do not affect layout) */
.me-header-copyright-ghost{
  position:absolute !important;
  left:-9999px !important;
  top:auto !important;
  width:1px !important;
  height:1px !important;
  overflow:hidden !important;
  opacity:0 !important;
  pointer-events:none !important;
  color: var(--site-bg) !important;
}

/* Hide any build/version stamp in navbar */
.ui-build-stamp{ display:none !important; }

/* ===== SOURCE: site-theme.darkfull.css ===== */
/* DarkFull addon - make DARK mode apply consistently across the whole site
   Marker: DARKFULL01
   Notes: Works on top of site-theme.v3.css; only active when body[data-site-theme="dark"].
*/
body[data-site-theme="dark"]{ color-scheme: dark; }

/* Bridge legacy page-level CSS vars (e.g. pages-modern.css) to site theme vars.
   This fixes pages like Hướng dẫn (modern-doc) where text was using light-mode vars
   and became unreadable on dark background.
*/
body[data-site-theme="dark"]{
  --text: var(--site-text);
  --muted: var(--site-muted);
  --border: var(--site-border);
  --surface: var(--site-surface);
  --surface-2: var(--site-surface-2);
}

/* Global text/background defaults */
body[data-site-theme="dark"]{
  background: var(--site-bg) !important;
  color: var(--site-text) !important;
}
body[data-site-theme="dark"] ::selection{ background: rgba(122,162,255,.35); color: var(--site-text); }

/* Make borders unify */
body[data-site-theme="dark"] *,
body[data-site-theme="dark"] *::before,
body[data-site-theme="dark"] *::after{
  border-color: var(--site-border);
}

/* Page surfaces */
body[data-site-theme="dark"] #wrapper,
body[data-site-theme="dark"] #page-wrapper,
body[data-site-theme="dark"] .container-fluid{
  background: transparent !important;
  color: var(--site-text) !important;
}
body[data-site-theme="dark"] .page-header{
  border-bottom-color: var(--site-border) !important;
}

/* Headings */
body[data-site-theme="dark"] h1,
body[data-site-theme="dark"] h2,
body[data-site-theme="dark"] h3,
body[data-site-theme="dark"] h4,
body[data-site-theme="dark"] h5,
body[data-site-theme="dark"] h6{
  color: var(--site-text) !important;
}

/* Links */
body[data-site-theme="dark"] a{ color: var(--site-link) !important; }
body[data-site-theme="dark"] a:hover,
body[data-site-theme="dark"] a:focus{ color: var(--site-link-hover) !important; }

/* Panels / cards */
body[data-site-theme="dark"] .panel,
body[data-site-theme="dark"] .panel-default,
body[data-site-theme="dark"] .well{
  background: var(--site-surface) !important;
  color: var(--site-text) !important;
  border-color: var(--site-border) !important;
  box-shadow: none !important;
}
body[data-site-theme="dark"] .panel-heading{
  background: var(--site-surface-2) !important;
  color: var(--site-text) !important;
  border-color: var(--site-border) !important;
}
body[data-site-theme="dark"] .panel-footer{
  background: var(--site-surface-2) !important;
  color: var(--site-text) !important;
  border-color: var(--site-border) !important;
}
body[data-site-theme="dark"] .panel-title,
body[data-site-theme="dark"] .panel-title a{ color: var(--site-text) !important; }

/* Hướng dẫn / doc-like blocks */
body[data-site-theme="dark"] .modern-doc,
body[data-site-theme="dark"] .modern-doc p,
body[data-site-theme="dark"] .modern-doc li,
body[data-site-theme="dark"] .modern-doc small,
body[data-site-theme="dark"] .modern-doc h1,
body[data-site-theme="dark"] .modern-doc h2,
body[data-site-theme="dark"] .modern-doc h3{
  color: var(--site-text) !important;
}
body[data-site-theme="dark"] .modern-doc h2{ border-bottom-color: var(--site-border) !important; }
body[data-site-theme="dark"] .modern-doc pre{
  background: var(--site-surface-2) !important;
  border-color: var(--site-border) !important;
}
body[data-site-theme="dark"] .modern-doc code{ color: var(--site-text) !important; }
body[data-site-theme="dark"] .call-to-action{
  background: linear-gradient(180deg, var(--site-surface), var(--site-surface-2)) !important;
  border-color: var(--site-border) !important;
  color: var(--site-text) !important;
}

/* Make legacy <font color> readable on dark (keep intent, increase contrast) */
body[data-site-theme="dark"] .modern-doc font[color="red"],
body[data-site-theme="dark"] .modern-doc font[color="#ff0000"],
body[data-site-theme="dark"] .modern-doc font[color="#FF0000"]{
  color: #fb7185 !important;
}
body[data-site-theme="dark"] .modern-doc font[color="blue"],
body[data-site-theme="dark"] .modern-doc font[color="#0000ff"],
body[data-site-theme="dark"] .modern-doc font[color="#0000FF"]{
  color: #93c5fd !important;
}

/* Tables */
body[data-site-theme="dark"] .table{
  background: transparent !important;
  color: var(--site-text) !important;
}
body[data-site-theme="dark"] .table>thead>tr>th{
  background: var(--site-surface-2) !important;
  color: var(--site-text) !important;
  border-bottom-color: var(--site-border) !important;
}
body[data-site-theme="dark"] .table>tbody>tr>td,
body[data-site-theme="dark"] .table>tbody>tr>th{
  color: var(--site-text) !important;
  border-top-color: var(--site-border) !important;
}
body[data-site-theme="dark"] .table-bordered,
body[data-site-theme="dark"] .table-bordered>thead>tr>th,
body[data-site-theme="dark"] .table-bordered>tbody>tr>td{
  border-color: var(--site-border) !important;
}
body[data-site-theme="dark"] .table-striped>tbody>tr:nth-of-type(odd){
  background: rgba(255,255,255,.03) !important;
}
body[data-site-theme="dark"] .table-hover>tbody>tr:hover{
  background: rgba(255,255,255,.06) !important;
}
body[data-site-theme="dark"] .table-responsive{
  border-color: var(--site-border) !important;
}

/* Forms */
body[data-site-theme="dark"] .form-control,
body[data-site-theme="dark"] input[type="text"],
body[data-site-theme="dark"] input[type="email"],
body[data-site-theme="dark"] input[type="password"],
body[data-site-theme="dark"] input[type="number"],
body[data-site-theme="dark"] textarea,
body[data-site-theme="dark"] select{
  background: var(--site-surface) !important;
  color: var(--site-text) !important;
  border-color: var(--site-border) !important;
}
body[data-site-theme="dark"] .form-control:focus{
  border-color: rgba(122,162,255,.65) !important;
  box-shadow: 0 0 0 3px var(--site-focus) !important;
}
body[data-site-theme="dark"] .input-group-addon{
  background: var(--site-surface-2) !important;
  color: var(--site-text) !important;
  border-color: var(--site-border) !important;
}
body[data-site-theme="dark"] .help-block{ color: var(--site-muted) !important; }

/* Buttons */
body[data-site-theme="dark"] .btn{
  border-color: var(--site-border) !important;
}
body[data-site-theme="dark"] .btn-default{
  background: var(--site-surface-2) !important;
  color: var(--site-text) !important;
}
body[data-site-theme="dark"] .btn-default:hover{
  background: rgba(255,255,255,.10) !important;
}
body[data-site-theme="dark"] .btn-link{ color: var(--site-link) !important; }
body[data-site-theme="dark"] .btn-link:hover{ color: var(--site-link-hover) !important; }

/* Dropdown / nav */
body[data-site-theme="dark"] .dropdown-menu{
  background: var(--site-surface) !important;
  color: var(--site-text) !important;
  border-color: var(--site-border) !important;
}
body[data-site-theme="dark"] .dropdown-menu>li>a{
  color: var(--site-text) !important;
}
body[data-site-theme="dark"] .dropdown-menu>li>a:hover,
body[data-site-theme="dark"] .dropdown-menu>li>a:focus{
  background: rgba(255,255,255,.08) !important;
}
body[data-site-theme="dark"] .nav>li>a{ color: var(--site-text) !important; }
body[data-site-theme="dark"] .nav>li>a:hover,
body[data-site-theme="dark"] .nav>li>a:focus{ background: rgba(255,255,255,.06) !important; }

body[data-site-theme="dark"] .nav-tabs{
  border-bottom-color: var(--site-border) !important;
}
body[data-site-theme="dark"] .nav-tabs>li>a{
  background: transparent !important;
  border-color: transparent !important;
}
body[data-site-theme="dark"] .nav-tabs>li.active>a,
body[data-site-theme="dark"] .nav-tabs>li.active>a:hover,
body[data-site-theme="dark"] .nav-tabs>li.active>a:focus{
  background: var(--site-surface) !important;
  color: var(--site-text) !important;
  border-color: var(--site-border) !important;
}

/* Pagination */
body[data-site-theme="dark"] .pagination>li>a,
body[data-site-theme="dark"] .pagination>li>span{
  background: var(--site-surface) !important;
  color: var(--site-text) !important;
  border-color: var(--site-border) !important;
}
body[data-site-theme="dark"] .pagination>li>a:hover{
  background: rgba(255,255,255,.08) !important;
}
body[data-site-theme="dark"] .pagination>.active>a,
body[data-site-theme="dark"] .pagination>.active>span{
  background: rgba(122,162,255,.22) !important;
  border-color: rgba(122,162,255,.35) !important;
  color: var(--site-text) !important;
}

/* Alerts */
body[data-site-theme="dark"] .alert{
  border-color: var(--site-border) !important;
  color: var(--site-text) !important;
}
body[data-site-theme="dark"] .alert-info{ background: rgba(59,130,246,.10) !important; }
body[data-site-theme="dark"] .alert-success{ background: rgba(34,197,94,.10) !important; }
body[data-site-theme="dark"] .alert-warning{ background: rgba(245,158,11,.10) !important; }
body[data-site-theme="dark"] .alert-danger{ background: rgba(239,68,68,.10) !important; }

/* Labels / badges */
body[data-site-theme="dark"] .label,
body[data-site-theme="dark"] .badge{
  border: 1px solid var(--site-border);
}
body[data-site-theme="dark"] .label-default{ background: rgba(255,255,255,.10) !important; color: var(--site-text) !important; }

/* Fix: badges from modern components use var(--ui-text) which stays dark.
   In dark theme, force badges to use site text color so timestamps (e.g. history) are readable. */
body[data-site-theme="dark"] .badge{
  color: var(--site-text) !important;
  background: rgba(255,255,255,.10) !important;
}
body[data-site-theme="dark"] .badge .fa,
body[data-site-theme="dark"] .badge font{
  color: inherit !important;
}

/* Fix: legacy <font color="black"> used widely (e.g. History title) becomes unreadable on dark.
   Force it to inherit theme text color, but keep code/log blocks intact. */
body[data-site-theme="dark"] font[color="black"],
body[data-site-theme="dark"] font[color="#000"],
body[data-site-theme="dark"] font[color="#000000"],
body[data-site-theme="dark"] font[color="BLACK"]{
  color: var(--site-text) !important;
}
body[data-site-theme="dark"] pre font[color="black"],
body[data-site-theme="dark"] pre font[color="#000"],
body[data-site-theme="dark"] pre font[color="#000000"],
body[data-site-theme="dark"] code font[color="black"],
body[data-site-theme="dark"] code font[color="#000"],
body[data-site-theme="dark"] code font[color="#000000"],
body[data-site-theme="dark"] pre.prettyprint font{
  color: inherit !important;
}

/* Fix: Loại bài filter pills (.cb-inline) keep white background in dark mode
   while text turns light -> unreadable. */
body[data-site-theme="dark"] .cb-inline{
  background: var(--site-surface) !important;
  border-color: var(--site-border) !important;
  box-shadow: none !important;
  color: var(--site-text) !important;
}
body[data-site-theme="dark"] .cb-inline:hover{
  background: rgba(255,255,255,.06) !important;
}
body[data-site-theme="dark"] .cb-inline label{ color: inherit !important; }
body[data-site-theme="dark"] .cb-inline:has(input[type="checkbox"]:checked){
  background: rgba(34,197,94,.14) !important;
  border-color: rgba(34,197,94,.35) !important;
  box-shadow: none !important;
  color: var(--site-text) !important;
}


/* Modal */
body[data-site-theme="dark"] .modal-content{
  background: var(--site-surface) !important;
  color: var(--site-text) !important;
  border-color: var(--site-border) !important;
}
body[data-site-theme="dark"] .modal-header,
body[data-site-theme="dark"] .modal-footer{
  border-color: var(--site-border) !important;
  background: var(--site-surface-2) !important;
}
body[data-site-theme="dark"] .close{ color: var(--site-text) !important; opacity: .85 !important; }

/* Pre/Code blocks */
body[data-site-theme="dark"] pre,
body[data-site-theme="dark"] code,
body[data-site-theme="dark"] kbd,
body[data-site-theme="dark"] samp{
  background: var(--site-code-bg) !important;
  color: var(--site-code-text) !important;
  border-color: rgba(255,255,255,.10) !important;
}
body[data-site-theme="dark"] pre{ box-shadow: none !important; }

/* SB Admin sidebar + top nav stay readable */
body[data-site-theme="dark"] .navbar-inverse,
body[data-site-theme="dark"] .navbar{
  /* keep as-is; ensure text readable */
  color: var(--site-navbar-text) !important;
}
body[data-site-theme="dark"] .navbar a{ color: var(--site-navbar-text) !important; }
body[data-site-theme="dark"] .navbar a:hover{ color: #fff !important; }

/* Utility */
body[data-site-theme="dark"] .text-muted{ color: var(--site-muted) !important; }
body[data-site-theme="dark"] hr{ border-top-color: var(--site-border) !important; }

/* --- DarkFull v2: cover non-standard table markup (thead td, missing tbody, etc.) --- */
body[data-site-theme="dark"] .table-responsive{
  background: transparent !important;
}
body[data-site-theme="dark"] .table>thead>tr>td{
  background: var(--site-surface-2) !important;
  color: var(--site-text) !important;
  border-bottom-color: var(--site-border) !important;
}
body[data-site-theme="dark"] .table>thead>tr>td,
body[data-site-theme="dark"] .table>tbody>tr>td,
body[data-site-theme="dark"] .table>tbody>tr>th,
body[data-site-theme="dark"] .table>tr>td,
body[data-site-theme="dark"] .table>tr>th{
  color: var(--site-text) !important;
  background: transparent !important;
}
body[data-site-theme="dark"] .table-bordered>thead>tr>td,
body[data-site-theme="dark"] .table-bordered>tr>td,
body[data-site-theme="dark"] .table-bordered>tr>th{
  border-color: var(--site-border) !important;
}
body[data-site-theme="dark"] .table-striped>tr:nth-of-type(odd),
body[data-site-theme="dark"] .table-striped>tbody>tr:nth-of-type(odd){
  background: rgba(255,255,255,.03) !important;
}
body[data-site-theme="dark"] .table-hover>tr:hover,
body[data-site-theme="dark"] .table-hover>tbody>tr:hover{
  background: rgba(122,162,255,.08) !important;
}


/* ------------------------------
   Extra table coverage (Autorank + legacy markup)
   - Some pages render <thead> with <td> directly (no <tr>)
   - Some tables render rows directly under <table> (no <tbody>)
   Marker: DARKFULL02
---------------------------------*/
body[data-site-theme="dark"] .table{
  background: var(--site-surface) !important;
}

/* Header cells even when markup is non-standard */
body[data-site-theme="dark"] .table>thead,
body[data-site-theme="dark"] .table>thead>td,
body[data-site-theme="dark"] .table>thead>th,
body[data-site-theme="dark"] .table>thead td,
body[data-site-theme="dark"] .table>thead th{
  background: var(--site-surface-2) !important;
  color: var(--site-text) !important;
  border-color: var(--site-border) !important;
}

/* Rows without <tbody> */
body[data-site-theme="dark"] .table>tr>td,
body[data-site-theme="dark"] .table>tr>th{
  background: transparent !important;
  color: var(--site-text) !important;
  border-color: var(--site-border) !important;
}

/* Stripes / hover without <tbody> */
body[data-site-theme="dark"] .table-striped>tr:nth-of-type(odd),
body[data-site-theme="dark"] .table-striped>tr:nth-of-type(odd)>td,
body[data-site-theme="dark"] .table-striped>tr:nth-of-type(odd)>th{
  background: rgba(255,255,255,.03) !important;
}
body[data-site-theme="dark"] .table-hover>tr:hover,
body[data-site-theme="dark"] .table-hover>tr:hover>td,
body[data-site-theme="dark"] .table-hover>tr:hover>th{
  background: rgba(255,255,255,.06) !important;
}

/* Borders without <tbody>/<tr> */
body[data-site-theme="dark"] .table-bordered>thead>td,
body[data-site-theme="dark"] .table-bordered>thead>th,
body[data-site-theme="dark"] .table-bordered>tr>td,
body[data-site-theme="dark"] .table-bordered>tr>th,
body[data-site-theme="dark"] .table-bordered>thead td,
body[data-site-theme="dark"] .table-bordered>thead th{
  border-color: var(--site-border) !important;
}

/* List-group items used inside rank tables */
body[data-site-theme="dark"] .list-group-item{
  background: var(--site-surface) !important;
  color: var(--site-text) !important;
  border-color: var(--site-border) !important;
}
body[data-site-theme="dark"] .list-group-item:hover,
body[data-site-theme="dark"] .list-group-item:focus{
  background: rgba(255,255,255,.08) !important;
}

/* ------------------------------------------------------------------
   Code / Log blocks (prettyprint, pre, code) - ensure readability
   Many legacy pages set inline black text; force high contrast in dark.
-------------------------------------------------------------------*/
body[data-site-theme="dark"] pre,
body[data-site-theme="dark"] code,
body[data-site-theme="dark"] kbd,
body[data-site-theme="dark"] samp{
  color: var(--site-text) !important;
}

body[data-site-theme="dark"] pre.prettyprint,
body[data-site-theme="dark"] pre#log-box,
body[data-site-theme="dark"] pre.me-log,
body[data-site-theme="dark"] .prettyprint{
  background: #0b1220 !important;
  color: #e5e7eb !important;
  border: 1px solid #22304a !important;
  border-radius: 10px;
}

/* Some pages wrap code in <font> tags or inline spans */
body[data-site-theme="dark"] pre.prettyprint font,
body[data-site-theme="dark"] pre#log-box font{
  color: inherit !important;
}

/* Links inside code/log */
body[data-site-theme="dark"] pre.prettyprint a,
body[data-site-theme="dark"] pre#log-box a{
  color: #93c5fd !important;
}

/* Google Prettify token colors in dark mode */
body[data-site-theme="dark"] pre.prettyprint .pln{ color:#e5e7eb !important; }
body[data-site-theme="dark"] pre.prettyprint .com{ color:#94a3b8 !important; }
body[data-site-theme="dark"] pre.prettyprint .lit{ color:#fbbf24 !important; }
body[data-site-theme="dark"] pre.prettyprint .pun{ color:#e2e8f0 !important; }
body[data-site-theme="dark"] pre.prettyprint .opn{ color:#e2e8f0 !important; }
body[data-site-theme="dark"] pre.prettyprint .clo{ color:#e2e8f0 !important; }
body[data-site-theme="dark"] pre.prettyprint .fun{ color:#60a5fa !important; }
body[data-site-theme="dark"] pre.prettyprint .str{ color:#34d399 !important; }
body[data-site-theme="dark"] pre.prettyprint .kwd{ color:#93c5fd !important; }
body[data-site-theme="dark"] pre.prettyprint .typ{ color:#c4b5fd !important; }
body[data-site-theme="dark"] pre.prettyprint .tag{ color:#fca5a5 !important; }
body[data-site-theme="dark"] pre.prettyprint .atn{ color:#fcd34d !important; }
body[data-site-theme="dark"] pre.prettyprint .atv{ color:#34d399 !important; }
body[data-site-theme="dark"] pre.prettyprint .dec{ color:#fbbf24 !important; }
body[data-site-theme="dark"] pre.prettyprint .var{ color:#e5e7eb !important; }

/* Controls/toolbar on code pages (if present) */
body[data-site-theme="dark"] .controls,
body[data-site-theme="dark"] .me-log-toolbar,
body[data-site-theme="dark"] .me-code-toolbar{
  color: #e5e7eb !important;
}
body[data-site-theme="dark"] .controls button,
body[data-site-theme="dark"] .me-log-toolbar .me-btn,
body[data-site-theme="dark"] .me-code-toolbar .me-btn{
  background: rgba(255,255,255,.06) !important;
  color: #e5e7eb !important;
  border-color: #22304a !important;
}
body[data-site-theme="dark"] .controls button:hover,
body[data-site-theme="dark"] .me-log-toolbar .me-btn:hover,
body[data-site-theme="dark"] .me-code-toolbar .me-btn:hover{
  background: rgba(255,255,255,.12) !important;
}


/* Darkfull: Breadcrumb */
body[data-site-theme="dark"] .breadcrumb{
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  color: var(--site-text, #e5e7eb) !important;
}
body[data-site-theme="dark"] .breadcrumb > li,
body[data-site-theme="dark"] .breadcrumb > li.active{
  color: var(--site-text, #e5e7eb) !important;
}
body[data-site-theme="dark"] .breadcrumb a{
  color: var(--site-link, #93c5fd) !important;
  text-decoration: none;
}
body[data-site-theme="dark"] .breadcrumb a:hover{
  color: var(--site-link-hover, #bfdbfe) !important;
  text-decoration: underline;
}
body[data-site-theme="dark"] .breadcrumb > li + li:before{
  color: rgba(255,255,255,0.45) !important;
}

/* =========================
   CodeMirror selection visibility (dark mode)
   Marker: CMSEL01
   Fix: On some pages/addons (e.g. styleSelectedText), selection may render via
        span.CodeMirror-selectedtext and look like it "disappears" in dark mode.
   ========================= */
body[data-site-theme="dark"] .CodeMirror-selected,
body[data-site-theme="dark"] .CodeMirror-focused .CodeMirror-selected{
  background: rgba(122,162,255,.30) !important;
}
body[data-site-theme="dark"] span.CodeMirror-selectedtext{
  background: rgba(122,162,255,.32) !important;
  color: inherit !important;
}
/* Native selection (some CodeMirror builds rely on ::selection). */
body[data-site-theme="dark"] .CodeMirror ::selection{
  background: rgba(122,162,255,.38) !important;
}
body[data-site-theme="dark"] .CodeMirror ::-moz-selection{
  background: rgba(122,162,255,.38) !important;
}
/* Keep CodeMirror selection stable: don't force user-select:text on all internal layers.
   Allow selection on content only (lines/pre), keep gutters non-selectable. */
body[data-site-theme="dark"] .CodeMirror pre,
body[data-site-theme="dark"] .CodeMirror-line,
body[data-site-theme="dark"] .CodeMirror-line *,
body[data-site-theme="dark"] .CodeMirror-code,
body[data-site-theme="dark"] .CodeMirror-code *{
  -webkit-user-select: text;
  user-select: text;
}
body[data-site-theme="dark"] .CodeMirror-gutters,
body[data-site-theme="dark"] .CodeMirror-gutter{
  -webkit-user-select: none;
  user-select: none;
}

/* =========================
   CodeMirror selection visibility - stronger (system dark)
   Marker: CMSEL02
   Notes:
   - Some markText highlights (search/match) can visually "mask" selection, especially in dark mode.
   - Force a higher-contrast selection color under system dark, and degrade match-highlights to underline.
   ========================= */
body[data-site-theme="dark"] .CodeMirror .CodeMirror-selected,
body[data-site-theme="dark"] .CodeMirror-focused .CodeMirror-selected,
body[data-site-theme="dark"] .CodeMirror span.CodeMirror-selectedtext{
  background: rgba(59,130,246,.58) !important;
  mix-blend-mode: normal !important;
}
body[data-site-theme="dark"] .CodeMirror-focused .CodeMirror-selected,
body[data-site-theme="dark"] .CodeMirror-focused span.CodeMirror-selectedtext{
  background: rgba(59,130,246,.68) !important;
}

/* Match highlights when selecting a word (same-word glow) in system Dark.
   NOTE: Our JS already skips matches that overlap the current selection, so we can safely
   use a faint background fill here (it won't cover the selection layer).
   Also override inline/injected styles that force underline-only in body.editor-dark. */
body[data-site-theme="dark"] .CodeMirror .cm-selectionWordMatch,
body[data-site-theme="dark"] .CodeMirror .cm-selectionMatch,
body[data-site-theme="dark"] .CodeMirror .cm-matchhighlight,
body[data-site-theme="dark"] .CodeMirror span.cm-searching{
  background: rgba(0, 255, 180, .14) !important;
  border-radius: 3px;
  box-shadow:
    0 0 0 1px rgba(0, 255, 180, .52),
    0 0 14px rgba(0, 255, 180, .22) !important;
}

/* Stronger glow on focus for better visibility */
body[data-site-theme="dark"] .CodeMirror-focused .cm-selectionWordMatch,
body[data-site-theme="dark"] .CodeMirror-focused .cm-selectionMatch,
body[data-site-theme="dark"] .CodeMirror-focused .cm-matchhighlight,
body[data-site-theme="dark"] .CodeMirror-focused span.cm-searching{
  background: rgba(0, 255, 180, .20) !important;
  box-shadow:
    0 0 0 1px rgba(0, 255, 180, .68),
    0 0 18px rgba(0, 255, 180, .28) !important;
}

/* Highest-specificity override when both system dark + editor-dark are present (most pages).
   This beats the injected style from submitdht.js: body.editor-dark .cm-selectionWordMatch{ background:transparent!important; ... } */
body[data-site-theme="dark"].editor-dark .CodeMirror .cm-selectionWordMatch,
body[data-site-theme="dark"].editor-dark .CodeMirror .cm-selectionMatch,
body[data-site-theme="dark"].editor-dark .CodeMirror .cm-matchhighlight,
body[data-site-theme="dark"].editor-dark .CodeMirror span.cm-searching{
  background: rgba(0, 255, 180, .18) !important;
  box-shadow:
    0 0 0 1px rgba(0, 255, 180, .70),
    0 0 22px rgba(0, 255, 180, .30) !important;
}

/* In case the build uses native selection inside CodeMirror (contenteditable). */
body[data-site-theme="dark"] .CodeMirror ::selection{
  background: rgba(59,130,246,.55) !important;
  color: inherit !important;
}
body[data-site-theme="dark"] .CodeMirror ::-moz-selection{
  background: rgba(59,130,246,.55) !important;
  color: inherit !important;
}


/* =========================
   CodeMirror selection visibility - FIX ROOT CAUSE (system dark)
   Marker: CMSEL03
   Root cause:
   - In Dark mode we style all <pre> blocks with a dark background for readability.
   - CodeMirror renders each line as a <pre>. That global rule paints over the selection layer,
     making selection look like it "doesn't exist".
   Fix:
   - Neutralize <pre>/<code> styling *inside CodeMirror* so the selection layer remains visible.
   - Use a high-contrast selection color (green) and invert selected text when styleSelectedText is present.
   ========================= */
body[data-site-theme="dark"] .CodeMirror pre,
body[data-site-theme="dark"] .CodeMirror code,
body[data-site-theme="dark"] .CodeMirror kbd,
body[data-site-theme="dark"] .CodeMirror samp{
  background: transparent !important;
  color: inherit !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* High-contrast selection (green) */
body[data-site-theme="dark"] .CodeMirror .CodeMirror-selected,
body[data-site-theme="dark"] .CodeMirror-focused .CodeMirror-selected{
  background: rgba(0, 255, 140, .45) !important;
}
body[data-site-theme="dark"] .CodeMirror-focused .CodeMirror-selected{
  background: rgba(0, 255, 140, .60) !important;
}

/* If styleSelectedText addon is active, selected text is wrapped with this span. */
body[data-site-theme="dark"] .CodeMirror span.CodeMirror-selectedtext{
  background: rgba(0, 255, 140, .55) !important;
  color: #00110a !important;
}

/* Native selection fallback (some builds rely on ::selection). */
body[data-site-theme="dark"] .CodeMirror ::selection{
  background: rgba(0, 255, 140, .55) !important;
  color: #00110a !important;
}
body[data-site-theme="dark"] .CodeMirror ::-moz-selection{
  background: rgba(0, 255, 140, .55) !important;
  color: #00110a !important;
}

/* =========================================================
   v20 FIX: Toolbar buttons readability in dark mode
   - Applies to Hỏi-Đáp and any page where ui-admin/ui-codeviewer injects toolbars
   - Covers cases where only editor-dark / me-log-dark classes are toggled
========================================================= */
body[data-site-theme="dark"] .me-log-toolbar .me-btn,
body[data-site-theme="dark"] .me-code-toolbar .me-btn,
body[data-site-theme="dark"] .me-log-toolbar .btn,
body[data-site-theme="dark"] .me-code-toolbar .btn,
body.me-log-dark .me-log-toolbar .me-btn,
body.me-code-dark .me-code-toolbar .me-btn,
body.editor-dark .me-log-toolbar .me-btn,
body.editor-dark .me-code-toolbar .me-btn{
  background: rgba(15,23,42,.88) !important;
  color: #e5e7eb !important;
  border-color: rgba(148,163,184,.28) !important;
  text-shadow: none !important;
}
body[data-site-theme="dark"] .me-log-toolbar .me-btn:hover,
body[data-site-theme="dark"] .me-code-toolbar .me-btn:hover,
body.me-log-dark .me-log-toolbar .me-btn:hover,
body.me-code-dark .me-code-toolbar .me-btn:hover,
body.editor-dark .me-log-toolbar .me-btn:hover,
body.editor-dark .me-code-toolbar .me-btn:hover{
  background: rgba(15,23,42,.98) !important;
}

/* ===== SOURCE: heading-unify.v1.css ===== */
/* Heading Unify v1
   Goal: make ALL panel/div headings consistent (light + dark), even if legacy CSS paints them.
   Marker: HEADINGUNIFY01
*/

:root{
  --heading-bg: rgba(17,24,39,.03);
  --heading-border: rgba(0,0,0,.10);
  --heading-text: var(--ui-text, #111827);
}

body[data-site-theme="dark"]{
  --heading-bg: var(--site-surface-2, #111b31);
  --heading-border: var(--site-border, rgba(255,255,255,.14));
  --heading-text: var(--site-text, #e5e7eb);
}

/* Common heading containers (Bootstrap 3 + custom) */
.panel > .panel-heading,
.panel-default > .panel-heading,
.panel-primary > .panel-heading,
.panel-success > .panel-heading,
.panel-info > .panel-heading,
.panel-warning > .panel-heading,
.panel-danger > .panel-heading,
.panel-green > .panel-heading,
.panel-red > .panel-heading,
.panel-yellow > .panel-heading,
.panel .panel-heading,
.box > .box-header,
.box-header,
.card > .card-header,
.card-header,
.me-card > .me-card-header,
.me-card-header,
.section-header,
.table-title,
.table-header{
  background: var(--heading-bg) !important;
  color: var(--heading-text) !important;
  border-color: var(--heading-border) !important;
}

/* Ensure text inside headings stays readable */
.panel-heading,
.panel-heading * ,
.box-header,
.box-header *,
.card-header,
.card-header *{
  color: var(--heading-text) !important;
}

/* Keep links readable but still look like links on hover */
.panel-heading a,
.box-header a,
.card-header a{
  color: var(--heading-text) !important;
  text-decoration: none;
}
.panel-heading a:hover,
.box-header a:hover,
.card-header a:hover{
  text-decoration: underline;
}

/* If any legacy theme forces WHITE text, neutralize it in both modes */
.panel-heading .text-muted,
.box-header .text-muted,
.card-header .text-muted{
  color: color-mix(in srgb, var(--heading-text) 70%, transparent) !important;
}

/* Slight outline for better contrast on tinted backgrounds (subtle) */
.panel-heading,
.box-header,
.card-header{
  text-shadow: 0 1px 0 rgba(255,255,255,.28), 0 0 1px rgba(0,0,0,.22);
}
body[data-site-theme="dark"] .panel-heading,
body[data-site-theme="dark"] .box-header,
body[data-site-theme="dark"] .card-header{
  text-shadow: 0 1px 0 rgba(0,0,0,.42), 0 0 1px rgba(0,0,0,.55);
}

/* ===== SOURCE: chatbot-widget.v1.css ===== */

html.ntt-chatbot-lock-scroll,
body.ntt-chatbot-lock-scroll{
  overflow:hidden !important;
  overscroll-behavior:none;
}

.ntt-chatbot-panel,
.ntt-chatbot-messages,
#nttChatbotInput,
.ntt-chatbot-bubble pre{
  overscroll-behavior:contain;
}


.ntt-chatbot-root,
.ntt-chatbot-root *,
.ntt-chatbot-panel,
.ntt-chatbot-panel *,
.ntt-chatbot-messages,
.ntt-chatbot-messages *,
#nttChatbotInput{
  -webkit-user-select:text !important;
  -moz-user-select:text !important;
  -ms-user-select:text !important;
  user-select:text !important;
}
.ntt-chatbot-root{
  position:fixed;
  right:16px;
  top:56px;
  z-index:1045;
  font-family:inherit;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
}
.ntt-chatbot-fab{
  display:flex;
  align-items:center;
  gap:8px;
  border:0;
  border-radius:999px;
  padding:10px 14px;
  box-shadow:0 10px 30px rgba(0,0,0,.18);
  background:#0d6efd;
  color:#fff;
  cursor:grab;
  font-weight:600;
  touch-action:none;
  -webkit-user-select:none !important;
  user-select:none !important;
}
.ntt-chatbot-root.is-fab-dragging .ntt-chatbot-fab,
html.ntt-chatbot-is-dragging-fab .ntt-chatbot-fab{ cursor:grabbing; }
html.ntt-chatbot-is-dragging-fab,
html.ntt-chatbot-is-dragging-fab *{ -webkit-user-select:none !important; user-select:none !important; }
.ntt-chatbot-root.is-fab-positioned{
  right:auto;
  bottom:auto;
  align-items:flex-start;
}
.ntt-chatbot-root.ntt-chatbot-panel-from-left .ntt-chatbot-panel{ left:0; right:auto; }
.ntt-chatbot-root.ntt-chatbot-panel-above .ntt-chatbot-panel{ top:auto; bottom:52px; }

.ntt-chatbot-fab:hover{ filter:brightness(.98); }
.ntt-chatbot-fab:focus{ outline:none; box-shadow:0 0 0 3px rgba(13,110,253,.22),0 10px 30px rgba(0,0,0,.18); }
.ntt-chatbot-fab-label{ font-weight:600; }
.ntt-chatbot-panel{
  position:absolute;
  right:0;
  top:52px;
  width:min(430px, calc(100vw - 24px));
  height:min(620px, calc(100vh - 100px));
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:18px;
  overflow:hidden;
  display:none;
  box-shadow:0 20px 50px rgba(0,0,0,.22);
  box-sizing:border-box;
  min-width:320px;
  min-height:360px;
  max-width:calc(100vw - 24px);
  max-height:calc(100vh - 122px);
}
.ntt-chatbot-resize-handle{
  position:absolute;
  z-index:8;
  display:block;
  touch-action:none;
}
.ntt-chatbot-resize-handle.is-left{
  left:0;
  top:58px;
  bottom:14px;
  width:8px;
  cursor:ew-resize;
}
.ntt-chatbot-resize-handle.is-bottom{
  left:14px;
  right:0;
  bottom:0;
  height:8px;
  cursor:ns-resize;
}
.ntt-chatbot-resize-handle.is-corner{
  left:0;
  bottom:0;
  width:18px;
  height:18px;
  cursor:nesw-resize;
}
.ntt-chatbot-resize-handle.is-corner:after{
  content:"";
  position:absolute;
  left:4px;
  bottom:4px;
  width:9px;
  height:9px;
  border-left:2px solid rgba(80,94,112,.55);
  border-bottom:2px solid rgba(80,94,112,.55);
  border-radius:0 0 0 2px;
}
html.ntt-chatbot-is-resizing,
html.ntt-chatbot-is-resizing *{
  user-select:none !important;
}
.ntt-chatbot-panel.is-resizing{
  transition:none !important;
}

.ntt-chatbot-root.is-open .ntt-chatbot-panel{ display:flex; flex-direction:column; }
.ntt-chatbot-root.is-max .ntt-chatbot-panel{
  position:fixed;
  inset:24px;
  width:auto !important;
  height:auto !important;
  max-width:none;
  max-height:none;
  border-radius:18px;
}
.ntt-chatbot-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  padding:14px 16px 10px;
  background:#f7f9fc;
  border-bottom:1px solid rgba(0,0,0,.06);
}
.ntt-chatbot-title{ font-size:16px; font-weight:700; line-height:1.3; }
.ntt-chatbot-meta{ display:flex; gap:6px; flex-wrap:wrap; margin-top:6px; }
.ntt-chatbot-badge{
  display:inline-flex;
  align-items:center;
  padding:2px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:600;
  background:#eef3ff;
  color:#1b4fa8;
}
.ntt-chatbot-actions{ display:flex; gap:6px; }
.ntt-chatbot-btn{
  width:30px;
  height:30px;
  border-radius:8px;
  border:1px solid rgba(0,0,0,.08);
  background:#fff;
  cursor:pointer;
}
.ntt-chatbot-subhead{
  padding:8px 16px;
  font-size:12px;
  color:#55606f;
  border-bottom:1px solid rgba(0,0,0,.06);
  background:#fbfcfe;
}
.ntt-chatbot-messages{
  flex:1;
  overflow:auto;
  padding:14px;
  background:#f4f7fb;
}
.ntt-chatbot-message{ margin-bottom:12px; display:flex; }
.ntt-chatbot-message.user{ justify-content:flex-end; }
.ntt-chatbot-bubble{
  max-width:86%;
  padding:10px 12px;
  border-radius:16px;
  background:#fff;
  color:#1b2430;
  box-shadow:0 4px 14px rgba(0,0,0,.08);
  white-space:normal;
  word-break:break-word;
  line-height:1.5;
}
.ntt-chatbot-message.user .ntt-chatbot-bubble{ background:#0d6efd; color:#fff; }
.ntt-chatbot-bubble pre{
  white-space:pre-wrap;
  word-break:break-word;
  background:rgba(0,0,0,.06);
  padding:10px;
  border-radius:10px;
  margin:8px 0;
  overflow:auto;
}
.ntt-chatbot-bubble code{
  background:rgba(0,0,0,.06);
  padding:1px 5px;
  border-radius:6px;
}
.ntt-chatbot-status{ min-height:24px; padding:0 16px 8px; font-size:12px; color:#687588; }
.ntt-chatbot-form{ border-top:1px solid rgba(0,0,0,.06); background:#fff; padding:12px; }
#nttChatbotInput{
  width:100%;
  min-height:72px;
  max-height:190px;
  resize:vertical;
  border:1px solid rgba(0,0,0,.12);
  border-radius:12px;
  padding:10px 12px;
  outline:none;
}
.ntt-chatbot-formbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:8px;
  gap:10px;
}
.ntt-chatbot-tip{ font-size:12px; color:#687588; }
/* v722: Dark mode đồng bộ toàn bộ khung Chat AI.
   Site theme thực tế của web dùng body[data-site-theme="dark"], không chỉ .darkmode/.theme-dark. */
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-chatbot-panel{
  background:#111a27;
  color:#e8eef8;
  border-color:#33445b;
  box-shadow:0 20px 55px rgba(0,0,0,.55);
  color-scheme:dark;
}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-chatbot-header{
  background:#182538;
  color:#f2f6fc;
  border-color:#33445b;
}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-chatbot-title{
  color:#f5f8fd;
}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-chatbot-badge{
  background:#213b5d;
  color:#cfe4ff;
  border:1px solid #35577d;
}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-chatbot-btn{
  background:#223047;
  color:#edf4fd;
  border-color:#40536e;
}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-chatbot-btn:hover,
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-chatbot-btn:focus{
  background:#30435f;
  border-color:#58759c;
  color:#fff;
}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-chatbot-subhead{
  background:#152132;
  color:#c8d4e5;
  border-color:#33445b;
}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-chatbot-messages{
  background:#0c1420;
  scrollbar-color:#455a75 #111a27;
}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-chatbot-bubble{
  background:#1d2a3d;
  color:#edf3fb;
  box-shadow:0 4px 16px rgba(0,0,0,.28);
}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-chatbot-message.user .ntt-chatbot-bubble{
  background:#1769d2;
  color:#fff;
}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-chatbot-bubble pre{
  background:#0d1724;
  color:#eef5ff;
  border:1px solid #30445f;
}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-chatbot-bubble code{
  background:#0d1724;
  color:#f2f7ff;
}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-chatbot-bubble a{
  color:#8bc4ff;
}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-chatbot-status{
  background:#111a27;
  color:#aebbd0;
}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-chatbot-form{
  background:#111a27;
  border-color:#33445b;
}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) #nttChatbotInput{
  background:#0b1420;
  color:#eef4fc;
  border-color:#40536e;
  caret-color:#fff;
}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) #nttChatbotInput::placeholder{
  color:#8494aa;
  opacity:1;
}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-chatbot-tip{
  color:#9eacc0;
}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-chatbot-resize-handle.is-corner:after{
  border-color:rgba(220,229,242,.65);
}

@media (max-width: 991px){
  .ntt-chatbot-root{ right:12px; top:58px; }
  .ntt-chatbot-panel{ width:min(400px, calc(100vw - 24px)); }
}
@media (max-width: 768px){
  .ntt-chatbot-root{ right:12px; left:12px; top:auto; bottom:72px; align-items:flex-end; }
  .ntt-chatbot-root.is-fab-positioned{ right:auto; bottom:auto; align-items:flex-start; width:max-content; max-width:calc(100vw - 12px); }
  .ntt-chatbot-fab{ margin-left:auto; }
  .ntt-chatbot-root.is-fab-positioned .ntt-chatbot-fab{ margin-left:0; }
  .ntt-chatbot-panel{
    top:auto;
    bottom:54px;
    width:auto !important;
    left:0;
    right:0;
    height:min(70vh, 620px) !important;
    min-width:0;
    min-height:320px;
    max-width:none;
    max-height:calc(100vh - 90px);
  }
  .ntt-chatbot-root.is-fab-positioned .ntt-chatbot-panel{ position:fixed; left:12px; right:12px; top:auto; bottom:72px; width:auto !important; }
  .ntt-chatbot-resize-handle{ display:none; }
  .ntt-chatbot-root.is-max .ntt-chatbot-panel{ inset:8px; border-radius:12px; }
}


.me-chatbot-topbtn > a{
  display:flex !important;
  align-items:center;
  gap:6px;
  font-weight:600;
}
.me-chatbot-topbtn > a .fa-comments{ font-size:15px; }
@media (max-width: 768px){
  .ntt-chatbot-root.ntt-chatbot-has-top-trigger .ntt-chatbot-fab{ display:flex; }
  .me-chatbot-topbtn{ display:none !important; }
}

.chatbot-test-result{margin-top:8px;padding:8px 10px;border-radius:6px;display:none;white-space:pre-wrap;word-break:break-word}
.chatbot-test-result.is-loading{display:block;background:#f5f5f5;color:#444}
.chatbot-test-result.is-ok{display:block;background:#eaf8ea;color:#145c2e;border:1px solid #b8e0b8}
.chatbot-test-result.is-err{display:block;background:#fff0f0;color:#a12622;border:1px solid #f0b5b5}

/* v846: code/pseudocode presentation shared by live Chat AI and audit log. */
.ntt-chat-codeblock{
  margin:10px 0;
  border:1px solid #cbd5e1;
  border-radius:10px;
  overflow:hidden;
  background:#f8fafc;
  box-shadow:0 1px 3px rgba(15,23,42,.08);
  color:#172033;
  max-width:100%;
}
.ntt-chat-codebar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:32px;
  padding:5px 8px 5px 11px;
  background:#e8eef6;
  border-bottom:1px solid #cbd5e1;
  font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
}
.ntt-chat-code-lang{
  color:#334155;
  font-size:11px;
  line-height:1.2;
  font-weight:700;
  letter-spacing:.035em;
  text-transform:uppercase;
}
.ntt-chat-code-copy{
  appearance:none;
  border:1px solid #b8c5d4;
  border-radius:6px;
  background:#fff;
  color:#334155;
  padding:3px 8px;
  font:600 11px/1.25 Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
  cursor:pointer;
}
.ntt-chat-code-copy:hover,.ntt-chat-code-copy:focus{background:#f1f5f9;border-color:#94a3b8;color:#0f172a;outline:none}
.ntt-chat-code-copy.is-copied{background:#dcfce7;border-color:#86efac;color:#166534}
.ntt-chat-code-pre,
.ntt-chatbot-bubble .ntt-chat-code-pre,
.chat-ai-rich-text .ntt-chat-code-pre,
.chat-ai-content-body .ntt-chat-code-pre{
  margin:0;
  padding:12px 14px;
  max-width:100%;
  overflow:auto;
  white-space:pre;
  overflow-wrap:normal;
  word-break:normal;
  tab-size:4;
  background:#f8fafc;
  border:0;
  border-radius:0;
  color:#172033;
  font-family:"Cascadia Code","Cascadia Mono",Consolas,"SFMono-Regular",Menlo,Monaco,"Liberation Mono",monospace;
  font-size:12.5px;
  line-height:1.58;
  text-align:left;
  direction:ltr;
}
.ntt-chat-code{
  display:block;
  min-width:max-content;
  color:inherit;
  background:transparent !important;
  padding:0 !important;
  border-radius:0 !important;
  font:inherit;
  white-space:pre;
}
.ntt-chat-inline-code{
  font-family:"Cascadia Code","Cascadia Mono",Consolas,"SFMono-Regular",Menlo,Monaco,"Liberation Mono",monospace;
  font-size:.92em;
  padding:.08em .35em !important;
  border:1px solid rgba(100,116,139,.25);
  border-radius:5px !important;
  background:#eef2f7 !important;
  color:#9a3412 !important;
}
.ntt-syn-comment{color:#5b7083;font-style:italic}
.ntt-syn-keyword{color:#7c3aed;font-weight:600}
.ntt-syn-builtin{color:#0369a1}
.ntt-syn-function{color:#075985}
.ntt-syn-string{color:#a16207}
.ntt-syn-number{color:#b4236a}
.ntt-syn-operator{color:#334155}
.ntt-syn-property{color:#0f766e}
.ntt-syn-tag{color:#be123c}
.ntt-syn-attr{color:#7c3aed}
.ntt-syn-punct{color:#475569}

.chat-ai-rich-text{
  max-width:100%;
  max-height:260px;
  overflow:auto;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
  margin-bottom:6px;
  line-height:1.5;
}
.chat-ai-rich-text .ntt-chat-codeblock{margin:6px 0}
.chat-ai-rich-text .ntt-chat-code-pre{max-height:220px}
.chat-ai-content-body [data-ntt-chat-rich="1"]{white-space:normal;overflow-wrap:anywhere;word-break:break-word;line-height:1.55}
.chat-ai-content-body .ntt-chat-code-pre{font-size:13px;max-height:none}

:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-chat-codeblock{
  border-color:#334155;
  background:#0d1117;
  color:#e6edf3;
  box-shadow:0 1px 4px rgba(0,0,0,.28);
}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-chat-codebar{
  background:#161b22;
  border-color:#30363d;
}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-chat-code-lang{color:#9da7b3}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-chat-code-copy{
  background:#21262d;border-color:#3d444d;color:#c9d1d9;
}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-chat-code-copy:hover,
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-chat-code-copy:focus{background:#30363d;border-color:#57606a;color:#fff}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-chat-code-copy.is-copied{background:#173b28;border-color:#2f6f49;color:#aff5b4}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-chat-code-pre,
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-chatbot-bubble .ntt-chat-code-pre,
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .chat-ai-rich-text .ntt-chat-code-pre,
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .chat-ai-content-body .ntt-chat-code-pre{
  background:#0d1117;
  color:#e6edf3;
}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-chat-inline-code{background:#161b22 !important;border-color:#30363d;color:#f2cc60 !important}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-syn-comment{color:#8b949e}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-syn-keyword{color:#ff7b72}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-syn-builtin{color:#79c0ff}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-syn-function{color:#d2a8ff}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-syn-string{color:#a5d6ff}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-syn-number{color:#79c0ff}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-syn-operator{color:#c9d1d9}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-syn-property{color:#7ee787}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-syn-tag{color:#7ee787}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-syn-attr{color:#d2a8ff}
:where(body.darkmode,body.dark-mode,body.theme-dark,body.dark,body[data-theme='dark'],body[data-site-theme='dark'],html.darkmode body,html.dark-mode body,html.theme-dark body,html.dark body,html[data-theme='dark'] body,html[data-site-theme='dark'] body) .ntt-syn-punct{color:#8b949e}

@media (max-width:768px){
  .ntt-chat-code-pre,.ntt-chatbot-bubble .ntt-chat-code-pre,.chat-ai-rich-text .ntt-chat-code-pre{font-size:12px;padding:10px 11px}
  .ntt-chat-codebar{min-height:30px}
}

/* ===== SOURCE: freeze-scope.v2.css ===== */
/* v1494: one universal owner for sticky table headers (freeze + regular list tables). */
.ntt-table-sticky-wrap{width:100%;overflow-x:auto;overflow-y:visible;position:relative;margin:1em auto;}
.ntt-table-sticky-wrap > table.ntt-table-sticky-table{min-width:100%;margin-bottom:0;position:relative;}
table.ntt-table-sticky-table thead > tr > th.ntt-table-sticky-head,
table.ntt-table-sticky-table thead > tr > td.ntt-table-sticky-head{
  position:relative !important;
  top:auto !important;
  z-index:80;
  background-color:var(--ntt-table-sticky-head-bg,var(--panel-bg,#edf4ff));
  color:var(--ntt-table-sticky-head-color,var(--text-color,#14355d));
  background-clip:padding-box;
  will-change:transform;
}
.ntt-freeze-wrap{width:100%;overflow-x:auto;overflow-y:visible;position:relative;margin:1em auto;}
.ntt-freeze-wrap > table.ntt-table-sticky-table{width:max-content;min-width:100%;border-collapse:separate !important;border-spacing:0 !important;margin-bottom:0;position:relative;}
table.ntt-table-sticky-table thead > tr > th,table.ntt-table-sticky-table thead > tr > td{position:relative;top:auto;vertical-align:middle;background:linear-gradient(180deg,#f8fbff,#edf4ff);background-color:#edf4ff;color:#14355d;background-clip:padding-box;}
table.ntt-table-sticky-table th,table.ntt-table-sticky-table td{white-space:normal;vertical-align:middle;}
table.ntt-table-sticky-table .ntt-freeze-head-cell{z-index:80;will-change:transform;}
table.ntt-table-sticky-table .ntt-freeze-col{position:sticky;left:0;background:#fff;background-clip:padding-box;}
table.ntt-table-sticky-table.table-striped > tbody > tr:nth-child(odd) > td.ntt-freeze-col{background:#f9f9f9;}
table.ntt-table-sticky-table thead > tr > th.ntt-freeze-col,table.ntt-table-sticky-table thead > tr > td.ntt-freeze-col{background:linear-gradient(180deg,#f8fbff,#edf4ff);background-color:#edf4ff;}
table.ntt-table-sticky-table .ntt-freeze-last{box-shadow:2px 0 0 rgba(0,0,0,.08);}


body[data-site-theme='dark'] table.ntt-table-sticky-table .ntt-table-sticky-head,
html[data-site-theme='dark'] table.ntt-table-sticky-table .ntt-table-sticky-head,
body.theme-dark table.ntt-table-sticky-table .ntt-table-sticky-head{
  background:#243447 !important;
  background-color:#243447 !important;
  color:#eef4ff !important;
  border-color:#3b4d63 !important;
}


body[data-site-theme='dark'] table.ntt-table-sticky-table thead > tr > th,
body[data-site-theme='dark'] table.ntt-table-sticky-table thead > tr > td,
html[data-site-theme='dark'] table.ntt-table-sticky-table thead > tr > th,
html[data-site-theme='dark'] table.ntt-table-sticky-table thead > tr > td,
body.theme-dark table.ntt-table-sticky-table thead > tr > th,
body.theme-dark table.ntt-table-sticky-table thead > tr > td{
  background:linear-gradient(180deg,#243447,#243447) !important;
  background-color:#243447 !important;
  color:#eef4ff !important;
  border-color:#3b4d63 !important;
}

body[data-site-theme='dark'] table.ntt-table-sticky-table .ntt-freeze-col,
html[data-site-theme='dark'] table.ntt-table-sticky-table .ntt-freeze-col,
body.theme-dark table.ntt-table-sticky-table .ntt-freeze-col{
  background:#243447 !important;
  background-color:#243447 !important;
  color:#eef4ff !important;
  border-color:#3b4d63 !important;
}

body[data-site-theme='dark'] table.ntt-table-sticky-table.table-striped > tbody > tr:nth-child(odd) > td.ntt-freeze-col,
html[data-site-theme='dark'] table.ntt-table-sticky-table.table-striped > tbody > tr:nth-child(odd) > td.ntt-freeze-col,
body.theme-dark table.ntt-table-sticky-table.table-striped > tbody > tr:nth-child(odd) > td.ntt-freeze-col{
  background:#243447 !important;
}

body[data-site-theme='dark'] table.ntt-table-sticky-table thead > tr > th.ntt-freeze-col,
body[data-site-theme='dark'] table.ntt-table-sticky-table thead > tr > td.ntt-freeze-col,
html[data-site-theme='dark'] table.ntt-table-sticky-table thead > tr > th.ntt-freeze-col,
html[data-site-theme='dark'] table.ntt-table-sticky-table thead > tr > td.ntt-freeze-col,
body.theme-dark table.ntt-table-sticky-table thead > tr > th.ntt-freeze-col,
body.theme-dark table.ntt-table-sticky-table thead > tr > td.ntt-freeze-col{
  background:linear-gradient(180deg,#243447,#243447) !important;
  background-color:#243447 !important;
}

/* ===== SOURCE: title-col-unify.v1.css ===== */
/* Title column unify v1
   Make frozen/title columns use the same tint as header rows across legacy freeze systems. */

:root{
  --ntt-title-col-bg: linear-gradient(180deg,#f8fbff,#edf4ff);
  --ntt-title-col-bg-solid: #edf4ff;
  --ntt-title-col-text: #14355d;
}

body.dark-mode,
body.dark,
html[data-theme="dark"],
body[data-theme="dark"],
body[data-site-theme="dark"]{
  --ntt-title-col-bg: linear-gradient(180deg,#223149,#1c2431);
  --ntt-title-col-bg-solid: #223149;
  --ntt-title-col-text: #e8eef9;
}

/* Legacy/global freeze systems */
table[data-ntt-freeze] .ntt-freeze-col,
.table.ntt-freeze-table .ntt-freeze-left,
.ntt-freeze-wrap > table[data-ntt-freeze] .ntt-sticky-left,
table.ntt-freeze-table .ntt-sticky-col,
table[data-freeze-scoped-table="1"] td[data-freeze-left-index],
table[data-freeze-scoped-table="1"] th[data-freeze-left-index],
table.mf-ready .mf-freeze,
#scrolling_table_1 .fixed,
#scrolling_table_2 .fixed,
#scrolling_table_3 .fixed,
#data-rank .fixed{
  background: var(--ntt-title-col-bg) !important;
  background-color: var(--ntt-title-col-bg-solid) !important;
  color: var(--ntt-title-col-text) !important;
  background-clip: padding-box !important;
}

/* Keep any nested mini tables inside frozen/title cells on the same tint */
table[data-ntt-freeze] .ntt-freeze-col table,
.table.ntt-freeze-table .ntt-freeze-left table,
.ntt-freeze-wrap > table[data-ntt-freeze] .ntt-sticky-left table,
table.ntt-freeze-table .ntt-sticky-col table,
table[data-freeze-scoped-table="1"] td[data-freeze-left-index] table,
table[data-freeze-scoped-table="1"] th[data-freeze-left-index] table,
table.mf-ready .mf-freeze table,
#scrolling_table_1 .fixed table,
#scrolling_table_2 .fixed table,
#scrolling_table_3 .fixed table,
#data-rank .fixed table,
table[data-ntt-freeze] .ntt-freeze-col th,
table[data-ntt-freeze] .ntt-freeze-col td,
.table.ntt-freeze-table .ntt-freeze-left th,
.table.ntt-freeze-table .ntt-freeze-left td,
table.mf-ready .mf-freeze th,
table.mf-ready .mf-freeze td{
  background: var(--ntt-title-col-bg) !important;
  background-color: var(--ntt-title-col-bg-solid) !important;
  color: var(--ntt-title-col-text) !important;
}

/* ===== SOURCE: list-history-dark.v1.css ===== */
/* Dark mode table headers for list/history pages (v282) */
body[data-site-theme='dark'][data-code^='ds'] table thead th,
body[data-site-theme='dark'][data-code^='ds'] table thead td,
body[data-site-theme='dark'][data-code='history'] table thead th,
body[data-site-theme='dark'][data-code='history'] table thead td,
body[data-site-theme='dark'][data-code='historyT'] table thead th,
body[data-site-theme='dark'][data-code='historyT'] table thead td,
body[data-site-theme='dark'][data-code^='ls'] table thead th,
body[data-site-theme='dark'][data-code^='ls'] table thead td,
body.dark-mode[data-code^='ds'] table thead th,
body.dark-mode[data-code^='ds'] table thead td,
body.dark-mode[data-code='history'] table thead th,
body.dark-mode[data-code='history'] table thead td,
body.dark-mode[data-code='historyT'] table thead th,
body.dark-mode[data-code='historyT'] table thead td,
body.dark-mode[data-code^='ls'] table thead th,
body.dark-mode[data-code^='ls'] table thead td,
body.dark[data-code^='ds'] table thead th,
body.dark[data-code^='ds'] table thead td,
body.dark[data-code='history'] table thead th,
body.dark[data-code='history'] table thead td,
body.dark[data-code='historyT'] table thead th,
body.dark[data-code='historyT'] table thead td,
body.dark[data-code^='ls'] table thead th,
body.dark[data-code^='ls'] table thead td,
.theme-dark table thead th,
.theme-dark table thead td{
  background:#243447 !important;
  background-image:none !important;
  color:#eef4ff !important;
  border-color:#3b4d63 !important;
}

body[data-site-theme='dark'][data-code^='ds'] table thead th *,
body[data-site-theme='dark'][data-code^='ds'] table thead td *,
body[data-site-theme='dark'][data-code='history'] table thead th *,
body[data-site-theme='dark'][data-code='history'] table thead td *,
body[data-site-theme='dark'][data-code='historyT'] table thead th *,
body[data-site-theme='dark'][data-code='historyT'] table thead td *,
body[data-site-theme='dark'][data-code^='ls'] table thead th *,
body[data-site-theme='dark'][data-code^='ls'] table thead td *,
body.dark-mode[data-code^='ds'] table thead th *,
body.dark-mode[data-code^='ds'] table thead td *,
body.dark-mode[data-code='history'] table thead th *,
body.dark-mode[data-code='history'] table thead td *,
body.dark-mode[data-code='historyT'] table thead th *,
body.dark-mode[data-code='historyT'] table thead td *,
body.dark-mode[data-code^='ls'] table thead th *,
body.dark-mode[data-code^='ls'] table thead td *,
body.dark[data-code^='ds'] table thead th *,
body.dark[data-code^='ds'] table thead td *,
body.dark[data-code='history'] table thead th *,
body.dark[data-code='history'] table thead td *,
body.dark[data-code='historyT'] table thead th *,
body.dark[data-code='historyT'] table thead td *,
body.dark[data-code^='ls'] table thead th *,
body.dark[data-code^='ls'] table thead td *{
  color:#eef4ff !important;
}

body[data-site-theme='dark'][data-code^='ds'] .ntt-freeze-col,
body[data-site-theme='dark'][data-code^='ds'] .mf-freeze,
body[data-site-theme='dark'][data-code^='ds'] [data-freeze-left-index],
body[data-site-theme='dark'][data-code^='ds'] .fixed.freeze,
body[data-site-theme='dark'][data-code^='ds'] .fixed.freeze_horizontal,
body[data-site-theme='dark'][data-code='history'] .ntt-freeze-col,
body[data-site-theme='dark'][data-code='history'] .mf-freeze,
body[data-site-theme='dark'][data-code='history'] [data-freeze-left-index],
body[data-site-theme='dark'][data-code='history'] .fixed.freeze,
body[data-site-theme='dark'][data-code='history'] .fixed.freeze_horizontal,
body[data-site-theme='dark'][data-code='historyT'] .ntt-freeze-col,
body[data-site-theme='dark'][data-code='historyT'] .mf-freeze,
body[data-site-theme='dark'][data-code='historyT'] [data-freeze-left-index],
body[data-site-theme='dark'][data-code='historyT'] .fixed.freeze,
body[data-site-theme='dark'][data-code='historyT'] .fixed.freeze_horizontal,
body[data-site-theme='dark'][data-code^='ls'] .ntt-freeze-col,
body[data-site-theme='dark'][data-code^='ls'] .mf-freeze,
body[data-site-theme='dark'][data-code^='ls'] [data-freeze-left-index],
body[data-site-theme='dark'][data-code^='ls'] .fixed.freeze,
body[data-site-theme='dark'][data-code^='ls'] .fixed.freeze_horizontal,
body.dark-mode[data-code^='ds'] .ntt-freeze-col,
body.dark-mode[data-code^='ds'] .mf-freeze,
body.dark-mode[data-code^='ds'] [data-freeze-left-index],
body.dark-mode[data-code^='ds'] .fixed.freeze,
body.dark-mode[data-code^='ds'] .fixed.freeze_horizontal,
body.dark-mode[data-code='history'] .ntt-freeze-col,
body.dark-mode[data-code='history'] .mf-freeze,
body.dark-mode[data-code='history'] [data-freeze-left-index],
body.dark-mode[data-code='history'] .fixed.freeze,
body.dark-mode[data-code='history'] .fixed.freeze_horizontal,
body.dark-mode[data-code='historyT'] .ntt-freeze-col,
body.dark-mode[data-code='historyT'] .mf-freeze,
body.dark-mode[data-code='historyT'] [data-freeze-left-index],
body.dark-mode[data-code='historyT'] .fixed.freeze,
body.dark-mode[data-code='historyT'] .fixed.freeze_horizontal,
body.dark-mode[data-code^='ls'] .ntt-freeze-col,
body.dark-mode[data-code^='ls'] .mf-freeze,
body.dark-mode[data-code^='ls'] [data-freeze-left-index],
body.dark-mode[data-code^='ls'] .fixed.freeze,
body.dark-mode[data-code^='ls'] .fixed.freeze_horizontal{
  background:#243447 !important;
  background-image:none !important;
  color:#eef4ff !important;
  border-color:#3b4d63 !important;
}

body[data-site-theme='dark'][data-code^='ds'] .ntt-freeze-col *,
body[data-site-theme='dark'][data-code^='ds'] .mf-freeze *,
body[data-site-theme='dark'][data-code^='ds'] [data-freeze-left-index] *,
body[data-site-theme='dark'][data-code='history'] .ntt-freeze-col *,
body[data-site-theme='dark'][data-code='history'] .mf-freeze *,
body[data-site-theme='dark'][data-code='history'] [data-freeze-left-index] *,
body[data-site-theme='dark'][data-code='historyT'] .ntt-freeze-col *,
body[data-site-theme='dark'][data-code='historyT'] .mf-freeze *,
body[data-site-theme='dark'][data-code='historyT'] [data-freeze-left-index] *,
body[data-site-theme='dark'][data-code^='ls'] .ntt-freeze-col *,
body[data-site-theme='dark'][data-code^='ls'] .mf-freeze *,
body[data-site-theme='dark'][data-code^='ls'] [data-freeze-left-index] *{
  color:#eef4ff !important;
}


/* v301: extend dark table header unification to tk* pages and ConfigMenu */
body[data-site-theme='dark'][data-code^='tk'] table thead th,
body[data-site-theme='dark'][data-code^='tk'] table thead td,
body[data-site-theme='dark'][data-code='configmenu'] table thead th,
body[data-site-theme='dark'][data-code='ipthi'] table thead th,
body[data-site-theme='dark'][data-code='configmenu'] table thead td,
body[data-site-theme='dark'][data-code='ipthi'] table thead td,
body.dark-mode[data-code^='tk'] table thead th,
body.dark-mode[data-code^='tk'] table thead td,
body.dark-mode[data-code='configmenu'] table thead th,
body.dark-mode[data-code='ipthi'] table thead th,
body.dark-mode[data-code='configmenu'] table thead td,
body.dark-mode[data-code='ipthi'] table thead td,
body.dark[data-code^='tk'] table thead th,
body.dark[data-code^='tk'] table thead td,
body.dark[data-code='configmenu'] table thead th,
body.dark[data-code='ipthi'] table thead th,
body.dark[data-code='configmenu'] table thead td,
body.dark[data-code='ipthi'] table thead td{
  background:#243447 !important;
  background-image:none !important;
  background-color:#243447 !important;
  color:#eef4ff !important;
  border-color:#3b4d63 !important;
}

body[data-site-theme='dark'][data-code^='tk'] table thead th *,
body[data-site-theme='dark'][data-code^='tk'] table thead td *,
body[data-site-theme='dark'][data-code='configmenu'] table thead th *,
body[data-site-theme='dark'][data-code='ipthi'] table thead th *,
body[data-site-theme='dark'][data-code='configmenu'] table thead td *,
body[data-site-theme='dark'][data-code='ipthi'] table thead td *,
body.dark-mode[data-code^='tk'] table thead th *,
body.dark-mode[data-code^='tk'] table thead td *,
body.dark-mode[data-code='configmenu'] table thead th *,
body.dark-mode[data-code='ipthi'] table thead th *,
body.dark-mode[data-code='configmenu'] table thead td *,
body.dark-mode[data-code='ipthi'] table thead td *,
body.dark[data-code^='tk'] table thead th *,
body.dark[data-code^='tk'] table thead td *,
body.dark[data-code='configmenu'] table thead th *,
body.dark[data-code='ipthi'] table thead th *,
body.dark[data-code='configmenu'] table thead td *,
body.dark[data-code='ipthi'] table thead td *{
  color:#eef4ff !important;
}

body[data-site-theme='dark'][data-code^='tk'] table thead a,
body[data-site-theme='dark'][data-code='configmenu'] table thead a,
body[data-site-theme='dark'][data-code='ipthi'] table thead a,
body.dark-mode[data-code^='tk'] table thead a,
body.dark-mode[data-code='configmenu'] table thead a,
body.dark-mode[data-code='ipthi'] table thead a,
body.dark[data-code^='tk'] table thead a,
body.dark[data-code='configmenu'] table thead a,
body.dark[data-code='ipthi'] table thead a{
  color:#ffffff !important;
}

body[data-site-theme='dark'][data-code^='tk'] table thead input,
body[data-site-theme='dark'][data-code^='tk'] table thead select,
body[data-site-theme='dark'][data-code^='tk'] table thead textarea,
body[data-site-theme='dark'][data-code^='tk'] table thead .form-control,
body[data-site-theme='dark'][data-code='configmenu'] table thead input,
body[data-site-theme='dark'][data-code='ipthi'] table thead input,
body[data-site-theme='dark'][data-code='configmenu'] table thead select,
body[data-site-theme='dark'][data-code='ipthi'] table thead select,
body[data-site-theme='dark'][data-code='configmenu'] table thead textarea,
body[data-site-theme='dark'][data-code='ipthi'] table thead textarea,
body[data-site-theme='dark'][data-code='configmenu'] table thead .form-control,
body[data-site-theme='dark'][data-code='ipthi'] table thead .form-control,
body.dark-mode[data-code^='tk'] table thead input,
body.dark-mode[data-code^='tk'] table thead select,
body.dark-mode[data-code^='tk'] table thead textarea,
body.dark-mode[data-code^='tk'] table thead .form-control,
body.dark-mode[data-code='configmenu'] table thead input,
body.dark-mode[data-code='ipthi'] table thead input,
body.dark-mode[data-code='configmenu'] table thead select,
body.dark-mode[data-code='ipthi'] table thead select,
body.dark-mode[data-code='configmenu'] table thead textarea,
body.dark-mode[data-code='ipthi'] table thead textarea,
body.dark-mode[data-code='configmenu'] table thead .form-control,
body.dark-mode[data-code='ipthi'] table thead .form-control,
body.dark[data-code^='tk'] table thead input,
body.dark[data-code^='tk'] table thead select,
body.dark[data-code^='tk'] table thead textarea,
body.dark[data-code^='tk'] table thead .form-control,
body.dark[data-code='configmenu'] table thead input,
body.dark[data-code='ipthi'] table thead input,
body.dark[data-code='configmenu'] table thead select,
body.dark[data-code='ipthi'] table thead select,
body.dark[data-code='configmenu'] table thead textarea,
body.dark[data-code='ipthi'] table thead textarea,
body.dark[data-code='configmenu'] table thead .form-control,
body.dark[data-code='ipthi'] table thead .form-control{
  background:#18222f !important;
  color:#eef4ff !important;
  border-color:#43566d !important;
}

body[data-site-theme='dark'][data-code^='tk'] .ntt-freeze-col,
body[data-site-theme='dark'][data-code^='tk'] .mf-freeze,
body[data-site-theme='dark'][data-code^='tk'] [data-freeze-left-index],
body[data-site-theme='dark'][data-code^='tk'] .fixed.freeze,
body[data-site-theme='dark'][data-code^='tk'] .fixed.freeze_horizontal,
body[data-site-theme='dark'][data-code^='tk'] table[data-ntt-freeze] .ntt-freeze-col,
body[data-site-theme='dark'][data-code^='tk'] table.ntt-freeze-table .ntt-sticky-col,
body[data-site-theme='dark'][data-code='configmenu'] .ntt-freeze-col,
body[data-site-theme='dark'][data-code='ipthi'] .ntt-freeze-col,
body[data-site-theme='dark'][data-code='configmenu'] .mf-freeze,
body[data-site-theme='dark'][data-code='ipthi'] .mf-freeze,
body[data-site-theme='dark'][data-code='configmenu'] [data-freeze-left-index],
body[data-site-theme='dark'][data-code='ipthi'] [data-freeze-left-index],
body[data-site-theme='dark'][data-code='configmenu'] .fixed.freeze,
body[data-site-theme='dark'][data-code='ipthi'] .fixed.freeze,
body[data-site-theme='dark'][data-code='configmenu'] .fixed.freeze_horizontal,
body[data-site-theme='dark'][data-code='ipthi'] .fixed.freeze_horizontal,
body[data-site-theme='dark'][data-code='configmenu'] table[data-ntt-freeze] .ntt-freeze-col,
body[data-site-theme='dark'][data-code='ipthi'] table[data-ntt-freeze] .ntt-freeze-col,
body[data-site-theme='dark'][data-code='configmenu'] table.ntt-freeze-table .ntt-sticky-col,
body[data-site-theme='dark'][data-code='ipthi'] table.ntt-freeze-table .ntt-sticky-col,
body.dark-mode[data-code^='tk'] .ntt-freeze-col,
body.dark-mode[data-code^='tk'] .mf-freeze,
body.dark-mode[data-code^='tk'] [data-freeze-left-index],
body.dark-mode[data-code^='tk'] .fixed.freeze,
body.dark-mode[data-code^='tk'] .fixed.freeze_horizontal,
body.dark-mode[data-code='configmenu'] .ntt-freeze-col,
body.dark-mode[data-code='ipthi'] .ntt-freeze-col,
body.dark-mode[data-code='configmenu'] .mf-freeze,
body.dark-mode[data-code='ipthi'] .mf-freeze,
body.dark-mode[data-code='configmenu'] [data-freeze-left-index],
body.dark-mode[data-code='ipthi'] [data-freeze-left-index],
body.dark-mode[data-code='configmenu'] .fixed.freeze,
body.dark-mode[data-code='ipthi'] .fixed.freeze,
body.dark-mode[data-code='configmenu'] .fixed.freeze_horizontal,
body.dark-mode[data-code='ipthi'] .fixed.freeze_horizontal,
body.dark[data-code^='tk'] .ntt-freeze-col,
body.dark[data-code^='tk'] .mf-freeze,
body.dark[data-code^='tk'] [data-freeze-left-index],
body.dark[data-code^='tk'] .fixed.freeze,
body.dark[data-code^='tk'] .fixed.freeze_horizontal,
body.dark[data-code='configmenu'] .ntt-freeze-col,
body.dark[data-code='ipthi'] .ntt-freeze-col,
body.dark[data-code='configmenu'] .mf-freeze,
body.dark[data-code='ipthi'] .mf-freeze,
body.dark[data-code='configmenu'] [data-freeze-left-index],
body.dark[data-code='ipthi'] [data-freeze-left-index],
body.dark[data-code='configmenu'] .fixed.freeze,
body.dark[data-code='ipthi'] .fixed.freeze,
body.dark[data-code='configmenu'] .fixed.freeze_horizontal,
body.dark[data-code='ipthi'] .fixed.freeze_horizontal{
  background:#243447 !important;
  background-image:none !important;
  background-color:#243447 !important;
  color:#eef4ff !important;
  border-color:#3b4d63 !important;
}


/* v303: rankweb dark mode alignment */
body[data-site-theme='dark'][data-code='rankweb'] .panel,
body.dark-mode[data-code='rankweb'] .panel,
body.dark[data-code='rankweb'] .panel,
html[data-site-theme='dark'] body[data-code='rankweb'] .panel{
  background:#111827 !important;
  border-color:#23324a !important;
  color:#e5eefb !important;
}

body[data-site-theme='dark'][data-code='rankweb'] .panel-heading,
body.dark-mode[data-code='rankweb'] .panel-heading,
body.dark[data-code='rankweb'] .panel-heading{
  background:linear-gradient(180deg,#172033,#101827) !important;
  border-color:#23324a !important;
  color:#e5eefb !important;
}

body[data-site-theme='dark'][data-code='rankweb'] .panel-title,
body[data-site-theme='dark'][data-code='rankweb'] .panel-body,
body[data-site-theme='dark'][data-code='rankweb'] .list-group,
body[data-site-theme='dark'][data-code='rankweb'] .table-responsive,
body.dark-mode[data-code='rankweb'] .panel-title,
body.dark-mode[data-code='rankweb'] .panel-body,
body.dark-mode[data-code='rankweb'] .list-group,
body.dark-mode[data-code='rankweb'] .table-responsive,
body.dark[data-code='rankweb'] .panel-title,
body.dark[data-code='rankweb'] .panel-body,
body.dark[data-code='rankweb'] .list-group,
body.dark[data-code='rankweb'] .table-responsive{
  background:#111827 !important;
  color:#e5eefb !important;
  border-color:#23324a !important;
}

body[data-site-theme='dark'][data-code='rankweb'] #data-dstv table,
body.dark-mode[data-code='rankweb'] #data-dstv table,
body.dark[data-code='rankweb'] #data-dstv table{
  background:#111827 !important;
  color:#e5eefb !important;
  border-color:#23324a !important;
}

body[data-site-theme='dark'][data-code='rankweb'] #data-dstv table thead td,
body[data-site-theme='dark'][data-code='rankweb'] #data-dstv table thead th,
body.dark-mode[data-code='rankweb'] #data-dstv table thead td,
body.dark-mode[data-code='rankweb'] #data-dstv table thead th,
body.dark[data-code='rankweb'] #data-dstv table thead td,
body.dark[data-code='rankweb'] #data-dstv table thead th{
  background:#243447 !important;
  background-image:none !important;
  color:#eef4ff !important;
  border-color:#3b4d63 !important;
}

body[data-site-theme='dark'][data-code='rankweb'] #data-dstv table thead td *,
body[data-site-theme='dark'][data-code='rankweb'] #data-dstv table thead th *,
body.dark-mode[data-code='rankweb'] #data-dstv table thead td *,
body.dark-mode[data-code='rankweb'] #data-dstv table thead th *,
body.dark[data-code='rankweb'] #data-dstv table thead td *,
body.dark[data-code='rankweb'] #data-dstv table thead th *{
  color:#eef4ff !important;
}

body[data-site-theme='dark'][data-code='rankweb'] #data-dstv table td,
body[data-site-theme='dark'][data-code='rankweb'] #data-dstv table th,
body.dark-mode[data-code='rankweb'] #data-dstv table td,
body.dark-mode[data-code='rankweb'] #data-dstv table th,
body.dark[data-code='rankweb'] #data-dstv table td,
body.dark[data-code='rankweb'] #data-dstv table th{
  background:#111827;
  color:#e5eefb !important;
  border-color:#23324a !important;
}

body[data-site-theme='dark'][data-code='rankweb'] #data-dstv table.table-striped > tbody > tr:nth-child(odd) > td,
body.dark-mode[data-code='rankweb'] #data-dstv table.table-striped > tbody > tr:nth-child(odd) > td,
body.dark[data-code='rankweb'] #data-dstv table.table-striped > tbody > tr:nth-child(odd) > td{
  background:#0f1726 !important;
}

body[data-site-theme='dark'][data-code='rankweb'] #data-dstv table.table-hover > tbody > tr:hover > td,
body.dark-mode[data-code='rankweb'] #data-dstv table.table-hover > tbody > tr:hover > td,
body.dark[data-code='rankweb'] #data-dstv table.table-hover > tbody > tr:hover > td{
  background:#182235 !important;
}

body[data-site-theme='dark'][data-code='rankweb'] #data-dstv table a,
body.dark-mode[data-code='rankweb'] #data-dstv table a,
body.dark[data-code='rankweb'] #data-dstv table a{
  color:#dbeafe !important;
}

body[data-site-theme='dark'][data-code='rankweb'] #myTK input,
body[data-site-theme='dark'][data-code='rankweb'] #myTK select,
body[data-site-theme='dark'][data-code='rankweb'] #myTK textarea,
body[data-site-theme='dark'][data-code='rankweb'] #myTK .form-control,
body.dark-mode[data-code='rankweb'] #myTK input,
body.dark-mode[data-code='rankweb'] #myTK select,
body.dark-mode[data-code='rankweb'] #myTK textarea,
body.dark-mode[data-code='rankweb'] #myTK .form-control,
body.dark[data-code='rankweb'] #myTK input,
body.dark[data-code='rankweb'] #myTK select,
body.dark[data-code='rankweb'] #myTK textarea,
body.dark[data-code='rankweb'] #myTK .form-control{
  background:#0f1726 !important;
  color:#e5eefb !important;
  border-color:#23324a !important;
}


/* v315: unify dark table headers for add* pages so addtvroom/addtvmn match ds/tk/ls */
body[data-site-theme='dark'][data-code^='add'] table thead th,
body[data-site-theme='dark'][data-code^='add'] table thead td,
body.dark-mode[data-code^='add'] table thead th,
body.dark-mode[data-code^='add'] table thead td,
body.dark[data-code^='add'] table thead th,
body.dark[data-code^='add'] table thead td{
  background:#243447 !important;
  background-image:none !important;
  background-color:#243447 !important;
  color:#eef4ff !important;
  border-color:#3b4d63 !important;
}

body[data-site-theme='dark'][data-code^='add'] table thead th *,
body[data-site-theme='dark'][data-code^='add'] table thead td *,
body.dark-mode[data-code^='add'] table thead th *,
body.dark-mode[data-code^='add'] table thead td *,
body.dark[data-code^='add'] table thead th *,
body.dark[data-code^='add'] table thead td *{
  color:#eef4ff !important;
}

body[data-site-theme='dark'][data-code^='add'] table thead a,
body.dark-mode[data-code^='add'] table thead a,
body.dark[data-code^='add'] table thead a{
  color:#ffffff !important;
}

body[data-site-theme='dark'][data-code^='add'] .ntt-freeze-col,
body[data-site-theme='dark'][data-code^='add'] .mf-freeze,
body[data-site-theme='dark'][data-code^='add'] [data-freeze-left-index],
body[data-site-theme='dark'][data-code^='add'] .fixed.freeze,
body[data-site-theme='dark'][data-code^='add'] .fixed.freeze_horizontal,
body.dark-mode[data-code^='add'] .ntt-freeze-col,
body.dark-mode[data-code^='add'] .mf-freeze,
body.dark-mode[data-code^='add'] [data-freeze-left-index],
body.dark-mode[data-code^='add'] .fixed.freeze,
body.dark-mode[data-code^='add'] .fixed.freeze_horizontal,
body.dark[data-code^='add'] .ntt-freeze-col,
body.dark[data-code^='add'] .mf-freeze,
body.dark[data-code^='add'] [data-freeze-left-index],
body.dark[data-code^='add'] .fixed.freeze,
body.dark[data-code^='add'] .fixed.freeze_horizontal{
  background:#243447 !important;
  background-image:none !important;
  background-color:#243447 !important;
  color:#eef4ff !important;
  border-color:#3b4d63 !important;
}

body[data-site-theme='dark'][data-code^='add'] .ntt-freeze-col *,
body[data-site-theme='dark'][data-code^='add'] .mf-freeze *,
body[data-site-theme='dark'][data-code^='add'] [data-freeze-left-index] *,
body.dark-mode[data-code^='add'] .ntt-freeze-col *,
body.dark-mode[data-code^='add'] .mf-freeze *,
body.dark-mode[data-code^='add'] [data-freeze-left-index] *,
body.dark[data-code^='add'] .ntt-freeze-col *,
body.dark[data-code^='add'] .mf-freeze *,
body.dark[data-code^='add'] [data-freeze-left-index] *{
  color:#eef4ff !important;
}


/* v316: addtvroom/addtvmn dark mode - unify panel heading and ajax table shells with ds/ls/tk/rank */
body[data-site-theme='dark'][data-code^='add'] .panel,
body[data-site-theme='dark'][data-code^='add'] .panel-primary,
body[data-site-theme='dark'][data-code^='add'] .panel-body,
body[data-site-theme='dark'][data-code^='add'] .list-group,
body[data-site-theme='dark'][data-code^='add'] .table-responsive,
body.dark-mode[data-code^='add'] .panel,
body.dark-mode[data-code^='add'] .panel-primary,
body.dark-mode[data-code^='add'] .panel-body,
body.dark-mode[data-code^='add'] .list-group,
body.dark-mode[data-code^='add'] .table-responsive,
body.dark[data-code^='add'] .panel,
body.dark[data-code^='add'] .panel-primary,
body.dark[data-code^='add'] .panel-body,
body.dark[data-code^='add'] .list-group,
body.dark[data-code^='add'] .table-responsive{
  background:#111827 !important;
  color:#e5eefb !important;
  border-color:#23324a !important;
}

body[data-site-theme='dark'][data-code^='add'] .panel-primary > .panel-heading,
body[data-site-theme='dark'][data-code^='add'] .panel-heading,
body.dark-mode[data-code^='add'] .panel-primary > .panel-heading,
body.dark-mode[data-code^='add'] .panel-heading,
body.dark[data-code^='add'] .panel-primary > .panel-heading,
body.dark[data-code^='add'] .panel-heading{
  background:#243447 !important;
  background-image:none !important;
  color:#eef4ff !important;
  border-color:#3b4d63 !important;
}

body[data-site-theme='dark'][data-code^='add'] .panel-heading *,
body.dark-mode[data-code^='add'] .panel-heading *,
body.dark[data-code^='add'] .panel-heading *{
  color:#eef4ff !important;
}

body[data-site-theme='dark'][data-code^='add'] .panel-heading font[color='red'],
body.dark-mode[data-code^='add'] .panel-heading font[color='red'],
body.dark[data-code^='add'] .panel-heading font[color='red']{
  color:#fca5a5 !important;
}

body[data-site-theme='dark'][data-code='addtvroom'] #data-dstv table,
body[data-site-theme='dark'][data-code='addtvmn'] #data-addtvmn table,
body.dark-mode[data-code='addtvroom'] #data-dstv table,
body.dark-mode[data-code='addtvmn'] #data-addtvmn table,
body.dark[data-code='addtvroom'] #data-dstv table,
body.dark[data-code='addtvmn'] #data-addtvmn table{
  background:#111827 !important;
  color:#e5eefb !important;
  border-color:#23324a !important;
}

body[data-site-theme='dark'][data-code='addtvroom'] #data-dstv table thead td,
body[data-site-theme='dark'][data-code='addtvroom'] #data-dstv table thead th,
body[data-site-theme='dark'][data-code='addtvmn'] #data-addtvmn table thead td,
body[data-site-theme='dark'][data-code='addtvmn'] #data-addtvmn table thead th,
body.dark-mode[data-code='addtvroom'] #data-dstv table thead td,
body.dark-mode[data-code='addtvroom'] #data-dstv table thead th,
body.dark-mode[data-code='addtvmn'] #data-addtvmn table thead td,
body.dark-mode[data-code='addtvmn'] #data-addtvmn table thead th,
body.dark[data-code='addtvroom'] #data-dstv table thead td,
body.dark[data-code='addtvroom'] #data-dstv table thead th,
body.dark[data-code='addtvmn'] #data-addtvmn table thead td,
body.dark[data-code='addtvmn'] #data-addtvmn table thead th{
  background:#243447 !important;
  background-image:none !important;
  background-color:#243447 !important;
  color:#eef4ff !important;
  border-color:#3b4d63 !important;
}

body[data-site-theme='dark'][data-code='addtvroom'] #data-dstv table thead td *,
body[data-site-theme='dark'][data-code='addtvroom'] #data-dstv table thead th *,
body[data-site-theme='dark'][data-code='addtvmn'] #data-addtvmn table thead td *,
body[data-site-theme='dark'][data-code='addtvmn'] #data-addtvmn table thead th *,
body.dark-mode[data-code='addtvroom'] #data-dstv table thead td *,
body.dark-mode[data-code='addtvroom'] #data-dstv table thead th *,
body.dark-mode[data-code='addtvmn'] #data-addtvmn table thead td *,
body.dark-mode[data-code='addtvmn'] #data-addtvmn table thead th *,
body.dark[data-code='addtvroom'] #data-dstv table thead td *,
body.dark[data-code='addtvroom'] #data-dstv table thead th *,
body.dark[data-code='addtvmn'] #data-addtvmn table thead td *,
body.dark[data-code='addtvmn'] #data-addtvmn table thead th *{
  color:#eef4ff !important;
}

body[data-site-theme='dark'][data-code='addtvroom'] #data-dstv table thead a,
body[data-site-theme='dark'][data-code='addtvmn'] #data-addtvmn table thead a,
body.dark-mode[data-code='addtvroom'] #data-dstv table thead a,
body.dark-mode[data-code='addtvmn'] #data-addtvmn table thead a,
body.dark[data-code='addtvroom'] #data-dstv table thead a,
body.dark[data-code='addtvmn'] #data-addtvmn table thead a{
  color:#ffffff !important;
}


/* v330: unify dark table/panel headers for sua* and set* pages to match ls/tk */
body[data-site-theme='dark'][data-code^='sua'] table thead th,
body[data-site-theme='dark'][data-code^='sua'] table thead td,
body[data-site-theme='dark'][data-code^='set'] table thead th,
body[data-site-theme='dark'][data-code^='set'] table thead td,
body.dark-mode[data-code^='sua'] table thead th,
body.dark-mode[data-code^='sua'] table thead td,
body.dark-mode[data-code^='set'] table thead th,
body.dark-mode[data-code^='set'] table thead td,
body.dark[data-code^='sua'] table thead th,
body.dark[data-code^='sua'] table thead td,
body.dark[data-code^='set'] table thead th,
body.dark[data-code^='set'] table thead td,
body[data-site-theme='dark'][data-code^='sua'] #freezer-example .table th,
body[data-site-theme='dark'][data-code^='set'] #freezer-example .table th,
body.dark-mode[data-code^='sua'] #freezer-example .table th,
body.dark-mode[data-code^='set'] #freezer-example .table th,
body.dark[data-code^='sua'] #freezer-example .table th,
body.dark[data-code^='set'] #freezer-example .table th{
  background:#243447 !important;
  background-image:none !important;
  background-color:#243447 !important;
  color:#eef4ff !important;
  border-color:#3b4d63 !important;
  outline-color:#3b4d63 !important;
}

body[data-site-theme='dark'][data-code^='sua'] table thead th *,
body[data-site-theme='dark'][data-code^='sua'] table thead td *,
body[data-site-theme='dark'][data-code^='set'] table thead th *,
body[data-site-theme='dark'][data-code^='set'] table thead td *,
body.dark-mode[data-code^='sua'] table thead th *,
body.dark-mode[data-code^='sua'] table thead td *,
body.dark-mode[data-code^='set'] table thead th *,
body.dark-mode[data-code^='set'] table thead td *,
body.dark[data-code^='sua'] table thead th *,
body.dark[data-code^='sua'] table thead td *,
body.dark[data-code^='set'] table thead th *,
body.dark[data-code^='set'] table thead td *,
body[data-site-theme='dark'][data-code^='sua'] #freezer-example .table th *,
body[data-site-theme='dark'][data-code^='set'] #freezer-example .table th *,
body.dark-mode[data-code^='sua'] #freezer-example .table th *,
body.dark-mode[data-code^='set'] #freezer-example .table th *,
body.dark[data-code^='sua'] #freezer-example .table th *,
body.dark[data-code^='set'] #freezer-example .table th *{
  color:#eef4ff !important;
}

body[data-site-theme='dark'][data-code^='sua'] table thead a,
body[data-site-theme='dark'][data-code^='set'] table thead a,
body.dark-mode[data-code^='sua'] table thead a,
body.dark-mode[data-code^='set'] table thead a,
body.dark[data-code^='sua'] table thead a,
body.dark[data-code^='set'] table thead a,
body[data-site-theme='dark'][data-code^='sua'] #freezer-example .table th a,
body[data-site-theme='dark'][data-code^='set'] #freezer-example .table th a,
body.dark-mode[data-code^='sua'] #freezer-example .table th a,
body.dark-mode[data-code^='set'] #freezer-example .table th a,
body.dark[data-code^='sua'] #freezer-example .table th a,
body.dark[data-code^='set'] #freezer-example .table th a{
  color:#ffffff !important;
}

body[data-site-theme='dark'][data-code^='sua'] .ntt-freeze-col,
body[data-site-theme='dark'][data-code^='sua'] .mf-freeze,
body[data-site-theme='dark'][data-code^='sua'] [data-freeze-left-index],
body[data-site-theme='dark'][data-code^='sua'] .fixed.freeze,
body[data-site-theme='dark'][data-code^='sua'] .fixed.freeze_horizontal,
body[data-site-theme='dark'][data-code^='set'] .ntt-freeze-col,
body[data-site-theme='dark'][data-code^='set'] .mf-freeze,
body[data-site-theme='dark'][data-code^='set'] [data-freeze-left-index],
body[data-site-theme='dark'][data-code^='set'] .fixed.freeze,
body[data-site-theme='dark'][data-code^='set'] .fixed.freeze_horizontal,
body.dark-mode[data-code^='sua'] .ntt-freeze-col,
body.dark-mode[data-code^='sua'] .mf-freeze,
body.dark-mode[data-code^='sua'] [data-freeze-left-index],
body.dark-mode[data-code^='sua'] .fixed.freeze,
body.dark-mode[data-code^='sua'] .fixed.freeze_horizontal,
body.dark-mode[data-code^='set'] .ntt-freeze-col,
body.dark-mode[data-code^='set'] .mf-freeze,
body.dark-mode[data-code^='set'] [data-freeze-left-index],
body.dark-mode[data-code^='set'] .fixed.freeze,
body.dark-mode[data-code^='set'] .fixed.freeze_horizontal,
body.dark[data-code^='sua'] .ntt-freeze-col,
body.dark[data-code^='sua'] .mf-freeze,
body.dark[data-code^='sua'] [data-freeze-left-index],
body.dark[data-code^='sua'] .fixed.freeze,
body.dark[data-code^='sua'] .fixed.freeze_horizontal,
body.dark[data-code^='set'] .ntt-freeze-col,
body.dark[data-code^='set'] .mf-freeze,
body.dark[data-code^='set'] [data-freeze-left-index],
body.dark[data-code^='set'] .fixed.freeze,
body.dark[data-code^='set'] .fixed.freeze_horizontal{
  background:#243447 !important;
  background-image:none !important;
  background-color:#243447 !important;
  color:#eef4ff !important;
  border-color:#3b4d63 !important;
}

body[data-site-theme='dark'][data-code^='sua'] .ntt-freeze-col *,
body[data-site-theme='dark'][data-code^='sua'] .mf-freeze *,
body[data-site-theme='dark'][data-code^='sua'] [data-freeze-left-index] *,
body[data-site-theme='dark'][data-code^='set'] .ntt-freeze-col *,
body[data-site-theme='dark'][data-code^='set'] .mf-freeze *,
body[data-site-theme='dark'][data-code^='set'] [data-freeze-left-index] *,
body.dark-mode[data-code^='sua'] .ntt-freeze-col *,
body.dark-mode[data-code^='sua'] .mf-freeze *,
body.dark-mode[data-code^='sua'] [data-freeze-left-index] *,
body.dark-mode[data-code^='set'] .ntt-freeze-col *,
body.dark-mode[data-code^='set'] .mf-freeze *,
body.dark-mode[data-code^='set'] [data-freeze-left-index] *,
body.dark[data-code^='sua'] .ntt-freeze-col *,
body.dark[data-code^='sua'] .mf-freeze *,
body.dark[data-code^='sua'] [data-freeze-left-index] *,
body.dark[data-code^='set'] .ntt-freeze-col *,
body.dark[data-code^='set'] .mf-freeze *,
body.dark[data-code^='set'] [data-freeze-left-index] *{
  color:#eef4ff !important;
}

body[data-site-theme='dark'][data-code^='sua'] .panel,
body[data-site-theme='dark'][data-code^='sua'] .panel-primary,
body[data-site-theme='dark'][data-code^='sua'] .panel-body,
body[data-site-theme='dark'][data-code^='sua'] .list-group,
body[data-site-theme='dark'][data-code^='sua'] .table-responsive,
body[data-site-theme='dark'][data-code^='set'] .panel,
body[data-site-theme='dark'][data-code^='set'] .panel-primary,
body[data-site-theme='dark'][data-code^='set'] .panel-body,
body[data-site-theme='dark'][data-code^='set'] .list-group,
body[data-site-theme='dark'][data-code^='set'] .table-responsive,
body.dark-mode[data-code^='sua'] .panel,
body.dark-mode[data-code^='sua'] .panel-primary,
body.dark-mode[data-code^='sua'] .panel-body,
body.dark-mode[data-code^='sua'] .list-group,
body.dark-mode[data-code^='sua'] .table-responsive,
body.dark-mode[data-code^='set'] .panel,
body.dark-mode[data-code^='set'] .panel-primary,
body.dark-mode[data-code^='set'] .panel-body,
body.dark-mode[data-code^='set'] .list-group,
body.dark-mode[data-code^='set'] .table-responsive,
body.dark[data-code^='sua'] .panel,
body.dark[data-code^='sua'] .panel-primary,
body.dark[data-code^='sua'] .panel-body,
body.dark[data-code^='sua'] .list-group,
body.dark[data-code^='sua'] .table-responsive,
body.dark[data-code^='set'] .panel,
body.dark[data-code^='set'] .panel-primary,
body.dark[data-code^='set'] .panel-body,
body.dark[data-code^='set'] .list-group,
body.dark[data-code^='set'] .table-responsive{
  background:#111827 !important;
  color:#e5eefb !important;
  border-color:#23324a !important;
}

body[data-site-theme='dark'][data-code^='sua'] .panel-primary > .panel-heading,
body[data-site-theme='dark'][data-code^='sua'] .panel-heading,
body[data-site-theme='dark'][data-code^='set'] .panel-primary > .panel-heading,
body[data-site-theme='dark'][data-code^='set'] .panel-heading,
body.dark-mode[data-code^='sua'] .panel-primary > .panel-heading,
body.dark-mode[data-code^='sua'] .panel-heading,
body.dark-mode[data-code^='set'] .panel-primary > .panel-heading,
body.dark-mode[data-code^='set'] .panel-heading,
body.dark[data-code^='sua'] .panel-primary > .panel-heading,
body.dark[data-code^='sua'] .panel-heading,
body.dark[data-code^='set'] .panel-primary > .panel-heading,
body.dark[data-code^='set'] .panel-heading{
  background:#243447 !important;
  background-image:none !important;
  color:#eef4ff !important;
  border-color:#3b4d63 !important;
}

body[data-site-theme='dark'][data-code^='sua'] .panel-heading *,
body[data-site-theme='dark'][data-code^='set'] .panel-heading *,
body.dark-mode[data-code^='sua'] .panel-heading *,
body.dark-mode[data-code^='set'] .panel-heading *,
body.dark[data-code^='sua'] .panel-heading *,
body.dark[data-code^='set'] .panel-heading *{
  color:#eef4ff !important;
}

body[data-site-theme='dark'][data-code^='sua'] .panel-heading font[color='red'],
body[data-site-theme='dark'][data-code^='set'] .panel-heading font[color='red'],
body.dark-mode[data-code^='sua'] .panel-heading font[color='red'],
body.dark-mode[data-code^='set'] .panel-heading font[color='red'],
body.dark[data-code^='sua'] .panel-heading font[color='red'],
body.dark[data-code^='set'] .panel-heading font[color='red']{
  color:#fca5a5 !important;
}

body[data-site-theme='dark'][data-code^='sua'] .panel-heading font[color='yellow'],
body[data-site-theme='dark'][data-code^='set'] .panel-heading font[color='yellow'],
body.dark-mode[data-code^='sua'] .panel-heading font[color='yellow'],
body.dark-mode[data-code^='set'] .panel-heading font[color='yellow'],
body.dark[data-code^='sua'] .panel-heading font[color='yellow'],
body.dark[data-code^='set'] .panel-heading font[color='yellow']{
  color:#fde68a !important;
}

/* v331: fix bright inner buttons/links in sua/set table headers and panel headings */
body[data-site-theme='dark'][data-code^='sua'] table thead .list-group-item,
body[data-site-theme='dark'][data-code^='sua'] table thead .list-group-item-primary,
body[data-site-theme='dark'][data-code^='sua'] table thead .btn,
body[data-site-theme='dark'][data-code^='sua'] table thead .btn-primary,
body[data-site-theme='dark'][data-code^='sua'] #freezer-example .table th .list-group-item,
body[data-site-theme='dark'][data-code^='sua'] #freezer-example .table th .list-group-item-primary,
body[data-site-theme='dark'][data-code^='sua'] #freezer-example .table th .btn,
body[data-site-theme='dark'][data-code^='sua'] #freezer-example .table th .btn-primary,
body[data-site-theme='dark'][data-code^='sua'] .panel-heading .list-group-item,
body[data-site-theme='dark'][data-code^='sua'] .panel-heading .list-group-item-primary,
body[data-site-theme='dark'][data-code^='sua'] .panel-heading .btn,
body[data-site-theme='dark'][data-code^='sua'] .panel-heading .btn-primary,
body[data-site-theme='dark'][data-code^='set'] table thead .list-group-item,
body[data-site-theme='dark'][data-code^='set'] table thead .list-group-item-primary,
body[data-site-theme='dark'][data-code^='set'] table thead .btn,
body[data-site-theme='dark'][data-code^='set'] table thead .btn-primary,
body[data-site-theme='dark'][data-code^='set'] #freezer-example .table th .list-group-item,
body[data-site-theme='dark'][data-code^='set'] #freezer-example .table th .list-group-item-primary,
body[data-site-theme='dark'][data-code^='set'] #freezer-example .table th .btn,
body[data-site-theme='dark'][data-code^='set'] #freezer-example .table th .btn-primary,
body[data-site-theme='dark'][data-code^='set'] .panel-heading .list-group-item,
body[data-site-theme='dark'][data-code^='set'] .panel-heading .list-group-item-primary,
body[data-site-theme='dark'][data-code^='set'] .panel-heading .btn,
body[data-site-theme='dark'][data-code^='set'] .panel-heading .btn-primary,
body.dark-mode[data-code^='sua'] table thead .list-group-item,
body.dark-mode[data-code^='sua'] table thead .list-group-item-primary,
body.dark-mode[data-code^='sua'] table thead .btn,
body.dark-mode[data-code^='sua'] table thead .btn-primary,
body.dark-mode[data-code^='sua'] #freezer-example .table th .list-group-item,
body.dark-mode[data-code^='sua'] #freezer-example .table th .list-group-item-primary,
body.dark-mode[data-code^='sua'] #freezer-example .table th .btn,
body.dark-mode[data-code^='sua'] #freezer-example .table th .btn-primary,
body.dark-mode[data-code^='sua'] .panel-heading .list-group-item,
body.dark-mode[data-code^='sua'] .panel-heading .list-group-item-primary,
body.dark-mode[data-code^='sua'] .panel-heading .btn,
body.dark-mode[data-code^='sua'] .panel-heading .btn-primary,
body.dark-mode[data-code^='set'] table thead .list-group-item,
body.dark-mode[data-code^='set'] table thead .list-group-item-primary,
body.dark-mode[data-code^='set'] table thead .btn,
body.dark-mode[data-code^='set'] table thead .btn-primary,
body.dark-mode[data-code^='set'] #freezer-example .table th .list-group-item,
body.dark-mode[data-code^='set'] #freezer-example .table th .list-group-item-primary,
body.dark-mode[data-code^='set'] #freezer-example .table th .btn,
body.dark-mode[data-code^='set'] #freezer-example .table th .btn-primary,
body.dark-mode[data-code^='set'] .panel-heading .list-group-item,
body.dark-mode[data-code^='set'] .panel-heading .list-group-item-primary,
body.dark-mode[data-code^='set'] .panel-heading .btn,
body.dark-mode[data-code^='set'] .panel-heading .btn-primary,
body.dark[data-code^='sua'] table thead .list-group-item,
body.dark[data-code^='sua'] table thead .list-group-item-primary,
body.dark[data-code^='sua'] table thead .btn,
body.dark[data-code^='sua'] table thead .btn-primary,
body.dark[data-code^='sua'] #freezer-example .table th .list-group-item,
body.dark[data-code^='sua'] #freezer-example .table th .list-group-item-primary,
body.dark[data-code^='sua'] #freezer-example .table th .btn,
body.dark[data-code^='sua'] #freezer-example .table th .btn-primary,
body.dark[data-code^='sua'] .panel-heading .list-group-item,
body.dark[data-code^='sua'] .panel-heading .list-group-item-primary,
body.dark[data-code^='sua'] .panel-heading .btn,
body.dark[data-code^='sua'] .panel-heading .btn-primary,
body.dark[data-code^='set'] table thead .list-group-item,
body.dark[data-code^='set'] table thead .list-group-item-primary,
body.dark[data-code^='set'] table thead .btn,
body.dark[data-code^='set'] table thead .btn-primary,
body.dark[data-code^='set'] #freezer-example .table th .list-group-item,
body.dark[data-code^='set'] #freezer-example .table th .list-group-item-primary,
body.dark[data-code^='set'] #freezer-example .table th .btn,
body.dark[data-code^='set'] #freezer-example .table th .btn-primary,
body.dark[data-code^='set'] .panel-heading .list-group-item,
body.dark[data-code^='set'] .panel-heading .list-group-item-primary,
body.dark[data-code^='set'] .panel-heading .btn,
body.dark[data-code^='set'] .panel-heading .btn-primary{
  background:#1f3147 !important;
  background-image:none !important;
  background-color:#1f3147 !important;
  color:#eef4ff !important;
  border-color:#3b4d63 !important;
}

body[data-site-theme='dark'][data-code^='sua'] table thead .list-group-item *,
body[data-site-theme='dark'][data-code^='sua'] table thead .list-group-item-primary *,
body[data-site-theme='dark'][data-code^='sua'] table thead .btn *,
body[data-site-theme='dark'][data-code^='sua'] table thead .btn-primary *,
body[data-site-theme='dark'][data-code^='sua'] #freezer-example .table th .list-group-item *,
body[data-site-theme='dark'][data-code^='sua'] #freezer-example .table th .list-group-item-primary *,
body[data-site-theme='dark'][data-code^='sua'] #freezer-example .table th .btn *,
body[data-site-theme='dark'][data-code^='sua'] #freezer-example .table th .btn-primary *,
body[data-site-theme='dark'][data-code^='sua'] .panel-heading .list-group-item *,
body[data-site-theme='dark'][data-code^='sua'] .panel-heading .list-group-item-primary *,
body[data-site-theme='dark'][data-code^='sua'] .panel-heading .btn *,
body[data-site-theme='dark'][data-code^='sua'] .panel-heading .btn-primary *,
body[data-site-theme='dark'][data-code^='set'] table thead .list-group-item *,
body[data-site-theme='dark'][data-code^='set'] table thead .list-group-item-primary *,
body[data-site-theme='dark'][data-code^='set'] table thead .btn *,
body[data-site-theme='dark'][data-code^='set'] table thead .btn-primary *,
body[data-site-theme='dark'][data-code^='set'] #freezer-example .table th .list-group-item *,
body[data-site-theme='dark'][data-code^='set'] #freezer-example .table th .list-group-item-primary *,
body[data-site-theme='dark'][data-code^='set'] #freezer-example .table th .btn *,
body[data-site-theme='dark'][data-code^='set'] #freezer-example .table th .btn-primary *,
body[data-site-theme='dark'][data-code^='set'] .panel-heading .list-group-item *,
body[data-site-theme='dark'][data-code^='set'] .panel-heading .list-group-item-primary *,
body[data-site-theme='dark'][data-code^='set'] .panel-heading .btn *,
body[data-site-theme='dark'][data-code^='set'] .panel-heading .btn-primary *,
body.dark-mode[data-code^='sua'] table thead .list-group-item *,
body.dark-mode[data-code^='sua'] table thead .list-group-item-primary *,
body.dark-mode[data-code^='sua'] table thead .btn *,
body.dark-mode[data-code^='sua'] table thead .btn-primary *,
body.dark-mode[data-code^='sua'] #freezer-example .table th .list-group-item *,
body.dark-mode[data-code^='sua'] #freezer-example .table th .list-group-item-primary *,
body.dark-mode[data-code^='sua'] #freezer-example .table th .btn *,
body.dark-mode[data-code^='sua'] #freezer-example .table th .btn-primary *,
body.dark-mode[data-code^='sua'] .panel-heading .list-group-item *,
body.dark-mode[data-code^='sua'] .panel-heading .list-group-item-primary *,
body.dark-mode[data-code^='sua'] .panel-heading .btn *,
body.dark-mode[data-code^='sua'] .panel-heading .btn-primary *,
body.dark-mode[data-code^='set'] table thead .list-group-item *,
body.dark-mode[data-code^='set'] table thead .list-group-item-primary *,
body.dark-mode[data-code^='set'] table thead .btn *,
body.dark-mode[data-code^='set'] table thead .btn-primary *,
body.dark-mode[data-code^='set'] #freezer-example .table th .list-group-item *,
body.dark-mode[data-code^='set'] #freezer-example .table th .list-group-item-primary *,
body.dark-mode[data-code^='set'] #freezer-example .table th .btn *,
body.dark-mode[data-code^='set'] #freezer-example .table th .btn-primary *,
body.dark-mode[data-code^='set'] .panel-heading .list-group-item *,
body.dark-mode[data-code^='set'] .panel-heading .list-group-item-primary *,
body.dark-mode[data-code^='set'] .panel-heading .btn *,
body.dark-mode[data-code^='set'] .panel-heading .btn-primary *,
body.dark[data-code^='sua'] table thead .list-group-item *,
body.dark[data-code^='sua'] table thead .list-group-item-primary *,
body.dark[data-code^='sua'] table thead .btn *,
body.dark[data-code^='sua'] table thead .btn-primary *,
body.dark[data-code^='sua'] #freezer-example .table th .list-group-item *,
body.dark[data-code^='sua'] #freezer-example .table th .list-group-item-primary *,
body.dark[data-code^='sua'] #freezer-example .table th .btn *,
body.dark[data-code^='sua'] #freezer-example .table th .btn-primary *,
body.dark[data-code^='sua'] .panel-heading .list-group-item *,
body.dark[data-code^='sua'] .panel-heading .list-group-item-primary *,
body.dark[data-code^='sua'] .panel-heading .btn *,
body.dark[data-code^='sua'] .panel-heading .btn-primary *,
body.dark[data-code^='set'] table thead .list-group-item *,
body.dark[data-code^='set'] table thead .list-group-item-primary *,
body.dark[data-code^='set'] table thead .btn *,
body.dark[data-code^='set'] table thead .btn-primary *,
body.dark[data-code^='set'] #freezer-example .table th .list-group-item *,
body.dark[data-code^='set'] #freezer-example .table th .list-group-item-primary *,
body.dark[data-code^='set'] #freezer-example .table th .btn *,
body.dark[data-code^='set'] #freezer-example .table th .btn-primary *,
body.dark[data-code^='set'] .panel-heading .list-group-item *,
body.dark[data-code^='set'] .panel-heading .list-group-item-primary *,
body.dark[data-code^='set'] .panel-heading .btn *,
body.dark[data-code^='set'] .panel-heading .btn-primary *{
  color:#eef4ff !important;
}

body[data-site-theme='dark'][data-code^='sua'] table thead [style*='background'],
body[data-site-theme='dark'][data-code^='sua'] table thead [bgcolor],
body[data-site-theme='dark'][data-code^='sua'] #freezer-example .table th [style*='background'],
body[data-site-theme='dark'][data-code^='sua'] #freezer-example .table th [bgcolor],
body[data-site-theme='dark'][data-code^='set'] table thead [style*='background'],
body[data-site-theme='dark'][data-code^='set'] table thead [bgcolor],
body[data-site-theme='dark'][data-code^='set'] #freezer-example .table th [style*='background'],
body[data-site-theme='dark'][data-code^='set'] #freezer-example .table th [bgcolor],
body.dark-mode[data-code^='sua'] table thead [style*='background'],
body.dark-mode[data-code^='sua'] table thead [bgcolor],
body.dark-mode[data-code^='sua'] #freezer-example .table th [style*='background'],
body.dark-mode[data-code^='sua'] #freezer-example .table th [bgcolor],
body.dark-mode[data-code^='set'] table thead [style*='background'],
body.dark-mode[data-code^='set'] table thead [bgcolor],
body.dark-mode[data-code^='set'] #freezer-example .table th [style*='background'],
body.dark-mode[data-code^='set'] #freezer-example .table th [bgcolor],
body.dark[data-code^='sua'] table thead [style*='background'],
body.dark[data-code^='sua'] table thead [bgcolor],
body.dark[data-code^='sua'] #freezer-example .table th [style*='background'],
body.dark[data-code^='sua'] #freezer-example .table th [bgcolor],
body.dark[data-code^='set'] table thead [style*='background'],
body.dark[data-code^='set'] table thead [bgcolor],
body.dark[data-code^='set'] #freezer-example .table th [style*='background'],
body.dark[data-code^='set'] #freezer-example .table th [bgcolor]{
  background:#243447 !important;
  background-image:none !important;
  background-color:#243447 !important;
  color:#eef4ff !important;
}


/* v332: clean re-apply dark headers for sua/set pages to mirror ds/ls after broken comments in v330/v331 */
body[data-site-theme='dark'][data-code^='sua'] table thead > tr > th,
body[data-site-theme='dark'][data-code^='sua'] table thead > tr > td,
body[data-site-theme='dark'][data-code^='set'] table thead > tr > th,
body[data-site-theme='dark'][data-code^='set'] table thead > tr > td,
body.dark-mode[data-code^='sua'] table thead > tr > th,
body.dark-mode[data-code^='sua'] table thead > tr > td,
body.dark-mode[data-code^='set'] table thead > tr > th,
body.dark-mode[data-code^='set'] table thead > tr > td,
body.dark[data-code^='sua'] table thead > tr > th,
body.dark[data-code^='sua'] table thead > tr > td,
body.dark[data-code^='set'] table thead > tr > th,
body.dark[data-code^='set'] table thead > tr > td,
body[data-site-theme='dark'][data-code='suarweb'] #freezer-example .table > thead > tr > th,
body[data-site-theme='dark'][data-code='setallroom'] #freezer-example .table > thead > tr > th,
body[data-site-theme='dark'][data-code='setroomcp'] #freezer-example .table > thead > tr > th,
body[data-site-theme='dark'][data-code='suaroom'] #freezer-example .table > thead > tr > th,
body.dark-mode[data-code='suarweb'] #freezer-example .table > thead > tr > th,
body.dark-mode[data-code='setallroom'] #freezer-example .table > thead > tr > th,
body.dark-mode[data-code='setroomcp'] #freezer-example .table > thead > tr > th,
body.dark-mode[data-code='suaroom'] #freezer-example .table > thead > tr > th,
body.dark[data-code='suarweb'] #freezer-example .table > thead > tr > th,
body.dark[data-code='setallroom'] #freezer-example .table > thead > tr > th,
body.dark[data-code='setroomcp'] #freezer-example .table > thead > tr > th,
body.dark[data-code='suaroom'] #freezer-example .table > thead > tr > th,
body[data-site-theme='dark'][data-code='suarweb'] #freezer-example .table th,
body[data-site-theme='dark'][data-code='setallroom'] #freezer-example .table th,
body[data-site-theme='dark'][data-code='setroomcp'] #freezer-example .table th,
body[data-site-theme='dark'][data-code='suaroom'] #freezer-example .table th,
body.dark-mode[data-code='suarweb'] #freezer-example .table th,
body.dark-mode[data-code='setallroom'] #freezer-example .table th,
body.dark-mode[data-code='setroomcp'] #freezer-example .table th,
body.dark-mode[data-code='suaroom'] #freezer-example .table th,
body.dark[data-code='suarweb'] #freezer-example .table th,
body.dark[data-code='setallroom'] #freezer-example .table th,
body.dark[data-code='setroomcp'] #freezer-example .table th,
body.dark[data-code='suaroom'] #freezer-example .table th{
  background:#243447 !important;
  background-color:#243447 !important;
  background-image:none !important;
  color:#eef4ff !important;
  border-color:#3b4d63 !important;
  box-shadow:none !important;
}

body[data-site-theme='dark'][data-code^='sua'] table thead > tr > th *,
body[data-site-theme='dark'][data-code^='sua'] table thead > tr > td *,
body[data-site-theme='dark'][data-code^='set'] table thead > tr > th *,
body[data-site-theme='dark'][data-code^='set'] table thead > tr > td *,
body.dark-mode[data-code^='sua'] table thead > tr > th *,
body.dark-mode[data-code^='sua'] table thead > tr > td *,
body.dark-mode[data-code^='set'] table thead > tr > th *,
body.dark-mode[data-code^='set'] table thead > tr > td *,
body.dark[data-code^='sua'] table thead > tr > th *,
body.dark[data-code^='sua'] table thead > tr > td *,
body.dark[data-code^='set'] table thead > tr > th *,
body.dark[data-code^='set'] table thead > tr > td *,
body[data-site-theme='dark'][data-code='suarweb'] #freezer-example .table th *,
body[data-site-theme='dark'][data-code='setallroom'] #freezer-example .table th *,
body[data-site-theme='dark'][data-code='setroomcp'] #freezer-example .table th *,
body[data-site-theme='dark'][data-code='suaroom'] #freezer-example .table th *,
body.dark-mode[data-code='suarweb'] #freezer-example .table th *,
body.dark-mode[data-code='setallroom'] #freezer-example .table th *,
body.dark-mode[data-code='setroomcp'] #freezer-example .table th *,
body.dark-mode[data-code='suaroom'] #freezer-example .table th *,
body.dark[data-code='suarweb'] #freezer-example .table th *,
body.dark[data-code='setallroom'] #freezer-example .table th *,
body.dark[data-code='setroomcp'] #freezer-example .table th *,
body.dark[data-code='suaroom'] #freezer-example .table th *{
  color:#eef4ff !important;
}

body[data-site-theme='dark'][data-code^='sua'] table thead a,
body[data-site-theme='dark'][data-code^='set'] table thead a,
body.dark-mode[data-code^='sua'] table thead a,
body.dark-mode[data-code^='set'] table thead a,
body.dark[data-code^='sua'] table thead a,
body.dark[data-code^='set'] table thead a,
body[data-site-theme='dark'][data-code='suarweb'] #freezer-example .table th a,
body[data-site-theme='dark'][data-code='setallroom'] #freezer-example .table th a,
body[data-site-theme='dark'][data-code='setroomcp'] #freezer-example .table th a,
body[data-site-theme='dark'][data-code='suaroom'] #freezer-example .table th a,
body.dark-mode[data-code='suarweb'] #freezer-example .table th a,
body.dark-mode[data-code='setallroom'] #freezer-example .table th a,
body.dark-mode[data-code='setroomcp'] #freezer-example .table th a,
body.dark-mode[data-code='suaroom'] #freezer-example .table th a,
body.dark[data-code='suarweb'] #freezer-example .table th a,
body.dark[data-code='setallroom'] #freezer-example .table th a,
body.dark[data-code='setroomcp'] #freezer-example .table th a,
body.dark[data-code='suaroom'] #freezer-example .table th a{
  color:#eef4ff !important;
}

body[data-site-theme='dark'][data-code^='sua'] table thead .list-group-item,
body[data-site-theme='dark'][data-code^='sua'] table thead .list-group-item-primary,
body[data-site-theme='dark'][data-code^='sua'] table thead .btn,
body[data-site-theme='dark'][data-code^='sua'] table thead .btn-primary,
body[data-site-theme='dark'][data-code^='set'] table thead .list-group-item,
body[data-site-theme='dark'][data-code^='set'] table thead .list-group-item-primary,
body[data-site-theme='dark'][data-code^='set'] table thead .btn,
body[data-site-theme='dark'][data-code^='set'] table thead .btn-primary,
body.dark-mode[data-code^='sua'] table thead .list-group-item,
body.dark-mode[data-code^='sua'] table thead .list-group-item-primary,
body.dark-mode[data-code^='sua'] table thead .btn,
body.dark-mode[data-code^='sua'] table thead .btn-primary,
body.dark-mode[data-code^='set'] table thead .list-group-item,
body.dark-mode[data-code^='set'] table thead .list-group-item-primary,
body.dark-mode[data-code^='set'] table thead .btn,
body.dark-mode[data-code^='set'] table thead .btn-primary,
body.dark[data-code^='sua'] table thead .list-group-item,
body.dark[data-code^='sua'] table thead .list-group-item-primary,
body.dark[data-code^='sua'] table thead .btn,
body.dark[data-code^='sua'] table thead .btn-primary,
body.dark[data-code^='set'] table thead .list-group-item,
body.dark[data-code^='set'] table thead .list-group-item-primary,
body.dark[data-code^='set'] table thead .btn,
body.dark[data-code^='set'] table thead .btn-primary,
body[data-site-theme='dark'][data-code='suarweb'] #freezer-example .table th .list-group-item,
body[data-site-theme='dark'][data-code='suarweb'] #freezer-example .table th .list-group-item-primary,
body[data-site-theme='dark'][data-code='setallroom'] #freezer-example .table th .list-group-item,
body[data-site-theme='dark'][data-code='setallroom'] #freezer-example .table th .list-group-item-primary,
body[data-site-theme='dark'][data-code='setroomcp'] #freezer-example .table th .list-group-item,
body[data-site-theme='dark'][data-code='setroomcp'] #freezer-example .table th .list-group-item-primary,
body[data-site-theme='dark'][data-code='suaroom'] #freezer-example .table th .list-group-item,
body[data-site-theme='dark'][data-code='suaroom'] #freezer-example .table th .list-group-item-primary,
body.dark-mode[data-code='suarweb'] #freezer-example .table th .list-group-item,
body.dark-mode[data-code='suarweb'] #freezer-example .table th .list-group-item-primary,
body.dark-mode[data-code='setallroom'] #freezer-example .table th .list-group-item,
body.dark-mode[data-code='setallroom'] #freezer-example .table th .list-group-item-primary,
body.dark-mode[data-code='setroomcp'] #freezer-example .table th .list-group-item,
body.dark-mode[data-code='setroomcp'] #freezer-example .table th .list-group-item-primary,
body.dark-mode[data-code='suaroom'] #freezer-example .table th .list-group-item,
body.dark-mode[data-code='suaroom'] #freezer-example .table th .list-group-item-primary,
body.dark[data-code='suarweb'] #freezer-example .table th .list-group-item,
body.dark[data-code='suarweb'] #freezer-example .table th .list-group-item-primary,
body.dark[data-code='setallroom'] #freezer-example .table th .list-group-item,
body.dark[data-code='setallroom'] #freezer-example .table th .list-group-item-primary,
body.dark[data-code='setroomcp'] #freezer-example .table th .list-group-item,
body.dark[data-code='setroomcp'] #freezer-example .table th .list-group-item-primary,
body.dark[data-code='suaroom'] #freezer-example .table th .list-group-item,
body.dark[data-code='suaroom'] #freezer-example .table th .list-group-item-primary{
  background:#243447 !important;
  background-color:#243447 !important;
  background-image:none !important;
  color:#eef4ff !important;
  border-color:#3b4d63 !important;
}

/* ===== SOURCE: core-ui-historical-overrides.v2107.css ===== */
/* v1370: dsroomdt creator-room management still emits Bootstrap .text-muted
   owner-picker guidance and pure-red legacy <font> emphasis for active NOT /
   locked-owner states. Repair contrast only on this route; dark keeps global
   muted ownership while red uses the established accessible dark token. */
body[data-site-theme="light"][data-code="dsroomdt"] #contentnav .text-muted{
  color:#5f6f82 !important;
}
body[data-site-theme="light"][data-code="dsroomdt"] #contentnav font[color="red"]{
  color:#b42318 !important;
}
body[data-site-theme="dark"][data-code="dsroomdt"] #contentnav font[color="red"],
body.dark-mode[data-code="dsroomdt"] #contentnav font[color="red"],
body.dark[data-code="dsroomdt"] #contentnav font[color="red"]{
  color:#fca5a5 !important;
}

/* v1690: evidence-led retention for v1381 submission-statistics semantic red.
   Scoped to the two touched statistics routes; do not alter global Bootstrap/theme ownership. */
body[data-site-theme="light"][data-code="tklsnbr"] #contentnav font[color="red"],
body[data-site-theme="light"][data-code="tklsnbw"] #contentnav font[color="red"]{
  color:#b42318 !important;
}
body[data-site-theme="dark"][data-code="tklsnbr"] #contentnav font[color="red"],
body[data-site-theme="dark"][data-code="tklsnbw"] #contentnav font[color="red"]{
  color:#fca5a5 !important;
}

/* v1692: evidence-led retention batch A for historical muted-text AA rules.
   Only routes/selectors whose current v1691 markup still consumes the historical
   selector are restored. Removed routes/non-consumers are intentionally omitted. */
body[data-code="dstailieu"] .tl-grid .table .text-muted,
body[data-code="dstailieuall"] .tl-grid .table .text-muted,
body[data-code="dstailieupl"] .tl-grid .table .text-muted{
  color:#5f6f82;
}

body[data-code="dsbaiall"] #data-search small.text-muted,
body[data-code="dsbai"] #data-search small.text-muted,
body[data-code="dsbaics"] #data-search small.text-muted,
body[data-code="dsbaiweb"] #data-search small.text-muted{
  color:#5f6f82;
}

body[data-code="qltailieu"] #qltailieuAsyncPanel .text-muted,
body[data-code="dstailieuroom"] #dstailieuroomPanel .text-muted{
  color:#5f6f82;
}

body[data-site-theme="light"][data-code="configmenu"] .cm-ve-code,
body[data-site-theme="light"][data-code="configmenu"] .cm-ve-empty{
  color:#5f6f82;
}

body[data-site-theme="light"][data-code="xoatv"] #contentnav h3 small{
  color:#5f6f82 !important;
}
body[data-site-theme="dark"][data-code="xoatv"] #contentnav h3 small,
body.dark-mode[data-code="xoatv"] #contentnav h3 small,
body.dark[data-code="xoatv"] #contentnav h3 small{
  color:var(--site-muted,#aab4c5) !important;
}

body[data-site-theme="light"][data-code="saocheptailieuroom"] .tl-copy-page .text-muted{
  color:#5f6f82 !important;
}

/* v1692: browser QA found ConfigMenu's current dark visual editor still keeps
   #789 on the light #eef2f6 code badge, below normal-text AA. Keep the badge
   surface unchanged; use the same AA text token. Empty-drop guidance sits on
   dark list surfaces, so hand it to the established site-muted dark token. */
body[data-site-theme="dark"][data-code="configmenu"] .cm-ve-code,
body.dark-mode[data-code="configmenu"] .cm-ve-code,
body.dark[data-code="configmenu"] .cm-ve-code{
  color:#5f6f82;
}
body[data-site-theme="dark"][data-code="configmenu"] .cm-ve-empty,
body.dark-mode[data-code="configmenu"] .cm-ve-empty,
body.dark[data-code="configmenu"] .cm-ve-empty{
  color:var(--site-muted,#aab4c5);
}

/* v1693: evidence-led semantic legacy-color contrast retention batch B.
   Restore only route-scoped historical selectors whose current v1692 PHP still
   emits the matching legacy <font color> consumer. No global theme ownership,
   color-picker markup, authority, data flow, scoring, lock or room semantics change. */
body[data-site-theme="light"][data-code="setallroom"] #contentnav font[color="red"],
body[data-site-theme="light"][data-code="setroomcp"] #contentnav font[color="red"]{
  color:#b42318 !important;
}
body[data-site-theme="dark"][data-code="setallroom"] #myTK font[color="red"],
body[data-site-theme="dark"][data-code="setroomcp"] #myTK font[color="red"],
body.dark-mode[data-code="setallroom"] #myTK font[color="red"],
body.dark-mode[data-code="setroomcp"] #myTK font[color="red"],
body.dark[data-code="setallroom"] #myTK font[color="red"],
body.dark[data-code="setroomcp"] #myTK font[color="red"]{
  color:#fca5a5 !important;
}

body[data-site-theme="light"][data-code="suarweb"] #contentnav font[color="red"]{
  color:#b42318 !important;
}
body[data-site-theme="dark"][data-code="suarweb"] #contentnav font[color="red"],
body.dark-mode[data-code="suarweb"] #contentnav font[color="red"],
body.dark[data-code="suarweb"] #contentnav font[color="red"]{
  color:#fca5a5 !important;
}

body[data-site-theme="light"][data-code="dsroomlc"] #contentnav font[color="red"]{
  color:#b42318 !important;
}
body[data-site-theme="dark"][data-code="dsroomlc"] #contentnav font[color="red"],
body.dark-mode[data-code="dsroomlc"] #contentnav font[color="red"],
body.dark[data-code="dsroomlc"] #contentnav font[color="red"]{
  color:#fca5a5 !important;
}
body[data-site-theme="dark"][data-code="dsroomlc"] #contentnav font[color="green"],
body.dark-mode[data-code="dsroomlc"] #contentnav font[color="green"],
body.dark[data-code="dsroomlc"] #contentnav font[color="green"]{
  color:#86efac !important;
}

body[data-site-theme="light"][data-code="dstvonline"] #contentnav font[color="red"],
body[data-site-theme="light"][data-code="dstvolall"] #contentnav font[color="red"]{
  color:#b42318 !important;
}
body[data-site-theme="dark"][data-code="dstvonline"] #contentnav font[color="red"],
body[data-site-theme="dark"][data-code="dstvolall"] #contentnav font[color="red"],
body.dark-mode[data-code="dstvonline"] #contentnav font[color="red"],
body.dark-mode[data-code="dstvolall"] #contentnav font[color="red"],
body.dark[data-code="dstvonline"] #contentnav font[color="red"],
body.dark[data-code="dstvolall"] #contentnav font[color="red"]{
  color:#fca5a5 !important;
}
body[data-site-theme="dark"][data-code="dstvonline"] #contentnav font[color="green"],
body[data-site-theme="dark"][data-code="dstvolall"] #contentnav font[color="green"],
body.dark-mode[data-code="dstvonline"] #contentnav font[color="green"],
body.dark-mode[data-code="dstvolall"] #contentnav font[color="green"],
body.dark[data-code="dstvonline"] #contentnav font[color="green"],
body.dark[data-code="dstvolall"] #contentnav font[color="green"]{
  color:#86efac !important;
}

body[data-site-theme="light"][data-code="dsroom"] #contentnav font[color="red"],
body[data-site-theme="light"][data-code="dsrthiad"] #contentnav font[color="red"]{
  color:#b42318 !important;
}
body[data-site-theme="dark"][data-code="dsroom"] #contentnav font[color="red"],
body[data-site-theme="dark"][data-code="dsrthiad"] #contentnav font[color="red"],
body.dark-mode[data-code="dsroom"] #contentnav font[color="red"],
body.dark-mode[data-code="dsrthiad"] #contentnav font[color="red"],
body.dark[data-code="dsroom"] #contentnav font[color="red"],
body.dark[data-code="dsrthiad"] #contentnav font[color="red"]{
  color:#fca5a5 !important;
}
body[data-site-theme="dark"][data-code="dsroom"] #contentnav font[color="green"],
body[data-site-theme="dark"][data-code="dsrthiad"] #contentnav font[color="green"],
body.dark-mode[data-code="dsroom"] #contentnav font[color="green"],
body.dark-mode[data-code="dsrthiad"] #contentnav font[color="green"],
body.dark[data-code="dsroom"] #contentnav font[color="green"],
body.dark[data-code="dsrthiad"] #contentnav font[color="green"]{
  color:#86efac !important;
}

body[data-site-theme="light"][data-code="dsroomadmin"] #myTK font[color="red"],
body[data-site-theme="light"][data-code="dsroomadmin"] #data-dsroomadmin td > center > a font[color="red"]{
  color:#b42318 !important;
}
body[data-site-theme="dark"][data-code="dsroomadmin"] #myTK font[color="red"],
body[data-site-theme="dark"][data-code="dsroomadmin"] #data-dsroomadmin td > center > a font[color="red"],
body.dark-mode[data-code="dsroomadmin"] #myTK font[color="red"],
body.dark-mode[data-code="dsroomadmin"] #data-dsroomadmin td > center > a font[color="red"],
body.dark[data-code="dsroomadmin"] #myTK font[color="red"],
body.dark[data-code="dsroomadmin"] #data-dsroomadmin td > center > a font[color="red"]{
  color:#fca5a5 !important;
}
body[data-site-theme="dark"][data-code="dsroomadmin"] #data-dsroomadmin td > center > a font[color="green"],
body.dark-mode[data-code="dsroomadmin"] #data-dsroomadmin td > center > a font[color="green"],
body.dark[data-code="dsroomadmin"] #data-dsroomadmin td > center > a font[color="green"]{
  color:#86efac !important;
}

body[data-site-theme="light"][data-code="dsroomql"] #myTK font[color="red"],
body[data-site-theme="light"][data-code="dsroomql"] #contentnav > center > b > font[color="red"],
body[data-site-theme="light"][data-code="dsroomql"] #data-dsroomql td > center > a font[color="red"]{
  color:#b42318 !important;
}
body[data-site-theme="dark"][data-code="dsroomql"] #myTK font[color="red"],
body[data-site-theme="dark"][data-code="dsroomql"] #contentnav > center > b > font[color="red"],
body[data-site-theme="dark"][data-code="dsroomql"] #data-dsroomql td > center > a font[color="red"],
body.dark-mode[data-code="dsroomql"] #myTK font[color="red"],
body.dark-mode[data-code="dsroomql"] #contentnav > center > b > font[color="red"],
body.dark-mode[data-code="dsroomql"] #data-dsroomql td > center > a font[color="red"],
body.dark[data-code="dsroomql"] #myTK font[color="red"],
body.dark[data-code="dsroomql"] #contentnav > center > b > font[color="red"],
body.dark[data-code="dsroomql"] #data-dsroomql td > center > a font[color="red"]{
  color:#fca5a5 !important;
}
body[data-site-theme="dark"][data-code="dsroomql"] #data-dsroomql td > center > a font[color="green"],
body.dark-mode[data-code="dsroomql"] #data-dsroomql td > center > a font[color="green"],
body.dark[data-code="dsroomql"] #data-dsroomql td > center > a font[color="green"]{
  color:#86efac !important;
}

body[data-site-theme="light"][data-code="dsnn"] #myTK font[color="red"],
body[data-site-theme="light"][data-code="dsnn"] #data-dsnn font[color="red"],
body[data-site-theme="light"][data-code="dsloaibai"] #myTK font[color="red"]{
  color:#b42318 !important;
}
body[data-site-theme="dark"][data-code="dsnn"] #myTK font[color="red"],
body[data-site-theme="dark"][data-code="dsnn"] #data-dsnn font[color="red"],
body[data-site-theme="dark"][data-code="dsloaibai"] #myTK font[color="red"],
body.dark-mode[data-code="dsnn"] #myTK font[color="red"],
body.dark-mode[data-code="dsnn"] #data-dsnn font[color="red"],
body.dark-mode[data-code="dsloaibai"] #myTK font[color="red"],
body.dark[data-code="dsnn"] #myTK font[color="red"],
body.dark[data-code="dsnn"] #data-dsnn font[color="red"],
body.dark[data-code="dsloaibai"] #myTK font[color="red"]{
  color:#fca5a5 !important;
}

body[data-site-theme="light"][data-code="lsnbhoi"] #myTK font[color="red"],
body[data-site-theme="light"][data-code="lsnbhoi"] #data-lsnbhoi font[color="red"]{
  color:#b42318 !important;
}
body[data-site-theme="dark"][data-code="lsnbhoi"] #myTK font[color="red"],
body[data-site-theme="dark"][data-code="lsnbhoi"] #data-lsnbhoi font[color="red"],
body.dark-mode[data-code="lsnbhoi"] #myTK font[color="red"],
body.dark-mode[data-code="lsnbhoi"] #data-lsnbhoi font[color="red"],
body.dark[data-code="lsnbhoi"] #myTK font[color="red"],
body.dark[data-code="lsnbhoi"] #data-lsnbhoi font[color="red"]{
  color:#fca5a5 !important;
}
body[data-site-theme="dark"][data-code="lsnbhoi"] #data-lsnbhoi font[color="green"],
body.dark-mode[data-code="lsnbhoi"] #data-lsnbhoi font[color="green"],
body.dark[data-code="lsnbhoi"] #data-lsnbhoi font[color="green"]{
  color:#86efac !important;
}
body[data-site-theme="dark"][data-code="lsnbhoi"] #data-lsnbhoi font[color="blue"],
body.dark-mode[data-code="lsnbhoi"] #data-lsnbhoi font[color="blue"],
body.dark[data-code="lsnbhoi"] #data-lsnbhoi font[color="blue"]{
  color:#93c5fd !important;
}

/* v1694: setcsbr mixed semantic colors need current-background-aware retention.
   The current light primary heading is a pale surface, so historical white text
   no longer applies. Keep route scope and preserve the existing dark set* owners. */
body[data-site-theme="light"][data-code="setcsbr"] #contentnav font[color="red"]{
  color:#b42318 !important;
}
body[data-site-theme="light"][data-code="setcsbr"] .panel-primary > .panel-heading font[color="red"]{
  color:#b42318 !important;
}
body[data-site-theme="light"][data-code="setcsbr"] .panel-primary > .panel-heading font[color="yellow"]{
  color:#7c4a03 !important;
}
body[data-site-theme="light"][data-code="setcsbr"] .panel-primary > .panel-heading font[color="aqua"]{
  color:#0f6b6d !important;
}

/* v1862: Chat-AI export success action keeps AA contrast without changing global Bootstrap/theme tokens. */
body[data-code='dschatai'] .chat-ai-sticky-tools .btn-success,
body[data-site-theme='dark'][data-code='dschatai'] .chat-ai-sticky-tools .btn-success,
body.dark-mode[data-code='dschatai'] .chat-ai-sticky-tools .btn-success,
body.dark[data-code='dschatai'] .chat-ai-sticky-tools .btn-success{
  background:#15803d;
  border-color:#15803d;
  color:#fff;
}

/* v2018: dsbaidl semantic legacy-color contrast retention (route-scoped only). */
body[data-code="dsbaidl"] #contentnav font[color="red"]{
  color:#b42318!important;
}
body[data-code="dsbaidl"] #contentnav font[color="green"]{
  color:#166534!important;
}
body[data-site-theme="dark"][data-code="dsbaidl"] #contentnav font[color="red"],
body.dark-mode[data-code="dsbaidl"] #contentnav font[color="red"],
body.dark[data-code="dsbaidl"] #contentnav font[color="red"]{
  color:#fca5a5!important;
}
body[data-site-theme="dark"][data-code="dsbaidl"] #contentnav font[color="green"],
body.dark-mode[data-code="dsbaidl"] #contentnav font[color="green"],
body.dark[data-code="dsbaidl"] #contentnav font[color="green"]{
  color:#86efac!important;
}


/* v2020: dsbaidl has only seven compact columns; keep them visually balanced.
   The existing responsive/freeze wrapper owns horizontal overflow on narrow screens. */
body[data-code="dsbaidl"] #contentnav table.ntt-dsbaidl-equal{
  width:100%!important;
  min-width:840px;
  table-layout:fixed;
}
body[data-code="dsbaidl"] #contentnav table.ntt-dsbaidl-equal > thead > tr > td,
body[data-code="dsbaidl"] #contentnav table.ntt-dsbaidl-equal > thead > tr > th,
body[data-code="dsbaidl"] #contentnav table.ntt-dsbaidl-equal > tbody > tr > td{
  width:14.2857%!important;
  min-width:0!important;
  max-width:none!important;
  white-space:normal!important;
  overflow-wrap:anywhere;
  word-break:break-word;
}


/* CODE.NTT v2624 - sidebar follows visual viewport, including navbar hide/resize.
   backdrop-filter on navbar establishes a containing block for fixed descendants:
   the desktop side-nav then moves with hidden navbar and leaves a 56px gap at
   the bottom. Keep the nav translucent through its existing --nav-bg instead. */
#navbar1.navbar{
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
@media (min-width: 768px){
  #navbar1 .side-nav{
    top: 56px;
    bottom: 0;
    height: calc(100vh - 56px);
    height: calc(100dvh - 56px);
    min-height: 0;
  }
  body.me-navbar-hidden #navbar1 .side-nav{
    top: 0;
    bottom: 0;
    height: 100vh;
    height: 100dvh;
  }
  body.me-navbar-hidden .sidebar-resizer-fixed{
    top: 0;
    bottom: 0;
    height: 100vh;
    height: 100dvh;
  }
}
/* Mobile: only the EXPANDED menu is full-height; collapsed menu stays hidden.
   The panel is scrollable internally and respects the mobile safe-area bottom. */
@media (max-width: 767px){
  body.me-mobile-button-only #navbar1 .navbar-ex1-collapse.collapse.in{
    height: calc(100vh - 72px);
    height: calc(100dvh - 72px);
    max-height: calc(100dvh - 72px);
    min-height: 0;
    overflow-y: auto;
  }
}

/* v2943: the add-member entry has one pictogram. Some legacy/sidebar themes
   inject a second '+' marker into a/LI ::before; neutralize that marker only here. */
.side-nav a[href*="CODE=themtvweb"]::before,
.side-nav li:has(>a[href*="CODE=themtvweb"])::before,
#side-menu a[href*="CODE=themtvweb"]::before,
#side-menu li:has(>a[href*="CODE=themtvweb"])::before {content:none!important;display:none!important}
.side-nav a[href*="CODE=themtvweb"]>i:not(.ntt-menu-add-member-icon-v2943),
#side-menu a[href*="CODE=themtvweb"]>i:not(.ntt-menu-add-member-icon-v2943) {display:none!important}


/* H19: current numeric page — a single low-bandwidth CSS owner for vertical/horizontal pagers. */
/* Distinguish current PAGE NUMBER from question status, navigation tabs, or pagination summaries. */
:where(body,body[data-site-theme="dark"],body.dark-mode,body.darkmode,body.theme-dark) :is(
 .pagination > li.active > a, .pagination > li.active > span,
 .pagination > li > a[aria-current="page"], .pagination > li > span[aria-current="page"],
 .pagination > .active > button,
 .ntt-pages .active, .ntt-pages [aria-current="page"],
 .ntt-progress-pages .active, .ntt-progress-pages [aria-current="page"],
 .ntt-module-access-pager .active, .ntt-module-access-pager [aria-current="page"],
 .ntt-owned-pager .active, .ntt-owned-pager [aria-current="page"],
 .ntt-sql-page .pagination .active > *, .ntt-html-page .pagination .active > *,
 .ntt-sql-report-pager .active, .ntt-quiz-report-pager .active,
 .ntt-substats-pager .active, .ntt-msh-pager-v2059 .active,
 .ntt-trace-page.active, .ntt-trace-page[aria-current="page"],
 .ntt-html-browser-pager .active > *,
 .ntt-chat-log-pages .active > *,
 .quiz-share-current-pager [aria-current="page"], .quiz-share-current-pager .active,
 .ntt-csb-current-page, .hd-page-current,
 .py-preview .py-page-number.current,
 .ntt-tkb-pager [aria-current="page"], .ntt-tkb-pager .active,
 .ipthi-pagination .active, .ipthi-pagination [aria-current="page"],
 .fc-live-log-pager [aria-current="page"], .fc-live-log-pager .active,
 .ntt-device-pager [aria-current="page"], .ntt-device-pager .active,
 .ntt-livework-page[aria-current="page"], .ntt-livework-page.active
 ) {color:#c91f2d!important;font-weight:800!important;text-decoration-color:currentColor;}
:where(body[data-site-theme="dark"],body.dark-mode,body.darkmode,body.theme-dark,html[data-site-theme="dark"] body,html.dark-mode body,html.darkmode body,html.theme-dark body) :is(
 .pagination > li.active > a, .pagination > li.active > span,
 .pagination > li > a[aria-current="page"], .pagination > li > span[aria-current="page"],
 .pagination > .active > button, .ntt-pages .active, .ntt-pages [aria-current="page"],
 .ntt-progress-pages .active, .ntt-progress-pages [aria-current="page"],
 .ntt-module-access-pager .active, .ntt-module-access-pager [aria-current="page"],
 .ntt-owned-pager .active, .ntt-owned-pager [aria-current="page"],
 .ntt-sql-page .pagination .active > *, .ntt-html-page .pagination .active > *,
 .ntt-sql-report-pager .active, .ntt-quiz-report-pager .active,
 .ntt-substats-pager .active, .ntt-msh-pager-v2059 .active,
 .ntt-trace-page.active, .ntt-trace-page[aria-current="page"],
 .ntt-html-browser-pager .active > *, .ntt-chat-log-pages .active > *,
 .quiz-share-current-pager [aria-current="page"], .quiz-share-current-pager .active,
 .ntt-csb-current-page, .hd-page-current, .py-preview .py-page-number.current,
 .ntt-tkb-pager [aria-current="page"], .ntt-tkb-pager .active,
 .ipthi-pagination .active, .ipthi-pagination [aria-current="page"],
 .fc-live-log-pager [aria-current="page"], .fc-live-log-pager .active,
 .ntt-device-pager [aria-current="page"], .ntt-device-pager .active,
 .ntt-livework-page[aria-current="page"], .ntt-livework-page.active
 ) {color:#ff7474!important;}

/* Scoped fallback for modules with button-style/non-Bootstrap numeric page controls.
 * Only within explicit pagination containers; excludes side nav, answer radio buttons. */
:where(body) :is(.quiz-pager,.ntt-sql-add-pager,.ntt-html-browser-pager,.report-pager,.tb-pages,.ai-set-pagination-row,.py-page-links,.ntt-quiz-report-pager,.ntt-sql-report-pager,.ntt-rpmp-pagers,.ntt-device-pager,.fc-live-log-pager,.ntt-substats-pager,.ntt-module-access-pager,.ntt-owned-pager,.ntt-msh-pager-v2059,.ntt-chat-log-pages,.page-grid) :is(.active,.current,[aria-current="page"]),
:where(body) :is(.ntt-substats-page,.ntt-sql-page,.ntt-html-page,.ntt-progress-page,.ntt-import-page,.ntt-trace-page,.ntt-quiz-report-page).active {color:#c91f2d!important;font-weight:800!important;}
:where(body[data-site-theme="dark"],body.dark-mode,body.darkmode,body.theme-dark,html[data-site-theme="dark"] body,html.dark-mode body) :is(.quiz-pager,.ntt-sql-add-pager,.ntt-html-browser-pager,.report-pager,.tb-pages,.ai-set-pagination-row,.py-page-links,.ntt-quiz-report-pager,.ntt-sql-report-pager,.ntt-rpmp-pagers,.ntt-device-pager,.fc-live-log-pager,.ntt-substats-pager,.ntt-module-access-pager,.ntt-owned-pager,.ntt-msh-pager-v2059,.ntt-chat-log-pages,.page-grid) :is(.active,.current,[aria-current="page"]),
:where(body[data-site-theme="dark"],body.dark-mode,body.darkmode,body.theme-dark,html[data-site-theme="dark"] body,html.dark-mode body) :is(.ntt-substats-page,.ntt-sql-page,.ntt-html-page,.ntt-progress-page,.ntt-import-page,.ntt-trace-page,.ntt-quiz-report-page).active {color:#ff7474!important;}

/* H20: semantic active-number output in legacy vertical/horizontal PHP pagers.
   CSS alone cannot style a naked text node; H20 emits .ntt-active-page-v2626
   only for the numeric page being viewed, never neighboring links or totals. */
.ntt-active-page-v2626[aria-current="page"]{
 color:#c91f2d!important;font-weight:900!important;
 text-decoration:none!important;
 font-variant-numeric:tabular-nums;
}
body[data-site-theme="dark"] .ntt-active-page-v2626[aria-current="page"],
body.dark-mode .ntt-active-page-v2626[aria-current="page"],
html[data-site-theme="dark"] .ntt-active-page-v2626[aria-current="page"]{
 color:#ff7474!important;
}
/* H20: pre-existing theme overrides still turned Bootstrap active page grey in dark mode. */
body[data-site-theme="dark"] .pagination > li.active > a,
body[data-site-theme="dark"] .pagination > li.active > span,
body[data-site-theme="dark"] .pagination > li > [aria-current="page"],
body.dark-mode .pagination > li.active > a,
body.dark-mode .pagination > li.active > span,
body.darkmode .pagination > li.active > a,
html[data-site-theme="dark"] body .pagination > li.active > a,
html[data-site-theme="dark"] body .pagination > li.active > span{
 color:#ff7474!important;font-weight:900!important;
}
