/* =====================================================================
 * admin_ui.css — giao dien sidebar + brand (nap SAU stylesheet.css)
 * Cau truc menu giu nguyen (#menu > li > a.parent + ul) vi admin.js
 * dieu khien thu gon (#column-left) / mo rong (#column-left.active).
 * ===================================================================== */

#column-left {
  background: #0f172a;
  box-shadow: 1px 0 0 rgba(255, 255, 255, .04), 2px 0 8px rgba(15, 23, 42, .18);
  padding-top: 62px;
  /* tren thanh thao tac dinh cua form (z-index 30) de menu bay ra khong bi che */
  z-index: 40;
}
#column-left + #content,
#column-left + #content + #footer {
  transition: margin .25s;
}

/* ---------- Menu cap 1 ---------- */
#menu {
  margin-bottom: 30px;
}
#menu li a {
  border-bottom: 0;
}
#menu > li > a {
  position: relative;
  color: #cbd5e1;
  font-size: 13.5px;
  padding: 10px 10px 10px 16px;
  border-bottom: 0;
  border-left: 3px solid transparent;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
#menu > li > a > i.fa {
  font-size: 15px;
  width: 18px;
  color: #94a3b8;
  transition: color .15s;
}
#column-left.active #menu li i {
  font-size: 15px;
}
#menu > li > a:hover,
#menu > li:hover > a {
  background: #1e293b;
  color: #fff;
}
#menu > li > a:hover > i.fa,
#menu > li:hover > a > i.fa {
  color: #e2e8f0;
}
#menu > li.active > a {
  background: #1e293b;
  color: #fff;
  border-left-color: #3b82f6;
}
#menu > li.active > a > i.fa {
  color: #60a5fa;
}
#menu > li > a > span {
  margin-left: 10px;
}

/* Mui ten nhom khi sidebar mo rong */
#column-left.active #menu > li > a.parent:after {
  font-family: FontAwesome;
  content: "\f107";
  position: absolute;
  right: 14px;
  top: 50%;
  margin-top: -9px;
  color: #64748b;
  transition: transform .2s;
}
#column-left.active #menu > li.open > a.parent:after {
  transform: rotate(180deg);
}

/* ---------- Tieu de nhom ---------- */
#menu > li.menu-heading {
  padding: 16px 16px 6px 19px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #64748b;
  white-space: nowrap;
}
#menu > li.menu-heading:first-child {
  padding-top: 6px;
}
/* Sidebar thu gon: thay chu bang 1 vach ke */
#column-left:not(.active) #menu > li.menu-heading {
  padding: 0;
  height: 1px;
  margin: 8px 12px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
}
#column-left:not(.active) #menu > li.menu-heading:first-child {
  display: none;
}
#column-left:not(.active) #menu > li.menu-heading span {
  display: none;
}

/* ---------- Menu cap 2 ---------- */
#menu li li a:before,
#menu li li a:hover:before,
#menu li li.active a:last-child:before {
  content: none;
}
#menu li ul a,
#menu li li a {
  color: #94a3b8;
  font-size: 13px;
  padding: 8px 14px 8px 44px;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
#menu li li a i.fa {
  font-size: 13px;
  width: 16px;
  margin-right: 6px;
  color: #64748b;
}
#menu li li a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .05);
}
#menu li li a:hover i.fa {
  color: #cbd5e1;
}
#menu li.active li a {
  color: #94a3b8;
}
#menu li li.active > a,
#menu li li.active > a:last-child {
  color: #fff;
  background: rgba(59, 130, 246, .14);
}
#menu li li.active > a i.fa {
  color: #60a5fa;
}

/* Sidebar mo rong: menu con xo xuong ngay duoi */
#column-left.active #menu > li > ul {
  background: #0b1222;
  padding: 4px 0;
}
#column-left.active #menu li.flyout-title {
  display: none;
}

/* Sidebar thu gon: menu con bay ra ben phai khi hover */
#column-left:not(.active) #menu > li > ul {
  left: 50px;
  width: 230px;
  background: #1e293b;
  border-radius: 0 8px 8px 0;
  box-shadow: 6px 6px 18px rgba(2, 6, 23, .35);
  padding: 0 0 6px;
  z-index: 50;
}
#column-left:not(.active) #menu li li a {
  padding-left: 16px;
}
#menu li.flyout-title {
  padding: 11px 16px 9px;
  color: #f1f5f9;
  font-weight: 700;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  margin-bottom: 4px;
  white-space: nowrap;
}

/* Muc khong co menu con (vd Game High-risk, Lien he): hien ten khi hover luc thu gon */
#column-left:not(.active) #menu > li > a:not(.parent) > span {
  display: none;
}
#column-left:not(.active) #menu > li:hover > a:not(.parent) > span {
  display: block;
  position: absolute;
  left: 50px;
  top: 0;
  height: 100%;
  margin: 0;
  padding: 0 16px;
  line-height: 41px;
  background: #1e293b;
  color: #f1f5f9;
  font-weight: 600;
  border-radius: 0 8px 8px 0;
  box-shadow: 6px 6px 18px rgba(2, 6, 23, .35);
  z-index: 50;
}

/* ---------- Badge ---------- */
#menu .menu-badge {
  position: absolute;
  right: 12px;
  top: 50%;
  margin-top: -9px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
/* Thu gon: chi con cham do tren icon */
#column-left:not(.active) #menu .menu-badge {
  right: auto;
  left: 28px;
  top: 6px;
  margin: 0;
  min-width: 0;
  width: 9px;
  height: 9px;
  padding: 0;
  font-size: 0;
  border: 2px solid #0f172a;
}

/* ---------- Thanh cuon sidebar mo rong ---------- */
#column-left.active::-webkit-scrollbar {
  width: 6px;
}
#column-left.active::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}

/* ---------- Header (cung mau sidebar) ---------- */
#header {
  height: 50px;
  min-height: 50px;
  background: #0f172a;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .18);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
#header .navbar-header {
  display: flex;
  align-items: center;
  height: 50px;
  float: left;
  margin: 0;
}
#header #button-menu {
  width: 50px;
  height: 50px;
  padding: 0;
  line-height: 50px;
  text-align: center;
  color: #94a3b8;
  border-right: 1px solid rgba(255, 255, 255, .06);
  transition: background .15s, color .15s;
}
#header #button-menu:hover {
  background: #1e293b;
  color: #fff;
}
#header .hd-brand {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 16px 0 14px;
  text-decoration: none;
  white-space: nowrap;
}
.nb-logo {
  display: inline-block;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  font-style: normal;
  line-height: 30px;
  text-align: center;
  letter-spacing: .5px;
  vertical-align: middle;
}
#header .hd-brand-text {
  margin-left: 10px;
  color: #f1f5f9;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .6px;
}
#header .hd-brand-text small {
  color: #64748b;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0;
  margin-left: 3px;
}
#header .hd-nav {
  display: flex;
  align-items: center;
  height: 50px;
  margin: 0 10px 0 0;
}
#header .hd-nav > li {
  float: none;
}
#header .hd-nav > li > a {
  display: flex;
  align-items: center;
  height: 36px;
  margin: 0 2px;
  padding: 0 12px;
  line-height: 36px;
  border: 0;
  border-radius: 6px;
  color: #cbd5e1;
  font-size: 13px;
  background: transparent;
  transition: background .15s, color .15s;
}
#header .hd-nav > li > a > .fa {
  color: #94a3b8;
  font-size: 14px;
  margin-right: 6px;
}
#header .hd-nav > li > a:hover,
#header .hd-nav > li > a:focus,
#header .hd-nav > li.open > a {
  background: #1e293b;
  color: #fff;
}
#header .hd-nav > li > a:hover > .fa {
  color: #e2e8f0;
}
#header .hd-user > a {
  height: 42px;
  padding: 0 10px 0 6px;
  margin-left: 8px;
}
#header .hd-user > a > .fa {
  margin: 0 0 0 8px;
}
#header .hd-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  line-height: 30px;
  text-align: center;
  flex: 0 0 30px;
  margin-right: 8px;
}
#header .hd-user-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  text-align: left;
}
#header .hd-user-text b {
  color: #f1f5f9;
  font-size: 13px;
  font-weight: 600;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#header .hd-user-text small {
  color: #64748b;
  font-size: 11px;
}
#header .hd-user .dropdown-menu {
  right: 0;
  left: auto;
  margin-top: 6px;
  min-width: 210px;
  padding: 6px 0;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(2, 6, 23, .4);
}
#header .hd-user .dropdown-menu > li > a {
  padding: 8px 16px;
  color: #cbd5e1;
  line-height: 1.4;
  border: 0;
}
#header .hd-user .dropdown-menu > li > a:hover {
  background: rgba(255, 255, 255, .06);
  color: #fff;
}
#header .hd-user .dropdown-menu > li > a.text-danger {
  color: #f87171;
}
#header .hd-user .dropdown-menu .divider {
  background: rgba(255, 255, 255, .08);
}
#header .hd-user .dropdown-header {
  font-size: 11px;
  color: #64748b;
  padding: 4px 16px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  margin-bottom: 4px;
}
@media (max-width: 767px) {
  #header .hd-brand-text small {
    display: none;
  }
  #header .hd-nav > li > a {
    padding: 0 10px;
  }
}

/* ---------- Footer ---------- */
/* Footer luon nam day trang ke ca khi noi dung ngan. footer.php render footer BEN TRONG #content
   (chi dong 1 </div>) nen: #content cao toi thieu = man hinh - thanh tren (50px), chua cho o duoi,
   footer ghim day #content. */
#content {
  position: relative;
  min-height: calc(100vh - 50px);
  padding-bottom: 96px;
}
#content > #footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}
#footer {
  height: auto;
  padding: 14px 20px 22px;
  text-align: left;
  color: #94a3b8;
  font-size: 12px;
}
#footer .ft-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid #e3e7ed;
}
#footer .ft-brand {
  color: #475569;
  font-weight: 700;
  letter-spacing: .3px;
}
#footer .ft-brand .nb-logo {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  font-size: 9px;
  line-height: 20px;
  margin: -2px 4px 0 0;
}
#footer .ft-sep {
  color: #cbd5e1;
}
#footer .ft-right {
  margin-left: auto;
}
#footer a {
  color: #64748b;
}
#footer a:hover {
  color: #2563eb;
}

/* =====================================================================
 * Token mau + giao dien sang / toi
 * html[data-theme="dark"] do nut mat trang tren header bat (luu localStorage az_theme,
 * dat ngay trong <head> o layout/header.php de khong nhay mau khi tai trang).
 * Code moi nen dung var(--az-*) de tu chay ca 2 che do.
 * ===================================================================== */
:root {
  --az-bg: #f3f5f9;
  --az-card: #ffffff;
  --az-soft: #f8fafc;
  --az-hover: #f1f5f9;
  --az-border: #e5e9f0;
  --az-border-soft: #eef1f5;
  --az-text: #1e293b;
  --az-text-2: #475569;
  --az-muted: #8a94a6;
  --az-input: #ffffff;
  --az-input-border: #d5dbe4;
  --az-primary: #3b82f6;
  --az-primary-soft: #eef4ff;
  --az-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .04);
}
html[data-theme="dark"] {
  /* do tuong phan: chu phu / chu mo / vien sang hon de doc ro tren nen toi */
  --az-bg: #0b1120;
  --az-card: #151f33;
  --az-soft: #1b263d;
  --az-hover: #223050;
  --az-border: #2f3d5b;
  --az-border-soft: #26324b;
  --az-text: #f1f5f9;
  --az-text-2: #dbe3ee;
  --az-muted: #a3b0c4;
  --az-input: #0f182b;
  --az-input-border: #3a4a6b;
  --az-primary: #60a5fa;
  --az-primary-soft: rgba(96, 165, 250, .14);
  --az-shadow: 0 1px 2px rgba(0, 0, 0, .3);
  color-scheme: dark;
}
body {
  background: var(--az-bg);
  color: var(--az-text);
}
#footer .ft-inner {
  border-top-color: var(--az-border);
}
#footer .ft-brand {
  color: var(--az-text-2);
}

