:root {
  --bs-body-font-size: 0.875rem;          /* chữ nhỏ hơn */
  --bs-body-font-family: 'Roboto', sans-serif;
  --bs-body-font-weight: 300;             /* mỏng */
  --bs-body-line-height: 1.4;
  --bs-heading-font-family: 'Roboto', sans-serif;
  --bs-heading-font-weight: 400;
}
.nxl-container{
  top:79px;
}
.main-content{
  padding: 5px !important;
}
@media (min-width: 1025px) {
  .minimenu .nxl-container{
    margin-left: 120px !important;
  }
}

/* === CHUNG === */
.action-btn-left,
.action-btn-right {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  z-index: 10;
  pointer-events: none;
}

.action-btn-left-h,
.action-btn-right-h {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  z-index: 10;
  pointer-events: none;
}

.action-btn-left button,
.action-btn-right button,
.action-btn-left-h button,
.action-btn-right-h  button{
  width: 100%;
  white-space: nowrap;
}

/* === PHẢI (TRƯỢT TỪ PHẢI) === */
.action-btn-right, .action-btn-right-h {
  right: 0;
  transform: translate(100%, -50%);
  border-radius: 0.75rem 0 0 0.75rem;
}

.action-btn-right.show, .action-btn-right-h.show {
  transform: translate(0%, -50%);
  opacity: 1;
  pointer-events: auto;
}

/* === TRÁI (TRƯỢT TỪ TRÁI) === */
.action-btn-left, .action-btn-left-h {
  left: 0;
  transform: translate(-100%, -50%);
  border-radius: 0 0.75rem 0.75rem 0;
  box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.15);
}

.action-btn-left.show, .action-btn-left-h.show {
  transform: translate(0%, -50%);
  opacity: 1;
  pointer-events: auto;
}


.no-select-temp {
  user-select: none !important;
}
body.modal-open .nxl-container, body.modal-open .nxl-header, body.modal-open .nxl-navigation, body.modal-open .page-header{
    filter: none !important;
}
.card {
    border: 1px solid rgba(0, 0, 0, 0.175);
}

/* Tổng thể span bao nội dung tiêu đề + mũi tên + nút clear */
th > span.sorting,
th > span.sorting_asc,
th > span.sorting_desc {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  text-transform: uppercase;
  color: #2c3e50;
  white-space: nowrap;
  cursor: pointer;
}

/* Nút "×" để clear sort */
th > span .clear-sort {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font-size: 0.8em;
  color: #888;
  cursor: pointer;
  line-height: 1;
  transform: translateY(-1px);
  opacity: 0.6;
  transition: opacity 0.2s;
}

th > span .clear-sort:hover {
  opacity: 1;
  color: #e74c3c;
}

/* Mũi tên sort hiển thị cuối span */
th > span.sorting::after {
  content: "▲▼";
  font-size: 0.7em;
  color: #ccc;
  opacity: 0.4;
}

th > span.sorting_asc::after {
  content: "▲";
  color: #3498db;
  font-size: 0.7em;
  opacity: 0.9;
}

th > span.sorting_desc::after {
  content: "▼";
  color: #3498db;
  font-size: 0.7em;
  opacity: 0.9;
}

.table-responsive .table tr td {
  vertical-align: top !important;
  padding: 5px !important;
  white-space: normal !important;
}

td:last-child {
  position: relative;
  overflow: hidden;
}
.table-responsive .table tr{
  position: relative;
}

/* Base style */
.bottom-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 8px 16px;
  font-size: 14px;
  z-index: 1;
  transition: all 0.3s ease;
}

/* 1. Luôn hiển thị */
.bottom-info-static {
  display: block;
}

/* 2. Hover mới hiển thị */
.bottom-info-hover {
  display: none;
}

/* Khi hover cha td, td phải có position: relative */
td:hover .bottom-info-hover {
  display: block;
}

/* Nội dung bên trong */
.bottom-info .info-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}


@media (min-width: 768px) {
  .bottom-info .info-grid {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.nxl-navigation .navbar-content .nxl-submenu .nxl-link {
    padding: 7px 3px !important;
    margin-left: 0 !important;
    margin-right: 0px !important;
}

.tms-component-link.btn-xs {
  min-width: 24px;
  height: 24px;
  padding: 2px 5px !important;
  font-size: 11px;
  line-height: 1;
}

.tms-component-link.btn-xs .bi {
  font-size: 12px;
}

.tms-inline-edit-field {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  gap: 4px;
  vertical-align: middle;
}

/* Dropdown v-select mở trong 1 dòng list (VD tms-leads/tms-quotes cột follow_status_detail, dùng
   [inline_edit field-name=...]) bị các dòng SAU nó (đứng sau trong DOM, cùng stacking context mặc
   định) vẽ đè lên - v-select ở đây KHÔNG dùng append-to-body nên dropdown vẫn nằm trong flow bình
   thường, cần tự nâng z-index. Cùng pattern/giá trị đã áp dụng thành công cho
   .tms-service-code-inline-edit (xem CSS bên dưới, ô Service code tms-services) - fix Ở MỨC wrapper
   dùng CHUNG này để áp dụng cho MỌI field dùng inline_edit + v-select, không chỉ follow_status_detail.
   .tms-inline-edit-field: wrapper của tms-inline-edit-field.js.php, CHỈ dùng khi shortcode có
   mode="pencil"/edit-mode="pencil". .tms-edit-inline: shortcode KHÔNG khai báo mode (mặc định
   editMode="always", xem shortcode_helper.php:111/178-180) thì KHÔNG qua component đó - trả thẳng
   <component class="tms-edit-inline" /> (fields.js.php:9, root div nhận class qua fallthrough attrs),
   đây chính là trường hợp thực tế của follow_status_detail (tms-leads.php/tms-quotes.php shortcode
   không có mode) - fix lần đầu chỉ target .tms-inline-edit-field nên KHÔNG match được DOM này, phải
   thêm .tms-edit-inline riêng. */
.tms-inline-edit-field:has(.vs--open),
.tms-edit-inline:has(.vs--open) {
  position: relative;
  z-index: 40;
}
.tms-inline-edit-field .vs--open,
.tms-edit-inline .vs--open {
  position: relative;
  z-index: 50;
}
.tms-inline-edit-field .vs__dropdown-menu,
.tms-edit-inline .vs__dropdown-menu {
  z-index: 1080 !important;
}
/* Mỗi dòng list có thể là 1 stacking context riêng -> z-index trong ô không thắng được v-select của
   dòng SAU (VD cột Status tms-itineraries bị dòng dưới đè lên dropdown). Nâng CẢ dòng/ô đang mở. */
.tms-component-table-responsive tr:has(.vs--open),
.tms-component-table-responsive td:has(.vs--open) {
  position: relative;
  z-index: 60;
}

.tms-inline-edit-field__display {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  gap: 4px;
}

.tms-inline-edit-field__value {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tms-inline-edit-field__pencil,
.tms-inline-edit-field__close {
  width: 22px;
  height: 22px;
  min-width: 22px;
  padding: 0 !important;
  line-height: 1;
}

.tms-inline-edit-field__pencil .bi,
.tms-inline-edit-field__close .bi {
  font-size: 12px;
  line-height: 1;
}

.tms-inline-edit-field__loading {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
}

.tms-entity-link-lead,
.tms-entity-text-lead {
  color: #2563eb !important;
}

.tms-entity-link-quote,
.tms-entity-text-quote {
  color: #0f766e !important;
}

.tms-entity-link-booking,
.tms-entity-text-booking {
  color: #16a34a !important;
}

.tms-entity-link-payment-voucher,
.tms-entity-text-payment-voucher {
  color: #7c3aed !important;
}

.tms-component-link.tms-entity-link-lead,
.tms-component-link.tms-entity-link-quote,
.tms-component-link.tms-entity-link-booking,
.tms-component-link.tms-entity-link-payment-voucher {
  background: #ffffff;
}

.tms-payment-voucher-subrow-tools {
  min-width: 0;
}

.tms-payment-voucher-subrow-codes {
  min-width: 0;
}

.tms-payment-voucher-subrow-code {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  max-width: 260px;
  padding: 4px 9px;
  border: 1px solid #dbeafe;
  border-radius: 4px;
  background: #ffffff;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tms-payment-voucher-subrow-code.is-tour {
  color: #1d4ed8;
  background: #eff6ff;
}

.tms-payment-voucher-subrow-code.is-voucher {
  color: #0f172a;
  border-color: #e2e8f0;
  background: #f8fafc;
}

.tms-payment-voucher-cash-flow-compact {
  min-width: 0;
  max-width: min(620px, 100%);
}

.tms-payment-voucher-cash-flow-text {
  display: inline-flex;
  align-items: center;
  max-width: 260px;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #dbeafe;
  border-radius: 4px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tms-payment-voucher-inline-text {
  display: inline-flex;
  align-items: center;
  max-width: 240px;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #dbeafe;
  border-radius: 4px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tms-payment-voucher-cash-flow-text.is-sub {
  color: #334155;
  background: #f8fafc;
  border-color: #e2e8f0;
}

.tms-payment-voucher-inline-edit-btn,
.tms-payment-voucher-cash-flow-edit-btn {
  flex: 0 0 auto;
  color: #64748b;
}

.tms-payment-voucher-inline-edit-btn.active,
.tms-payment-voucher-inline-edit-btn:hover,
.tms-payment-voucher-cash-flow-edit-btn.active,
.tms-payment-voucher-cash-flow-edit-btn:hover {
  color: #1d4ed8;
  border-color: #93c5fd !important;
  background: #eff6ff;
}

.tms-payment-voucher-inline-editor,
.tms-payment-voucher-cash-flow-editor {
  display: block;
  width: min(420px, 48vw);
  min-width: 260px;
}

.tms-payment-voucher-vendor-service {
  min-width: 180px;
}

.tms-payment-voucher-vendor-service-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  width: 100%;
}

.tms-payment-voucher-vendor-service-label {
  padding-top: 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.15;
  text-transform: uppercase;
}

@media (max-width: 767.98px) {
  .tms-payment-voucher-cash-flow-compact {
    width: 100%;
  }

  .tms-payment-voucher-cash-flow-text {
    max-width: 100%;
  }

  .tms-payment-voucher-inline-editor,
  .tms-payment-voucher-cash-flow-editor {
    width: 100%;
    min-width: 0;
  }
}

.tms-staff-signature-editor {
  min-width: 0;
}

.tms-staff-signature-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.tms-staff-signature-selects,
.tms-staff-signature-actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
}

.tms-staff-signature-control {
  min-width: 96px;
}

.tms-staff-signature-control:first-child {
  min-width: 170px;
}

.tms-staff-signature-control .form-label {
  margin-bottom: 3px;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
}

.tms-staff-signature-control .form-select {
  min-height: 31px;
  padding-top: 4px;
  padding-bottom: 4px;
  font-size: 12px;
}

.tms-staff-signature-btn {
  min-height: 31px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.1;
  text-transform: uppercase;
}

.tms-staff-signature-preview-scroll {
  width: 100%;
  max-width: 100%;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
}

.tms-team-table-chip,
.tms-team-table-chip .badge,
.tms-team-table-chip.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 26px;
  padding: 4px 8px !important;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 750;
  line-height: 1.1;
  white-space: nowrap;
}

.tms-team-table-chip .badge {
  min-height: 24px;
}

.tms-team-table-chip-label {
  font-weight: 700;
}

.tms-team-leaders-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 120px;
}

.tms-team-leader-pill {
  display: inline-flex;
  align-items: center;
  max-width: 210px;
  min-height: 26px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #334155;
  background: transparent;
  box-shadow: none;
}

.tms-team-leader-viewer {
  min-width: 0;
  gap: 5px;
  color: #334155;
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 1.2;
  max-width: 100%;
}

.tms-team-leader-viewer .staff-viewer-text {
  min-width: 0;
  max-width: 170px;
  overflow: hidden;
  color: #334155;
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tms-team-no-leader {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 3px 7px;
  border: 1px dashed #dbe4f0;
  border-radius: 7px;
  color: #94a3b8;
  background: #f8fafc;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.tms-corner-notice,
.tms-component-load-notice {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 2147483000;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  max-width: min(320px, calc(100vw - 28px));
  padding: 6px 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  color: #334155;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .14);
  font-size: 12px;
  font-weight: 650;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}

.tms-corner-notice.show,
.tms-component-load-notice.show {
  opacity: 1;
  transform: translateY(0);
}

.tms-corner-notice .spinner-border,
.tms-component-load-notice .spinner-border {
  width: 14px;
  height: 14px;
  border-width: 2px;
  color: #2563eb;
}

/* Icon xoay dùng cho trạng thái loading của các nút Refresh (VD báo cáo trong
   tms-service-management) - chỉ cần thêm class này cạnh icon đang hiển thị khi loading=true. */
@keyframes tms-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.tms-spin {
  display: inline-block;
  animation: tms-spin 0.8s linear infinite;
}

.tms-corner-notice__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.tms-corner-notice__body {
  display: inline-flex;
  flex-direction: column;
  min-width: 0;
}

.tms-corner-notice__title {
  color: #0f172a;
  font-size: 11px;
  line-height: 1.1;
  font-weight: 750;
}

.tms-corner-notice__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tms-corner-notice--success .tms-corner-notice__icon {
  color: #16a34a;
}

.tms-corner-notice--warning .tms-corner-notice__icon {
  color: #f59e0b;
}

.tms-corner-notice--error .tms-corner-notice__icon,
.tms-corner-notice--danger .tms-corner-notice__icon {
  color: #ef4444;
}

.tms-corner-notice--info .tms-corner-notice__icon {
  color: #2563eb;
}
.nxl-header{
  top:0px;
  max-height: 80px;
}
.nxl-header .header-wrapper .nxl-notifications-menu {
  width: 360px !important;
  max-width: 90vw;
}
@media (max-width: 768px) {
  .nxl-header .header-wrapper .nxl-notifications-menu {
    width: 100% !important;
  }
}

@media (max-width: 480px) {
  .nxl-header .header-wrapper .nxl-notifications-menu {
    width: 100% !important;
    max-width: 100vw;
  }
}

/* Base (1920px) */
.small,
.xsmall {
  font-size: 1em !important;       /* ~16px */
  line-height: 1.4 !important;
}

.xxsmall {
  font-size: 0.875em !important;   /* ~14px */
  line-height: 1.3 !important;
}

/* ≥ 2560px (2K trở lên) */
@media (min-width: 2560px) {
  .small,
  .xsmall {
    font-size: 1.125em !important;   /* ~18px */
    line-height: 1.45 !important;
  }

  .xxsmall {
    font-size: 1em !important;       /* ~16px */
    line-height: 1.35 !important;
  }
}

/* ≥ 3840px (4K) */
@media (min-width: 3840px) {
  .small,
  .xsmall {
    font-size: 1.25em !important;    /* ~20px */
    line-height: 1.5 !important;
  }

  .xxsmall {
    font-size: 1.125em !important;   /* ~18px */
    line-height: 1.4 !important;
  }
}

/* < 1920px */
@media (max-width: 1919.98px) {
  .small,
  .xsmall {
    font-size: 0.9375em !important;   /* ~15px */
    line-height: 1.35 !important;
  }

  .xxsmall {
    font-size: 0.8125em !important;   /* ~13px */
    line-height: 1.25 !important;
  }
}

/* < 1600px */
@media (max-width: 1599.98px) {
  .small,
  .xsmall {
    font-size: 0.875em !important;    /* ~14px */
    line-height: 1.3 !important;
  }

  .xxsmall {
    font-size: 0.75em !important;     /* ~12px */
    line-height: 1.2 !important;
  }
}

/* < 1366px */
@media (max-width: 1365.98px) {
  .small,
  .xsmall {
    font-size: 0.8125em !important;   /* ~13px */
    line-height: 1.25 !important;
  }

  .xxsmall {
    font-size: 0.6875em !important;   /* ~11px */
    line-height: 1.15 !important;
  }
}

/* < 1024px */
@media (max-width: 1023.98px) {
  .small,
  .xsmall {
    font-size: 0.75em !important;     /* ~12px */
    line-height: 1.2 !important;
  }

  .xxsmall {
    font-size: 0.625em !important;    /* ~10px */
    line-height: 1.1 !important;
  }
}

/* < 768px */
@media (max-width: 767.98px) {
  .small,
  .xsmall {
    font-size: 0.6875em !important;   /* ~11px */
    line-height: 1.15 !important;
  }

  .xxsmall {
    font-size: 0.5625em !important;   /* ~9px */
    line-height: 1.05 !important;
  }
}

/* < 480px */
@media (max-width: 479.98px) {
  .small,
  .xsmall {
    font-size: 0.625em !important;    /* ~10px */
    line-height: 1.1 !important;
  }

  .xxsmall {
    font-size: 0.5em !important;      /* ~8px */
    line-height: 1 !important;
  }
}

.truncate-1-line .truncate-2-lines, .truncate-3-lines, .truncate-4-lines {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.truncate-1-line { -webkit-line-clamp: 1; }
.truncate-2-lines { -webkit-line-clamp: 2; }
.truncate-3-lines { -webkit-line-clamp: 3; }
.truncate-4-lines { -webkit-line-clamp: 4; }
.badge-tour-code {
  background-color: #198754;
  color: #fff;
  padding: 8px;
}

.tms-booking-tour-code-cell {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  max-width: 100%;
  text-align: left;
}

.tms-booking-tour-code-badge {
  display: inline-flex;
  align-items: center;
  width: auto !important;
  max-width: 100%;
  margin-left: 0 !important;
  padding: 5px 8px;
  border: 0 !important;
  border-radius: 5px !important;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tms-booking-accountant-tabs-wrap {
  margin: 14px -4px 8px;
  padding: 8px 16px 0;
  border-top: 1px solid #dbe3ee;
  border-bottom: 1px solid #dbe3ee;
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.tms-booking-accountant-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 100%;
  padding: 0;
  overflow-x: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  scrollbar-width: thin;
}

.tms-booking-accountant-tabs .nav-item {
  position: relative;
  flex: 0 0 auto;
}

.tms-booking-accountant-tabs .nav-item + .nav-item {
  margin-left: 18px;
  padding-left: 18px;
}

.tms-booking-accountant-tabs .nav-item + .nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 11px;
  width: 1px;
  background: rgba(148, 163, 184, .42);
}

.tms-booking-accountant-tab {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 2px 10px !important;
  border: 0 !important;
  border-bottom: 3px solid transparent !important;
  border-radius: 0 !important;
  color: #475569 !important;
  background: transparent !important;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.tms-booking-accountant-tab:hover {
  color: #0f172a !important;
  background: transparent !important;
  border-bottom-color: #cbd5e1 !important;
}

.tms-booking-accountant-tab.active {
  background: transparent !important;
  box-shadow: none;
}

.tms-booking-accountant-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border-radius: 0;
  color: #64748b;
  background: transparent;
  font-size: 13px;
}

.tms-booking-accountant-tab.active .tms-booking-accountant-tab-icon {
  background: transparent;
}

.tms-booking-accountant-tab-payment {
  color: #991b1b !important;
}

.tms-booking-accountant-tab-payment .tms-booking-accountant-tab-icon {
  color: #dc2626 !important;
}

.tms-booking-accountant-tab-payment.active {
  color: #dc2626 !important;
  border-bottom-color: #dc2626 !important;
}

.tms-booking-accountant-tab-payment .tms-booking-accountant-tab-count,
.tms-booking-accountant-tab-payment.active .tms-booking-accountant-tab-count {
  color: #ffffff;
  background: #dc2626;
}

.tms-booking-accountant-tab-receipt {
  color: #166534 !important;
}

.tms-booking-accountant-tab-receipt .tms-booking-accountant-tab-icon {
  color: #16a34a !important;
}

.tms-booking-accountant-tab-receipt.active {
  color: #16a34a !important;
  border-bottom-color: #16a34a !important;
}

.tms-booking-accountant-tab-receipt .tms-booking-accountant-tab-count,
.tms-booking-accountant-tab-receipt.active .tms-booking-accountant-tab-count {
  color: #ffffff;
  background: #16a34a;
}

.tms-booking-accountant-tab-text {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.tms-booking-accountant-tab-title {
  white-space: nowrap;
}

.tms-booking-accountant-tab-text small {
  color: inherit;
  opacity: .76;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1;
}

.tms-booking-accountant-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  color: #334155;
  background: #e2e8f0;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.tms-booking-subrow-open-card {
  position: relative;
  padding: 2px 2px 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.tms-booking-subrow-open-card:hover,
.tms-booking-subrow-open-card:focus-visible {
  border-color: #bfdbfe;
  background: #f8fbff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
  transform: translateY(-1px);
  outline: none;
}

.tms-booking-subrow-open-card::after {
  content: "";
  position: absolute;
  right: 7px;
  bottom: 5px;
  left: 7px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, .22), transparent);
  opacity: 0;
  transition: opacity .16s ease;
}

.tms-booking-subrow-open-card:hover::after,
.tms-booking-subrow-open-card:focus-visible::after {
  opacity: 1;
}

.tms-booking-subrow-open-hint {
  position: absolute;
  right: 8px;
  bottom: 2px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #2563eb;
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity .16s ease, transform .16s ease;
  pointer-events: none;
}

.tms-booking-subrow-open-card:hover .tms-booking-subrow-open-hint,
.tms-booking-subrow-open-card:focus-visible .tms-booking-subrow-open-hint {
  opacity: .95;
  transform: translateY(0);
}

.tms-booking-subrow-open-hint i {
  font-size: 11px;
}

@media (max-width: 576px) {
  .badge-tour-code {
    font-size: 0.75rem;
    padding: 0.3rem 0.75rem;
    letter-spacing: 0.3px;
  }

  .tms-booking-tour-code-badge {
    padding: 5px 7px;
    font-size: 11.5px;
    letter-spacing: 0;
  }

  .tms-booking-accountant-tabs {
    display: flex;
    width: 100%;
    gap: 10px;
  }

  .tms-booking-accountant-tabs .nav-item {
    flex: 1 1 0;
    min-width: 0;
  }

  .tms-booking-accountant-tabs .nav-item + .nav-item {
    margin-left: 0;
    padding-left: 0;
  }

  .tms-booking-accountant-tabs .nav-item + .nav-item::before {
    display: none;
  }

  .tms-booking-accountant-tab {
    width: 100%;
    justify-content: center;
    padding: 0 4px 8px !important;
    font-size: 13px;
  }

  .tms-booking-subrow-open-card {
    padding-bottom: 18px;
  }

  .tms-booking-subrow-open-hint {
    opacity: .88;
    font-size: 9.5px;
  }
}

.nxl-container .page-header-collapse .accordion-body{
  padding: 10px 30px 20px 30px;
}
.nxl-container .page-header-collapse .accordion-body.tms-filter-panel{
  padding: 0 !important;
}
.tms-filter-collapse {
  background: #f8fafc;
  border-top: 1px solid #e5eaf2;
  border-bottom: 1px solid #e5eaf2;
}
.tms-filter-panel {
  padding: 12px 14px;
  background: #f3f6fa;
}
.tms-filter-card {
  /* Không dùng overflow:hidden ở đây - nó sẽ cắt mất dropdown (v-select, v-select multiple,
     v-select suggestions...) của các field filter khi list gợi ý tràn ra ngoài khung card. */
  width: 100%;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: none;
}
.tms-filter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 8px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 6px 6px 0 0;
}
.tms-filter-panel-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #26364d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.tms-filter-panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #2563eb;
  background: #eef5ff;
  border: 1px solid #dbeafe;
}
.tms-filter-panel-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: #64748b;
}
.tms-filter-history-dropdown {
  width: 460px;
  max-width: calc(100vw - 24px);
}
.tms-filter-history-time {
  font-size: 11px;
  white-space: nowrap;
}
.tms-filter-card-body {
  padding: 12px;
  background: #fff;
  border-radius: 0 0 6px 6px;
}
.nav-tabs .nav-item.show .nav-link, .nav-tabs .nav-link.active{
  font-weight: bold;
  background: powderblue;
}
.scroll-top,
.scroll-bottom {
  overflow-x: auto;
  overflow-y: hidden;
  height: 16px;
}
.scroll-top {
  margin-bottom: 4px;
}
.scroll-bottom {
  margin-top: 4px;
}
.scroll-top::-webkit-scrollbar,
.scroll-bottom::-webkit-scrollbar {
  height: 8px;
}
.shadow-bottom-line {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}
/********** dynamic form field customs *************/
.tms-dynamic-form,
.tms-dynamic-form *,
.tms-dynamic-form *::before,
.tms-dynamic-form *::after {
  box-sizing: border-box;
}

.tms-dynamic-form-column-group,
.tms-dynamic-form-field-col {
  min-width: 0;
}

.tms-dynamic-form .form-control,
.tms-dynamic-form .form-select,
.tms-dynamic-form textarea,
.tms-dynamic-form .v-select,
.tms-dynamic-form .vs__dropdown-toggle {
  max-width: 100%;
  min-width: 0;
}
.tms-filter-form {
  padding: 0;
}
.tms-filter-form .tms-dynamic-form-row,
.tms-filter-form .tms-dynamic-form-section-row {
  --bs-gutter-x: .75rem;
  --bs-gutter-y: .6rem;
}
.tms-filter-form .form-label,
.tms-filter-form label {
  margin-bottom: 4px;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.tms-filter-form .form-control,
.tms-filter-form .form-select,
.tms-filter-form .vs__dropdown-toggle {
  min-height: 34px;
  border-color: #dbe3ef;
  border-radius: 6px;
  background-color: #fff;
  box-shadow: 0 1px 1px rgba(15, 23, 42, .03);
}
.tms-filter-form .vs__selected {
  font-size: 12px;
  font-weight: 700;
}
.tms-filter-form .btn-primary[type="submit"],
.tms-filter-form > .d-flex .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  min-height: 32px;
  margin-left: auto;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.tms-filter-form > .d-flex {
  justify-content: flex-end !important;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid #edf1f7;
}

.tms-detail-field {
  min-width: 0;
}

.tms-detail-field-label {
  margin-bottom: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.tms-detail-field-value {
  min-height: 32px;
  width: 100%;
  padding: 7px 9px;
  border: 1px solid #e4e9f2;
  border-radius: 7px;
  color: #172033;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.tms-detail-field-value.is-empty {
  color: #94a3b8;
  font-weight: 500;
}

.tms-detail-field-value pre {
  white-space: pre-wrap;
  color: inherit;
  font: inherit;
}

.tms-markup-editor {
  background: #fff;
}

.tms-markup-row-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  align-items: stretch;
}

.tms-markup-row-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #fff;
}

.tms-markup-label {
  min-width: 0;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tms-markup-input,
.tms-markup-select {
  width: 92px;
  min-width: 0;
}

.tms-markup-input .form-control,
.tms-markup-input .input-group-text,
.tms-markup-select {
  height: 26px;
  font-size: 12px;
  font-weight: 700;
}

.tms-detail-field-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin: 0 4px 4px 0;
  padding: 3px 7px;
  border-radius: 6px;
  background: #eef2ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  vertical-align: middle;
}

.tms-form-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0 12px;
  padding: 7px 8px 8px;
  border-bottom: 1px solid var(--tms-section-border, #e5edf7);
  color: var(--tms-section-title-color, #172033);
  background: var(--tms-section-header-bg, linear-gradient(90deg, rgba(37, 99, 235, .08) 0, rgba(37, 99, 235, 0) 34%));
}

.tms-form-section-block.tms-section-soft-panel {
  margin: 12px 0 14px;
  padding: 10px 10px 8px;
  border-left: 3px solid var(--tms-section-accent, #2563eb);
  background: var(--tms-section-bg, #f8fbff);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .18);
}

.tms-form-section-block.tms-section-soft-panel > .tms-form-section-header {
  margin-top: 0;
  background: transparent;
}

.tms-form-section-header.tms-form-section-toggleable {
  cursor: pointer;
  user-select: none;
}

.tms-form-section-header.tms-form-section-toggleable:hover {
  border-bottom-color: #c7d9f6;
}

.tms-form-section-title {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  color: var(--tms-section-title-color, #172033);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  padding-top: 2px;
}

.tms-form-section-header-fields {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  margin-left: auto;
}

.tms-form-section-header-fields .form-label {
  display: none;
}

.tms-form-section-header-fields .tms-dynamic-form-field,
.tms-form-section-header-fields .form-group {
  margin-bottom: 0 !important;
}

.tms-form-section-header-fields select,
.tms-form-section-header-fields .form-select,
.tms-form-section-header-fields .v-select {
  min-width: 118px;
}

.tms-form-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: var(--tms-section-icon-color, #1d4ed8);
  background: var(--tms-section-icon-bg, #eef5ff);
  border: 1px solid var(--tms-section-icon-border, #d6e6ff);
}

.tms-form-section-label {
  min-width: 0;
}

.tms-form-section-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  padding: 0 !important;
  border: 1px solid #dbe4f0 !important;
  border-radius: 6px !important;
  color: #475569 !important;
  background: #ffffff !important;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}

.tms-form-section-toggle-btn:hover,
.tms-form-section-toggle-btn:focus {
  color: #1d4ed8 !important;
  border-color: #bfdbfe !important;
  background: #eff6ff !important;
}

.tms-form-section-label h1,
.tms-form-section-label h2,
.tms-form-section-label h3,
.tms-form-section-label h4,
.tms-form-section-label h5,
.tms-form-section-label h6,
.tms-form-section-label p {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
}

.tms-form-tabs.nav-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, .42) transparent;
  -webkit-overflow-scrolling: touch;
}

.tms-form-tabs.nav-tabs .nav-item {
  position: relative;
  flex: 0 0 auto;
  margin: 0;
}

.tms-form-tabs.nav-tabs .nav-item + .nav-item {
  margin-left: 14px;
  padding-left: 14px;
}

.tms-form-tabs.nav-tabs .nav-item + .nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 10px;
  width: 1px;
  background: rgba(148, 163, 184, .42);
}

.tms-form-tab-link.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 0 9px;
  border: 1px solid transparent !important;
  border-radius: 0 !important;
  color: #475569 !important;
  background: transparent !important;
  font-size: 13.5px;
  font-weight: 750;
  line-height: 1.15;
  white-space: nowrap;
  box-shadow: none;
}

.tms-form-tab-link.nav-link:hover {
  color: #1d4ed8 !important;
  background: transparent !important;
  border-color: transparent !important;
}

.tms-form-tab-link.nav-link.active {
  color: #0f3d91 !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none;
}

.tms-form-tab-link.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 0;
  background: #2563eb;
}

.tms-form-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  border-radius: 0;
  color: #64748b;
  background: transparent;
  font-size: 13px;
  line-height: 1;
}

.tms-form-tab-link.nav-link.active .tms-form-tab-icon {
  color: #2563eb;
  background: transparent;
}

.tms-form-tab-title {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tms-form-subtabs.nav-tabs {
  gap: 14px;
  padding: 0;
  background: transparent;
}

.tms-form-subtabs .tms-form-tab-link.nav-link {
  min-height: 31px;
  padding: 0 0 7px;
  color: #64748b !important;
  font-size: 12.5px;
  font-weight: 700;
}

.tms-form-subtabs .tms-form-tab-link.nav-link.active {
  color: #1d4ed8 !important;
  background: transparent !important;
}

.tms-form-subtabs .tms-form-tab-icon {
  width: auto;
  height: auto;
  border-radius: 0;
  font-size: 12px;
}

.tms-form-mobile-tabs {
  display: flex;
  align-items: stretch;
  gap: 7px;
  width: 100%;
  padding: 0 0 7px;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0;
  background: transparent;
}

.tms-form-mobile-tab-active {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  height: 36px;
  padding: 0 11px;
  border: 0;
  border-radius: 0;
  color: #0f3d91;
  background: transparent;
  font-size: 13.5px;
  font-weight: 800;
  box-shadow: inset 0 -2px 0 #2563eb;
}

.tms-form-mobile-subtabs .tms-form-mobile-tab-active {
  color: #475569;
  background: #f8fafc;
  border-color: #dbe3ee;
  font-weight: 650;
}

.tms-form-mobile-tab-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #334155;
  background: transparent;
  box-shadow: none;
}

.tms-form-mobile-tab-menu-btn i {
  color: #334155;
  font-size: 16px;
  line-height: 1;
}

.tms-form-mobile-tab-menu-btn:hover,
.tms-form-mobile-tab-menu-btn:focus,
.tms-form-mobile-tab-menu-btn.show,
.tms-form-mobile-tab-menu-btn[aria-expanded="true"] {
  color: #1d4ed8;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.tms-form-mobile-tab-menu-btn:hover i,
.tms-form-mobile-tab-menu-btn:focus i,
.tms-form-mobile-tab-menu-btn.show i,
.tms-form-mobile-tab-menu-btn[aria-expanded="true"] i {
  color: #1d4ed8;
}

.tms-form-mobile-tab-menu {
  min-width: min(280px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: 55vh;
  overflow: auto;
  padding: 6px;
  border-color: #dbe3ee;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .16);
}

.tms-form-mobile-tab-menu-item {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.tms-form-mobile-tab-menu-item.active,
.tms-form-mobile-tab-menu-item:active {
  color: #0f3d91;
  background: #eaf3ff;
}

.tms-add-edit-modal-header {
  display: flex;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
  gap: 10px;
}

/* Cột trái header (component.js.php): hàng icon (menu Admin, mở tab mới, icon action) ở trên, tiêu đề
   "Edit/Add/Detail + entity" ngay dưới hàng icon. */
.tms-add-edit-modal-lead {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.tms-add-edit-modal-lead-icons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header.tms-header-grid:has(.tms-add-edit-modal-header) {
  background: #f6f8fb;
  border-bottom-color: #dbe3ee;
}

.modal-content:has(.tms-add-edit-modal-header) > .modal-footer {
  background: #f6f8fb;
  border-top-color: #dbe3ee;
}

.tms-add-edit-modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: #1d4ed8;
  background: #eef5ff;
  border: 1px solid #d5e7ff;
  font-size: 15px;
}

.tms-add-edit-modal-icon.is-add {
  color: #079455;
  background: #edfff7;
  border-color: #b9f2d4;
}

.tms-add-edit-modal-icon.is-detail {
  color: #475569;
  background: #f8fafc;
  border-color: #dbe3ee;
}

/* Icon-link (mở record ở tab mới) - cùng ngôn ngữ hình khối với .tms-add-edit-modal-icon (bo góc,
   nền nhạt, viền mảnh) nhưng nhỏ hơn 1 chút và trung tính (xám), để rõ đây là action PHỤ, không
   phải badge trạng thái chính. Chuyển màu xanh giống badge khi hover để gợi ý có thể bấm. */
.tms-add-edit-modal-open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.tms-add-edit-modal-open-link:hover {
  color: #1d4ed8;
  background: #eef5ff;
  border-color: #d5e7ff;
}

.tms-add-edit-modal-open-link .bi {
  font-size: 15px;
}

/* "Service Operator Documents" (tab Operator Documents / booking, tms-bookings-pre.php) - list
   custom group theo service, chỉ dùng <tms-operator-documents> để fetch (ẩn list mặc định). */
.tms-operator-document-service-group {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  margin-bottom: 10px;
  overflow: hidden;
}

.tms-operator-document-service-group__header {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #f4f6f9;
  padding: 6px 10px;
}

.tms-operator-document-service-group__type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.tms-operator-document-service-group__vendor {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tms-operator-document-service-group__destination {
  flex: 0 1 auto;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tms-operator-document-service-group__add-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.tms-operator-document-service-group__table td {
  vertical-align: middle;
}

/* Nút edit/delete mỗi dòng document - chỉ hiện khi hover vào dòng đó */
.tms-operator-document-service-group__row-actions {
  opacity: 0;
  transition: opacity .15s ease;
}

.tms-operator-document-service-group__row:hover .tms-operator-document-service-group__row-actions {
  opacity: 1;
}

/* Khối con bên trong 1 group (Service Items / Operator Documents) - tách rõ bằng đường kẻ mờ +
   padding riêng, thay vì để 2 bảng dính liền nhau như trước. */
.tms-operator-document-service-group__section {
  padding: 8px 10px;
}

.tms-operator-document-service-group__section + .tms-operator-document-service-group__section {
  border-top: 1px solid #eef0f3;
}

.tms-operator-document-service-group__section--items {
  background-color: #fbfcfd;
}

.tms-operator-document-service-group__subheader {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #6c7787;
  margin-bottom: 4px;
}

.tms-operator-document-service-group__item-title {
  font-weight: 600;
  color: #344054;
}

.tms-operator-document-service-group__items-table td {
  vertical-align: top;
  padding-top: 6px;
  padding-bottom: 6px;
}

.tms-operator-document-service-group__type-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.tms-operator-document-service-group__type-badge .bi {
  font-size: 9px;
}

/* "Add All Needed Documents" (tms-bookings-pre.php, doAddAllNeededOperatorDocsRunning()) tạo
   document qua handleAddAction() thật nên <tms-modal> tự show() ra màn hình mỗi lần tạo 1 document
   - modal dùng <teleport to="body"> nên style="display:none" trên <tms-operator-documents> gốc
   không ẩn được nó. Class body.tms-op-docs-bulk-running được gắn/gỡ suốt quá trình chạy để ẩn modal
   khỏi mắt người dùng - dùng opacity/pointer-events (KHÔNG display:none) để GIỮ NGUYÊN layout/kích
   thước thật, cần cho content_html capture chính xác (getComputedStyle, xem vue_modify_row_submit,
   tms-operator-documents.php). */
body.tms-op-docs-bulk-running .tms-modal-tms-operator-documents {
  opacity: 0 !important;
  pointer-events: none !important;
}

.tms-add-edit-modal-title-wrap {
  min-width: 0;
  flex: 0 0 auto;
}

.tms-add-edit-modal-title {
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  text-transform: uppercase;
}

.tms-add-edit-modal-subtitle {
  margin-top: 3px;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: .03em;
  white-space: nowrap;
}

.tms-add-edit-modal-record {
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  min-width: 0;
  max-width: min(52vw, 620px);
  margin-left: 8px;
  padding-left: 14px;
  border-left: 1px solid #e2e8f0;
  color: #000000;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
}

.tms-add-edit-modal-record > * {
  min-width: 0;
  max-width: 100%;
}

/* .tms-header-2line - header 2 dòng dùng chung (vue_item_display của tms-service-items, tms-services; dùng cho
   mọi component muốn header modal / chip "đang chọn" giàu thông tin). Cùng 1 bộ markup/class, 2 mức chi tiết:
   - MẶC ĐỊNH (chip "đang chọn" của magic select): 1 dòng = mã + tiêu đề (cắt "...") + số tiền chính.
   - Trong header modal Edit/Detail (.tms-add-edit-modal-record): 2 dòng theo góc nhìn Operator -
     dòng 1 mã + tiêu đề + badge status, dòng 2 chip ngữ cảnh (booking, loại, vendor, destination, lịch...);
     cột phải là số tiền chính + các dòng phụ (__sub: Sale/chênh lệch, Paid/Balance).
   Phần tử: __main > __head (__code __title __more __status) + __meta (__chip[.is-*] __badge); __money > __line
   (__caption __amount) / __sub; __side (cột phải, chỉ header: lưới caption | __badges[__badge]). Chỉ __code/__title/__more/__money/__amount hiện ở chế độ gọn. */
.tms-header-2line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  vertical-align: middle;
  text-transform: none;
}

.tms-header-2line__main {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}

.tms-header-2line__head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.tms-header-2line__code {
  flex: 0 0 auto;
  padding: 1px 6px;
  border: 1px solid #c7d2fe;
  border-radius: 4px;
  background: #eef2ff;
  color: #3730a3;
  font-size: .75em;
  font-weight: 600;
  letter-spacing: .2px;
  white-space: nowrap;
}

.tms-header-2line__title {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tms-header-2line__money {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: 0 0 auto;
  white-space: nowrap;
}

.tms-header-2line__line {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}

.tms-header-2line__amount {
  color: #0f766e;
  font-size: .9em;
  font-weight: 700;
}

/* Chỉ hiện ở header modal */
.tms-header-2line .tms-header-2line__status,
.tms-header-2line .tms-header-2line__meta,
.tms-header-2line .tms-header-2line__caption,
.tms-header-2line .tms-header-2line__sub,
.tms-header-2line .tms-header-2line__side {
  display: none;
}

/* "+N" cạnh tiêu đề (tms-services: service_title gồm nhiều dòng = nhiều service item) */
.tms-header-2line__more {
  flex: 0 0 auto;
  padding: 0 6px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: .7em;
  font-weight: 700;
}

.tms-add-edit-modal-record:has(> .tms-header-2line) {
  flex: 1 1 auto;
  max-width: none;
  padding-right: 12px;
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
}

.tms-add-edit-modal-record > .tms-header-2line {
  display: flex;
  flex: 1 1 auto;
  gap: 18px;
}

.tms-add-edit-modal-record .tms-header-2line__title {
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
}

.tms-add-edit-modal-record .tms-header-2line .tms-header-2line__status {
  display: inline-flex;
  margin-left: auto;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  font-size: 10.5px;
  font-weight: 500;
}

.tms-add-edit-modal-record .tms-header-2line .tms-header-2line__status + .tms-header-2line__status {
  margin-left: 0;
}

.tms-add-edit-modal-record .tms-header-2line .tms-header-2line__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-top: 4px;
}

.tms-add-edit-modal-record .tms-header-2line__badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 500;
}

.tms-add-edit-modal-record .tms-header-2line .tms-header-2line__sub {
  display: inline-flex;
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
}

/* Cột phải: lưới 2 cột (caption căn phải | badge căn trái) -> mọi trạng thái thẳng hàng cả mép lẫn dòng,
   mỗi __line chỉ là bó 2 ô của 1 hàng (display: contents). */
.tms-add-edit-modal-record .tms-header-2line .tms-header-2line__side {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 8px;
  row-gap: 4px;
}

.tms-add-edit-modal-record .tms-header-2line__side .tms-header-2line__line {
  display: contents;
}

/* Modifier --no-modal-money: ẩn khối tiền (__money: OPT/Sale) ở header modal Edit/Detail - số tiền đã hiện ngay
   trong form bên dưới. Ngoài header modal (chip "đang chọn" của magic select) khối tiền vẫn hiện bình thường. */
.tms-add-edit-modal-record .tms-header-2line--no-modal-money .tms-header-2line__money {
  display: none;
}

.tms-add-edit-modal-record .tms-header-2line__side .tms-header-2line__caption {
  justify-self: end;
}

.tms-add-edit-modal-record .tms-header-2line__badges {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  justify-self: start;
}

.tms-add-edit-modal-record .tms-header-2line .tms-header-2line__caption {
  display: inline;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.tms-add-edit-modal-record .tms-header-2line__amount {
  font-size: 16px;
}

.tms-header-2line .is-gain {
  color: #15803d;
  font-weight: 600;
}

.tms-header-2line .is-loss {
  color: #dc2626;
  font-weight: 600;
}

.tms-header-2line__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 240px;
  padding: 1px 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tms-header-2line__chip > i {
  flex: 0 0 auto;
  font-size: 10.5px;
}

/* Cùng bảng màu với chip ở section "Parents" của form (.tms-service-item-parents__*) */
.tms-header-2line__chip.is-booking {
  border-color: #bbf7d0;
  background: #dcfce7;
  color: #047857;
}

.tms-header-2line__chip.is-type {
  border-color: #99f6e4;
  background: #ccfbf1;
  color: #0f766e;
}

.tms-header-2line__chip.is-vendor {
  border-color: #c7ead7;
  background: #dff4e8;
  color: #047857;
}

.tms-header-2line__chip.is-ok {
  border-color: #c7ead7;
  background: #dff4e8;
  color: #047857;
}

.tms-header-2line__chip.is-warn {
  border-color: #fde68a;
  background: #fef3c7;
  color: #b45309;
}

.tms-header-2line__chip.is-missing {
  border-color: #fecaca;
  background: #fee2e2;
  color: #dc2626;
}

.tms-header-2line__chip.is-destination {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
}

.tms-header-2line__chip.is-day {
  border-color: #c7d9fb;
  background: #e0ecff;
  color: #1d4ed8;
  font-weight: 600;
}


.tms-add-edit-modal-close {
  margin-left: auto;
}

/* Nút Refresh nằm TRONG header còn nút Close do <tms-modal> vẽ ở ô grid riêng (.tms-header-right, mặc định căn giữa
   theo chiều cao cả hàng). Cả 2 neo ở ĐẦU header với cùng chiều cao 34px (= hàng icon bên trái) và nội dung căn giữa
   trong 34px đó -> Refresh và Close luôn thẳng hàng với hàng icon dù header cao 1 hay 2 tầng. */
.tms-add-edit-modal-actions,
.modal-header.tms-header-grid:has(.tms-add-edit-modal-header) .tms-header-right {
  align-self: flex-start;
  min-height: 34px;
}

.tms-service-content-html-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tms-service-content-html-title {
  color: #0f172a;
  font-weight: 700;
}

.tms-service-content-html-item {
  color: #0f172a;
  font-weight: 700;
}

.tms-service-content-html-note {
  color: #64748b;
  font-size: .9em;
  font-style: italic;
  font-weight: 400;
}

.tms-service-content-html-separator {
  height: 10px;
}

.tms-service-content-html-separator.is-custom {
  height: auto;
  margin: 8px 0;
  color: #94a3b8;
  font-size: .85em;
  text-align: center;
}

.tms-service-booking-context {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 28px;
  margin: 0 0 8px;
  color: #64748b;
  font-size: 12px;
}

.tms-service-booking-context__caption {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
}

.tms-service-booking-context__link {
  color: #166534 !important;
  font-weight: 700;
}

.tms-service-booking-context__link:hover {
  color: #15803d !important;
}

.tms-service-items-inline-table-wrap {
  border: 1px solid #dee2e6;
  border-radius: 6px;
}

.tms-service-items-inline-table {
  font-size: 12px;
  margin-bottom: 0;
}

.tms-service-items-inline-table th {
  font-size: 11px;
  text-transform: uppercase;
  color: #64748b;
  white-space: nowrap;
}

.tms-service-items-inline-table td {
  vertical-align: middle;
}

.tms-service-item-inline-content {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 767.98px) {
  .tms-dynamic-form .tms-dynamic-form-row,
  .tms-dynamic-form .tms-dynamic-form-section-row {
    --bs-gutter-x: .5rem;
  }

  .tms-dynamic-form .tms-dynamic-form-column-group,
  .tms-dynamic-form .tms-dynamic-form-field-col {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .tms-dynamic-form .tms-dynamic-form-section-row.tms-mobile-columns-2 > .tms-dynamic-form-field-col:not(.tms-mobile-col-12) {
    flex: 0 0 50% !important;
    width: 50% !important;
    max-width: 50% !important;
  }

  .tms-dynamic-form .input-group,
  .tms-dynamic-form .d-flex {
    min-width: 0;
  }

  .tms-dynamic-form .vs__dropdown-menu {
    width: 100% !important;
    min-width: 100% !important;
    max-width: calc(100vw - 32px);
  }

  .tms-form-section-header {
    margin: 14px 0 8px;
    padding-bottom: 7px;
  }

  .tms-form-section-title {
    gap: 6px;
    font-size: 13px;
  }

  .tms-form-section-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
  }

  .tms-markup-editor .card-body {
    padding: 8px !important;
  }

  .tms-markup-row-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .tms-markup-row-item {
    grid-template-columns: 1fr;
    gap: 5px;
    min-height: 58px;
    padding: 7px;
    align-content: start;
  }

  .tms-markup-label {
    font-size: 11px;
    line-height: 1.15;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .tms-markup-input,
  .tms-markup-select {
    width: 100%;
  }

  .tms-markup-input .form-control,
  .tms-markup-input .input-group-text,
  .tms-markup-select {
    height: 28px;
    font-size: 12px;
  }

  .tms-staff-signature-toolbar {
    display: block;
    margin-bottom: 8px;
  }

  .tms-staff-signature-selects {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px 72px;
    align-items: end;
    gap: 6px;
    width: 100%;
  }

  .tms-staff-signature-control,
  .tms-staff-signature-control:first-child {
    min-width: 0;
  }

  .tms-staff-signature-control .form-label {
    font-size: 10px;
  }

  .tms-staff-signature-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    margin-top: 7px;
  }

  .tms-staff-signature-btn {
    width: 100%;
    min-height: 30px;
    padding: 5px 6px;
    font-size: 10px;
  }

  .tms-staff-signature-preview-scroll {
    max-height: 58vh;
    overflow: auto;
    padding: 0 !important;
    -webkit-overflow-scrolling: touch;
  }

  .tms-team-table-chip,
  .tms-team-table-chip .badge,
  .tms-team-table-chip.badge {
    min-height: 28px;
    padding: 5px 8px !important;
    font-size: 12px;
  }

  .tms-team-table-chip-label {
    display: inline;
  }

  .tms-add-edit-modal-header {
    gap: 8px;
    flex-wrap: wrap;
  }

  .tms-add-edit-modal-icon,
  .tms-add-edit-modal-open-link {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  .tms-add-edit-modal-title {
    font-size: 14px;
  }

  .tms-add-edit-modal-subtitle {
    font-size: 10px;
  }

  /* Keep the close/refresh buttons on row 1 (next to the title) and push the
     record code down to its own full-width row 2, instead of squeezing both
     onto one line. */
  .tms-add-edit-modal-actions {
    order: 2;
  }

  .tms-add-edit-modal-record {
    order: 3;
    flex: 1 1 100%;
    max-width: 100%;
    margin-left: 0;
    margin-top: 6px;
    padding-left: 0;
    padding-top: 6px;
    border-left: none;
    border-top: 1px solid #e2e8f0;
    font-size: 13px;
    overflow: hidden;
  }
}

.dynamic-form-field-sm{
  width: 100%;
}
.dynamic-form-field-sm input.form-control,
.dynamic-form-field-sm select.form-select,
.dynamic-form-field-sm textarea.form-control,
.dynamic-form-field-sm .form-check-input,
.dynamic-form-field-sm .form-range {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem; /* tương đương 14px */
  line-height: 1.25;
  border-radius: 0.2rem;
}

.dynamic-form-field-sm select.form-select {
  /*padding-right: 2.25rem;*/
  /*padding:8px;*/
}

/*.dynamic-form-field-sm .form-check-input {
  width: 1rem;
  height: 1rem;
  margin-top: 0.3em;
}*/

/*.dynamic-form-field-sm .form-control-color {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.1rem;
}*/

.dynamic-form-field-sm input[type="range"] {
  height: 1rem;
}

.dynamic-form-field-sm label.form-label {
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}
.tms-toggle-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.tms-toggle-title-row--stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
/* Filter form trong dropdown magic-select bị canh giữa (do ancestor có align-items:center) ->
   ép full-width + đẩy nút "Apply Filters"/"Add" về sát trái thay vì bị co lại nằm giữa. */
.tms-magic-select-filter-form {
  width: 100%;
}
.tms-magic-select-filter-form > .d-flex.justify-content-between {
  width: 100%;
  justify-content: flex-start !important;
  gap: 12px;
}
.tms-toggle-title-row .form-label {
  min-width: 0;
  margin-bottom: 0;
}
.tms-toggle-title-switch {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  min-height: 20px;
  margin: 0;
  padding-left: 0;
}
.tms-toggle-title-switch .form-check-input {
  float: none;
  margin: 0;
  cursor: pointer;
}
.tms-toggle-title-switch .form-check-label {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1;
}
.dynamic-form-field-sm .vs__dropdown-toggle {
  padding: 1px;
  font-size: 0.875rem;
  min-height: auto;
}
.dynamic-form-field-sm .vs__search{
  font-size: 12px;
  line-height: 20px;
}
.dynamic-form-field-sm .vs__dropdown-menu{
  font-size: 12px;
  width: 100%;
  min-width: 100%;
}
.dynamic-form-field-sm .vs__selected{
  font-size: 12px;
  margin:0px;
  width: auto;
  max-width: 100%;
}
.vs__dropdown-toggle {
  border-color: #e5e7eb;
}
.vs__dropdown-menu {
  width: max-content;
  min-width: 100%;
  max-width: min(90vw, 420px);
}
.vs__dropdown-menu li {
  white-space: normal;
  word-break: break-word;
}
/* tms-tooltip có chứa <v-select>: .tooltip-box__content (overflow:auto) cắt mất .vs__dropdown-menu (position:absolute,
   cao tới 350px) nên mở dropdown ra thấy trống. Gắn class này vào <tms-tooltip class="tms-tooltip-allow-overflow"> để
   menu tràn ra ngoài khung tooltip như dropdown thường (đổi lại nội dung tooltip không tự cuộn nữa - chỉ dùng cho
   tooltip ngắn). */
.tooltip-box.tms-tooltip-allow-overflow .tooltip-box__content {
  overflow: visible;
  max-height: none;
}
.vs__selected {
  /*display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;*/
  display: flex;
  flex-direction: row;
  gap:3px;
  /*padding: 3px;*/
}
.v-select:not(.vs--open) .vs__search{
  width: 1px;
  opacity: 0;
}
.dropdown-magic-select-list table td{
  font-size: 12px;
}
.tms-magic-select-list .tms-magic-select-row-actions {
  opacity: 0;
  transition: opacity .15s ease-in-out;
}
.tms-magic-select-list li:hover .tms-magic-select-row-actions {
  opacity: 1;
}
.tms-list-layout-rows {
  padding: 2px;
}
/* Row actions của list_layout="list" giờ dùng chung .action-btn-left/-h + .show (xem đầu file) - overlay
   trượt từ trái khi hover, giống hệt chế độ table, thay vì kiểu cũ đẩy nội dung nhường chỗ. */

/* Ẩn cột số thứ tự (STT) của list_row (component_list_layout.js.php, chế độ list_layout="list") trên
   mobile - đỡ tốn chỗ hàng ngang, STT không phải thông tin quan trọng bằng nội dung chính của row. */
@media (max-width: 767.98px) {
  .tms-list-row-index-col {
    display: none;
  }
}

/* magic_select dùng list_row - 3 cột (STT / nội dung list_row / nút chọn), xem component.js.php */
.tms-magic-select-list-row-item {
  padding: 4px;
  border-bottom: 1px solid #eef0f3;
  transition: background-color .1s ease-in-out;
}
.tms-magic-select-list-row-item:last-child {
  border-bottom: none;
}
.tms-magic-select-list-row-item:hover {
  background-color: #f8f9fa;
}
.tms-magic-select-list-row-item.active {
  background-color: #eef5ff;
}
.tms-magic-select-list-row-index {
  width: 32px;
}
.tms-magic-select-list-row-select {
  width: 28px;
  font-size: 18px;
}
.btn.btn-sm i, button.btn-sm i{
  font-size:16px;
}

.process-tabs-wrapper {
  font-size: 14px;
}

.process-tabs-wrapper .process-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #dee2e6;
  flex-wrap: wrap;
}

.process-tabs-wrapper .process-tab {
  display: flex;
  align-items: center;
  padding: 6px 10px 6px 12px;
  font-size: 14px;
  font-weight: 500;
  background: #f1f1f1;
  border: 1px solid #dee2e6;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
}

.process-tabs-wrapper .process-tab:hover {
  background: #e9ecef;
}

.process-tabs-wrapper .process-tab.active {
  background: #ffffff;
  border-bottom: 1px solid #ffffff;
  font-weight: 600;
}

.process-tabs-wrapper .close-btn {
  margin-left: 8px;
  font-size: 14px;
  color: #888;
  cursor: pointer;
  transition: color 0.2s;
}

.process-tabs-wrapper .close-btn:hover {
  color: #dc3545;
}

.process-tabs-wrapper .process-tab-content {
  border: 1px solid #dee2e6;
  border-radius: 0 0 4px 4px;
  padding: 16px;
  background: #ffffff;
  min-height: 150px;
}

.process-tabs-wrapper .tab-pane {
  display: none;
}

.process-tabs-wrapper .tab-pane.show.active {
  display: block;
}
.amount-currency-wrap {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.amount-currency-wrap .amount-input {
  flex: 1;
  min-width: 0;
}

.amount-currency-wrap .currency-select {
  width: 100px;
  flex-shrink: 0;
}

.amount-unit-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(104px, 128px);
  gap: 0.5rem;
  align-items: start;
  width: 100%;
  min-width: 0;
}

.amount-unit-wrap .amount-input {
  width: 100% !important;
  min-width: 0;
}

.amount-unit-wrap .unit-select {
  width: 100% !important;
  min-width: 0;
}

.amount-unit-wrap .v-select {
  width: 100%;
  min-width: 0;
}

.amount-unit-wrap .v-select .vs__dropdown-toggle {
  min-height: 32px;
}

.amount-unit-wrap .v-select .vs__dropdown-menu {
  left: 0;
  right: auto;
  min-width: 100%;
  width: 100%;
  max-height: 240px;
}

/*:root {
    --brand-dark: #212529; 
    --border-color: #dee2e6;
    --black: #000;
    --gray-600: #6c757d;
    --dark: #343a40;
    --hover-color: #f0f0f5; 
    --active-color: #e2e6ea;
    --white: #ffffff;
    --primary: #0d6efd;

    --font-10: 0.75rem;
    --font-11: 0.6875rem;
    --font-12: 0.8125rem;
    --font-700: 700;
    --font-uppercase: uppercase;
}
*/
.table-responsive-extra .table {
    color: var(--brand-dark);
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-color: var(--border-color);
    vertical-align: middle;
}
.table-responsive-extra .table:not(caption) > * {
    /* Đảm bảo border chung của bảng không ảnh hưởng đến border từng hàng */
    border-color: transparent !important;
}
.table-responsive-extra .table thead th {
    border-bottom: 1px solid var(--border-color);
}
.table-responsive-extra .table thead th,
.table-responsive-extra .table tfoot th {
    padding: 8px 15px;
    color: var(--brand-dark);
    font-size: var(--font-10);
    font-weight: var(--font-700);
    text-transform: var(--font-uppercase);
}
.table-responsive-extra .table thead th:first-child,
.table-responsive-extra .table tfoot th:first-child {
    padding-left: 30px;
}
.table-responsive-extra .table thead th:last-child,
.table-responsive-extra .table tfoot th:last-child {
    padding-right: 30px;
}
/* Loại bỏ border dưới cho dòng cuối cùng của bảng */
/*.table-responsive-extra .table tbody tr:last-of-type * {
    border-bottom: transparent !important;
}*/
.table-responsive-extra .table > tr > td {
    padding: 15px 15px;
    white-space: nowrap;
    vertical-align: middle;
    /* Mặc định không có border-top và border-bottom cho td */
    border-top: transparent !important;
    border-bottom: transparent !important;
}
.table-responsive-extra .table > tr > td:first-child {
    padding-left: 30px;
}
.table-responsive-extra .table > tr > td:last-child {
    padding-right: 30px;
}
.table-responsive-extra .table.table-dark {
    border-color: var(--black) !important;
}
.table-responsive-extra .table.table-dark tr,
.table-responsive-extra .table.table-dark td,
.table-responsive-extra .table.table-dark th {
    color: var(--gray-600);
    border-color: var(--dark);
}
/* Vô hiệu hóa hiệu ứng hover mặc định của Bootstrap */
.table-responsive-extra .table.table-striped > tbody > tr:nth-of-type(odd) > *,
.table-responsive-extra .table.table-hover > tbody > tr:hover > * {
    --bs-table-accent-bg: transparent; /* Đặt lại thành trong suốt để JS/CSS tùy chỉnh kiểm soát */
    background-color: transparent !important; /* Ghi đè bất kỳ màu nền nào */
}

/* --- Custom styles for rows with/without sub-row (và hover/active đồng bộ) --- */
.table-responsive-extra .table tbody {
    border-top: none; /* Loại bỏ border-top mặc định của tbody */
}

/* Quy tắc cho trạng thái ACTIVE (ưu tiên cao hơn hover) */
.table-responsive-extra .table tbody .main-row.table-active,
.table-responsive-extra .table tbody .sub-row.table-active,
.table-responsive-extra .table tbody .no-sub-row.table-active {
    background-color: var(--active-color) !important; /* Màu active, dùng !important để ưu tiên */
    box-shadow: none;
    transition: all 0.3s ease;
}
.table-responsive-extra .table tbody .main-row.table-active > *,
.table-responsive-extra .table tbody .sub-row.table-active > *,
.table-responsive-extra .table tbody .no-sub-row.table-active > * {
    background-color: var(--active-color) !important; /* Màu nền cho từng ô con */
}

/* Loại bỏ hiệu ứng hover nếu dòng đang active (thêm vào đây) */
.table-responsive-extra .table tbody .main-row.table-active.hovered,
.table-responsive-extra .table tbody .sub-row.table-active.hovered,
.table-responsive-extra .table tbody .no-sub-row.table-active.hovered {
    background-color: var(--active-color) !important; /* Giữ nguyên màu active khi hover */
}
.table-responsive-extra .table tbody .main-row.table-active.hovered > *,
.table-responsive-extra .table tbody .sub-row.table-active.hovered > *,
.table-responsive-extra .table tbody .no-sub-row.table-active.hovered > * {
    background-color: var(--active-color) !important; /* Giữ nguyên màu active khi hover */
}


/* Quy tắc cho trạng thái HOVER (chỉ khi không active) */
.table-responsive-extra .table tbody .main-row.hovered:not(.table-active),
.table-responsive-extra .table tbody .sub-row.hovered:not(.table-active),
.table-responsive-extra .table tbody .no-sub-row.hovered:not(.table-active) {
    background-color: var(--hover-color); /* Sử dụng biến màu hover thống nhất */
    box-shadow: none;
    transition: all 0.3s ease;
}
/* Đảm bảo các ô con cũng nhận màu nền hover */
.table-responsive-extra .table tbody .main-row.hovered:not(.table-active) > *,
.table-responsive-extra .table tbody .sub-row.hovered:not(.table-active) > *,
.table-responsive-extra .table tbody .no-sub-row.hovered:not(.table-active) > * {
    background-color: var(--hover-color); /* Sử dụng biến màu hover thống nhất */
}

/* === BORDER LOGIC MỚI === */

/* Tất cả main-row đều có border-top */
.table-responsive-extra .table tbody .main-row td {
    border-top: 1px solid var(--border-color) !important;
}
/* Loại bỏ border-top của main-row đầu tiên trong tbody */
.table-responsive-extra .table tbody .main-row:first-of-type td {
     border-top: transparent !important;
}

/* sub-row liền mạch với main-row, có padding dưới và border-bottom để phân tách nhóm */
.table-responsive-extra .table tbody .sub-row > td {
    padding-top: 0 !important; /* Đảm bảo không có khoảng trống giữa main và sub */
    padding-bottom: 15px !important; /* Khoảng cách cuối nhóm */
    /*border-bottom: 3px solid var(--border-color) !important;*/
}

/* Dòng không có dòng phụ: có border-top và border-bottom */
.table-responsive-extra .table tbody .no-sub-row td {
    border-top: 1px solid var(--border-color) !important;
    /*border-bottom: 1px solid var(--border-color) !important;*/
    padding-bottom: 15px !important;
}
/* Loại bỏ border-top của no-sub-row đầu tiên trong tbody */
.table-responsive-extra .table tbody .no-sub-row:first-of-type td {
    border-top: transparent !important;
}
/* Dòng cuối cùng của tbody sẽ không có border-bottom (quy tắc chung) */
.table-responsive-extra > .table > tbody > tr:last-of-type > td {
    border-bottom: transparent !important;
}

.border-bottom-1{
  border-bottom: 1px solid var(--border-color) !important;
}

.border-bottom-2{
  border-bottom: 2px solid var(--border-color) !important;
}

.border-bottom-3{
  border-bottom: 3px solid var(--border-color) !important;
}

.table-responsive-extra .table tbody .sub-row .sub-row-content {
    padding: 5px 15px;
    background-color: transparent;
    font-size: 0.875rem;
    color: var(--gray-600);
}
/* --- End Custom styles for sub-row --- */

/* Generic selected row styling */
.table-responsive-extra tbody > tr.selected > * { /* Có thể thay thế bằng .table-active nếu muốn */
    color: var(--dark);
    box-shadow: inset 0 0 0 #eeeef5;
}
.table-responsive-extra tbody > tr.selected > * a {
    color: var(--dark);
}

/* Generic styles for filter/length controls */
.table-responsive-extra .table-filter input,
.table-responsive-extra .table-filter select,
.table-responsive-extra .table-length input,
.table-responsive-extra .table-length select {
    padding: 8px 15px;
}

/* Generic pagination styles */
.table-responsive-extra .table-paginate .page-link {
    color: var(--dark);
    font-size: var(--font-12);
    box-shadow: none !important;
    border-color: #e9ecef; /* darken($gray-100, 1) */
}
.table-responsive-extra .table-paginate .active > .page-link,
.table-responsive-extra .table-paginate .page-link.active {
    color: var(--white) !important;
    background-color: var(--primary);
}
.table-responsive-extra .table-paginate .disabled > .page-link,
.table-responsive-extra .table-paginate .page-link.disabled {
    color: var(--gray-400);
}

/* Generic table info styles */
.table-responsive-extra .table-info {
    font-size: var(--font-11);
    margin-top: 1rem;
}

/* === Table Compact: dùng cho subform, modal, vùng hiển thị hạn chế === */
/*.table-responsive-extra .table.table-compact td,
.table-responsive-extra .table.table-compact th {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    font-size: 0.875rem; /* Có thể giảm nếu cần */
}*/
/*.table-responsive-extra .table.table-compact td:first-child,
.table-responsive-extra .table.table-compact th:first-child {
    padding-left: 8px !important;
}
.table-responsive-extra .table.table-compact td:last-child,
.table-responsive-extra .table.table-compact th:last-child {
    padding-right: 8px !important;
}*/

.v-select .vs__selected{
  display: flex;
}
.v-select.p-0 .vs__dropdown-toggle{
  padding:5px;
}
.circle-number{
  width: 30px;
  height: 30px;
  color: #283c50;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 100%;
  transition: all .3s ease;
  border: 1px solid #e8eaf2;
}
.bg-readonly{
  background-color: #e9ecef !important;
}
.bg-filter{
  /*background-color: #e3f2fd !important;*/
}
.vs--disabled .vs__clear, .vs--disabled .vs__dropdown-toggle, .vs--disabled .vs__open-indicator, .vs--disabled .vs__search, .vs--disabled .vs__selected{
  background-color: #e9ecef !important;
}

.form-control[contenteditable="false"] {
  background-color: #e9ecef !important; /* Giống input disabled */
  pointer-events: none;      /* Không cho click focus */
  color: #6c757d;            /* Màu chữ nhạt hơn */
  user-select: none;         /* Không cho bôi đen */
}

.modal-xxl {
  max-width: 90vw;
  width: 90vw;
}
.modal-100 {
  max-width: 100vw;
  width: 100vw;
}
.modal-90 {
  max-width: 90vw;
  width: 90vw;
}
.modal-80 {
  max-width: 80vw;
  width: 80vw;
}
.modal-70 {
  max-width: 80vw;
  width: 80vw;
}
@media (max-width: 576px) {
  .modal-xxl, .modal-100, .modal-90, .modal-80, .modal-70 {
    max-width: 100vw;
    width: 100vw;
    margin: 0;
    border-radius: 0;
  }
}
.main-row.even-row{
  border-color: #f8f9fa;
}
.even-row {
  background-color: #f8f9fa; /* màu sáng hơn cho dòng chẵn */
}

.odd-row {
  background-color: #ffffff; /* màu mặc định cho dòng lẻ */
}

.vs__dropdown-toggle input.active,.vs__dropdown-toggle  input.focus,.vs__dropdown-toggle  input:active,.vs__dropdown-toggle  input:focus{
  border: 1px solid transparent !important;
}
.page-header{
  background: transparent !important;
}

.dynamic-form-field-sm textarea.form-control-sm, 
.dynamic-form-field-sm input.form-control-sm{
  /*font-size: 11px !important;*/
}

.dynamic-form-field-sm textarea.form-control-sm, 
.dynamic-form-field-sm input.form-control-sm,
.dynamic-form-field-md textarea.form-control-md, 
.dynamic-form-field-md input.form-control-md{
  padding: 0px 6px !important;;
  width: 100%;
  border-width: 1px !important;
  border: 1px solid #e5e7eb !important;
}

.flatpickr-input + input[readonly] {
  cursor: pointer;
  background-color: field !important;
  max-width: 105px !important;
}

.dynamic-form-field-sm textarea[readonly]:not(.flatpickr-input + input),
.dynamic-form-field-sm input[readonly]:not(.flatpickr-input + input),
.dynamic-form-field-md textarea[readonly]:not(.flatpickr-input + input),
.dynamic-form-field-md input[readonly]:not(.flatpickr-input + input) {
  background-color: #e9ecef !important;
}


.heavy-shadow {
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.3) !important;
}

.vs--single{
  padding: 0px !important;
}

.form-control-sm .vs__dropdown-toggle{
  padding:0px !important;
}
.nxl-navigation .navbar-content .nxl-link{
  font-weight: 500 !important;
}
.vs__selected-options{
  display: flex;
  flex-wrap: wrap;
  background: white;
  gap:5px;
  min-width: 0;
  align-items: center;
}
.vs--disabled .vs__selected-options{
  background: unset;
}
.vs--single .vs__selected-options{
  flex-wrap: nowrap;
}
.vs--single .vs__selected {
  width: 100%;
}
.vs__search{
  font-size: 14px;
}
.compact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  line-height: 1.4;
  background-color: #fff;
}
.compact-table th{
  background-color: #e1e1e1 !important;
}

.compact-table th,
.compact-table td {
  border: 1px solid #ccc;
  padding: 6px 10px;
  text-align: left;
  vertical-align: top;
}

.compact-table thead {
  background-color: #f5f5f5;
  font-weight: bold;
}

.compact-table tfoot {
  background-color: #fafafa;
  font-style: italic;
  font-size: 12px;
}

.compact-table tr:nth-child(even) tbody tr {
  background-color: #f9f9f9;
}

.bg-transparent {
  background-color: transparent !important;
}

ul.nav-tabs{
  gap: 5px;
}
.nav-tabs .nav-item .nav-link{
  display: flex;
  flex-direction: row;
  align-items: center;
  gap:1px;
  border-top: 1px solid #dee2e6;
  border-left: 1px solid #dee2e6;
  border-right: 1px solid #dee2e6;
  border-bottom: none;
}

.tms-form-tabs.nav-tabs .nav-item .tms-form-tab-link.nav-link {
  gap: 6px;
  border: 1px solid transparent !important;
  border-radius: 0 !important;
}

.tms-form-tabs.nav-tabs .nav-item .tms-form-tab-link.nav-link:hover {
  border-color: transparent !important;
}

.tms-form-tabs.nav-tabs .nav-item .tms-form-tab-link.nav-link.active {
  border-color: transparent !important;
}

.m-header {
  display: flex;
  align-items: center;
  justify-content: center; /* căn giữa logo theo chiều ngang */
  padding: 1rem;
  background-color: #fff; /* hoặc #f8f9fa nếu bạn muốn sáng hơn */
  border-bottom: 1px solid #e0e0e0;
  min-height: 64px;
}
.dropdown-menu{
  padding: 0px;
}
.nxl-header .header-wrapper .nxl-h-dropdown.nxl-user-dropdown{
  width: 250px;
}

.simple-menu .menu-item {
  width: 150px;
  text-align: center;
  padding: 8px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  font-weight: 300;
  font-size: 0.85rem;
  transition: all 0.2s;
  cursor: pointer;
}

.simple-menu .menu-item:hover {
  background-color: #e9f5ff;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  animation: animate__pulse 0.3s;
}

.simple-menu .menu-item.active {
  background-color: #0d6efd;
  color: white;
  border-color: #0d6efd;
  animation: animate__fadeIn 0.3s;
}

.simple-menu .menu-item i {
  font-size: 1.2rem;
  margin-bottom: 2px;
  display: block;
}

.simple-menu .menu-item .label {
  font-weight: 400;
  font-size: 0.8rem;
}

.simple-menu .menu-item .desc {
  font-size: 0.6rem;
  opacity: 0.6;
}

.simple-menu .menu-item.avtive .desc {
  color:white;
}

/************ v-select ***********/
.vs__selected {
  display: flex;
  align-items: center;
  max-width: 100%;
  overflow: hidden;
  text-align: left;
}

.vs__selected span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: inline-block;
}

.vs__deselect {
  flex: 0 0 auto;
  margin-left: 4px;
}
.card .card-header .card-title{
  font-size:13px;
}

/************ ALL TD *************/
td{  
  position: relative !important;
  overflow: visible !important;
}

.note-google-style {
  background-color: #fff8c4 !important;   /* vàng nhạt kiểu Google Keep */
  color: #333 !important;                 /* chữ đậm dễ đọc */
  border-left: 4px solid #f4d03f !important; /* vàng đậm bên trái */
  border-radius: 0.375rem;
  white-space: pre-wrap;       /* hỗ trợ xuống dòng */
}
.full-cell{
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 2px;
  top: 2px;
}

.notification-purple-style {
  background-color: #f3e8ff !important;     /* tím nhạt */
  color: #4a0072 !important;                /* tím đậm */
  border-left: 4px solid #ce93d8 !important; /* tím trung bình */
  border-radius: 0.375rem;
  white-space: pre-wrap;
  padding: 12px 16px;
  font-size: 14px;
}

.currency-select{
  width: 64px !important;
}

.table-responsive {
    overflow-y: visible !important;
}

.tms-component-table-responsive {
  padding-bottom: 96px;
  margin-bottom: -96px;
  overflow-x: auto !important;
  overflow-y: visible !important;
}

.tms-component-table-responsive .table {
  margin-bottom: 0 !important;
}

.tms-component-table-responsive .v-select,
.tms-component-table-responsive .vs__dropdown-menu,
.tms-component-table-responsive .dropdown-menu,
.tms-component-table-responsive .tms-inline-edit-pencil,
.tms-component-table-responsive .tms-inline-edit-pencil-field {
  z-index: 30;
}

/************* Overwrite scrollbar modal cho đậm hơn, rõ nét hơn **************/
.modal-body {
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: #888 #f1f1f1; /* Firefox */
}

.modal-body {
  scrollbar-width: auto !important;
  scrollbar-color: #4CAF50 #f1f1f1 !important;
}

/* Webkit (Chrome, Edge, Safari) */
.modal-body::-webkit-scrollbar {
  width: 10px;
}

.modal-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.offcanvas-body h6 {
  font-size: 0.9rem;
}
.offcanvas-body label.form-label {
  font-size: 0.85rem;
}

.offcanvas {
  transition: transform 0.2s ease-in-out !important; /* hoặc: none */
}
.custom-close-btn {
  position: absolute;
  top: -12px;
  right: -12px;
  z-index: 1055;
  background-color: #fff;
  border: 1px solid #dee2e6;
  border-radius: 50%;
  padding: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease-in-out;
}

.custom-close-btn:hover {
  background-color: #f8d7da;
  border-color: #f5c2c7;
}

.i-fw-normal{
  font-size: 14px !important;
}
.html-editor{
  font-style: normal;
}
.html-editor i{
  font-style: italic;
}
/* tms-html-editor mặc định không có overflow khi set height cố định (nội dung dài tràn ra ngoài
   box) - áp dụng chung cho MỌI tms-html-editor đặt trong tooltip Console Admin (class
   "tms-console-admin-tooltip" gắn sẵn từ generator cho mọi item console_admin có vue_content,
   xem component.js.php), không riêng Service Note - để không ảnh hưởng các chỗ khác đang dùng
   tms-html-editor ngoài console admin. */
.tms-console-admin-tooltip .html-editor {
  overflow-y: auto;
  overflow-x: hidden;
  overflow-wrap: break-word;
}
.tms-line-clamp-1 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;

  overflow: hidden;

  line-height: 1.4;
  max-height: 2.0em;      /* 1 dòng */
}

.tms-line-clamp-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;

  overflow: hidden;

  line-height: 1.4;
  max-height: 3.2em;      /* 2 dòng = 1.4 * 2 */
}

.tms-line-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;

  overflow: hidden;

  line-height: 1.4;
  max-height: 4.2em;   /* 1.4 * 3 */
}

.tms-line-clamp-4 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;

  overflow: hidden;

  line-height: 1.4;
  max-height: 5.6em;   /* 1.4 * 4 */
}

.tms-price-table {
  font-size: 10px;
  line-height: 1;
}

.tms-price-table th,
.tms-price-table td {
  padding: 2px !important;
  vertical-align: middle;
  text-align: center;
  border: 1px solid #ccc !important;
}

.tms-price-table th.text-start,
.tms-price-table td.text-start {
  text-align: left;
}

.tms-price-value-input {
  width: 100%;
  height: 22px;
  font-size: 10px;
  padding: 0 2px;
  border: 1px solid #ccc;
  border-radius: 2px;
  text-align: right;
  background-color: #fff;
  font-weight: bold;
  color: blue;
}
/* Chrome, Safari, Edge */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type="number"] {
  -moz-appearance: textfield;
}

.tms-prices-bottom-panel {
  position: fixed !important;
  bottom: 60px;
  left: 0;
  right: 0;
  width: 100vw;
  max-height: 90vh;
  overflow-y: auto;
  background-color: #fff;
  z-index: 1105;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
}

.autocomplete {
  position: relative;
  width: 100%;
}

.autocomplete input[disabled] {
  background-color: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}

.autocomplete input[type='text'] {
  width: 100%;
  padding: 6px 30px 6px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 14px;
  background: white url("data:image/svg+xml;utf8,<svg fill='gray' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>") no-repeat right 10px center;
  background-size: 16px;
}

.autocomplete ul.suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px; /* 👉 Cho phép mở rộng */
  width: max-content; /* 👈 Tự rộng theo nội dung */
  max-width: 100vw; /* tránh vượt khỏi màn hình */
  background: white;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 4px 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: -1px;
  padding: 0;
  list-style: none;
}

.autocomplete .suggestions li {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  white-space: nowrap; /* tránh xuống dòng */
}

.autocomplete .suggestions li:hover,
.autocomplete .suggestions li.active {
  background-color: #4caf50;
  color: white;
}

.nav_quick_instances_magic_select {
  overflow-x: auto;
  white-space: nowrap;
}

.nav_quick_instances_magic_select .nav-tabs {
  flex-wrap: nowrap !important;
  overflow-x: auto;
  overflow-y: hidden;
}

.nav_quick_instances_magic_select .nav-item {
  white-space: nowrap;
}
.nav-tabs-wrapper {
  height: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
  overflow-y: hidden;
}
.nav-tabs-custom-style .nav-item {
  float: none;
  white-space: nowrap;
}
.nav-tabs-wrapper .nav-tabs-custom-style .nav-item .nav-link{
  padding: 12px 25px;
}
.bg-sub-row{
  background-color: #eaeaea;
}
.itinerary-tooltip-container{
  max-width: 800px;
}
.nxl-container .nxl-content .main-content{
  overflow-x: visible;
}

.td-settings-dropdown {
  position: absolute;
  bottom: -5px;
  right: 5px;
}

.td-settings-icon {
  font-size: 0.7rem;
  color: #6c757d;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s, transform 0.2s;
}

.td-settings-icon:hover {
  opacity: 1;
  transform: scale(1.2);
  color: #0d6efd;
}
.dropdown-menu li label span:hover {
  filter: brightness(1.1);       /* làm màu sáng hơn */
  transform: scale(1.02);        /* hơi phóng to nhẹ */
  transition: all 0.15s ease-in-out;
}
.tag-list {
  align-items: center;
}

.tag-badge {
  background-color: #f8f9fa;
  color: #333;
  font-size: 0.8rem;
  padding: 2px 8px;
  border: 1px solid #ddd;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.tag-badge .btn-close {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  opacity: 0.6;
}

.tag-badge .btn-close:hover {
  opacity: 1;
}

.tag-selector {
  min-width: 150px;
}
.nav-link-icon {
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.75rem;
  color: #555;
}

.nav-link-icon:hover {
  transform: scale(1.1);
  text-decoration: none;
}

.nav-link-icon i {
  font-size: 1.25rem;
  margin-bottom: 2px;
}

.navbar-bottom-icon small {
  font-size: 0.75rem;
  opacity: 0.85;
}

.navbar-bottom-icon small {
  font-size: 0.75rem;
  font-weight: 600; /* tương đương fw-semibold */
  letter-spacing: 0.2px;
  color: #222 !important; /* tăng độ tương phản */
}

.hover-effect:hover {
  transform: scale(1.05);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.transition-fast {
  transition: all 0.2s ease-in-out;
}

.addon-badge { padding-right: 22px; }
.addon-badge .addon-remove {
  opacity: 0;
  transition: opacity .15s ease-in-out;
  vertical-align: middle;
}
.addon-badge:hover .addon-remove {
  opacity: 1;
}

.tms-price-hover, .tms-prices-hover {
  display: inline-block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.tms-price-hover:hover, .tms-prices-hover:hover {
  transform: scale(1.05);
}

/****** SIDE BAR TOUR PACKAGE LIBRARY  *********/
.tms-no-scroll { overflow: hidden; }

/* Khung chung */
.tms-sidebar {
  position: fixed;
  inset: 0;
  z-index: 1060;
  pointer-events: none;
}
.tms-sidebar.open { pointer-events: auto; }

/* Overlay */
.tms-sidebar__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.4);
  opacity: 0;
  transition: opacity .25s ease;
}
.tms-sidebar.open .tms-sidebar__overlay { opacity: 1; }

/* Panel phải */
.tms-sidebar__panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  background: #fff;
  box-shadow: -8px 0 24px rgba(0,0,0,.12);
  transform: translateX(100%);
  transition: transform .25s ease;
  display: flex;
  flex-direction: column;
  max-width: 1280px;
}
.tms-sidebar.open .tms-sidebar__panel { transform: translateX(0); }

/* Độ rộng tuỳ chọn */
.w-60 { width: 60vw; }
.w-70 { width: 70vw; } /* mặc định */
.w-80 { width: 80vw; }

/* Header + Body */
.tms-sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid #e9ecef;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.tms-sidebar__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 1rem;
}

/* Mobile: full width */
@media (max-width: 768px) {
  .w-60, .w-70, .w-80 { width: 100vw; }
}

.bg-ocean    { background-color: #0284C7 !important; color: #FFFFFF; } /* xanh biển đậm */
.bg-forest   { background-color: #16A34A !important; color: #FFFFFF; } /* xanh lá */
.bg-sunset   { background-color: #F97316 !important; color: #FFFFFF; } /* cam hoàng hôn */
.bg-rose     { background-color: #E11D48 !important; color: #FFFFFF; } /* hồng đậm */
.bg-violet   { background-color: #7C3AED !important; color: #FFFFFF; } /* tím */
.bg-indigo   { background-color: #4F46E5 !important; color: #FFFFFF; } /* chàm */
.bg-teal     { background-color: #0D9488 !important; color: #FFFFFF; } /* xanh ngọc */
.bg-slate    { background-color: #334155 !important; color: #FFFFFF; } /* ghi xanh đậm */
.bg-amber    { background-color: #F59E0B !important; color: #111827 !important; } /* vàng hổ phách – chữ đậm */
.bg-charcoal { background-color: #1F2937 !important; color: #FFFFFF; } /* than */
.bg-tms      { background-color: rgb(231, 241, 255) !important; color: rgb(13, 110, 253);};
.truncate-50 {
  max-width: 50ch;              /* ~50 ký tự (chuẩn hơn với font monospace) */
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Truncate cho span inline (VD giá trị hiển thị của [inline_edit] trong list) - cần display:
   inline-block để max-width có tác dụng trên phần tử vốn là inline. */
.tms-truncate-inline {
  display: inline-block;
  max-width: 140px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  vertical-align: bottom;
}
.tms-truncate-inline-lg {
  display: inline-block;
  max-width: 280px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

/* Badge outline cho tất cả màu Bootstrap */
.badge-outline {
  background-color: transparent !important;
  border: 1px solid currentColor; 
}

/* Nếu muốn rõ ràng hơn theo từng màu */
.badge-outline-success {
  color: #198754; /* text-success */
  border: 1px solid #198754;
  background-color: transparent;
}

.badge-outline-danger {
  color: #dc3545; /* text-danger */
  border: 1px solid #dc3545;
  background-color: transparent;
}

.badge-outline-warning {
  color: #ffc107; /* text-warning */
  border: 1px solid #ffc107;
  background-color: transparent;
}

.badge-outline-secondary {
  color: #6c757d; /* text-secondary */
  border: 1px solid #6c757d;
  background-color: transparent;
}


.badge-outline-primary {
  color: #0d6efd; /* text-primary */
  border: 1px solid #0d6efd;
  background-color: transparent;
}

.rounded-10{
  border-radius: 10px;
}
.rounded-12{
  border-radius: 12px;
}
tr.removed td {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: #d9534f; /* màu đỏ nhẹ */
  text-decoration-skip-ink: auto;
  color: #999;
}

.scroll-month-profit {
  width: 600px;
  max-width: 600px;
  overflow-x: auto !important;
  overflow-y: hidden;
  white-space: nowrap;
  display: block;
}

.vs__actions{
  align-items: center;
  align-self: stretch;
  flex: 0 0 auto;
  gap: 1px;
  padding: 0 3px 0 2px !important;
}

.vs--multiple:not(.vs--open):has(.vs__selected) .vs__search {
  flex: 0 0 1px;
  width: 1px !important;
  max-width: 1px !important;
  height: 0;
  min-height: 0;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.vs__clear,
.vs__open-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px !important;
  height: 15px !important;
  padding: 0 !important;
  line-height: 1 !important;
  transform-origin: center;
}

.vs__clear svg,
.vs__open-indicator {
  width: 11px !important;
  height: 11px !important;
}

.vs__clear {
  margin-right: 0;
}

.vs__open-indicator {
  transform: scale(.78) !important;
}

.vs--open .vs__open-indicator {
  transform: rotate(180deg) scale(.78) !important;
}
.modal-fullscreen .modal-content{
  border-radius: 0px !important;
}
.mw-10  { max-width: 10%; }
.mw-20  { max-width: 20%; }
.mw-25  { max-width: 25%; }

.mw-30  { max-width: 30%; }
.mw-40  { max-width: 40%; }
.mw-50  { max-width: 50%; }

.mw-60  { max-width: 60%; }
.mw-70  { max-width: 70%; }
.mw-75  { max-width: 75%; }

.mw-80  { max-width: 80%; }
.mw-90  { max-width: 90%; }
.mw-100 { max-width: 100%; }

.w-120 {
  width:120px !important;
}

.w-150 {
  width:150px !important;
}

.w-180 {
  width:180px !important;
}

/* PRIMARY */
.tms-tab-primary {
  border: none;
  background: #fff;
  color: #0d6efd;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px #cbced1;
}

.tms-tab-primary.active {
  background: #0d6efd;
  color: #fff;
}

.tms-tab-primary.active .badge {
  background: #fff !important;
  color: #0d6efd !important;
}


/* SECONDARY */
.tms-tab-secondary {
  border: none;
  background: #fff;
  color: #6c757d;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px #cbced1;
}

.tms-tab-secondary.active {
  background: #6c757d;
  color: #fff;
}

.tms-tab-secondary.active .badge {
  background: #fff !important;
  color: #6c757d !important;
}


/* SUCCESS */
.tms-tab-success {
  border: none;
  background: #fff;
  color: #198754;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px #cbced1;
}

.tms-tab-success.active {
  background: #198754;
  color: #fff;
}

.tms-tab-success.active .badge {
  background: #fff !important;
  color: #198754 !important;
}


/* DANGER */
.tms-tab-danger {
  border: none;
  background: #fff;
  color: #dc3545;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px #cbced1;
}

.tms-tab-danger.active {
  background: #dc3545;
  color: #fff;
}

.tms-tab-danger.active .badge {
  background: #fff !important;
  color: #dc3545 !important;
}


/* WARNING */
.tms-tab-warning {
  border: none;
  background: #fff;
  color: #ffc107;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px #cbced1;
}

.tms-tab-warning.active {
  background: #ffc107;
  color: #212529;
}

.tms-tab-warning.active .badge {
  background: #fff !important;
  color: #ffc107 !important;
}


/* INFO */
.tms-tab-info {
  border: none;
  background: #fff;
  color: #0dcaf0;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px #cbced1;
}

.tms-tab-info.active {
  background: #0dcaf0;
  color: #fff;
}

.tms-tab-info.active .badge {
  background: #fff !important;
  color: #0dcaf0 !important;
}


/* LIGHT */
.tms-tab-light {
  border: none;
  background: #fff;
  color: #6c757d;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px #dee2e6;
}

.tms-tab-light.active {
  background: #f8f9fa;
  color: #212529;
}

.tms-tab-light.active .badge {
  background: #fff !important;
  color: #6c757d !important;
}


/* DARK */
.tms-tab-dark {
  border: none;
  background: #fff;
  color: #212529;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px #343a40;
}

.tms-tab-dark.active {
  background: #212529;
  color: #fff;
}

.tms-tab-dark.active .badge {
  background: #fff !important;
  color: #212529 !important;
}

.notice-hint {
  padding-left: 8px;
  border-left: 3px solid transparent;
  line-height: 1.4;
}

/* Bình thường */
.notice-normal {
  color: #6c757d;
  border-color: #ced4da;
}

/* Cảnh báo */
.notice-warning {
  color: #ffc107;
  border-color: #ffc107;
  font-weight: 400;
}

/* Nguy hiểm */
.notice-critical {
  color: #dc3545;
  border-color: #dc3545;
  font-weight: 400;
  background: linear-gradient(90deg, rgba(220,53,69,.08), transparent);
}

/* Icon */
.notice-icon {
  font-size: 14px;
}

/* Vi chuyển động – chỉ cho critical */
@keyframes noticePulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: .7; }
  100% { transform: scale(1); opacity: 1; }
}

.notice-critical .notice-icon {
  animation: noticePulse 1.4s infinite;
}

.mt-80px{
  margin-top: 80px !important;
}

/* Mobile only */
@media (max-width: 576px) {
  .tms-dropdown-notification {
    position: fixed !important;
    top: 80px !important;
    right: 10px !important;
  }
}
.stats-header-wrapper {
  position: relative; /* 🔥 mốc để absolute */
}

/* scope dropdown */
.stats-header-wrapper .scope_wrapper {
  position: absolute;
  top: 8px;     /* chỉnh tuỳ header cao/thấp */
  right: 8px;   /* sát mép phải */
  z-index: 5;   /* nổi trên stats */
}

.main-content .border{
  border: 1px solid #eeeeee !important;
}

.dashboard-company-logo{
  display: none !important;
}
.minimenu .dashboard-company-logo{
  display: block !important;
}
/* sticky column */
.sticky-col {
  position: sticky !important;
  left: 0;
  z-index: 2;
  background: #fff !important;
}

/* header cần nổi hơn */
th.sticky-col {
  z-index: 3;
}

/* fix border + shadow cho đẹp */
.left-col {
  box-shadow: 2px 0 5px rgba(0,0,0,0.05);
}

/* fix khi row có màu (table-warning, table-info...) */
.table-warning .sticky-col {
  background-color: #fff3cd;
}
.table-info .sticky-col {
  background-color: #cff4fc;
}
/* container */
.pagination-common-style a {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* item */
.page-link-custom {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid #dee2e6;
  background: #fff;
  color: #333;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s;
}

/* hover */
.page-link-custom:hover {
  background: #f1f3f5;
}

/* active */
.page-link-custom.active {
  background: #0d6efd;
  color: #fff;
  border-color: #0d6efd;
}

/* disabled */
.page-link-custom.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* MOBILE */
@media (max-width: 768px) {

  .page-link-custom {
    min-width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .pagination-common-style {
    justify-content: center !important;
  }

}
.form-switch {
    align-items: center;
    display: flex;
    gap: 2px;
}

/* TEXT ONLY */

.money-level-negative {
  color: #dc3545 !important;
}

.money-level-zero {
  color: #6c757d !important;
}

.money-level-xs {
  color: #198754 !important;
}

.money-level-sm {
  color: #157347 !important;
}

.money-level-md {
  color: #0d6efd !important;
}

.money-level-lg {
  color: #fd7e14 !important;
  font-weight: 600;
}

.money-level-xl {
  color: #d63384 !important;
  font-weight: 700;
}

.money-level-xxl {
  color: #6f42c1 !important;
  font-weight: 700;
}

.money-level-mega {
  color: #b58900 !important;
  font-weight: 800;
}


/* BACKGROUND */

.money-level-negative-bg {
  background: #ffe5e5;
}

.money-level-zero-bg {
  background: #f1f3f5;
}

.money-level-xs-bg {
  background: #eefaf1;
}

.money-level-sm-bg {
  background: #dff7e8;
}

.money-level-md-bg {
  background: #e7f1ff;
}

.money-level-lg-bg {
  background: #fff3cd;
}

.money-level-xl-bg {
  background: #ffe8f0;
}

.money-level-xxl-bg {
  background: #f3e8ff;
}

.money-level-mega-bg {
  background: #fff5cc;
}
.tms-heatmap{
    width:100%;
}

.heatmap-grid{
    display:grid;
    gap:12px;
}

.heatmap-card{
    border:1px solid #dee2e6;
    border-radius:6px;
    padding:8px;
}

.heatmap-header{
    display:flex;
    overflow-x:auto;
    margin-bottom:2px;
}

.heatmap-label{
    min-width:20px;
    font-size:10px;
    text-align:center;
    color:#6c757d;
}

.heatmap-row{
    display:flex;
    overflow-x:auto;
}

.heatmap-cell{
    border:1px solid #fff;
    cursor:pointer;
}

.heatmap-cell:hover{
    opacity:0.8;
}

.heatmap-legend-color{
    width:14px;
    height:14px;
    border-radius:3px;
    display:inline-block;
}

.tms-stats-summary-box {
  min-height: 52px;
  padding-right: 46px !important;
  background: #ffffff !important;
}

.stats-header-wrapper {
  background: #ffffff !important;
}

.tms-stats-desktop-list {
  margin-top: 8px;
}

.tms-stats-sidebar-toggle {
  position: absolute !important;
  top: 6px !important;
  right: 8px !important;
  z-index: 34;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  color: #475569;
  background: #ffffff;
  border-radius: 5px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .06);
}

.tms-stats-sidebar-toggle.active {
  color: #1d4ed8;
  border-color: #93c5fd !important;
  background: #eff6ff;
}

.tms-stats-summary-collapsed-title {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  width: auto !important;
  max-width: max-content;
  min-height: 30px;
  padding: 4px 8px;
  text-decoration: none;
  line-height: 1.2;
  cursor: pointer;
  background: #ffffff !important;
  border: 1px solid #dbeafe !important;
  border-radius: 6px;
  box-shadow: none !important;
  user-select: none;
  color: #1e3a8a !important;
  font-weight: 700;
  font-style: normal !important;
}

.tms-stats-summary-collapsed-title:hover,
.tms-stats-summary-collapsed-title:focus,
.tms-stats-summary-collapsed-title:active {
  color: #1d4ed8 !important;
  text-decoration: none;
  outline: none !important;
  box-shadow: 0 1px 5px rgba(37, 99, 235, .12) !important;
  background: #f8fbff !important;
  border-color: #bfdbfe !important;
}

.tms-stats-summary-collapsed-title span,
.tms-stats-summary-collapsed-title i {
  flex: 0 0 auto;
}

.tms-stats-summary-chevron {
  color: #1e40af !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  font-size: 12px;
  line-height: 1;
  opacity: 1 !important;
}

.tms-stats-summary-collapsed-title .bi-bar-chart-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: #2563eb;
  background: #eff6ff;
  border-radius: 4px;
}

.tms-stats-summary-loading-inline {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  white-space: nowrap;
  color: #64748b;
  font-style: normal;
  font-size: 12px;
  line-height: 1;
}

.tms-stats-summary-loading-spinner {
  width: 12px;
  height: 12px;
  border-width: 2px;
  color: #64748b;
}

.tms-stats-summary-loading {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  margin: 0 0 0 8px !important;
  padding: 0 !important;
  vertical-align: middle;
}

.tms-stats-summary-loading > .d-inline-flex,
.tms-stats-summary-loading > .d-flex {
  display: inline-flex !important;
  align-items: center !important;
}

.tms-stats-summary-loading .mt-2 {
  display: none !important;
}

.tms-stats-collapse-toggle {
  display: none !important;
}

/* Badge + số đếm trong Stats Summary - đảm bảo icon/label (custom_display) và số đếm "(N)" (span
   fw-bold nối thêm sau, xem partials/stats_group_totals.js.php) luôn căn giữa theo chiều dọc trong
   badge pill, không lệch baseline dù nội dung custom_display khác chiều cao (icon + chữ đậm). */
.tms-stats-desktop-list .badge.rounded-pill,
.tms-stats-mobile-list .badge.rounded-pill {
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1.2;
}

.tms-stats-desktop-list .badge.rounded-pill > span,
.tms-stats-mobile-list .badge.rounded-pill > span {
  display: inline-flex !important;
  align-items: center !important;
}

.tms-stats-mobile-list {
  display: none;
}

.tms-stats-mobile-group {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #ffffff;
  overflow: hidden;
}

.tms-stats-mobile-group + .tms-stats-mobile-group {
  margin-top: 6px;
}

.tms-stats-mobile-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 7px 9px;
  color: #334155;
  background: #f8fafc;
}

.tms-stats-mobile-group-icon {
  color: #64748b;
  font-size: 13px;
}

.tms-stats-mobile-group-label {
  font-size: 12px;
  font-weight: 700;
}

.tms-stats-mobile-group-body {
  max-height: 260px;
  overflow: auto;
  padding: 9px 9px 7px;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

@media (max-width: 767.98px) {
  .tms-stats-summary-box {
    padding-right: 8px !important;
  }

  .tms-stats-desktop-list {
    display: none !important;
  }

  .tms-stats-mobile-list {
    display: block;
    margin-top: 6px;
  }
}

.tms-list-actions-mobile {
  display: none;
}

.tms-quick-instance-scope-mobile {
  display: none;
}

.tms-booking-tour-package-selector {
  flex: 1 1 320px;
  min-width: 0;
}

.tms-booking-tour-package-actions {
  flex: 1 1 280px;
  min-width: 0;
}

.tms-booking-tour-package-cost-amount {
  font-size: 1.25rem;
  line-height: 1.2;
}

.tms-tour-package-guests {
  width: 100%;
  min-width: 0;
}

.tms-tour-package-guests__item,
.tms-tour-package-guests__card {
  min-height: 80px;
}

.tms-tour-package-guests__card--adults,
.tms-tour-package-guests__card--total {
  flex: 1 1 150px;
  min-width: 150px;
  max-width: 180px;
}

.tms-tour-package-guests__card--children {
  flex: 1 1 220px;
  min-width: 180px;
  max-width: 250px;
}

.tms-tour-package-guests__value {
  font-size: 1.25rem;
  line-height: 1.2;
}

.tms-quick-instance-wrap {
  padding: 5px 10px 0 !important;
  background: #f8fafc !important;
}

.tms-quick-instance-bar {
  gap: 8px;
  min-width: 0;
}

.tms-quick-instance-tabs {
  min-width: 0;
  overflow: visible;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
}

.tms-quick-instance-tabs-desktop {
  display: flex !important;
  gap: 0;
  min-width: max-content;
  padding: 0;
  border: 0 !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

.tms-quick-instance-groups-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0 0 5px;
}

.tms-quick-instance-direction-rtl {
  display: flex;
  justify-content: flex-end;
}

.tms-quick-instance-direction-rtl .tms-quick-instance-groups-bar,
.tms-quick-instance-direction-rtl .tms-quick-instance-tabs-desktop {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

.tms-quick-instance-direction-rtl .tms-quick-instance-group-menu:first-child > .tms-quick-instance-dropdown {
  right: 0 !important;
  left: auto !important;
}

.tms-quick-instance-group-menu {
  flex: 0 0 auto;
}

.tms-quick-instance-group-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 5px 10px 7px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: var(--tms-qi-group-color, #475569);
  background: var(--tms-qi-group-bg, transparent);
  font-size: 13px;
  font-weight: 780;
  line-height: 1.1;
  white-space: nowrap;
}

.tms-quick-instance-group-btn:hover,
.tms-quick-instance-group-btn:focus,
.tms-quick-instance-group-btn.show {
  color: #1d4ed8;
  background: var(--tms-qi-group-bg, transparent);
}

.tms-quick-instance-group-btn.active {
  color: var(--tms-qi-group-color, #0f3d91);
  border-bottom-color: var(--tms-qi-group-border, #2563eb);
}

.tms-quick-instance-group-main {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tms-quick-instance-group-main .bi {
  color: currentColor;
  font-size: 13px;
}

.tms-quick-instance-group-active-text {
  display: inline-block;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

.tms-quick-instance-group-active-text::before {
  content: "· ";
  color: #94a3b8;
}

.tms-quick-instance-group-caret {
  color: #94a3b8;
  font-size: 10px;
}

.tms-quick-instance-tabs .nav-item {
  position: relative;
  flex: 0 0 auto;
}

.tms-quick-instance-tabs .nav-item + .nav-item {
  margin-left: 14px;
  padding-left: 14px;
}

.tms-quick-instance-tabs .nav-item + .nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 10px;
  width: 1px;
  background: rgba(148, 163, 184, .38);
}

.tms-quick-instance-group-label {
  gap: 5px;
  min-height: 34px;
  padding: 0 4px 7px 10px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tms-quick-instance-group-label .bi {
  color: #94a3b8;
  font-size: 12px;
}

.tms-quick-instance-tabs .nav-item.tms-quick-instance-group-label + .nav-item {
  margin-left: 6px;
  padding-left: 0;
}

.tms-quick-instance-tabs .nav-item.tms-quick-instance-group-label::before,
.tms-quick-instance-tabs .nav-item.tms-quick-instance-group-label + .nav-item::before {
  display: none;
}

.tms-quick-instance-tabs .nav-link.tms-quick-instance-tab-link {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 35px;
  padding: 0 0 9px !important;
  border: 1px solid transparent !important;
  border-radius: 0 !important;
  color: var(--tms-qi-accent, #475569) !important;
  background: transparent !important;
  font-size: 13.75px;
  font-weight: 800;
  line-height: 1.15;
  box-shadow: none !important;
  white-space: nowrap;
}

.tms-quick-instance-tabs .nav-link.tms-quick-instance-tab-link.tms-quick-instance-tab-small {
  min-height: 31px;
  padding-bottom: 8px !important;
  font-size: 12.75px;
}

.tms-quick-instance-tabs .nav-link.tms-quick-instance-tab-link .tms-form-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  margin: 0 !important;
  border-radius: 0;
  color: currentColor;
  background: transparent;
  font-size: 13px;
}

.tms-quick-instance-tabs .nav-link.tms-quick-instance-tab-link:hover {
  color: var(--tms-qi-accent, #1d4ed8) !important;
  border-color: transparent !important;
  background: transparent !important;
}

.tms-quick-instance-tabs .nav-link.tms-quick-instance-tab-link.active {
  color: var(--tms-qi-accent, #0f3d91) !important;
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

.tms-quick-instance-tabs .nav-link.tms-quick-instance-tab-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 0;
  background: #2563eb;
}

.tms-quick-instance-tabs .nav-link.tms-quick-instance-tab-link.active .tms-form-tab-icon {
  color: var(--tms-qi-accent, #2563eb);
  background: transparent;
}

.tms-quick-instance-wrap .tms-quick-instance-tabs .nav-link.tms-quick-instance-tab-link,
.tms-quick-instance-wrap .tms-quick-instance-tabs .nav-link.tms-quick-instance-tab-link .tms-form-tab-icon {
  color: var(--tms-qi-accent, #475569) !important;
}

.tms-quick-instance-wrap .tms-quick-instance-tabs .nav-link.tms-quick-instance-tab-link.active::after {
  height: 3px;
  background: #2563eb !important;
}

.tms-quick-instance-mobile {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  min-width: 0;
}

.tms-quick-instance-mobile-active {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 28px;
  padding: 3px 4px 4px 0;
  border: 0;
  color: var(--tms-qi-accent, #1d4ed8);
  background: transparent;
  box-shadow: none;
}

.tms-quick-instance-mobile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--tms-qi-accent, #2563eb);
  background: transparent;
  font-size: 12px;
}

.tms-quick-instance-mobile-label {
  display: block;
  min-width: 0;
  max-width: min(360px, 42vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #475569;
  font-size: 12.5px;
  font-weight: 760;
  line-height: 1.1;
  text-align: left;
}

.tms-quick-instance-mobile-label::before {
  content: "View: ";
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
}

.tms-quick-instance-mobile-menu {
  flex: 0 0 auto;
}

.tms-quick-instance-mobile-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #dbe4f0;
  border-radius: 7px;
  color: #475569;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}

.tms-quick-instance-mobile-menu-btn:hover,
.tms-quick-instance-mobile-menu-btn:focus {
  color: #1d4ed8;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.tms-quick-instance-dropdown {
  min-width: 240px;
  max-width: min(360px, calc(100vw - 18px));
  max-height: 70vh;
  padding: 6px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  z-index: 1120;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
}

.tms-quick-instance-tabs:not(.tms-quick-instance-direction-rtl) .tms-quick-instance-group-menu:first-child > .tms-quick-instance-dropdown {
  right: auto !important;
  left: 0 !important;
}

.tms-quick-instance-dropdown-group {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px 4px;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1;
  text-transform: uppercase;
}

.tms-quick-instance-dropdown-group:not(:first-child) {
  margin-top: 4px;
  padding-top: 9px;
  border-top: 1px solid #e2e8f0;
}

.tms-quick-instance-dropdown-group .bi {
  color: #94a3b8;
  font-size: 11px;
}

.tms-quick-instance-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 8px;
  border-radius: 7px;
  color: #334155;
  font-size: 13px;
  font-weight: 720;
}

.tms-quick-instance-dropdown-item:hover {
  color: #1d4ed8;
  background: #eff6ff;
}

.tms-quick-instance-dropdown-item.active {
  color: #1d4ed8;
  background: #eff6ff;
  font-weight: 800;
}

.tms-quick-instance-dropdown-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 6px;
  color: #475569;
  background: #e2e8f0;
  font-size: 10px;
}

.tms-quick-instance-dropdown-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .page-header-right {
    width: 100%;
  }

  .page-header-right-items-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    width: 100%;
    min-width: 0;
  }

  .tms-list-actions-desktop {
    display: none !important;
  }

  .tms-list-actions-mobile {
    display: inline-flex !important;
    flex: 0 0 auto;
  }

  .page-header-right-items-wrapper > .btn,
  .page-header-right-items-wrapper > a.btn,
  .page-header-right-items-wrapper .tms-mobile-icon-btn {
    width: 34px;
    height: 32px;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
  }

  .page-header-right-items-wrapper > .btn span,
  .page-header-right-items-wrapper > a.btn span {
    display: none !important;
  }

  .page-header-right-items-wrapper > .btn i,
  .page-header-right-items-wrapper > a.btn i {
    margin: 0 !important;
  }

  .page-header-right-items-wrapper input.form-control-sm {
    width: 46px !important;
    flex: 0 0 auto;
  }

  .tms-list-actions-mobile-menu {
    min-width: 220px;
    max-width: calc(100vw - 24px);
    padding: 6px;
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
  }

  .tms-list-actions-mobile-item {
    min-height: 36px;
    border-radius: 6px;
    color: #334155;
    font-size: 13px;
  }

  .tms-list-actions-mobile-custom {
    padding: 4px;
  }

  .tms-list-actions-mobile-custom .btn,
  .tms-list-actions-mobile-custom a.btn {
    width: 100%;
    justify-content: flex-start;
  }

  .tms-quick-instance-wrap {
    padding: 5px 6px !important;
    margin-top: 0 !important;
    margin-bottom: 3px !important;
  }

  .tms-quick-instance-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 3px;
    width: 100%;
    min-width: 0;
    padding-top: 0;
  }

  .tms-quick-instance-tabs {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    flex: 0 0 auto !important;
    order: 2;
    overflow: visible;
  }

  .tms-quick-instance-groups-bar {
    width: 100%;
    gap: 5px;
    padding-bottom: 3px;
    overflow: visible;
  }

  .tms-quick-instance-group-btn {
    gap: 5px;
    min-height: 30px;
    padding: 4px 6px 6px;
    font-size: 12px;
  }

  .tms-quick-instance-group-main {
    gap: 4px;
  }

  .tms-quick-instance-group-main .bi {
    font-size: 12px;
  }

  .tms-quick-instance-group-active-text {
    max-width: 62px;
    font-size: 10px;
  }

  .tms-quick-instance-tabs-desktop {
    display: none !important;
  }

  .tms-quick-instance-mobile {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%;
    min-width: 0;
  }

  .tms-quick-instance-mobile-active {
    gap: 6px;
    flex: 1 1 auto;
    min-height: 30px;
    padding: 3px 2px;
    border: 0;
    color: var(--tms-qi-accent, #1d4ed8);
    background: transparent;
    box-shadow: none;
  }

  .tms-quick-instance-mobile-icon {
    width: 18px;
    height: 18px;
    font-size: 12px;
  }

  .tms-quick-instance-mobile-label {
    max-width: calc(100vw - 110px);
    font-size: 12px;
    font-weight: 760;
    line-height: 1.1;
  }

  .tms-quick-instance-mobile-menu {
    flex: 0 0 auto;
  }

  .tms-quick-instance-mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    color: #475569;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
  }

  .tms-quick-instance-mobile-menu-btn:hover,
  .tms-quick-instance-mobile-menu-btn:focus {
    color: #1d4ed8;
    border-color: #bfdbfe;
    background: #eff6ff;
  }

  .tms-quick-instance-dropdown {
    min-width: 220px;
    max-width: calc(100vw - 18px);
    max-height: 70vh;
    padding: 6px;
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
  }

  .tms-quick-instance-dropdown-group {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px 4px;
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1;
    text-transform: uppercase;
  }

  .tms-quick-instance-dropdown-group:not(:first-child) {
    margin-top: 4px;
    padding-top: 9px;
    border-top: 1px solid #e2e8f0;
  }

  .tms-quick-instance-dropdown-group .bi {
    color: #94a3b8;
    font-size: 11px;
  }

  .tms-quick-instance-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 7px 8px;
    border-radius: 7px;
    color: #334155;
    font-size: 13px;
    font-weight: 720;
  }

  .tms-quick-instance-dropdown-item:hover {
    color: #1d4ed8;
    background: #eff6ff;
  }

  .tms-quick-instance-dropdown-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    border-radius: 6px;
    color: #475569;
    background: #e2e8f0;
    font-size: 10px;
  }

  .tms-quick-instance-dropdown-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tms-quick-instance-right {
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto !important;
    order: 1;
    min-width: 0;
  }

  .tms-quick-instance-right-inner {
    width: 100%;
    max-width: 100%;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 4px !important;
  }

  .tms-quick-instance-scope {
    min-width: 0;
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
  }

  .tms-quick-instance-scope-desktop {
    display: none !important;
  }

  .tms-quick-instance-scope-mobile {
    display: block !important;
  }

  .tms-quick-instance-scope .tms-select-company-dropdown {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .tms-quick-instance-scope .dropdown,
  .tms-quick-instance-scope .select2,
  .tms-quick-instance-scope select,
  .tms-quick-instance-scope .form-select,
  .tms-quick-instance-scope .multiselect,
  .tms-quick-instance-scope .vs__dropdown-toggle {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .tms-quick-instance-scope .tms-select-company-dropdown > .dropdown > button {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 34px;
    padding: 4px 8px !important;
    overflow: hidden;
  }

  .tms-quick-instance-scope .tms-select-company-dropdown > .dropdown > button > div {
    min-width: 0;
    overflow: hidden;
  }

  .tms-quick-instance-scope .tms-select-company-dropdown > .dropdown > button label {
    max-width: calc(100vw - 96px);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tms-quick-instance-scope .tms-select-company-dropdown .dropdown-menu {
    width: min(280px, calc(100vw - 24px)) !important;
    min-width: min(280px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
  }

  .tms-booking-mobile-summary-card {
    min-width: 156px;
    padding: 7px 8px !important;
    font-size: 11px;
    line-height: 1.35;
  }

  .tms-booking-service-status-card {
    min-width: 190px;
  }

  .tms-booking-finance-profit-card {
    min-width: 230px;
  }

  .tms-booking-mobile-summary-card .xxsmall {
    font-size: 11px !important;
  }

  .tms-booking-mobile-summary-card .badge {
    min-width: 20px;
    min-height: 18px;
    padding: 3px 5px !important;
    font-size: 10.5px !important;
    line-height: 1.1;
  }

  .tms-booking-mobile-summary-card strong,
  .tms-booking-mobile-summary-card .fw-bold {
    font-size: 11.5px !important;
  }

  .tms-booking-mobile-summary-card .text-nowrap {
    white-space: nowrap !important;
  }

  .tms-booking-tour-package-field {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100%;
    gap: 8px !important;
  }

  .tms-booking-tour-package-selector,
  .tms-booking-tour-package-actions,
  .tms-booking-tour-package-cost-summary {
    width: 100%;
    min-width: 0;
    flex: 0 0 auto !important;
  }

  .tms-booking-tour-package-selector > .dropdown,
  .tms-booking-tour-package-selector .dropdown {
    min-height: 0 !important;
  }

  .tms-booking-tour-package-actions {
    align-items: stretch !important;
    gap: 8px !important;
  }

  .tms-booking-accommodation-option-select {
    width: 100% !important;
    max-width: 100%;
    min-height: 42px;
  }

  .tms-booking-tour-package-actions > div {
    flex: 0 0 auto;
  }

  .tms-booking-tour-package-actions > div:has(.tms-booking-tour-package-cost-summary),
  .tms-booking-tour-package-cost-summary {
    flex: 0 0 100% !important;
  }

  .tms-booking-tour-package-cost-summary {
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
  }

  .tms-booking-tour-package-cost-amount {
    display: block;
    font-size: 18px;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .tms-booking-tour-package-cost-summary .text-muted {
    font-size: 12px !important;
    line-height: 1.25;
  }

  .tms-tour-package-guests {
    justify-content: stretch !important;
    width: 100%;
    flex-wrap: nowrap !important;
    gap: 6px !important;
  }

  .tms-tour-package-guests__item,
  .tms-tour-package-guests__card {
    width: auto;
    max-width: none;
    min-width: 0;
  }

  .tms-tour-package-guests__card {
    min-height: 68px;
  }

  .tms-tour-package-guests__card .card-body {
    padding: 6px 7px !important;
  }

  .tms-tour-package-guests__card--adults {
    flex: 0 0 30%;
  }

  .tms-tour-package-guests__card--children {
    flex: 1 1 40%;
  }

  .tms-tour-package-guests__card--total {
    flex: 0 0 27%;
  }

  .tms-tour-package-guests__value,
  .tms-tour-package-guests__card--total .display-6 {
    font-size: 20px !important;
    line-height: 1.15;
  }

  .tms-tour-package-guests__card label,
  .tms-tour-package-guests__card .fw-semibold {
    font-size: 11px !important;
  }

  .tms-tour-package-guests__card--adults .tms-tour-package-guests__value {
    white-space: nowrap;
    font-size: 17px !important;
  }

  .tms-tour-package-guests__card--children .d-flex.justify-content-between {
    gap: 6px;
    align-items: flex-start !important;
  }

  .tms-tour-package-guests__card--children label {
    min-width: 0;
    line-height: 1.2;
  }

  .tms-tour-package-guests__card--children li {
    gap: 8px;
    font-size: 11px !important;
    white-space: nowrap;
  }

  .tms-leads-content .table-responsive {
    overflow-x: auto;
  }

  .tms-leads-content table {
    min-width: 860px;
  }

  .tms-leads-content th,
  .tms-leads-content td {
    padding: 7px 8px !important;
    vertical-align: top;
  }

  .tms-leads-content .tms-leads-code-cell {
    min-width: 92px;
  }

  .tms-leads-content .tms-leads-code-cell .badge {
    padding: 5px 7px;
    font-size: 12px;
    line-height: 1.1;
    letter-spacing: 0;
  }

  .tms-leads-content .tms-leads-details-cell {
    width: 280px !important;
    min-width: 280px;
    max-width: 280px;
  }

  .tms-leads-content .tms-leads-details-wrap {
    max-width: 264px;
  }

  .tms-leads-content .tms-leads-details-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px !important;
  }

  .tms-leads-content .tms-leads-details-head > span.fw-bold {
    min-width: 0;
    font-size: 15px !important;
    line-height: 1.22;
    word-break: break-word;
  }

  .tms-leads-content .tms-leads-source-editors {
    max-width: 118px;
    gap: 4px !important;
  }

  .tms-leads-content .tms-leads-source-editors .badge,
  .tms-leads-content .tms-leads-source-editors .btn,
  .tms-leads-content .tms-leads-source-editors .form-control,
  .tms-leads-content .tms-leads-source-editors .form-select,
  .tms-leads-content .tms-leads-source-editors .multiselect,
  .tms-leads-content .tms-leads-source-editors .vs__dropdown-toggle {
    max-width: 118px;
    min-height: 26px;
    padding-top: 3px !important;
    padding-bottom: 3px !important;
    font-size: 11px !important;
    line-height: 1.15;
  }

  .tms-leads-content .tms-leads-details-wrap .tms-line-clamp-2 {
    max-width: 100%;
    font-size: 12px;
    line-height: 1.35;
  }

  .tms-leads-content .tms-leads-phone-cell {
    min-width: 156px;
    max-width: 156px;
  }

  .tms-leads-content .tms-leads-phone-cell .contact-info {
    max-width: 140px !important;
    font-size: 12px;
  }

  .tms-leads-content .tms-leads-phone-cell .contact-info .fw-medium {
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  .tms-leads-content .tms-leads-travel-date-cell {
    min-width: 118px;
  }

  .tms-leads-content .tms-leads-quotes-cell {
    min-width: 82px;
  }

  .tms-leads-content .sub-row-content,
  .tms-leads-content tr + tr td[colspan] {
    padding: 6px !important;
  }

  .tms-leads-content tr + tr td[colspan] > div {
    overflow-x: auto;
  }

  .tms-leads-content tr + tr .xxsmall {
    font-size: 10.5px !important;
    line-height: 1.25;
  }

  .tms-leads-content tr + tr .badge,
  .tms-leads-content tr + tr .btn {
    font-size: 11px !important;
  }
}

.tms-stats-sidebar-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1050;
  background: rgba(15, 23, 42, .12);
}

.tms-stats-right-sidebar {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 1051;
  display: flex;
  flex-direction: column;
  width: max-content;
  min-width: 360px;
  max-width: calc(100vw - 32px);
  height: 100vh;
  background: #ffffff;
  border-left: 1px solid #e2e8f0;
  box-shadow: -16px 0 36px rgba(15, 23, 42, .18);
}

.tms-stats-right-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  color: #0f172a;
  border-bottom: 1px solid #e2e8f0;
}

.tms-stats-right-sidebar-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 12px;
}

@media (max-width: 576px) {
  .tms-stats-right-sidebar {
    width: 100vw;
    min-width: 0;
    max-width: 100vw;
  }
}

.b2b-agent-revenue-report .month-grid {
  max-height: 230px;
  overflow-y: auto;
}

.b2b-agent-revenue-report .month-grid.expanded {
  max-height: none;
}

.b2b-agent-revenue-report .month-section {
  position: relative;
}

.b2b-agent-revenue-report .month-card {
  min-height: 118px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.b2b-agent-revenue-report .month-card.active {
  border-color: #198754;
  background: #effaf3;
  box-shadow: 0 4px 12px rgba(25, 135, 84, .12);
}

.b2b-agent-revenue-report .month-expand-toggle {
  position: absolute;
  right: 10px;
  bottom: 8px;
  z-index: 2;
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.b2b-agent-revenue-report .revenue-table th {
  white-space: nowrap;
}

.b2b-agent-revenue-report .revenue-breakdown {
  color: #64748b;
  font-size: 10px;
  line-height: 1.25;
  white-space: nowrap;
}

.b2b-agent-revenue-report .quote-breakdown {
  display: inline-flex;
  justify-content: center;
  gap: 3px;
  flex-wrap: wrap;
  max-width: 140px;
  font-size: 10px;
  line-height: 1.2;
}

.b2b-agent-revenue-report .booking-count-badge {
  min-width: 34px;
  padding: 5px 9px;
  font-size: 12px;
  box-shadow: 0 4px 10px rgba(25, 135, 84, .18);
}

.b2b-agent-revenue-report .agent-sales-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 280px;
}

.b2b-agent-revenue-report .sales-total-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.b2b-agent-revenue-report .agent-sales-tooltip {
  min-width: 360px;
  max-width: 460px;
}

.b2b-agent-revenue-report .agent-sales-tooltip-table-wrap {
  overflow: hidden;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
}

.b2b-agent-revenue-report .agent-sales-tooltip-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.b2b-agent-revenue-report .agent-sales-tooltip-table th {
  padding: 7px 9px;
  color: #475569;
  background: #f1f5f9;
  border-bottom: 1px solid #dbe4f0;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 10px;
}

.b2b-agent-revenue-report .agent-sales-tooltip-table td {
  padding: 7px 9px;
  border-bottom: 1px solid #edf2f7;
  vertical-align: middle;
}

.b2b-agent-revenue-report .agent-sales-tooltip-table tbody tr:last-child td {
  border-bottom: 0;
}

.b2b-agent-revenue-report .agent-sales-tooltip-table tbody tr:hover td {
  background: #f8fafc;
}

.b2b-agent-revenue-report .agent-sale-staff-cell {
  min-width: 170px;
}

.b2b-agent-revenue-report .agent-sale-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px 2px 2px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1;
}

.b2b-agent-revenue-report .agent-sale-count {
  color: #198754;
  font-weight: 800;
  white-space: nowrap;
}

.b2b-agent-revenue-report .agent-sale-revenue {
  color: #111827;
  font-weight: 800;
  white-space: nowrap;
}

.b2b-agent-revenue-report .booking-list {
  max-height: 340px;
  overflow-y: auto;
  border-top: 1px solid #e5e7eb;
}

.b2b-agent-revenue-report .booking-row {
  border-bottom: 1px solid #eef2f7;
}

.company-name-cell {
  min-width: 260px;
  line-height: 1.25;
}

.company-name-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.company-list-logo-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 42px;
  overflow: hidden;
  border-radius: 5px;
  background: #ffffff;
}

.company-list-logo-img {
  width: 100%;
  max-width: 74px;
  max-height: 34px;
  object-fit: contain;
}

.company-list-logo-empty {
  color: #94a3b8;
  background: #f8fafc;
  border: 1px dashed #dbe4f0;
  font-size: 18px;
}

.tms-row-title {
  color: #111827;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.25;
}

.company-name-body {
  min-width: 0;
}

.company-name-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex-wrap: wrap;
}

.company-name-cell .company-name-title {
  min-width: 0;
  overflow: hidden;
  text-transform: uppercase;
  text-overflow: ellipsis;
}

.company-name-cell .company-code-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  color: #b42318;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.company-name-cell .company-name-meta {
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
}

.company-type-source-cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 190px;
}

.company-name-cell .company-name-source {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 260px;
  margin-top: 5px;
}

.company-type-source-cell .company-name-source {
  margin-top: 0;
}

.company-name-cell .company-source-editor {
  min-width: 0;
  flex: 1 1 auto;
}

.company-list-markup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  max-width: 100%;
}

.company-list-markup-title {
  color: #475569;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.company-list-markup-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 3px 7px;
  border: 1px solid #dbe4f0;
  border-radius: 999px;
  color: #64748b;
  background: #f8fafc;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.1;
  white-space: nowrap;
}

.company-list-markup-chip strong {
  color: #0f172a;
  font-weight: 800;
}

.company-list-option-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 25px;
  padding: 4px 7px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #475569;
  background: #ffffff;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.15;
}

.company-list-option-chip .badge {
  min-height: 17px;
  padding: 2px 5px;
  font-size: 9.5px !important;
  font-weight: 750;
  line-height: 1;
}

.company-list-option-chip .btn {
  min-height: 22px;
  padding: 2px 6px;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.1;
}

.company-copy-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .company-name-cell {
    min-width: 220px;
    max-width: 260px;
  }

  .company-name-main {
    gap: 8px;
    align-items: flex-start;
  }

  .company-list-logo-cell {
    width: 64px;
    height: 36px;
  }

  .company-list-logo-img {
    max-width: 60px;
    max-height: 30px;
  }

  .company-name-heading {
    gap: 5px;
  }

  .company-name-cell .company-name-title {
    max-width: 190px;
    font-size: 14px;
    line-height: 1.22;
  }

  .company-name-cell .company-code-badge {
    min-height: 18px;
    padding: 2px 6px;
    font-size: 10px;
  }

  .company-name-cell .company-name-source {
    max-width: 100%;
    margin-top: 4px;
    gap: 5px;
  }

  .company-type-source-cell {
    min-width: 170px;
    gap: 4px;
  }

  .company-type-source-cell .company-name-source {
    margin-top: 0;
  }

  .company-list-markup {
    gap: 4px;
  }

  .company-list-markup-title {
    flex: 0 0 100%;
    font-size: 10.5px;
  }

  .company-list-markup-chip {
    min-height: 24px;
    padding: 4px 7px;
    font-size: 12px;
  }

  .company-list-option-chip {
    min-height: 24px;
    padding: 4px 6px;
    font-size: 11px;
  }

  .company-list-option-chip .badge {
    min-height: 16px;
    padding: 2px 5px;
    font-size: 9px !important;
  }

  .company-copy-login-btn {
    min-height: 24px;
    padding: 3px 6px !important;
    font-size: 10px;
    font-weight: 650;
  }

  .company-copy-login-btn i {
    font-size: 11px;
  }

  .company-copy-login-btn .ms-1 {
    margin-left: 0 !important;
  }
}

.company-sales-take-care {
  min-height: 24px;
}

.company-sales-take-care .company-sales-avatars {
  padding: 2px 6px 2px 2px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
}

.company-sales-take-care .company-sales-avatars > * {
  margin-right: -5px;
}

.company-sales-take-care .company-sales-avatars > *:last-child {
  margin-right: 0;
}

.company-sales-take-care .company-sales-label {
  color: #475569;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
}

.company-staff-count {
  min-height: 24px;
  padding: 3px 8px;
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}
.tms-expense-type-editor .tms-expense-type-edit-btn {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-2px);
  transition: opacity .15s ease, visibility .15s ease, transform .15s ease;
}

.tms-expense-type-editor:hover .tms-expense-type-edit-btn,
.tms-expense-type-editor:focus-within .tms-expense-type-edit-btn,
.tms-expense-type-editor .tms-expense-type-edit-btn.is-editing {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.tms-inline-edit-pencil .tms-inline-edit-pencil-btn {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-2px);
  transition: opacity .15s ease, visibility .15s ease, transform .15s ease;
}

.tms-inline-edit-pencil:hover .tms-inline-edit-pencil-btn,
.tms-inline-edit-pencil:focus-within .tms-inline-edit-pencil-btn,
.tms-inline-edit-pencil--always .tms-inline-edit-pencil-btn,
.tms-inline-edit-pencil .tms-inline-edit-pencil-btn.is-editing,
.tms-inline-edit-pencil .tms-inline-edit-pencil-btn.isEditing,
.tms-inline-edit-pencil-btn.isEditing {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.tms-inline-edit-pencil .tms-inline-edit-pencil-field {
  min-width: 180px;
}

.tms-inline-edit-pencil .tms-inline-edit-pencil-field--textarea {
  width: min(360px, 42vw);
  min-width: 240px;
}

.tms-inline-edit-pencil .tms-inline-edit-pencil-field--textarea textarea {
  min-height: 34px;
  max-height: 92px;
  padding: 5px 7px;
  font-size: 12.5px;
  line-height: 1.35;
  resize: vertical;
}

.tms-inline-edit-pencil-textarea-preview {
  display: inline-block;
  max-width: 320px;
  color: #475569;
  font-size: 12.5px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.tms-inline-edit-pencil-tooltip {
  background: #ffffff !important;
  border-color: #dbe4f0 !important;
}

.tms-inline-edit-pencil-popup-field {
  min-width: 0;
  max-width: 100%;
}

.tms-inline-edit-pencil-popup-field textarea {
  min-height: 72px;
  max-height: 180px;
  resize: vertical;
}

/* Note gọn ngoài list (VD Sale Note / Agent Note ở sub row tms-b2b-agents-management): 1 dòng, dài thì
   cắt bằng "...", sửa trong tms-tooltip bằng bút chì. Hộp rộng cố định để note dài không kéo giãn cả hàng. */
.tms-note-compact-box {
  flex: 0 1 240px;
  width: 240px;
  min-width: 0;
}
.tms-note-compact {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.tms-note-compact__text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  cursor: pointer;
}
.tms-note-compact__text--filled {
  padding: 2px 6px;
  color: #333;
  background-color: #fff8c4;        /* cùng tông note-google-style */
  border-left: 4px solid #f4d03f;
  border-radius: 0.375rem;
}

@media (max-width: 767.98px) {
  .tms-inline-edit-pencil .tms-inline-edit-pencil-field--textarea {
    width: 100%;
    min-width: 180px;
  }

  .tms-inline-edit-pencil-textarea-preview {
    max-width: 220px;
  }
}

.tms-component-tab-wrap {
  position: sticky;
  top: var(--tms-component-tab-sticky-top, 80px);
  z-index: 1020;
  margin: 0 0 8px;
  padding: 4px 0 2px;
  background: #ffffff;
}

.tms-template-tab-menu-sticky {
  position: sticky;
  top: var(--tms-component-tab-sticky-top, 80px);
  z-index: 1022;
  margin-bottom: 4px;
  padding: 3px 0 1px;
  background: #f3f4f6;
}

.tms-template-tab-menu-sticky .tms-component-tab-wrap {
  position: relative;
  top: auto;
  z-index: auto;
  margin: 0;
  padding: 0;
  background: transparent;
}

.tms-component-tab-mobile {
  display: none;
}

.tms-component-tab-menu-desktop-wrap {
  position: relative;
}

.tms-component-tab-fade {
  position: absolute;
  top: 6px;
  bottom: 6px;
  width: 22px;
  z-index: 1;
  pointer-events: none;
}

.tms-component-tab-fade-left {
  left: 1px;
  border-radius: 8px 0 0 8px;
  background: linear-gradient(to right, #ffffff, rgba(255, 255, 255, 0));
}

.tms-component-tab-fade-right {
  right: 1px;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(to left, #ffffff, rgba(255, 255, 255, 0));
}

.tms-component-tab-scroll-btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 999px;
  color: #94a3b8;
  background: transparent;
  box-shadow: none;
  font-size: 10px;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color .15s ease, background-color .15s ease;
}

.tms-component-tab-scroll-btn:hover {
  color: #1d4ed8;
  background: #eff6ff;
}

.tms-component-tab-scroll-left {
  left: 2px;
}

.tms-component-tab-scroll-right {
  right: 2px;
}

.tms-component-tab-menu {
  display: flex;
  flex-wrap: nowrap !important;
  gap: 0;
  margin: 0;
  padding: 5px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, .42) transparent;
  -webkit-overflow-scrolling: touch;
}

.tms-component-tab-menu.nav-tabs {
  border-bottom: 1px solid #e2e8f0;
}

.tms-component-tab-menu .nav-item {
  position: relative;
  flex: 0 0 auto;
}

.tms-component-tab-menu .nav-item + .nav-item {
  margin-left: 5px;
  padding-left: 8px;
}

.tms-component-tab-menu .nav-item + .nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 1px;
  background: rgba(148, 163, 184, .48);
}

.tms-component-tab-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid transparent !important;
  border-radius: 7px !important;
  color: #475569 !important;
  background: transparent !important;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.15;
  white-space: nowrap;
  box-shadow: none;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.tms-component-tab-link::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 3px;
  height: 2px;
  border-radius: 999px;
  background: transparent;
}

.tms-component-tab-link:hover {
  color: #1d4ed8 !important;
  border-color: #dbeafe !important;
  background: #f8fbff !important;
}

.tms-component-tab-link.active {
  color: #1d4ed8 !important;
  border-color: #bfdbfe !important;
  background: #eff6ff !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .10);
}

.tms-component-tab-link.active::before {
  background: #2563eb;
}

.tms-component-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  color: #64748b;
  background: #f1f5f9;
  font-size: 11px;
  line-height: 1;
}

.tms-component-tab-link.active .tms-component-tab-icon {
  color: #ffffff;
  background: #2563eb;
}

.tms-component-tab-title {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tms-expense-type-tree {
  min-width: 190px;
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
}

.tms-expense-type-tree-parent {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
}

.tms-expense-type-tree-children {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid #dbe4f0;
}

.tms-expense-type-tree-child {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
}

.tms-expense-type-tree-child .badge {
  padding: 2px 5px;
  border-color: #dbe4f0 !important;
  color: #64748b !important;
  box-shadow: none;
}

.tms-expense-type-tree-branch {
  width: 8px;
  height: 1px;
  flex: 0 0 8px;
  background: #dbe4f0;
}

.tms-expense-type-tree-warning {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  margin-left: 16px;
  padding: 2px 6px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
}

.tms-expense-type-tree-warning i {
  font-size: 10px;
  color: #f59e0b;
}

@media (max-width: 767.98px) {
  .tms-template-tab-menu-sticky {
    top: var(--tms-component-tab-sticky-top, 80px);
    margin-bottom: 3px;
    padding: 2px 0 1px;
  }

  .tms-component-tab-wrap {
    margin-bottom: 4px;
    padding: 2px 0;
  }

  .tms-component-tab-menu-desktop {
    display: none;
  }

  .tms-component-tab-menu-desktop-wrap {
    display: none;
  }

  .tms-component-tab-mobile {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 5px;
    margin-bottom: 2px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
  }

  .tms-component-tab-active-mobile {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    justify-content: flex-start;
    border-color: transparent !important;
    background: #f8fafc !important;
    box-shadow: none;
  }

  .tms-component-tab-active-mobile .tms-component-tab-title {
    min-width: 0;
    max-width: 100%;
  }

  .tms-component-tab-more {
    margin-left: auto;
    flex: 0 0 auto;
  }

  .tms-component-tab-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 32px;
    padding: 0;
    border: 1px solid #dbe4f0;
    border-radius: 7px;
    color: #475569;
    background: #f8fafc;
    box-shadow: none;
  }

  .tms-component-tab-more-btn:hover,
  .tms-component-tab-more-btn:focus {
    color: #1d4ed8;
    border-color: #bfdbfe;
    background: #eff6ff;
  }

  .tms-component-tab-dropdown {
    min-width: 220px;
    max-width: min(320px, calc(100vw - 24px));
    max-height: 70vh;
    padding: 6px;
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .14);
  }

  .tms-component-tab-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 35px;
    padding: 7px 8px;
    border-radius: 7px;
    color: #334155;
    font-size: 14px;
    font-weight: 750;
  }

  .tms-component-tab-dropdown-item:hover {
    color: #1d4ed8;
    background: #eff6ff;
  }

  .tms-component-tab-dropdown-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    border-radius: 5px;
    color: #475569;
    background: #e2e8f0;
    font-size: 10px;
  }

  .tms-component-tab-dropdown-item:hover .tms-component-tab-dropdown-icon {
    color: #ffffff;
    background: #2563eb;
  }

  .tms-component-tab-menu {
    gap: 4px;
    padding: 4px;
    margin-bottom: 2px;
  }

  .tms-component-tab-menu .nav-item + .nav-item::before {
    display: none;
  }

  .tms-component-tab-menu .nav-item + .nav-item {
    margin-left: 0;
    padding-left: 0;
  }

  .tms-component-tab-link {
    min-height: 32px;
    padding: 6px 8px;
    font-size: 13px;
    font-weight: 750;
  }

  .tms-component-tab-icon {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }

  .tms-component-tab-link::before {
    display: none;
  }
}

.tms-team-table-chip,
.tms-team-table-chip.badge,
.tms-team-table-chip .badge,
.tms-team-table-chip.xxsmall,
.tms-team-table-chip .xxsmall {
  font-size: 12px !important;
  line-height: 1.15 !important;
}

.tms-booking-profile-tab-icons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

.tms-booking-profile-tab-icon {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 4px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.tms-booking-profile-tab-icon i {
  color: #2563eb;
  font-size: 11px;
}

.calendar-row-sort-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #ffffff;
}

.calendar-row-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 10px;
  border: 0;
  border-radius: 6px;
  color: #64748b;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.calendar-row-sort-btn:hover {
  color: #0f172a;
  background: #f8fafc;
}

.calendar-row-sort-btn.active {
  color: #1d4ed8;
  background: #eff6ff;
  box-shadow: inset 0 -2px 0 #2563eb;
}

.tms-booking-profile-tab-icon.is-payment {
  color: #dc2626;
  background: #fef2f2;
  border-color: #fecaca;
}

.tms-booking-profile-tab-icon.is-payment i {
  color: #dc2626;
}

.tms-booking-profile-tab-icon.is-receipt {
  color: #16a34a;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.tms-booking-profile-tab-icon.is-receipt i {
  color: #16a34a;
}

.tms-soft-delete-toggle {
  flex: 0 0 auto;
  min-height: 24px;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.1;
  letter-spacing: 0;
  white-space: nowrap;
  text-transform: none !important;
}

.tms-soft-delete-toggle .bi {
  font-size: 12px;
  line-height: 1;
}

.tms-service-destination-field .vs__dropdown-toggle {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.tms-service-destination-field .vs__selected,
.tms-service-destination-field .vs__search {
  color: #1d4ed8;
  font-weight: 800;
}

.tms-services-content .table-responsive,
.tms-services-content table,
.tms-services-content tbody,
.tms-services-content tr,
.tms-services-content td {
  overflow: visible !important;
}

.tms-service-code-inline-edit {
  position: relative;
  overflow: visible;
}

.tms-service-code-inline-edit:has(.vs--open) {
  z-index: 40;
}

.tms-service-code-inline-edit-field {
  width: 170px;
  min-width: 0;
  overflow: visible;
}

.tms-service-code-inline-edit-field .tms-inline-edit-pencil {
  width: 100%;
  justify-content: flex-end;
}

.tms-service-code-inline-edit-field .tms-inline-edit-pencil-field {
  width: 150px;
  overflow: visible;
}

.tms-service-code-inline-edit-field .v-select,
.tms-service-code-inline-edit-field .vs__dropdown-toggle {
  min-width: 150px;
}

.tms-service-code-inline-edit-field .vs--open {
  position: relative;
  z-index: 50;
}

.tms-service-code-inline-edit-field .vs__dropdown-menu {
  z-index: 1080 !important;
}

.tms-service-destination-inline .tms-inline-edit-pencil > span:not(.text-muted) {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  max-width: 150px;
  padding: 3px 8px;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tms-service-destination-inline .tms-inline-edit-pencil > span:not(.text-muted)::before {
  content: "\F3E8";
  flex: 0 0 auto;
  font-family: "bootstrap-icons";
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
}

.tms-service-vendor-inline .tms-inline-edit-pencil-btn {
  width: 22px;
  height: 22px;
  min-width: 22px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.tms-service-vendor-inline .tms-inline-edit-pencil-btn .bi {
  font-size: 12px;
  line-height: 1;
}

.tms-service-detail-tabs-bar {
  border-bottom: 1px solid #e2e8f0;
}

.tms-service-detail-tabs.tms-form-tabs.nav-tabs {
  border-bottom: 0;
  scrollbar-width: none;
}

.tms-service-detail-tabs.tms-form-tabs.nav-tabs::-webkit-scrollbar {
  display: none;
}

.tms-service-detail-tabs .tms-form-tab-link.nav-link {
  min-height: 30px;
  padding-bottom: 7px;
  font-size: 12.5px;
}

.tms-booking-services-scroll {
  max-width: 100%;
}

/* ===== Booking Services Overview (tms-bookings.php - field "booking_services") ===== */
.tms-bkg-svc-overview {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  margin-bottom: 14px;
  overflow: hidden;
}
.tms-bkg-svc-overview__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  user-select: none;
}
.tms-bkg-svc-overview__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  color: #0f172a;
}
.tms-bkg-svc-overview__title .bi { color: #2563eb; }
.tms-bkg-svc-overview__body {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 14px;
  padding: 12px;
}
/* 8 / 4 columns (side đủ rộng cho 2 nút cùng 1 dòng) */
.tms-bkg-svc-overview__main { flex: 2 1 360px; min-width: 0; }
.tms-bkg-svc-overview__side {
  flex: 1 1 260px;
  min-width: 0;
  max-width: 100%;
  border-left: 1px solid #eef2f7;
  padding-left: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (max-width: 991.98px) {
  .tms-bkg-svc-overview__side {
    flex-basis: 100%;
    border-left: 0;
    border-top: 1px dashed #e5e7eb;
    padding-left: 0;
    padding-top: 12px;
  }
}

/* 6 KPI tiles */
.tms-bkg-svc-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tms-bkg-svc-kpi {
  flex: 1 1 100px;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  padding: 7px 9px;
  background: #fafcff;
  min-width: 0;
}
.tms-bkg-svc-kpi--wide { flex: 2 1 200px; }
.tms-bkg-svc-kpi__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}
.tms-bkg-svc-kpi__label .bi { font-size: 10px; opacity: .8; }
.tms-bkg-svc-kpi__value {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  margin-top: 1px;
}
.tms-bkg-svc-kpi__value.is-warn { color: #b45309; }
.tms-bkg-svc-kpi__value.is-ok { color: #15803d; }
.tms-bkg-svc-kpi__sub { font-size: 10.5px; color: #94a3b8; }
.tms-bkg-svc-kpi__sub .is-ok { color: #15803d; font-weight: 700; }
.tms-bkg-svc-kpi__sub .is-warn { color: #b45309; font-weight: 700; }
.tms-bkg-svc-kpi__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 3px;
}
.tms-bkg-svc-kpi__chips .badge {
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 6px;
}
.tms-bkg-svc-kpi__chips .badge .bi { font-size: 8px; }
/* progress khi Add All / Clean All đang chạy (ô KPI "Documents") */
.tms-bkg-kpi-progress {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #e0edff;
  color: #1d4ed8;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
.tms-bkg-kpi-progress.is-danger { background: #fee2e2; color: #b91c1c; }
.tms-bkg-kpi-progress .spinner-border {
  width: 9px; height: 9px; border-width: 1.5px;
}
.tms-bkg-kpi-delta {
  margin-left: 5px;
  font-size: 11px;
  font-weight: 800;
  color: #1d4ed8;
}

/* Operator actions (2 nút CÙNG 1 dòng) */
.tms-bkg-op-actions { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; }
.tms-bkg-op-btn {
  flex: 1 1 0;
  min-width: 110px;
  display: flex;
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 11.5px;
  line-height: 1.25;
}
.tms-bkg-op-btn .tms-bkg-op-btn__ico {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  font-size: 15px;
}
.tms-bkg-op-btn__main { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; flex: 1 1 auto; }
.tms-bkg-op-btn__sub { font-size: 10px; font-weight: 500; opacity: .85; margin-top: 1px; }
.tms-bkg-op-btn--add {
  background: #2563eb; border-color: #2563eb; color: #fff;
}
.tms-bkg-op-btn--add:hover:not(:disabled) { background: #1d4ed8; }
.tms-bkg-op-btn--add .tms-bkg-op-btn__ico { background: rgba(255,255,255,.20); }
.tms-bkg-op-btn--clean {
  background: #fff; border-color: #fecaca; color: #b91c1c;
}
.tms-bkg-op-btn--clean:hover:not(:disabled) { background: #fef2f2; border-color: #f87171; }
.tms-bkg-op-btn--clean .tms-bkg-op-btn__ico { background: #fee2e2; color: #b91c1c; }
.tms-bkg-op-btn:disabled { opacity: .55; cursor: not-allowed; }

@media (max-width: 767.98px) {
  .tms-booking-services-scroll {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }

  .tms-booking-services-scroll .tms-services-content {
    min-width: 980px;
  }

  .tms-booking-services-scroll .tms-services-content .table-responsive {
    min-width: 980px;
  }
}

.tms-service-detail-tabs .tms-form-tab-icon {
  font-size: 12px;
}

.tms-service-detail-tab-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.service-view-tabs.tms-form-tabs.nav-tabs {
  max-width: 100%;
  border-bottom-color: #e2e8f0;
}

.service-view-tabs .tms-form-tab-link.nav-link {
  min-height: 32px;
  padding-bottom: 8px;
  font-size: 12.75px;
}

.tms-booking-service-actions {
  padding-bottom: 6px;
  border-bottom: 1px solid #e2e8f0;
}

.tms-booking-service-action-link {
  min-height: 28px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8 !important;
  font-size: 12.5px;
  font-weight: 750;
  line-height: 1.1;
}

.tms-booking-service-action-link:hover {
  border-color: #93c5fd;
  background: #dbeafe;
  color: #0f3d91 !important;
}

.tms-service-prices-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
}

.tms-service-price-summary {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  gap: 7px;
  padding: 4px 6px 4px 8px;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  line-height: 1;
}

.tms-service-price-editor {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 680px);
  gap: 8px;
}

.tms-service-price-card {
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
}

.tms-service-price-card.is-sale {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.tms-service-price-card.is-operator {
  border-color: #bae6fd;
  background: #f0f9ff;
}

.tms-service-price-card.is-final {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.tms-service-price-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.tms-service-price-value {
  min-width: 0;
  color: #0f172a;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.15;
}

.tms-service-price-value .tms-inline-edit-pencil {
  max-width: 100%;
}

.tms-service-price-value .tms-inline-edit-pencil > span:not(.text-muted) {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.tms-service-subrow {
  border-top: 1px solid #e2e8f0;
}

.tms-service-subrow-item {
  padding: 8px 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.tms-service-items-overview {
  min-width: 360px;
}

.tms-service-item-lite {
  padding: 7px 8px;
  /* padding-right thò/thụt - mặc định 0 (icon edit/delete absolute nằm trong đây nhưng opacity:0,
     không chiếm chỗ nhìn thấy được), hover mới giãn ra nhường chỗ cho icon, đẩy nội dung text sang
     trái thay vì để icon đè lên nội dung. */
  padding-right: 8px;
  margin-bottom: 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .16s ease, padding-right .15s ease;
}

.tms-service-item-lite:hover,
.tms-service-item-lite:focus-within {
  padding-right: 56px;
}

.tms-service-item-lite:hover,
.tms-service-item-lite:focus-visible {
  border-color: #bfdbfe;
  background: #f8fbff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .08);
  transform: translateY(-1px);
  outline: none;
}

.tms-service-item-lite:last-of-type {
  margin-bottom: 0;
}

.tms-service-item-lite-action {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.tms-service-item-add-btn {
  min-height: 22px;
  padding: 2px 6px !important;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.1;
}

.tms-service-item-add-btn i {
  font-size: 10px;
}

.tms-service-item-parents {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  column-gap: 10px;
  align-items: flex-start;
  padding: 6px 0 9px;
  margin-bottom: 10px;
  border-bottom: 1px solid #e6edf5;
}

.tms-service-item-parents__label {
  padding-top: 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.2;
  text-transform: uppercase;
}

.tms-service-item-parents__content,
.tms-service-item-parents__line {
  min-width: 0;
}

.tms-service-item-parents__content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tms-service-item-parents__line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.tms-service-item-parents__line.is-detail {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 7px;
}

.tms-service-item-parents__line.is-detail .tms-service-item-parents__caption {
  padding-top: 5px;
}

.tms-service-item-parents__separator {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}

.tms-service-item-parents__caption {
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
}

.tms-service-item-parents__link,
.tms-service-item-parents__chip {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

.tms-service-item-parents__link {
  text-decoration: none !important;
}

.tms-service-item-parents__link.is-booking {
  color: #047857 !important;
  background: #dcfce7;
}

.tms-service-item-parents__link.is-service {
  color: #1d4ed8 !important;
  background: #e0ecff;
}

.tms-service-item-parents__chip {
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.tms-service-item-parents__chip.is-current-item {
  color: #334155;
  background: #f8fafc;
}

.tms-service-item-parents__chip.is-vendor {
  color: #047857;
  background: #dff4e8;
  border-color: #c7ead7;
}

.tms-service-item-parents__chip.is-missing {
  color: #dc2626;
  background: #fee2e2;
  border-color: #fecaca;
}

.tms-service-item-parents__inline-field {
  display: inline-flex;
  max-width: 100%;
  min-width: 0;
}

.tms-service-item-parents__inline-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.tms-service-item-parents__inline-field .tms-inline-edit-field__display {
  min-width: 0;
}

.tms-service-item-parents__inline-field .tms-inline-edit-field__value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tms-service-item-parents__inline-field .tms-inline-edit-field__pencil,
.tms-service-item-parents__inline-field .tms-inline-edit-field__close {
  width: 18px;
  height: 18px;
  min-width: 18px;
  padding: 0;
  font-size: 10px;
  line-height: 1;
}

.tms-service-item-parents__chip.is-service-type {
  color: #0f766e;
  background: #ccfbf1;
  border-color: #99f6e4;
}

.tms-service-item-parents__chip.is-service-sub-type {
  color: #334155;
  background: #eef2ff;
  border-color: #c7d2fe;
}

.tms-service-item-parents__chip.is-empty {
  color: #94a3b8;
  background: #f8fafc;
  border-color: #e2e8f0;
}

.tms-service-item-parents__chip.is-destination {
  color: #0f172a;
  background: #f8fafc;
  border-color: #cbd5e1;
}

.tms-service-item-stay-address {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  background: #f8fbff;
}

.tms-service-item-stay-address__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.tms-service-item-stay-address__mode {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.tms-service-item-stay-address__manual-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 19px;
  padding: 1px 5px;
  border: 1px solid #cbd5e1;
  color: #475569;
  background: #ffffff;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.15;
}

.tms-service-item-stay-address__manual-btn i {
  font-size: 10px;
  line-height: 1;
}

.tms-service-item-stay-address__manual-btn.active {
  color: #1d4ed8;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.tms-service-item-stay-address__select {
  min-height: 25px;
  padding-top: 2px;
  padding-bottom: 2px;
  color: #334155;
  font-size: 10.5px;
  font-weight: 600;
}

.tms-service-item-stay-address__select option {
  font-size: 11px;
  font-weight: 500;
}

.tms-service-item-stay-address__manual-input {
  min-height: 46px;
  color: #0f172a;
  background: #ffffff;
  border-color: #bfdbfe;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.35;
}

.tms-service-item-stay-address__main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.tms-service-item-stay-address__service {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #047857 !important;
  background: #dcfce7;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  text-decoration: none !important;
}

.tms-service-item-stay-address__name {
  min-width: 0;
  color: #334155;
  font-size: 11.5px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tms-service-item-stay-address__text {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-width: 0;
  padding: 3px 7px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  font-size: 11.5px;
  font-weight: 750;
  line-height: 1.2;
}

.tms-service-item-stay-address__text i {
  flex: 0 0 auto;
  color: #059669;
  font-size: 12px;
  line-height: 1;
}

.tms-service-item-stay-address__text span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tms-service-item-stay-address__warning {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  color: #b45309;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.tms-service-item-stay-address__warning.is-conflict {
  color: #dc2626;
}

.tms-service-destination-editor {
  min-width: 0;
}

.tms-service-destination-display {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  background: #ffffff;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.15;
}

.tms-service-destination-display.is-linked {
  color: #0f172a;
}

.tms-service-destination-display.is-unlinked {
  color: #dc2626;
  border-color: #fecaca;
  background: #fff7f7;
}

.tms-service-destination-display__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tms-service-destination-display__edit,
.tms-service-destination-editor__done {
  width: 18px;
  height: 18px;
  min-width: 18px;
  padding: 0;
  font-size: 10px;
  line-height: 1;
}

.tms-service-destination-editor__panel {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: min(310px, 100%);
  padding: 7px;
  border: 1px solid #dbe3ef;
  border-radius: 7px;
  background: #ffffff;
}

.tms-service-destination-editor__row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.tms-service-destination-editor__label {
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
}

.tms-service-vendor-editor {
  min-width: 0;
}

.tms-service-vendor-display {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  background: #ffffff;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.15;
}

.tms-service-vendor-display.is-linked {
  color: #1d4ed8;
}

.tms-service-vendor-display.is-unlinked {
  color: #dc2626;
  border-color: #fecaca;
  background: #fff7f7;
}

.tms-service-vendor-display__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tms-service-vendor-display__edit,
.tms-service-vendor-editor__done {
  width: 18px;
  height: 18px;
  min-width: 18px;
  padding: 0;
  font-size: 10px;
  line-height: 1;
}

.tms-service-vendor-editor__panel {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: min(360px, 100%);
  padding: 7px;
  border: 1px solid #dbe3ef;
  border-radius: 7px;
  background: #ffffff;
}

.tms-service-vendor-editor__row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: start;
  gap: 7px;
}

.tms-service-vendor-editor__label {
  padding-top: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
}

.tms-service-item-parents__destination-display {
  max-width: 260px;
  min-width: 0;
}

.tms-service-item-parents__destination-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tms-service-item-parents__edit-btn {
  width: 18px;
  height: 18px;
  min-width: 18px;
  padding: 0;
  font-size: 10px;
  line-height: 1;
}

.tms-service-item-parents__destination-tooltip {
  padding: 10px;
}

@media (max-width: 575.98px) {
  .tms-service-item-parents {
    grid-template-columns: 1fr;
    row-gap: 5px;
  }

  .tms-service-item-parents__label {
    padding-top: 0;
  }

  .tms-service-item-parents__line.is-detail {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 6px;
  }
}

.tms-service-overview-day-chip {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  padding: 4px 7px;
  border: 1px solid #dbe4f0;
  border-radius: 5px;
  background: #ffffff;
  line-height: 1.15;
}

.tms-service-overview-day-date,
.tms-service-overview-day-no,
.tms-service-overview-day-time {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.tms-service-overview-day-no {
  color: #475569;
}

.tms-service-overview-day-date {
  color: #1d4ed8;
}

.tms-service-overview-day-time {
  color: #b45309;
}

/* Badge "N item" / "N email" ở heading service row (tms-services list_row) — có thể bấm để
   mở accordion + tab tương ứng (openServiceRowItems / openServiceRowEmails). Hover đổi rõ để
   người dùng biết bấm được. */
.tms-svc-count-badge {
  cursor: pointer;
  transition: box-shadow .12s ease, transform .12s ease, filter .12s ease;
}
.tms-svc-count-badge:hover {
  filter: brightness(1.12);
  box-shadow: 0 2px 7px rgba(0, 0, 0, .28);
  transform: translateY(-1px);
}
.tms-svc-count-badge:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}
.tms-svc-count-badge:focus-visible {
  outline: 2px solid #0d6efd;
  outline-offset: 1px;
}

.tms-service-overview-inline .tms-inline-edit-pencil,
.tms-service-overview-note .tms-inline-edit-pencil {
  max-width: 100%;
}

.tms-service-overview-note .tms-inline-edit-pencil {
  display: flex;
  width: 100%;
}

.tms-service-overview-note .tms-inline-edit-pencil-field,
.tms-service-overview-note .tms-inline-edit-pencil-field--textarea {
  width: 100%;
  flex: 1 1 auto;
}

.tms-service-overview-note .note-google-style {
  display: block;
  width: 100%;
  padding: 6px 8px;
}

.tms-service-overview-note .text-muted {
  cursor: pointer;
}

.tms-form-section-header-fields .tms-service-item-template-picker {
  width: min(320px, 34vw);
  min-width: 220px;
}

.tms-form-section-header-fields .tms-service-item-template-picker .form-select {
  min-height: 32px;
  border-color: #cbd5e1;
  background-color: #ffffff;
  color: #334155;
  font-size: 12.5px;
  font-weight: 600;
}

.tms-service-item-auto-content-row {
  margin-bottom: 6px;
  color: #64748b;
  font-size: 11.5px;
  line-height: 1.25;
}

.tms-service-item-auto-content-note {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.tms-service-item-auto-content-note .fw-semibold {
  color: #334155;
}

.tms-service-item-auto-content-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
}

.tms-service-item-auto-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 28px;
  height: 16px;
  margin: 0;
  cursor: pointer;
}

.tms-service-item-auto-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tms-service-item-auto-switch span {
  position: relative;
  display: block;
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background-color .15s ease;
}

.tms-service-item-auto-switch span::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .25);
  transition: transform .15s ease;
}

.tms-service-item-auto-switch input:checked + span {
  background: #2563eb;
}

.tms-service-item-auto-switch input:checked + span::after {
  transform: translateX(12px);
}

.tms-service-item-auto-switch input:disabled + span {
  opacity: .55;
  cursor: not-allowed;
}

.tms-service-item-auto-content-description {
  color: #64748b;
  font-size: 11px;
  font-weight: 400;
}

.tms-calc-mode-select {
  min-width: 132px;
}

.tms-calc-mode-select .vs__dropdown-toggle {
  min-height: 30px;
  padding: 2px 6px;
  border-color: #dbe4ef;
  background: #ffffff;
}

.tms-calc-mode-select .vs__selected {
  width: auto;
  min-width: 0;
  color: #334155;
  font-size: 12.5px;
  font-weight: 700;
}

.tms-calc-mode-select .vs__actions {
  padding: 0 2px 0 4px;
}

.tms-calc-mode-option {
  gap: 5px;
  font-size: 12.5px;
  font-weight: 700;
}

.tms-service-item-calc-note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 4px 7px;
  border-radius: 4px;
  color: #92400e;
  background: #fff7ed;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
}

.tms-service-item-content-editor {
  margin-top: 8px;
  padding: 10px 12px 12px;
  border: 0;
  border-radius: 0;
  background: #f8fbff;
  box-shadow: none;
}

.tms-service-item-content-editor__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  color: #475569;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tms-service-item-content-editor__label i {
  font-size: 13px;
}

.tms-service-item-content-editor textarea,
.tms-service-item-content-editor input,
.tms-service-item-content-editor [contenteditable="true"] {
  min-height: 52px;
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.tms-service-item-content-editor .note-editor,
.tms-service-item-content-editor .tox,
.tms-service-item-content-editor .tox-tinymce {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.tms-service-item-content-editor .tox-edit-area__iframe,
.tms-service-item-content-editor .tox .tox-edit-area,
.tms-service-item-content-editor .note-editable {
  background: transparent !important;
}

.tms-service-note-template-editor,
.tms-service-note-template-editor textarea,
.tms-service-note-template-editor input,
.tms-service-note-template-editor [contenteditable="true"] {
  color: #475569 !important;
  background: #f8fafc !important;
}

.tms-service-note-template-editor .note-editor,
.tms-service-note-template-editor .tox,
.tms-service-note-template-editor .tox-tinymce {
  border-color: #dbe5f0 !important;
  background: #f8fafc !important;
}

.tms-service-note-template-editor .note-editable,
.tms-service-note-template-editor .tox-edit-area__iframe,
.tms-service-note-template-editor .tox .tox-edit-area {
  background: #f8fafc !important;
}

.tms-service-item-template-collapse {
  position: relative;
  min-width: 0;
  padding: 7px 36px 7px 10px;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  background: #f8fbff;
}

.tms-service-item-template-collapse.is-note {
  border-color: #fde68a;
  background: #fffbeb;
}

.tms-service-item-template-collapse__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.tms-service-item-template-collapse__title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #1e40af;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.tms-service-item-template-collapse.is-note .tms-service-item-template-collapse__title {
  color: #b45309;
}

.tms-service-item-template-collapse__hint {
  min-width: 0;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tms-service-item-template-collapse__body {
  margin-top: 7px;
}

.tms-service-item-template-collapse__body.is-inside-field {
  padding-right: 28px;
}

.tms-service-item-template-collapse__textarea {
  min-height: 58px;
  color: #475569;
  background: #f8fafc;
  border-color: #dbeafe;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.35;
  resize: vertical;
}

.tms-service-item-template-collapse__textarea.is-note {
  background: #fffbeb;
  border-color: #fde68a;
}

.tms-service-item-note-editor {
  position: relative;
}

.tms-service-item-template-collapse__toggle {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 22px;
  padding: 0;
  color: #475569;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .08);
}

.tms-service-item-template-collapse__toggle i {
  font-size: 12px;
  line-height: 1;
}

@media (max-width: 767.98px) {
  .tms-form-section-header {
    flex-wrap: wrap;
  }

  .tms-form-section-header-fields,
  .tms-form-section-header-fields .tms-service-item-template-picker {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 767.98px) {
  .tms-service-prices-footer,
  .tms-service-price-summary {
    align-items: stretch;
    width: 100%;
  }

  .tms-service-price-summary {
    justify-content: space-between;
  }

  .tms-service-price-editor {
    grid-template-columns: 1fr;
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  .tms-team-table-chip,
  .tms-team-table-chip.badge,
  .tms-team-table-chip .badge,
  .tms-team-table-chip.xxsmall,
.tms-team-table-chip .xxsmall {
    font-size: 12.5px !important;
    line-height: 1.2 !important;
  }
}

.tms-date-range-field {
  flex-wrap: wrap;
}

.tms-date-range-input-group {
  width: auto;
  flex-wrap: nowrap;
}

.tms-date-range-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  padding-inline: 0;
  color: #475569;
  background: #f8fafc;
}

.tms-date-range-open-btn:hover {
  color: #1d4ed8;
  background: #eef5ff;
}

.tms-service-item-final-expense {
  margin-top: 8px;
  padding: 10px 12px;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}

.tms-service-item-final-expense-value {
  color: #111827;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
  text-align: right;
}

.tms-service-item-price-formula {
  margin-top: 4px;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.25;
}

.tms-section-soft-panel .tms-service-item-price-formula {
  color: #475569;
}

.tms-template-variable-panel {
  padding: 10px 12px;
  border: 1px solid #dbe5f0;
  border-radius: 6px;
  background: #ffffff;
}

.tms-template-variable-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  margin: 0 -2px 8px;
  padding-bottom: 2px;
  overflow-x: auto;
  border-bottom: 1px solid #e5edf6;
}

.tms-template-variable-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 28px;
  padding: 4px 8px 6px;
  border: 0;
  color: #64748b;
  background: transparent;
  font-size: 11.5px;
  font-weight: 750;
  line-height: 1.15;
}

.tms-template-variable-tab::after {
  position: absolute;
  right: 8px;
  bottom: -3px;
  left: 8px;
  height: 2px;
  border-radius: 999px;
  background: transparent;
  content: "";
}

.tms-template-variable-tab span {
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 999px;
  color: #64748b;
  background: #f1f5f9;
  font-size: 10.5px;
  font-weight: 800;
  text-align: center;
}

.tms-template-variable-tab:hover {
  color: #1d4ed8;
  background: #f8fbff;
}

.tms-template-variable-tab.active {
  color: #0f172a;
}

.tms-template-variable-tab.active::after {
  background: #2563eb;
}

.tms-template-variable-tab.active span {
  color: #1d4ed8;
  background: #dbeafe;
}

.tms-template-variable-tab-body {
  max-height: 260px;
  overflow: auto;
}

.tms-template-variable-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tms-template-variable-group-title {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.7;
  text-transform: uppercase;
}

.tms-template-variable-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid #dbeafe;
  border-radius: 5px;
  color: #1e40af;
  background: #f8fbff;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.15;
}

.tms-template-variable-chip code {
  color: #0f172a;
  font-size: 11px;
  font-weight: 700;
}

.tms-template-variable-chip span {
  color: #64748b;
  font-weight: 500;
}

.tms-template-variable-chip:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.tms-template-variable-row {
  display: grid;
  grid-template-columns: minmax(142px, 0.8fr) minmax(120px, 0.7fr) minmax(180px, 1.5fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #334155;
  background: transparent;
  font-size: 11.5px;
  text-align: left;
}

.tms-template-variable-row code {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: #1d4ed8;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
}

.tms-template-variable-row-label {
  min-width: 0;
  color: #0f172a;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tms-template-variable-row small {
  min-width: 0;
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tms-template-variable-row:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.tms-console-admin-toggle {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  background: #ffffff;
  border-color: #dbe5f0 !important;
}

.tms-console-admin-toggle:hover,
.tms-console-admin-toggle:focus {
  color: #0d6efd;
  background: #f8fbff;
  border-color: #bfdbfe !important;
}

.tms-console-admin-dropdown {
  min-width: 340px;
  max-width: min(440px, calc(100vw - 24px));
  padding: 8px;
  border: 1px solid #dbe5f0;
  border-radius: 6px;
}

.tms-console-admin-dropdown-title {
  margin-bottom: 5px;
  padding: 4px 8px 7px;
  color: #64748b;
  border-bottom: 1px solid #edf2f7;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.tms-console-admin-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 5px;
}

.tms-console-admin-item:hover,
.tms-console-admin-item:focus {
  background: #f8fafc;
}

.tms-console-admin-item-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  color: #0d6efd;
  background: #f1f5f9;
  border-radius: 5px;
}

.tms-console-admin-item-title {
  display: block;
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.tms-console-admin-item-desc {
  display: -webkit-box;
  margin-top: 2px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.2;
  white-space: normal;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tms-console-admin-group {
  align-items: center;
  margin-top: 3px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  font-weight: 800;
}

.tms-console-admin-group:hover,
.tms-console-admin-group:focus {
  background: #f1f5f9;
}

.tms-console-admin-group-chevron {
  color: #64748b;
  font-size: 11px;
  line-height: 1;
}

.tms-console-admin-group-count {
  min-width: 24px;
  height: 20px;
  padding: 0 7px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #475569;
  background: #e2e8f0;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.tms-console-admin-submenu {
  margin: 3px 0 6px 12px;
  padding-left: 8px;
  border-left: 1px solid #e2e8f0;
}

.tms-console-admin-subitem {
  padding: 6px 7px;
}

.tms-console-admin-subitem .tms-console-admin-item-icon {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  border-radius: 4px;
}

@media (max-width: 767.98px) {
  .tms-console-admin-dropdown {
    min-width: min(340px, calc(100vw - 24px));
  }
}

/* "Sort by" menu (header, cạnh nút Filter) - cùng kích thước/tỉ lệ với .tms-console-admin-* ở trên,
   tách class riêng vì đây là dropdown-item dạng list gọn (icon nhỏ hơn, không có description/count). */
.tms-sort-menu-dropdown {
  min-width: 260px;
  max-width: min(340px, calc(100vw - 24px));
  padding: 8px;
  border: 1px solid #dbe5f0;
  border-radius: 6px;
}

.tms-sort-menu-dropdown-title {
  margin-bottom: 5px;
  padding: 4px 8px 7px;
  color: #64748b;
  border-bottom: 1px solid #edf2f7;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.tms-sort-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 5px;
  font-size: 12px;
}

.tms-sort-menu-item:hover,
.tms-sort-menu-item:focus {
  background: #f8fafc;
}

.tms-sort-menu-item.active {
  color: #0d6efd;
  background: #f1f5f9;
  font-weight: 700;
}

.tms-sort-menu-item-icon {
  width: 20px;
  display: inline-flex;
  flex: 0 0 20px;
  align-items: center;
  justify-content: center;
  color: #64748b;
}

.tms-sort-menu-item.active .tms-sort-menu-item-icon {
  color: #0d6efd;
}

.tms-sort-menu-group {
  margin-top: 3px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  font-weight: 700;
}

.tms-sort-menu-group:hover,
.tms-sort-menu-group:focus {
  background: #f1f5f9;
}

.tms-sort-menu-group-chevron {
  margin-left: auto;
  color: #64748b;
  font-size: 11px;
  line-height: 1;
}

.tms-sort-menu-submenu {
  margin: 3px 0 6px 10px;
  padding-left: 8px;
  border-left: 1px solid #e2e8f0;
}

@media (max-width: 767.98px) {
  .tms-sort-menu-dropdown {
    min-width: min(280px, calc(100vw - 24px));
  }
}

@media (max-width: 767.98px) {
  .tms-service-item-final-expense {
    padding: 8px 10px;
  }

  .tms-service-item-final-expense-value {
    font-size: 18px;
  }

  .tms-service-item-price-formula {
    font-size: 11px;
  }

  .tms-template-variable-row {
    grid-template-columns: minmax(112px, .85fr) minmax(120px, 1fr);
    gap: 4px 8px;
  }

  .tms-template-variable-row small {
    grid-column: 1 / -1;
  }
}

/* tms-bookings: Booking Information / "Company / Leads / Tour Package" card
   (application/config/tms-booking-profiles.php, field booking_profile_card) */
.tms-booking-profile-card {
  border-radius: 10px;
}
.tms-booking-profile-summary {
  position: relative;
  padding-right: 40px;
}
/* Vị trí do .btn-toggle-readonly (tms-tour-package-guests.js.php) quyết định - class này chỉ
   dùng để đánh dấu, không set lại position/top/right để tránh đè lẫn nhau giữa 2 stylesheet. */
.tms-booking-profile-card-edit-btn {
  z-index: 5;
}
.tms-booking-profile-edit-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 10px 12px;
  flex: 1 1 260px;
  min-width: 260px;
}
.tms-booking-profile-item-card {
  position: relative;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 8px 32px 8px 10px;
  min-width: 180px;
  max-width: 260px;
  flex: 1 1 200px;
}
.tms-booking-profile-item-card--centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 10px;
  min-width: 140px;
  max-width: none;
  flex: 0 0 auto;
}
.tms-booking-profile-item-link {
  position: absolute;
  top: 4px;
  right: 4px;
}
.tms-booking-profile-item-label {
  font-size: .68rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: .02em;
  color: #6c757d;
  margin-bottom: 3px;
}
.tms-booking-profile-item-text {
  min-width: 0;
  flex: 1 1 auto;
}
.tms-booking-profile-item-line1 {
  font-weight: 700;
  font-size: .92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tms-booking-profile-item-line2 {
  font-size: .78rem;
  color: #6c757d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
/* Badge nổi bật ở góc phải dưới của .tms-booking-profile-item-card (VD company_code card Company,
   xem tms-booking-profiles.php) - khác .tms-booking-profile-item-link (icon, góc phải TRÊN). */
.tms-booking-profile-item-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  max-width: calc(100% - 8px);
  background: #0d6efd;
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1.4;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Valid/Invalid filter chip (tms-products.php quick_instances) - checkbox THẬT (dễ hiểu, quen
   thuộc), chỉ bọc trong 1 label bo tròn có màu để trông gọn/đẹp hơn checkbox trần. */
.tms-validity-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .75rem;
  font-weight: 600;
  padding: .2rem .6rem;
  border-radius: 999px;
  border: 1px solid #dee2e6;
  background-color: #f8f9fa;
  color: #6c757d;
  cursor: pointer;
  user-select: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.tms-validity-chip input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
}
.tms-validity-chip i {
  font-size: .9em;
}
.tms-validity-chip--valid {
  border-color: #bfe3d0;
  color: #198754;
}
.tms-validity-chip--valid input[type="checkbox"] {
  accent-color: #198754;
}
.tms-validity-chip--valid:hover {
  background-color: #e8f6ee;
}
.tms-validity-chip--valid.active {
  background-color: #d1e7dd;
  border-color: #198754;
  color: #146c43;
}
.tms-validity-chip--invalid {
  border-color: #f3c2c8;
  color: #dc3545;
}
.tms-validity-chip--invalid input[type="checkbox"] {
  accent-color: #dc3545;
}
.tms-validity-chip--invalid:hover {
  background-color: #fbe9eb;
}
.tms-validity-chip--invalid.active {
  background-color: #f8d7da;
  border-color: #dc3545;
  color: #b02a37;
}

/* Chữ "Theo bookings"/"Theo Vendors" (tms-svm-ops.js.php) - nổi bật hơn mặc định của
   .tms-form-tab-title (không đổi class dùng chung, chỉ thêm modifier riêng ở đây). */
.tms-svm-ops-tab-title-strong {
  font-weight: 700;
  font-size: 0.95rem;
}

/* Tabs LANDTOUR / ACCOMMODATION / ALL PRICES ở step "Get Prices" của smart design
   (step_prices.js.php, mở từ nút PRICES ở bottom menu tour package design). Modifier riêng
   .prices-tabs-compact - KHÔNG đổi .nav-tabs-custom-style dùng chung. Gọn hơn + bỏ kiểu "pill"
   fill đậm, chuyển sang gạch chân theo màu accent (accent set qua :style inline trong template). */
.nav-tabs.prices-tabs-compact {
  border-bottom: 1px solid #dee2e6;
  gap: 2px;
}
.prices-tabs-compact .nav-link.prices-tab {
  padding: 7px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #6c757d;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}
.prices-tabs-compact .nav-link.prices-tab:hover {
  color: #343a40;
  background: rgba(0, 0, 0, 0.03);
}
.prices-tabs-compact .nav-link.prices-tab.active {
  background: transparent;
}
.prices-tabs-compact .nav-link.prices-tab i {
  font-size: 0.9em;
}

/* ---- Step "Get Prices" (step_prices.js.php) - trình bày gọn & nhã hơn ---- */
.step-prices-pro { padding-top: 4px; }
.step-prices-pro .step-prices-guests { margin: 8px 0 12px; }

.step-prices-pro .step-prices-card {
  border: 1px solid #e6e8eb;
  border-radius: 8px;
  box-shadow: none;
  margin-top: 10px;
}
.step-prices-pro .step-prices-card > .card-header {
  display: flex;
  align-items: center;
  padding: 9px 16px;
  background: #fafbfc;
  border-bottom: 1px solid #edeff2;
}
.step-prices-pro .step-prices-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #495057;
}
.step-prices-pro .step-prices-card > .card-body { padding: 16px; }

.step-prices-pro .step-prices-subhead {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6c757d;
  margin-bottom: 10px;
}

/* Tiêu đề option accommodation (🏨 Standard/Deluxe/Luxury) - component tms-accommodation-option
   dùng <h2 class="section-title"> để in ra A4 cho to; trong step Get Prices (modal) thu nhỏ lại. */
.step-prices-pro .section-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 0.25rem !important;
}

/* Hàng badge trong cột Title: tour_type + xe riêng của ngày (nếu có) - ép cùng size/height để
   không bị lệch, kể cả badge tour_type render qua render_badge_status() (system config). */
.landtour-prices .landtour-price-table .ltp-day-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.landtour-prices .landtour-price-table .ltp-day-badges .badge {
  font-size: 0.62rem !important;
  font-weight: 600;
  line-height: 1.35;
  padding: 0.25em 0.5em;
  white-space: nowrap;
}

/* tms-day-vehicle-select - chọn hạng xe (vehicle_seat) riêng cho 1 ngày. Dùng chung ở bảng
   Landtour prices, Brief Itinerary (step_itineraries) và cả 2 bản modal "Customize Prices".
   Icon: 📌 pin = đã ép tay, 🪄 magic = auto theo số khách (mặc định). */
.ltp-vehicle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 0.68rem;
  background-color: #f1f3f5;
  border: 1px solid #e2e5e9;
  border-radius: 999px;
  padding: 2px 8px 2px 6px;
}
.ltp-vehicle-select {
  width: auto;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.1rem 1.2rem 0.1rem 0.2rem;
  height: auto;
  line-height: 1.3;
  /* Badge nền xám đã lo phần nền/viền - select chỉ cần trong suốt, hoà vào badge chung */
  background-color: transparent;
  border: none;
  box-shadow: none;
}
.ltp-vehicle-select:focus {
  background-color: #fff;
  border: 1px solid #ced4da;
  box-shadow: none;
}
.ltp-vehicle-region {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
/* Không phải master_agent: chỉ xem, không có dropdown */
.ltp-vehicle-seat {
  font-size: 0.68rem;
}

/* tms-day-pax-select - ép số pax (adults/children/infants) riêng cho 1 ngày. Cùng phong cách pill
   với .ltp-vehicle để 2 control nằm cạnh nhau nhìn đồng bộ. */
.ltp-pax {
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  margin-right: 4px;
}
.ltp-pax-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  background-color: #f1f3f5;
  border: 1px solid #e2e5e9;
  border-radius: 999px;
  padding: 2px 8px;
  color: #495057;
  line-height: 1.4;
}
/* Nút dùng class "btn" của Bootstrap nhưng KHÔNG kèm biến thể màu (.btn-primary/.btn-light/...) -
   thiếu --bs-btn-hover-color nên hover ra chữ trắng trên nền xám nhạt (trắng trên trắng, không đọc
   được) - ép rõ màu chữ + nền ở mọi trạng thái để không lệ thuộc biến CSS mặc định của Bootstrap. */
.ltp-pax-btn:hover, .ltp-pax-btn:focus, .ltp-pax-btn:active {
  background-color: #e9ecef !important;
  color: #495057 !important;
  border-color: #e2e5e9 !important;
}
.ltp-pax-menu {
  min-width: 230px;
  font-size: 0.8rem;
}
.ltp-pax-menu-title {
  font-size: 0.78rem;
  cursor: pointer;
}
/* tms-tour-package-guests nhúng trong popup pax - vốn thiết kế cho khu vực rộng (Guest Select đầu
   step Prices), thu hẹp lại + xếp dọc cho vừa dropdown-menu nhỏ (~300px). */
.ltp-pax-guests .tms-tour-package-guests {
  flex-direction: column;
  gap: 8px;
  min-width: 260px;
}
.ltp-pax-guests .tms-tour-package-guests__card--total {
  display: none;
}
/* Không phải master_agent: chỉ xem, không sửa được */
.ltp-pax-readonly {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  background-color: #f1f3f5;
  border: 1px solid #e2e5e9;
  border-radius: 999px;
  padding: 2px 8px;
  color: #495057;
}

/* Bảng landtour theo ngày */
.landtour-prices .landtour-price-table { font-size: 0.86rem; margin-bottom: 0; }
.landtour-prices .landtour-price-table thead th {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #6c757d;
  background: #f6f7f9;
  border-bottom: 1px solid #e6e8eb;
}
.landtour-prices .landtour-price-table td,
.landtour-prices .landtour-price-table th { vertical-align: top; }
.landtour-prices .landtour-price-table tfoot th {
  background: #f6f7f9;
  font-size: 0.86rem;
}
/* Ô hiển thị giá per-pax (Addons breakdown / Landtour Prices / Sub Total + tfoot totals):
   chữ nhỏ gọn, mỗi dòng "Kid (5 yrs): 123 USD" KHÔNG xuống dòng. Bảng có overflow-x nếu tràn. */
.landtour-prices .landtour-price-table .ltp-money { font-size: 0.74rem; }
.landtour-prices .landtour-price-table .ltp-money div { white-space: nowrap; line-height: 1.5; }

/* Panel tổng giá / pax - đây là KẾT QUẢ chính của step nên để nổi bật (số to),
   chỉ phần khung xung quanh mới gọn. */
.landtour-prices .landtour-price-summary {
  border: 1px solid #e3e6ea;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.landtour-prices .landtour-price-summary__title {
  padding: 12px 20px;
  background: #f7f8fa;
  border-bottom: 1px solid #e9ebef;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6c757d;
}
.landtour-prices .landtour-price-summary__tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px;
}
.landtour-prices .landtour-price-tile {
  flex: 1 1 220px;
  min-width: 200px;
  border: 1px solid #e9ebef;
  border-top-width: 3px;
  border-radius: 10px;
  padding: 16px 20px;
  background: #fbfcfd;
}
.landtour-prices .landtour-price-tile--adult { border-top-color: #0d6efd; }
.landtour-prices .landtour-price-tile--kid { border-top-color: #198754; }
.landtour-prices .landtour-price-tile__label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #6c757d;
  margin-bottom: 8px;
}
.landtour-prices .landtour-price-tile__value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.landtour-prices .landtour-price-tile__cur {
  font-size: 1rem;
  font-weight: 600;
  color: #8a929b;
}
.landtour-prices .landtour-price-summary__note {
  margin: 0;
  padding: 0 20px 16px;
  font-size: 0.8rem;
  color: #b02a37;
}

/* Price breakdown tooltip (info icon trigger + popup) */
.ltp-breakdown-trigger {
  cursor: pointer;
  font-size: 0.85rem;
  opacity: 0.6;
  transition: opacity 0.15s ease;
}
.ltp-breakdown-trigger:hover {
  opacity: 1;
}
.ltp-breakdown-tooltip {
  position: fixed;
  z-index: 1080;
  max-height: 70vh;
  overflow-y: auto;
  min-width: 320px;
  max-width: 440px;
  padding: 10px 14px;
  background: #fffef1;
  border: 1px solid #e3dcc9;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  font-size: 0.78rem;
  line-height: 1.45;
  color: #212529;
}

/* FOC box - style giống landtour-price-summary */
.landtour-prices .landtour-foc {
  border: 1px solid #e3e6ea;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.landtour-prices .landtour-foc__head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  background: #f7f8fa;
  border-bottom: 1px solid #e9ebef;
}
.landtour-prices .landtour-foc__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #495057;
  cursor: pointer;
}
.landtour-prices .landtour-foc__toggle input { cursor: pointer; }
.landtour-prices .landtour-foc__qty {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 0.78rem;
}
.landtour-prices .landtour-foc__qty input { width: 64px; text-align: center; }
.landtour-prices .landtour-foc__body { padding: 14px 20px; }
.landtour-prices .landtour-foc__warn {
  font-size: 0.82rem;
  color: #b02a37;
}
.landtour-prices .landtour-foc .landtour-price-summary__tiles { padding: 0; margin-bottom: 12px; }

/* Khối giải thích cách tính FOC (số liệu động) */
.landtour-prices .landtour-foc__steps {
  background: #f8f9fb;
  border: 1px solid #edeff2;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 0.8rem;
  color: #495057;
}
.landtour-prices .landtour-foc__steps-title {
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: #6c757d;
  margin-bottom: 8px;
}
.landtour-prices .landtour-foc__steps-list {
  margin: 0;
  padding-left: 18px;
}
.landtour-prices .landtour-foc__steps-list li { margin-bottom: 4px; line-height: 1.5; }
.landtour-prices .landtour-foc__check {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #d7dbe0;
  font-size: 0.78rem;
  color: #198754;
}
.landtour-prices .landtour-foc__hint {
  font-size: 0.76rem;
  color: #6c757d;
  font-style: italic;
}

/* "Show addons price" toggle - card-header LANDTOUR PRICES (step Prices, chỉ master_agent) */
.step-prices-pro .ltp-show-addons-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 0.74rem;
  font-weight: 600;
  color: #495057;
  cursor: pointer;
  white-space: nowrap;
}
.step-prices-pro .ltp-show-addons-toggle input { cursor: pointer; }

/* step Accommodations - stepper Adults/Children ở card-header, cùng phong cách với "Guest Select"
   (tms-tour-package-guests) ở step Prices thay cho input-group text đơn giản trước đây. */
.acc-guest-stepper {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}
.acc-guest-stepper label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #495057;
  margin: 0;
}
.acc-guest-stepper .input-group {
  width: 110px;
}
.acc-guest-stepper input.form-control {
  font-size: 0.85rem;
}

/* Dropdown chọn Accommodation Option (Standard/Deluxe/Luxury) ở header step Accommodations -
   trước bị ép min-width:160px dù tên option ngắn (vd "Standard") - giờ để tự co theo nội dung,
   không bị .input-group (flex) kéo giãn full width. */
.acc-option-select {
  width: auto;
  flex: 0 0 auto;
}

/* AI Run Engine - bảng giá nhóm theo phòng (PRICE_SHEET_EXTRACTION) - dùng CHUNG bởi
   tms-ai-run-detail.js.php (panel chi tiết, có Áp dụng/Sửa/Bỏ qua) VÀ tms-zammad-ticket-list.js.php
   (cột "Kết quả AI" đọc-only, xem ai_ticket_results - yêu cầu user 2026-09-17 "bên phải là nơi
   hiển thị ai_ticket_result"). Chuyển ra đây (thay vì <style> riêng từng component) để 2 nơi luôn
   khớp giao diện, không lệch nhau khi sửa. key:value xếp DỌC trong từng mục giá thay vì cột ngang,
   sống được ở cả panel hẹp (col-lg-5) lẫn trang admin rộng. */
.tms-ai-price-groups { display: flex; flex-direction: column; gap: .6rem; }
/* overflow:visible (trước là hidden - chỉ để bo góc header) vì trong thẻ giờ có dropdown (v-select) ở
   heading + ở từng dòng: overflow:hidden sẽ CẮT MẤT menu thả xuống - bo góc làm riêng ở header/body. */
.tms-ai-price-group { border: 1px solid #dbe5f0; border-radius: 6px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
/* Tên phòng/sản phẩm là thông tin quan trọng nhất của cả thẻ (nhân viên phải phân biệt đúng phòng
   trước khi duyệt/áp dụng - xem lại loạt bug "phòng bị lặp") - nền tint + border trái xanh nhạt cùng
   tông với badge "N vendors"/.tms-section-soft-panel dùng ở nơi khác trong app, thay vì nền xám
   phẳng trước đây (yêu cầu user 2026-09-25: "tên phòng ... hiển thị chưa rõ ràng", "sửa giao diện
   chuyên nghiệp hơn"). */
.tms-ai-price-group__header {
  padding: .6rem .85rem;
  background: #f5f9ff;
  border-left: 3px solid #0d6efd;
  border-radius: 5px 5px 0 0;
  cursor: pointer;
}
/* 2 dòng, mỗi dòng căn TRÁI-PHẢI hết chiều rộng thay vì 1 dòng flex-wrap dồn hết về trái -
   dòng 1: tên phòng | badge trạng thái, dòng 2: khớp TMS | icon nhỏ canh phải. */
.tms-ai-price-group__row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.tms-ai-price-group__row + .tms-ai-price-group__row { margin-top: .3rem; }
.tms-ai-price-group__title { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .4rem; min-width: 0; flex: 1 1 auto; }
.tms-ai-price-group__title .badge { flex-shrink: 0; }
.tms-ai-price-group__title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Tiêu đề CHÍNH của thẻ - to/đậm/đậm màu hơn hẳn số thứ tự và badge phụ quanh nó (trước đây cùng
   dùng chung "fw-semibold small" nên không nổi bật hơn phần tử phụ nào cả). */
.tms-ai-price-group__name { font-weight: 700; font-size: 1.08em; color: #172033; flex: 0 0 auto; min-width: 0; max-width: 55%; }
/* Nút nhỏ cạnh dropdown "hạng phòng đã có" ở heading nhóm (tab AI trích xuất): nhảy sang tab Sản phẩm
   đã có, cuộn tới + tô sáng nhóm phòng đó (user 2026-09-25). */
/* Tab "Sản phẩm đã có": tiêu đề 2 section ACTIVE / INACTIVE (user 2026-09-25) - phần INACTIVE mờ hơn để
   phân biệt ngay với sản phẩm đang hoạt động. */
.tms-ai-existing-section__title {
  display: flex; align-items: center; gap: .45rem; margin-bottom: .55rem; padding-bottom: .35rem;
  border-bottom: 2px solid #dbe5f0; font-weight: 700; font-size: 1.05em; color: #172033;
}
.tms-ai-existing-section__title--inactive { color: #6c757d; border-bottom-color: #e2e6ea; cursor: pointer; user-select: none; }
.tms-ai-price-groups--inactive .tms-ai-price-group { opacity: .78; }
.tms-ai-price-groups--inactive .tms-ai-price-group__header { background: #f4f5f7; border-left-color: #adb5bd; }
.tms-ai-price-group__open { color: #0a58ca; text-decoration: none; padding: 0 .25rem; flex-shrink: 0; }
.tms-ai-price-group__open:hover { color: #084298; }
/* Nhóm phòng vừa được nhảy tới từ liên kết - tô sáng vài giây rồi tự tắt. */
.tms-ai-price-group--focus { border-color: #0d6efd; box-shadow: 0 0 0 3px rgba(13, 110, 253, .25); transition: box-shadow .3s; }
.tms-ai-price-group__icon { font-size: .8rem; flex-shrink: 0; }
.tms-ai-price-group__body { border-top: 1px solid #dbe5f0; background: #fff; border-radius: 0 0 5px 5px; }
.tms-ai-price-item { padding: .55rem .85rem; border-bottom: 1px dashed #e9ecef; }
.tms-ai-price-item:last-child { border-bottom: none; }
/* "Thông tin hạng phòng" (Facilities/Details/Notes của product_definitions, tab "Sản phẩm đã có") -
   2026-09-26: đưa overview lên HEADER group (1 dòng gọn/định nghĩa) + bút chì mở tms-tooltip nổi để
   sửa, thay cho khối accordion thu gọn cũ bên trong body (user: "hiển thị lên header arcodion hiển
   thị overview và edit thông qua action edit bút chì (nhỏ gọn) và mở tms-tooltip để sửa"). */
.tms-ai-definition-info-row { justify-content: flex-start; flex-wrap: wrap; row-gap: .2rem; }
.tms-ai-definition-info-chip {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: .25rem .3rem; max-width: 100%;
}
.tms-ai-definition-info-chip .xsmall { white-space: nowrap; }
.tms-ai-definition-edit-btn {
  cursor: pointer; color: #6c757d; font-size: .95em; padding: .1rem;
}
.tms-ai-definition-edit-btn:hover { color: #0d6efd; }
/* BẢNG THẲNG CỘT dùng CHUNG cho dòng kỳ giá ở cả tab "AI trích xuất" và "Sản phẩm đã có" (đề xuất B, 2026-09-25):
   idx | kỳ áp dụng (co giãn) | giá đang có | giá AI | Δ/nguồn | hành động. MỖI DÒNG là 1 lưới riêng nên cột
   phải độ rộng CỐ ĐỊNH (chỉ cột "kỳ" là 1fr) thì mới thẳng hàng giữa các dòng - đừng đổi sang auto/fr khác. */
.tms-ai-row {
  display: grid;
  grid-template-columns: 2.8rem minmax(12rem, 1fr) 7.5rem 9rem 6.2rem 11.5rem;
  align-items: center; column-gap: .6rem; row-gap: .2rem;
}
.tms-ai-row--head {
  padding: .3rem .85rem; background: #fafbfc; border-bottom: 1px solid #e9ecef;
  font-size: .78em; font-weight: 600; color: #6c757d; letter-spacing: .02em;
}
.tms-ai-row__idx { display: flex; align-items: center; gap: .3rem; color: #6c757d; font-size: .9em; }
.tms-ai-conf-dot { font-size: .5rem; flex-shrink: 0; }
/* Màu "gần/xa ngày hiện tại" TÔ THẲNG vào chữ kỳ áp dụng, in đậm (2026-09-26, user: "thay color vào
   color ở date range chứ ko phải nút dấu chấm như vậy" + "dùng text color cho date range bold") - thay
   cho bản đầu (chấm tròn cạnh chữ, giữ chữ 1 màu mực) đã bị yêu cầu đổi. Vì giờ MÀU LÀ CHỮ DỮ LIỆU
   chính (không còn là dấu hiệu phụ cạnh chữ), mỗi bậc đều được chọn để tự nó vẫn đủ tương phản đọc được
   trên nền trắng (>=4.5:1) - xem periodProximityInfo(). 1 dải xanh đậm dần theo mức độ gần (đậm = cần
   chú ý ngay, nhạt hơn = còn xa/không gấp); riêng kỳ ĐÃ QUA dùng đúng xám "text-muted" của Bootstrap
   (khác hẳn dải xanh - "đã qua" là 1 trạng thái khác hẳn "còn xa", không phải cùng thang đo). */
.tms-period-text { font-weight: 700; }
.tms-period-past { color: #6c757d; }
.tms-period-far  { color: #256abf; }
.tms-period-mid  { color: #1c5cab; }
.tms-period-near { color: #104281; }
.tms-ai-row__period { min-width: 0; }
.tms-ai-row__num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tms-ai-row__edit { grid-column: 2 / 6; min-width: 0; }
.tms-ai-row__actions { display: flex; align-items: center; justify-content: flex-end; gap: .25rem; min-width: 0; }
.tms-ai-row__note { grid-column: 2 / -1; }
.tms-ai-row__note-text { white-space: pre-wrap; }
/* NÚT THAO TÁC GÓC TRÊN-PHẢI của dòng (2026-09-26, user: "cột hành động và nút hủy sửa chưa best practice - nút edit để ở
   góc phải trên hover vào mới hiển thị, nút hủy sửa hiển thị cùng vị trí để người dùng dễ follow action"): bút chì (.is-edit)
   chỉ hiện khi rê chuột/focus vào dòng (thiết bị cảm ứng không có hover -> luôn hiện); khi đang sửa thì ĐÚNG chỗ đó là nút huỷ
   sửa (.is-cancel, luôn hiện). Gutter phải để nút không đè nội dung - áp cho CẢ dòng tiêu đề cột để cột vẫn thẳng hàng. */
.tms-ai-price-item.tms-ai-row, .tms-ai-price-item--corner { position: relative; padding-right: 2.1rem; }
.tms-ai-row--head { padding-right: 2.1rem; }
.tms-ai-row__corner { position: absolute; top: .3rem; right: .4rem; z-index: 2; }
/* Nút nhỏ (2026-09-26, user: "icon edit hơi lớn -> giảm bớt"): 1.7rem -> 1.35rem, icon .8rem -> .65rem. */
.tms-ai-row__corner-btn {
  width: 1.35rem; height: 1.35rem; padding: 0; line-height: 1; border-radius: 50%; background: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: .65rem;
}
.tms-ai-row__corner-btn.is-edit { opacity: 0; transition: opacity .12s ease; }
.tms-ai-price-item:hover .tms-ai-row__corner-btn.is-edit,
.tms-ai-price-item:focus-within .tms-ai-row__corner-btn.is-edit,
.tms-ai-row__corner-btn.is-edit:focus { opacity: 1; }
@media (hover: none) { .tms-ai-row__corner-btn.is-edit { opacity: 1; } }
/* BADGE/ICON CẢNH BÁO GỌN LẠI (2026-09-26, user: "icon warning chấm than định nghĩa trùng tên, trùng kỳ,... lớn khiến cho hiển
   thị ko cân đối" - tab Sản phẩm đã có + Kết quả dự kiến): mọi badge trong khung nhóm giá dùng cỡ chữ nhỏ + đệm mảnh, icon
   trong badge nhỏ hơn chữ 1 chút và canh giữa theo chữ - không còn "chấm than" phình to so với dòng chữ bên cạnh. */
.tms-ai-price-group .badge {
  font-size: .66rem; font-weight: 600; line-height: 1.15; padding: .2em .45em;
}
.tms-ai-price-group .badge > .bi {
  font-size: .82em; line-height: 1; vertical-align: -.06em; margin-right: .25em !important;
}
/* Tab "Kết quả dự kiến": không còn cột "Hành động" (chỉ còn bút chì góc phải) -> lưới 5 cột. */
.tms-ai-row--noact { grid-template-columns: 2.8rem minmax(12rem, 1fr) 7.5rem 9rem 6.2rem; }
/* Thân nhóm là "container": modal chia panel nguồn 46% bên phải nên bề rộng THẬT của bảng nhỏ hơn nhiều so với
   viewport - media query theo viewport sẽ sai, dùng container query theo bề rộng thân nhóm. Hẹp (< 56rem): bỏ hàng
   tiêu đề, gói cột thành 2 tầng để khỏi tràn ngang. */
.tms-ai-price-group__body { container: tms-row / inline-size; }
@container tms-row (max-width: 56rem) {
  .tms-ai-row { grid-template-columns: 2.6rem minmax(0, 1fr) 6.5rem 8rem; }
  .tms-ai-row--head { display: none; }
  .tms-ai-row__edit { grid-column: 2 / -1; }
  .tms-ai-row__delta, .tms-ai-row__actions { grid-column: 2 / -1; justify-content: flex-start; }
  .tms-ai-row__note { grid-column: 2 / -1; }
}
/* Tab "Sản phẩm đã có": dòng do chính lần trích xuất này ghi (xanh lá nhạt) / sẽ bị dòng AI chờ duyệt ghi đè
   (vàng nhạt) - phân biệt ngay với dòng "đã có" sẵn (nền trắng), user 2026-09-25. */
.tms-ai-price-item--extracted { background: #f3fbf6; box-shadow: inset 3px 0 0 #198754; }
.tms-ai-price-item--pending { background: #fffbf0; box-shadow: inset 3px 0 0 #ffc107; }
/* vr-th-top */
/* Đối soát công nợ: tiêu đề cột căn TRÊN - áp cho cả cột "#" (do bảng chung dựng, không có style riêng). Chỉ bảng nào có khối tiêu đề .vr-th. */
table:has(.vr-th) > thead > tr > th {
  vertical-align: top !important;
}
/* vr-list-row */
/* Đối soát công nợ - danh sách dòng công nợ (tms-vendor-reconciliation-items, list_layout=list + list_row): mỗi dòng là 1 component gồm
   [thanh tiêu đề SECTION booking ở dòng đầu mỗi lượt] + lưới 6 vùng. Dòng đầu danh sách có thêm hàng tiêu đề cột (.vr-lr-colhead). */
.vr-lr { width: 100%; }
.vr-lr-grid {
  display: grid;
  grid-template-columns: 130px minmax(150px, 1.1fr) minmax(130px, 1fr) 140px minmax(300px, 1.9fr) 170px;
  column-gap: 12px;
  align-items: start;
}
.vr-lr-colhead { padding: 4px 8px 6px 12px; border-bottom: 2px solid #dee2e6; }
.vr-lr-colhead .vr-t { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: #212529; line-height: 1.25; }
.vr-lr-colhead .vr-s { font-size: 10px; color: #6c757d; line-height: 1.25; }
.vr-sec-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-top: 14px; padding: 6px 12px;
  background: #eaf2ff; border-left: 4px solid #0d6efd; border-bottom: 1px solid #cfe2ff;
}
.vr-sec-head.vr-sec-head-top, .vr-lr-colhead + .vr-sec-head { margin-top: 0; }
.vr-lr-body { padding: 8px 8px 8px 12px; border-left: 4px solid #cfe2ff; border-bottom: 1px solid #eef0f3; background: #fff; }
@media (max-width: 1199.98px) {
  .vr-lr-grid { grid-template-columns: 120px minmax(140px, 1fr) minmax(120px, 1fr) 140px; row-gap: 8px; }
  .vr-lr-grid > :nth-child(5) { grid-column: 1 / 4; }
  .vr-lr-colhead { display: none; }
}
@media (max-width: 767.98px) {
  .vr-lr-grid { grid-template-columns: 1fr; }
  .vr-lr-grid > :nth-child(5) { grid-column: auto; }
}
/* vr-tms-debt */
/* Đối soát công nợ - "Công nợ TMS": overview ngoài form (.vr-tdo*) + chi tiết trong tms-tooltip (.vr-td*): booking > service > item > dòng bảng kê. */
.vr-tdo-card { border: 1px solid #cfe2ff; border-left: 4px solid #0d6efd; border-radius: 6px; padding: 8px 12px; background: #f8fbff; cursor: pointer; transition: background-color .12s ease-in-out; }
.vr-tdo-card:hover { background: #eef5ff; }
.vr-tdo-headline { font-size: 14px; }
.vr-tdo-money, .vr-td-money { font-variant-numeric: tabular-nums; }
.vr-td-money { white-space: nowrap; }
.vr-td-pay-unpaid { background-color: #f8d7da; color: #842029; }
.vr-td-pay-partial { background-color: #fff3cd; color: #664d03; }
.vr-td-pay-paid { background-color: #d1e7dd; color: #0f5132; }
.vr-td-pay-over { background-color: #cff4fc; color: #055160; }
.vr-td-lk { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; line-height: 1.5; }
.vr-td-lk-LINKED, .vr-td-lk-ok { background: #d1e7dd; color: #0f5132; }
.vr-td-lk-PARTIAL { background: #fff3cd; color: #664d03; }
.vr-td-lk-NONE { background: #e9ecef; color: #495057; }
.vr-td-wrap { max-height: 78vh; overflow: auto; padding: 2px 4px; }
.vr-td { font-size: 13px; }
.vr-td-bar { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 4px 0 8px; background: #fff; }
.vr-td-search { max-width: 280px; }
.vr-td-bk { margin-top: 12px; }
.vr-td-bk-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 6px 10px; background: #eaf2ff; border-left: 4px solid #0d6efd; }
.vr-td-svc { margin-left: 8px; border-left: 2px solid #cfe2ff; }
.vr-td-svc-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 5px 10px; background: #f8f9fa; border-bottom: 1px solid #eef0f3; }
.vr-td-item { padding: 4px 10px 4px 24px; border-bottom: 1px solid #eef0f3; }
.vr-td-item:hover { background: #fafcff; }
.vr-td-item-main { display: flex; align-items: center; gap: 8px; }
.vr-td-date { min-width: 118px; color: #0a58ca; font-weight: 700; }
.vr-td-title { flex: 1 1 auto; min-width: 0; }
.vr-td-item-link { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; font-size: 12px; }
.vr-td-file { background: #f1f3f5; color: #495057; padding: 1px 6px; border-radius: 4px; }
.vr-td-other { color: #6c757d; }
.vr-td-ms-MATCHED { color: #0f5132; font-weight: 700; }
.vr-td-ms-DIFFERENT { color: #b02a37; font-weight: 700; }
.vr-td-lines { margin: 4px 0 2px 118px; padding-left: 8px; border-left: 2px dashed #ced4da; }
.vr-td-line { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
/* vr-overview */
/* Section "Tổng quan" của đối soát công nợ: 2 cột - Dữ liệu TMS (.vr-tdo) | Dữ liệu trong file công nợ (.vr-fo). */
.vr-ov-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: #212529; line-height: 1.3; }
.vr-ov-sub { display: block; font-size: 11px; font-weight: 400; text-transform: none; letter-spacing: 0; color: #6c757d; }
.vr-fo-card { border-color: #badbcc; border-left-color: #198754; background: #f8fcf9; cursor: default; }
.vr-fo-card:hover { background: #f8fcf9; }
/* vr-ov-match */
/* Khối "Khớp / lệch giữa file công nợ và TMS" (dưới 2 cột của section Tổng quan): thanh tỷ lệ trạng thái + 4 ô số liệu. */
.vr-ov-match { border-top: 1px dashed #ced4da; padding-top: 12px; }
.vr-ov-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: #e9ecef; }
.vr-ov-bar > span { display: block; height: 100%; }
.vr-ov-tile { height: 100%; border: 1px solid #dee2e6; border-left-width: 4px; border-radius: 6px; padding: 8px 12px; background: #fff; }
.vr-ov-tile-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: #495057; }
.vr-ov-num { font-size: 22px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.vr-ov-unit { font-size: 12px; font-weight: 400; color: #6c757d; }
.vr-ov-tile-ok { border-left-color: #198754; background: #f8fcf9; }
.vr-ov-tile-bad { border-left-color: #dc3545; background: #fffafa; }
.vr-ov-tile-warn { border-left-color: #ffc107; background: #fffdf5; }
.vr-ov-tile-info { border-left-color: #0d6efd; background: #f8fbff; }
/* vr-levels */
/* Khối Khớp / lệch theo tầng (booking > service > service item > cost item): mỗi tầng 1 hàng với các chip đếm; bấm chip mở danh sách ngay dưới. */
.vr-lv { border: 1px solid #dee2e6; border-radius: 6px; overflow: hidden; }
.vr-lv-row + .vr-lv-row { border-top: 1px solid #dee2e6; }
.vr-lv-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; background: #fff; }
.vr-lv-name { min-width: 150px; font-weight: 700; font-size: 13px; }
.vr-lv-chip { border: 1px solid transparent; border-radius: 14px; padding: 2px 12px; font-size: 12px; line-height: 1.6; cursor: pointer; transition: box-shadow .12s ease-in-out; }
.vr-lv-chip:hover:not(:disabled) { box-shadow: 0 0 0 2px rgba(13, 110, 253, .25); }
.vr-lv-chip.is-active { box-shadow: 0 0 0 2px #0d6efd; }
.vr-lv-chip.is-zero { opacity: .55; cursor: default; }
.vr-lv-chip-ok { background: #d1e7dd; color: #0f5132; border-color: #badbcc; }
.vr-lv-chip-bad { background: #f8d7da; color: #842029; border-color: #f1aeb5; }
.vr-lv-chip-none { background: #e9ecef; color: #495057; border-color: #ced4da; }
.vr-lv-chip-warn { background: #fff3cd; color: #664d03; border-color: #ffda6a; }
.vr-lv-body { padding: 8px 12px 10px; background: #f8f9fa; border-top: 1px dashed #ced4da; max-height: 420px; overflow: auto; }
.vr-lv-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 4px 6px; border-bottom: 1px solid #eef0f3; background: #fff; }
.vr-lv-item:hover { background: #fafcff; }
.vr-lv-item-main { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.vr-lv-item-side { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
/* vr-badges */
/* Badge trạng thái từng mục trong danh sách Khớp / lệch: Exists/Not exists (file hoặc TMS) + Linked/Not linked. */
.vr-lv-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: 1 1 100%; }
.vr-bd { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 4px; border: 1px solid transparent; font-size: 11px; font-weight: 600; line-height: 1.6; }
.vr-bd-ok { background: #d1e7dd; color: #0f5132; border-color: #badbcc; }
.vr-bd-bad { background: #f8d7da; color: #842029; border-color: #f1aeb5; }
.vr-bd-none { background: #e9ecef; color: #495057; border-color: #ced4da; }
/* vr-bk-strip */
/* Dải SỐ BOOKING ở đầu khối Khớp / lệch: file | TMS | có ở cả hai bên | chỉ có trong file | chỉ có trong TMS (dễ hiểu vì sao file có N booking mà TMS chỉ M). */
.vr-bk-strip { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; margin-bottom: 6px; }
.vr-bk-title { display: flex; align-items: center; min-width: 110px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.vr-bk-cell { flex: 1 1 130px; min-width: 120px; border: 1px solid #dee2e6; border-left-width: 4px; border-radius: 6px; padding: 6px 12px; background: #fff; }
.vr-bk-num { font-size: 22px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.vr-bk-cap { font-size: 11px; color: #6c757d; line-height: 1.3; }
.vr-bk-ok { border-left-color: #198754; background: #f8fcf9; }
.vr-bk-warn { border-left-color: #ffc107; background: #fffdf5; }
.vr-bk-info { border-left-color: #0d6efd; background: #f8fbff; }
.vr-bd-warn { background: #fff3cd; color: #664d03; border-color: #ffda6a; }
.vr-lv-chip-info { background: #cfe2ff; color: #084298; border-color: #9ec5fe; }
/* vr-lens */
/* Card overview có kính lúp (mở tms-tooltip danh sách booking) + đơn vị sau con số. */
.vr-bk-cell { position: relative; }
.vr-lens { position: absolute; top: 4px; right: 6px; width: 24px; height: 24px; padding: 0; border: 1px solid #b6d4fe; border-radius: 50%; background: #fff; color: #0d6efd; font-size: 12px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.vr-lens:hover { background: #0d6efd; color: #fff; }
.vr-bk-unit { font-size: 12px; font-weight: 400; color: #6c757d; }
.vr-lv-unit { font-size: 11px; font-weight: 400; opacity: .8; }
.vr-bk-tip { min-width: 0; }
/* vr-idx */
/* Số thứ tự 1, 2, 3... đầu mỗi dòng trong các danh sách mở rộng của khối Khớp / lệch. */
.vr-idx { display: inline-block; min-width: 28px; margin-right: 4px; text-align: right; color: #6c757d; font-size: 12px; font-variant-numeric: tabular-nums; }
.vr-idx::after { content: "."; }

/* ===== kpi-ov: section "Tổng quan nhân viên theo KPI" (tms-kpis, before_list_content) =====
   Cây phân cấp thụt lề theo cấp: Role (cấp 0) -> KPI (cấp 1, có đường nối) -> nhân viên (cấp 2, thụt thêm + đường chấm). */
.kpi-ov { border: 1px solid #dee2e6; border-radius: 8px; background: #fff; overflow: hidden; }
.kpi-ov-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 10px 14px; background: #f8f9fa; border-bottom: 1px solid #dee2e6; }
.kpi-ov-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 12px; padding: 12px; }
@media (max-width: 480px) { .kpi-ov-body { grid-template-columns: minmax(0, 1fr); padding: 8px; } .kpi-ov-progress { flex-basis: 70px; } }
.kpi-ov-foot { padding: 6px 14px 10px; font-size: 12px; color: #6c757d; }

.kpi-ov-pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.kpi-ov-pill-neutral { background: #e9ecef; color: #343a40; }
.kpi-ov-pill-success { background: #d1e7dd; color: #0f5132; }
.kpi-ov-pill-danger { background: #f8d7da; color: #842029; }

/* Cấp 0: role */
.kpi-ov-role { border: 1px solid #dee2e6; border-radius: 8px; overflow: hidden; background: #fff; }
.kpi-ov-role-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; background: #f8f9fa; border-bottom: 1px solid #e9ecef; cursor: pointer; user-select: none; }
.kpi-ov-role-head:hover { background: #f1f3f5; }
.kpi-ov-caret { width: 14px; font-size: 12px; color: #6c757d; }
.kpi-ov-role-stat { font-size: 13px; color: #495057; }
.kpi-ov-progress { flex: 0 0 110px; height: 6px; border-radius: 999px; background: #e9ecef; overflow: hidden; }
.kpi-ov-progress-bar { display: block; height: 100%; border-radius: 999px; background: #ffc107; transition: width .3s ease; }
.kpi-ov-progress-bar.is-full { background: #198754; }
.kpi-ov-pct { font-size: 12px; font-weight: 600; color: #495057; min-width: 34px; }

/* Cấp 1: KPI (đường nối trục dọc + nhánh ngang) */
.kpi-ov-tree { padding: 10px 12px 6px 22px; }
.kpi-ov-kpi { position: relative; padding: 0 0 10px 18px; }
.kpi-ov-kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 2px solid #dee2e6; }
.kpi-ov-kpi:last-child::before { bottom: auto; height: 14px; }
.kpi-ov-kpi::after { content: ""; position: absolute; left: 0; top: 14px; width: 12px; border-top: 2px solid #dee2e6; }
.kpi-ov-kpi-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-height: 28px; font-weight: 600; font-size: 14px; color: #212529; }
.kpi-ov-count { display: inline-block; min-width: 22px; padding: 0 7px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.6; text-align: center; background: #e9ecef; color: #495057; }
.kpi-ov-count.is-ok { background: #d1e7dd; color: #0f5132; }
.kpi-ov-count.is-bad { background: #f8d7da; color: #842029; }
.kpi-ov-tag { padding: 0 7px; border-radius: 4px; font-size: 11px; font-weight: 500; line-height: 1.7; background: #e9ecef; color: #495057; }
.kpi-ov-tag-warn { background: #fff3cd; color: #664d03; }
.kpi-ov-tag-info { background: #cff4fc; color: #055160; }

/* Cấp 2: nhân viên (thụt thêm 1 cấp + đường chấm bên trái) */
.kpi-ov-staff { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 2px 0 0 14px; padding: 2px 0 2px 12px; border-left: 2px dotted #ced4da; }
.kpi-ov-chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px 1px 4px; border: 1px solid #e2e6ea; border-radius: 999px; background: #fff; font-size: 13px; }
.kpi-ov-empty { margin: 2px 0 0 14px; padding-left: 12px; font-size: 13px; color: #8a949e; font-style: italic; }

/* Nhánh cảnh báo (chưa gán KPI) / mờ (đã nghỉ còn gán) */
.kpi-ov-kpi-warn::before, .kpi-ov-kpi-warn::after { border-color: #f1aeb5; }
.kpi-ov-kpi-warn .kpi-ov-kpi-head { color: #842029; }
.kpi-ov-kpi-warn .kpi-ov-staff { border-left-color: #f1aeb5; }
.kpi-ov-kpi-warn .kpi-ov-chip { border-color: #f1aeb5; background: #fff8f8; }
.kpi-ov-kpi-ok .kpi-ov-kpi-head { color: #0f5132; }
.kpi-ov-kpi-muted .kpi-ov-kpi-head { color: #6c757d; font-weight: 500; }
.kpi-ov-kpi-muted .kpi-ov-staff { font-size: 13px; color: #6c757d; }

/* ===== kpi-mb: component "KPI thành viên" (tms-kpi-members, tab KPI của tms-dashboard) ===== */
.kpi-mb { font-size: 14px; }
.kpi-mb-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 12px; border: 1px solid #dee2e6; border-radius: 8px; background: #f8f9fa; }
.kpi-mb-month-picker { width: auto; flex-wrap: nowrap; }
.kpi-mb-month-picker .form-select { width: 150px; }
.kpi-mb-range-select { width: 150px !important; }
.kpi-mb-metric-select { width: 230px !important; }
.kpi-mb-staff-select { width: 260px !important; }

.kpi-mb-tag { display: inline-block; padding: 0 7px; margin-left: 4px; border-radius: 4px; font-size: 11px; font-weight: 500; line-height: 1.7; background: #e9ecef; color: #495057; vertical-align: middle; }
.kpi-mb-tag-info { background: #cff4fc; color: #055160; }
.kpi-mb-tag-lead { background: #e2d9f3; color: #432874; }
.kpi-mb-pill { display: inline-flex; align-items: center; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.6; white-space: nowrap; background: #e9ecef; color: #343a40; }
.kpi-mb-pill.is-pass { background: #d1e7dd; color: #0f5132; }
.kpi-mb-pill.is-fail { background: #f8d7da; color: #842029; }
.kpi-mb-pill.is-none { background: #e9ecef; color: #495057; }
.kpi-mb-pill.is-warn { background: #fff3cd; color: #664d03; }
.kpi-mb-count { display: inline-block; min-width: 22px; padding: 0 7px; border-radius: 999px; font-size: 12px; font-weight: 600; text-align: center; background: #e9ecef; color: #495057; }

/* màu mức hoàn thành dùng chung cho thanh, đoạn phân bố, chấm chú thích */
.kpi-mb-bar-fill.band-FULL, .kpi-mb-dist-seg.band-FULL, .kpi-mb-dot.band-FULL { background: #198754; }
.kpi-mb-bar-fill.band-HIGH, .kpi-mb-dist-seg.band-HIGH, .kpi-mb-dot.band-HIGH { background: #5fbf8a; }
.kpi-mb-bar-fill.band-MID,  .kpi-mb-dist-seg.band-MID,  .kpi-mb-dot.band-MID  { background: #f5b335; }
.kpi-mb-bar-fill.band-LOW,  .kpi-mb-dist-seg.band-LOW,  .kpi-mb-dot.band-LOW  { background: #dc3545; }
.kpi-mb-dist-seg.band-UNC, .kpi-mb-dot.band-UNC { background: #ffe08a; }
.kpi-mb-dist-seg.band-NONE, .kpi-mb-dot.band-NONE { background: #ced4da; }

/* ---- Tổng quan đạt / không đạt ---- */
.kpi-mb-overview { border: 1px solid #dee2e6; border-radius: 10px; background: #fff; padding: 14px; margin-bottom: 14px; }
.kpi-mb-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.kpi-mb-card { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border: 2px solid transparent; border-radius: 10px; text-align: left; background: #f8f9fa; cursor: pointer; transition: box-shadow .15s ease, transform .15s ease; }
.kpi-mb-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.kpi-mb-card.is-total { cursor: default; }
.kpi-mb-card.is-total:hover { box-shadow: none; }
.kpi-mb-card-num { font-size: 34px; font-weight: 700; line-height: 1.1; }
.kpi-mb-card-label { font-size: 13px; font-weight: 600; }
.kpi-mb-card-sub { font-size: 12px; opacity: .8; }
.kpi-mb-card.is-pass { background: #e8f5ee; color: #0f5132; }
.kpi-mb-card.is-fail { background: #fdecee; color: #842029; }
.kpi-mb-card.is-none { background: #f1f3f5; color: #495057; }
.kpi-mb-card.is-warn { background: #fff8e1; color: #664d03; }
.kpi-mb-card.is-total { background: #eef2ff; color: #1e3a8a; }
.kpi-mb-card.is-active.is-pass { border-color: #198754; }
.kpi-mb-card.is-active.is-fail { border-color: #dc3545; }
.kpi-mb-card.is-active.is-none { border-color: #6c757d; }
.kpi-mb-card.is-active.is-warn { border-color: #f5b335; }

.kpi-mb-dist { margin-top: 12px; }
.kpi-mb-dist-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: #e9ecef; }
.kpi-mb-dist-seg { display: block; height: 100%; }
.kpi-mb-dist-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 12px; color: #495057; }
.kpi-mb-dist-item { display: inline-flex; align-items: center; gap: 5px; }
.kpi-mb-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.kpi-mb-totals { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 10px; padding-top: 8px; border-top: 1px dashed #dee2e6; font-size: 12px; color: #6c757d; }
.kpi-mb-totals b { color: #343a40; font-weight: 600; }

/* ---- Team + bảng nhân viên ---- */
.kpi-mb-team { border: 1px solid #dee2e6; border-radius: 8px; background: #fff; margin-bottom: 12px; overflow: hidden; }
.kpi-mb-team-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 12px; background: #f8f9fa; border-bottom: 1px solid #e9ecef; cursor: pointer; user-select: none; }
.kpi-mb-team-head:hover { background: #f1f3f5; }
.kpi-mb-caret { width: 14px; font-size: 12px; color: #6c757d; }
.kpi-mb-team-dist { display: flex; flex: 0 0 120px; height: 6px; border-radius: 999px; overflow: hidden; background: #e9ecef; }
.kpi-mb-team-totals { margin-left: auto; }
.kpi-mb-table thead th { font-size: 12px; font-weight: 600; color: #6c757d; text-transform: uppercase; letter-spacing: .02em; border-bottom-width: 1px; background: #fff; white-space: nowrap; }
.kpi-mb-list-table { table-layout: fixed; min-width: 1340px; }
.kpi-mb-table tbody tr { cursor: pointer; }
.kpi-mb-table tbody tr:hover > td { background: #f8fbff; }
.kpi-mb-table tr.is-state-no_kpi > td, .kpi-mb-table tr.is-state-kpi_inactive > td { color: #8a949e; background: #fcfcfd; }
.kpi-mb-ratio { display: flex; align-items: center; gap: 8px; }
.kpi-mb-bar { position: relative; flex: 1 1 auto; height: 8px; border-radius: 999px; background: #e9ecef; overflow: visible; }
.kpi-mb-bar-fill { display: block; height: 100%; border-radius: 999px; }
.kpi-mb-bar-mark { position: absolute; top: -3px; width: 2px; height: 14px; background: #343a40; opacity: .55; }
.kpi-mb-ratio-num { min-width: 52px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
/* ô từng chỉ tiêu trong danh sách: tên + % tính điểm, dòng dưới là thực tế / mục tiêu */
/* các thẻ chỉ tiêu xếp 1 hàng (chỉ xuống dòng khi màn hình quá hẹp); độ rộng tối thiểu theo từng chỉ tiêu để vừa 1 hàng */
.kpi-mb-metrics { display: flex; flex-wrap: wrap; gap: 4px; }
.kpi-mb-metric.mk-received { min-width: 138px; }
.kpi-mb-metric.mk-revenue { min-width: 92px; }
.kpi-mb-metric.mk-new_agents { min-width: 80px; }
.kpi-mb-metric.mk-bookings_total, .kpi-mb-metric.mk-bookings_b2b, .kpi-mb-metric.mk-bookings_b2c, .kpi-mb-metric.mk-bookings_returning_customers { min-width: 104px; }
.kpi-mb-metric.mk-conversion_b2b, .kpi-mb-metric.mk-conversion_b2c { min-width: 112px; }
.kpi-mb-metric.mk-team_staff_pass_rate, .kpi-mb-metric.mk-team_staff_no_violation_rate, .kpi-mb-metric.mk-team_received { min-width: 124px; }
.kpi-mb-metric { display: block; vertical-align: top; min-width: 110px; margin: 0; padding: 3px 7px; border-radius: 8px; border: 1px solid transparent; font-size: 12px; line-height: 1.4; background: #e9ecef; color: #343a40; white-space: nowrap; }
.kpi-mb-metric-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-weight: 600; }
.kpi-mb-metric-val { font-weight: 400; opacity: .9; }
.kpi-mb-metric-val b { font-weight: 600; }
/* section tỷ lệ chuyển đổi: phép cộng mẫu số (tạo trong tháng + đang làm) và nhãn nhóm */
.kpi-mb-conv-formula { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; margin: 2px 0 8px; }
.kpi-mb-conv-term { display: flex; flex-direction: column; justify-content: center; padding: 6px 14px; border-radius: 8px; font-size: 13px; line-height: 1.3; }
.kpi-mb-conv-term b { font-size: 20px; font-weight: 700; }
.kpi-mb-conv-term small { font-size: 11px; opacity: .85; }
.kpi-mb-conv-term.is-created { background: #e7f0ff; color: #084298; }
.kpi-mb-conv-term.is-worked { background: #fff3cd; color: #664d03; }
.kpi-mb-conv-term.is-total { background: #f1f3f5; color: #212529; border: 1px solid #ced4da; }
.kpi-mb-conv-op { align-self: center; font-size: 20px; font-weight: 600; color: #6c757d; }
.kpi-mb-kind { display: inline-block; padding: 0 8px; border-radius: 4px; font-size: 11px; font-weight: 600; line-height: 1.7; white-space: nowrap; background: #e9ecef; color: #495057; }
.kpi-mb-kind.is-created { background: #e7f0ff; color: #084298; }
.kpi-mb-kind.is-worked { background: #fff3cd; color: #664d03; }
.kpi-mb-kind.is-out { background: #f1f3f5; color: #6c757d; border: 1px dashed #ced4da; }
/* cột Go 4 Green: gợi ý cải thiện để đạt KPI 100% */
.kpi-mb-g4g { font-size: 12px; line-height: 1.4; }
.kpi-mb-g4g-head { font-weight: 600; color: #664d03; margin-bottom: 2px; }
.kpi-mb-g4g-ok { font-weight: 600; color: #0f5132; }
.kpi-mb-g4g-list { list-style: none; margin: 0; padding: 0; }
.kpi-mb-g4g-list li { margin-bottom: 2px; }
.kpi-mb-g4g-gain { display: inline-block; padding: 0 6px; border-radius: 999px; font-weight: 600; font-size: 11px; background: #d1e7dd; color: #0f5132; white-space: nowrap; }
.kpi-mb-metric.is-info { background: #f4f6f8; border-color: #dee2e6; border-style: dashed; color: #495057; }
.kpi-mb-metric.band-FULL { background: #e8f5ee; border-color: #b6dfc8; color: #0f5132; }
.kpi-mb-metric.band-HIGH { background: #eef8f2; border-color: #cbe8d8; color: #1c6b44; }
.kpi-mb-metric.band-MID  { background: #fff8e1; border-color: #f3dc9a; color: #664d03; }
.kpi-mb-metric.band-LOW  { background: #fdecee; border-color: #f2b8bf; color: #842029; }
.kpi-mb-note { margin-top: 8px; font-size: 12px; color: #6c757d; }

/* ---- Chi tiết 1 nhân viên ---- */
.kpi-mb-detail-head { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding: 12px 14px; margin-bottom: 12px; border: 1px solid #dee2e6; border-radius: 10px; background: #fff; }
.kpi-mb-detail-who { flex: 1 1 260px; }
.kpi-mb-detail-name { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; font-size: 1.1rem; }
.kpi-mb-detail-score { min-width: 190px; padding: 8px 16px; border-radius: 10px; text-align: center; background: #f1f3f5; color: #495057; }
.kpi-mb-detail-score.is-FULL { background: #e8f5ee; color: #0f5132; }
.kpi-mb-detail-score.is-HIGH { background: #eaf6ef; color: #1c6b44; }
.kpi-mb-detail-score.is-MID { background: #fff8e1; color: #664d03; }
.kpi-mb-detail-score.is-LOW { background: #fdecee; color: #842029; }
.kpi-mb-score-num { font-size: 34px; font-weight: 700; line-height: 1.1; }
.kpi-mb-score-label { font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.kpi-mb-score-sub { font-size: 11px; opacity: .85; }
.kpi-mb-box { padding: 12px 14px; border: 1px solid #dee2e6; border-radius: 10px; background: #fff; }
.kpi-mb-box-title { margin-bottom: 8px; font-weight: 600; }
.kpi-mb-metric-table thead th { font-size: 12px; color: #6c757d; font-weight: 600; background: #fff; }
.kpi-mb-chart-small { position: relative; height: 230px; }
.kpi-mb-scroll { max-height: 320px; overflow-y: auto; }

/* ---- Khoảng tháng ---- */
.kpi-mb-range-bar { padding: 8px 12px; margin-bottom: 10px; border: 1px solid #e9ecef; border-radius: 8px; background: #fff; }
.kpi-mb-chart { position: relative; height: 340px; padding: 10px; border: 1px solid #dee2e6; border-radius: 10px; background: #fff; }
.kpi-mb-month-row:hover > td { background: #f0f7ff !important; }
.kpi-mb-tip-anchor { position: fixed; width: 1px; height: 1px; pointer-events: none; }
.kpi-mb-tip-counts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

@media (max-width: 576px) {
  .kpi-mb-month-picker .form-select, .kpi-mb-range-select, .kpi-mb-metric-select, .kpi-mb-staff-select { width: 100% !important; }
  .kpi-mb-team-totals { margin-left: 0; }
  .kpi-mb-card-num { font-size: 28px; }
}

/* section Go 4 Green ở trang chi tiết KPI nhân viên */
.kpi-mb-green { border-left: 4px solid #198754; }
.kpi-mb-green-sum { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; margin-bottom: 8px; }
.kpi-mb-green-stat { display: flex; flex-direction: column; justify-content: center; min-width: 96px; padding: 4px 12px; border-radius: 8px; background: #f1f3f5; color: #343a40; line-height: 1.25; }
.kpi-mb-green-stat small { font-size: 11px; opacity: .8; }
.kpi-mb-green-stat b { font-size: 20px; font-weight: 700; }
.kpi-mb-green-stat.is-goal { background: #d1e7dd; color: #0f5132; }
.kpi-mb-green-stat.is-warn { background: #fff3cd; color: #664d03; }
.kpi-mb-green-sum > i { align-self: center; }
.kpi-mb-green-bar { height: 10px; margin: 2px 0 6px; }
.kpi-mb-chip-pct { display: inline-block; padding: 0 8px; border-radius: 999px; font-weight: 600; background: #e9ecef; }
.kpi-mb-chip-pct.band-FULL { background: #d1e7dd; color: #0f5132; }
.kpi-mb-chip-pct.band-HIGH { background: #def2e7; color: #1c6b44; }
.kpi-mb-chip-pct.band-MID { background: #fff3cd; color: #664d03; }
.kpi-mb-chip-pct.band-LOW { background: #f8d7da; color: #842029; }

/* cột Go 4 Green ở danh sách: tiêu đề nổi bật hơn các tiêu đề khác + nền nhạt cả cột */
.kpi-mb-table thead th.kpi-mb-g4g-th { background: #198754; color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .02em; text-transform: none; border-bottom-color: #146c43; }
.kpi-mb-table thead th.kpi-mb-g4g-th i { margin-right: 4px; }
.kpi-mb-table td.kpi-mb-g4g { background: #f4faf6; border-left: 2px solid #b6dfc8; }
.kpi-mb-grp .badge { font-weight: 600; margin-left: 2px; }

/* KPI TRƯỞNG NHÓM (kpis.is_leader = 1): nằm dưới cùng danh sách + màu tím để phân biệt với KPI nhân viên */
.kpi-leader-badge { display: inline-block; padding: 0 8px; border-radius: 4px; font-size: 11px; font-weight: 600; line-height: 1.7; background: #7c3aed; color: #fff; vertical-align: middle; }
.kpi-leader-name { color: #5b21b6; }
tr:has(.kpi-row-leader) > td { background-color: #f5f0ff; }
tr:has(.kpi-row-leader) > td:first-child { box-shadow: inset 4px 0 0 #7c3aed; }
.kpi-ov-kpi-leader .kpi-ov-kpi-head { color: #5b21b6; }
.kpi-ov-kpi-leader .kpi-ov-kpi-head > i { color: #7c3aed; }

/* danh sách KPI thành viên: nhóm Trưởng nhóm tách khỏi Nhân viên trong từng team */
.kpi-mb-table tr.kpi-mb-group-row > td { padding: 5px 10px; font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #495057; background: #f1f3f5; border-top: 1px solid #dee2e6; cursor: default; }
.kpi-mb-table tr.kpi-mb-group-row.is-leader > td { color: #5b21b6; background: #efe9fb; border-top-color: #d6c8f5; }
.kpi-mb-table tr.kpi-mb-group-row .kpi-mb-count { margin-left: 4px; text-transform: none; }
.kpi-mb-table tr.is-leader-row > td { background: #faf8ff; }
.kpi-mb-table tr.is-leader-row > td:first-child { box-shadow: inset 3px 0 0 #7c3aed; }
.kpi-mb-table tbody tr.kpi-mb-group-row { cursor: default; }
.kpi-mb-table tbody tr.kpi-mb-group-row:hover > td { background: #f1f3f5; }
.kpi-mb-table tbody tr.kpi-mb-group-row.is-leader:hover > td { background: #efe9fb; }

/* thẻ "Tham khảo" (Doanh thu + Lợi nhuận dự kiến / thực tế chưa có mục tiêu) trong cột Chỉ tiêu */
.kpi-mb-metric.mk-ref { min-width: 112px; }
.kpi-mb-metric-unit { font-size: 11px; font-weight: 400; color: #8a949e; }
.kpi-mb-ref-line { display: flex; justify-content: space-between; gap: 8px; line-height: 1.35; }
.kpi-mb-ref-line b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ghi chú nhỏ dưới nhãn Đánh giá (VD KPI phải đạt đủ mọi chỉ tiêu) */
.kpi-mb-note-mini { margin-top: 2px; font-size: 11px; line-height: 1.3; color: #8a6d3b; }

/* Chốt KPI theo tháng (Quản lý KPI) */
.kpi-cl { border: 1px solid #dee2e6; border-radius: 10px; background: #fff; overflow: hidden; }
.kpi-cl-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 10px 14px; background: #f1f8f4; border-bottom: 1px solid #d1e7dd; }
.kpi-cl-select { width: auto; min-width: 220px; }
.kpi-cl-table thead th { font-size: 12px; color: #6c757d; font-weight: 600; background: #fff; white-space: nowrap; }
.kpi-cl-table tr.is-open > td { background: #f4faf6; }
.kpi-cl-src { display: inline-block; padding: 0 8px; border-radius: 4px; font-size: 11px; font-weight: 600; line-height: 1.7; }
.kpi-cl-src.is-auto { background: #cff4fc; color: #055160; }
.kpi-cl-src.is-manual { background: #e2d9f3; color: #432874; }
.kpi-cl-results { padding: 12px 14px; border-top: 1px solid #dee2e6; background: #fcfdfc; }
.kpi-cl-chip { display: inline-block; margin: 1px 4px 1px 0; padding: 0 8px; border-radius: 999px; font-size: 12px; line-height: 1.7; background: #e8f5ee; color: #0f5132; white-space: nowrap; }
.kpi-cl-chip.is-low { background: #fdecee; color: #842029; }

/* nhãn "Đã chốt" ở thanh công cụ KPI thành viên */
.kpi-mb-closed { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border: 1px solid #b6dfc8; border-radius: 999px; font-size: 12px; font-weight: 600; background: #e8f5ee; color: #0f5132; white-space: nowrap; }
.kpi-mb-closed.is-live { border-color: #f3dc9a; background: #fff3cd; color: #664d03; }
.kpi-mb-tag-closed { background: #d1e7dd; color: #0f5132; }

/* liên kết mở modal booking / lead / quote trong KPI chi tiết: mã không bị ngắt dòng */
.kpi-mb .tms-component-link { white-space: nowrap; }

/* ===== B2B dashboard - "Our Products": header nhóm theo điểm khởi hành (tms-dashboard-b2b.js.php) ===== */
.tms-product-group-row > td {
  padding: 16px 0 6px;
  border: 0;
  background: transparent;
}
.tms-product-group-head {
  /* Bảng nằm trong .table-responsive nên có thể cuộn ngang trên màn hình hẹp: header dính trái và không rộng quá
     khung nhìn, để số tour + chevron luôn nằm trong vùng thấy được thay vì trôi ra ngoài mép phải. */
  position: sticky;
  left: 0;
  width: min(100%, calc(100vw - 96px));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 14px;
  background: linear-gradient(90deg, #f0fdf4 0%, #f8fafc 65%);
  border: 1px solid #e2e8f0;
  border-left: 4px solid #16a34a;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color .15s ease, box-shadow .15s ease;
}
.tms-product-group-head:hover {
  background: #ecfdf5;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
}
.tms-product-group-head:focus-visible {
  outline: 2px solid #16a34a;
  outline-offset: 2px;
}
.tms-product-group-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dcfce7;
  color: #15803d;
  font-size: 1rem;
}
.tms-product-group-head.is-unspecified {
  border-left-color: #94a3b8;
  background: #f8fafc;
}
.tms-product-group-head.is-unspecified .tms-product-group-icon {
  background: #e2e8f0;
  color: #64748b;
}
.tms-product-group-title {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.tms-product-group-eyebrow {
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #64748b;
}
.tms-product-group-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tms-product-group-meta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .78rem;
  color: #475569;
}
.tms-product-group-count {
  padding: 2px 10px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
}
.tms-product-group-range {
  white-space: nowrap;
}
.tms-product-group-range i {
  margin-right: 4px;
  color: #94a3b8;
}
.tms-product-group-chevron {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: transform .2s ease, background-color .15s ease;
}
.tms-product-group-head:hover .tms-product-group-chevron {
  background: #fff;
}
.tms-product-group-head.is-collapsed .tms-product-group-chevron {
  transform: rotate(-90deg);
}
@media (max-width: 575.98px) {
  .tms-product-group-head { gap: 8px; padding: 8px 10px; }
  .tms-product-group-range { display: none; }
}

/* ===== B2B dashboard - "Our Products": header cấp quốc gia (trên header điểm khởi hành) ===== */
.tms-product-country-row > td {
  padding: 26px 0 4px;
  border: 0;
  background: transparent;
}
.tms-product-country-head {
  position: sticky;
  left: 0;
  width: min(100%, calc(100vw - 96px));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 10px;
  border-bottom: 2px solid #0f172a;
  cursor: pointer;
  user-select: none;
}
.tms-product-country-head:focus-visible {
  outline: 2px solid #16a34a;
  outline-offset: 2px;
}
.tms-product-country-flag {
  flex: 0 0 auto;
  width: 32px;
  height: 24px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .18);
}
.tms-product-country-globe {
  flex: 0 0 auto;
  width: 32px;
  text-align: center;
  font-size: 1.4rem;
  color: #64748b;
}
.tms-product-country-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.01em;
  color: #0f172a;
}
.tms-product-country-meta {
  flex: 0 0 auto;
  font-size: .8rem;
  color: #64748b;
  white-space: nowrap;
}
.tms-product-country-head:hover .tms-product-group-chevron {
  background: #f1f5f9;
}
.tms-product-country-head.is-collapsed .tms-product-group-chevron {
  transform: rotate(-90deg);
}
/* header điểm khởi hành nằm dưới 1 nước: thụt vào 1 nấc + bớt khoảng trống phía trên */
.tms-product-group-row.is-nested > td {
  padding: 12px 0 4px 14px;
}
@media (max-width: 575.98px) {
  .tms-product-country-meta { display: none; }
  .tms-product-country-name { font-size: 1.1rem; }
  .tms-product-group-row.is-nested > td { padding-left: 8px; }
}

/* KPI chi tiết: cột số thứ tự + dòng tổng của các bảng */
.kpi-mb-metric-table .kpi-mb-idx { width: 34px; color: #adb5bd; font-variant-numeric: tabular-nums; text-align: right; padding-right: 8px; }
.kpi-mb-metric-table tfoot td { background: #f8f9fa; border-top: 2px solid #dee2e6; font-weight: 600; }
/* td toàn cục bị ép position: relative !important -> cần !important để dòng tổng dính đáy vùng cuộn */
.kpi-mb-scroll .kpi-mb-metric-table tfoot td { position: sticky !important; bottom: 0; z-index: 1; }
.kpi-mb-total-note { font-weight: 400; font-size: 11px; color: #6c757d; }
.kpi-mb-idx-inline { display: inline-block; min-width: 22px; margin-right: 4px; color: #adb5bd; text-align: right; font-variant-numeric: tabular-nums; }

/* cảnh báo booking CHƯA CÓ DOANH THU / thiếu invoice (cùng ý với "No Invoice" ở tab Booking Revenue) */
.kpi-mb-tag-danger { background: #f8d7da; color: #842029; font-weight: 600; }
.kpi-mb-missing { border: 1px solid #ffe69c; background: #fff8e1; border-radius: .5rem; padding: .5rem .8rem; margin-bottom: .75rem; font-size: .85rem; }
.kpi-mb-missing > summary { cursor: pointer; font-weight: 600; color: #8a5a00; }
.kpi-mb-missing-hint { margin-top: .35rem; color: #6c5a2b; font-size: 12px; }
.kpi-mb-missing-group { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; margin-top: .5rem; }
.kpi-mb-missing-who { min-width: 150px; font-weight: 600; }
.kpi-mb-missing-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.kpi-mb-missing-chip { display: inline-flex; align-items: center; gap: .3rem; border: 1px solid #dee2e6; border-radius: .35rem; background: #fff; padding: .1rem .45rem; white-space: nowrap; }
.kpi-mb-table tr.is-no-revenue > td.kpi-mb-name-cell { box-shadow: inset 3px 0 0 #dc3545; }
.kpi-mb-metric-table tr.is-no-revenue > td { background: #fff5f5; }
.kpi-mb-metric-table tr.is-no-revenue > td.kpi-mb-idx { color: #dc3545; }

/* modal Kpi Settings (màn Quản lý KPI nhúng trong tab KPI) */
.kpi-mb-settings-icon { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; background: #198754; color: #fff; font-size: 1rem; }
.kpi-mb-settings-body { min-height: 50vh; }
/* dòng phụ "B2B x · B2C y" dưới mỗi khoản tiền ở thẻ Tham khảo (KPI hybrid) */
.kpi-mb-ref-sub { display: block; flex-basis: 100%; text-align: right; font-size: 10px; color: #6c757d; font-variant-numeric: tabular-nums; }
.kpi-mb-ref-line { flex-wrap: wrap; }
.kpi-mb-split-table tbody td:not(:first-child) { font-variant-numeric: tabular-nums; }
/* form KPI: ma trận chỉ số theo nguồn booking - cột B2B | B2C | Tổng (mỗi cột Mục tiêu + Tỷ trọng) */
.kpi-form-matrix th { font-size: 12px; font-weight: 600; color: #495057; vertical-align: middle; }
.kpi-form-matrix th.kpi-form-col-b2b { background: #dbeafe; color: #0b3d91; }
.kpi-form-matrix th.kpi-form-col-b2c { background: #d6f0e0; color: #14532d; }
.kpi-form-matrix th.kpi-form-col-total { background: #e9ecef; color: #343a40; }
.kpi-form-matrix td.kpi-form-col-b2b { background: #f4f8ff; }
.kpi-form-matrix td.kpi-form-col-b2c { background: #f3fbf6; }
.kpi-form-matrix td.kpi-form-col-total { background: #f6f7f8; }
.kpi-form-matrix .kpi-form-subhead th { font-weight: 500; font-size: 11px; }
.kpi-form-matrix td.kpi-form-col-b2b + td.kpi-form-col-b2b,
.kpi-form-matrix td.kpi-form-col-b2c + td.kpi-form-col-b2c,
.kpi-form-matrix td.kpi-form-col-total + td.kpi-form-col-total { padding-left: 2px; }

/* TMS Academy - hộp thoại dùng chung của Studio (tms-academy-library / tms-academy-lesson-form): lớp phủ + hộp trắng */
.tms-academy-modal-backdrop,
.tms-atlas-modal-backdrop { position: fixed; inset: 0; z-index: 2040; background: rgba(15, 23, 42, .6); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 12px; overflow: auto; }
.tms-academy-modal,
.tms-atlas-modal { width: 100%; background: #fff; border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,.3); }

/* TMS Academy - bảng phân quyền soạn (tms-academy-permissions): khối "Mọi catalog" ở trên, bảng tổng quan từng catalog ở dưới */
.tms-perm-section { border: 1px solid #e3e8ef; border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.tms-perm-section:last-child { margin-bottom: 0; }
.tms-perm-global { background: #f8fafc; }
.tms-perm-h { display: flex; align-items: center; gap: .5rem; font-weight: 700; margin-bottom: .25rem; }
.tms-perm-name { display: inline-flex; align-items: center; gap: .5rem; }
.tms-perm-chip { display: inline-block; margin: 1px 4px 1px 0; padding: 1px 8px; border-radius: 999px; background: #eef2f7; font-size: .8rem; white-space: nowrap; }
.tms-perm-chip.is-off { text-decoration: line-through; opacity: .6; }
/* Hàng "mức + ô chọn nhân viên + nút" (modal Phân quyền soạn, tab Người soạn của catalog): theme của app đặt padding 12px 15px cho MỌI .form-select / .form-control nên ô "sm" cao ~47px
   trong khi ô chọn nhân viên (v-select) ~34px và nút ~27px -> lệch hàng. Đưa cả ba về cùng chiều cao 36px, căn giữa. */
.tms-academy-pickrow { align-items: center; }
.tms-academy-pickrow .form-select,
.tms-academy-pickrow .vs__dropdown-toggle,
.tms-academy-pickrow .btn { box-sizing: border-box; height: 36px; min-height: 36px; }
.tms-academy-pickrow .form-select { padding-top: 0; padding-bottom: 0; padding-right: 2rem; }
.tms-academy-pickrow .vs__dropdown-toggle { padding: 0 !important; align-items: center; }
.tms-academy-pickrow .btn { padding-top: 0; padding-bottom: 0; display: inline-flex; align-items: center; }
.tms-perm-filter { height: 36px; padding-top: 0; padding-bottom: 0; }

/* TMS Academy - KHUNG "GỌN" ĐỒNG CHIỀU CAO (opt-in: thêm class tms-academy-compact vào khung gốc của màn có nhiều ô nhập / ô chọn / nút nằm cạnh nhau; nút cạnh ô nhập thêm tms-academy-fieldbtn).
   LÝ DO (2026-11-02, trang Lớp học bị user chê "input cái cao cái thấp"): theme.min.css của app đặt padding 12px 15px cho MỌI .form-control / .form-select / input (đè .form-control-sm của Bootstrap)
   nên ô "sm" cao ~47px, trong khi ô chọn v-select ~34px và nút .btn-sm ~27px -> cùng một hàng mà cao thấp lệch nhau. Khung này đưa cả bốn loại về 36px (khớp tms-academy-pickrow ở trên).
   KIỂM: tests/js/e2e/_common.js sameHeight() + kịch bản classes_studio / portal chạy với theme.min.css (biến shell ở run-academy-e2e.mjs) - màn Academy mới có hàng ô nhập NÊN dùng khung này và thêm phép kiểm. */
.tms-academy-compact .form-control-sm:not(textarea),
.tms-academy-compact .form-select-sm,
.tms-academy-compact .form-select,
.tms-academy-compact input.form-control:not([type="file"]):not([type="color"]):not([type="range"]),
.tms-academy-compact .input-group-sm > .form-control,
.tms-atlas-compact .form-control-sm:not(textarea),
.tms-atlas-compact .form-select-sm,
.tms-atlas-compact .form-select,
.tms-atlas-compact input.form-control:not([type="file"]):not([type="color"]):not([type="range"]),
.tms-atlas-compact .input-group-sm > .form-control { box-sizing: border-box; height: 36px; min-height: 36px; padding-top: 0; padding-bottom: 0; padding-left: .7rem; font-size: .875rem; line-height: 1.5; }
.tms-academy-compact .form-select-sm,
.tms-academy-compact .form-select,
.tms-atlas-compact .form-select-sm,
.tms-atlas-compact .form-select { padding-right: 2rem; }
.tms-academy-compact textarea.form-control,
.tms-academy-compact textarea.form-control-sm,
.tms-atlas-compact textarea.form-control,
.tms-atlas-compact textarea.form-control-sm { box-sizing: border-box; height: auto; padding: .5rem .7rem; font-size: .875rem; line-height: 1.5; }
.tms-academy-compact .vs__dropdown-toggle,
.tms-atlas-compact .vs__dropdown-toggle { box-sizing: border-box; min-height: 36px; padding: 0 !important; align-items: center; }
.tms-academy-compact .vs__selected, .tms-academy-compact .vs__search, .tms-academy-compact .vs__search::placeholder,
.tms-atlas-compact .vs__selected,
.tms-atlas-compact .vs__search,
.tms-atlas-compact .vs__search::placeholder { font-size: .875rem; }
.tms-academy-compact .tms-academy-fieldbtn,
.tms-academy-compact .input-group-sm > .btn,
.tms-atlas-compact .tms-atlas-fieldbtn,
.tms-atlas-compact .input-group-sm > .btn { box-sizing: border-box; height: 36px; min-height: 36px; padding-top: 0; padding-bottom: 0; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.tms-academy-compact .form-label,
.tms-atlas-compact .form-label { margin-bottom: .25rem; }
/* ô nhập / ô chọn NẰM TRONG BẢNG thấp hơn (32px) cho hàng bảng gọn; nhiều nút trong một ô bảng xếp thành một hàng (theme đặt .btn { display:flex } nên không gói thì chúng chồng dọc) */
.tms-academy-compact td .form-control-sm:not(textarea),
.tms-academy-compact td .form-select-sm,
.tms-academy-compact td input.form-control:not([type="file"]):not([type="color"]):not([type="range"]),
.tms-atlas-compact td .form-control-sm:not(textarea),
.tms-atlas-compact td .form-select-sm,
.tms-atlas-compact td input.form-control:not([type="file"]):not([type="color"]):not([type="range"]) { height: 32px; min-height: 32px; }   /* độ đặc hiệu >= quy tắc 36px ở trên, nếu không ô trong bảng vẫn 36px */
.tms-academy-compact .tms-academy-rowbtns,
.tms-atlas-compact .tms-atlas-rowbtns { align-items: center; }
.tms-academy-compact td .tms-academy-fieldbtn,
.tms-atlas-compact td .tms-atlas-fieldbtn { height: 32px; min-height: 32px; }   /* nút trong ô bảng cùng 32px với ô nhập trong bảng */
.tms-academy-compact td .input-group-sm > .btn,
.tms-atlas-compact td .input-group-sm > .btn { height: 32px; min-height: 32px; }
.tms-academy-compact .tms-academy-linkcell,
.tms-atlas-compact .tms-academy-linkcell { flex-wrap: nowrap; min-width: 300px; }
.tms-academy-compact .tms-academy-external-link,
.tms-atlas-compact .tms-academy-external-link { font-size: .78rem; text-overflow: ellipsis; }
.tms-academy-compact .tms-academy-link-missing,
.tms-atlas-compact .tms-academy-link-missing { max-width: 330px; }
.tms-academy-compact table > :not(caption) > * > *,
.tms-atlas-compact table > :not(caption) > * > * { vertical-align: middle; }   /* theme canh trên mọi ô bảng: chữ lệch so với ô nhập cùng hàng */
.tms-academy-compact .tms-academy-checkrow,
.tms-atlas-compact .tms-academy-checkrow { height: 36px; cursor: pointer; }
.tms-academy-compact .tms-academy-checkcol,
.tms-atlas-compact .tms-academy-checkcol { padding-top: 1.55rem; }   /* ngang hàng với ô nhập cạnh nó (chừa chỗ cho nhãn phía trên ô đó) */
/* nút "Mở" / "×" trong bảng: cao vừa phải (theme làm .btn-sm py-0 bị dẹt) */
.tms-perm-open, .tms-perm-remove { padding: 3px 10px; line-height: 1.4; }

/* TMS Academy - bộ công cụ soạn (pha 2): lịch sử nội dung + so sánh, nhập từ file, khoá mềm */
.tms-academy-rev-list { max-height: 60vh; overflow: auto; }
.tms-academy-diff { border: 1px solid #dee2e6; border-radius: 6px; max-height: 55vh; overflow: auto; font-size: .9rem; }
.tms-academy-diff-line { display: flex; gap: .5rem; padding: .2rem .5rem; border-bottom: 1px solid #f1f3f5; white-space: pre-wrap; word-break: break-word; }
.tms-academy-diff-line.is-add { background: #e6f4ea; color: #137333; }
.tms-academy-diff-line.is-del { background: #fdecea; color: #b3261e; text-decoration: line-through; }
.tms-academy-diff-line.is-same { color: #6c757d; }
.tms-academy-diff-mark { width: 1rem; flex: none; font-weight: 700; text-align: center; text-decoration: none; }
.tms-academy-diff-skip { padding: .15rem .5rem; text-align: center; font-size: .8rem; color: #adb5bd; background: #f8f9fa; }
.tms-academy-dropzone { background: #f8f9fa; border-style: dashed !important; }
.tms-academy-dropzone.over { background: #e7f1ff; border-color: #0d6efd !important; }
.tms-academy-import-list { max-height: 52vh; overflow: auto; }
.tms-academy-locked .bi-lock-fill { color: #b45309; }

/* TMS Academy - trình chỉnh mẫu khung ghi hình (tms-academy-template-editor / -props) + trang quản lý mẫu (tms-academy-recording-templates) */
.tms-academy-tpl-editor-backdrop { position: fixed; inset: 0; z-index: 2050; background: #e9ecef; display: flex; }
.tms-academy-tpl-editor { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.tms-academy-tpl-bar { display: flex; align-items: center; gap: .5rem; padding: .4rem .75rem; background: #fff; border-bottom: 1px solid #dee2e6; flex: none; flex-wrap: wrap; }
.tms-academy-tpl-body { flex: 1 1 auto; display: grid; grid-template-columns: 260px minmax(0, 1fr) 340px; min-height: 0; }
.tms-academy-tpl-layers { background: #f8f9fa; border-right: 1px solid #dee2e6; padding: .6rem; overflow: auto; font-size: .85rem; }
.tms-academy-tpl-layerlist { display: flex; flex-direction: column; gap: 2px; }
.tms-academy-tpl-layer { display: flex; align-items: center; gap: .35rem; padding: .25rem .4rem; border-radius: 6px; background: #fff; border: 1px solid #e3e6ea; cursor: pointer; user-select: none; }
.tms-academy-tpl-layer:hover { border-color: #adb5bd; }
.tms-academy-tpl-layer.sel { border-color: #0d6efd; background: #e7f0ff; }
.tms-academy-tpl-layer.off .tms-academy-tpl-layer-name { text-decoration: line-through; color: #adb5bd; }
.tms-academy-tpl-layer.dim { opacity: .55; }
.tms-academy-tpl-layer-icon { color: #6c757d; }
.tms-academy-tpl-scenes { display: inline-flex; gap: 2px; font-size: .45rem; color: #ced4da; }
.tms-academy-tpl-scenes .on { color: #0d6efd; }
.tms-academy-tpl-center { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #dfe3e8; }
.tms-academy-tpl-toolbar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .35rem .6rem; background: #f1f3f5; border-bottom: 1px solid #dee2e6; flex: none; }
.tms-academy-tpl-stagewrap { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; padding: 12px; }
.tms-academy-tpl-stage { position: relative; margin: auto; flex: none; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); background: #000; }
.tms-academy-tpl-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tms-academy-tpl-overlay { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; cursor: default; }
.tms-academy-tpl-hit { position: absolute; pointer-events: none; outline: 1px dashed rgba(13, 110, 253, .35); outline-offset: -1px; }
.tms-academy-tpl-hit.locked { outline-color: rgba(220, 53, 69, .35); }
.tms-academy-tpl-safe { position: absolute; pointer-events: none; border: 2px dashed rgba(255, 193, 7, .75); }
.tms-academy-tpl-grid { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px); background-size: 120px 120px; }
.tms-academy-tpl-guide { position: absolute; pointer-events: none; background: #ff3d9a; }
.tms-academy-tpl-guide.v { top: 0; bottom: 0; width: 2px; margin-left: -1px; }
.tms-academy-tpl-guide.h { left: 0; right: 0; height: 2px; margin-top: -1px; }
.tms-academy-tpl-selbox { position: absolute; pointer-events: none; outline: 3px solid #0d6efd; outline-offset: -1px; }
.tms-academy-tpl-selbox.fixed { outline-color: #fd7e14; outline-style: dashed; }
.tms-academy-tpl-handle { position: absolute; width: 22px; height: 22px; background: #fff; border: 3px solid #0d6efd; border-radius: 4px; pointer-events: auto; margin: -11px 0 0 -11px; }
.tms-academy-tpl-handle.h-nw { left: 0; top: 0; cursor: nwse-resize; } .tms-academy-tpl-handle.h-n { left: 50%; top: 0; cursor: ns-resize; } .tms-academy-tpl-handle.h-ne { left: 100%; top: 0; cursor: nesw-resize; }
.tms-academy-tpl-handle.h-e { left: 100%; top: 50%; cursor: ew-resize; } .tms-academy-tpl-handle.h-se { left: 100%; top: 100%; cursor: nwse-resize; } .tms-academy-tpl-handle.h-s { left: 50%; top: 100%; cursor: ns-resize; }
.tms-academy-tpl-handle.h-sw { left: 0; top: 100%; cursor: nesw-resize; } .tms-academy-tpl-handle.h-w { left: 0; top: 50%; cursor: ew-resize; }
.tms-academy-tpl-dim { position: absolute; left: 0; top: 100%; margin-top: 10px; background: #0d6efd; color: #fff; font-size: 22px; padding: 0 10px; border-radius: 4px; white-space: nowrap; }
.tms-academy-tpl-nobumper { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(33, 37, 41, .72); color: #fff; font-size: 1.1rem; pointer-events: none; }
.tms-academy-tpl-status { padding: .25rem .6rem; background: #f1f3f5; border-top: 1px solid #dee2e6; flex: none; }
.tms-academy-tpl-right { background: #fff; border-left: 1px solid #dee2e6; display: flex; flex-direction: column; min-height: 0; }
.tms-academy-tpl-rbody { overflow: auto; flex: 1 1 auto; }
.tms-academy-tpl-issue.lv-error { background: #fdecea; border-color: #f5c2c7 !important; }
.tms-academy-tpl-issue.lv-warn { background: #fff8e6; border-color: #ffe08a !important; }
.tms-academy-tpl-issue.lv-info { background: #eef7fb; }
.tms-academy-swatch { display: inline-block; flex: none; width: 24px; height: 24px; border-radius: 5px; border: 1px solid rgba(0, 0, 0, .25); }
.tms-academy-color-input { width: 42px; padding: 2px; flex: none; }
.tms-academy-props details > summary { cursor: pointer; padding: .2rem 0; border-bottom: 1px solid #eee; }
.tms-academy-tpl-imggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; max-height: 50vh; overflow: auto; }
.tms-academy-tpl-imgcard { border: 1px solid #dee2e6; border-radius: 8px; padding: .4rem; background: #fff; }
.tms-academy-tpl-imgcard.on { border-color: #0d6efd; box-shadow: 0 0 0 2px rgba(13, 110, 253, .25); }
.tms-academy-tpl-imgthumb { height: 90px; background: repeating-conic-gradient(#e9ecef 0% 25%, #fff 0% 50%) 50% / 16px 16px; border-radius: 6px; display: flex; align-items: center; justify-content: center; cursor: pointer; margin-bottom: .3rem; }
.tms-academy-tpl-imgthumb img { max-width: 100%; max-height: 100%; }
.tms-academy-tpl-thumb { aspect-ratio: 16 / 9; width: 100%; height: auto; background: #212529; cursor: pointer; }
@media (max-width: 1100px) { .tms-academy-tpl-body { grid-template-columns: 220px minmax(0, 1fr) 300px; } }

/* ===== Trình phát video Academy (tms-academy-video) =====
   Quy tắc bề rộng: trình phát LUÔN chiếm 100% bề rộng khung chứa (không đặt max-width ở nơi gọi); khung hình giữ tỉ lệ 16:9 nhưng không cao quá màn hình
   (hình dọc / khung quá rộng thì nền đen hai bên, thanh điều khiển luôn nằm trong tầm nhìn). Khung hình là container (@container vp) để thanh điều khiển co theo khung chứ không theo cửa sổ. */
.tms-vp { display: block; width: 100%; max-width: none; outline: none; --vp-accent: #2f6fed; --vp-accent-soft: rgba(47, 111, 237, .35); }
.tms-vp:focus-visible .tms-vp-stage { box-shadow: 0 0 0 3px rgba(47, 111, 237, .45); }
.tms-vp-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: min(78vh, 900px); background: #000; border-radius: 12px; overflow: hidden; container-type: inline-size; container-name: vp; color: #fff; user-select: none; -webkit-user-select: none; isolation: isolate; }
.tms-vp-stage:fullscreen { max-height: none; border-radius: 0; aspect-ratio: auto; width: 100vw; height: 100vh; }
.tms-vp-el { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; background: #000; cursor: pointer; }
.tms-vp.is-idle.is-playing .tms-vp-stage { cursor: none; }
.tms-vp.is-idle.is-playing .tms-vp-el { cursor: none; }

/* trạng thái tải / lỗi / đệm */
.tms-vp-overlay { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; background: rgba(8, 11, 16, .72); }
.tms-vp-overlay-text { font-size: .85rem; color: rgba(255, 255, 255, .8); }
.tms-vp-error { display: flex; align-items: center; gap: .5rem; color: #fff; max-width: 90%; }
.tms-vp-error .bi { color: #fbbf24; font-size: 1.2rem; }
.tms-vp-buffering { position: absolute; left: 50%; top: 50%; z-index: 3; transform: translate(-50%, -50%); pointer-events: none; }
.tms-vp-buffering .spinner-border { width: 3rem; height: 3rem; color: #fff; opacity: .9; border-width: .28em; }

/* nút phát lớn giữa hình */
.tms-vp-big { position: absolute; left: 50%; top: 50%; z-index: 3; transform: translate(-50%, -50%); width: 78px; height: 78px; border-radius: 50%; border: 0; background: var(--vp-accent); color: #fff; font-size: 2.4rem; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 0 0 8px rgba(47, 111, 237, .28), 0 10px 30px rgba(0, 0, 0, .45); transition: transform .15s ease, box-shadow .15s ease; }
.tms-vp-big .bi { margin-left: 3px; }
.tms-vp-big .bi-arrow-counterclockwise { margin-left: 0; font-size: 2rem; }
.tms-vp-big:hover { transform: translate(-50%, -50%) scale(1.07); box-shadow: 0 0 0 11px rgba(47, 111, 237, .3), 0 12px 34px rgba(0, 0, 0, .5); }
.tms-vp-big:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
/* huy hiệu THƯƠNG HIỆU thay nút phát xanh khi video có logo / tên (server: Academy_branding::for_asset): logo trong vòng tròn trắng + nút phát nhỏ ở góc dưới phải; chỉ có tên thì viên thuốc trắng chứa tên */
.tms-vp-big.is-logo { width: clamp(76px, 15cqw, 132px); height: clamp(76px, 15cqw, 132px); padding: 0; background: #fff; box-shadow: 0 0 0 7px rgba(255, 255, 255, .28), 0 10px 30px rgba(0, 0, 0, .5); }
.tms-vp-big.is-logo:hover { box-shadow: 0 0 0 10px rgba(255, 255, 255, .34), 0 12px 34px rgba(0, 0, 0, .55); }
.tms-vp-brand-img { width: 70%; height: 70%; display: block; object-fit: contain; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.tms-vp-big-chip { position: absolute; right: -3%; bottom: -3%; width: 36%; height: 36%; min-width: 28px; min-height: 28px; display: flex; align-items: center; justify-content: center; border: 3px solid #fff; border-radius: 50%; background: var(--vp-accent); color: #fff; font-size: clamp(.95rem, 2.2cqw, 1.5rem); line-height: 1; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.tms-vp-big .tms-vp-big-chip .bi { margin-left: 1px; font-size: inherit; }
.tms-vp-big.is-name { display: inline-flex; width: auto; height: auto; max-width: min(78%, 480px); padding: .55rem .6rem .55rem 1.5rem; gap: .9rem; border-radius: 999px; background: #fff; color: #1f2937; font-size: 1rem; }
.tms-vp-big.is-name .tms-vp-big-chip { position: static; flex: none; width: 46px; height: 46px; border-width: 0; font-size: 1.5rem; }
.tms-vp-brand-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(.8rem, 2.2cqw, 1.3rem); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }

/* thông báo nhanh giữa hình */
.tms-vp-osd { position: absolute; left: 50%; top: 14%; z-index: 5; transform: translateX(-50%); display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .95rem; border-radius: 999px; background: rgba(12, 15, 21, .82); color: #fff; font-size: .9rem; font-weight: 500; pointer-events: none; backdrop-filter: blur(6px); }
.tms-vp-osd .bi { font-size: 1.05rem; }
.tms-vp-osd-enter-active { transition: opacity .12s ease, transform .12s ease; }
.tms-vp-osd-leave-active { transition: opacity .25s ease; }
.tms-vp-osd-enter-from { opacity: 0; transform: translateX(-50%) translateY(6px); }
.tms-vp-osd-leave-to { opacity: 0; }

/* nhắc "tiếp tục từ ..." */
.tms-vp-resume { position: absolute; left: 12px; bottom: 86px; z-index: 5; display: flex; align-items: center; gap: .55rem; max-width: calc(100% - 24px); padding: .4rem .55rem .4rem .8rem; border-radius: 10px; background: rgba(12, 15, 21, .88); color: #fff; font-size: .85rem; backdrop-filter: blur(6px); }
.tms-vp-resume .bi-skip-forward-circle { font-size: 1.1rem; color: #7aa7ff; }
.tms-vp-link { border: 0; background: none; color: #8db4ff; font-weight: 600; padding: .1rem .3rem; cursor: pointer; border-radius: 4px; }
.tms-vp-link:hover { color: #fff; text-decoration: underline; }
.tms-vp-x { border: 0; background: none; color: rgba(255, 255, 255, .7); width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: .7rem; }
.tms-vp-x:hover { background: rgba(255, 255, 255, .15); color: #fff; }

/* thanh tiến độ mảnh khi điều khiển đã ẩn */
.tms-vp-mini { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 3px; background: rgba(255, 255, 255, .22); opacity: 0; transition: opacity .2s ease; pointer-events: none; }
.tms-vp-mini-fill { height: 100%; background: var(--vp-accent); }
.tms-vp.is-idle.is-playing .tms-vp-mini { opacity: 1; }

/* thanh điều khiển nổi */
.tms-vp-controls { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; padding: 28px 12px 8px; background: linear-gradient(to top, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, .5) 55%, rgba(0, 0, 0, 0) 100%); opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.tms-vp-controls.show { opacity: 1; transform: none; pointer-events: auto; }
.tms-vp-bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: 2px; }
.tms-vp-group { display: flex; align-items: center; gap: 2px; min-width: 0; }
.tms-vp-group-right { flex: none; }
.tms-vp-btn { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: #fff; font-size: 1.35rem; line-height: 1; cursor: pointer; transition: background .12s ease; }
.tms-vp-btn:hover { background: rgba(255, 255, 255, .16); }
.tms-vp-btn:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.tms-vp-skip { font-size: 1.3rem; }
.tms-vp-skip b { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-48%); font-size: .52rem; font-weight: 700; text-align: center; pointer-events: none; }
.tms-vp-rate { font-size: .85rem; font-weight: 600; min-width: 46px; font-variant-numeric: tabular-nums; }
.tms-vp-time { flex: none; padding: 0 8px; font-size: .85rem; color: rgba(255, 255, 255, .92); white-space: nowrap; }
.tms-vp-chnow { min-width: 0; max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; color: rgba(255, 255, 255, .72); padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, .28); margin-left: 2px; }

/* âm lượng: thanh trượt mở ra khi rê chuột / chọn bàn phím */
.tms-vp-vol { display: flex; align-items: center; }
.tms-vp-vol-range { width: 0; opacity: 0; margin: 0; padding: 0; height: 22px; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; transition: width .18s ease, opacity .18s ease, margin .18s ease; }
.tms-vp-vol:hover .tms-vp-vol-range, .tms-vp-vol:focus-within .tms-vp-vol-range { width: 76px; opacity: 1; margin: 0 8px 0 2px; }
.tms-vp-vol-range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, #fff 0, #fff var(--v, 100%), rgba(255, 255, 255, .3) var(--v, 100%)); }
.tms-vp-vol-range::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; margin-top: -4.5px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.tms-vp-vol-range::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .3); }
.tms-vp-vol-range::-moz-range-progress { height: 4px; border-radius: 2px; background: #fff; }
.tms-vp-vol-range::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: #fff; }

/* thanh tua: vùng bấm 20px, đường kẻ 4px (to lên khi rê chuột), vạch chương, vùng đệm, gợi ý thời gian */
.tms-vp-timeline { position: relative; height: 20px; cursor: pointer; touch-action: none; outline: none; }
.tms-vp-timeline:focus-visible .tms-vp-track { box-shadow: 0 0 0 2px #fff; }
.tms-vp-track { position: absolute; left: 0; right: 0; top: 50%; height: 4px; transform: translateY(-50%); border-radius: 2px; background: rgba(255, 255, 255, .26); transition: height .12s ease; overflow: hidden; }
.tms-vp-timeline:hover .tms-vp-track, .tms-vp-timeline.scrubbing .tms-vp-track { height: 7px; }
.tms-vp-buffered { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255, 255, 255, .38); transition: width .3s ease; }
.tms-vp-played { position: absolute; left: 0; top: 0; bottom: 0; background: var(--vp-accent); transition: width .25s linear; }
.tms-vp-timeline.scrubbing .tms-vp-played { transition: none; }
.tms-vp-mark { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: rgba(0, 0, 0, .75); }
.tms-vp-thumb { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .55); transform: scale(0); transition: transform .12s ease; pointer-events: none; }
.tms-vp-timeline:hover .tms-vp-thumb, .tms-vp-timeline.scrubbing .tms-vp-thumb, .tms-vp-timeline:focus-visible .tms-vp-thumb { transform: scale(1); }
.tms-vp-tip { position: absolute; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 1px; padding: .25rem .55rem; border-radius: 6px; background: rgba(12, 15, 21, .92); color: #fff; font-size: .78rem; white-space: nowrap; pointer-events: none; max-width: 70%; }
.tms-vp-tip b { font-variant-numeric: tabular-nums; font-weight: 600; }
.tms-vp-tip-ch { color: rgba(255, 255, 255, .72); font-size: .72rem; overflow: hidden; text-overflow: ellipsis; max-width: 30ch; }

/* menu tốc độ / chương mở lên trên thanh điều khiển */
.tms-vp-menuwrap { position: relative; }
.tms-vp-menu { position: absolute; right: 0; bottom: 46px; z-index: 8; min-width: 190px; max-height: min(52vh, 360px); overflow: auto; padding: 6px; border-radius: 12px; background: rgba(16, 20, 28, .97); box-shadow: 0 10px 34px rgba(0, 0, 0, .55); }
.tms-vp-menu-wide { min-width: 280px; max-width: min(86vw, 380px); }
.tms-vp-menu-title { padding: .3rem .6rem .45rem; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.tms-vp-menu-item { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .45rem .6rem; border: 0; border-radius: 8px; background: transparent; color: #fff; font-size: .88rem; text-align: left; cursor: pointer; }
.tms-vp-menu-item:hover, .tms-vp-menu-item:focus-visible { background: rgba(255, 255, 255, .12); outline: none; }
.tms-vp-menu-item.on { background: rgba(47, 111, 237, .28); font-weight: 600; }
.tms-vp-menu-item .bi { width: 1rem; flex: none; }
.tms-vp-menu-time { flex: none; min-width: 3.4em; font-variant-numeric: tabular-nums; color: #8db4ff; font-weight: 600; }
.tms-vp-menu-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* khung chứa hẹp (Studio nửa màn hình, điện thoại): bỏ bớt nút phụ, thanh điều khiển gọn lại */
@container vp (max-width: 620px) { .tms-vp-chnow { display: none; } .tms-vp-pip { display: none; } }
@container vp (max-width: 480px) {
  .tms-vp-controls { padding: 22px 8px 6px; }
  .tms-vp-btn { min-width: 34px; height: 34px; font-size: 1.2rem; }
  .tms-vp-skip { display: none; }
  .tms-vp-vol:hover .tms-vp-vol-range, .tms-vp-vol:focus-within .tms-vp-vol-range { width: 0; margin: 0; opacity: 0; }
  .tms-vp-time { padding: 0 4px; font-size: .78rem; }
  .tms-vp-big { width: 62px; height: 62px; font-size: 2rem; }
  .tms-vp-resume { bottom: 74px; font-size: .8rem; }
}

/* danh sách chương dưới hình */
.tms-vp-chapters { margin-top: .75rem; border: 1px solid rgba(15, 23, 42, .1); border-radius: 12px; background: #fff; overflow: hidden; }
.tms-vp-chapters-head { display: flex; align-items: center; gap: .5rem; padding: .55rem .9rem; border-bottom: 1px solid rgba(15, 23, 42, .08); background: #f8fafc; font-weight: 600; color: #334155; }
.tms-vp-chapters-count { margin-left: auto; padding: 0 .55rem; border-radius: 999px; background: #e2e8f0; color: #475569; font-size: .75rem; font-weight: 600; }
.tms-vp-chapter-list { max-height: 240px; overflow: auto; }
.tms-vp-chapters .tms-vp-chapter { display: flex; align-items: center; gap: .75rem; padding: .5rem .9rem; border: 0; border-bottom: 1px solid rgba(15, 23, 42, .06); border-radius: 0; background: #fff; color: #1e293b; font-size: .88rem; text-align: left; }
.tms-vp-chapters .tms-vp-chapter:last-child { border-bottom: 0; }
.tms-vp-chapters .tms-vp-chapter:hover { background: #f1f5f9; }
.tms-vp-chapters .tms-vp-chapter.active { background: #eef4ff; color: #1d3f9c; box-shadow: inset 3px 0 0 #2f6fed; font-weight: 600; }
.tms-vp-chapter-time { flex: none; min-width: 3.4em; font-variant-numeric: tabular-nums; color: #2f6fed; font-weight: 600; }
.tms-vp-chapter-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tms-vp-chapter-now { flex: none; color: #2f6fed; }

@media (prefers-reduced-motion: reduce) {
  .tms-vp-controls, .tms-vp-track, .tms-vp-played, .tms-vp-buffered, .tms-vp-thumb, .tms-vp-big, .tms-vp-vol-range, .tms-vp-osd-enter-active, .tms-vp-osd-leave-active { transition: none !important; }
}

/* ===== Academy Studio (tms-academy-outline / -lesson-form / -catalog-form) =====
   Bố cục: khung hai cột (cây bên trái dính + kéo giãn được, chi tiết bên phải); thanh tiêu đề của chi tiết DÍNH dưới header của app (--studio-top = chiều cao header cố định 80px). */
.tms-studio { --studio-top: 80px; --st-line: #e6e9f0; --st-soft: #f6f8fb; --st-ink: #1f2937; --st-muted: #64748b; --st-accent: #3454d1; --st-accent-soft: #e8edfc; }
.tms-studio-top { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .9rem; }
.tms-studio-brand { width: 42px; height: 42px; flex: none; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #3454d1, #6c8cff); color: #fff; font-size: 1.3rem; box-shadow: 0 4px 12px rgba(52, 84, 209, .35); }
.tms-studio-shell { display: grid; grid-template-columns: var(--st-nav-w, 340px) 10px minmax(0, 1fr); align-items: start; }
.tms-studio-shell.is-nav-collapsed { grid-template-columns: minmax(0, 1fr); }
.tms-studio-main { min-width: 0; }
.tms-studio-navopen { margin-bottom: .6rem; }
@keyframes tms-spin { to { transform: rotate(360deg); } }
.tms-spin { display: inline-block; animation: tms-spin .9s linear infinite; }

/* ---- thanh bên: cây ---- */
.tms-studio-nav { position: sticky; top: calc(var(--studio-top) + 10px); height: calc(100vh - var(--studio-top) - 26px); min-height: 360px; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--st-line); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.tms-studio-navhead { display: flex; align-items: center; gap: .4rem; padding: .7rem .75rem .45rem; }
.tms-studio-navtitle { font-weight: 700; font-size: .95rem; color: var(--st-ink); }
.tms-studio-iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--st-muted); cursor: pointer; font-size: .95rem; }
.tms-studio-iconbtn:hover { background: #eef1f6; color: var(--st-ink); }
.tms-studio-iconbtn.on { color: var(--st-accent); background: var(--st-accent-soft); }
.tms-studio-iconbtn.is-danger:hover, .tms-studio-iconbtn.is-danger:focus-visible { background: #fde8ea; color: #c0212f; }
/* nút xoá trong DANH SÁCH (dòng giáo trình, dòng tổng quan catalog): luôn thấy nhưng nhạt, đậm lên khi rê chuột / focus */
.tms-studio-curr-del, .tms-studio-ovrow-del { flex: none; opacity: .5; }
.tms-studio-curr-row:hover .tms-studio-curr-del, .tms-studio-curr-sec:hover .tms-studio-curr-del, .tms-studio-ovrow:hover .tms-studio-ovrow-del, .tms-studio-curr-del:focus-visible, .tms-studio-ovrow-del:focus-visible { opacity: 1; }
.tms-studio-curr-sec .tms-studio-curr-del { margin-left: auto; }
.tms-studio-iconbtn.sm { width: 24px; height: 24px; border-radius: 6px; font-size: .8rem; }
.tms-studio-iconbtn:focus-visible { outline: 2px solid var(--st-accent); outline-offset: 1px; }
.tms-studio-searchrow { display: flex; align-items: center; gap: .15rem; padding: 0 .55rem .55rem .75rem; }
.tms-studio-tools { display: flex; flex: none; }
.tms-studio-search { position: relative; flex: 1 1 auto; min-width: 0; }
.tms-studio-search > .bi { position: absolute; left: .65rem; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; font-size: .8rem; }
.tms-studio-search .form-control { padding-left: 2rem; border-radius: 9px; background: var(--st-soft); border-color: transparent; }
.tms-studio-search .form-control:focus { background: #fff; border-color: var(--st-accent); box-shadow: 0 0 0 3px rgba(52, 84, 209, .15); }
/* ---- cây "yên tĩnh": TÊN luôn là thứ nổi nhất. Trạng thái = chấm nhỏ cuối dòng; thông tin phụ = MỘT dòng chữ mờ chỉ ghi điều đáng chú ý; biểu tượng không có ô nền; thao tác (+ / kéo) chỉ hiện khi rê chuột và nổi lên trên tên (không chiếm chỗ) ---- */
/* cột nav là flex dọc cao cố định: chỉ cây (.tms-academy-tree) được co / cuộn; các hàng quanh nó KHÔNG co (trước đây hàng lọc có overflow:hidden nên min-height = 0 và bị co lại, bị ô tìm kiếm che khi cây dài); cột hẹp thì chip xuống dòng chứ không bị cắt */
.tms-studio-navhead, .tms-studio-filters, .tms-studio-navfoot { flex: none; }
.tms-studio-filters { display: flex; flex-wrap: wrap; gap: .1rem; padding: 0 .6rem .45rem; border-bottom: 1px solid var(--st-line); }
.tms-studio-fchip { flex: none; display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .5rem; border: 0; border-radius: 6px; background: transparent; color: var(--st-muted); font-size: .76rem; font-weight: 500; white-space: nowrap; cursor: pointer; }
.tms-studio-fchip:hover { background: #f1f4f9; color: var(--st-ink); }
.tms-studio-fchip.on { background: var(--st-accent-soft); color: var(--st-accent); font-weight: 600; }
.tms-studio-fcount { font-size: .68rem; font-weight: 600; opacity: .7; font-variant-numeric: tabular-nums; }
.tms-studio-fchip.on .tms-studio-fcount { opacity: 1; }
.tms-academy-tree { flex: 1 1 auto; min-height: 0; overflow: auto; padding: .2rem 0 .5rem; }
.tms-studio-treenote { padding: .7rem .9rem; font-size: .82rem; color: var(--st-muted); }
.tms-academy-tree-row { --row-bg: #fff; position: relative; display: flex; align-items: flex-start; gap: .3rem; min-height: 30px; padding-top: .26rem; padding-bottom: .26rem; padding-right: 1.5rem; cursor: pointer; font-size: .86rem; line-height: 1.3; color: var(--st-ink); border-left: 3px solid transparent; outline: none; user-select: none; -webkit-user-select: none; }
.tms-academy-tree-row::before { content: ''; position: absolute; left: 18px; top: 0; bottom: 0; width: calc(var(--depth, 0) * 14px); background-image: repeating-linear-gradient(90deg, #e9ecf2 0 1px, transparent 1px 14px); pointer-events: none; }
.tms-academy-tree-row:hover { --row-bg: #f4f6fb; background: var(--row-bg); }
.tms-academy-tree-row.active { --row-bg: var(--st-accent-soft); background: var(--row-bg); border-left-color: var(--st-accent); }
.tms-academy-tree-row.active .tms-academy-tree-label { font-weight: 600; }
.tms-academy-tree-row:focus-visible { box-shadow: inset 0 0 0 2px var(--st-accent); }
.tms-academy-tree-row.muted { opacity: .6; }
.tms-academy-tree-row.is-catalog.is-root > .tms-studio-rowmain .tms-academy-tree-label { font-weight: 600; }
.tms-academy-tree-row.dragging { opacity: .4; }
.tms-academy-tree-row.drop-before { box-shadow: inset 0 3px 0 var(--st-accent); }
.tms-academy-tree-row.drop-after { box-shadow: inset 0 -3px 0 var(--st-accent); }
.tms-academy-tree-row.drop-into { background: #dfe8ff; box-shadow: inset 0 0 0 2px var(--st-accent); }
.tms-academy-tree-row mark { padding: 0 1px; border-radius: 2px; background: #fde68a; color: inherit; }
.tms-academy-chevron { width: 1.1rem; flex: none; text-align: center; color: #a3aebf; line-height: 22px; font-size: .75rem; }
.tms-academy-chevron.bi-chevron-down, .tms-academy-chevron.bi-chevron-right { cursor: pointer; }
.tms-academy-chevron.bi-chevron-down:hover, .tms-academy-chevron.bi-chevron-right:hover { color: var(--st-ink); }
/* biểu tượng loại: chỉ là ký hiệu có màu (ô nền màu dành cho tiêu đề bên phải), nhỏ + dịu để không tranh với tên */
.tms-academy-tree-row .tms-studio-ico { width: 18px; height: 22px; border-radius: 0; background: none; font-size: .95rem; opacity: .9; }
.tms-academy-tree-row .tms-studio-ico.t-section { opacity: .65; }
.tms-studio-rowmain { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.tms-studio-rowline { display: flex; align-items: center; gap: .35rem; min-width: 0; min-height: 22px; }
.tms-academy-tree-label { min-width: 0; flex: 0 1 auto; }
.tms-studio-warn { flex: none; font-size: .75rem; }
.tms-academy-tree-row .tms-studio-count { flex: none; padding: 0; background: none; color: #a3aebf; font-size: .72rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.tms-studio-rowmeta { display: block; margin-top: .02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; line-height: 1.35; color: #94a3b8; }
.tms-studio-metapart + .tms-studio-metapart::before { content: ' · '; white-space: pre; color: #cbd2de; }
.tms-studio-metapart > .bi { margin-right: .2rem; font-size: .68rem; }
.tms-studio-metapart.is-aud { color: #4d68c9; }
.tms-studio-metapart.is-must { color: #c2410c; }
.tms-studio-metapart.is-muted { color: #b6bfce; }
/* chấm trạng thái ở cuối dòng */
.tms-studio-state { position: absolute; right: .55rem; top: .26rem; height: 22px; display: flex; align-items: center; }
.tms-studio-dot { flex: none; box-sizing: border-box; width: 8px; height: 8px; border-radius: 50%; }
.tms-studio-dot.is-published { background: #22c55e; }
.tms-studio-dot.is-draft { border: 1.5px solid #a3aebf; background: transparent; }
.tms-studio-dot.is-review { background: #f59e0b; }
.tms-studio-dot.is-archived { background: #64748b; }
/* thao tác khi rê chuột: nổi lên trên cuối dòng, nền trùng nền dòng nên không chiếm chỗ của tên */
.tms-studio-rowactions { position: absolute; right: 1.35rem; top: .1rem; display: flex; align-items: center; gap: 2px; padding-left: 16px; background: linear-gradient(to left, var(--row-bg) 72%, transparent); opacity: 0; pointer-events: none; transition: opacity .12s ease; }
.tms-academy-tree-row:hover .tms-studio-rowactions, .tms-academy-tree-row:focus-within .tms-studio-rowactions { opacity: 1; pointer-events: auto; }
.tms-studio-grip { color: #b6bfce; cursor: grab; font-size: .9rem; }
/* cây dừng ở khoá: khoá không có mũi tên mà có biểu tượng mắt (LUÔN hiện) mở bảng xem nhanh chương / bài; "+" và tay kéo dịch sang trái chừa chỗ cho mắt; dòng khoá được tô nhạt khi đang sửa một chương / bài của nó */
.tms-academy-tree-row.is-course > .tms-studio-rowmain { padding-right: 26px; }
.tms-studio-peekbtn { position: absolute; right: 1.35rem; top: .1rem; color: #94a3b8; }
.tms-studio-peekbtn:hover, .tms-studio-peekbtn.on { color: var(--st-accent); background: var(--st-accent-soft); }
.tms-academy-tree-row.is-course .tms-studio-rowactions { right: calc(1.35rem + 26px); }
.tms-academy-tree-row.is-current { --row-bg: #f1f5ff; background: var(--row-bg); border-left-color: #b8c6f5; }
.tms-academy-tree-row.is-current .tms-academy-tree-label { font-weight: 600; }
.tms-studio-rowmatch { color: #4d68c9; }
.tms-studio-rowmatch > .bi { margin-right: .25rem; font-size: .68rem; }
/* bảng xem nhanh chương + bài của khoá (dùng khung nổi của .tms-studio-popmenu) */
.tms-studio-peek { width: 380px; max-width: calc(100vw - 16px); padding: 0; display: flex; flex-direction: column; overflow: hidden; max-height: min(70vh, 520px); }
.tms-studio-peek-head { flex: none; display: flex; align-items: center; gap: .4rem; padding: .55rem .6rem .35rem .85rem; }
.tms-studio-peek-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .9rem; color: var(--st-ink); }
.tms-studio-peek-sum { flex: none; padding: 0 .85rem .45rem; font-size: .76rem; color: var(--st-muted); border-bottom: 1px solid var(--st-line); }
.tms-studio-peek-note { padding: .9rem; font-size: .84rem; color: var(--st-muted); text-align: center; }
.tms-studio-peek-list { flex: 1 1 auto; min-height: 0; overflow: auto; padding: .25rem 0; }
.tms-studio-peek-sec, .tms-studio-peek-row { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .38rem .85rem; border: 0; background: transparent; text-align: left; font-size: .84rem; color: var(--st-ink); cursor: pointer; }
.tms-studio-peek-sec { font-weight: 600; color: #334155; background: var(--st-soft); }
.tms-studio-peek-row.nosec { padding-left: .85rem; }
.tms-studio-peek-row:not(.nosec) { padding-left: 1.7rem; }
.tms-studio-peek-sec:hover, .tms-studio-peek-row:hover, .tms-studio-peek-sec:focus-visible, .tms-studio-peek-row:focus-visible { background: #eef1f9; outline: none; }
.tms-studio-peek-row.is-current { background: var(--st-accent-soft); }
.tms-studio-peek-t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tms-studio-peek-min { flex: none; font-size: .72rem; color: var(--st-muted); font-variant-numeric: tabular-nums; }
.tms-studio-peek .tms-studio-ico { width: 18px; height: 22px; border-radius: 0; background: none; font-size: .95rem; }
.tms-studio-peek .tms-studio-count { flex: none; padding: 0; background: none; color: #a3aebf; font-size: .72rem; }
.tms-studio-peek-foot { flex: none; display: flex; gap: .25rem; padding: .3rem .4rem; border-top: 1px solid var(--st-line); }
.tms-studio-peek-foot .tms-studio-menu-item { width: auto; flex: 1 1 0; justify-content: center; }
.tms-studio-navfoot { display: flex; align-items: center; gap: .5rem; padding: .4rem .8rem; border-top: 1px solid var(--st-line); background: var(--st-soft); font-size: .72rem; color: var(--st-muted); }
.tms-studio-top kbd { padding: 0 .3rem; border-radius: 4px; background: #e2e8f0; color: #334155; font-size: .68rem; box-shadow: none; }
.tms-studio-resizer { position: sticky; top: calc(var(--studio-top) + 10px); height: calc(100vh - var(--studio-top) - 26px); min-height: 360px; cursor: col-resize; touch-action: none; outline: none; }
.tms-studio-resizer::after { content: ''; position: absolute; left: 4px; top: 0; bottom: 0; width: 2px; border-radius: 2px; background: transparent; transition: background .12s ease; }
.tms-studio-resizer:hover::after, .tms-studio-resizer:focus-visible::after { background: var(--st-accent); }

/* ---- vỏ của chi tiết + thanh tiêu đề dính ---- */
.tms-studio-pane { background: #fff; border: 1px solid var(--st-line); border-radius: 14px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.tms-studio-pane.tms-studio-padded { padding: 1.1rem 1.25rem; }
.tms-studio-empty { padding: 3.5rem 1.5rem; text-align: center; color: var(--st-muted); }
.tms-studio-empty > .bi { display: block; margin-bottom: .6rem; font-size: 2.6rem; color: #b6c2dc; }
.tms-studio-empty-t { font-size: 1.05rem; font-weight: 600; color: var(--st-ink); margin-bottom: .25rem; }
.tms-studio-head { position: sticky; top: var(--studio-top); z-index: 30; padding: .65rem 1.1rem .7rem; background: #fff; border-bottom: 1px solid var(--st-line); border-radius: 14px 14px 0 0; }
.tms-studio-crumbrow { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .6rem; margin-bottom: .55rem; min-height: 24px; }
.tms-studio-crumbrow .tms-studio-viewswitch { flex: none; }
.tms-studio-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: .1rem; min-width: 0; flex: 1 1 auto; font-size: .78rem; }
.tms-studio-crumb { max-width: 220px; padding: .05rem .35rem; border: 0; border-radius: 6px; background: transparent; color: var(--st-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.tms-studio-crumb:hover { background: #eef1f6; color: var(--st-accent); }
.tms-studio-crumb-sep { color: #b6bfce; font-size: .62rem; }
.tms-studio-mover { flex: none; }
.tms-studio-headrow { display: flex; align-items: flex-start; gap: .85rem; flex-wrap: wrap; }
.tms-studio-titlebox { flex: 1 1 280px; min-width: 0; }
.tms-studio-title { font-size: 1.3rem; font-weight: 700; line-height: 1.25; color: var(--st-ink); overflow-wrap: anywhere; }
.tms-studio-title-input { display: block; width: 100%; padding: .1rem 0; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; font-size: 1.3rem; font-weight: 700; line-height: 1.25; color: var(--st-ink); outline: none; transition: border-color .12s ease; }
.tms-studio-title-input:hover { border-bottom-color: #dbe1ec; }
.tms-studio-title-input:focus { border-bottom-color: var(--st-accent); }
.tms-studio-title-input.is-invalid { border-bottom-color: #dc3545; }
.tms-studio-title-input::placeholder { color: #a7b0c2; font-weight: 500; }
.tms-studio-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .8rem; margin-top: .3rem; font-size: .78rem; color: var(--st-muted); }
.tms-studio-meta-item { display: inline-flex; align-items: center; gap: .3rem; }
.tms-studio-savestate { display: inline-flex; align-items: center; gap: .3rem; margin-left: auto; font-weight: 500; }
.tms-studio-savestate.is-saved { color: #15803d; }
.tms-studio-savestate.is-dirty { color: #b45309; }
.tms-studio-savestate.is-dirty .bi { font-size: .5rem; }
.tms-studio-savestate.is-saving { color: var(--st-muted); }
.tms-studio-actions { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; margin-left: auto; }
.tms-studio-actions .btn.is-dirty, .tms-studio-save.is-dirty { box-shadow: 0 0 0 3px rgba(245, 158, 11, .35); }
.tms-studio-viewswitch .btn { display: inline-flex; align-items: center; }
.tms-studio-split-btn { display: none !important; }
@media (min-width: 1200px) { .tms-studio-split-btn { display: inline-flex !important; } }
.tms-studio-more { position: relative; }
.tms-studio-menu, .tms-studio-popmenu { min-width: 230px; padding: 6px; background: #fff; border: 1px solid var(--st-line); border-radius: 12px; box-shadow: 0 14px 36px rgba(16, 24, 40, .18); }
.tms-studio-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; }
.tms-studio-popmenu { position: fixed; z-index: 2000; max-height: 70vh; overflow: auto; }
.tms-studio-menu-title { padding: .35rem .65rem .3rem; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #94a3b8; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tms-studio-menu-item { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .48rem .65rem; border: 0; border-radius: 8px; background: transparent; color: var(--st-ink); font-size: .875rem; text-align: left; text-decoration: none; cursor: pointer; }
.tms-studio-menu-item:hover, .tms-studio-menu-item:focus-visible { background: #f1f4f9; color: var(--st-ink); outline: none; }
.tms-studio-menu-item .bi { width: 1.1rem; flex: none; color: var(--st-muted); text-align: center; }
.tms-studio-menu-item.is-danger, .tms-studio-menu-item.is-danger .bi { color: #dc3545; }
.tms-studio-menu-item.is-danger:hover { background: #fdecee; }
.tms-studio-menu-hint { margin-left: auto; font-size: .7rem; color: #94a3b8; }
.tms-studio-menu-sep { height: 1px; margin: 5px 4px; background: var(--st-line); }

/* ---- biểu tượng loại, nhãn trạng thái ---- */
.tms-studio-ico { --tone: #64748b; flex: none; width: 24px; height: 24px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; color: var(--tone); background: #eef1f6; background: color-mix(in srgb, var(--tone) 13%, #fff); }
.tms-studio-ico.lg { width: 44px; height: 44px; border-radius: 12px; font-size: 1.25rem; }
.tms-studio-ico.t-catalog { --tone: #3454d1; }
.tms-studio-ico.t-course { --tone: #4f46e5; }
.tms-studio-ico.t-section { --tone: #64748b; }
.tms-studio-ico.t-ARTICLE { --tone: #2563eb; }
.tms-studio-ico.t-VIDEO { --tone: #e11d48; }
.tms-studio-ico.t-FILE { --tone: #d97706; }
.tms-studio-ico.t-PRACTICE { --tone: #059669; }
.tms-studio-ico.t-QUIZ { --tone: #7c3aed; }
.tms-pill { display: inline-flex; align-items: center; flex: none; padding: .08rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.tms-pill.sm { padding: 0 .45rem; font-size: .66rem; }
.tms-pill.is-draft { background: #eef1f6; color: #475569; }
.tms-pill.is-review { background: #fff3cd; color: #8a5a00; }
.tms-pill.is-published { background: #dcfce7; color: #166534; }
.tms-pill.is-archived { background: #e5e7eb; color: #374151; }

/* ---- thân chi tiết (khoá / catalog) ---- */
.tms-studio-body { padding: 1rem 1.1rem 1.25rem; }
.tms-studio-tabs { display: flex; flex-wrap: wrap; gap: .15rem; margin-bottom: 1rem; border-bottom: 1px solid var(--st-line); }
.tms-studio-tab { display: inline-flex; align-items: center; gap: .4rem; flex: none; padding: .55rem .85rem; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--st-muted); font-weight: 500; font-size: .875rem; cursor: pointer; white-space: nowrap; }
.tms-studio-tab:hover { color: var(--st-ink); }
.tms-studio-tab.on { color: var(--st-accent); border-bottom-color: var(--st-accent); font-weight: 600; }
.tms-studio-tab .tms-studio-count { background: #e2e8f0; }
.tms-studio-tabpanel { min-width: 0; }
.tms-studio-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.tms-studio-stat { display: flex; flex-direction: column; padding: .7rem .9rem; border: 1px solid var(--st-line); border-radius: 12px; background: var(--st-soft); }
.tms-studio-stat-n { font-size: 1.5rem; font-weight: 700; line-height: 1.15; color: var(--st-ink); font-variant-numeric: tabular-nums; }
.tms-studio-stat-n small { font-size: .85rem; font-weight: 500; color: var(--st-muted); }
.tms-studio-stat-l { font-size: .75rem; color: var(--st-muted); }
.tms-studio-stat.is-warn { background: #fff8e6; border-color: #ffe08a; }
.tms-studio-stat.is-warn .tms-studio-stat-n { color: #b45309; }
.tms-studio-addbar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .75rem 0; }
.tms-studio-addbar-t { margin-right: .2rem; font-size: .8rem; font-weight: 600; color: var(--st-muted); }
.tms-studio-curriculum { border: 1px solid var(--st-line); border-radius: 12px; overflow: hidden; background: #fff; }
.tms-studio-curr-empty { padding: 1.6rem 1rem; text-align: center; color: var(--st-muted); font-size: .88rem; }
.tms-studio-curr-empty .bi { display: block; margin-bottom: .3rem; font-size: 1.6rem; color: #b6c2dc; }
.tms-studio-curr-sec { display: flex; align-items: center; gap: .55rem; padding: .5rem .9rem; background: var(--st-soft); border-bottom: 1px solid var(--st-line); font-weight: 600; font-size: .85rem; color: #334155; cursor: pointer; }
.tms-studio-curr-sec:hover { background: #eef1f7; }
.tms-studio-curr-sect { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tms-studio-curr-row { display: flex; align-items: center; gap: .65rem; width: 100%; padding: .55rem .9rem; border: 0; border-bottom: 1px solid #eef1f6; background: #fff; text-align: left; font-size: .875rem; color: var(--st-ink); cursor: pointer; }
.tms-studio-curr-row:last-child { border-bottom: 0; }
.tms-studio-curr-row:hover { background: #f6f8fd; }
.tms-studio-curr-row:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--st-accent); }
.tms-studio-curr-row:not(.nosec) { padding-left: 1.6rem; }
/* kéo thả chương / bài ngay trong danh sách (cây bên trái chỉ tới khoá) */
.tms-studio-curr-grip { flex: none; margin-right: -.3rem; opacity: 0; transition: opacity .12s ease; }
.tms-studio-curr-row:hover .tms-studio-curr-grip, .tms-studio-curr-sec:hover .tms-studio-curr-grip, .tms-studio-curr-row:focus-visible .tms-studio-curr-grip { opacity: 1; }
.tms-studio-curr-row.dragging, .tms-studio-curr-sec.dragging { opacity: .4; }
.tms-studio-curr-row.drop-before, .tms-studio-curr-sec.drop-before { box-shadow: inset 0 3px 0 var(--st-accent); }
.tms-studio-curr-row.drop-after, .tms-studio-curr-sec.drop-after { box-shadow: inset 0 -3px 0 var(--st-accent); }
.tms-studio-curr-row.drop-into, .tms-studio-curr-sec.drop-into { background: #dfe8ff; box-shadow: inset 0 0 0 2px var(--st-accent); }
.tms-studio-curr-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.tms-studio-curr-warn { flex: none; max-width: 36%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; color: #b45309; }
.tms-studio-curr-warn .bi { margin-right: .25rem; }
.tms-studio-curr-type { flex: none; width: 88px; font-size: .75rem; color: var(--st-muted); }
.tms-studio-curr-min { flex: none; width: 58px; font-size: .75rem; color: var(--st-muted); text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 767px) { .tms-studio-curr-type, .tms-studio-curr-warn { display: none; } }
/* bài DÙNG CHUNG nhiều khoá: nhãn trên dòng bài (liên kết = xanh, bài gốc đang được khoá khác dùng = xám xanh), danh sách chọn bài, khung thông tin trong form bài */
.tms-studio-curr-shared { flex: none; display: inline-flex; align-items: center; gap: .15rem; padding: .05rem .45rem; border-radius: 999px; font-size: .7rem; font-weight: 600; color: #475569; background: #eef2f7; white-space: nowrap; }
.tms-studio-curr-shared.is-link { color: #0b6a8a; background: #e1f3f9; }
@media (max-width: 767px) { .tms-studio-curr-shared { font-size: 0; gap: 0; padding: .1rem .3rem; } .tms-studio-curr-shared .bi { font-size: .8rem; } }
.tms-picker-list { max-height: 46vh; overflow: auto; background: #fff; }
.tms-picker-row { display: flex; align-items: center; gap: .65rem; width: 100%; padding: .55rem .8rem; border: 0; border-bottom: 1px solid #eef1f6; background: #fff; text-align: left; font-size: .875rem; color: var(--st-ink); cursor: pointer; }
.tms-picker-row:last-child { border-bottom: 0; }
.tms-picker-row:hover { background: #f6f8fd; }
.tms-picker-row.on { background: #e8efff; box-shadow: inset 3px 0 0 var(--st-accent); }
.tms-picker-main { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.tms-picker-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.tms-picker-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; color: var(--st-muted); }
.tms-shared-box { border: 1px solid #b6e0ee; background: #f1fafd; border-radius: 10px; padding: .6rem .8rem; font-size: .85rem; }
.tms-shared-box.is-source { border-color: #d6dbe5; background: #f7f8fb; }
.tms-shared-list { margin: .4rem 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .2rem; }
.tms-shared-list li { display: flex; align-items: center; gap: .5rem; min-width: 0; font-size: .8rem; }
.tms-shared-list li .tms-shared-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tms-shared-list li .tms-shared-cat { flex: none; color: var(--st-muted); }
.tms-shared-readonly { opacity: .92; }
/* tooltip của nhãn "N khoá" (bài / chương dùng chung) */
.tms-shared-tip { min-width: 240px; font-size: .8rem; }
.tms-shared-tip-h { font-weight: 600; margin-bottom: .35rem; }
.tms-shared-tip-row { display: flex; align-items: center; gap: .4rem; padding: .15rem 0; min-width: 0; }
.tms-shared-tip-row.cur { font-weight: 600; }
.tms-shared-tip-t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tms-shared-tip-c, .tms-shared-tip-s { flex: none; color: var(--st-muted, #64748b); font-size: .72rem; }
.tms-shared-tip-now { flex: none; font-size: .68rem; padding: 0 .35rem; border-radius: 999px; background: #e1f3f9; color: #0b6a8a; }
.tms-studio-danger { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; padding: .85rem 1rem; border: 1px dashed #f1b0b7; border-radius: 12px; background: #fff8f8; }

/* ---- form bài ---- */
.tms-studio-lesson { background: #fff; border-radius: 14px; border: 1px solid var(--st-line); box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.tms-studio-pane > .tms-studio-lesson { border: 0; box-shadow: none; border-radius: 14px; }
.tms-studio-lesson > .alert { margin: .6rem 1.1rem 0; }
.tms-studio-lessonbody { padding: 1rem 1.1rem 1.25rem; background: var(--st-soft); border-radius: 0 0 14px 14px; }
.tms-studio-lessonbody > .tms-studio-editcol { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.tms-studio-lesson.view-split .tms-studio-lessonbody { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.tms-studio-card { position: relative; padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--st-line); border-radius: 12px; }
.tms-studio-card-head { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .75rem; margin-bottom: .75rem; }
.tms-studio-card-title { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .92rem; color: var(--st-ink); }
.tms-studio-card-title .bi { color: var(--st-accent); }
.tms-studio-card-head .tms-studio-hint, .tms-studio-card-head .tms-studio-chips { margin-left: auto; }
.tms-studio-hint { margin-top: .5rem; font-size: .76rem; color: var(--st-muted); }
.tms-studio-fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .9rem 1.4rem; }
.tms-studio-field { min-width: 150px; }
.tms-studio-field-grow { flex: 1 1 260px; }
.tms-studio-field-switch { min-width: 220px; padding-bottom: .1rem; }
.tms-studio-pct { width: 72px; flex: none; }
.tms-studio-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.tms-studio-chip { padding: .15rem .65rem; border: 1px solid var(--st-line); border-radius: 999px; background: #fff; color: #475569; font-size: .76rem; font-weight: 500; cursor: pointer; }
.tms-studio-chip:hover { border-color: var(--st-accent); color: var(--st-accent); background: var(--st-accent-soft); }

/* khu video / tài liệu */
.tms-studio-media.is-drag { border-color: var(--st-accent); box-shadow: 0 0 0 3px rgba(52, 84, 209, .18); }
.tms-studio-mediaempty { padding: .4rem 0 .2rem; }
.tms-studio-mediaempty-msg { margin-bottom: .7rem; font-weight: 600; color: #475569; }
.tms-studio-mediaoptions { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .75rem; }
.tms-studio-option { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: 1.1rem .9rem; border: 1.5px dashed #c5cee0; border-radius: 14px; background: #fbfcfe; text-align: center; color: var(--st-ink); cursor: pointer; transition: border-color .12s ease, background .12s ease, transform .12s ease; }
.tms-studio-option:hover:not(:disabled) { border-color: var(--st-accent); background: var(--st-accent-soft); transform: translateY(-1px); }
.tms-studio-option:disabled { opacity: .6; cursor: progress; }
.tms-studio-option-ico { display: inline-flex; align-items: center; justify-content: center; width: 50px; height: 50px; margin-bottom: .2rem; border-radius: 50%; background: var(--st-accent-soft); color: var(--st-accent); font-size: 1.5rem; }
.tms-studio-option.is-record { border-style: solid; border-color: #f4b8c4; background: #fff7f9; }
.tms-studio-option.is-record .tms-studio-option-ico { background: #ffe1e8; color: #e11d48; }
.tms-studio-option.is-record:hover:not(:disabled) { border-color: #e11d48; background: #fff0f3; }
.tms-studio-option-t { font-weight: 600; font-size: .92rem; }
.tms-studio-option-d { font-size: .76rem; color: var(--st-muted); line-height: 1.35; }
.tms-studio-fileinfo { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; margin-top: .85rem; padding: .7rem .8rem; border: 1px solid var(--st-line); border-radius: 12px; background: var(--st-soft); }
.tms-studio-fileinfo-text { flex: 1 1 200px; min-width: 0; }
.tms-studio-filename { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tms-studio-fileactions { display: flex; flex-wrap: wrap; gap: .35rem; }
.tms-studio-dropveil { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; border: 2px dashed var(--st-accent); border-radius: 12px; background: rgba(232, 237, 252, .92); color: var(--st-accent); font-weight: 700; pointer-events: none; }
.tms-studio-dropveil .bi { font-size: 2.4rem; }
/* "Video kèm theo bài" (bài viết / thực hành / tài liệu): danh sách video + thêm bằng Ghi hình / Tải lên / Thư viện */
.tms-studio-attvid { position: relative; }
.tms-studio-attvid.is-drag { border-color: var(--st-accent); box-shadow: 0 0 0 3px rgba(52, 84, 209, .18); }
.tms-studio-attcount { margin-left: .45rem; padding: 0 .45rem; border-radius: 999px; background: var(--st-accent-soft); color: var(--st-accent); font-size: .72rem; font-weight: 700; }
.tms-studio-attlist { display: flex; flex-direction: column; gap: .5rem; }
.tms-studio-attrow { padding: .5rem .6rem; border: 1px solid var(--st-line); border-radius: 12px; background: var(--st-soft); }
.tms-studio-attrow-head { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.tms-studio-attrow-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.tms-studio-attrow-act { flex: none; display: flex; gap: .3rem; }
.tms-studio-attrow .tms-academy-video { margin-top: .6rem; }
.tms-studio-attadd { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }

/* cột xem trước (đúng giao diện người học) */
.tms-studio-previewcol { min-width: 0; background: #fff; border: 1px solid var(--st-line); border-radius: 12px; overflow: hidden; }
.tms-studio-lesson.view-split .tms-studio-previewcol { position: sticky; top: calc(var(--studio-top) + 128px); max-height: calc(100vh - var(--studio-top) - 144px); display: flex; flex-direction: column; }
.tms-studio-previewbar { display: flex; align-items: center; gap: .6rem; padding: .5rem .85rem; background: #fff8e6; border-bottom: 1px solid #ffe7a3; font-size: .8rem; }
.tms-studio-previewbar-t { display: inline-flex; align-items: center; gap: .4rem; flex: none; white-space: nowrap; font-weight: 700; color: #8a5a00; }
.tms-studio-lesson.view-split .tms-studio-previewbar .tms-studio-hint { display: none !important; }
.tms-studio-previewbody { padding: 1rem 1.1rem 1.25rem; overflow: auto; min-height: 0; }
.tms-studio-lesson.view-preview .tms-studio-previewbody { padding: 1.25rem 1.5rem 1.5rem; }
.tms-studio-previewbody .tms-academy-lesson-grid { --bs-gutter-x: 0; }

@media (max-width: 991.98px) {
  .tms-studio-shell { display: block; }
  .tms-studio-nav { position: static; height: auto; max-height: 62vh; min-height: 0; margin-bottom: .9rem; }
  .tms-studio-resizer { display: none; }
  .tms-studio-head { position: static; }
  .tms-studio-lesson.view-split .tms-studio-lessonbody { display: block; }
}
@media (max-width: 575px) {
  .tms-studio-actions { margin-left: 0; width: 100%; }
  .tms-studio-title, .tms-studio-title-input { font-size: 1.12rem; }
}

/* ---- catalog: tab Tổng quan + thẻ cài đặt ---- */
.tms-studio-catalog .tms-studio-body { background: #fff; border-radius: 0 0 14px 14px; }
.tms-studio-navtabs { border-bottom: 1px solid var(--st-line); gap: .15rem; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; }
.tms-studio-navtabs .nav-item .nav-link { display: inline-flex; align-items: center; padding: .55rem .85rem; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--st-muted); font-weight: 500; font-size: .875rem; white-space: nowrap; background: transparent; }
.tms-studio-navtabs .nav-item .nav-link:hover { color: var(--st-ink); border-bottom-color: #cbd5e1; background: transparent; }
.tms-studio-navtabs .nav-item .nav-link.active { color: var(--st-accent); border-bottom-color: var(--st-accent); font-weight: 600; background: transparent; }
.tms-studio-ovsec { margin-bottom: 1.1rem; }
.tms-studio-ovsec-h { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; font-weight: 700; font-size: .85rem; color: #334155; }
.tms-studio-ovsec-h .bi { color: var(--st-accent); }
.tms-studio-ovlist { border: 1px solid var(--st-line); border-radius: 12px; overflow: hidden; background: #fff; }
.tms-studio-ovrow { display: flex; align-items: center; gap: .75rem; width: 100%; padding: .6rem .9rem; border: 0; border-bottom: 1px solid #eef1f6; background: #fff; text-align: left; font-size: .875rem; color: var(--st-ink); cursor: pointer; }
.tms-studio-ovrow:last-child { border-bottom: 0; }
.tms-studio-ovrow:hover { background: #f6f8fd; }
.tms-studio-ovrow-t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.tms-studio-ovrow-t small { font-weight: 400; }
.tms-studio-ovrow-m { flex: none; font-size: .76rem; color: var(--st-muted); white-space: nowrap; }
.tms-studio-ovrow-go { flex: none; color: #b6bfce; font-size: .75rem; }
.tms-studio-ovcover { flex: none; width: 64px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: linear-gradient(135deg, #dfe6f7, #eef1f9); display: inline-flex; align-items: center; justify-content: center; color: #a3b1d4; font-size: 1.2rem; }
.tms-studio-ovcover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tms-studio-set { margin-bottom: 1rem; padding: 1rem 1.1rem; border: 1px solid var(--st-line); border-radius: 12px; background: #fff; }
.tms-studio-set-h { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; font-size: .92rem; font-weight: 700; color: var(--st-ink); }
.tms-studio-set-h .bi { color: var(--st-accent); }
.tms-studio-set-sub { margin-left: auto; font-size: .72rem; font-weight: 500; color: var(--st-muted); }
@media (max-width: 575px) { .tms-studio-ovrow-m { display: none; } }

/* ===== Giao diện người học Academy (tms-academy / -home / -course / -lesson / -catalog): trước đây nằm trong <style> của tms-academy.js.php; chuyển về đây để Studio (bản xem trước nhúng màn học) cũng có CSS ===== */
.tms-academy-tile { transition: box-shadow .15s ease, transform .15s ease; }
.tms-academy-tile:hover { box-shadow: 0 .5rem 1rem rgba(0,0,0,.12) !important; transform: translateY(-1px); }
.tms-academy-article { overflow-wrap: anywhere; line-height: 1.7; }
.tms-academy-article img { max-width: 100%; height: auto; border-radius: .375rem; }
.tms-academy-article table { width: 100%; border-collapse: collapse; margin: .75rem 0; }
.tms-academy-article th, .tms-academy-article td { border: 1px solid #dee2e6; padding: .4rem .6rem; vertical-align: top; }
.tms-academy-article th { background: #f8f9fa; }
.tms-academy-article h1, .tms-academy-article h2, .tms-academy-article h3 { margin-top: 1.2rem; }
.tms-academy-article blockquote { border-left: 4px solid #0d6efd; padding: .25rem .9rem; color: #495057; background: #f8f9fa; }
.tms-academy-article pre { background: #f1f3f5; padding: .75rem; border-radius: .375rem; overflow: auto; }
/* video NHÚNG trong bài viết: ở trình soạn là thẻ chỉ-đọc hiện tên video (chỗ nào hiện HTML thô cũng thấy thẻ này); màn học thay bằng trình phát thật (tms-academy-lesson articleParts) */
figure[data-academy-video] { display: flex; align-items: center; gap: .65rem; margin: .8rem 0; padding: .7rem .9rem; border: 1px dashed #93a4d8; border-radius: 10px; background: #f3f6ff; color: #2f3f8f; font-size: .9rem; line-height: 1.3; cursor: default; user-select: none; -webkit-user-select: none; }
figure[data-academy-video]::before { content: '\25B6'; flex: none; display: grid; place-items: center; width: 34px; height: 34px; padding-left: 2px; border-radius: 50%; background: #3454d1; color: #fff; font-size: .78rem; }
figure[data-academy-video]::after { content: 'Video'; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
figure[data-academy-video][data-title]::after { content: 'Video · ' attr(data-title); }
.tms-academy-embed-video { margin: 1rem 0; }
.tms-academy-embed-video:first-child { margin-top: 0; }
.tms-academy-embed-video:last-child { margin-bottom: 0; }
.tms-academy-article-parts > .tms-academy-article-part > :first-child { margin-top: 0; }
.tms-vp-thumb { flex: none; display: grid; place-items: center; width: 64px; height: 36px; border-radius: 6px; background: #e8ecf8 center / cover no-repeat; color: #6b7bb5; }
/* ---------- Giao diện người học (thẻ khoá, bảng học tập, màn học) ---------- */
.tms-academy-ccard { cursor: pointer; overflow: hidden; border: 1px solid rgba(0,0,0,.08); transition: box-shadow .15s ease, transform .15s ease; }
.tms-academy-ccard:hover, .tms-academy-ccard:focus-visible { box-shadow: 0 .6rem 1.2rem rgba(0,0,0,.14) !important; transform: translateY(-2px); outline: none; }
.tms-academy-ccard.is-locked .tms-academy-ccover img, .tms-academy-ccard.is-locked .tms-academy-ccover-ph { filter: grayscale(.85) brightness(.9); }
.tms-academy-ccover { position: relative; aspect-ratio: 16 / 9; background: #e9ecef; overflow: hidden; }
.tms-academy-ccover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tms-academy-ccover-ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: rgba(255,255,255,.85); font-size: 2.6rem; }
.tms-academy-ccover-top { position: absolute; left: 8px; top: 8px; right: 48px; }
.tms-academy-ccover-time { position: absolute; right: 8px; bottom: 8px; background: rgba(15,23,42,.78); color: #fff; font-size: .72rem; padding: 1px 7px; border-radius: 10px; }
.tms-academy-bm { position: absolute; right: 8px; top: 8px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: #475569; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.tms-academy-bm:hover { background: #fff; color: #2563eb; }
.tms-academy-bm.on, .tms-academy-bm-btn.on, .tms-academy-bm-inline.on { color: #2563eb; }
.tms-academy-ctitle { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; min-height: 2.6em; }
.tms-academy-continue-cover { min-height: 130px; background: #e9ecef; }
.tms-academy-continue-cover img { width: 100%; height: 100%; object-fit: cover; display: block; max-height: 190px; }
.tms-academy-tile-cover img { width: 100%; height: 110px; object-fit: cover; display: block; }
.tms-academy-banner img { width: 100%; max-height: 190px; object-fit: cover; border-radius: .5rem; display: block; }
.tms-academy-child-cover { width: 100%; height: 72px; object-fit: cover; display: block; }
.tms-academy-hero-cover { min-height: 170px; background: #e9ecef; }
.tms-academy-hero-cover img { width: 100%; height: 100%; object-fit: cover; display: block; max-height: 260px; }
.tms-academy-thumb { width: 128px; flex: none; aspect-ratio: 16 / 9; border-radius: .4rem; overflow: hidden; background: #e9ecef; }
.tms-academy-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tms-academy-thumb.is-locked img, .tms-academy-thumb.is-locked .tms-academy-ccover-ph { filter: grayscale(.85); }
.tms-academy-thumb .tms-academy-ccover-ph { font-size: 1.4rem; }
.tms-academy-bm-inline { color: #6c757d; font-size: 1.1rem; }
/* khung xương khi đang tải */
.tms-academy-sk { border-radius: .5rem; background: linear-gradient(90deg, #eceff3 25%, #f6f8fa 37%, #eceff3 63%); background-size: 400% 100%; animation: tms-academy-shimmer 1.3s ease infinite; }
@keyframes tms-academy-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
/* bảng học tập */
.tms-academy-stat { display: flex; align-items: center; gap: .75rem; padding: .75rem .9rem; background: #fff; border: 1px solid rgba(0,0,0,.08); border-radius: .6rem; }
.tms-academy-stat-icon { width: 44px; height: 44px; flex: none; border-radius: 50%; background: #f1f3f5; color: #868e96; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.tms-academy-stat-icon.on { background: #fff1e0; color: #f08c00; }
.tms-academy-stat-num { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.tms-academy-ring { position: relative; width: 64px; height: 64px; flex: none; }
.tms-academy-ring-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.tms-academy-week { display: flex; gap: 6px; margin-top: .35rem; }
.tms-academy-week-col { flex: 1; text-align: center; }
.tms-academy-week-bar { height: 34px; background: #f1f3f5; border-radius: 4px; display: flex; align-items: flex-end; overflow: hidden; }
.tms-academy-week-bar > div { width: 100%; background: #cfd8e3; border-radius: 4px 4px 0 0; }
.tms-academy-week-bar > div.on { background: #2563eb; }
.tms-academy-week-col.today .tms-academy-week-lbl { color: #2563eb; font-weight: 700; }
.tms-academy-week-col.future { opacity: .45; }
.tms-academy-week-lbl { font-size: .68rem; color: #868e96; }
.tms-academy-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .6rem; }
.tms-academy-badge { text-align: center; padding: .6rem .4rem; border: 1px dashed #ced4da; border-radius: .6rem; background: #fafbfc; opacity: .8; }
.tms-academy-badge.earned { border-style: solid; border-color: #f1c40f; background: #fffbea; opacity: 1; }
.tms-academy-badge-icon { width: 42px; height: 42px; margin: 0 auto .3rem; border-radius: 50%; background: #e9ecef; color: #adb5bd; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.tms-academy-badge.earned .tms-academy-badge-icon { background: #f1c40f; color: #fff; }
.tms-academy-badge-prog { height: 4px; background: #e9ecef; border-radius: 2px; overflow: hidden; margin-top: .3rem; }
.tms-academy-badge-prog > div { height: 100%; background: #2563eb; }
/* lộ trình học */
.tms-academy-path.finished { background: #f4fbf6; }
.tms-academy-steps { display: flex; flex-direction: column; gap: 2px; }
.tms-academy-step { display: flex; align-items: center; gap: .6rem; padding: .3rem .4rem; border-radius: .4rem; cursor: pointer; }
.tms-academy-step:hover { background: #f1f5f9; }
.tms-academy-step.next { background: #eef4ff; font-weight: 600; }
.tms-academy-step.locked { color: #868e96; }
.tms-academy-step-dot { width: 24px; height: 24px; flex: none; border-radius: 50%; background: #e9ecef; color: #495057; display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; }
.tms-academy-step.done .tms-academy-step-dot { background: #198754; color: #fff; }
.tms-academy-step.next .tms-academy-step-dot { background: #2563eb; color: #fff; }
.tms-academy-bm-chip { display: inline-flex; align-items: center; gap: .4rem; max-width: 100%; padding: .3rem .4rem .3rem .7rem; background: #fff; border: 1px solid rgba(0,0,0,.12); border-radius: 2rem; cursor: pointer; }
.tms-academy-bm-chip:hover { border-color: #2563eb; }
.tms-academy-bm-chip span { max-width: 260px; }
.btn-close-sm { font-size: .6rem; padding: .25rem; }
/* mục lục khoá (accordion) */
.tms-academy-section-head { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .65rem .9rem; border: 1px solid rgba(0,0,0,.1); border-radius: .5rem; background: #f8f9fa; cursor: pointer; }
.tms-academy-section-head.open { border-bottom-left-radius: 0; border-bottom-right-radius: 0; background: #eef2f7; }
.tms-academy-section-body.list-group { border-top-left-radius: 0; border-top-right-radius: 0; }
.tms-academy-section-body .list-group-item.is-current { background: #eef4ff; }
/* màn học */
.tms-academy-sidebar-inner { max-height: calc(100vh - 110px); display: flex; flex-direction: column; }
@media (min-width: 992px) { .tms-academy-sidebar { position: sticky; top: 72px; align-self: flex-start; } }
.tms-academy-outline { overflow: auto; flex: 1; }
.tms-academy-outline-title { display: flex; justify-content: space-between; gap: .5rem; padding: .45rem .8rem; background: #f1f3f5; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: #495057; position: sticky; top: 0; z-index: 1; }
.tms-academy-outline-item { display: flex; gap: .6rem; padding: .55rem .8rem; color: inherit; text-decoration: none; border-bottom: 1px solid rgba(0,0,0,.05); }
.tms-academy-outline-item:hover { background: #f8fafc; }
.tms-academy-outline-item.current { background: #eef4ff; box-shadow: inset 3px 0 0 #2563eb; }
.tms-academy-outline-item.current .tms-academy-outline-text > span:first-child { font-weight: 600; }
.tms-academy-outline-state { margin-top: .15rem; font-size: 1rem; }
.tms-academy-outline-text { min-width: 0; overflow-wrap: anywhere; font-size: .9rem; line-height: 1.3; }
.tms-academy-nextup .btn { white-space: nowrap; }
.tms-academy-tabs .nav-link { color: #495057; }
.tms-academy-tabs .nav-link.active { font-weight: 600; }
.tms-academy-file-row { display: flex; align-items: center; gap: .75rem; padding: .55rem .4rem; border-bottom: 1px solid rgba(0,0,0,.06); color: inherit; text-decoration: none; }
.tms-academy-file-row:hover { background: #f8fafc; }
.tms-academy-shortcuts kbd { background: #212529; color: #fff; }
@media (max-width: 575px) { .tms-academy-thumb { display: none !important; } }

/* ---- "Học viên có thấy không" (tms-academy-visibility): thanh cảnh báo + hộp chọn khi xuất bản mà catalog / khoá còn Nháp ---- */
.tms-studio-vis { display: flex; align-items: flex-start; gap: .75rem; margin: 0 0 1rem; padding: .75rem .9rem; border: 1px solid #ffe08a; border-radius: 12px; background: #fff8e6; color: #5c4400; }
.tms-studio-vis-in-lesson { margin: .6rem 1.1rem 0; }
.tms-studio-vis-in-lesson .tms-studio-vis { margin-bottom: 0; }
.tms-studio-vis-ico { flex: none; margin-top: .1rem; font-size: 1.15rem; color: #d97706; }
.tms-studio-vis-body { min-width: 0; flex: 1 1 auto; }
.tms-studio-vis-title { margin-bottom: .2rem; font-size: .9rem; font-weight: 700; }
.tms-studio-vis-list { margin: 0; padding: 0; list-style: none; }
.tms-studio-vis-list li { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .75rem; padding: .15rem 0; font-size: .84rem; }
.tms-studio-vis-text { flex: 1 1 260px; min-width: 0; }
.tms-studio-vis-fix { flex: none; }
.tms-studio-vis-hint { flex: 1 1 100%; font-size: .78rem; color: #7a5b00; }
.tms-academy-visibility-gate .tms-studio-vis-list li { padding: .25rem 0 .25rem 1.1rem; position: relative; }
.tms-academy-visibility-gate .tms-studio-vis-list li::before { content: ''; position: absolute; left: .15rem; top: .85rem; width: 6px; height: 6px; border-radius: 50%; background: #d97706; }
.tms-studio-hidden { flex: none; color: #d97706; font-size: .85rem; line-height: 1; }
/* hàng chờ duyệt: khoá nằm trong catalog còn Nháp (duyệt xong học viên vẫn chưa thấy) */
.tms-review-hidden { color: #b45309; }

/* ===== Giao diện người học Academy: VỎ + SIDEBAR + HỘP THƯ (2026-11-09; tms-academy / -sidebar / -hub / -portal). Mọi lớp bắt đầu bằng tms-aca-; màu theo "tông" (tone-*) qua hai biến --t-fg / --t-bg ===== */
.tms-aca, .tms-academy-portal,
.tms-atlas {
  --aca-accent: var(--bs-primary, #3454d1);
  --aca-ink: #1f2a44;
  --aca-muted: #66749a;
  --aca-line: #e4e9f4;
  --aca-soft: #f4f6fc;
  --aca-radius: 12px;
  --aca-shadow: 0 1px 2px rgba(24, 39, 75, .05), 0 6px 16px rgba(24, 39, 75, .05);
  /* CHỮ của giao diện học viên (2026-11-14: đo thấy app đặt nét 300 / 13,4px / xám cho cả hệ thống, cổng ngoài còn không nạp phông): Inter nét 400, 14,4px, đậm màu hơn, dòng thoáng hơn.
     Chỉ trong phạm vi Academy học viên (nhân viên + cổng); các trang quản trị khác giữ kiểu mảnh cũ. Cổng nạp Inter ở views/academy_portal/_fonts.php. */
  --aca-text: #34405c;
  --bs-body-font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --bs-body-font-size: .9rem;
  --bs-body-font-weight: 400;
  --bs-body-line-height: 1.55;
  --bs-body-color: var(--aca-text);
  --bs-heading-font-family: var(--bs-body-font-family);
  --bs-heading-font-weight: 600;
  font-family: var(--bs-body-font-family);
  font-size: var(--bs-body-font-size);
  font-weight: var(--bs-body-font-weight);
  line-height: var(--bs-body-line-height);
  color: var(--bs-body-color);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.tms-aca .tone-primary, .tms-academy-portal .tone-primary,
.tms-atlas .tone-primary { --t-fg: #2744b8; --t-bg: #e8edfd; }
.tms-aca .tone-success, .tms-academy-portal .tone-success,
.tms-atlas .tone-success { --t-fg: #17794a; --t-bg: #e4f5ec; }
.tms-aca .tone-warn, .tms-academy-portal .tone-warn,
.tms-atlas .tone-warn { --t-fg: #a85500; --t-bg: #fff1dc; }
.tms-aca .tone-info, .tms-academy-portal .tone-info,
.tms-atlas .tone-info { --t-fg: #0b6f8d; --t-bg: #e1f3f8; }
.tms-aca .tone-muted, .tms-academy-portal .tone-muted,
.tms-atlas .tone-muted { --t-fg: #53607f; --t-bg: #edf0f7; }
.tms-aca .tone-dark, .tms-academy-portal .tone-dark,
.tms-atlas .tone-dark { --t-fg: #fff; --t-bg: #3b4355; }

/* ---- thương hiệu + thanh trên cùng */
.tms-aca-brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; letter-spacing: -.01em; }
.tms-aca-brand-mark { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; color: #fff; font-size: 1.05rem; background: linear-gradient(135deg, #3454d1 0%, #6a4fe0 100%); box-shadow: 0 4px 10px rgba(52, 84, 209, .28); }
.tms-aca-brand-name { font-size: 1.05rem; letter-spacing: -.01em; }
/* logo + tên thương hiệu (tms-academy-brand): ảnh logo | vạch | "Academy"; không có logo thì chữ TÊN in hoa */
.tms-aca-brandbox { display: inline-flex; align-items: center; gap: .7rem; min-width: 0; max-width: 100%; }
.tms-aca-brand-logo { display: block; flex: none; height: 34px; width: auto; max-width: 170px; object-fit: contain; }
.tms-aca-brand-word { flex: none; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #2744b8; }
.tms-aca-brand-sep { flex: none; width: 1px; height: 24px; background: var(--aca-line, #e4e9f4); }
@media (max-width: 575.98px) { .tms-aca-brand-logo { height: 28px; max-width: 120px; } .tms-aca-brand-word { max-width: 120px; font-size: .8rem; } .tms-aca-brandbox { gap: .5rem; } }
.tms-aca-topbar { padding: .15rem 0 .35rem; }
.tms-aca-topbar .input-group .form-control { border-radius: 999px 0 0 999px; padding-left: 1rem; background: #fff; border-color: var(--aca-line); }
.tms-aca-topbar .input-group .btn { border-radius: 0 999px 999px 0; }
/* ===== ĐỒNG BỘ GIAO DIỆN ACADEMY (2026-11-14, user: "academy của học viên với academy của nhân viên đang không dùng chung một giao diện"): các thành phần Bootstrap cũ (list-group, card, bảng, tiêu đề nhóm) trong phạm vi .tms-aca
   (học viên nhân viên + cổng ngoài + các màn Studio có thêm class tms-aca) được vẽ cùng kiểu thẻ của giao diện học viên. Dùng :where() để độ ưu tiên THẤP: luật riêng của từng màn (viết sau / cụ thể hơn) vẫn thắng. ===== */
:where(.tms-aca, .tms-academy-portal) .list-group,
:where(.tms-atlas, .tms-academy-portal) .list-group { --bs-list-group-border-width: 0; --bs-list-group-border-radius: 0; border: 1px solid var(--aca-line); border-radius: 14px; background: #fff; box-shadow: var(--aca-shadow); overflow: hidden; }
:where(.tms-aca, .tms-academy-portal) .list-group-item,
:where(.tms-atlas, .tms-academy-portal) .list-group-item { border: 0; border-bottom: 1px solid var(--aca-line); padding: .8rem 1rem; background: transparent; }
:where(.tms-aca, .tms-academy-portal) .list-group-item:last-child,
:where(.tms-atlas, .tms-academy-portal) .list-group-item:last-child { border-bottom: 0; }
:where(.tms-aca, .tms-academy-portal) .list-group-item-action:hover, :where(.tms-aca, .tms-academy-portal) .list-group-item-action:focus,
:where(.tms-atlas, .tms-academy-portal) .list-group-item-action:hover,
:where(.tms-atlas, .tms-academy-portal) .list-group-item-action:focus { background: #f6f8fd; }
.tms-aca-sec .list-group { border: 0; border-radius: 0; box-shadow: none; }
:where(.tms-aca, .tms-academy-portal) .card,
:where(.tms-atlas, .tms-academy-portal) .card { border: 1px solid var(--aca-line); border-radius: 14px; box-shadow: var(--aca-shadow); }
:where(.tms-aca, .tms-academy-portal) .card > .card-header,
:where(.tms-atlas, .tms-academy-portal) .card > .card-header { padding: .7rem 1rem; border-bottom: 1px solid var(--aca-line); background: linear-gradient(90deg, #eef2ff 0, #fff 46%); color: var(--aca-ink); font-weight: 650; }
:where(.tms-aca, .tms-academy-portal) .card > .card-header:first-child,
:where(.tms-atlas, .tms-academy-portal) .card > .card-header:first-child { border-radius: 13px 13px 0 0; }
:where(.tms-aca, .tms-academy-portal) thead.table-light,
:where(.tms-atlas, .tms-academy-portal) thead.table-light { --bs-table-bg: #f4f6fc; --bs-table-color: #5b6785; }
:where(.tms-aca, .tms-academy-portal) thead.table-light th,
:where(.tms-atlas, .tms-academy-portal) thead.table-light th { border-bottom: 1px solid var(--aca-line); font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
:where(.tms-aca, .tms-academy-portal) h6.text-uppercase.fw-semibold,
:where(.tms-atlas, .tms-academy-portal) h6.text-uppercase.fw-semibold { display: flex; align-items: center; gap: .5rem; margin: 1.1rem 0 .55rem; font-size: .74rem; letter-spacing: .06em; font-weight: 700 !important; }
:where(.tms-aca, .tms-academy-portal) h6.text-uppercase.fw-semibold::before,
:where(.tms-atlas, .tms-academy-portal) h6.text-uppercase.fw-semibold::before { content: ''; flex: none; width: 3px; height: .95em; border-radius: 2px; background: var(--aca-accent); }
:where(.tms-aca, .tms-academy-portal) .tms-academy-modal,
:where(.tms-atlas, .tms-academy-portal) .tms-atlas-modal { border-radius: 16px; }
/* đầu catalog: ảnh bìa nằm sát mép trên của thẻ */
.tms-academy-cathead .tms-academy-banner { margin: 0; border-radius: 0; }
.tms-academy-cathead .tms-academy-banner img { display: block; width: 100%; max-height: 220px; object-fit: cover; }
.tms-academy-cathead .tms-aca-sec-bar { border-bottom: 0; }
.tms-academy-profilehead .tms-aca-sec-title { font-size: 1.1rem; }
/* tab của các màn Studio (màn quản lý lớp do CRUD generator dựng nằm ngoài phạm vi .tms-aca nên gọi tên riêng): cùng kiểu tab của giao diện học viên */
.tms-academy-class-form .nav-tabs, .tms-aca-studio .nav-tabs,
.tms-atlas-studio .nav-tabs { gap: .25rem; border-bottom: 1px solid var(--aca-line, #e4e9f4); }
.tms-academy-class-form .nav-tabs .nav-link, .tms-aca-studio .nav-tabs .nav-link,
.tms-atlas-studio .nav-tabs .nav-link { padding: .6rem 1rem; border: 0; border-bottom: 2px solid transparent; border-radius: 8px 8px 0 0; color: #66749a; font-weight: 600; }
.tms-academy-class-form .nav-tabs .nav-link:hover, .tms-aca-studio .nav-tabs .nav-link:hover,
.tms-atlas-studio .nav-tabs .nav-link:hover { background: #f4f6fc; color: #2744b8; }
.tms-academy-class-form .nav-tabs .nav-link.active, .tms-aca-studio .nav-tabs .nav-link.active,
.tms-atlas-studio .nav-tabs .nav-link.active { background: #eef2ff; border-bottom-color: #2744b8; color: #2744b8; }
.tms-aca-portal-head { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--aca-line); }
.tms-aca-user { display: inline-flex; align-items: center; gap: .55rem; font-size: .9rem; color: var(--aca-ink); }
.tms-aca-avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #e8edfd; color: #2744b8; font-weight: 700; font-size: .85rem; }

/* ---- bố cục: sidebar trái + nội dung */
.tms-aca-layout { display: block; }
.tms-aca-has-side .tms-aca-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 24px; align-items: start; }
.tms-aca-side { position: sticky; top: 92px; }
.tms-aca-main { min-width: 0; }
.tms-aca-nav { background: #fff; border: 1px solid var(--aca-line); border-radius: var(--aca-radius); padding: 10px; box-shadow: var(--aca-shadow); }
.tms-aca-nav-group + .tms-aca-nav-group { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--aca-line); }
.tms-aca-nav-label { font-size: .68rem; letter-spacing: .09em; text-transform: uppercase; color: var(--aca-muted); font-weight: 700; padding: 2px 10px 6px; }
.tms-aca-nav-list { display: flex; flex-direction: column; gap: 2px; }
.tms-aca-nav-item { position: relative; display: flex; align-items: center; gap: .7rem; width: 100%; border: 0; background: transparent; padding: .56rem .7rem; border-radius: 9px; color: var(--aca-ink); font-weight: 500; font-size: .92rem; text-align: left; cursor: pointer; transition: background .15s ease, color .15s ease; }
.tms-aca-nav-item i { flex: none; width: 1.2rem; text-align: center; font-size: 1.05rem; color: var(--aca-muted); transition: color .15s ease; }
.tms-aca-nav-item:hover { background: var(--aca-soft); }
.tms-aca-nav-item:focus-visible { outline: 2px solid var(--aca-accent); outline-offset: 1px; }
.tms-aca-nav-item.active { background: #e8edfd; color: #2744b8; font-weight: 600; }
.tms-aca-nav-item.active i { color: #2744b8; }
.tms-aca-nav-item.active::before { content: ''; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--aca-accent); }
.tms-aca-nav-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tms-aca-pill { flex: none; margin-left: auto; display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; padding: 0 .42rem; border-radius: 999px; font-size: .72rem; font-weight: 700; line-height: 1; color: var(--t-fg, #53607f); background: var(--t-bg, #edf0f7); }
.tms-aca-nav-item .tms-aca-pill.tone-warn { color: #fff; background: #e8590c; }
.tms-aca-nav-item .tms-aca-pill.tone-primary { color: #fff; background: var(--aca-accent); }

/* ---- đầu trang, thẻ nhãn, lọc */
.tms-aca-pagehead { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.tms-aca-title { display: flex; align-items: center; gap: .65rem; margin: 0; font-size: 1.4rem; font-weight: 700; letter-spacing: -.015em; color: var(--aca-ink); }
.tms-aca-title i { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; font-size: 1.15rem; color: #2744b8; background: #e8edfd; }
.tms-aca-sub { margin: .3rem 0 0; color: var(--aca-muted); font-size: .9rem; }
.tms-aca-tag { display: inline-flex; flex: none; align-items: center; white-space: nowrap; padding: .2rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 600; line-height: 1.25; color: var(--t-fg, #53607f); background: var(--t-bg, #edf0f7); border: 0; }
.tms-aca-linkchip { cursor: pointer; transition: filter .15s ease; }
.tms-aca-linkchip:hover { filter: brightness(.96); }
.tms-aca-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tms-aca-chip { border: 1px solid var(--aca-line); background: #fff; color: var(--aca-ink); border-radius: 999px; padding: .32rem .9rem; font-size: .85rem; font-weight: 500; cursor: pointer; transition: all .15s ease; }
.tms-aca-chip:hover { border-color: #c4cdea; background: var(--aca-soft); }
.tms-aca-chip.active { background: var(--aca-accent); border-color: var(--aca-accent); color: #fff; }
.tms-aca-chip-n { margin-left: .3rem; font-weight: 700; opacity: .65; }
.tms-aca-chip.active .tms-aca-chip-n { opacity: .85; }
.tms-aca-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .25rem; color: var(--aca-muted); font-size: .82rem; }
.tms-aca-meta i { margin-right: .2rem; }
.tms-aca-classlink { display: inline-flex; align-items: center; gap: .3rem; color: #2744b8; font-weight: 500; text-decoration: none; }
.tms-aca-classlink:hover { text-decoration: underline; }

/* ---- thông báo */
.tms-aca-feed { display: flex; flex-direction: column; gap: 12px; max-width: 900px; }
.tms-aca-notice { display: flex; gap: 14px; padding: 15px 18px; background: #fff; border: 1px solid var(--aca-line); border-radius: var(--aca-radius); box-shadow: var(--aca-shadow); }
.tms-aca-notice.fresh { border-left: 4px solid #e8590c; background: linear-gradient(90deg, #fff8f1 0, #fff 140px); }
.tms-aca-notice.pinned .tms-aca-notice-ico { color: #a85500; background: #fff1dc; }
.tms-aca-notice-ico { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #2744b8; background: #e8edfd; font-size: 1.05rem; }
.tms-aca-notice-main { min-width: 0; flex: 1 1 auto; }
.tms-aca-notice-title { font-weight: 650; font-size: 1rem; }
.tms-aca-notice-body { margin-top: .55rem; white-space: pre-wrap; overflow-wrap: anywhere; color: #2c3857; line-height: 1.6; }
.tms-aca-notice-body.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tms-aca-more { font-size: .82rem; text-decoration: none; }
.tms-aca-tag-new { text-transform: uppercase; letter-spacing: .04em; font-size: .66rem; }

/* ---- bài thi */
.tms-aca-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 640px; margin-bottom: 18px; }
.tms-aca-kpi { display: flex; flex-direction: column; padding: 12px 16px; background: #fff; border: 1px solid var(--aca-line); border-left: 4px solid var(--t-fg, #53607f); border-radius: var(--aca-radius); box-shadow: var(--aca-shadow); }
.tms-aca-kpi-n { font-size: 1.7rem; font-weight: 700; line-height: 1.1; color: var(--t-fg, var(--aca-ink)); }
.tms-aca-kpi-l { font-size: .8rem; color: var(--aca-muted); font-weight: 500; }
.tms-aca-examcard { display: flex; flex-direction: column; height: 100%; padding: 16px 18px; background: #fff; border: 1px solid var(--aca-line); border-top: 3px solid var(--aca-line); border-radius: var(--aca-radius); box-shadow: var(--aca-shadow); transition: box-shadow .15s ease, transform .15s ease; }
.tms-aca-examcard:hover { box-shadow: 0 2px 4px rgba(24, 39, 75, .06), 0 10px 24px rgba(24, 39, 75, .09); transform: translateY(-1px); }
.tms-aca-examcard.is-todo { border-top-color: var(--aca-accent); }
.tms-aca-examcard.is-doing { border-top-color: #0b6f8d; }
.tms-aca-examcard.is-pending { border-top-color: #e08a00; }
.tms-aca-examcard.is-passed { border-top-color: #17794a; }
.tms-aca-examcard-title { font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.tms-aca-examcard-class { margin: .3rem 0 .6rem; font-size: .85rem; }
.tms-aca-examcard-meta, .tms-aca-examcard-time { display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-size: .82rem; color: var(--aca-muted); }
.tms-aca-examcard-meta i, .tms-aca-examcard-time i { margin-right: .3rem; }
.tms-aca-examcard-time { margin-top: .3rem; }
.tms-aca-examcard-open { margin-top: auto; align-self: flex-start; }
.tms-aca-examcard > .d-flex.mt-2 { margin-bottom: .9rem; }

/* ---- lớp của tôi */
.tms-aca-classcard { height: 100%; padding: 16px 18px; background: #fff; border: 1px solid var(--aca-line); border-radius: var(--aca-radius); box-shadow: var(--aca-shadow); cursor: pointer; transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease; }
.tms-aca-classcard:hover, .tms-aca-classcard:focus-visible { border-color: #c4cdea; box-shadow: 0 2px 4px rgba(24, 39, 75, .06), 0 10px 24px rgba(24, 39, 75, .09); transform: translateY(-1px); outline: none; }
.tms-aca-classcard-title { font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.tms-aca-classcard-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: .85rem; padding-top: .75rem; border-top: 1px solid var(--aca-line); }
.tms-aca-note { display: flex; align-items: center; gap: .45rem; margin-top: .7rem; padding: .5rem .7rem; border-radius: 9px; font-size: .82rem; color: var(--t-fg); background: var(--t-bg); }

/* ---- khối "việc cần xem" ở trang chủ */
.tms-aca-panel { height: 100%; background: #fff; border: 1px solid var(--aca-line); border-radius: var(--aca-radius); box-shadow: var(--aca-shadow); overflow: hidden; }
.tms-aca-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: .7rem 1rem; border-bottom: 1px solid var(--aca-line); font-weight: 650; font-size: .92rem; }
.tms-aca-panel-row { display: flex; align-items: center; gap: .75rem; padding: .65rem 1rem; cursor: pointer; transition: background .15s ease; }
.tms-aca-panel-row + .tms-aca-panel-row { border-top: 1px solid #eef1f8; }
.tms-aca-panel-row:hover, .tms-aca-panel-row:focus-visible { background: var(--aca-soft); outline: none; }
.tms-aca-panel-row .min-w-0 { min-width: 0; }
.tms-aca-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #e8590c; }

/* ---- trạng thái rỗng + thanh nạp */
.tms-aca-empty { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: 3rem 1rem; text-align: center; color: var(--aca-muted); background: #fff; border: 1px dashed #cfd7ec; border-radius: var(--aca-radius); }
.tms-aca-empty > i { font-size: 2.2rem; color: #9aa8cf; margin-bottom: .3rem; }
.tms-aca-loadbar { height: 3px; margin-bottom: 12px; border-radius: 3px; background: var(--aca-line); overflow: hidden; }
.tms-aca-loadbar > span { display: block; width: 38%; height: 100%; border-radius: 3px; background: var(--aca-accent); animation: tms-aca-load 1.1s ease-in-out infinite; }
@keyframes tms-aca-load { 0% { transform: translateX(-100%); } 100% { transform: translateX(270%); } }

/* ---- đánh bóng chung cho các màn học hiện có (chỉ trong vỏ tms-aca): thẻ bo tròn, viền nhạt, đề mục nhỏ, nhãn (badge) dạng viên thuốc màu dịu cùng tông với nhãn của sidebar / hộp thư */
.tms-aca .badge,
.tms-atlas .badge { border-radius: 999px; font-weight: 600; letter-spacing: 0; padding: .34em .72em; }
.tms-aca .badge.bg-success,
.tms-atlas .badge.bg-success { background: #e4f5ec !important; color: #17794a !important; }
.tms-aca .badge.bg-primary,
.tms-atlas .badge.bg-primary { background: #e8edfd !important; color: #2744b8 !important; }
.tms-aca .badge.bg-info,
.tms-atlas .badge.bg-info { background: #e1f3f8 !important; color: #0b6f8d !important; }
.tms-aca .badge.bg-warning,
.tms-atlas .badge.bg-warning { background: #fff1dc !important; color: #a85500 !important; }
.tms-aca .badge.bg-danger,
.tms-atlas .badge.bg-danger { background: #fde8e8 !important; color: #b42318 !important; }
.tms-aca .badge.bg-secondary,
.tms-atlas .badge.bg-secondary { background: #edf0f7 !important; color: #53607f !important; }
.tms-aca .badge.bg-dark,
.tms-atlas .badge.bg-dark { background: #3b4355 !important; color: #fff !important; }
.tms-aca .badge.bg-light,
.tms-atlas .badge.bg-light { background: var(--aca-soft) !important; color: #53607f !important; border-color: var(--aca-line) !important; }
.tms-aca .tms-academy-myclass,
.tms-atlas .tms-academy-myclass { border-radius: var(--aca-radius); transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease; }
.tms-aca .tms-academy-myclass:hover, .tms-aca .tms-academy-myclass:focus-visible,
.tms-atlas .tms-academy-myclass:hover,
.tms-atlas .tms-academy-myclass:focus-visible { border-color: #c4cdea; box-shadow: 0 2px 4px rgba(24, 39, 75, .06), 0 10px 24px rgba(24, 39, 75, .09) !important; transform: translateY(-1px); outline: none; }
.tms-aca .card,
.tms-atlas .card { border-color: var(--aca-line); border-radius: var(--aca-radius); }
.tms-aca .card.shadow-sm,
.tms-atlas .card.shadow-sm { box-shadow: var(--aca-shadow) !important; }
.tms-aca h6.text-uppercase.text-muted,
.tms-atlas h6.text-uppercase.text-muted { color: var(--aca-muted) !important; font-size: .72rem; letter-spacing: .09em; }
.tms-aca .tms-academy-todo .card-header, .tms-aca .tms-academy-todo .list-group-item,
.tms-atlas .tms-academy-todo .card-header,
.tms-atlas .tms-academy-todo .list-group-item { border-color: var(--aca-line); }

/* ---- NÚT "MENU" + BẢNG DROPDOWN của sidebar Academy (2026-11-21): chỉ hiện khi menu là thanh NGANG (điện thoại / máy tính bảng <= 991px; thanh gọn của TMS Smart Academy < 1360px) */
.tms-aca-nav-more { display: none; }
.tms-aca-sheet, .tms-aca-sheet-backdrop { display: block; }
.tms-aca-sheet-backdrop { position: fixed; inset: 0; z-index: 1034; background: rgba(17, 24, 39, .12); }
.tms-aca-sheet { position: fixed; z-index: 1035; overflow-y: auto; overscroll-behavior: contain; background: #fff; border: 1px solid var(--aca-line, #e4e9f4); border-radius: 14px; box-shadow: 0 18px 44px rgba(24, 39, 75, .22); padding: 6px; max-width: 420px; }
.tms-aca-sheet-label { font-size: .68rem; letter-spacing: .09em; text-transform: uppercase; color: var(--aca-muted, #66749a); font-weight: 700; padding: 10px 12px 4px; }
.tms-aca-sheet-label:first-child { padding-top: 6px; }
.tms-aca-sheet-item { position: relative; display: flex; align-items: center; gap: .75rem; width: 100%; min-height: 48px; border: 0; background: transparent; padding: .5rem .75rem; border-radius: 10px; text-align: left; color: var(--aca-ink, #1f2a44); }
.tms-aca-sheet-item:hover, .tms-aca-sheet-item:focus-visible { background: var(--aca-soft, #f2f5fc); outline: none; }
.tms-aca-sheet-item.active { background: #e8edfd; color: #2744b8; }
.tms-aca-sheet-ico { flex: none; width: 1.4rem; text-align: center; font-size: 1.15rem; color: var(--aca-muted, #66749a); }
.tms-aca-sheet-item.active .tms-aca-sheet-ico { color: #2744b8; }
.tms-aca-sheet-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.tms-aca-sheet-name { font-weight: 600; font-size: .95rem; }
.tms-aca-sheet-hint { font-size: .74rem; font-weight: 400; color: var(--aca-muted, #66749a); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tms-aca-sheet-check { flex: none; color: #2744b8; font-size: 1.1rem; }
@media (max-width: 991.98px) {
  .tms-aca-nav-more { position: sticky; left: 0; z-index: 3; flex: none; display: inline-flex; align-items: center; gap: .35rem; margin-right: 2px; padding: .5rem .7rem; border: 1px solid var(--aca-line, #e4e9f4); border-radius: 9px; background: #fff; box-shadow: 6px 0 8px -4px rgba(24, 39, 75, .14); color: var(--aca-ink, #1f2a44); font-weight: 700; font-size: .9rem; white-space: nowrap; }
  .tms-aca-nav-more > .bi:first-child { font-size: 1.2rem; }
  .tms-aca-nav-more-caret { font-size: .75rem; opacity: .7; }
  .tms-aca-nav-more.open { background: #e8edfd; border-color: #c9d4f7; color: #2744b8; }
  .tms-aca-nav-more-dot { position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; border-radius: 50%; background: #e8590c; border: 2px solid #fff; box-sizing: content-box; }
}
@media (max-width: 1359.98px) {
  .tms-aca-nav.is-bar .tms-aca-nav-more { position: sticky; left: 0; z-index: 3; flex: none; display: inline-flex; align-items: center; gap: .35rem; margin-right: 2px; padding: .32rem .65rem; border: 1px solid var(--aca-line, #e4e9f4); border-radius: 8px; background: #fff; box-shadow: 6px 0 8px -4px rgba(24, 39, 75, .14); color: var(--aca-ink, #1f2a44); font-weight: 700; font-size: .84rem; white-space: nowrap; }
  .tms-aca-nav.is-bar .tms-aca-nav-more.open { background: #e8edfd; border-color: #c9d4f7; color: #2744b8; }
  .tms-aca-nav.is-bar .tms-aca-nav-more-caret { font-size: .7rem; opacity: .7; }
  .tms-aca-nav.is-bar .tms-aca-nav-more-dot { position: absolute; top: 3px; right: 3px; width: 9px; height: 9px; border-radius: 50%; background: #e8590c; border: 2px solid #fff; box-sizing: content-box; }
}

/* ---- màn hẹp: sidebar thành thanh cuộn ngang phía trên nội dung */
@media (max-width: 991.98px) {
  .tms-aca-has-side .tms-aca-layout { display: block; }
  .tms-aca-side { position: static; margin-bottom: 16px; }
  .tms-aca-nav { display: flex; gap: 6px; padding: 6px; overflow-x: auto; scrollbar-width: none; }
  .tms-aca-nav::-webkit-scrollbar { display: none; }
  .tms-aca-nav-group { display: flex; flex: none; gap: 6px; margin: 0 !important; padding: 0 !important; border: 0 !important; }
  .tms-aca-nav-group + .tms-aca-nav-group { padding-left: 6px !important; border-left: 1px solid var(--aca-line) !important; }
  .tms-aca-nav-label { display: none; }
  .tms-aca-nav-list { flex-direction: row; gap: 6px; }
  .tms-aca-nav-item { width: auto; white-space: nowrap; padding: .5rem .8rem; }
  .tms-aca-nav-item.active::before { display: none; }
  .tms-aca-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
}
@media (max-width: 575.98px) {
  .tms-aca-notice { padding: 13px 14px; gap: 11px; }
  .tms-aca-title { font-size: 1.2rem; }
  .tms-aca-kpi { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .tms-aca-loadbar > span { animation: none; width: 100%; opacity: .5; }
  .tms-aca-examcard, .tms-aca-classcard, .tms-aca-nav-item, .tms-aca-chip { transition: none; }
}

/* ===== Giao diện người học Academy, đợt hai (2026-11-09): LỊCH HỌC + VIỆC TIẾP THEO + CHỨNG NHẬN (tms-academy-hub agenda / tms-academy-home / tms-academy-certificates) ===== */
.tms-aca .tone-danger, .tms-academy-portal .tone-danger,
.tms-atlas .tone-danger { --t-fg: #b42318; --t-bg: #fde8e8; }
.tms-aca-nav-item .tms-aca-pill.tone-danger { color: #fff; background: #d92d20; }

/* ---- lịch học: nhóm theo ngày, mỗi mục một hàng (ngày | biểu tượng | nội dung | nhãn thời điểm) */
.tms-aca-day-group { max-width: 900px; margin-bottom: 20px; }
.tms-aca-day-title { display: flex; align-items: center; gap: .4rem; margin: 0 0 8px; font-size: .74rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--aca-muted); }
.tms-aca-day-group.is-overdue .tms-aca-day-title { color: #b42318; }
.tms-aca-day-group.is-today .tms-aca-day-title { color: #a85500; }
.tms-aca-agenda { background: #fff; border: 1px solid var(--aca-line); border-radius: var(--aca-radius); box-shadow: var(--aca-shadow); overflow: hidden; }
.tms-aca-agenda-row { display: flex; align-items: center; gap: .85rem; padding: .7rem 1rem; cursor: pointer; transition: background .15s ease; }
.tms-aca-agenda-row + .tms-aca-agenda-row { border-top: 1px solid #eef1f8; }
.tms-aca-agenda-row:hover, .tms-aca-agenda-row:focus-visible { background: var(--aca-soft); outline: none; }
.tms-aca-agenda-row.overdue { box-shadow: inset 3px 0 0 #d92d20; }
.tms-aca-agenda-row.info { opacity: .92; }
.tms-aca-agenda-date { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 44px; line-height: 1.1; }
.tms-aca-agenda-d { font-size: 1.25rem; font-weight: 700; color: var(--aca-ink); }
.tms-aca-agenda-m { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--aca-muted); }
.tms-aca-agenda-ico { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; font-size: 1rem; color: var(--t-fg, #53607f); background: var(--t-bg, #edf0f7); }
.tms-aca-agenda .min-w-0 { min-width: 0; }

/* ---- việc tiếp theo (trang chủ): một thẻ nổi bật theo tông */
.tms-aca-nextup { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.15rem; border-radius: var(--aca-radius); border: 1px solid var(--t-fg); border-left-width: 5px; color: var(--aca-ink); background: linear-gradient(90deg, var(--t-bg) 0, #fff 70%); box-shadow: var(--aca-shadow); }
.tms-aca-nextup-ico { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; font-size: 1.3rem; color: #fff; background: var(--t-fg); }
.tms-aca-nextup-kicker { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--t-fg); }
.tms-aca-nextup-title { font-size: 1.1rem; font-weight: 650; line-height: 1.3; }
.tms-aca-nextup-sub { font-size: .85rem; color: var(--aca-muted); }
.tms-aca-nextup-cta { flex: none; font-weight: 600; color: #fff; background: var(--t-fg); border: 0; padding: .5rem 1rem; border-radius: 9px; }
.tms-aca-nextup-cta:hover { color: #fff; filter: brightness(1.08); }
.tms-aca .min-w-0,
.tms-atlas .min-w-0 { min-width: 0; }

/* ---- chứng nhận: thẻ trong danh sách + tờ chứng nhận khổ ngang (A4) */
.tms-aca-certcard { display: flex; gap: 1rem; height: 100%; padding: 1rem 1.15rem; background: #fff; border: 1px solid var(--aca-line); border-radius: var(--aca-radius); box-shadow: var(--aca-shadow); }
.tms-aca-certcard-ico { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; font-size: 1.4rem; color: #b8860b; background: #fff4d6; }
.tms-aca-certcard-kind { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--aca-muted); }
.tms-aca-certcard-title { font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.tms-aca-certcode { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; letter-spacing: .03em; white-space: nowrap; }
.tms-aca-cert-modal { max-width: 960px; width: 96vw; }
.tms-aca-cert-stage { background: #eef1f8; }
.tms-aca-cert-sheet { width: 100%; max-width: 880px; margin: 0 auto; aspect-ratio: 297 / 210; background: #fffdf8; border-radius: 6px; box-shadow: 0 10px 30px rgba(24, 39, 75, .18); padding: 3.2%; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.tms-aca-cert-frame { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .55rem; height: 100%; padding: 2.2rem 3rem; text-align: center; border: 3px double #b8860b; outline: 1px solid #e6d7a8; outline-offset: -10px; font-family: 'Times New Roman', Times, 'Noto Serif', serif; color: #1f2a44; }   /* KHÔNG dùng Georgia: dấu tiếng Việt (ằ, ố, ử...) bị vỡ ở nhiều máy */
.tms-aca-cert-top { display: flex; align-items: center; gap: .6rem; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.tms-aca-cert-org { font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .9rem; color: #2744b8; }
.tms-aca-cert-kicker { margin-top: .5rem; font-size: 1.9rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #8a6508; }
.tms-aca-cert-line { font-size: 1rem; font-style: italic; color: #5b6784; }
.tms-aca-cert-name { font-size: 2.3rem; font-weight: 700; line-height: 1.2; padding: 0 1.5rem .2rem; border-bottom: 1px solid #b8860b; overflow-wrap: anywhere; }
.tms-aca-cert-title { font-size: 1.5rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; max-width: 90%; }
.tms-aca-cert-meta { display: flex; justify-content: center; gap: 3.5rem; margin-top: 1.1rem; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.tms-aca-cert-meta > div { display: flex; flex-direction: column; gap: .15rem; }
.tms-aca-cert-meta span { font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #7a8399; }
.tms-aca-cert-meta strong { font-size: 1rem; }

@media (max-width: 767.98px) {
  .tms-aca-nextup { flex-wrap: wrap; }
  .tms-aca-nextup-cta { width: 100%; }
  .tms-aca-agenda-row { padding: .65rem .75rem; gap: .65rem; }
  .tms-aca-cert-frame { padding: 1rem 1.2rem; gap: .3rem; }
  .tms-aca-cert-kicker { font-size: 1rem; letter-spacing: .08em; }
  .tms-aca-cert-name { font-size: 1.2rem; }
  .tms-aca-cert-title { font-size: .95rem; }
  .tms-aca-cert-meta { gap: 1.5rem; }
}
@media print {
  @page { size: A4 landscape; margin: 0; }
  body.tms-aca-printing * { visibility: hidden !important; }
  body.tms-aca-printing .tms-aca-cert-sheet, body.tms-aca-printing .tms-aca-cert-sheet * { visibility: visible !important; }
  body.tms-aca-printing .tms-aca-cert-sheet { position: fixed !important; left: 0 !important; top: 0 !important; width: 297mm !important; max-width: none !important; height: 210mm !important; margin: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
}

/* ===== Logo ở các vị trí khác (2026-11-10): chân sidebar, tờ chứng nhận, trang đăng xuất của cổng, thanh trên của Studio ===== */
.tms-aca-nav-brand { display: flex; align-items: center; justify-content: center; margin-top: 12px; padding: 12px 8px 4px; border-top: 1px solid var(--aca-line, #e4e9f4); }
.tms-aca-nav-brand-logo { display: block; max-width: 100%; max-height: 30px; object-fit: contain; opacity: .92; }
.tms-aca-nav-brand-name { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--aca-muted, #66749a); text-align: center; overflow-wrap: anywhere; }
@media (max-width: 991.98px) { .tms-aca-nav-brand { display: none; } }
.tms-aca-cert-top { flex-direction: column; gap: .4rem; }
.tms-aca-cert-logo { display: block; max-height: 68px; max-width: 280px; width: auto; height: auto; object-fit: contain; }
@media (max-width: 767.98px) { .tms-aca-cert-logo { max-height: 40px; max-width: 170px; } }
.tms-aca-logout-logo { display: block; margin: 0 auto 1.25rem; max-height: 60px; max-width: 220px; object-fit: contain; }
.tms-studio-top .tms-aca-brandbox { gap: .6rem; }
.tms-studio-top .tms-aca-brand-logo { height: 38px; max-width: 190px; }
/* tờ chứng nhận có logo: tên đơn vị cấp nhỏ + giãn chữ dưới logo (logo thường đã chứa tên công ty) */
.tms-aca-cert-logo + .tms-aca-cert-org { font-size: .72rem; letter-spacing: .16em; color: #7a8399; }

/* ===== Nâng cấp trải nghiệm học (2026-11-10): ngôn ngữ thiết kế sinh động cho giao diện học viên =====
   Nguyên tắc: màu theo CHỦ ĐỀ của catalog (biến --hero-bg), tiến độ luôn có màu + chuyển động nhẹ, mỗi loại bài một sắc riêng, khoảnh khắc hoàn thành có ăn mừng,
   màn học rộng hết cỡ (sidebar thu thành thanh biểu tượng). Mọi luật nằm trong .tms-aca (vỏ học viên) nên không đụng Studio / phần còn lại của TMS. */
.tms-aca,
.tms-atlas { --aca-accent2: #7c5cff; --aca-ok: #16a34a; }
.tms-aca h4, .tms-aca h5, .tms-aca h6,
.tms-atlas h4,
.tms-atlas h5,
.tms-atlas h6 { font-weight: 700; letter-spacing: -.012em; }
.tms-aca .tms-academy-skeleton .tms-academy-sk,
.tms-atlas .tms-academy-skeleton .tms-academy-sk { border-radius: 14px; }
@keyframes tms-aca-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tms-aca-main > div { animation: tms-aca-rise .3s ease both; }

/* ---- thanh tiến độ: gradient + chuyển động; xong thì xanh lá */
.tms-aca .progress,
.tms-atlas .progress { background: #e6eaf6; border-radius: 999px; overflow: hidden; }
.tms-aca .progress-bar,
.tms-atlas .progress-bar { border-radius: 999px; background: linear-gradient(90deg, var(--aca-accent), var(--aca-accent2)); transition: width .7s cubic-bezier(.22, 1, .36, 1); }
.tms-aca .progress-bar.bg-success,
.tms-atlas .progress-bar.bg-success { background: linear-gradient(90deg, #16a34a, #4ade80) !important; }

/* ---- lời chào ở trang chủ */
.tms-aca-welcome { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-bottom: 18px; padding: 1.5rem 1.75rem; border-radius: 18px; color: #fff; overflow: hidden;
  background: linear-gradient(120deg, #3454d1 0%, #6a4fe0 60%, #8b5cf6 100%); box-shadow: 0 10px 28px rgba(52, 84, 209, .28); }
.tms-aca-welcome.mood-warn { background: linear-gradient(120deg, #d9480f 0%, #f08c00 100%); box-shadow: 0 10px 28px rgba(217, 72, 15, .28); }
.tms-aca-welcome.mood-fire { background: linear-gradient(120deg, #e8590c 0%, #d6336c 100%); box-shadow: 0 10px 28px rgba(214, 51, 108, .26); }
.tms-aca-welcome-text { position: relative; z-index: 1; min-width: 0; max-width: 640px; }
.tms-aca-welcome-kicker { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.tms-aca-welcome-title { margin: .25rem 0 .35rem; font-size: 1.65rem; font-weight: 750; color: #fff; }
.tms-aca-welcome-sub { margin: 0 0 1rem; font-size: .98rem; opacity: .93; max-width: 56ch; }
.tms-aca-welcome-cta { background: #fff; color: #2744b8; font-weight: 700; padding: .55rem 1.2rem; border-radius: 11px; border: 0; box-shadow: 0 6px 16px rgba(0, 0, 0, .16); transition: transform .15s ease, box-shadow .15s ease; }
.tms-aca-welcome-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(0, 0, 0, .2); color: #1d3a9f; }
.tms-aca-welcome-art { position: relative; flex: none; width: 150px; height: 120px; }
.tms-aca-welcome-art i { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 4.6rem; opacity: .95; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .22)); }
.tms-aca-welcome-art span { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.tms-aca-welcome-art .c1 { width: 130px; height: 130px; right: -20px; top: -20px; }
.tms-aca-welcome-art .c2 { width: 70px; height: 70px; right: 80px; bottom: -18px; background: rgba(255, 255, 255, .1); }
.tms-aca-welcome-art .c3 { width: 26px; height: 26px; right: 128px; top: 8px; background: rgba(255, 255, 255, .22); }

/* ---- banner khoá */
.tms-aca-hero { position: relative; display: flex; align-items: stretch; gap: 1.6rem; padding: 1.5rem; border-radius: 18px; color: #fff; overflow: hidden; background: var(--hero-bg, linear-gradient(135deg, #2563eb, #0f172a)); box-shadow: 0 12px 30px rgba(15, 23, 42, .22); }
.tms-aca-hero::before { content: ''; position: absolute; right: -60px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: rgba(255, 255, 255, .1); pointer-events: none; }
.tms-aca-hero::after { content: ''; position: absolute; left: 30%; bottom: -110px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .06); pointer-events: none; }
.tms-aca-hero-cover { position: relative; z-index: 1; flex: none; width: 240px; align-self: stretch; min-height: 150px; border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, .14); box-shadow: 0 8px 22px rgba(0, 0, 0, .25); }
.tms-aca-hero-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tms-aca-hero-icon { position: absolute; inset: 0; display: grid; place-items: center; font-size: 3.8rem; color: rgba(255, 255, 255, .92); }
.tms-aca-hero-main { position: relative; z-index: 1; flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; }
.tms-aca-hero-kicker { font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .85; margin-bottom: .2rem; }
.tms-aca-hero-title { color: #fff; font-size: 1.75rem; font-weight: 750; line-height: 1.2; }
.tms-aca-hero-summary { color: rgba(255, 255, 255, .9); max-width: 62ch; }
.tms-aca-hero-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.tms-aca-hchip { display: inline-flex; align-items: center; gap: .4rem; padding: .28rem .7rem; border-radius: 999px; font-size: .82rem; font-weight: 600; background: rgba(255, 255, 255, .18); backdrop-filter: blur(4px); }
.tms-aca-hero .progress { background: rgba(255, 255, 255, .28); }
.tms-aca-hero .progress-bar { background: #fff; }
.tms-aca-hero .progress-bar.bg-success { background: #fff !important; }
.tms-aca-hero .small.text-muted, .tms-aca-hero .text-muted { color: rgba(255, 255, 255, .85) !important; }
.tms-aca-hero .text-danger { color: #ffe0e0 !important; }
.tms-aca-hero .badge.bg-success { background: #fff !important; color: #14803c !important; }
.tms-aca-hero-actions { min-width: 190px; }
.tms-aca-hero-cta { font-weight: 700; color: #1f2a44; padding: .65rem 1.2rem; border-radius: 12px; border: 0; box-shadow: 0 8px 20px rgba(0, 0, 0, .2); }
.tms-aca-hero-cta:hover { transform: translateY(-1px); color: #111a33; }
.tms-aca-hero .tms-academy-bm-btn { border-color: rgba(255, 255, 255, .7); color: #fff; border-radius: 12px; }
.tms-aca-hero .tms-academy-bm-btn:hover, .tms-aca-hero .tms-academy-bm-btn.on { background: rgba(255, 255, 255, .22); color: #fff; }
.tms-aca .tms-academy-outcomes,
.tms-atlas .tms-academy-outcomes { border: 0; background: linear-gradient(135deg, #f0fdf4, #ecfeff); box-shadow: var(--aca-shadow); }
.tms-aca .tms-academy-outcomes .bi-check2,
.tms-atlas .tms-academy-outcomes .bi-check2 { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: #16a34a; color: #fff !important; font-size: .9rem; }

/* ---- mục lục khoá: chương có số + thanh nhỏ, mỗi loại bài một sắc */
.tms-aca .tms-academy-section-head,
.tms-atlas .tms-academy-section-head { border-radius: 12px; font-weight: 600; }
.tms-aca-chapno { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #e8edfd; color: #2744b8; font-size: .8rem; font-weight: 800; }
.tms-aca-chapno.done { background: #16a34a; color: #fff; }
.tms-aca-chapbar { flex: none; width: 70px; height: 6px; border-radius: 999px; background: #e6eaf6; overflow: hidden; }
.tms-aca-chapbar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--aca-accent), var(--aca-accent2)); transition: width .6s ease; }
.tms-aca-ltype { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; font-size: .95rem; color: #475569; background: #eef1f8; }
.tms-aca-ltype[data-type="VIDEO"] { color: #c2410c; background: #ffedd5; }
.tms-aca-ltype[data-type="ARTICLE"] { color: #1d4ed8; background: #dbeafe; }
.tms-aca-ltype[data-type="FILE"] { color: #0f766e; background: #ccfbf1; }
.tms-aca-ltype[data-type="PRACTICE"] { color: #7e22ce; background: #f3e8ff; }
.tms-aca-ltype[data-type="QUIZ"] { color: #be185d; background: #fce7f3; }
.tms-aca .tms-academy-section-body .list-group-item,
.tms-atlas .tms-academy-section-body .list-group-item { transition: background .15s ease, transform .15s ease; }
.tms-aca .tms-academy-section-body .list-group-item:hover,
.tms-atlas .tms-academy-section-body .list-group-item:hover { background: #f4f6ff; }

/* ---- thẻ khoá ở trang chủ / danh mục */
.tms-aca .tms-academy-ccard,
.tms-atlas .tms-academy-ccard { border: 1px solid var(--aca-line); border-radius: 16px; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.tms-aca .tms-academy-ccard:hover,
.tms-atlas .tms-academy-ccard:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(24, 39, 75, .16) !important; }
.tms-aca .tms-academy-ccover-ph i,
.tms-atlas .tms-academy-ccover-ph i { font-size: 2.6rem; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .25)); }
.tms-aca .tms-academy-ctitle,
.tms-atlas .tms-academy-ctitle { font-weight: 700; }
.tms-aca .tms-academy-continue,
.tms-atlas .tms-academy-continue { border: 0; border-radius: 18px; box-shadow: 0 10px 26px rgba(24, 39, 75, .14); }

/* ---- màn học bài */
.tms-aca-lkicker { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .25rem; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--aca-muted); }
.tms-aca-lkicker-ch { padding: .15rem .6rem; border-radius: 999px; background: #e8edfd; color: #2744b8; }
.tms-aca-lstrip { display: flex; align-items: center; gap: .85rem; padding: .6rem .95rem; border: 1px solid var(--aca-line); border-radius: 12px; background: #fff; box-shadow: var(--aca-shadow); }
.tms-aca-lstrip-label { flex: none; font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--aca-muted); }
.tms-aca-lstrip-count { flex: none; font-size: .82rem; font-weight: 700; color: var(--aca-ink); }
.tms-aca .tms-academy-article,
.tms-atlas .tms-academy-article { border: 0; border-radius: 16px; box-shadow: var(--aca-shadow); padding: 1.5rem 1.8rem; font-size: 1.03rem; line-height: 1.8; color: #243049; }
.tms-aca .tms-academy-article h2,
.tms-atlas .tms-academy-article h2 { font-size: 1.35rem; margin-top: 1.5rem; }
.tms-aca .tms-academy-article h3,
.tms-atlas .tms-academy-article h3 { font-size: 1.15rem; }
.tms-aca .tms-academy-tabs .nav-link,
.tms-atlas .tms-academy-tabs .nav-link { font-weight: 600; border-radius: 10px 10px 0 0; }
.tms-aca .tms-academy-tabpane,
.tms-atlas .tms-academy-tabpane { border-radius: 0 12px 12px 12px !important; }
.tms-aca .tms-academy-sidebar-inner,
.tms-atlas .tms-academy-sidebar-inner { border: 1px solid var(--aca-line); border-radius: 16px; overflow: hidden; box-shadow: var(--aca-shadow); }
.tms-aca .tms-academy-outline-item,
.tms-atlas .tms-academy-outline-item { transition: background .15s ease; }
.tms-aca .tms-academy-outline-item.current,
.tms-atlas .tms-academy-outline-item.current { background: linear-gradient(90deg, #e8edfd, #f4f6ff); box-shadow: inset 3px 0 0 var(--aca-accent); }
.tms-aca .tms-academy-outline-item.done .tms-academy-outline-text > span.d-block,
.tms-atlas .tms-academy-outline-item.done .tms-academy-outline-text > span.d-block { color: #5b6784; }
.tms-aca .tms-academy-outline-title,
.tms-atlas .tms-academy-outline-title { font-weight: 800; letter-spacing: .04em; }

/* ---- ăn mừng khi xong bài / xong khoá */
.tms-aca .tms-academy-nextup,
.tms-atlas .tms-academy-nextup { position: relative; overflow: hidden; border: 0; border-radius: 16px; box-shadow: var(--aca-shadow); animation: tms-aca-pop .45s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes tms-aca-pop { 0% { opacity: 0; transform: scale(.94) translateY(6px); } 100% { opacity: 1; transform: none; } }
.tms-aca .tms-academy-nextup.alert-success,
.tms-atlas .tms-academy-nextup.alert-success { background: linear-gradient(120deg, #f0fdf4, #fefce8); }
.tms-aca-celebrate-ico { flex: none; display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; font-size: 1.4rem; color: #fff; background: linear-gradient(135deg, #3454d1, #7c5cff); box-shadow: 0 6px 16px rgba(52, 84, 209, .35); }
.tms-aca-celebrate-ico.is-trophy { background: linear-gradient(135deg, #f59e0b, #f97316); box-shadow: 0 6px 18px rgba(245, 158, 11, .5); animation: tms-aca-wiggle 1.1s ease .2s 2; }
@keyframes tms-aca-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-10deg) scale(1.08); } 75% { transform: rotate(10deg) scale(1.08); } }
.tms-aca-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.tms-aca-confetti i { position: absolute; top: -14px; width: 8px; height: 14px; border-radius: 2px; opacity: 0; animation: tms-aca-fall 2s ease-in 1 both; }
@keyframes tms-aca-fall { 0% { opacity: 1; translate: 0 0; } 100% { opacity: 0; translate: 18px 190px; } }

/* ---- sidebar thu thành thanh biểu tượng khi đang học bài (màn học rộng hết cỡ) */
.tms-aca-has-side.is-rail .tms-aca-layout { grid-template-columns: 60px minmax(0, 1fr); gap: 18px; }
.tms-aca-nav.is-rail { padding: 8px 6px; }
.tms-aca-nav.is-rail .tms-aca-nav-label, .tms-aca-nav.is-rail .tms-aca-nav-text, .tms-aca-nav.is-rail .tms-aca-nav-brand { display: none; }
.tms-aca-nav.is-rail .tms-aca-nav-group + .tms-aca-nav-group { margin-top: 8px; padding-top: 8px; }
.tms-aca-nav.is-rail .tms-aca-nav-item { justify-content: center; padding: .6rem 0; }
.tms-aca-nav.is-rail .tms-aca-nav-item i { width: auto; font-size: 1.15rem; }
.tms-aca-nav.is-rail .tms-aca-nav-item.active::before { left: -6px; }
.tms-aca-nav.is-rail .tms-aca-pill { position: absolute; top: 3px; right: 6px; min-width: 9px; width: 9px; height: 9px; padding: 0; font-size: 0; border: 2px solid #fff; box-sizing: content-box; }

/* ---- menu chính Academy thành THANH NGANG gọn ở đầu trang khi xem bản đồ TMS Smart Academy (2026-11-21): nội dung dùng trọn chiều rộng; cùng kiểu thanh ngang cuộn được của màn hẹp */
.tms-aca-has-side.is-bar .tms-aca-layout { display: block; }
.tms-aca-has-side.is-bar .tms-aca-side { position: static; margin-bottom: 10px; }
.tms-aca-nav.is-bar { display: flex; align-items: center; gap: 4px; padding: 4px 6px; overflow-x: auto; scrollbar-width: none; border-radius: 12px; }
.tms-aca-nav.is-bar::-webkit-scrollbar { display: none; }
.tms-aca-nav.is-bar .tms-aca-nav-group { display: flex; flex: none; margin: 0; padding: 0; border: 0; }
.tms-aca-nav.is-bar .tms-aca-nav-group + .tms-aca-nav-group { margin: 0 0 0 4px; padding: 0 0 0 6px; border-left: 1px solid var(--aca-line); }
.tms-aca-nav.is-bar .tms-aca-nav-label, .tms-aca-nav.is-bar .tms-aca-nav-brand { display: none; }
.tms-aca-nav.is-bar .tms-aca-nav-list { flex-direction: row; gap: 2px; }
.tms-aca-nav.is-bar .tms-aca-nav-item { width: auto; white-space: nowrap; gap: .4rem; padding: .32rem .65rem; font-size: .84rem; border-radius: 8px; }
.tms-aca-nav.is-bar .tms-aca-nav-item i { width: auto; font-size: 1rem; }
.tms-aca-nav.is-bar .tms-aca-nav-item.active::before { display: none; }
.tms-aca-nav.is-bar .tms-aca-nav-item .tms-aca-pill { margin-left: .1rem; }
@media (max-width: 1359.98px) {
  .tms-aca-nav.is-bar .tms-aca-nav-item:not(.active) .tms-aca-nav-text { display: none; }
  .tms-aca-nav.is-bar .tms-aca-nav-item:not(.active) .tms-aca-pill { position: absolute; top: 2px; right: 4px; min-width: 9px; width: 9px; height: 9px; padding: 0; font-size: 0; border: 2px solid #fff; box-sizing: content-box; margin: 0; }
}

@media (max-width: 991.98px) {
  .tms-aca-welcome { padding: 1.15rem 1.2rem; }
  .tms-aca-welcome-art { display: none; }
  .tms-aca-welcome-title { font-size: 1.35rem; }
  .tms-aca-hero { flex-direction: column; gap: 1rem; padding: 1.1rem; }
  .tms-aca-hero-cover { width: 100%; min-height: 150px; }
  .tms-aca-hero-title { font-size: 1.35rem; }
  .tms-aca-hero-actions { width: 100%; }
  .tms-aca-has-side.is-rail .tms-aca-layout { display: block; }
  .tms-aca-nav.is-rail .tms-aca-nav-item { padding: .5rem .8rem; }
}
@media (max-width: 575.98px) {
  .tms-aca-lstrip { flex-wrap: wrap; gap: .4rem .7rem; }
  .tms-aca-lstrip-label { flex: 1 0 100%; }
  .tms-aca .tms-academy-article,
.tms-atlas .tms-academy-article { padding: 1rem 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tms-aca-main > div, .tms-aca .tms-academy-nextup, .tms-aca-celebrate-ico.is-trophy, .tms-aca-confetti i,
.tms-atlas .tms-academy-nextup { animation: none !important; }
  .tms-aca-confetti { display: none; }
  .tms-aca .progress-bar, .tms-aca-chapbar > i, .tms-aca .tms-academy-ccard,
.tms-atlas .progress-bar,
.tms-atlas .tms-academy-ccard { transition: none; }
}

/* ===== Đường dẫn (breadcrumb) + nút quay lại dạng viên thuốc (2026-11-10) - tms-academy-crumbs; giá trị dự phòng var(--aca-*) để dùng được cả ngoài vỏ .tms-aca ===== */
.tms-aca-crumbs { margin-bottom: .85rem; }
.tms-aca-crumbs-list { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .1rem; list-style: none; margin: 0; padding: 0; }
.tms-aca-crumbs-item { display: inline-flex; align-items: center; min-width: 0; }
.tms-aca-crumbs-sep { margin: 0 .3rem; font-size: .62rem; color: #b3bdd6; }
.tms-aca-crumb { display: inline-flex; align-items: center; gap: .4rem; min-width: 0; max-width: 240px; padding: .3rem .75rem; border-radius: 999px; font-size: .84rem; font-weight: 600; line-height: 1.25; white-space: nowrap; color: var(--aca-muted, #66749a); text-decoration: none; transition: background .15s ease, color .15s ease, box-shadow .15s ease; }
.tms-aca-crumb .bi { flex: none; font-size: .95em; }
.tms-aca-crumb-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
a.tms-aca-crumb:hover { background: #e8edfd; color: #2744b8; text-decoration: none; }
a.tms-aca-crumb:focus-visible { outline: 2px solid var(--aca-accent, #3454d1); outline-offset: 1px; }
.tms-aca-crumbs-item.is-home .tms-aca-crumb { background: #fff; color: #2744b8; border: 1px solid var(--aca-line, #e4e9f4); box-shadow: 0 1px 2px rgba(24, 39, 75, .05); }
.tms-aca-crumbs-item.is-home a.tms-aca-crumb:hover { background: #e8edfd; border-color: #c9d4f7; }
.tms-aca-crumb.is-current { max-width: 380px; color: var(--aca-ink, #1f2a44); font-weight: 700; background: #fff; border: 1px solid var(--aca-line, #e4e9f4); box-shadow: 0 1px 2px rgba(24, 39, 75, .05); }
.tms-aca-backlink { display: inline-flex; align-items: center; gap: .4rem; padding: .32rem .85rem; border-radius: 999px; background: #fff; border: 1px solid var(--aca-line, #e4e9f4); box-shadow: 0 1px 2px rgba(24, 39, 75, .05); font-size: .84rem; font-weight: 600; color: #2744b8; text-decoration: none; transition: background .15s ease, border-color .15s ease; }
.tms-aca-backlink:hover { background: #e8edfd; border-color: #c9d4f7; color: #2744b8; text-decoration: none; }
.tms-aca-backlink .bi { margin: 0 !important; }
/* ĐIỆN THOẠI (2026-11-21, rà soát màn hình Academy ở 390px): thanh đầu cổng một hàng, vùng bấm đủ lớn cho đường dẫn / liên kết nhỏ */
@media (max-width: 575.98px) {
  .tms-aca-portal-head .container-fluid { flex-wrap: nowrap; gap: .5rem !important; padding-left: 12px !important; padding-right: 12px !important; }
  .tms-aca-portal-head .tms-aca-user-name { display: none; }
  .tms-aca-portal-head .btn { flex: none; white-space: nowrap; }
  .tms-aca-crumb { padding-top: .5rem; padding-bottom: .5rem; }
  a.tms-academy-goal-edit { display: inline-block; padding: .6rem .25rem; }
}
@media (max-width: 575.98px) {
  .tms-aca-crumbs-list { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .tms-aca-crumbs-list::-webkit-scrollbar { display: none; }
  .tms-aca-crumbs-item { flex: none; }
  .tms-aca-crumb { max-width: 200px; }
}

/* Academy - CỘT THAO TÁC GỌN (2026-11-11, user: "chinh lai cac icon o cot action ... cho gon va chuyen nghiep"): nhóm nút CHỈ CÓ BIỂU TƯỢNG trong ô bảng (tooltip bằng title + aria-label).
   Dùng: <div class="tms-aca-acts"><button class="tms-aca-act [tms-aca-act--main|--try|--danger]"><i class="bi ..."></i></button> ... <span class="tms-aca-acts-sep"></span> ...</div>. Nút "chính" nền xanh nhạt, còn lại chỉ hiện nền khi rê chuột; "danger" đỏ khi rê chuột. */
.tms-aca-acts { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid #e3e7f1; border-radius: 10px; background: #fff; vertical-align: middle; }
.tms-aca-act { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #5b6478; font-size: 1rem; line-height: 1; cursor: pointer; transition: background .15s ease, color .15s ease; }
.tms-aca-act .bi { margin: 0 !important; line-height: 1; }
.tms-aca-act:hover:not(:disabled) { background: #eef1f8; color: #1f2a44; }
.tms-aca-act:focus-visible { outline: 2px solid #2744b8; outline-offset: 1px; }
.tms-aca-act:disabled { opacity: .4; cursor: not-allowed; }
.tms-aca-act--main { background: #e8edfd; color: #2744b8; }
.tms-aca-act--main:hover:not(:disabled) { background: #d6defa; color: #1d3597; }
.tms-aca-act--try { font-size: 1.15rem; }
.tms-aca-act--try:hover:not(:disabled) { background: #e3f5ec; color: #16794c; }
.tms-aca-act--danger:hover:not(:disabled) { background: #fdeaea; color: #c0392b; }
.tms-aca-acts-sep { flex: none; width: 1px; height: 16px; margin: 0 2px; background: #e3e7f1; }
.tms-aca-act-count { position: absolute; top: -4px; right: -4px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: #f59e0b; color: #1f2937; font-size: .62rem; font-weight: 700; line-height: 15px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.tms-aca-acts-cell { width: 1%; }   /* ô thao tác ôm sát nhóm nút, nhường chỗ cho cột tên */

/* =====================================================================================================================================================================
   Academy - GIAO DIỆN BÀI THI (2026-11-11, user: "phần hiển thị câu hỏi trả lời đang khó đọc, chữ hơi nhỏ, không phân biệt được nội dung câu hỏi và câu trả lời", "nên có icon A+/- ... default chữ lớn hơn chút",
   "cải thiện giao diện bài thi chuyên nghiệp hơn, cả trong làm thử và thi thật"). Nguyên nhân gốc: chữ nền của giao diện là 0,84rem (≈13px) và câu hỏi / lựa chọn cùng cỡ, cùng độ đậm, cùng nền.
   Cỡ chữ của khung đề thi do biến --xfs (px, mặc định 16, người dùng đổi bằng A- / A+ ở tms-academy-fontsize); mọi cỡ bên trong tính theo em nên đổi một chỗ là cả đề đổi theo.
   Ngôn ngữ thiết kế: CÂU HỎI = khối nền xanh nhạt + vạch xanh bên trái + chữ lớn đậm; TRẢ LỜI = thẻ trắng viền mảnh (chọn thì viền + nền xanh); KẾT QUẢ: khối "Câu trả lời của bạn" xanh lá nếu đúng, đỏ nếu sai.
   ===================================================================================================================================================================== */
.tms-aca-x { font-size: var(--xfs, 16px); line-height: 1.55; color: #1f2a44; }
.tms-aca-x .small, .tms-aca-x small { font-size: .875em; }
.tms-aca-x .form-control, .tms-aca-x .form-select { font-size: 1em; }
.tms-aca-x .alert { font-size: .92em; }
/* theme đặt transition: all .3s: đổi cỡ chữ bằng A- / A+ sẽ "trượt" từ từ và chữ nhảy từng nấc; chỉ cho hiệu ứng ở các thuộc tính màu (các quy tắc sau trong khối này ghi đè lại khi cần) */
.tms-aca-x, .tms-aca-x * { transition-property: color, background-color, border-color, box-shadow, opacity, transform; }

/* thanh dính: tên bài, đồng hồ, cỡ chữ, lưu, Nộp bài + tiến độ + bảng số câu */
.tms-aca-xbar { position: sticky; top: 0; z-index: 20; margin-bottom: 1rem; padding: .6rem .8rem .55rem; background: rgba(255, 255, 255, .97); border: 1px solid #e3e7f1; border-radius: 14px; box-shadow: 0 6px 18px rgba(24, 39, 75, .08); font-size: 14px; line-height: 1.4; }
.tms-aca-xbar-row { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem .75rem; }
.tms-aca-xbar-title { flex: 1 1 180px; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tms-aca-xbar-sub { font-weight: 500; color: #7a8499; }
.tms-aca-xtimer { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .75rem; border-radius: 999px; background: #eef2ff; color: #2744b8; font-weight: 700; font-variant-numeric: tabular-nums; }
.tms-aca-xtimer.is-warn { background: #fff3d6; color: #8a5200; }
.tms-aca-xtimer.is-danger { background: #fde8e8; color: #c0392b; animation: tms-aca-xpulse 1.1s ease-in-out infinite; }
@keyframes tms-aca-xpulse { 50% { box-shadow: 0 0 0 5px rgba(192, 57, 43, .14); } }
.tms-aca-xsave { font-size: .85em; color: #7a8499; }
.tms-aca-xsave.is-error { color: #c0392b; }
.tms-aca-xnav-row { margin-top: .55rem; flex-wrap: nowrap; align-items: center; }
.tms-aca-xprogress { flex: none; display: flex; flex-direction: column; gap: 4px; min-width: 150px; font-size: .85em; color: #5b6478; }
.tms-aca-xprogress-track { display: block; height: 5px; border-radius: 5px; background: #e9edf6; overflow: hidden; }
.tms-aca-xprogress-fill { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #2744b8, #4a73f0); transition: width .25s ease; }
.tms-aca-xnav { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.tms-aca-xchip { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 30px; padding: 0; border: 1.5px solid #d3d9e8; border-radius: 9px; background: #fff; color: #5b6478; font-size: .85rem; font-weight: 600; line-height: 1; cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.tms-aca-xchip:hover { border-color: #9fb1ee; color: #2744b8; }
.tms-aca-xchip.is-answered { background: #e8edfd; border-color: #9fb1ee; color: #2744b8; }
.tms-aca-xchip.is-active { border-color: #2744b8; box-shadow: 0 0 0 2px #2744b8; }
.tms-aca-xchip.is-flagged::after { content: ""; position: absolute; top: -4px; right: -4px; width: 10px; height: 10px; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 0 2px #fff; }
.tms-aca-xchip:focus-visible, .tms-aca-xopt:focus-within, .tms-aca-xq-flag:focus-visible { outline: 2px solid #2744b8; outline-offset: 2px; }

/* thẻ câu hỏi */
.tms-aca-xq { margin-bottom: 1.1rem; padding: 1rem 1.1rem 1.1rem; background: #fff; border: 1px solid #e3e7f1; border-radius: 16px; box-shadow: 0 1px 2px rgba(24, 39, 75, .04); scroll-margin-top: 150px; transition: border-color .15s ease, box-shadow .15s ease; }
.tms-aca-xq.is-active { border-color: #b9c6f3; box-shadow: 0 6px 18px rgba(39, 68, 184, .08); }
.tms-aca-xq-head { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem .55rem; margin-bottom: .75rem; font-size: .8em; }
.tms-aca-xq-no { font-size: 1.05em; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #2744b8; }
.tms-aca-xq-type, .tms-aca-xq-points, .tms-aca-xq-score { display: inline-flex; align-items: center; gap: .35em; padding: .15em .65em; border-radius: 999px; background: #f1f4fa; color: #5b6478; font-weight: 600; }
.tms-aca-xq-type .bi { margin: 0 !important; }
.tms-aca-xq-score { margin-left: auto; background: transparent; padding-right: 0; color: #1f2a44; font-size: 1.05em; font-weight: 700; }
.tms-aca-xq-done { display: inline-flex; align-items: center; gap: .3em; color: #16794c; font-weight: 600; }
.tms-aca-xq-flag { display: inline-flex; align-items: center; gap: .35em; margin-left: auto; padding: .2em .7em; border: 1px solid #e3e7f1; border-radius: 999px; background: #fff; color: #5b6478; font-size: 1em; font-weight: 600; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.tms-aca-xq-flag:hover { background: #fff8e6; border-color: #f2d58a; color: #8a5200; }
.tms-aca-xq-flag.on { background: #fff3d6; border-color: #f2c75f; color: #8a5200; }
.tms-aca-xq-flag .bi { margin: 0 !important; }
.tms-aca-xq.is-flagged { border-color: #f2d58a; }
.tms-aca-xq-prompt { margin-bottom: 1rem; padding: .85em 1em; background: #f3f6ff; border-left: 4px solid #2744b8; border-radius: 6px 12px 12px 6px; color: #14213d; font-size: 1.18em; font-weight: 600; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.tms-aca-xq-rubric { margin: -.4rem 0 1rem; font-size: .85em; color: #5b6478; display: flex; flex-wrap: wrap; gap: .35rem .5rem; align-items: center; }
.tms-aca-xq-crit, .tms-aca-xcrit { display: inline-block; padding: .1em .6em; border-radius: 8px; background: #f1f4fa; }
.tms-aca-xcrits { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; font-size: .9em; }
.tms-aca-xq-instr { display: flex; align-items: center; gap: .45em; margin-bottom: .6rem; font-size: .82em; font-weight: 700; letter-spacing: .02em; color: #6b7690; }
.tms-aca-xq-instr .bi { margin: 0 !important; }

/* lựa chọn trắc nghiệm = thẻ lớn bấm được cả dòng; chữ cái A / B / C do CSS vẽ (data-letter) nên không lẫn vào nội dung lựa chọn */
.tms-aca-xopt { position: relative; display: flex; align-items: flex-start; gap: .75em; margin: 0 0 .55rem; padding: .7em .9em; min-height: 48px; background: #fff; border: 1.5px solid #dfe4ee; border-radius: 12px; cursor: pointer; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.tms-aca-xopt:hover { border-color: #aebbe6; background: #f8faff; }
.tms-aca-xopt .form-check-input { position: absolute; float: none; width: 1px; height: 1px; margin: 0; opacity: 0; }
.tms-aca-xopt .form-check-label { flex: 1 1 auto; min-width: 0; padding-top: .12em; font-size: 1em; line-height: 1.45; color: #1f2a44; cursor: pointer; overflow-wrap: anywhere; }
.tms-aca-xopt[data-letter]::before { content: attr(data-letter); display: inline-grid; place-items: center; flex: none; width: 1.9em; height: 1.9em; border: 1.5px solid #c9d1e3; border-radius: 50%; background: #fff; color: #5b6478; font-size: .9em; font-weight: 700; line-height: 1; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.tms-aca-xopt.is-multi[data-letter]::before { border-radius: 8px; }
.tms-aca-xopt.is-sel { border-color: #2744b8; background: #eef2ff; box-shadow: 0 0 0 1px #2744b8 inset; }
.tms-aca-xopt.is-sel[data-letter]::before { background: #2744b8; border-color: #2744b8; color: #fff; }
.tms-aca-xopt.is-sel .form-check-label { font-weight: 600; color: #14213d; }
.tms-aca-xtf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.tms-aca-xopt.is-tf { align-items: center; justify-content: center; gap: .5em; margin: 0; padding: .8em 1em; font-size: 1.05em; font-weight: 700; color: #1f2a44; }
.tms-aca-xopt.is-tf .bi { margin: 0 !important; font-size: 1.15em; }
.tms-aca-xopt.is-tf.is-true.is-sel { border-color: #16794c; background: #e8f7ee; box-shadow: 0 0 0 1px #16794c inset; color: #11623d; }
.tms-aca-xopt.is-tf.is-false.is-sel { border-color: #c0392b; background: #fdeeee; box-shadow: 0 0 0 1px #c0392b inset; color: #a32e22; }
.tms-aca-xfill, .tms-aca-xtext { max-width: 520px; padding: .6em .85em; border: 1.5px solid #dfe4ee; border-radius: 12px; font-size: 1.02em; }
.tms-aca-xfill { height: auto; min-height: 3em; }
textarea.tms-aca-xtext { max-width: none; }
.tms-aca-xfill:focus, .tms-aca-xtext:focus { border-color: #2744b8; box-shadow: 0 0 0 3px rgba(39, 68, 184, .14); }

/* kết quả */
.tms-aca-xhero { margin-bottom: 1rem; padding: 1.25rem 1rem; border: 1px solid #e3e7f1; border-radius: 16px; background: #f5f7fd; }
.tms-aca-xhero.is-pass { border-color: #bfe6cf; background: linear-gradient(135deg, #eafaf1, #f6fcf9); }
.tms-aca-xhero.is-fail { border-color: #f3c7c7; background: linear-gradient(135deg, #fdf0f0, #fff8f8); }
.tms-aca-xhero.is-wait { border-color: #f2dfae; background: #fffaf0; }
.tms-aca-xfeedback { margin-bottom: 1rem; padding: .85em 1em; border: 1px solid #e3e7f1; border-radius: 12px; background: #fafbfe; font-size: .95em; }
.tms-aca-xq.is-correct { border-left: 4px solid #2f9e6a; }
.tms-aca-xq.is-wrong { border-left: 4px solid #d65a4a; }
.tms-aca-xans { margin-top: .6rem; padding: .7em .9em; border: 1.5px solid #dfe4ee; border-radius: 12px; background: #fff; }
.tms-aca-xans.is-correct { border-color: #a7dcc0; background: #f0faf4; }
.tms-aca-xans.is-wrong { border-color: #f0b8b0; background: #fff5f3; }
.tms-aca-xans.is-key { border-style: dashed; border-color: #a7dcc0; background: #f7fcf9; }
.tms-aca-xans-label { margin-bottom: .2em; font-size: .78em; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #6b7690; }
.tms-aca-xans-text { font-size: 1.05em; font-weight: 600; color: #14213d; overflow-wrap: anywhere; white-space: pre-wrap; }
.tms-aca-xans-text.is-empty { font-weight: 500; font-style: italic; color: #8a93a8; }
.tms-aca-xans-note { margin-top: .35em; font-size: .9em; color: #5b6478; }
.tms-aca-xq-head .badge { display: inline-flex; align-items: center; gap: .3em; font-size: 1em; }
.tms-aca-xq-head .badge .bi { margin: 0 !important; }

/* giới thiệu: dòng thông tin thoáng hơn */
.tms-aca-xintro ul > li { display: flex; align-items: baseline; gap: .6em; padding: .3em 0; }
.tms-aca-xintro ul > li > .bi { flex: none; margin: 0 !important; }

/* nút cỡ chữ A- / A+ */
.tms-aca-fs { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid #e3e7f1; border-radius: 10px; background: #fff; font-size: 14px; line-height: 1; }
.tms-aca-fs-btn, .tms-aca-fs-val { display: inline-flex; align-items: baseline; justify-content: center; height: 30px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #5b6478; cursor: pointer; transition: background .15s ease, color .15s ease; }
.tms-aca-fs-btn { width: 36px; align-items: center; gap: 1px; }
.tms-aca-fs-val { min-width: 34px; align-items: center; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tms-aca-fs-btn:hover:not(:disabled), .tms-aca-fs-val:hover:not(:disabled) { background: #eef2ff; color: #2744b8; }
.tms-aca-fs-btn:disabled, .tms-aca-fs-val:disabled { opacity: .4; cursor: default; }
.tms-aca-fs-btn:focus-visible, .tms-aca-fs-val:focus-visible { outline: 2px solid #2744b8; outline-offset: 1px; }
.tms-aca-fs-a { font-weight: 800; }
.tms-aca-fs-down .tms-aca-fs-a { font-size: 13px; }
.tms-aca-fs-up .tms-aca-fs-a { font-size: 19px; }
.tms-aca-fs-sign { font-size: 12px; font-weight: 800; transform: translateY(-3px); }

@media (max-width: 575.98px) {
  .tms-aca-xbar { padding: .5rem .6rem; }
  .tms-aca-xnav-row { flex-direction: column; align-items: stretch; gap: .5rem; }
  .tms-aca-xprogress { flex-direction: row; align-items: center; gap: .6rem; }
  .tms-aca-xprogress-text { flex: none; }
  .tms-aca-xprogress-track { flex: 1 1 auto; }
  .tms-aca-xnav { flex-wrap: nowrap; overflow-x: auto; padding: 4px 4px 6px 0; scrollbar-width: thin; }
  .tms-aca-xq { padding: .85rem .8rem 1rem; scroll-margin-top: 170px; }
  .tms-aca-xq-prompt { font-size: 1.1em; }
}
@media (prefers-reduced-motion: reduce) {
  .tms-aca-xtimer.is-danger { animation: none; }
  .tms-aca-xq, .tms-aca-xopt, .tms-aca-xprogress-fill, .tms-aca-xchip { transition: none; }
}

/* ===== Màn học: DANH SÁCH PHÁT (bài viết có từ 2 video: một trình phát + danh sách, không xếp chồng nhiều trình phát) + mục lục kiểu danh sách phát (bài video có ảnh bìa + thời lượng) + huy hiệu bắt buộc (2026-11-13) ===== */
.tms-aca-lstrip-due { flex: none; padding: .12rem .6rem; border-radius: 999px; background: #e0f2fe; color: #075985; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.tms-aca-lstrip-due.is-soon { background: #fef3c7; color: #92400e; }
.tms-aca-lstrip-due.is-over { background: #fee2e2; color: #991b1b; }
.tms-academy-playlist { margin: 0 0 1rem; }
.tms-aca-pl { margin-top: .75rem; border: 1px solid rgba(15, 23, 42, .1); border-radius: 12px; background: #fff; overflow: hidden; }
.tms-aca-pl-head { display: flex; align-items: center; gap: .5rem; padding: .55rem .9rem; border-bottom: 1px solid rgba(15, 23, 42, .08); background: #f8fafc; font-weight: 600; color: #334155; }
.tms-aca-pl-count { margin-left: auto; padding: 0 .55rem; border-radius: 999px; background: #e2e8f0; color: #475569; font-size: .75rem; font-weight: 600; }
.tms-aca-pl-list { max-height: 340px; overflow-y: auto; }
.tms-aca-pl-item { display: flex; align-items: center; gap: .75rem; width: 100%; padding: .5rem .9rem; border: 0; border-bottom: 1px solid rgba(15, 23, 42, .06); background: #fff; text-align: left; cursor: pointer; }
.tms-aca-pl-item:last-child { border-bottom: 0; }
.tms-aca-pl-item:hover { background: #f1f5f9; }
.tms-aca-pl-item.on { background: #eef4ff; box-shadow: inset 3px 0 0 #2f6fed; }
.tms-aca-pl-thumb, .tms-aca-ol-thumb { position: relative; flex: none; display: flex; align-items: center; justify-content: center; width: 116px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #0f172a; color: #94a3b8; font-size: 1.4rem; }
.tms-aca-ol-thumb { width: 92px; margin-top: .05rem; font-size: 1.15rem; }
.tms-aca-pl-thumb img, .tms-aca-ol-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tms-aca-pl-dur { position: absolute; right: 4px; bottom: 4px; padding: 0 .35rem; border-radius: 4px; background: rgba(0, 0, 0, .78); color: #fff; font-size: .7rem; font-weight: 600; line-height: 1.45; font-variant-numeric: tabular-nums; }
.tms-aca-pl-now { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(47, 111, 237, .55); color: #fff; font-size: 1.5rem; }
.tms-aca-pl-text { flex: 1 1 auto; min-width: 0; display: flex; gap: .5rem; align-items: baseline; }
.tms-aca-pl-n { flex: none; width: 1.3rem; color: #64748b; font-size: .8rem; font-weight: 600; }
.tms-aca-pl-title { overflow-wrap: anywhere; font-size: .92rem; line-height: 1.3; color: #1e293b; }
.tms-aca-pl-item.on .tms-aca-pl-title { font-weight: 600; color: #1d3f9c; }
.tms-aca-pl-item.seen:not(.on) .tms-aca-pl-title { color: #64748b; }
@media (max-width: 575.98px) {
  .tms-aca-pl-thumb { width: 92px; }
  .tms-aca-pl-item { padding: .45rem .7rem; gap: .6rem; }
}

/* ===== TRANG CHỦ HỌC VIÊN 2.0 (2026-11-13: "cải tiến giao diện home chuyên nghiệp hơn nữa, đang đơn điệu quá"): thẻ nổi bật có hình thật, bảng học tập một khối, huy hiệu dạng viên, tiêu đề mục đồng nhất,
   thẻ danh mục có ô biểu tượng màu, thẻ khoá có hình video + siêu dữ liệu + nút phát. Giữ nguyên các lớp cũ (tms-aca-welcome, tms-academy-stats, tms-academy-tile, tms-academy-ccard ...). ===== */

/* ---- lời chào + thẻ nổi bật */
.tms-aca-welcome { gap: 2rem; padding: 1.75rem 2rem; border-radius: 22px; align-items: center;
  background: radial-gradient(900px 340px at 92% -30%, rgba(255, 255, 255, .22), transparent 62%), radial-gradient(520px 260px at -5% 120%, rgba(255, 255, 255, .12), transparent 60%), linear-gradient(120deg, #2a3fc2 0%, #5a4be0 55%, #8b5cf6 100%);
  box-shadow: 0 16px 36px rgba(52, 70, 190, .3); }
.tms-aca-welcome.mood-warn { background: radial-gradient(900px 340px at 92% -30%, rgba(255, 255, 255, .22), transparent 62%), linear-gradient(120deg, #c2410c 0%, #f08c00 100%); box-shadow: 0 16px 36px rgba(217, 72, 15, .3); }
.tms-aca-welcome.mood-fire { background: radial-gradient(900px 340px at 92% -30%, rgba(255, 255, 255, .22), transparent 62%), linear-gradient(120deg, #e8590c 0%, #d6336c 100%); box-shadow: 0 16px 36px rgba(214, 51, 108, .28); }
.tms-aca-welcome.has-feature .tms-aca-welcome-text { flex: 1 1 42%; max-width: none; }
.tms-aca-welcome-title { font-size: 2rem; line-height: 1.15; letter-spacing: -.02em; }
.tms-aca-welcome-sub { margin-bottom: 1.1rem; font-size: 1rem; line-height: 1.5; }
.tms-aca-wchips { display: flex; flex-wrap: wrap; gap: .5rem; }
.tms-aca-wchip { display: inline-flex; align-items: center; gap: .4rem; padding: .32rem .8rem; border-radius: 999px; background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .24); font-size: .82rem; font-weight: 650; color: #fff; }
.tms-aca-wchip i { opacity: .9; }
.tms-aca-wchip.on i { color: #ffd27a; opacity: 1; }
.tms-aca-wchip.warn { background: rgba(255, 244, 214, .28); border-color: rgba(255, 244, 214, .5); }
.tms-aca-feature { position: relative; z-index: 1; flex: 0 1 470px; display: flex; min-width: 0; background: #fff; color: var(--aca-ink); border-radius: 18px; overflow: hidden; cursor: pointer; box-shadow: 0 20px 44px rgba(8, 16, 80, .38); transition: transform .18s ease, box-shadow .18s ease; }
.tms-aca-feature:hover, .tms-aca-feature:focus-visible { transform: translateY(-3px); box-shadow: 0 26px 52px rgba(8, 16, 80, .45); outline: none; }
.tms-aca-feature:focus-visible { box-shadow: 0 0 0 3px rgba(255, 255, 255, .85), 0 26px 52px rgba(8, 16, 80, .45); }
.tms-aca .tms-aca-feature.tms-academy-continue,
.tms-atlas .tms-aca-feature.tms-academy-continue { border: 0; border-radius: 18px; box-shadow: 0 20px 44px rgba(8, 16, 80, .38); }
.tms-aca-feature-media { position: relative; flex: 0 0 43%; min-height: 200px; background: #0f172a; }
.tms-aca-feature-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tms-aca-feature-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 15, 40, 0) 55%, rgba(8, 15, 40, .5)); pointer-events: none; }
.tms-aca-feature-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 3.2rem; color: rgba(255, 255, 255, .85); }
.tms-aca-feature-play { position: absolute; z-index: 1; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .96); color: #2744b8; font-size: 1.8rem; box-shadow: 0 8px 22px rgba(0, 0, 0, .34); transition: transform .18s ease; }
.tms-aca-feature:hover .tms-aca-feature-play { transform: scale(1.1); }
.tms-aca-feature-time { position: absolute; z-index: 1; right: 8px; bottom: 8px; padding: .1rem .55rem; border-radius: 999px; background: rgba(8, 15, 40, .72); color: #fff; font-size: .72rem; font-weight: 600; }
.tms-aca-feature-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: .3rem; padding: 1rem 1.2rem; }
.tms-aca-feature-kicker { font-size: .7rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--aca-accent); }
.tms-aca-feature-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 1.14rem; font-weight: 750; line-height: 1.25; letter-spacing: -.01em; }
.tms-aca-feature-sub { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .85rem; line-height: 1.4; color: var(--aca-muted); }
.tms-aca-feature-prog { margin-top: .35rem; }
.tms-aca-feature-cta { align-self: flex-start; margin-top: .55rem; padding: .45rem 1.05rem; border: 0; border-radius: 10px; background: linear-gradient(120deg, var(--aca-accent), var(--aca-accent2)); color: #fff; font-weight: 700; box-shadow: 0 8px 18px rgba(52, 84, 209, .32); }
.tms-aca-feature:hover .tms-aca-feature-cta { filter: brightness(1.08); color: #fff; }

/* ---- bảng học tập: MỘT khối ba ngăn (thay ba hộp trắng rời) */
.tms-aca .tms-academy-stats > .row,
.tms-atlas .tms-academy-stats > .row { --bs-gutter-x: 0; --bs-gutter-y: 0; margin: 0; background: #fff; border: 1px solid var(--aca-line); border-radius: 18px; box-shadow: var(--aca-shadow); overflow: hidden; }
.tms-aca .tms-academy-stats > .row > [class*="col"],
.tms-atlas .tms-academy-stats > .row > [class*="col"] { padding: 0; }
.tms-aca .tms-academy-stat,
.tms-atlas .tms-academy-stat { height: 100%; padding: 1.05rem 1.3rem; border: 0; border-radius: 0; background: transparent; gap: 1rem; }
.tms-aca .tms-academy-stats > .row > [class*="col"] + [class*="col"] .tms-academy-stat,
.tms-atlas .tms-academy-stats > .row > [class*="col"] + [class*="col"] .tms-academy-stat { border-left: 1px solid var(--aca-line); }
.tms-aca .tms-academy-stat-icon,
.tms-atlas .tms-academy-stat-icon { width: 50px; height: 50px; border-radius: 15px; font-size: 1.4rem; background: #eef1fb; color: #7d8bb3; }
.tms-aca .tms-academy-stats > .row > :nth-child(1) .tms-academy-stat-icon,
.tms-atlas .tms-academy-stats > .row > :nth-child(1) .tms-academy-stat-icon { background: #fff4e5; color: #e8890c; }
.tms-aca .tms-academy-stats > .row > :nth-child(1) .tms-academy-stat-icon.on,
.tms-atlas .tms-academy-stats > .row > :nth-child(1) .tms-academy-stat-icon.on { background: linear-gradient(135deg, #ffb340, #f97316); color: #fff; box-shadow: 0 8px 18px rgba(249, 115, 22, .35); }
.tms-aca .tms-academy-stats > .row > :nth-child(2) .tms-academy-stat-icon,
.tms-atlas .tms-academy-stats > .row > :nth-child(2) .tms-academy-stat-icon { background: #e8f0ff; color: #3454d1; }
.tms-aca .tms-academy-stat-num,
.tms-atlas .tms-academy-stat-num { font-size: 1.65rem; letter-spacing: -.02em; color: var(--aca-ink); }
.tms-aca .tms-academy-week-bar,
.tms-atlas .tms-academy-week-bar { background: #eef1fb; border-radius: 6px; }
.tms-aca .tms-academy-week-bar > div.on,
.tms-atlas .tms-academy-week-bar > div.on { background: linear-gradient(180deg, var(--aca-accent2), var(--aca-accent)); border-radius: 6px 6px 0 0; }
@media (max-width: 991.98px) {
  .tms-aca .tms-academy-stats > .row > [class*="col"] + [class*="col"] .tms-academy-stat,
.tms-atlas .tms-academy-stats > .row > [class*="col"] + [class*="col"] .tms-academy-stat { border-left: 0; border-top: 1px solid var(--aca-line); }
  .tms-aca .tms-academy-stats > .row > .col-6,
.tms-atlas .tms-academy-stats > .row > .col-6 { width: 100%; }
}

/* ---- huy hiệu dạng viên cuộn ngang (không còn lưới ô đứt nét trống) */
.tms-aca .tms-academy-stats .tms-academy-badges.compact,
.tms-atlas .tms-academy-stats .tms-academy-badges.compact { display: flex; flex-wrap: nowrap; gap: .65rem; overflow-x: auto; padding: .15rem .15rem .6rem; scrollbar-width: thin; }
.tms-aca .tms-academy-badges.compact .tms-academy-badge,
.tms-atlas .tms-academy-badges.compact .tms-academy-badge { flex: 0 0 auto; display: grid; grid-template-columns: 40px auto; grid-template-rows: auto auto; align-items: center; column-gap: .65rem; row-gap: .1rem; min-width: 176px; padding: .5rem .95rem .5rem .55rem; text-align: left; opacity: 1; border: 1px solid var(--aca-line); border-radius: 15px; background: #fff; box-shadow: var(--aca-shadow); }
.tms-aca .tms-academy-badges.compact .tms-academy-badge-icon,
.tms-atlas .tms-academy-badges.compact .tms-academy-badge-icon { grid-row: 1 / span 2; width: 40px; height: 40px; margin: 0; font-size: 1.15rem; background: #eef1fb; color: #9aa6c6; }
.tms-aca .tms-academy-badges.compact .tms-academy-badge.earned,
.tms-atlas .tms-academy-badges.compact .tms-academy-badge.earned { border-color: #f2d27a; background: linear-gradient(120deg, #fffaf0, #fff); }
.tms-aca .tms-academy-badges.compact .tms-academy-badge.earned .tms-academy-badge-icon,
.tms-atlas .tms-academy-badges.compact .tms-academy-badge.earned .tms-academy-badge-icon { background: linear-gradient(135deg, #ffcf4a, #f59f00); color: #fff; box-shadow: 0 6px 14px rgba(245, 159, 0, .35); }
.tms-aca .tms-academy-badges.compact .tms-academy-badge-prog,
.tms-atlas .tms-academy-badges.compact .tms-academy-badge-prog { grid-column: 2; margin-top: .1rem; height: 5px; background: #e6eaf6; }
.tms-aca .tms-academy-badges.compact .tms-academy-badge-prog > div,
.tms-atlas .tms-academy-badges.compact .tms-academy-badge-prog > div { background: linear-gradient(90deg, var(--aca-accent), var(--aca-accent2)); border-radius: 999px; }

/* ---- tiêu đề mục đồng nhất */
.tms-aca-sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .7rem; margin: 0 0 .85rem; }
.tms-aca-sec-title { display: flex; align-items: center; gap: .6rem; margin: 0; font-size: 1.18rem; font-weight: 750; letter-spacing: -.015em; color: var(--aca-ink); }
.tms-aca-sec-title i { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: #e8edfd; color: var(--aca-accent); font-size: 1rem; }
.tms-aca-sec-count { padding: .08rem .6rem; border-radius: 999px; background: #e8edfd; color: #2744b8; font-size: .74rem; font-weight: 700; }
.tms-aca-sec-sub { font-size: .86rem; color: var(--aca-muted); }

/* ---- viên danh mục (hàng gọn khi không có thanh bên) */
.tms-aca-kid { display: inline-flex; align-items: center; padding: .3rem .8rem; border: 1px solid var(--aca-line); border-radius: 999px; background: #fff; font-size: .85rem; font-weight: 600; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.tms-aca-kid:hover, .tms-aca-kid:focus-visible { background: #eef2ff; border-color: #c7d2fb; outline: none; }

/* ---- thẻ khoá: hình thật (video đầu khoá nếu chưa có ảnh bìa), nút phát khi rê chuột, siêu dữ liệu có biểu tượng */
.tms-aca .tms-academy-ccard,
.tms-atlas .tms-academy-ccard { box-shadow: var(--aca-shadow); }
.tms-aca .tms-academy-ccover::after,
.tms-atlas .tms-academy-ccover::after { content: ""; position: absolute; inset: auto 0 0 0; height: 46%; background: linear-gradient(180deg, rgba(8, 15, 40, 0), rgba(8, 15, 40, .5)); pointer-events: none; }
.tms-aca .tms-academy-ccover-time,
.tms-atlas .tms-academy-ccover-time { z-index: 1; }
.tms-aca .tms-academy-ccover-top,
.tms-atlas .tms-academy-ccover-top { z-index: 1; }
.tms-aca .tms-academy-bm,
.tms-atlas .tms-academy-bm { z-index: 2; }
.tms-aca-cplay { position: absolute; z-index: 1; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .96); color: #2744b8; font-size: 1.6rem; box-shadow: 0 8px 20px rgba(0, 0, 0, .3); opacity: 0; transform: scale(.82); transition: opacity .18s ease, transform .18s ease; }
.tms-academy-ccard:hover .tms-aca-cplay, .tms-academy-ccard:focus-visible .tms-aca-cplay { opacity: 1; transform: none; }
.tms-aca-cmeta { display: flex; flex-wrap: wrap; gap: .2rem .85rem; }
.tms-aca-cmeta i { margin-right: .3rem; color: #8a97b8; }
.tms-aca .tms-academy-ctitle,
.tms-atlas .tms-academy-ctitle { font-size: 1.02rem; }

/* ---- việc cần học / lớp của tôi / lộ trình: bo tròn + đổ bóng cùng nhịp với các khối khác */
.tms-aca .tms-academy-todo,
.tms-atlas .tms-academy-todo { border: 1px solid var(--aca-line) !important; border-left: 5px solid #f59f00 !important; border-radius: 16px; box-shadow: var(--aca-shadow); overflow: hidden; }
.tms-aca .tms-academy-todo.border-danger,
.tms-atlas .tms-academy-todo.border-danger { border-left-color: #e03131 !important; }
.tms-aca .tms-academy-myclass,
.tms-atlas .tms-academy-myclass { border: 1px solid var(--aca-line); border-radius: 16px; box-shadow: var(--aca-shadow) !important; transition: transform .18s ease, box-shadow .18s ease; }
.tms-aca .tms-academy-myclass:hover,
.tms-atlas .tms-academy-myclass:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(24, 39, 75, .14) !important; }
.tms-aca .tms-academy-path,
.tms-atlas .tms-academy-path { border: 1px solid var(--aca-line); border-radius: 16px; box-shadow: var(--aca-shadow); }

@media (max-width: 991.98px) {
  .tms-aca-welcome { flex-direction: column; align-items: stretch; gap: 1.25rem; padding: 1.4rem 1.4rem 1.5rem; }
  .tms-aca-welcome.has-feature .tms-aca-welcome-text { flex: none; }
  .tms-aca-feature { flex: none; width: 100%; }
}
@media (max-width: 575.98px) {
  .tms-aca-welcome-title { font-size: 1.5rem; }
  .tms-aca-feature { flex-direction: column; }
  .tms-aca-feature-media { flex: none; width: 100%; min-height: 0; aspect-ratio: 16 / 9; }
}
@media (prefers-reduced-motion: reduce) {
  .tms-aca-feature, .tms-aca-feature-play, .tms-aca-cplay, .tms-aca .tms-academy-tile, .tms-aca-tile-go, .tms-aca .tms-academy-myclass,
.tms-atlas .tms-academy-tile,
.tms-atlas .tms-academy-myclass { transition: none; }
}

/* ---- ô chờ (chưa có ảnh bìa) có hoạ tiết thay vì màu trơn */
.tms-aca .tms-academy-ccover-ph,
.tms-atlas .tms-academy-ccover-ph { position: relative; overflow: hidden; }
.tms-aca-feature-ph { overflow: hidden; }
.tms-aca .tms-academy-ccover-ph::before, .tms-aca-feature-ph::before,
.tms-atlas .tms-academy-ccover-ph::before { content: ""; position: absolute; left: -18%; top: -70%; width: 80%; aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, .13); }
.tms-aca .tms-academy-ccover-ph::after, .tms-aca-feature-ph::after,
.tms-atlas .tms-academy-ccover-ph::after { content: ""; position: absolute; right: -14%; bottom: -60%; width: 62%; aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, .09); }
.tms-aca .tms-academy-ccover-ph > i, .tms-aca-feature-ph > i,
.tms-atlas .tms-academy-ccover-ph > i { position: relative; z-index: 1; }

/* ===== THƯ VIỆN HỌC TẬP (2026-11-21; user: "một trang chia thành các section, liệt kê nhóm con, khoá học, bài học trực quan, đến tầng bài học") =====
   Thay cây DANH MỤC ở thanh bên (hẹp 236px nên tên bị cắt, cây cao đẩy thanh bên). Section gốc dùng .tms-aca-sec (màu theo catalog); nhóm con / cháu là tiêu đề thụt vào; mỗi khoá là thẻ có sẵn danh sách bài.
   Tên nhóm / khoá / bài luôn XUỐNG DÒNG, không cắt "…". */
.tms-aca-lib-tools { gap: .6rem .9rem; }
.tms-aca-lib-search { width: 300px; max-width: 100%; }
.tms-aca-chips.tms-aca-lib-chips { margin: 0; gap: 6px; }
.tms-aca-lib-chips .tms-aca-chip { padding: .22rem .75rem; font-size: .8rem; }
.tms-aca-lib-fold { flex: none; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--aca-muted); font-size: .8rem; }
.tms-aca-lib-fold:hover { background: rgba(0, 0, 0, .07); color: var(--aca-ink); }
.tms-aca-lib-fold.sm { width: 24px; height: 24px; font-size: .72rem; }
.tms-aca-lib-fold:focus-visible, .tms-aca-lib-catlink:focus-visible, .tms-aca-lib-chead:focus-visible, .tms-aca-lib-lesson:focus-visible, .tms-aca-lib-more:focus-visible { outline: 2px solid var(--aca-accent); outline-offset: 1px; }
.tms-aca-lib-catlink { color: inherit; text-decoration: none; }
.tms-aca-lib-catlink:hover { color: var(--sec-fg, var(--aca-accent)); text-decoration: underline; }
.tms-aca-lib-cat .tms-aca-sec-ttl .tms-aca-sec-title { overflow-wrap: anywhere; }

/* tiêu đề nhóm con (d1) / nhóm cháu (d2) */
.tms-aca-lib-group { display: flex; align-items: center; gap: .5rem; margin: 1.25rem 0 .7rem; padding: .35rem .7rem .35rem .35rem; border-left: 4px solid var(--g, #9aa6c6); border-radius: 0 10px 10px 0; background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .05); }
.tms-aca-lib-group:first-child { margin-top: 0; }
.tms-aca-lib-group.d2 { margin-left: 1.25rem; border-left-width: 3px; font-size: .93rem; }
.tms-aca-lib-gico { flex: none; color: var(--g, #9aa6c6); font-size: 1.05rem; }
.tms-aca-lib-gname { flex: 1 1 auto; min-width: 0; font-weight: 650; color: var(--aca-ink); overflow-wrap: anywhere; line-height: 1.3; }
.tms-aca-lib-gcount { flex: none; font-size: .76rem; font-weight: 600; color: var(--aca-muted); white-space: nowrap; }
.tms-aca-lib-cwrap + .tms-aca-lib-group { margin-top: 1.6rem; }
.tms-aca-lib-cwrap.d2 { margin-left: 1.25rem; }

/* thẻ khoá + danh sách bài */
.tms-aca-lib-course { height: 100%; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--aca-line, #e4e9f4); border-radius: 14px; box-shadow: var(--aca-shadow); overflow: hidden; }
.tms-aca-lib-course.is-done { border-color: #bfe3cf; }
.tms-aca-lib-chead { display: flex; gap: .8rem; padding: .8rem .9rem .6rem; cursor: pointer; }
.tms-aca-lib-chead:hover .tms-aca-lib-ctitle { color: var(--aca-accent); }
.tms-aca-lib-thumb { flex: none; width: 92px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: #e9ecef; align-self: flex-start; }
.tms-aca-lib-thumb img, .tms-aca-lib-ph { width: 100%; height: 100%; display: block; object-fit: cover; }
.tms-aca-lib-ph { display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, .88); font-size: 1.5rem; }
.tms-aca-lib-thumb.is-locked img, .tms-aca-lib-thumb.is-locked .tms-aca-lib-ph { filter: grayscale(.85); }
.tms-aca-lib-cmain { flex: 1 1 auto; min-width: 0; }
.tms-aca-lib-ctitle { font-size: .96rem; font-weight: 700; line-height: 1.3; color: var(--aca-ink); overflow-wrap: anywhere; transition: color .15s ease; }
.tms-aca-lib-cbadges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: .25rem; }
.tms-aca-lib-cbadges:empty { display: none; }
.tms-aca-lib-cbadges .badge { font-weight: 600; }
.tms-aca-lib-cmeta { margin: .25rem 0 .35rem; font-size: .78rem; color: var(--aca-muted); }
.tms-aca-lib-lessons { padding: .2rem .5rem .3rem; border-top: 1px solid #eef1f8; }
.tms-aca-lib-lsec { display: flex; align-items: center; gap: .4rem; padding: .55rem .5rem .2rem; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--aca-muted); }
.tms-aca-lib-lsec span { overflow-wrap: anywhere; }
.tms-aca-lib-lesson { width: 100%; display: flex; align-items: flex-start; gap: .55rem; padding: .3rem .5rem; border: 0; border-radius: 8px; background: transparent; text-align: left; font-size: .86rem; color: var(--aca-ink); }
.tms-aca-lib-lesson:hover:not(:disabled) { background: var(--aca-soft); }
.tms-aca-lib-lesson:disabled { color: #8a94ad; cursor: not-allowed; }
.tms-aca-lib-lesson.st-done .tms-aca-lib-lname { color: #6b7894; }
.tms-aca-lib-lname { flex: 1 1 auto; min-width: 0; padding-top: 2px; line-height: 1.35; overflow-wrap: anywhere; }
.tms-aca-lib-ldur { flex: none; padding-top: 3px; font-size: .74rem; color: var(--aca-muted); white-space: nowrap; }
.tms-aca-lib-lst { flex: none; padding-top: 3px; font-size: .9rem; }
.tms-aca-ltype.sm { width: 24px; height: 24px; border-radius: 7px; font-size: .78rem; }
.tms-aca-lib-more { margin: auto .5rem .55rem; padding: .3rem .6rem; border: 0; border-radius: 8px; background: transparent; color: var(--aca-accent); font-size: .8rem; font-weight: 600; text-align: left; }
.tms-aca-lib-more:hover { background: var(--aca-soft); }
.tms-aca-lib-more i { margin-right: .35rem; }
@media (max-width: 575.98px) {
  .tms-aca-lib-search { width: 100%; }
  .tms-aca-lib-thumb { width: 72px; }
  .tms-aca-lib-group.d2, .tms-aca-lib-cwrap.d2 { margin-left: .5rem; }
}

/* ===== THẺ LỚP CÓ HỒ SƠ + ĐẦU TRANG LỚP (2026-11-13: "ô lớp của tôi đã có profile chưa? nếu chưa thì nên hiển thị đẹp hơn") ===== */
.tms-aca .tms-aca-cls.tms-aca-classcard,
.tms-atlas .tms-aca-cls.tms-aca-classcard { display: flex; flex-direction: column; padding: 0; overflow: hidden; border-radius: 18px; }
.tms-aca-cls-banner { position: relative; padding: 14px 16px; color: #fff; overflow: hidden; }
.tms-aca-cls-banner::before, .tms-aca-clshead-banner::before { content: ""; position: absolute; right: -40px; top: -60px; width: 170px; height: 170px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.tms-aca-cls-banner::after, .tms-aca-clshead-banner::after { content: ""; position: absolute; right: 70px; bottom: -80px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.tms-aca-cls-banner > * { position: relative; z-index: 1; }
.tms-aca-cls-emblem { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .38); font-weight: 800; font-size: 1.02rem; letter-spacing: .02em; color: #fff; }
.tms-aca-cls-emblem.lg { flex: none; width: 66px; height: 66px; border-radius: 19px; font-size: 1.55rem; }
.tms-aca-cls-status { position: absolute; right: 12px; top: 12px; padding: .15rem .65rem; border-radius: 999px; background: #fff; color: #2744b8; font-size: .7rem; font-weight: 700; }
.st-open .tms-aca-cls-status { color: #15803d; }
.st-ended .tms-aca-cls-status { color: #64748b; }
.st-draft .tms-aca-cls-status { color: #b45309; }
.tms-aca-cls-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: .65rem 0 .3rem; color: #fff; font-size: 1.06rem; font-weight: 750; line-height: 1.3; overflow-wrap: anywhere; }
.tms-aca-cls-dates { font-size: .8rem; opacity: .93; }
.tms-aca-cls-dates i, .tms-aca-clshead-meta i, .tms-aca-cls-tl i.bi, .tms-aca-cls-mem i { margin-right: .4rem; }
.tms-aca-cls-body { flex: 1 1 auto; display: flex; flex-direction: column; gap: .7rem; padding: 14px 16px 16px; }
.tms-aca-cls-body .tms-aca-note { margin-top: 0; }
.tms-aca-cls-prog { display: flex; align-items: center; gap: .85rem; }
.tms-aca-cls-prog .min-w-0 { min-width: 0; }
.tms-aca-cls-ring { position: relative; flex: none; width: 54px; height: 54px; }
.tms-aca-cls-ring svg { display: block; }
.tms-aca-cls-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: .76rem; color: var(--aca-ink); }
.tms-aca-cls-count { font-weight: 700; color: var(--aca-ink); }
.tms-aca-cls-tl { display: flex; flex-direction: column; gap: .3rem; font-size: .8rem; color: var(--aca-muted); }
.tms-aca-cls-tlbar { height: 5px; border-radius: 999px; background: #e6eaf6; overflow: hidden; }
.tms-aca-cls-tlbar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--aca-accent), var(--aca-accent2)); }
.tms-aca-cls-tl.is-ended .tms-aca-cls-tlbar i { background: #94a3b8; }
.tms-aca-cls-tl.is-upcoming .tms-aca-cls-tlbar i { width: 0 !important; }
.tms-aca-cls-people { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .8rem; padding-top: .7rem; border-top: 1px solid var(--aca-line); font-size: .82rem; color: var(--aca-muted); }
.tms-aca-cls-mgr { display: inline-flex; align-items: center; gap: .5rem; min-width: 0; max-width: 100%; }
.tms-aca-cls-mgrname { display: inline-block; max-width: 170px; }
.tms-aca-cls-avs { display: inline-flex; flex: none; }
.tms-aca-cls-av { display: grid; place-items: center; width: 26px; height: 26px; margin-left: -7px; border: 2px solid #fff; border-radius: 50%; color: #fff; font-size: .64rem; font-weight: 700; }
.tms-aca-cls-av:first-child { margin-left: 0; }
.tms-aca-cls-foot { display: flex; flex-wrap: wrap; gap: 8px; }
.tms-aca-cls-foot:empty { display: none; }

/* đầu trang một lớp = hồ sơ lớp */
.tms-aca .tms-aca-clshead,
.tms-atlas .tms-aca-clshead { padding: 0; overflow: hidden; border: 1px solid var(--aca-line); border-radius: 20px; box-shadow: var(--aca-shadow); }
/* 2026-11-14 (user: "màu của lớp đang để đậm quá, cam đậm, header ở trên bg đậm quá"): nền đầu trang NHẠT = màu lớp pha trắng (--cls-rgb / --cls-rgb2 do TmsAcademyClassUi.softStyle đặt), chữ tối;
   màu đặc chỉ còn ở biểu tượng chữ cái. Thẻ lớp ở trang chủ vẫn dùng dải màu đặc. */
.tms-aca-clshead-banner { --cls-rgb: 52, 84, 209; --cls-rgb2: 124, 58, 237; position: relative; display: flex; align-items: center; gap: 1.15rem; padding: 1.4rem 1.6rem; color: var(--aca-ink, #1f2a44); border-bottom: 1px solid rgba(var(--cls-rgb), .16); overflow: hidden; }
.tms-aca-clshead-banner::before { background: rgba(var(--cls-rgb), .10); }
.tms-aca-clshead-banner::after { background: rgba(var(--cls-rgb2), .08); }
.tms-aca-clshead-banner .tms-aca-cls-emblem { color: #fff; border-color: rgba(255, 255, 255, .55); box-shadow: 0 6px 14px rgba(var(--cls-rgb), .28); }
.tms-aca-clshead-banner > * { position: relative; z-index: 1; }
.tms-aca-clshead-main { min-width: 0; }
.tms-aca-clshead-main h4 { color: var(--aca-ink, #1f2a44); font-size: 1.55rem; letter-spacing: -.02em; }
.tms-aca-clshead-meta { display: flex; flex-wrap: wrap; gap: .25rem 1.2rem; font-size: .9rem; color: var(--aca-muted, #66749a); }
.tms-aca-clshead-meta i { color: rgb(var(--cls-rgb)); }
.tms-aca-clshead-mgr { display: flex; align-items: center; gap: .6rem; margin-top: .75rem; font-size: .88rem; color: var(--aca-muted, #66749a); }
.tms-aca-clshead-mgr .tms-aca-cls-av { border-color: #fff; }
.tms-aca-clshead .card-body { padding: 1.1rem 1.6rem 1.3rem; }
@media (max-width: 575.98px) {
  .tms-aca-clshead-banner { flex-direction: column; align-items: flex-start; padding: 1.15rem 1.2rem; }
  .tms-aca-clshead-main h4 { font-size: 1.3rem; }
  .tms-aca-cls-mgrname { max-width: 120px; }
}

/* ---- KHOÁ TUA video (2026-11-13): vùng chưa học trên thanh tua tối + vạch chéo; chú thích khi rê chuột; dòng giải thích dưới video */
.tms-vp-lockzone { position: absolute; top: -1px; bottom: -1px; right: 0; border-radius: 0 2px 2px 0; background: repeating-linear-gradient(135deg, rgba(0, 0, 0, .42) 0 4px, rgba(255, 255, 255, .06) 4px 8px); pointer-events: none; }
.tms-vp-tip-lock { display: block; margin-top: 1px; font-size: .68rem; color: #ffd27a; white-space: nowrap; }
.tms-academy-seeklock { display: inline-block; margin-left: .35rem; color: #b45309; }

/* ---- HỎI ĐÁP bài học / lớp (2026-11-13): tms-academy-qa. Danh sách dạng hàng (hình chữ cái + tiêu đề + trích đoạn + thẻ trạng thái + số trả lời), form hỏi có gợi ý câu tương tự, chi tiết câu hỏi + trả lời, thanh kiểm duyệt */
.tms-aca-qa { --qa-line: var(--aca-line, #e4e9f4); --qa-ink: var(--aca-ink, #1f2a44); --qa-muted: var(--aca-muted, #66749a); --qa-soft: var(--aca-soft, #f4f6fc); --qa-accent: var(--aca-accent, var(--bs-primary, #3454d1)); color: var(--qa-ink); }
.tms-aca-qa-ctx { display: flex; align-items: flex-start; gap: .5rem; margin-bottom: .65rem; padding: .5rem .75rem; border-radius: 10px; background: var(--qa-soft); color: var(--qa-muted); font-size: .84rem; line-height: 1.35; }
.tms-aca-qa-ctx i { flex: none; margin-top: .1rem; color: var(--qa-accent); }
.tms-aca-qa-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-bottom: .75rem; }
.tms-aca-qa-chips { display: flex; flex-wrap: wrap; gap: .35rem; flex: 1 1 auto; min-width: 0; }
.tms-aca-qa-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .75rem; border: 1px solid var(--qa-line); border-radius: 999px; background: #fff; color: var(--qa-muted); font-size: .82rem; font-weight: 500; cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.tms-aca-qa-chip:hover { background: var(--qa-soft); color: var(--qa-ink); }
.tms-aca-qa-chip.on { background: var(--qa-accent); border-color: var(--qa-accent); color: #fff; }
.tms-aca-qa-chip-n { min-width: 1.25rem; padding: 0 .35rem; border-radius: 999px; background: rgba(0, 0, 0, .08); font-size: .72rem; line-height: 1.25rem; text-align: center; }
.tms-aca-qa-chip.on .tms-aca-qa-chip-n { background: rgba(255, 255, 255, .25); }
.tms-aca-qa-class { width: auto; max-width: 230px; }
.tms-aca-qa-empty { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: 2rem 1rem; border: 1px dashed var(--qa-line); border-radius: 14px; text-align: center; }
.tms-aca-qa-empty > i { font-size: 2rem; color: var(--qa-muted); opacity: .6; }
.tms-aca-qa-list { display: flex; flex-direction: column; border: 1px solid var(--qa-line); border-radius: 14px; overflow: hidden; background: #fff; }
.tms-aca-qa-row { display: flex; align-items: flex-start; gap: .8rem; padding: .8rem 1rem; cursor: pointer; transition: background .15s ease; }
.tms-aca-qa-row + .tms-aca-qa-row { border-top: 1px solid var(--qa-line); }
.tms-aca-qa-row:hover, .tms-aca-qa-row:focus-visible { background: var(--qa-soft); outline: none; }
.tms-aca-qa-row.pinned { background: #fffaf0; }
.tms-aca-qa-row.dim, .tms-aca-qa-thread.dim, .tms-aca-qa-post.dim { opacity: .72; }
.tms-aca-qa-av { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #64748b; color: #fff; font-size: .9rem; font-weight: 700; }
.tms-aca-qa-av.sm { width: 26px; height: 26px; font-size: .72rem; }
.tms-aca-qa-av.staff { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.tms-aca-qa-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.tms-aca-qa-title { font-weight: 600; color: var(--qa-ink); overflow-wrap: anywhere; }
.tms-aca-qa-prev { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--qa-muted); font-size: .86rem; overflow-wrap: anywhere; }
.tms-aca-qa-meta, .tms-aca-qa-byline { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; font-size: .78rem; color: var(--qa-muted); }
.tms-aca-qa-who { font-weight: 600; color: var(--qa-ink); }
.tms-aca-qa-who .bi-patch-check-fill { color: #0f766e; }
.tms-aca-qa-tag { display: inline-flex; align-items: center; gap: .25rem; padding: .08rem .5rem; border-radius: 999px; background: var(--qa-soft); border: 1px solid var(--qa-line); color: var(--qa-muted); font-size: .72rem; font-weight: 600; white-space: nowrap; }
.tms-aca-qa-tag.ok { background: #e7f7ef; border-color: #bfe8d3; color: #157347; }
.tms-aca-qa-tag.pin { background: #fff4d6; border-color: #f6dc97; color: #946200; }
.tms-aca-qa-tag.warn { background: #fdeaea; border-color: #f3c2c2; color: #b42318; }
.tms-aca-qa-tag.cls { background: #eef2ff; border-color: #d3dbfb; color: #3b4cb8; }
.tms-aca-qa-tag.staff { background: #e6f6f4; border-color: #bde5df; color: #0f766e; }
.tms-aca-qa-tag.clock { background: #eaf0ff; border-color: #cbd9fb; color: var(--qa-accent); cursor: pointer; }
.tms-aca-qa-tag.clock:hover { background: var(--qa-accent); color: #fff; }
.tms-aca-qa-count { flex: none; display: flex; flex-direction: column; align-items: center; min-width: 54px; padding: .3rem .4rem; border: 1px solid var(--qa-line); border-radius: 10px; color: var(--qa-muted); line-height: 1.1; }
.tms-aca-qa-count b { font-size: 1.05rem; color: var(--qa-ink); }
.tms-aca-qa-count small { font-size: .66rem; }
.tms-aca-qa-count.has { border-color: #cbd9fb; }
.tms-aca-qa-count.ok { background: #e7f7ef; border-color: #bfe8d3; }
.tms-aca-qa-count.ok b { color: #157347; }
.tms-aca-qa-pager { display: flex; align-items: center; justify-content: center; gap: .75rem; margin-top: .75rem; }
.tms-aca-qa-form, .tms-aca-qa-thread { padding: 1rem 1.1rem; border: 1px solid var(--qa-line); border-radius: 14px; background: #fff; }
.tms-aca-qa-quota { padding: .35rem .6rem; border-radius: 8px; background: var(--qa-soft); color: var(--qa-muted); }
.tms-aca-qa-quota.low { background: #fff4d6; color: #946200; }
.tms-aca-qa-similar { margin-top: .5rem; padding: .55rem .75rem; border: 1px solid #f6dc97; border-radius: 10px; background: #fffaf0; }
.tms-aca-qa-sim { display: block; padding: .15rem 0; color: var(--qa-ink); text-decoration: none; font-size: .88rem; overflow-wrap: anywhere; }
.tms-aca-qa-sim:hover { color: var(--qa-accent); text-decoration: underline; }
.tms-aca-qa-h { overflow-wrap: anywhere; font-size: 1.08rem; }
.tms-aca-qa-body { margin: .6rem 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.tms-aca-qa-acts { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding-top: .6rem; border-top: 1px solid var(--qa-line); }
.tms-aca-qa-acts.sm { gap: .2rem .9rem; padding-top: .35rem; border-top: 0; font-size: .8rem; }
.tms-aca-qa-post { display: flex; align-items: flex-start; gap: .65rem; padding: .8rem .9rem; margin-bottom: .6rem; border: 1px solid var(--qa-line); border-radius: 12px; background: #fff; }
.tms-aca-qa-post.staff { background: #f4fbfa; border-color: #cfe9e5; }
.tms-aca-qa-post.accepted { border-color: #86d3a8; box-shadow: 0 0 0 2px #d5f2e2; }
.tms-aca-qa-post-main { flex: 1 1 auto; min-width: 0; }
.tms-aca-qa-post .tms-aca-qa-body { margin: .1rem 0 .3rem; }
.tms-aca-qa-toggle { display: flex; align-items: center; gap: .75rem; width: 100%; padding: .85rem 1.1rem; border: 0; background: transparent; color: var(--aca-ink, #1f2a44); cursor: pointer; border-radius: inherit; }
.tms-aca-qa-toggle > i:first-child { font-size: 1.3rem; color: var(--aca-accent, var(--bs-primary, #3454d1)); }
.tms-aca-qa-toggle:hover { background: var(--aca-soft, #f4f6fc); }
@media (max-width: 575.98px) {
  .tms-aca-qa-row { gap: .55rem; padding: .7rem .75rem; }
  .tms-aca-qa-count { min-width: 44px; }
  .tms-aca-qa-class { max-width: 100%; flex: 1 1 100%; }
  .tms-aca-qa-ask { flex: 1 1 100%; }
  .tms-aca-qa-form, .tms-aca-qa-thread { padding: .85rem .8rem; }
}

/* ---- TRANG MỘT LỚP bố cục 2 cột (2026-11-14): GIỮA = Chương trình học -> Bài thi -> Thảo luận (dưới cùng), PHẢI = thanh bên dính khi cuộn (tiến độ, thông báo phân trang, sắp tới). Màu nhấn theo màu lớp (--cls-rgb đặt trên .tms-aca-clsgrid) */
.tms-aca-clsgrid { --cls-rgb: 52, 84, 209; --cls-rgb2: 124, 58, 237; }
.tms-aca-clssec + .tms-aca-clssec { margin-top: 1.5rem; }
.tms-academy-class-qa { scroll-margin-top: 96px; }
.tms-aca-qa { scroll-margin-top: 96px; }
.tms-aca-clsside { display: flex; flex-direction: column; gap: .85rem; }
@media (min-width: 992px) { .tms-aca-clsside { position: sticky; top: 92px; max-height: calc(100vh - 108px); overflow-y: auto; scrollbar-width: thin; padding: 2px; margin: -2px; } }
.tms-aca-clsw { padding: .95rem 1rem; background: #fff; border: 1px solid var(--aca-line, #e4e9f4); border-radius: 14px; box-shadow: var(--aca-shadow); }
.tms-aca-clsw-h { margin-bottom: .65rem; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--aca-muted, #66749a); }
.tms-aca-clsann { padding: .6rem .7rem; border: 1px solid var(--aca-line, #e4e9f4); border-left: 3px solid rgba(var(--cls-rgb), .35); border-radius: 10px; background: #fbfcff; }
.tms-aca-clsann.pinned { border-left-color: #f59e0b; background: #fffaf0; }
.tms-aca-clsann-t { font-size: .88rem; color: var(--aca-ink, #1f2a44); overflow-wrap: anywhere; }
.tms-aca-clsann-d { margin-bottom: .25rem; font-size: .72rem; color: var(--aca-muted, #66749a); }
.tms-aca-clsann-b { font-size: .84rem; color: var(--aca-ink, #1f2a44); white-space: pre-wrap; overflow-wrap: anywhere; }
.tms-aca-clspager { display: flex; align-items: center; justify-content: center; gap: .7rem; margin-top: .7rem; }
.tms-aca-clsnext { display: flex; align-items: flex-start; gap: .65rem; width: 100%; padding: .45rem .4rem; border: 0; border-radius: 10px; background: transparent; text-align: left; cursor: pointer; transition: background .15s ease; }
.tms-aca-clsnext:hover { background: var(--aca-soft, #f4f6fc); }
.tms-aca-clsnext-ico { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #eaf0ff; color: #3454d1; font-size: .95rem; }
.tms-aca-clsnext.tone-warn .tms-aca-clsnext-ico { background: #fff4d6; color: #b45309; }
.tms-aca-clsnext.tone-danger .tms-aca-clsnext-ico { background: #fdeaea; color: #b42318; }
.tms-aca-clsnext.tone-muted .tms-aca-clsnext-ico { background: #f1f3f9; color: #66749a; }
.tms-aca-clsnext-text { min-width: 0; display: flex; flex-direction: column; }
.tms-aca-clsnext-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--aca-ink, #1f2a44); font-size: .86rem; font-weight: 600; }
.tms-aca-clsnext-sub { color: var(--aca-muted, #66749a); font-size: .76rem; }
.tms-aca-clsnext.tone-danger .tms-aca-clsnext-sub { color: #b42318; }

/* ---- TRANG CHỦ HỌC VIÊN (2026-11-14, user: "section bài thi 2 cột to quá, không cân đối", "các section dạng card cho đẹp, header rõ ràng hơn"): mỗi mục là một THẺ (.tms-aca-sec) có THANH TIÊU ĐỀ
   (biểu tượng màu + tên + mô tả + số đếm + nút hành động); thân thẻ: .flush (hàng sát mép), .tint (nền nhạt để thẻ con nổi lên), mặc định có đệm. Màu nhấn từng mục qua --sec-fg / --sec-bg. */
.tms-aca-sec { --sec-fg: #2744b8; --sec-bg: #e8edfd; margin-bottom: 1.25rem; background: #fff; border: 1px solid var(--aca-line, #e4e9f4); border-radius: 16px; box-shadow: var(--aca-shadow); overflow: hidden; }
.tms-aca-sec.s-exam { --sec-fg: #2744b8; --sec-bg: #e8edfd; }
.tms-aca-sec.s-agenda, .tms-aca-sec.s-saved, .tms-aca-sec.s-badge { --sec-fg: #a85500; --sec-bg: #fff1dc; }
.tms-aca-sec.s-notice { --sec-fg: #0b6f8d; --sec-bg: #e1f3f8; }
.tms-aca-sec.s-class { --sec-fg: #6d28d9; --sec-bg: #f0e9ff; }
.tms-aca-sec.s-todo { --sec-fg: #b42318; --sec-bg: #fde8e8; }
.tms-aca-sec.s-path { --sec-fg: #17794a; --sec-bg: #e4f5ec; }
.tms-aca-sec.s-course, .tms-aca-sec.s-cat { --sec-fg: #0369a1; --sec-bg: #e0f2fe; }
.tms-aca-sec-bar { display: flex; align-items: center; flex-wrap: nowrap; gap: .5rem .8rem; padding: .8rem 1.1rem; border-bottom: 1px solid var(--aca-line, #e4e9f4); background: linear-gradient(90deg, var(--sec-bg) 0, #fff 42%); }
.tms-aca-sec-ico { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--sec-bg); color: var(--sec-fg); font-size: 1.15rem; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05); }
.tms-aca-sec-ttl { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.tms-aca-sec-ttl .tms-aca-sec-title { margin: 0; display: block; font-size: 1.05rem; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; color: var(--aca-ink, #1f2a44); }
.tms-aca-sec-ttl .tms-aca-sec-sub { margin-top: .1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; color: var(--aca-muted, #66749a); }
.tms-aca-sec-bar > .tms-aca-sec-count { flex: none; padding: .12rem .65rem; border-radius: 999px; background: var(--sec-bg); color: var(--sec-fg); font-size: .78rem; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05); }
.tms-aca-sec-bar > .tms-aca-sec-count.tone-danger { background: #d92d20; color: #fff; box-shadow: none; }
.tms-aca-sec-act { flex: none; display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .8rem; border: 1px solid var(--aca-line, #e4e9f4); border-radius: 999px; background: #fff; color: var(--aca-accent, #3454d1); font-size: .8rem; font-weight: 600; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.tms-aca-sec-act:hover { background: var(--aca-soft, #f4f6fc); border-color: var(--aca-accent, #3454d1); }
.tms-aca-sec-body { padding: 1rem 1.1rem; }
.tms-aca-sec-body.flush { padding: 0; }
.tms-aca-sec-body.tint { background: #f6f8fd; }
.tms-aca-sec-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .65rem 1.1rem; border-bottom: 1px solid var(--aca-line, #e4e9f4); background: #fbfcff; }
.tms-aca-glance .tms-aca-sec { height: 100%; margin-bottom: 0; }
.tms-academy-stats .tms-aca-sec { margin-bottom: 0; }
.tms-aca-sec-body.tint .tms-academy-badges.compact { padding-bottom: .35rem; }
.tms-aca-sec.s-todo.is-over { border-color: #f1b8b3; }
.tms-aca-sec .list-group-item { border-color: #eef1f8; }
/* hàng bài thi cần làm */
.tms-aca-exrow { --ex-fg: #2744b8; --ex-bg: #e8edfd; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: .85rem; padding: .75rem 1.1rem .75rem .95rem; border-left: 4px solid var(--ex-fg); cursor: pointer; transition: background .15s ease; }
.tms-aca-exrow + .tms-aca-exrow { border-top: 1px solid #eef1f8; }
.tms-aca-exrow:hover, .tms-aca-exrow:focus-visible { background: var(--aca-soft, #f4f6fc); outline: none; }
.tms-aca-exrow.t-warn { --ex-fg: #c2680a; --ex-bg: #fff1dc; }
.tms-aca-exrow.t-danger { --ex-fg: #c42b1c; --ex-bg: #fde8e8; }
.tms-aca-exrow.t-go { --ex-fg: #0b7a75; --ex-bg: #dff5f2; }
.tms-aca-exrow-ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--ex-bg); color: var(--ex-fg); font-size: 1.2rem; }
.tms-aca-exrow-main { min-width: 0; }
.tms-aca-exrow-title { display: flex; align-items: center; gap: .5rem; min-width: 0; color: var(--aca-ink, #1f2a44); font-size: .95rem; font-weight: 650; line-height: 1.3; }
.tms-aca-exrow-title > .text-truncate { min-width: 0; }
.tms-aca-exrow-sub { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .9rem; margin-top: .2rem; color: var(--aca-muted, #66749a); font-size: .78rem; }
.tms-aca-exrow-class { display: inline-flex; align-items: center; gap: .4rem; min-width: 0; max-width: 100%; }
.tms-aca-cls-emblem.xs { flex: none; width: 20px; height: 20px; border: 0; border-radius: 6px; font-size: .58rem; letter-spacing: 0; }
.tms-aca-exrow-meta { display: flex; flex-wrap: wrap; gap: .1rem .85rem; margin: 0; padding: 0; list-style: none; }
.tms-aca-exrow-meta li { display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
.tms-aca-exrow-meta i { color: var(--ex-fg); opacity: .85; }
.tms-aca-exrow-clock { min-width: 132px; text-align: right; }
.tms-aca-exrow-when { color: var(--ex-fg); font-size: .95rem; font-weight: 700; white-space: nowrap; }
.tms-aca-exrow-when i { margin-right: .35rem; }
.tms-aca-exrow-whensub { color: var(--aca-muted, #66749a); font-size: .74rem; white-space: nowrap; }
.tms-aca-exrow-bar { height: 4px; margin-top: .35rem; border-radius: 999px; background: rgba(0, 0, 0, .08); overflow: hidden; }
.tms-aca-exrow-bar i { display: block; height: 100%; border-radius: 999px; background: var(--ex-fg); }
.tms-aca-exrow-cta { flex: none; padding: .4rem .9rem; border: 0; border-radius: 9px; background: var(--ex-fg); color: #fff; font-size: .82rem; font-weight: 650; white-space: nowrap; }
.tms-aca-exrow-cta:hover { color: #fff; filter: brightness(1.08); }
.tms-aca-exmore { display: flex; align-items: center; justify-content: space-between; gap: .75rem; width: 100%; padding: .6rem 1.1rem; border: 0; border-top: 1px dashed #c5cdea; background: #fbfcff; color: var(--aca-muted, #66749a); font-size: .85rem; text-align: left; cursor: pointer; transition: background .15s ease; }
.tms-aca-exmore span { flex: none; color: var(--aca-accent, #3454d1); font-weight: 650; }
.tms-aca-exmore:hover { background: var(--aca-soft, #f4f6fc); }
@media (max-width: 767.98px) {
  .tms-aca-exrow { grid-template-columns: auto minmax(0, 1fr); row-gap: .6rem; }
  .tms-aca-exrow-clock { grid-column: 1 / -1; min-width: 0; text-align: left; }
  .tms-aca-exrow-cta { grid-column: 1 / -1; width: 100%; }
  .tms-aca-sec-bar { flex-wrap: wrap; padding: .75rem .9rem; }
  .tms-aca-sec-ttl .tms-aca-sec-sub { white-space: normal; }
  .tms-aca-sec-body { padding: .85rem .9rem; }
}

/* ---- TRANG "ĐÃ LƯU" (2026-11-14): hàng bài đã lưu (biểu tượng loại bài | tên + khoá | trạng thái | Học ngay | bỏ lưu) */
.tms-aca-saved .tms-aca-sec { margin-bottom: 1.25rem; }
.tms-aca-savedrow { display: flex; align-items: center; gap: .85rem; padding: .7rem 1.1rem; cursor: pointer; transition: background .15s ease; }
.tms-aca-savedrow + .tms-aca-savedrow { border-top: 1px solid #eef1f8; }
.tms-aca-savedrow:hover, .tms-aca-savedrow:focus-visible { background: var(--aca-soft, #f4f6fc); outline: none; }
.tms-aca-savedrow-ico { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #fff1dc; color: #a85500; font-size: 1.15rem; }
.tms-aca-savedrow-ico.done { background: #e4f5ec; color: #17794a; }
.tms-aca-savedrow-main { flex: 1 1 auto; min-width: 0; }
.tms-aca-savedrow-title { color: var(--aca-ink, #1f2a44); font-weight: 650; }
.tms-aca-savedrow-sub { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .4rem; min-width: 0; margin-top: .1rem; color: var(--aca-muted, #66749a); font-size: .8rem; }
.tms-aca-savedrow-x { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 9px; background: transparent; color: var(--aca-muted, #66749a); transition: background .15s ease, color .15s ease; }
.tms-aca-savedrow-x:hover { background: #fde8e8; color: #b42318; }
@media (max-width: 575.98px) { .tms-aca-savedrow { flex-wrap: wrap; } .tms-aca-savedrow-main { flex-basis: calc(100% - 60px); } .tms-aca-savedrow-go { margin-left: auto; } }

/* TMS Academy Studio - HỘP "ĐƠN ĐĂNG KÝ" (tab Học viên / khối chờ duyệt / tab Đăng ký của lớp; user 2026-11-14: "duyệt đăng ký ... hiển thị form mà học viên đã đăng ký chưa được rõ ràng, thậm chí đã là học viên được duyệt cũng cần xem lại form đăng ký").
   Đầu hộp (tên + trạng thái), 3 khối rõ ràng: thông tin người đăng ký / từng câu hỏi + câu trả lời theo loại câu / xử lý đơn; chân hộp có Duyệt - Từ chối khi đơn còn chờ. */
.tms-regv { display: flex; flex-direction: column; max-height: 92vh; overflow: hidden; }
.tms-regv-head { flex: none; display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; border-bottom: 1px solid #e3e8f2; background: #f6f8fc; }
.tms-regv-avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: #e4eaff; color: #3b4fb8; font-weight: 700; font-size: .95rem; letter-spacing: .02em; }
.tms-regv-ttl { flex: 1 1 auto; min-width: 0; }
.tms-regv-ttl h6 { font-size: 1.05rem; font-weight: 700; overflow-wrap: anywhere; }
.tms-regv-status { flex: none; font-size: .8rem; padding: .4em .7em; }
.tms-regv-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 1rem; }
.tms-regv-sec { margin-bottom: 1.1rem; }
.tms-regv-sec:last-child { margin-bottom: 0; }
.tms-regv-h { display: flex; align-items: center; gap: .4rem; margin: 0 0 .55rem; font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #5b6785; }
.tms-regv-h .bi { font-size: .95rem; color: #3b4fb8; }
.tms-regv-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem 1.25rem; margin: 0; padding: .7rem .85rem; border: 1px solid #e8ecf4; border-radius: 10px; background: #fbfcfe; }
.tms-regv-dl > div { min-width: 0; }
.tms-regv-dl > .wide { grid-column: 1 / -1; }
.tms-regv-dl dt { margin: 0 0 .1rem; font-size: .74rem; font-weight: 600; color: #7a86a3; }
.tms-regv-dl dd { margin: 0; font-size: .9rem; color: #1f2a44; overflow-wrap: anywhere; }
.tms-regv-qa { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.tms-regv-qa-item { padding: .65rem .8rem; border: 1px solid #e3e8f2; border-radius: 10px; background: #fff; }
.tms-regv-q { display: flex; align-items: flex-start; gap: .55rem; }
.tms-regv-qn { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 1.4rem; height: 1.4rem; margin-top: .05rem; border-radius: 50%; background: #eef1f8; color: #4b587a; font-size: .72rem; font-weight: 700; }
.tms-regv-ql { flex: 1 1 auto; min-width: 0; font-weight: 600; color: #1f2a44; overflow-wrap: anywhere; }
.tms-regv-qt { flex: none; margin-top: .1rem; padding: .05rem .5rem; border: 1px solid #dfe5f1; border-radius: 999px; font-size: .68rem; color: #7a86a3; white-space: nowrap; }
.tms-regv-a { margin: .45rem 0 0 1.95rem; font-size: .92rem; color: #1f2a44; }
.tms-regv-ans { white-space: pre-wrap; overflow-wrap: anywhere; }
.tms-regv-ans.long { padding: .55rem .7rem; border-left: 3px solid #b8c2dc; border-radius: 0 8px 8px 0; background: #f6f8fc; }
.tms-regv-chip { display: inline-block; margin: 0 .35rem .3rem 0; padding: .18rem .65rem; border-radius: 999px; background: #e7f0ff; color: #1b4fa8; font-size: .86rem; font-weight: 600; overflow-wrap: anywhere; }
.tms-regv-scale { display: inline-flex; align-items: center; gap: .3rem; }
.tms-regv-scale i { width: .72rem; height: .72rem; border-radius: 50%; background: #dfe5f1; }
.tms-regv-scale i.on { background: #f59f00; }
.tms-regv-scale b { margin-left: .3rem; }
.tms-regv-empty { padding: .8rem .9rem; border: 1px dashed #cfd7e8; border-radius: 10px; color: #7a86a3; font-size: .88rem; }
.tms-regv-foot { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem; padding: .65rem 1rem; border-top: 1px solid #e3e8f2; background: #fff; }
.tms-regv-note { flex: 1 1 200px; min-width: 0; }
/* tên người đăng ký bấm được + xem trước câu trả lời gọn ở khối chờ duyệt / tab Đăng ký */
.tms-regv-name { color: inherit; text-decoration: none; border-bottom: 1px dotted #8d99b8; }
.tms-regv-name:hover { color: #3b4fb8; border-bottom-color: #3b4fb8; }
.btn.tms-regv-open { color: #3b4fb8; text-transform: none; letter-spacing: 0; font-weight: 600; font-size: .82rem; }
.tms-regv-open:hover { text-decoration: underline !important; }
.tms-regv-prevcell { max-width: 360px; min-width: 200px; }
.tms-regv-prev { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tms-regv-clamp { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; white-space: pre-wrap; }
@media (max-width: 575.98px) {
  .tms-regv-dl { grid-template-columns: minmax(0, 1fr); }
  .tms-regv-a { margin-left: 0; }
  .tms-regv-q { flex-wrap: wrap; }
  .tms-regv-qt { margin-left: 1.95rem; }
}

/* TMS Academy - XEM LẠI BÀI ĐÃ THI (học viên): bài nói nghe lại + các phương án thực hành đã nộp (user 2026-11-14: "học viên thi xong phải xem lại được các trả lời của mình") */
.tms-academy-exam-reviewhead h6 { font-weight: 700; color: #1f2a44; }
.tms-academy-exam-myvoice audio { display: block; margin-top: .25rem; }
.tms-academy-exam-myopt { margin-top: .5rem; padding: .55rem .75rem; border: 1px solid #e3e8f2; border-radius: 8px; background: #fff; }
.tms-academy-exam-myopt:first-of-type { margin-top: .35rem; }
.tms-academy-exam-myopt-note { overflow-wrap: anywhere; }
.tms-academy-exam-waitnote { color: #6b5a1f; }