/* ---------- Muc lien ket tren header (Dashboard, Thong ke, High-risk, Lien he, Xem website) ---------- */
#header .hd-nav > li.on > a {
  background: #1e293b;
  color: #fff;
}
#header .hd-nav > li.on > a > .fa {
  color: #60a5fa;
}
#header .hd-badge {
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
#header .hd-sep {
  width: 1px;
  height: 22px;
  margin: 0 6px;
  background: rgba(255, 255, 255, .1);
}
/* man hinh hep: chi con icon (title van hien khi re chuot) */
@media (max-width: 1279px) {
  #header .hd-text {
    display: none;
  }
  #header .hd-nav > li > a > .fa {
    margin-right: 0;
  }
}

/* ---------- Nut doi giao dien tren header ---------- */
#header .hd-theme > a {
  width: 36px;
  justify-content: center;
  padding: 0;
}
#header .hd-theme > a > .fa {
  margin: 0;
  font-size: 15px;
}
#header .hd-theme > a:hover > .fa-sun-o {
  color: #fbbf24;
}

/* ---------- Breadcrumb: 1 dai gon o dau moi trang ---------- */
.posts-header {
  margin: 16px 0 14px;
}
.posts-header .breadcrumb,
.az-page-head .breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  font-size: 12px;
}
/* breadcrumb kieu cu: chu tron nhu Dashboard (footer.php con them tieu de lon .az-page-head) */
.posts-header .breadcrumb {
  padding: 0;
}
.breadcrumb li a {
  font-size: 12px;
  color: var(--az-muted);
}
.breadcrumb li a:hover {
  color: var(--az-primary);
}
.breadcrumb > li:first-child > a:before {
  font-family: FontAwesome;
  content: "\f015";
  margin-right: 6px;
}
.breadcrumb li + li:before {
  content: "\f105";
  color: var(--az-muted);
  opacity: .6;
  padding: 0 8px;
}
.breadcrumb > .active {
  color: var(--az-text);
  font-weight: 600;
}

/* Dau trang co tieu de (Dashboard): tieu de + breadcrumb ben trai, thao tac nhanh ben phai */
.az-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 18px 0 16px;
}
.az-page-head h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  color: var(--az-text);
  letter-spacing: -.2px;
}
.az-page-head h1 small {
  margin-left: 10px;
  padding: 2px 10px;
  border-radius: 12px;
  background: var(--az-hover);
  color: var(--az-muted);
  font-size: 12px;
  font-weight: 600;
  vertical-align: 4px;
}
.az-page-head .az-page-actions:empty {
  display: none;
}
.az-page-head .az-page-actions {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Nut chinh o dau trang (vd "Thêm game"): nen gradient cung mau logo, icon trong o vuong */
.az-btn-add {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 18px 0 6px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff !important;
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, .3);
  transition: transform .15s, box-shadow .15s;
}
/* Nut phu canh "Thêm game" (vd Xóa cache trang chủ): vien, cung chieu cao */
.az-btn-purge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid rgba(245, 158, 11, .45);
  background: rgba(245, 158, 11, .08);
  color: #d97706 !important;
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none !important;
  transition: background .15s, border-color .15s, transform .15s;
}
.az-btn-purge:hover,
.az-btn-purge:focus {
  background: rgba(245, 158, 11, .16);
  border-color: #f59e0b;
  transform: translateY(-1px);
}
html[data-theme="dark"] .az-btn-purge {
  color: #fbbf24 !important;
}
.az-btn-add:hover,
.az-btn-add:focus {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, .4);
}
.az-btn-add .az-btn-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .2);
  font-size: 13px;
}

/* Hang card cao bang nhau (Dashboard, Thong ke tim kiem...): <div class="row az-eq-row"> */
.az-eq-row {
  display: flex;
  flex-wrap: wrap;
}
.az-eq-row > [class*="col-"] {
  display: flex;
  flex-direction: column;
}
.az-eq-row > [class*="col-"] > .panel {
  flex: 1 1 auto;
}

/* ---------- Card (panel) ---------- */
.panel {
  background: var(--az-card);
  border: 1px solid var(--az-border);
  border-radius: 10px;
  box-shadow: var(--az-shadow);
  margin-bottom: 20px;
}
.panel-default > .panel-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 10px 16px;
  background: transparent;
  color: var(--az-text);
  border-bottom: 1px solid var(--az-border-soft);
  border-radius: 10px 10px 0 0;
}
.panel-default > .panel-heading > .panel-title {
  flex: 1 1 auto;
}
.panel-default > .panel-heading > .pull-right {
  float: none !important;
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--az-text);
}
.panel-title > .fa {
  color: var(--az-primary);
  margin-right: 4px;
}
.panel-body {
  padding: 16px;
}
.panel-footer {
  background: var(--az-soft);
  border-top-color: var(--az-border-soft);
  border-radius: 0 0 10px 10px;
}

/* ---------- Bang ---------- */
.table > thead > tr > td,
.table > thead > tr > th {
  background: var(--az-soft);
  color: var(--az-muted);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  border-bottom: 1px solid var(--az-border) !important;
  padding: 10px 8px;
  white-space: nowrap;
}
.header-text-primary thead td.sort {
  color: var(--az-primary);
  cursor: pointer;
}
.table > tbody > tr > td {
  border-top-color: var(--az-border-soft);
  vertical-align: middle;
}
.table-bordered,
.table-bordered > thead > tr > td,
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > td {
  border-color: var(--az-border-soft);
}
.table-hover > tbody > tr:hover,
.table-hover > tbody > tr:hover > td {
  background: var(--az-hover);
}

/* ---------- Form element (input, select, nut) cung chieu cao / bo goc ---------- */
.form-control {
  height: 34px;
  border-color: var(--az-input-border);
  border-radius: 6px;
  box-shadow: none;
  font-size: 13px;
  color: var(--az-text);
  background-color: var(--az-input);
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .15);
}
textarea.form-control {
  height: auto;
}
.input-sm,
.form-control.input-sm {
  height: 32px;
  border-radius: 6px;
  font-size: 13px;
}
/* select 1 dong: mui ten rieng, de cung kieu voi select2 / bootstrap-select */
select.form-control:not([multiple]):not([size]) {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238a94a6' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 6px;
}
select.form-control::-ms-expand {
  display: none;
}
.input-group-addon {
  border-color: var(--az-input-border);
  border-radius: 6px;
}
.input-group .form-control:first-child,
.input-group-btn:first-child > .btn {
  border-radius: 6px 0 0 6px;
}
.input-group .form-control:last-child,
.input-group-btn:last-child > .btn {
  border-radius: 0 6px 6px 0;
}
.btn {
  border-radius: 6px;
}
.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
  border-radius: 0;
}
.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
  border-radius: 6px 0 0 6px;
}
.btn-group > .btn:last-child:not(:first-child),
.btn-group > .dropdown-toggle:not(:first-child) {
  border-radius: 0 6px 6px 0;
}
.btn-default {
  border-color: var(--az-input-border);
  color: var(--az-text-2);
}
.btn-sm, .btn-group-sm > .btn {
  height: 32px;
  line-height: 20px;
}
/* bootstrap-select: nut chon trong nhu o input */
.bootstrap-select > .dropdown-toggle.btn-default,
.bootstrap-select > .dropdown-toggle.btn-default:hover,
.bootstrap-select > .dropdown-toggle.btn-default:focus {
  height: 32px;
  background: var(--az-input);
  border-color: var(--az-input-border);
  border-radius: 6px;
  color: var(--az-text);
  font-size: 13px;
  box-shadow: none;
  outline: none !important;
}
.bootstrap-select.open > .dropdown-toggle.btn-default {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .15);
}
.bootstrap-select > .dropdown-toggle .caret {
  border-top-color: var(--az-muted);
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: #3b82f6;
}
.dropdown-menu {
  border-radius: 8px;
  border-color: var(--az-border);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
  padding: 6px 0;
}
.dropdown-menu > li > a {
  padding: 6px 16px;
}

/* ---------- Phan trang: o vuong bo goc tach roi, nam ben phai; "Showing …" ben trai ---------- */
.pagination {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  border-radius: 0;
}
.pagination > li > a,
.pagination > li > span {
  float: none;
  display: inline-block;
  min-width: 32px;
  height: 32px;
  margin: 0;
  padding: 0 10px;
  line-height: 30px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--az-text-2);
  background: var(--az-card);
  border: 1px solid var(--az-border);
  border-radius: 6px !important;
  transition: background .15s, border-color .15s, color .15s;
}
.pagination > li > a:hover,
.pagination > li > a:focus {
  color: var(--az-primary);
  background: var(--az-primary-soft);
  border-color: var(--az-primary);
}
.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > span:hover {
  color: #fff;
  background: #3b82f6;
  border-color: #3b82f6;
}
.gm-paging {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 16px;
  margin-top: 14px;
}
.gm-paging:empty {
  display: none;
}
.gm-paging .paging_info {
  order: -1;
  margin-right: auto;
  color: var(--az-muted);
  font-size: 12.5px;
}
.gm-paging-top {
  margin: 0 0 12px;
}

/* =====================================================================
 * Che do toi: ghi de Bootstrap 3 + plugin + style viet cung trong view
 * ===================================================================== */
/* :where() -> do uu tien thap, mau link rieng cua tung khoi (breadcrumb, nut...) van thang */
html[data-theme="dark"] :where(a:not(.btn)) {
  color: #60a5fa;
}
html[data-theme="dark"] :where(a:not(.btn)):hover {
  color: #93c5fd;
}
html[data-theme="dark"] :where(h1, h2, h3, h4, h5, h6, label, legend, b, strong) {
  color: var(--az-text);
}
html[data-theme="dark"] legend {
  border-bottom-color: var(--az-border);
}
html[data-theme="dark"] hr {
  border-top-color: var(--az-border);
}
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .help-block {
  color: var(--az-muted);
}
html[data-theme="dark"] code {
  background: rgba(244, 114, 182, .12);
  color: #f9a8d4;
}
html[data-theme="dark"] pre,
html[data-theme="dark"] .well {
  background: var(--az-soft);
  border-color: var(--az-border);
  color: var(--az-text);
}
html[data-theme="dark"] #content,
html[data-theme="dark"] .container-fluid {
  color: var(--az-text);
}
/* form */
html[data-theme="dark"] .form-control,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] input[type="url"] {
  background-color: var(--az-input);
  border-color: var(--az-input-border);
  color: var(--az-text);
}
html[data-theme="dark"] .form-control:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .2);
}
html[data-theme="dark"] .form-control[readonly],
html[data-theme="dark"] .form-control[disabled],
html[data-theme="dark"] fieldset[disabled] .form-control {
  background-color: var(--az-soft);
  color: var(--az-muted);
}
html[data-theme="dark"] .form-control::placeholder {
  color: #7d8ba3;
}
html[data-theme="dark"] .input-group-addon {
  background: var(--az-soft);
  border-color: var(--az-input-border);
  color: var(--az-muted);
}
/* nut */
html[data-theme="dark"] .btn-default {
  background: #1b2640;
  border-color: #2c3954;
  color: var(--az-text);
}
html[data-theme="dark"] .btn-default:hover,
html[data-theme="dark"] .btn-default:focus,
html[data-theme="dark"] .btn-default:active,
html[data-theme="dark"] .btn-default.active,
html[data-theme="dark"] .open > .dropdown-toggle.btn-default {
  background: #24324f;
  border-color: #3a4a6b;
  color: #fff;
}
html[data-theme="dark"] .btn-default[disabled],
html[data-theme="dark"] .btn-default.disabled {
  background: #161f33;
  border-color: #243049;
  color: #5b6a82;
}
html[data-theme="dark"] .btn-link {
  color: #60a5fa;
}
/* dropdown, modal, popover */
html[data-theme="dark"] .dropdown-menu {
  background: #18223a;
  border-color: var(--az-border);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45);
}
html[data-theme="dark"] .dropdown-menu > li > a {
  color: var(--az-text-2);
}
html[data-theme="dark"] .dropdown-menu > li > a:hover,
html[data-theme="dark"] .dropdown-menu > li > a:focus {
  background: var(--az-hover);
  color: #fff;
}
html[data-theme="dark"] .dropdown-menu > li > a.text-danger {
  color: #f87171;
}
html[data-theme="dark"] .dropdown-menu > li > a.text-success {
  color: #4ade80;
}
html[data-theme="dark"] .dropdown-menu .divider {
  background: var(--az-border);
}
html[data-theme="dark"] .dropdown-header {
  color: var(--az-muted);
}
html[data-theme="dark"] .modal-content {
  background: var(--az-card);
  border-color: var(--az-border);
  color: var(--az-text);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .6);
}
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer {
  border-color: var(--az-border);
}
html[data-theme="dark"] .close {
  color: #fff;
  text-shadow: none;
  opacity: .5;
}
html[data-theme="dark"] .modal-backdrop.in {
  opacity: .7;
}
html[data-theme="dark"] .popover,
html[data-theme="dark"] .tooltip-inner {
  background: #18223a;
  color: var(--az-text);
  border-color: var(--az-border);
}
/* bang, tab, list, phan trang */
html[data-theme="dark"] .table,
html[data-theme="dark"] .table > tbody > tr > td {
  color: var(--az-text);
}
html[data-theme="dark"] .table > tbody > tr.alternative > td,
html[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) {
  background: rgba(255, 255, 255, .015);
}
html[data-theme="dark"] .table > tbody > tr:hover > td {
  background: var(--az-hover);
}
html[data-theme="dark"] .table > tbody > tr > td,
html[data-theme="dark"] .table > tfoot > tr > td,
html[data-theme="dark"] .table-bordered {
  border-color: var(--az-border-soft) !important;
}
html[data-theme="dark"] .table > tbody > tr.success > td,
html[data-theme="dark"] .table > tbody > tr.info > td,
html[data-theme="dark"] .table > tbody > tr.warning > td,
html[data-theme="dark"] .table > tbody > tr.danger > td,
html[data-theme="dark"] .table > tbody > tr.active > td {
  background: rgba(96, 165, 250, .08);
}
html[data-theme="dark"] .nav-tabs {
  border-bottom-color: var(--az-border);
}
html[data-theme="dark"] .nav-tabs > li > a:hover {
  background: var(--az-hover);
  border-color: var(--az-border);
}
html[data-theme="dark"] .nav-tabs > li.active > a,
html[data-theme="dark"] .nav-tabs > li.active > a:hover,
html[data-theme="dark"] .nav-tabs > li.active > a:focus {
  background: var(--az-card);
  color: var(--az-text);
  border-color: var(--az-border) var(--az-border) transparent;
}
html[data-theme="dark"] .tab-content {
  border-color: var(--az-border);
}
html[data-theme="dark"] .list-group-item {
  background: var(--az-card);
  border-color: var(--az-border);
  color: var(--az-text);
}
html[data-theme="dark"] .pagination > li > a,
html[data-theme="dark"] .pagination > li > span {
  background: var(--az-card);
  border-color: var(--az-border);
  color: var(--az-text-2);
}
html[data-theme="dark"] .pagination > li > a:hover {
  background: var(--az-hover);
}
html[data-theme="dark"] .pagination > .active > a,
html[data-theme="dark"] .pagination > .active > span {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}
html[data-theme="dark"] .progress {
  background: #1f2a40 !important;
}
html[data-theme="dark"] .label-default {
  background: #334155;
}
html[data-theme="dark"] .img-thumbnail,
html[data-theme="dark"] .thumbnail {
  background: var(--az-soft);
  border-color: var(--az-border);
}
/* alert */
html[data-theme="dark"] .alert-success {
  background: rgba(34, 197, 94, .1);
  border-color: rgba(34, 197, 94, .3);
  color: #86efac;
}
html[data-theme="dark"] .alert-info {
  background: rgba(59, 130, 246, .1);
  border-color: rgba(59, 130, 246, .3);
  color: #93c5fd;
}
html[data-theme="dark"] .alert-warning {
  background: rgba(245, 158, 11, .1);
  border-color: rgba(245, 158, 11, .3);
  color: #fcd34d;
}
html[data-theme="dark"] .alert-danger {
  background: rgba(239, 68, 68, .1);
  border-color: rgba(239, 68, 68, .3);
  color: #fca5a5;
}
html[data-theme="dark"] .alert b,
html[data-theme="dark"] .alert strong {
  color: inherit;
}
/* bootstrap-select, select2, jquery-ui datepicker */
html[data-theme="dark"] .bootstrap-select .dropdown-menu li a span.text {
  color: var(--az-text-2);
}
html[data-theme="dark"] .bootstrap-select .dropdown-menu li.selected a {
  background: var(--az-hover);
}
html[data-theme="dark"] .select2-container--default .select2-selection--single,
html[data-theme="dark"] .select2-container--default .select2-selection--multiple {
  background: var(--az-input);
  border-color: var(--az-input-border);
}
html[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--az-text);
}
html[data-theme="dark"] .select2-dropdown {
  background: #18223a;
  border-color: var(--az-border);
  color: var(--az-text);
}
html[data-theme="dark"] .select2-container--default .select2-search--dropdown .select2-search__field {
  background: var(--az-input);
  border-color: var(--az-input-border);
  color: var(--az-text);
}
html[data-theme="dark"] .select2-container--default .select2-results__option[aria-selected="true"] {
  background: var(--az-hover);
}
html[data-theme="dark"] .select2-container--default .select2-results__group {
  color: var(--az-muted);
}
html[data-theme="dark"] .ui-widget-content {
  background: #18223a;
  border-color: var(--az-border);
  color: var(--az-text);
}
html[data-theme="dark"] .ui-widget-header {
  background: var(--az-soft);
  border-color: var(--az-border);
  color: var(--az-text);
}
/* style viet cung trong view cu (style="background:#fff" ...) */
html[data-theme="dark"] [style*="background:#fff"],
html[data-theme="dark"] [style*="background: #fff"],
html[data-theme="dark"] [style*="background-color:#fff"],
html[data-theme="dark"] [style*="background-color: #fff"],
html[data-theme="dark"] [style*="background:#fafafa"],
html[data-theme="dark"] [style*="background:#f5f5f5"],
html[data-theme="dark"] [style*="background:#f9f9f9"] {
  background: var(--az-soft) !important;
}
html[data-theme="dark"] [style*="border:1px solid #eee"],
html[data-theme="dark"] [style*="border: 1px solid #eee"],
html[data-theme="dark"] [style*="border:1px solid #ddd"] {
  border-color: var(--az-border) !important;
}
html[data-theme="dark"] [style*="color:#000"],
html[data-theme="dark"] [style*="color: #000"],
html[data-theme="dark"] [style*="color:#333"] {
  color: var(--az-text) !important;
}

/* =====================================================================
 * Man hinh Danh muc / Tag (mod/category/view/manage.php, mod/tag/view/manage.php): .tx-*
 * ===================================================================== */
.tx-page .tx-form-card.tx-editing {
  border-color: var(--az-primary);
  box-shadow: 0 0 0 3px var(--az-primary-soft);
}
.tx-page #form-header b {
  font-weight: 700;
}
.tx-id {
  display: inline-block;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--az-hover);
  color: var(--az-muted);
  font-size: 11px;
  font-weight: 600;
  vertical-align: 1px;
}
.tx-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--az-text-2);
}
.tx-req {
  color: #ef4444;
}
.tx-help {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--az-muted);
}
.tx-mb0 {
  margin-bottom: 0 !important;
}
.tx-addon {
  font-size: 12px;
  color: var(--az-muted);
  background: var(--az-soft);
}
.tx-name-input {
  font-weight: 600;
}
/* anh + ten / slug */
.tx-media {
  display: flex;
  gap: 16px;
  margin-bottom: 15px;
}
.tx-thumb {
  flex: 0 0 96px;
}
.tx-thumb .img-thumbnail {
  display: block;
  width: 96px;
  height: 96px;
  padding: 0;
  overflow: hidden;
  border: 2px dashed var(--az-input-border);
  border-radius: 10px;
  background: var(--az-soft);
  transition: border-color .15s;
}
.tx-thumb .img-thumbnail:hover {
  border-color: var(--az-primary);
}
.tx-thumb .img-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tx-media-fields {
  flex: 1 1 auto;
  min-width: 0;
}
/* nhom trong form */
.tx-section {
  margin: 0 -16px 0;
  padding: 14px 16px 4px;
  border-top: 1px solid var(--az-border-soft);
}
.tx-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--az-text) !important;
  text-decoration: none !important;
}
.tx-section-head > .fa:first-child {
  color: var(--az-primary);
  width: 16px;
}
.tx-section-sub {
  font-weight: 400;
  font-size: 11.5px;
  color: var(--az-muted);
}
.tx-section-head .tx-caret {
  margin-left: auto;
  color: var(--az-muted);
  transition: transform .2s;
}
.tx-section-head.collapsed .tx-caret {
  transform: rotate(-90deg);
}
.tx-collapsible .collapse,
.tx-collapsible .collapsing {
  padding-bottom: 12px;
}
/* chip bat / tat Hidden / Allow Ads / Allow Index */
.tx-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tx-flag {
  margin: 0;
  font-weight: 400;
  cursor: pointer;
}
.tx-flag input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.tx-flag span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border: 1px solid var(--az-input-border);
  border-radius: 16px;
  color: var(--az-text-2);
  background: var(--az-card);
  font-size: 13px;
  transition: all .15s;
}
.tx-flag span:hover {
  border-color: var(--az-primary);
}
.tx-flag input:checked + span {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}
.tx-flag.tx-flag-danger input:checked + span {
  background: #ef4444;
  border-color: #ef4444;
}
.tx-flag input:focus + span {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .2);
}
/* chan form: nut Luu luon trong tam nhin */
.tx-form-foot {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  gap: 8px;
  margin: 0 -16px -16px;
  padding: 12px 16px;
  border-top: 1px solid var(--az-border-soft);
  border-radius: 0 0 10px 10px;
  background: var(--az-card);
}
.tx-form-foot .btn-primary {
  min-width: 110px;
}
/* danh sach */
.tx-count {
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 10px;
  background: var(--az-hover);
  color: var(--az-muted);
  font-size: 11.5px;
  font-weight: 600;
}
.tx-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.tx-toolbar .tx-search {
  margin-left: auto;
  width: 280px;
}
.tx-toolbar .btn[disabled] {
  opacity: .45;
}
.tx-sel {
  color: #ef4444;
  font-weight: 700;
}
.tx-filters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--az-border-soft);
  border-radius: 8px;
  background: var(--az-soft);
}
.tx-filter label {
  display: block;
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--az-muted);
}
.tx-filter .form-control,
.tx-filter .btn {
  width: 100%;
}
.tx-table {
  margin-bottom: 0;
}
.tx-table > tbody > tr > td {
  padding: 9px 8px;
}
.tx-name {
  font-weight: 600;
  font-size: 13.5px;
}
.tx-name-wrap {
  position: relative;
}
.tx-tree {
  position: absolute;
  margin-left: -16px;
  top: -2px;
  width: 10px;
  height: 12px;
  border-left: 1px solid var(--az-input-border);
  border-bottom: 1px solid var(--az-input-border);
  border-radius: 0 0 0 3px;
}
.tx-slug {
  margin-top: 3px;
  font-size: 12px;
  color: var(--az-muted);
}
.tx-parent {
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 10px;
  background: var(--az-primary-soft);
  color: var(--az-primary);
  font-size: 11px;
  font-weight: 600;
}
.tx-kw {
  font-size: 12px;
  color: var(--az-muted);
  word-break: break-word;
}
.tx-actions {
  white-space: nowrap;
  text-align: right;
}
.tx-actions a {
  display: inline-block;
  width: 26px;
  height: 26px;
  line-height: 26px;
  text-align: center;
  border-radius: 6px;
  color: var(--az-muted);
}
.tx-actions a:hover {
  background: var(--az-hover);
  color: var(--az-primary);
}
.tx-actions a.tx-del:hover {
  color: #ef4444;
}
.tx-table tr.row_edit:hover .tx-name {
  text-decoration: underline;
}
.tx-empty td {
  padding: 30px 8px !important;
  text-align: center;
  color: var(--az-muted);
}
/* nhan trang thai (\helper\page_rule::admin_badges) */
.tx-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: 6px;
  vertical-align: 1px;
}
.tx-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}
.tx-badge-red {
  background: rgba(239, 68, 68, .12);
  color: #dc2626;
}
.tx-badge-orange {
  background: rgba(245, 158, 11, .15);
  color: #d97706;
}
.tx-badge-gray {
  background: var(--az-hover);
  color: var(--az-muted);
}
html[data-theme="dark"] .tx-badge-red {
  color: #f87171;
}
html[data-theme="dark"] .tx-badge-orange {
  color: #fbbf24;
}
@media (max-width: 767px) {
  .tx-toolbar .tx-search {
    width: 100%;
  }
}

/* ---------- Danh sach dung chung (.az-list): Tin tuc, Trang, Binh luan, Tai khoan, Metadata ---------- */
.tx-filter-wide {
  grid-column: span 2;
}
.tx-filter select.form-control,
.tx-filter input.form-control {
  height: 32px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 30px;
  font-size: 13px;
}
.az-table > thead > tr > td {
  white-space: nowrap;
}
.az-table > thead > tr > td.sort {
  cursor: pointer;
  user-select: none;
}
.az-table > thead > tr > td.sort:after {
  font-family: FontAwesome;
  content: "\f0dc";
  margin-left: 6px;
  opacity: .35;
  font-size: 11px;
}
.az-table > thead > tr > td.sort.asc:after {
  content: "\f0de";
  opacity: 1;
  color: var(--az-primary);
}
.az-table > thead > tr > td.sort.desc:after {
  content: "\f0dd";
  opacity: 1;
  color: var(--az-primary);
}
.az-table > tbody > tr > td {
  vertical-align: middle;
}
.az-list .tx-name {
  color: var(--az-text);
}
.az-list .tx-name:hover {
  color: var(--az-primary);
}
.az-id {
  font-weight: 600;
  color: var(--az-muted);
}
.az-muted {
  color: var(--az-muted);
}
.az-date {
  font-weight: 600;
  font-size: 12.5px;
  color: var(--az-text);
  white-space: nowrap;
}
.az-time {
  font-size: 11.5px;
  color: var(--az-muted);
}
.az-cell-stack {
  display: flex;
  align-items: center;
  gap: 6px;
}
.az-cell-stack select.form-control {
  width: auto;
  min-width: 96px;
  height: 28px;
  padding: 0 26px 0 8px;
  line-height: 26px;
  font-size: 12px;
  font-weight: 600;
}
.az-list .tx-table select.form-control {
  padding-top: 0;
  padding-bottom: 0;
  line-height: normal;
}
.az-list select.az-status-publish {
  color: #16a34a;
}
.az-list select.az-status-trash {
  color: #dc2626;
}
.az-list select.az-status-pending {
  color: #d97706;
}
/* nhan trang thai (\helper\admin_ui::status_pill) */
.az-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.az-pill-green {
  background: rgba(34, 197, 94, .13);
  color: #16a34a;
}
.az-pill-red {
  background: rgba(239, 68, 68, .12);
  color: #dc2626;
}
.az-pill-orange {
  background: rgba(245, 158, 11, .15);
  color: #d97706;
}
.az-pill-blue {
  background: var(--az-primary-soft);
  color: var(--az-primary);
}
.az-pill-gray {
  background: var(--az-hover);
  color: var(--az-muted);
}
html[data-theme="dark"] .az-pill-green,
html[data-theme="dark"] .az-list select.az-status-publish {
  color: #4ade80;
}
html[data-theme="dark"] .az-pill-red,
html[data-theme="dark"] .az-list select.az-status-trash {
  color: #f87171;
}
html[data-theme="dark"] .az-pill-orange,
html[data-theme="dark"] .az-list select.az-status-pending {
  color: #fbbf24;
}
/* chip bat/tat (Hot...) - cung kieu luoi game */
.az-list .gm-opt {
  display: inline-block;
  margin: 0;
  padding: 2px 9px;
  border: 1px solid var(--az-border);
  border-radius: 11px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--az-muted);
  cursor: pointer;
  user-select: none;
  transition: all .15s;
}
.az-list .gm-opt input {
  display: none;
}
.az-list .gm-opt:hover {
  border-color: var(--az-primary);
  color: var(--az-primary);
}
.az-list .gm-opt.on {
  color: #fff;
  border-color: transparent;
  background: #ef4444;
}
/* avatar chu cai / anh tron trong luoi */
.az-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--az-primary-soft);
  color: var(--az-primary);
  font-weight: 700;
  font-size: 13px;
  overflow: hidden;
  object-fit: cover;
}
.az-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.az-person .az-person-sub {
  font-size: 12px;
  color: var(--az-muted);
}

/* ---------- TinyMCE 4 (skin lightgray): bo goc + che do toi (noi dung iframe do footer.php to mau) ---------- */
.mce-tinymce.mce-panel {
  border-color: var(--az-input-border) !important;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: none !important;
}
html[data-theme="dark"] .mce-panel,
html[data-theme="dark"] .mce-menubar,
html[data-theme="dark"] .mce-toolbar-grp,
html[data-theme="dark"] .mce-statusbar,
html[data-theme="dark"] .mce-menu,
html[data-theme="dark"] .mce-window,
html[data-theme="dark"] .mce-window-head,
html[data-theme="dark"] .mce-foot {
  background: #18223a !important;
  border-color: var(--az-border) !important;
  color: var(--az-text) !important;
}
html[data-theme="dark"] .mce-edit-area {
  border-color: var(--az-border) !important;
}
html[data-theme="dark"] .mce-btn,
html[data-theme="dark"] .mce-menubtn {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  filter: none !important;
}
html[data-theme="dark"] .mce-btn:hover,
html[data-theme="dark"] .mce-btn.mce-active,
html[data-theme="dark"] .mce-menu-item:hover,
html[data-theme="dark"] .mce-menu-item.mce-selected,
html[data-theme="dark"] .mce-menubar .mce-menubtn:hover {
  background: var(--az-hover) !important;
  border-color: var(--az-border) !important;
}
html[data-theme="dark"] .mce-ico,
html[data-theme="dark"] .mce-txt,
html[data-theme="dark"] .mce-text,
html[data-theme="dark"] .mce-label,
html[data-theme="dark"] .mce-menu-item,
html[data-theme="dark"] .mce-path-item,
html[data-theme="dark"] .mce-wordcount,
html[data-theme="dark"] .mce-title {
  color: var(--az-text-2) !important;
  text-shadow: none !important;
}
/* chu menu File / Edit… va nut Formats nam tren <button> (skin dat color:#333) */
html[data-theme="dark"] .mce-btn button,
html[data-theme="dark"] .mce-menubtn button,
html[data-theme="dark"] .mce-menubar button,
html[data-theme="dark"] .mce-menubar .mce-menubtn button span,
html[data-theme="dark"] .mce-listbox button,
html[data-theme="dark"] .mce-btn button span {
  color: var(--az-text) !important;
  text-shadow: none !important;
}
html[data-theme="dark"] .mce-btn.mce-disabled button,
html[data-theme="dark"] .mce-btn.mce-disabled .mce-ico {
  color: var(--az-muted) !important;
  opacity: .55;
}
html[data-theme="dark"] .mce-caret {
  border-top-color: var(--az-text-2) !important;
}
html[data-theme="dark"] .mce-btn-group:not(:first-child) {
  border-left-color: var(--az-border) !important;
}
html[data-theme="dark"] .mce-textbox {
  background: var(--az-input) !important;
  border-color: var(--az-input-border) !important;
  color: var(--az-text) !important;
}

/* ---------- Che do toi: form sua game (style trong game/form.php) ---------- */
html[data-theme="dark"] #game_form .gf-card,
html[data-theme="dark"] #game_form .panel {
  background: var(--az-card);
  border-color: var(--az-border);
}
html[data-theme="dark"] #game_form .gf-card-head,
html[data-theme="dark"] #game_form .panel > .panel-heading {
  background: transparent;
  color: var(--az-text);
  border-bottom-color: var(--az-border-soft);
}
html[data-theme="dark"] #game_form .gf-actionbar,
html[data-theme="dark"] #game_form .gf-actions {
  background: rgba(19, 28, 46, .96);
  border-color: var(--az-border);
}
html[data-theme="dark"] #game_form .gf-jump a.on {
  background: var(--az-hover);
  color: #93c5fd;
  box-shadow: none;
}
html[data-theme="dark"] #game_form .gf-addon,
html[data-theme="dark"] #game_form .gf-adv-body,
html[data-theme="dark"] #game_form .gf-taglist,
html[data-theme="dark"] #game_form .gf-serp,
html[data-theme="dark"] #game_form .gf-album-item,
html[data-theme="dark"] #game_form .gf-counter {
  background: var(--az-soft);
  border-color: var(--az-border);
  color: var(--az-text-2);
}
html[data-theme="dark"] #game_form .gf-chip span,
html[data-theme="dark"] #game_form .gf-tagpick {
  background: #1b2640;
  border-color: #2c3954;
  color: var(--az-text-2);
}
html[data-theme="dark"] #game_form .gf-chip input:checked + span,
html[data-theme="dark"] #game_form .gf-tagpick.on {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
html[data-theme="dark"] #game_form .gf-alias-box,
html[data-theme="dark"] #game_form .gf-dropzone,
html[data-theme="dark"] #game_form .gf-basic-media .gf-thumb .img-thumbnail {
  background: rgba(99, 102, 241, .08);
  border-color: rgba(129, 140, 248, .45);
}
html[data-theme="dark"] #game_form .gf-alias-chip {
  background: rgba(99, 102, 241, .25);
  color: #c7d2fe;
}
html[data-theme="dark"] #game_form .gf-sub,
html[data-theme="dark"] #game_form .gf-tagbox,
html[data-theme="dark"] #game_form .gf-adv-row,
html[data-theme="dark"] #game_form .gf-cl-table > thead > tr > th,
html[data-theme="dark"] #game_form .gf-cl-table > tbody > tr > td {
  border-color: var(--az-border-soft);
}
html[data-theme="dark"] #game_form .gf-titlebox h3,
html[data-theme="dark"] #game_form .gf-switch {
  color: var(--az-text);
}
html[data-theme="dark"] #game_form .gf-label {
  color: var(--az-text-2);
}
html[data-theme="dark"] #game_form .form-control[readonly] {
  background: var(--az-soft);
  color: var(--az-muted);
}
html[data-theme="dark"] #game_form .gf-serp-desc {
  color: #bdc1c6;
}
html[data-theme="dark"] #game_form .gf-serp-title {
  color: #8ab4f8;
}

/* ---------- Che do toi: trang Thong ke tim kiem (style trong game/search_stats.php) ---------- */
html[data-theme="dark"] #ss_page .panel-heading,
html[data-theme="dark"] .ss-toolbar,
html[data-theme="dark"] .ss-kpis .ss-kpi,
html[data-theme="dark"] #dr-panel {
  background: var(--az-card);
  border-color: var(--az-border);
}
html[data-theme="dark"] #dr-presets,
html[data-theme="dark"] #dr-presets li.dr-sep {
  border-color: var(--az-border);
}
html[data-theme="dark"] #dr-presets li,
html[data-theme="dark"] #dr-weeks button,
html[data-theme="dark"] #dr-months button {
  color: var(--az-text-2);
}
html[data-theme="dark"] #dr-presets li:hover,
html[data-theme="dark"] #dr-weeks button:hover,
html[data-theme="dark"] #dr-months button:hover:not(:disabled),
html[data-theme="dark"] #ss_movers li:hover {
  background: var(--az-hover);
}
html[data-theme="dark"] #ss_refresh {
  background: rgba(115, 103, 240, .12);
  border-color: rgba(115, 103, 240, .4);
  color: #c4bff7;
}
html[data-theme="dark"] .ss-partial {
  background: rgba(245, 158, 11, .1);
  border-color: rgba(245, 158, 11, .3);
  color: #fcd34d;
}
html[data-theme="dark"] .ss-bar {
  background: #1f2a40;
}

/* =====================================================================
 * Man hinh loading khi goi AJAX ($.ajaxloading / $.submitloading o mod/adminjs/data/admin.js).
 * Chi doi CSS: markup #loading-model > .loading > .loading-content > span(chu + loading.gif) + .loading-mark.
 * Thay bang the nho giua man hinh: vong xoay + "Đang tải…", nen mo + blur. Chuyen dong nhe, tat khi he dieu hanh giam chuyen dong.
 * ===================================================================== */
#loading-model .loading {
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
#loading-model .loading-content {
  display: flex;
  align-items: center;
  gap: 14px;
  width: auto;
  height: auto;
  min-width: 0;
  margin: 0;
  padding: 16px 22px 16px 18px;
  background: var(--az-card);
  border: 1px solid var(--az-border);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .25);
  animation: az-load-in .18s ease-out;
}
#loading-model .loading-content:before {
  content: "";
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid var(--az-primary-soft);
  border-top-color: #3b82f6;
  border-right-color: #8b5cf6;
  animation: az-spin .7s linear infinite;
}
/* an chu "Loading data ……" + anh gif goc, thay bang chu moi */
#loading-model .loading-content span {
  font-size: 0;
  line-height: 0;
}
#loading-model .loading-content span img {
  display: none;
}
#loading-model .loading-content span:after {
  content: "Đang tải dữ liệu…";
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--az-text);
  white-space: nowrap;
}
#loading-model .loading-mark {
  background: rgba(15, 23, 42, .28);
  opacity: 1;
  filter: none;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  animation: az-fade-in .18s ease-out;
}
html[data-theme="dark"] #loading-model .loading-mark {
  background: rgba(2, 6, 23, .55);
}
@keyframes az-spin {
  to { transform: rotate(360deg); }
}
@keyframes az-load-in {
  from { opacity: 0; transform: translateY(6px) scale(.98); }
  to { opacity: 1; transform: none; }
}
@keyframes az-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  #loading-model .loading-content,
  #loading-model .loading-mark {
    animation: none;
  }
  #loading-model .loading-content:before {
    animation-duration: 1.6s;
  }
}

/* o anh Danh muc / Tag = dropzone giong anh dai dien form game (part/thumb_drop.php) */
.tx-thumb {
  flex: 0 0 112px;
}
.tx-thumb .img-thumbnail {
  width: 112px;
  height: 112px;
  border: 2px dashed rgba(129, 140, 248, .7);
  background: rgba(99, 102, 241, .06);
}
.tx-thumb .img-thumbnail:hover,
.tx-thumb.over .img-thumbnail {
  border-color: #6366f1;
  background: rgba(99, 102, 241, .14);
}
.tx-thumb.tx-uploading {
  opacity: .5;
  pointer-events: none;
}
.tx-thumb-hint {
  width: 112px;
  margin-top: 6px;
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--az-muted);
}
.tx-thumb-hint .fa {
  color: #6366f1;
}
/* o anh trong form Danh muc / Tag: chua co anh -> icon thay cho anh vo */
.tx-thumb .img-thumbnail {
  position: relative;
}
.tx-thumb .img-thumbnail:before {
  content: "\f03e";
  font-family: FontAwesome;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--az-muted);
}
.tx-thumb .img-thumbnail img {
  position: relative;
  z-index: 1;
}
.tx-thumb .img-thumbnail img[src=""],
.tx-thumb .img-thumbnail img:not([src]) {
  visibility: hidden;
}

/* ---------- Form dung chung (.az-form): Tin tuc, Trang, Binh luan, Tai khoan... - cung kieu form game ---------- */
.az-form {
  padding-bottom: 30px;
}
.az-form .af-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--az-card);
  border: 1px solid var(--az-border);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(30, 41, 59, .06);
}
.az-form .af-title {
  flex: 1 1 260px;
  min-width: 0;
}
.az-form .af-title h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--az-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.az-form .af-title h3 .fa {
  color: var(--az-primary);
  margin-right: 4px;
}
.az-form .af-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-size: 12px;
  color: var(--az-muted);
}
.az-form .af-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}
.az-form .af-kbd {
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .2);
  font-size: 10.5px;
  font-weight: 600;
}
.az-form .af-card {
  margin-bottom: 16px;
  background: var(--az-card);
  border: 1px solid var(--az-border);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(30, 41, 59, .04);
}
.az-form .af-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--az-border);
  font-weight: 600;
  font-size: 14px;
  color: var(--az-text);
}
.az-form .af-card-head > .fa {
  width: 16px;
  color: var(--az-primary);
}
.az-form .af-card-head .af-sub {
  font-weight: 400;
  font-size: 12px;
  color: var(--az-muted);
}
.az-form .af-card-head .af-head-right {
  margin-left: auto;
}
.az-form .af-card-body {
  padding: 16px;
}
.az-form .af-card-body > .form-group:last-child {
  margin-bottom: 0;
}
.az-form .af-label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--az-text-2);
}
.az-form .af-label .af-hint {
  font-weight: 400;
  color: var(--az-muted);
}
.az-form .af-label .af-count {
  margin-left: auto;
  font-weight: 500;
  color: var(--az-muted);
}
.az-form .af-label .af-count.warn {
  color: #d97706;
}
.az-form .af-req {
  color: #ef4444;
}
.az-form .af-title-input {
  height: 40px;
  font-size: 16px;
  font-weight: 600;
}
.az-form .af-addon {
  background: var(--az-soft);
  color: var(--az-muted);
  border-color: var(--az-input-border);
  font-size: 12.5px;
}
.az-form .af-help {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--az-muted);
}
/* nhom nut chon 1 (radio) dang segmented */
.az-form .af-seg {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--az-border);
  border-radius: 9px;
  background: var(--az-soft);
}
.az-form .af-seg label {
  flex: 1 1 auto;
  margin: 0;
  padding: 5px 10px;
  border-radius: 6px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--az-text-2);
  cursor: pointer;
}
.az-form .af-seg input {
  display: none;
}
.az-form .af-seg label.on {
  background: var(--az-card);
  color: var(--az-primary);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .14);
}
/* danh sach checkbox danh muc */
.az-form .af-tabs {
  display: flex;
  gap: 14px;
  margin: -4px 0 10px;
  border-bottom: 1px solid var(--az-border-soft);
}
.az-form .af-tabs a {
  padding: 4px 0 8px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--az-muted);
  text-decoration: none;
}
.az-form .af-tabs a {
  transition: color .15s, border-color .15s;
}
.az-form .af-tabs a:hover {
  color: var(--az-text);
  border-bottom-color: var(--az-border);
}
.az-form .af-tabs a:focus,
.az-form .af-tabs a:active {
  outline: none;
  box-shadow: none;
  text-decoration: none;
}
.az-form .af-tabs a:focus-visible {
  border-radius: 4px 4px 0 0;
  background: var(--az-hover);
}
.az-form .af-tabs a.on,
.az-form .af-tabs a.on:hover {
  color: var(--az-primary);
  border-bottom-color: var(--az-primary);
}
.az-form .af-tabs a {
  padding-left: 2px;
  padding-right: 2px;
}
.az-form .categorychecklist {
  max-height: 260px;
  overflow-y: auto;
  margin: 0;
  padding: 4px 6px;
  list-style: none;
  border: 1px solid var(--az-border-soft);
  border-radius: 8px;
  background: var(--az-soft);
}
.az-form .categorychecklist li label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 6px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 13px;
  color: var(--az-text);
  cursor: pointer;
}
.az-form .categorychecklist li label:hover {
  background: var(--az-hover);
}
.az-form .categorychecklist input {
  margin: 0;
}
.az-form .categorychecklist:empty:before {
  content: "Chưa có danh mục";
  display: block;
  padding: 10px;
  text-align: center;
  color: var(--az-muted);
  font-size: 12.5px;
}
/* o anh dai dien lon hon trong form */
.az-form .af-thumb-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.az-form .af-thumb-row .af-thumb-info {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  color: var(--az-muted);
}
.az-form .af-thumb-row .af-thumb-info code {
  display: block;
  margin-top: 4px;
  padding: 4px 6px;
  word-break: break-all;
  white-space: normal;
  background: var(--az-soft);
  color: var(--az-text-2);
}
/* o tags (bootstrap-tokenfield: form game "Tags", form tin...) - ca giao dien sang lan toi.
 * Ap cho MOI .tokenfield (form game khong nam trong .az-form). Tien to html de thang bootstrap-tokenfield.css
 * (.token nen #ededed, chu ke thua mau o nhap -> o che do toi chu trang tren nen trang) va html[data-theme=dark] .close.
 * Chip: nen --az-primary-soft + vien --az-input-border, chu --az-text (tuong phan cao ca 2 giao dien); dau x --az-text-2, hover do. */
html .tokenfield.form-control {
  height: auto;
  min-height: 34px;
  padding: 4px 6px 0;
  background: var(--az-input);
  border-color: var(--az-input-border);
  color: var(--az-text);
}
html .tokenfield.form-control.focus {
  border-color: var(--az-primary);
  box-shadow: 0 0 0 3px var(--az-primary-soft);
}
html .tokenfield .token {
  height: 24px;
  margin: 0 4px 4px 0;
  border: 1px solid var(--az-input-border);
  border-radius: 12px;
  background: var(--az-primary-soft);
  color: var(--az-text);
  font-size: 12px;
  font-weight: 600;
  line-height: 22px;
}
html .tokenfield .token:hover,
html .tokenfield .token.active {
  border-color: var(--az-primary);
}
html .tokenfield .token.active {
  box-shadow: 0 0 0 2px var(--az-primary-soft);
}
html .tokenfield .token.duplicate {
  border-color: #ef4444;
}
html .tokenfield .token .token-label {
  line-height: 22px;
  padding-left: 10px;
  color: inherit;
}
html .tokenfield .token .close {
  float: none;
  width: auto;
  min-width: 0;
  height: 22px;
  margin: 0 0 0 4px;
  padding: 0 8px 0 2px;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  color: var(--az-text-2);
  text-shadow: none;
  opacity: 1;
}
html .tokenfield .token .close:hover,
html .tokenfield .token .close:focus {
  color: #ef4444;
  opacity: 1;
}
html .tokenfield .token-input {
  height: 24px;
  margin-bottom: 4px;
  background: transparent;
  color: var(--az-text);
}
html .tokenfield .token-input::placeholder {
  color: var(--az-muted);
}
@media (max-width: 767px) {
  .az-form .af-bar {
    position: static;
  }
  .az-form .af-actions {
    margin-left: 0;
  }
}
/* anh dai dien dat ben trai Tieu de + Slug (the Thong tin co ban) */
.az-form .af-media {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 15px;
}
.az-form .af-media-fields {
  flex: 1 1 auto;
  min-width: 0;
}
.az-form .af-media-fields .form-group:last-of-type {
  margin-bottom: 6px;
}
.az-form .af-media-note code {
  display: inline-block;
  max-width: 100%;
  margin-left: 4px;
  padding: 1px 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
  background: var(--az-soft);
  color: var(--az-text-2);
}
/* chan thanh cuon ngang do plugin (tokenfield, datetimepicker...) - clip khong pha sticky cua .af-bar */
.az-form {
  overflow-x: clip;
}
@media (max-width: 600px) {
  .az-form .af-media {
    flex-direction: column;
  }
}
/* cong tac bat/tat trong form (Hien thi, Tin Hot...) */
.az-form .af-switch-row {
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--az-border-soft);
  border-radius: 8px;
  background: var(--az-soft);
}
.az-form .af-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-weight: 400;
  cursor: pointer;
  user-select: none;
}
.az-form .af-switch input[type=checkbox] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.az-form .af-switch-ui {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 22px;
  border-radius: 11px;
  background: var(--az-input-border);
  transition: background .2s;
}
.az-form .af-switch-ui:after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  transition: left .2s;
}
.az-form .af-switch input:checked + .af-switch-ui {
  background: #22c55e;
}
.az-form .af-switch-hot input:checked + .af-switch-ui {
  background: #ef4444;
}
.az-form .af-switch input:checked + .af-switch-ui:after {
  left: 19px;
}
.az-form .af-switch input:focus-visible + .af-switch-ui {
  box-shadow: 0 0 0 3px var(--az-primary-soft);
}
.az-form .af-switch b {
  display: block;
  font-size: 13px;
  color: var(--az-text);
}
.az-form .af-switch small {
  display: block;
  font-size: 11.5px;
  color: var(--az-muted);
}
/* hang Kieu hien thi + cong tac Hien thi / Hot (the Thong tin co ban) */
.az-form .af-opt-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 15px;
}
.az-form .af-opt-format {
  flex: 1 1 320px;
  min-width: 0;
}
.az-form .af-opt-switches {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  gap: 10px;
}
.az-form .af-opt-switches .af-switch-row {
  margin: 0;
  padding: 6px 12px;
}
/* thong bao upload anh (keo tha) */
.tx-thumb-msg {
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.45;
  border: 1px solid var(--az-border);
  background: var(--az-soft);
  color: var(--az-text-2);
}
.tx-thumb-msg.err {
  border-color: rgba(239, 68, 68, .4);
  background: rgba(239, 68, 68, .08);
  color: #dc2626;
}
.tx-thumb-msg.ok {
  border-color: rgba(34, 197, 94, .4);
  background: rgba(34, 197, 94, .08);
  color: #16a34a;
}
.tx-thumb-msg .tx-msg-close {
  float: right;
  margin-left: 10px;
  color: inherit;
  text-decoration: underline;
  opacity: .8;
}
html[data-theme="dark"] .tx-thumb-msg.err {
  color: #f87171;
}
html[data-theme="dark"] .tx-thumb-msg.ok {
  color: #4ade80;
}

/* ---------- Thu vien anh (.im-*): trang Quan ly anh + popup chon anh (mod/image/view/part/container.php) ---------- */
.im-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.im-toolbar .im-search {
  margin-left: auto;
  width: 260px;
}
.im-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 4px 0 12px;
  padding: 7px 12px;
  border: 1px solid var(--az-border-soft);
  border-radius: 8px;
  background: var(--az-soft);
  font-size: 12.5px;
  color: var(--az-muted);
}
.im-path .fa {
  color: #f59e0b;
  margin-right: 4px;
}
.im-path a {
  font-weight: 600;
  color: var(--az-text-2);
}
.im-path a:hover {
  color: var(--az-primary);
}
.im-path .im-sep {
  opacity: .5;
}
.im-path .im-filter {
  margin-left: 6px;
}
.im-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.im-item {
  min-width: 0;
}
.im-item .im-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  margin: 0;
  padding: 6px;
  overflow: hidden;
  border: 1px solid var(--az-border);
  border-radius: 8px;
  background: var(--az-soft) repeating-conic-gradient(rgba(148, 163, 184, .12) 0% 25%, transparent 0% 50%) 50% / 16px 16px;
  transition: border-color .15s, box-shadow .15s;
}
.im-item .im-box:hover {
  border-color: var(--az-primary);
  box-shadow: 0 2px 8px rgba(59, 130, 246, .18);
}
.im-item .im-box img.thumbnailimg {
  display: block !important;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.im-item.im-dir .im-box {
  background: var(--az-soft);
  font-size: 46px;
  color: #f59e0b;
  text-decoration: none;
}
.im-item.im-dir .im-box:hover {
  color: #fbbf24;
}
.im-item .im-check {
  position: absolute;
  top: 6px;
  right: 6px;
  display: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--az-primary);
  color: #fff;
  font-size: 12px;
  line-height: 22px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}
.im-item .im-box.checkedthumbnai {
  border-color: var(--az-primary);
  box-shadow: 0 0 0 2px var(--az-primary);
}
.im-item .im-box.checkedthumbnai .im-check {
  display: block;
}
.im-item .im-name {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--az-text-2);
  cursor: pointer;
}
.im-item .im-name input {
  flex: none;
  margin: 0;
}
.im-item .im-name span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.im-empty {
  padding: 40px 10px;
  text-align: center;
  color: var(--az-muted);
  border: 1px dashed var(--az-border);
  border-radius: 8px;
}
.im-empty .fa {
  display: block;
  margin-bottom: 10px;
  opacity: .5;
}
#image-notice {
  margin: -4px 0 12px;
}
#image-modal .modal-body {
  background: var(--az-card);
}
@media (max-width: 767px) {
  .im-toolbar .im-search {
    width: 100%;
  }
}
/* Metadata (Slideshow anh / Ads Games): anh nho trong danh sach */
.md-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border: 1px solid var(--az-border);
  border-radius: 8px;
  background: var(--az-soft);
  color: var(--az-muted);
}
.md-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.md-order {
  display: inline-block;
  min-width: 30px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--az-hover);
  font-weight: 600;
  font-size: 12px;
  color: var(--az-text-2);
}
.md-url {
  color: var(--az-muted);
}
.md-url:hover {
  color: var(--az-primary);
}
.tx-form-card #tx_thumb_msg {
  margin: -6px 0 12px;
}

/* ---------- Quan ly giao dien (.th-*): mod/thememanager/view/view.php ---------- */
#th_page .panel-heading .th-search {
  width: 240px;
  max-width: 50%;
}
.th-current {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 14px;
}
.th-slot {
  display: flex;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--az-border);
  border-radius: 10px;
  background: var(--az-soft);
}
.th-slot-off .th-slot-info {
  opacity: .8;
}
.th-slot-shot,
.th-card-shot {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--az-border-soft);
  border-radius: 8px;
  background: var(--az-hover);
}
.th-slot-shot {
  width: 220px;
  aspect-ratio: 16 / 10;
}
.th-slot-shot-m {
  width: 92px;
  aspect-ratio: 9 / 16;
}
.th-shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
/* khong co screenshot.png -> icon thay anh */
.th-noshot {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--az-muted);
}
.th-noshot:before {
  font-family: FontAwesome;
  content: "\f03e";
  font-size: 28px;
  opacity: .45;
}
.th-responsive:before {
  content: none;
}
.th-responsive .fa {
  font-size: 26px;
  opacity: .5;
}
.th-slot-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}
.th-slot-kind {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--az-muted);
}
.th-slot-kind .fa {
  margin-right: 4px;
  color: var(--az-primary);
}
.th-slot-name {
  font-size: 17px;
  color: var(--az-text);
  word-break: break-all;
}
.th-meta {
  font-size: 12px;
  color: var(--az-muted);
}
.th-link {
  margin-top: auto;
  font-size: 12.5px;
}
.az-form .th-switch-row {
  margin: 0;
}
.th-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.th-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--az-border);
  border-radius: 10px;
  background: var(--az-card);
  transition: border-color .15s, box-shadow .15s;
}
.th-card:hover {
  border-color: var(--az-primary);
  box-shadow: 0 4px 14px rgba(15, 23, 42, .08);
}
.th-card.th-used {
  border-color: #22c55e;
}
.th-card-shot {
  aspect-ratio: 16 / 10;
  border: 0;
  border-bottom: 1px solid var(--az-border-soft);
  border-radius: 0;
}
.th-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 4px;
}
.th-badges .az-pill,
html[data-theme="dark"] .th-badges .az-pill {
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}
.th-card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px 4px;
}
.th-card-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
  color: var(--az-text);
}
.th-card-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
  padding: 8px 12px 12px;
}
.th-card-actions .th-del {
  margin-left: auto;
}
.th-drop {
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 230px;
  margin: 0;
  padding: 20px;
  border: 2px dashed var(--az-input-border);
  background: var(--az-soft);
  color: var(--az-muted);
  font-weight: 400;
  text-align: center;
  cursor: pointer;
}
.th-drop .fa {
  font-size: 34px;
  color: var(--az-primary);
}
.th-drop b {
  font-size: 14px;
  color: var(--az-text);
}
.th-drop span {
  font-size: 12px;
  line-height: 1.5;
}
.th-drop.on,
.th-drop:hover {
  border-color: var(--az-primary);
  background: var(--az-primary-soft);
}
.th-empty {
  padding: 30px 0;
  text-align: center;
  color: var(--az-muted);
}
@media (max-width: 991px) {
  .th-current {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 600px) {
  .th-slot {
    flex-direction: column;
  }
  .th-slot-shot {
    width: 100%;
  }
  #th_page .panel-heading {
    flex-wrap: wrap;
  }
  #th_page .panel-heading .th-search {
    width: 100%;
    max-width: none;
  }
}
#th_page .az-form {
  margin: 0;
  padding: 0;
}
.th-badges .az-pill,
html[data-theme="dark"] .th-badges .az-pill {
  border: 0;
  color: #fff;
}
.th-badges .az-pill.az-pill-green,
html[data-theme="dark"] .th-badges .az-pill-green {
  background: #16a34a;
}
.th-badges .az-pill.az-pill-blue,
html[data-theme="dark"] .th-badges .az-pill-blue {
  background: #2563eb;
}
.th-card-actions .th-on {
  opacity: 1 !important;
  color: #16a34a;
  border-color: rgba(34, 197, 94, .4);
  background: rgba(34, 197, 94, .08);
}
html[data-theme="dark"] .th-card-actions .th-on {
  color: #4ade80;
}

/* ---------- Quan ly cache (.cc-*): mod/cache/view/form.php ---------- */
.cc-layers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.cc-layer {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--az-border);
  border-radius: 10px;
  background: var(--az-card);
  box-shadow: var(--az-shadow);
  color: var(--az-text) !important;
  text-decoration: none !important;
  transition: border-color .15s;
}
.cc-layer:hover {
  border-color: var(--az-primary);
}
.cc-layer-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--az-primary-soft);
  color: var(--az-primary);
  font-weight: 700;
}
.cc-layer b {
  display: block;
  font-size: 13.5px;
}
.cc-layer small {
  display: block;
  font-size: 12px;
  color: var(--az-muted);
}
.cc-dot {
  width: 9px;
  height: 9px;
  margin-left: auto;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--az-muted);
}
.cc-dot.ok { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }
.cc-dot.bad { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .18); }
.cc-dot.warn { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .18); }
#cc_page .panel-heading > .az-pill {
  flex: 0 0 auto;
}
.cc-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.cc-stat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px 12px 60px;
  min-height: 70px;
  border: 1px solid var(--az-border-soft);
  border-radius: 10px;
  background: var(--az-soft);
}
.cc-ico {
  position: absolute;
  left: 14px;
  top: 14px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 16px;
  background: var(--az-hover);
}
.cc-ico.c-blue { color: #3b82f6; background: rgba(59, 130, 246, .12); }
.cc-ico.c-green { color: #16a34a; background: rgba(34, 197, 94, .12); }
.cc-ico.c-purple { color: #7c3aed; background: rgba(124, 58, 237, .12); }
.cc-ico.c-orange { color: #d97706; background: rgba(245, 158, 11, .14); }
.cc-ico.c-red { color: #dc2626; background: rgba(239, 68, 68, .12); }
.cc-stat-value {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--az-text);
}
.cc-stat-label {
  font-size: 12px;
  color: var(--az-muted);
}
.cc-bar {
  display: block;
  height: 4px;
  margin-top: 6px;
  border-radius: 2px;
  background: var(--az-border);
  overflow: hidden;
}
.cc-bar > span {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #3b82f6, #22c55e);
}
.cc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.cc-help {
  margin: 0;
  font-size: 12.5px;
  color: var(--az-muted);
}
.cc-actions .cc-help {
  margin-left: 4px;
}
.cc-danger {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(239, 68, 68, .3);
  border-radius: 10px;
  background: rgba(239, 68, 68, .05);
}
.cc-danger > div {
  flex: 1 1 260px;
}
.cc-danger b {
  display: block;
  font-size: 13px;
  color: #dc2626;
}
.cc-danger span {
  font-size: 12.5px;
  color: var(--az-text-2);
}
.btn.cc-btn-danger {
  color: #dc2626;
  border-color: rgba(239, 68, 68, .45);
}
.btn.cc-btn-danger:hover,
.btn.cc-btn-danger:focus {
  color: #fff;
  background: #dc2626;
  border-color: #dc2626;
}
html[data-theme="dark"] .cc-danger b,
html[data-theme="dark"] .btn.cc-btn-danger {
  color: #f87171;
}
html[data-theme="dark"] .btn.cc-btn-danger:hover {
  color: #fff;
}
#homepage_result:not(:empty),
#homepage_diagnose_result:not(:empty),
#purge_result:not(:empty) {
  margin-top: 14px;
}
.cc-alert {
  margin-bottom: 0;
}
.cc-alert > .fa:first-child {
  margin-right: 4px;
}
.cc-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--az-border);
}
.cc-flow-title {
  width: 100%;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--az-muted);
}
.cc-flow-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--az-border);
  border-radius: 8px;
  background: var(--az-soft);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--az-text);
}
.cc-flow-step b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--az-primary);
  color: #fff;
  font-size: 11px;
}
.cc-flow-step small {
  font-weight: 400;
  color: var(--az-muted);
}
.cc-flow > .fa {
  color: var(--az-muted);
}
.cc-notes {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--az-text-2);
}
.cc-diag {
  border: 1px solid var(--az-border);
  border-radius: 10px;
  overflow: hidden;
}
.cc-diag-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 14px;
  background: var(--az-soft);
  border-bottom: 1px solid var(--az-border-soft);
}
.cc-diag-head > span {
  flex: 1 1 auto;
}
.cc-diag-head small {
  color: var(--az-muted);
}
.cc-diag-body {
  padding: 4px 14px 12px;
}
.cc-diag-step {
  margin: 14px 0 6px;
  font-size: 13px;
}
.cc-diag-body .table {
  margin-bottom: 6px;
}
.cc-key-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.cc-key-search {
  flex: 1 1 280px;
  max-width: 480px;
}
.cc-seg {
  display: inline-flex;
  flex-wrap: wrap;
  padding: 3px;
  border: 1px solid var(--az-border);
  border-radius: 9px;
  background: var(--az-soft);
}
.cc-seg button {
  padding: 4px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--az-text-2);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.6;
}
.cc-seg button:hover {
  color: var(--az-primary);
}
.cc-seg button.on {
  background: var(--az-card);
  color: var(--az-primary);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .12);
}
.cc-seg button.cc-seg-danger.on {
  color: #dc2626;
}
.cc-seg-wide {
  margin-bottom: 14px;
}
.cc-seg-wide button {
  padding: 6px 14px;
}
td.cc-key {
  font-family: Menlo, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
  color: var(--az-text);
}
td.cc-created {
  font-size: 12px;
  color: var(--az-text-2);
  white-space: nowrap;
}
#cc_page .cc-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  color: var(--az-muted);
}
#cc_page .cc-del:hover {
  color: #dc2626;
  background: rgba(239, 68, 68, .1);
}
.cc-key-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}
#cache_key_paging {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cc-page-info,
.cc-page-n {
  font-size: 12.5px;
  color: var(--az-muted);
}
.cc-page-info {
  margin-right: 6px;
}
.cc-cf-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 14px;
}
.cc-cf-info small {
  margin-right: 6px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--az-muted);
}
#cc_page .af-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--az-text-2);
}
.cc-mono {
  font-family: Menlo, Consolas, monospace;
  font-size: 12.5px;
}
#purge_input_help {
  margin: 6px 0 10px;
}
#purge_recent_box {
  margin-bottom: 14px;
}
.cc-recent-title {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--az-text-2);
}
.cc-recent-title small {
  font-weight: 400;
  color: var(--az-muted);
}
.cc-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  margin: 0 6px 6px 0;
  padding: 3px 10px;
  border: 1px solid var(--az-border);
  border-radius: 14px;
  background: var(--az-soft);
  font-size: 12px;
  color: var(--az-text-2);
  cursor: pointer;
}
.cc-chip:hover {
  border-color: var(--az-primary);
  color: var(--az-primary);
}
.cc-chip .fa {
  font-size: 10px;
}
.cc-everything {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(239, 68, 68, .3);
  border-radius: 10px;
  background: rgba(239, 68, 68, .06);
  font-size: 13px;
  color: var(--az-text);
}
.cc-everything .fa {
  margin-right: 4px;
  color: #dc2626;
}
@media (max-width: 767px) {
  .cc-layers {
    grid-template-columns: minmax(0, 1fr);
  }
}
#cc_keys .tx-table > tbody > tr > td {
  padding-top: 7px;
  padding-bottom: 7px;
  vertical-align: middle;
}
#cc_keys tr.cc-more td {
  padding: 12px !important;
  text-align: center;
  font-size: 12.5px;
  background: var(--az-soft);
  color: var(--az-text-2);
}

/* ---------- Cau hinh website (.op-*): themes/adminthemegame/options/*.php ---------- */
.op-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: -4px 0 16px;
  padding: 4px;
  border: 1px solid var(--az-border);
  border-radius: 11px;
  background: var(--az-card);
  box-shadow: var(--az-shadow);
}
.op-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--az-text-2) !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background .15s, color .15s;
}
.op-tabs a:hover {
  background: var(--az-hover);
  color: var(--az-text) !important;
}
.op-tabs a.on {
  background: var(--az-primary-soft);
  color: var(--az-primary) !important;
}
.op-tabs a .fa {
  width: 14px;
  text-align: center;
}
.op-tabs a .op-ext {
  width: auto;
  font-size: 10px;
  opacity: .6;
}
.op-mono {
  font-family: Menlo, Consolas, monospace;
  font-size: 12.5px;
}
.az-form .af-help {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--az-muted);
}
.op-imgs {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.op-img {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.op-img-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  padding: 6px;
  overflow: hidden;
  border: 1px solid var(--az-border);
  border-radius: 10px;
  background: repeating-conic-gradient(var(--az-soft) 0 25%, var(--az-card) 0 50%) 0 0 / 14px 14px;
  transition: border-color .15s;
}
.op-img-box:hover {
  border-color: var(--az-primary);
}
.op-img-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.op-img-box.empty {
  border-style: dashed;
  background: var(--az-soft);
}
.op-img-box.empty img {
  display: none;
}
.op-img-box.empty:before {
  font-family: FontAwesome;
  content: "\f03e";
  font-size: 22px;
  color: var(--az-muted);
  opacity: .5;
}
.op-img-info {
  flex: 1 1 auto;
  min-width: 0;
}
.op-img-info .af-label {
  margin-bottom: 4px;
}
.op-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.op-row {
  display: flex;
  gap: 8px;
}
.op-row .form-control {
  flex: 1 1 auto;
}
.op-row .op-row-name {
  flex: 0 0 38%;
}
.op-row .op-row-del {
  flex: 0 0 auto;
  color: var(--az-muted);
}
.op-row .op-row-del:hover {
  color: #dc2626;
}
.op-ico-fb { color: #1877f2; }
.op-ico-tw { color: #1d9bf0; }
.op-ico-gg { color: #ea4335; }
.op-num {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--az-border-soft);
}
.op-num:first-child {
  padding-top: 0;
}
.op-num:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.op-num .af-label {
  display: block;
  margin: 0;
}
.op-num .af-help {
  margin-top: 2px;
}
.op-num-ctl {
  display: flex;
  flex: 0 0 auto;
}
.op-num-ctl .btn {
  width: 34px;
  padding: 0;
  font-size: 16px;
  font-weight: 600;
}
.op-num-ctl .btn:first-child {
  border-radius: 8px 0 0 8px;
}
.op-num-ctl .btn:last-child {
  border-radius: 0 8px 8px 0;
}
.op-num-ctl input {
  width: 64px;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  text-align: center;
  font-weight: 600;
  -moz-appearance: textfield;
}
.op-num-ctl input::-webkit-outer-spin-button,
.op-num-ctl input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.op-num .af-seg {
  flex: 0 0 auto;
}
.op-save-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 20px;
}
.op-save-row .af-help {
  margin: 0;
}
.op-json {
  max-height: 520px;
  margin: 0 0 10px;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--az-border-soft);
  border-radius: 8px;
  background: var(--az-soft);
  color: var(--az-text-2);
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}
.op-json.ok {
  color: var(--az-text);
}
.op-json.bad {
  color: #dc2626;
}
@media (min-width: 1200px) {
  .op-sticky {
    position: sticky;
    top: 80px;
  }
}
/* Game Suggest */
.gs-search {
  position: relative;
  margin-bottom: 12px;
}
.gs-search > .fa {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--az-muted);
  z-index: 2;
}
.gs-search .form-control {
  padding-left: 34px;
}
.gs-results {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--az-border);
  border-radius: 9px;
  background: var(--az-card);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .15);
}
.gs-r {
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--az-text);
  cursor: pointer;
}
.gs-r:hover {
  background: var(--az-primary-soft);
  color: var(--az-primary);
}
.gs-r.on {
  color: var(--az-muted);
}
.gs-r small {
  margin-left: 6px;
  color: var(--az-muted);
}
.gs-r.none {
  color: var(--az-muted);
  cursor: default;
}
.gs-r.none:hover {
  background: none;
}
.gs-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 460px;
  overflow-y: auto;
}
.gs-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid var(--az-border);
  border-radius: 8px;
  background: var(--az-card);
  transition: border-color .15s, background .3s;
}
.gs-item:hover {
  border-color: var(--az-primary);
}
.gs-item.gs-flash {
  background: rgba(245, 158, 11, .18);
}
.gs-item.ui-sortable-helper {
  box-shadow: 0 6px 18px rgba(15, 23, 42, .18);
}
.gs-handle {
  color: var(--az-muted);
  cursor: grab;
}
.gs-n {
  min-width: 22px;
  height: 22px;
  padding: 0 4px;
  border-radius: 6px;
  background: var(--az-soft);
  color: var(--az-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}
.gs-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
  color: var(--az-text);
}
.gs-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  color: var(--az-muted) !important;
}
.gs-del:hover {
  background: rgba(239, 68, 68, .1);
  color: #dc2626 !important;
}
.gs-empty {
  padding: 20px;
  border: 1px dashed var(--az-border);
  border-radius: 8px;
  text-align: center;
  font-size: 12.5px;
  color: var(--az-muted);
}
@media (max-width: 600px) {
  .op-num {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- Quan ly Menu (.mn-*): themes/adminthemegame/menu/*, cay menu tu mod/menu/action/helper.php ---------- */
.mn-groups {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.mn-groups-label {
  margin-right: 4px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--az-muted);
}
.mn-group {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--az-border);
  border-radius: 9px;
  background: var(--az-card);
  box-shadow: var(--az-shadow);
}
.mn-group a {
  padding: 7px 10px 7px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--az-text-2) !important;
  text-decoration: none !important;
}
.mn-group a .fa {
  margin-right: 4px;
  color: var(--az-muted);
}
.mn-group.on {
  border-color: var(--az-primary);
  background: var(--az-primary-soft);
}
.mn-group.on a,
.mn-group.on a .fa {
  color: var(--az-primary) !important;
}
.mn-group-del {
  align-self: stretch;
  padding: 0 9px;
  border: 0;
  border-left: 1px solid var(--az-border-soft);
  background: transparent;
  color: var(--az-muted);
  font-size: 11px;
}
.mn-group-del:hover {
  background: rgba(239, 68, 68, .1);
  color: #dc2626;
}
.mn-group-add {
  padding: 7px 12px;
  border: 1px dashed var(--az-input-border);
  border-radius: 9px;
  background: transparent;
  color: var(--az-muted);
  font-size: 13px;
  font-weight: 600;
}
.mn-group-add:hover {
  border-color: var(--az-primary);
  color: var(--az-primary);
}
.mn-head-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.mn-toggle-url {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--az-text-2);
  cursor: pointer;
}
.mn-toggle-url input {
  margin: 0 4px 0 0;
  vertical-align: -2px;
}
.mn-tree ol.sortable,
.mn-tree ol.sortable ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
.mn-tree ol.sortable ol {
  margin-left: 28px;
  padding-left: 0;
  border-left: 2px solid var(--az-border-soft);
}
.mn-tree ol.sortable ol > li {
  padding-left: 10px;
}
.mn-tree li {
  margin: 6px 0 0;
}
.mn-tree li.mn-collapsed > ol {
  display: none;
}
.mn-tree .placeholder {
  min-height: 44px;
  margin-top: 6px;
  border: 2px dashed var(--az-primary);
  border-radius: 9px;
  background: var(--az-primary-soft);
}
.mn-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--az-border);
  border-radius: 9px;
  background: var(--az-card);
  transition: border-color .15s, box-shadow .15s;
}
.mn-item:hover {
  border-color: var(--az-primary);
}
.mn-item.editing {
  border-color: var(--az-primary);
  box-shadow: 0 0 0 3px var(--az-primary-soft);
}
.ui-sortable-helper > .mn-item {
  box-shadow: 0 8px 22px rgba(15, 23, 42, .2);
}
.mn-handle {
  flex: 0 0 auto;
  padding: 2px 4px;
  color: var(--az-muted);
  cursor: grab;
}
.mn-disclose {
  flex: 0 0 auto;
  width: 16px;
  color: var(--az-muted);
  text-align: center;
  cursor: pointer;
}
.mn-body {
  flex: 1 1 auto;
  min-width: 0;
}
.mn-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--az-text);
}
.mn-url {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
}
.mn-url a {
  color: var(--az-muted);
}
.mn-url a:hover {
  color: var(--az-primary);
}
.mn-hide-url .mn-url {
  display: none;
}
.mn-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}
.mn-badges .mn-cls {
  font-family: Menlo, Consolas, monospace;
  text-transform: none;
}
.mn-data {
  display: none;
}
.mn-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 2px;
}
.mn-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  color: var(--az-muted) !important;
}
.mn-actions a:hover {
  background: var(--az-primary-soft);
  color: var(--az-primary) !important;
}
.mn-actions a.mn-del:hover {
  background: rgba(239, 68, 68, .1);
  color: #dc2626 !important;
}
.mn-empty {
  padding: 30px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--az-muted);
}
.mn-save-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--az-border-soft);
}
.mn-save-row .af-help {
  margin: 0;
}
.mn-ok {
  font-size: 12.5px;
  font-weight: 600;
  color: #16a34a;
}
.mn-alert {
  margin: 10px 0 0;
  padding: 8px 12px;
  font-size: 12.5px;
}
.mn-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.mn-pick .af-card-head .mn-pick-q {
  width: 140px;
  margin-left: auto;
}
.mn-pick-list {
  max-height: 240px;
  overflow-y: auto;
  margin: -4px 0 0;
  padding-right: 4px;
}
.mn-pick-list .checkbox {
  margin: 0;
}
.mn-pick-list .checkbox label {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px 6px 28px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--az-text);
}
.mn-pick-list .checkbox label:hover {
  background: var(--az-soft);
}
.mn-pick-list .checkbox input[type=checkbox] {
  margin-left: -20px;
}
.mn-pick-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--az-border-soft);
}
.mn-pick-foot .af-help {
  margin: 0;
}
@media (max-width: 600px) {
  .mn-badges {
    display: none;
  }
}
/* o anh Cau hinh website: keo tha + nut Tai anh / Xem / Bo anh (options/general.php) */
#op_page .op-img {
  position: relative;
  padding: 10px;
  margin: -10px;
  border: 1px dashed transparent;
  border-radius: 12px;
  transition: border-color .15s, background .15s;
}
#op_page .op-img.over {
  border-color: var(--az-primary);
  background: var(--az-primary-soft);
}
#op_page .op-img.uploading .op-img-box {
  opacity: .5;
}
.op-img-label {
  display: block;
  font-size: 13px;
  color: var(--az-text);
}
.op-img-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
  font-size: 12px;
  color: var(--az-text-2);
}
.op-img-name {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: Menlo, Consolas, monospace;
  font-size: 11.5px;
}
.op-img-dim:not(:empty):before {
  content: "·";
  margin-right: 6px;
  color: var(--az-muted);
}
.op-img:not(.has-img) .op-img-name {
  font-family: inherit;
  color: var(--az-muted);
}
.op-img:not(.has-img) .op-img-view,
.op-img:not(.has-img) .op-img-clear {
  display: none;
}
.op-img-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.op-img-acts .btn-xs {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
}
.op-img-acts .op-img-clear:hover {
  color: #dc2626;
}
.op-img .op-img-msg {
  margin-top: 8px;
}
.op-img .af-help {
  margin-top: 2px;
}
.op-img:not(.has-img) .op-ico-gen {
  display: none;
}

/* =========================================================================
   Mobile: khong cuon ngang ca trang (<= 991px / <= 767px)
   ========================================================================= */
/* Hang card flex (.az-eq-row): duoi 992px col-md-* khong con width -> flex item co theo noi dung
   (bang, chu nowrap) va keo ca trang tran ngang. Ep moi cot = 100%, cho phep co lai (min-width:0). */
@media (max-width: 991px) {
  .az-eq-row > [class*="col-"] {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}
/* Con cua flex / grid khong duoc gian vuot khung vi noi dung dai */
.panel,
.panel-body,
.az-page-head > div {
  min-width: 0;
}

@media (max-width: 767px) {
  /* ---- Header: logo + icon tren 1 dong, khong rot xuong de len tieu de ---- */
  #header {
    display: flex;
    align-items: center;
  }
  #header .navbar-header {
    float: none;
    flex: 0 0 auto;
    margin: 0;
  }
  #header #button-menu {
    width: 44px;
  }
  #header .hd-brand {
    padding: 0 6px 0 10px;
  }
  #header .hd-brand-text {
    display: none;
  }
  #header .hd-nav {
    float: none !important;
    flex: 0 1 auto;
    min-width: 0;
    margin: 0 4px 0 auto;
  }
  #header .hd-nav > li > a {
    padding: 0 8px;
    margin: 0;
  }
  #header .hd-nav > li > a > .fa {
    margin-right: 0;
  }
  #header .hd-sep,
  #header .hd-nav > li:first-child {
    /* Dashboard: bam logo cung ve Dashboard */
    display: none;
  }
  #header .hd-user > a {
    padding: 0 4px 0 6px;
  }

  /* ---- Khung trang ---- */
  .container-fluid {
    padding-left: 12px;
    padding-right: 12px;
  }
  .container-fluid > .row {
    margin-left: -6px;
    margin-right: -6px;
  }
  .container-fluid > .row > [class*="col-"] {
    padding-left: 6px;
    padding-right: 6px;
  }
  .az-page-head {
    margin: 14px 0 12px;
    gap: 8px;
  }
  .az-page-head h1 {
    font-size: 20px;
  }
  .az-page-head .az-page-actions {
    margin-left: 0;
  }
  .panel-heading {
    padding: 10px 12px;
  }
  .panel-body {
    padding: 12px;
  }
  /* Phan trang: xuong dong thay vi tran */
  .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  .pagination > li > a,
  .pagination > li > span {
    margin: 0;
  }
  .gm-paging {
    flex-wrap: wrap;
    gap: 6px;
  }
  /* Bootstrap ep o trong .table-responsive khong xuong dong -> bang dai ra; cho xuong dong lai */
  .table-responsive > .table > thead > tr > th,
  .table-responsive > .table > tbody > tr > th,
  .table-responsive > .table > tbody > tr > td {
    white-space: normal;
  }
  .table-responsive {
    border: 0;
  }
  /* Modal vua man hinh */
  .modal-dialog {
    margin: 10px;
    width: auto;
  }

  /* ---- Danh sach game: moi dong = 1 the ---- */
  #game_list_panel .table-responsive {
    overflow: visible;
  }
  #game_list_panel .gm-toolbar {
    padding: 10px;
  }
  #game_list_panel .gm-toolbar .gm-search {
    width: 100%;
  }
  #game_list_panel .gm-filters {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  #game_list_panel .gm-group {
    margin-right: 6px;
  }
  #game_list_panel .gm-search-group {
    display: block;
    width: 100%;
  }
  #game_list_panel table.table,
  #game_list_panel table.table > tbody {
    display: block;
    width: 100%;
    border: 0;
  }
  /* Dau bang -> hang nut sap xep (Name / Publish / Views) + o chon tat ca */
  #game_list_panel table.table > thead {
    display: block;
  }
  #game_list_panel table.table > thead > tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 0 0 10px;
  }
  #game_list_panel table.table > thead > tr > td {
    display: none;
    border: 1px solid var(--az-border) !important;
    border-radius: 14px;
    padding: 3px 10px;
    font-size: 11px;
    background: var(--az-card);
  }
  #game_list_panel table.table > thead > tr > td:first-child,
  #game_list_panel table.table > thead > tr > td.sort {
    display: block;
  }
  #game_list_panel table.table > thead > tr > td:first-child {
    width: auto !important;
    padding: 3px 8px;
  }
  #game_list_panel tr.row_edit {
    display: grid;
    grid-template-columns: 22px 64px minmax(0, 1fr);
    gap: 8px 10px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--az-border);
    border-radius: 10px;
    background: var(--az-card);
  }
  #game_list_panel tr.row_edit > td {
    display: block;
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    min-width: 0;
    width: auto;
  }
  #game_list_panel tr.row_edit > td:first-child {
    padding-top: 4px;
  }
  #game_list_panel tr.row_edit .gm-thumb {
    width: 64px;
    height: 64px;
  }
  #game_list_panel tr.row_edit .gm-cell-name {
    word-break: break-word;
  }
  #game_list_panel tr.row_edit .gm-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    opacity: 1;
    visibility: visible;
  }
  /* Ngay dang + luot xem: 1 dong nho duoi anh */
  #game_list_panel tr.row_edit .gm-cell-date,
  #game_list_panel tr.row_edit .gm-cell-views {
    grid-column: span 1;
    font-size: 12px;
  }
  #game_list_panel tr.row_edit .gm-cell-date {
    grid-column: 1 / 3;
  }
  #game_list_panel tr.row_edit .gm-cell-date small {
    display: none;
  }
  #game_list_panel tr.row_edit .gm-cell-date,
  #game_list_panel tr.row_edit .gm-cell-views {
    align-self: center;
    white-space: nowrap;
  }
  #game_list_panel tr.row_edit .ads-cell > :last-child {
    margin-bottom: 0;
  }
  #game_list_panel tr.row_edit .gm-cell-views:before {
    content: "Views: ";
    font-weight: 400;
    color: var(--az-muted);
  }
  #game_list_panel tr.row_edit .gm-cell-opts,
  #game_list_panel tr.row_edit .ads-cell,
  #game_list_panel tr.row_edit .gm-cell-display {
    grid-column: 1 / -1;
    min-width: 0;
  }
  #game_list_panel tr.row_edit .ads-cell {
    padding-top: 8px;
    border-top: 1px dashed var(--az-border) !important;
  }
  #game_list_panel tr.row_edit .gm-cell-display {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  #game_list_panel tr.row_edit .gm-cell-display .gm-status {
    margin: 0;
  }
  #game_list_panel tr.row_edit .gm-cell-display select {
    width: auto;
    min-width: 90px;
  }
}

/* ---- Bang danh sach dung chung (.tx-table: Tin tuc, Trang, Binh luan, Tai khoan, Lien he,
   Category, Tag, Logs...) tren mobile: moi dong = 1 the, khong cuon ngang ---- */
@media (max-width: 767px) {
  .table-responsive:has(> table.tx-table) {
    overflow: visible;
  }
  table.tx-table,
  table.tx-table > tbody {
    display: block;
    width: 100% !important;
    border: 0;
  }
  /* Dau bang -> hang nut sap xep + o chon tat ca */
  table.tx-table > thead {
    display: block;
  }
  table.tx-table > thead > tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 0 0 10px;
  }
  table.tx-table > thead > tr > td,
  table.tx-table > thead > tr > th {
    display: none;
    width: auto !important;
    border: 1px solid var(--az-border) !important;
    border-radius: 14px;
    padding: 3px 10px !important;
    font-size: 11px;
    background: var(--az-card);
  }
  table.tx-table > thead > tr > :first-child:has(input[type="checkbox"]),
  table.tx-table > thead > tr > .sort {
    display: block;
  }
  table.tx-table > tbody > tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid var(--az-border);
    border-radius: 10px;
    background: var(--az-card);
  }
  table.tx-table > tbody > tr:has(> td:first-child > input[type="checkbox"]) {
    grid-template-columns: 22px minmax(0, 1fr);
  }
  table.tx-table > tbody > tr > td,
  table.tx-table > tbody > tr > th {
    display: block;
    width: auto !important;
    min-width: 0;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    text-align: left !important;
    word-break: break-word;
  }
  table.tx-table > tbody > tr:has(> td:first-child > input[type="checkbox"]) > td {
    grid-column: 2;
  }
  table.tx-table > tbody > tr:has(> td:first-child > input[type="checkbox"]) > td:first-child {
    grid-column: 1;
    grid-row: 1;
    padding-top: 3px !important;
  }
  table.tx-table > tbody > tr > td.tx-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  table.tx-table > tbody > tr > td select.form-control {
    width: auto;
    max-width: 100%;
    min-width: 120px;
  }
  table.tx-table > tbody > tr.tx-empty {
    display: block;
  }
}

/* Vien focus: bam chuot vao link / nut / tab (logo, breadcrumb, tab form...) khong hien vong trang day cua trinh duyet.
   Dieu huong ban phim (Tab) van thay vong mong mau chu dao de khong mat kha nang truy cap. */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
.btn:focus:not(:focus-visible),
[role="button"]:focus:not(:focus-visible),
[tabindex]:focus:not(:focus-visible) {
  outline: none !important;
}
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
[role="button"]:focus-visible,
[tabindex]:not(input):not(textarea):not(select):focus-visible {
  outline: 2px solid var(--az-primary) !important;
  outline-offset: 2px;
}
#header a:focus-visible,
.breadcrumb a:focus-visible,
.az-form .af-tabs a:focus-visible {
  outline-color: rgba(96, 165, 250, .55) !important;
  border-radius: 6px;
}

/* O logo dung icon cua site (\helper\admin_brand::logo_html) — anh loi thi JS tra ve chu viet tat */
.nb-logo.nb-logo-img {
  background: transparent;
  overflow: hidden;
}
.nb-logo.nb-logo-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
