/* ==========================================================================
   SOẠN THẢO VĂN BẢN HÀNH CHÍNH (NGHỊ ĐỊNH 30/2020/NĐ-CP)
   Nền tảng All in One — Chuẩn Thể Thức & Quản Trị Văn Bản Hiện Đại
   ========================================================================== */

/* 1. Header Thanh Điều Hướng Công Cụ (Đã ẩn hoàn toàn theo yêu cầu) */
.vb-top-bar {
  display: none !important;
}

.vb-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.vb-brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1E40AF 0%, #1D4ED8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: 0 2px 6px rgba(30, 64, 175, 0.3);
  flex-shrink: 0;
}

.vb-brand-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  color: #0F172A !important;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.vb-brand-title span.accent-highlight {
  color: #1D4ED8 !important;
  font-weight: 800;
}

.vb-brand-subtitle {
  color: #64748B;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.vb-nav-menus {
  display: flex;
  align-items: center;
  gap: 18px;
}

.vb-nav-item {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569 !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all .2s ease;
}

.vb-nav-item:hover {
  color: #1D4ED8 !important;
}

.vb-top-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vb-credits-badge {
  background: #EFF6FF !important;
  color: #1D4ED8 !important;
  border: 1px solid #BFDBFE !important;
  font-size: 0.78rem !important;
  font-weight: 700;
  padding: 4px 12px !important;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.vb-user-avatar-jt {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50%;
  background: #F1F5F9 !important;
  color: #0F172A !important;
  font-weight: 800;
  font-size: 0.82rem !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid #CBD5E1 !important;
}

/* ==========================================================================
   2. BỐ CỤC 2 CỘT TÁCH RỜI CUỘN ĐỘC LẬP (INDEPENDENT SPLIT SCROLL)
   ========================================================================== */
/* Khóa tuyệt đối cuộn trang ngoài khi ở giao diện Soạn thảo văn bản */
html.vanban-page-active {
  overflow: hidden !important;
  height: 100vh !important;
  max-height: 100vh !important;
  padding-top: 0 !important;
  margin: 0 !important;
}

body.vanban-page-active {
  overflow: hidden !important;
  height: 100vh !important;
  max-height: 100vh !important;
  padding-top: var(--header-h, 76px) !important;
  margin: 0 !important;
}

body.vanban-page-active footer {
  display: none !important;
}

#page-vanban.active {
  height: calc(100vh - var(--header-h, 76px)) !important;
  max-height: calc(100vh - var(--header-h, 76px)) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  background: #F3F4F6 !important;
}

.vb-wrapper {
  height: 100% !important;
  max-height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  background: #F8F9FA !important;
}

.vb-split-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 480px !important;
  flex: 1 1 auto !important;
  min-height: 0 !important; /* Bắt buộc để con cuộn độc lập trong flexbox */
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important; /* Không để container ngoài cuộn */
  background: #F3F4F6 !important;
}

@media(max-width: 1100px) {
  #page-vanban.active {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .vb-split-grid {
    grid-template-columns: 1fr !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

/* CỘT TRÁI: KHU VỰC XEM TRƯỚC VĂN BẢN A4 (CUỘN ĐỘC LẬP) */
.vb-preview-pane {
  background: #F3F4F6 !important;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  overflow-y: auto !important; /* Cuộn riêng cột trái */
  overflow-x: auto !important;
  overscroll-behavior: contain !important; /* Không cuộn lan sang cửa sổ */
  padding: 16px 24px 80px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  border-right: 1px solid #E2E8F0 !important;
  box-sizing: border-box !important;
}

/* Thanh công cụ xem trước */
.vb-preview-toolbar {
  width: 100% !important;
  max-width: 980px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 12px !important;
  gap: 12px !important;
}

.vb-toolbar-btn {
  background: #FFFFFF !important;
  color: #334155 !important;
  border: 1px solid #CBD5E1 !important;
  border-radius: 6px !important;
  padding: 7px 14px !important;
  font-size: 0.84rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: all .2s ease !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
}

.vb-toolbar-btn:hover {
  background: #F8FAFC !important;
  border-color: #94A3B8 !important;
  color: #0F172A !important;
  transform: translateY(-1px) !important;
}

.btn-toggle-preview,
.vb-pill-close-btn {
  background: #FFFFFF !important;
  color: #475569 !important;
  border: 1px solid #CBD5E1 !important;
  border-radius: 20px !important;
  padding: 6px 18px !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
  transition: all .2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
}

.btn-toggle-preview:hover,
.vb-pill-close-btn:hover {
  background: #F1F5F9 !important;
  border-color: #94A3B8 !important;
  color: #0F172A !important;
}

/* ==========================================================================
   3. TỜ GIẤY TRẮNG A4 RỘNG RÃI CHUẨN NGHỊ ĐỊNH 30/2020/NĐ-CP
   Lề chuẩn NĐ 30: Trên 20-25mm, Dưới 20-25mm, Trái 30-35mm, Phải 15-20mm
   Hiển thị rộng rãi bao quát y hệt Ảnh 1 của người dùng
   ========================================================================== */
.vb-a4-sheet {
  background: #FFFFFF !important;
  width: 100% !important;
  max-width: 980px !important; /* Rộng rãi rõ ràng đúng chuẩn Ảnh 1 */
  min-height: 1100px !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04) !important;
  border-radius: 2px !important;
  padding: 2.2cm 2.0cm 2.0cm 2.8cm !important;
  font-family: 'Times New Roman', Times, serif !important;
  color: #000000 !important;
  line-height: 1.45 !important;
  box-sizing: border-box !important;
  position: relative !important;
}

/* Typography văn bản hành chính */
.vb-a4-sheet .org-header-left {
  text-align: center;
}

.vb-a4-sheet .org-superior {
  font-size: 12pt;
  text-transform: uppercase;
  color: #000000;
  font-weight: normal;
  line-height: 1.25;
}

.vb-a4-sheet .org-name {
  font-size: 13pt;
  font-weight: bold;
  text-transform: uppercase;
  color: #000000;
  line-height: 1.25;
  margin-top: 2px;
}

.vb-a4-sheet .org-divider {
  width: 40%;
  height: 1px;
  background: #000000;
  margin: 4px auto 5px;
}

.vb-a4-sheet .doc-number {
  font-size: 12pt;
  color: #000000;
  font-weight: normal;
  line-height: 1.25;
  text-align: center;
}

.vb-a4-sheet .nation-header-right {
  text-align: center;
}

.vb-a4-sheet .nation-name {
  font-size: 12.5pt;
  font-weight: bold;
  text-transform: uppercase;
  color: #000000;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.vb-a4-sheet .motto {
  font-size: 13pt;
  font-weight: bold;
  color: #000000;
  line-height: 1.25;
  margin-top: 2px;
}

.vb-a4-sheet .motto-divider {
  width: 55%;
  height: 1px;
  background: #000000;
  margin: 4px auto 5px;
}

.vb-a4-sheet .doc-date {
  font-size: 13pt;
  font-style: italic;
  color: #000000;
  line-height: 1.25;
  margin-top: 5px;
  text-align: center;
}

/* Loại văn bản & Trích yếu */
.vb-a4-sheet .doc-type-title {
  font-size: 14pt;
  font-weight: bold;
  text-transform: uppercase;
  color: #000000;
  letter-spacing: 0.03em;
  text-align: center;
  margin: 28px 0 6px 0;
  line-height: 1.3;
}

.vb-a4-sheet .doc-subject {
  font-size: 13pt;
  font-style: italic;
  font-weight: bold;
  text-decoration: underline;
  text-align: center;
  color: #000000;
  margin-bottom: 22px;
  line-height: 1.35;
}

/* Nội dung văn bản (Body) */
.vb-a4-sheet .document-body {
  font-size: 13pt;
  line-height: 1.5;
  text-align: justify;
  text-justify: inter-word;
  color: #000000;
  outline: none;
  min-height: 320px;
}

.vb-a4-sheet .document-body p {
  text-indent: 1cm !important; /* Thụt đầu dòng chuẩn 1cm */
  margin: 0 0 6pt 0 !important; /* Khoảng cách sau đoạn 6pt */
  line-height: 1.5 !important;
  text-align: justify !important;
}

/* Chân trang: Nơi nhận & Chữ ký */
.vb-a4-sheet .footer-recipients {
  font-size: 11pt;
  line-height: 1.35;
  text-align: left;
}

.vb-a4-sheet .footer-recipients-title {
  font-size: 11.5pt;
  font-weight: bold;
  font-style: italic;
  margin-bottom: 4px;
}

.vb-a4-sheet .footer-signature {
  text-align: center;
}

.vb-a4-sheet .footer-sign-role {
  font-size: 13pt;
  font-weight: bold;
  text-transform: uppercase;
  color: #000000;
  line-height: 1.25;
}

.vb-a4-sheet .footer-sign-name {
  font-size: 13pt;
  font-weight: bold;
  color: #000000;
  line-height: 1.25;
}

/* Chú thích AI dưới tờ A4 */
.vb-preview-disclaimer {
  text-align: center;
  color: #94A3B8;
  font-size: 0.82rem;
  margin-top: 24px;
  margin-bottom: 24px;
  width: 100%;
  clear: both;
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   4. CỘT PHẢI: BỘ ĐIỀU KHIỂN FORM WIZARD (CUỘN ĐỘC LẬP)
   ========================================================================== */
.vb-control-pane {
  background: #FFFFFF !important;
  border-left: 1px solid #E2E8F0 !important;
  padding: 20px 24px 80px !important;
  height: 100%;
  max-height: 100%;
  overflow-y: auto; /* Cuộn riêng cột phải */
  box-sizing: border-box;
}

/* Tabs điều hướng bước (1. Thiết lập ban đầu, 2. Tạo nội dung AI, 3. Tinh chỉnh AI) */
.vb-wizard-tabs {
  display: flex;
  border-bottom: 2px solid #F1F5F9 !important;
  margin-bottom: 20px;
  gap: 8px;
}

.vb-tab-step {
  flex: 1;
  text-align: center;
  padding: 10px 4px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #94A3B8 !important;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  transition: all .2s ease;
  white-space: nowrap;
}

.vb-tab-step.active {
  color: #1D4ED8 !important; /* Xanh GovTech chuẩn công vụ số */
  border-bottom-color: #1D4ED8 !important;
  font-weight: 700 !important;
}

/* Accordions */
.vb-accordion-item {
  border: 1px solid #E2E8F0 !important;
  border-radius: 8px;
  margin-bottom: 12px;
  background: #FFFFFF !important;
  overflow: hidden;
  transition: all .2s ease;
}

.vb-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 16px;
  background: #FFFFFF;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
  color: #1E293B !important;
  user-select: none;
  transition: all .2s ease;
}

.vb-accordion-header:hover {
  background: #F8FAFC !important;
  color: #1D4ED8 !important;
}

.vb-accordion-item.open {
  border-color: #CBD5E1 !important;
}

.vb-accordion-item.open .vb-accordion-header {
  color: #0F172A !important;
}

.vb-accordion-chevron {
  color: #64748B !important;
  font-size: 0.8rem;
}

/* Hộp Chọn Mẫu AI */
.vb-ai-sample-box {
  border: 1.5px solid #CBD5E1 !important;
  background: #F8FAFC !important;
  border-radius: 8px;
  padding: 14px !important;
  margin-bottom: 16px;
}

.vb-ai-sample-title {
  color: #0F172A !important;
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Khối Đơn Vị Liên Tịch (Đơn vị 2...) theo đúng mẫu */
.vb-agency-unit-box {
  border: 1.5px solid #BFDBFE;
  border-left: 4px solid #1D4ED8 !important;
  border-radius: 8px;
  padding: 14px 16px;
  background: #FFFFFF;
  margin-bottom: 14px;
  position: relative;
}

.vb-agency-unit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  color: #1E293B;
}

.vb-btn-remove-unit {
  background: #FEE2E2;
  color: #DC2626;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 800;
  font-size: 0.85rem;
  line-height: 1;
  transition: all .2s;
}

.vb-btn-remove-unit:hover {
  background: #FCA5A5;
  color: #991B1B;
}

/* Badge Loại văn bản (TB, CV, QĐ...) */
.vb-type-badge {
  background: #0F172A !important;
  color: #FFFFFF !important;
  border: 1px solid #334155 !important;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
}

/* Form Inputs */
.vb-control-pane input[type="text"],
.vb-control-pane input[type="date"],
.vb-control-pane select,
.vb-control-pane textarea {
  border: 1px solid #CBD5E1 !important;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 0.92rem;
  color: #0F172A;
  background: #FFFFFF;
  transition: all .2s ease;
  width: 100%;
  box-sizing: border-box;
}

.vb-control-pane input:focus,
.vb-control-pane select:focus,
.vb-control-pane textarea:focus {
  border-color: #2563EB !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
  outline: none;
}

/* Nơi nhận tags */
.vb-tag-input-container {
  border: 1px solid #CBD5E1 !important;
  border-radius: 6px;
  padding: 6px 10px;
  background: #FFFFFF;
}

.vb-tag-input-container:focus-within {
  border-color: #2563EB !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.vb-tag-chip {
  background: #F1F5F9 !important;
  border: 1px solid #E2E8F0 !important;
  color: #0F172A !important;
  font-weight: 600;
  border-radius: 4px;
  padding: 3px 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
}

.vb-tag-chip-remove {
  cursor: pointer;
  color: #64748B;
  font-weight: bold;
}
.vb-tag-chip-remove:hover {
  color: #DC2626;
}

.vb-sug-item {
  color: #1D4ED8 !important;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.vb-sug-item:hover {
  color: #1E3A8A !important;
}

/* Slider tỷ lệ cột Header */
.vb-slider-input::-webkit-slider-thumb {
  background: #1D4ED8 !important;
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.4) !important;
}

.vb-slider-badge-pill {
  background: #0F172A !important;
  color: #FFFFFF !important;
  border: 1px solid #334155 !important;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Nút Xanh Công Vụ "+ Thêm đơn vị" và Nút Tiếp Tục */
.btn-add-unit {
  background: linear-gradient(135deg, #1E40AF 0%, #2563EB 100%) !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  padding: 11px 20px !important;
  font-size: 0.92rem !important;
  border: none !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.25) !important;
  width: 100% !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}

.btn-add-unit:hover {
  background: linear-gradient(135deg, #1D4ED8 0%, #1E3A8A 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.35) !important;
}

.btn-continue {
  background: linear-gradient(135deg, #1E40AF 0%, #2563EB 100%) !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  padding: 12px 20px !important;
  font-size: 0.95rem !important;
  border: none !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.25) !important;
  width: 100% !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-continue:hover {
  background: linear-gradient(135deg, #1D4ED8 0%, #1E3A8A 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.35) !important;
}

/* ==========================================================================
   IN VĂN BẢN CHUẨN NGHỊ ĐỊNH 30/2020/NĐ-CP (CHUẨN XÁC 100% - KHÔNG LỆCH GIẤY)
   ========================================================================== */
@page {
  size: A4 portrait;
  /* Căn lề chính giữa giấy A4 tuyệt đối cân xứng 100%:
     - Lề trên (top): 20mm (2.0cm)
     - Lề dưới (bottom): 20mm (2.0cm)
     - Lề trái (left): 20mm (2.0cm)
     - Lề phải (right): 20mm (2.0cm)
     -> Văn bản nằm ngay chính giữa tâm giấy A4
  */
  margin: 20mm 20mm 20mm 20mm !important;
}

@media print {
  /* 1. Ẩn toàn bộ các thành phần giao diện thừa không in */
  header,
  header *,
  footer,
  footer *,
  nav,
  nav *,
  .main-header,
  .site-footer,
  .logo,
  .logo *,
  .logo-emblem-wrap,
  .logo-img,
  .logo-text,
  .nav-container,
  .nav-links,
  .toolbar,
  .vb-top-bar,
  .vb-control-pane,
  .vb-preview-toolbar,
  .vb-preview-disclaimer,
  .btn-toggle-preview,
  #btnTogglePreviewPane,
  .modal,
  .modal-overlay,
  .modal-box,
  .toast,
  .toast-container,
  #toastContainer,
  #compareFloatingBar,
  #floatingContactWidget,
  .floating-contact-btn,
  #floatHotlineBtn,
  #floatZaloBtn,
  #floatMessengerBtn,
  .nb-floating-chat,
  .nb-floating-chat *,
  .nb-travel-floating-stack,
  .nb-travel-float-btn,
  .feedback-fab-container,
  .feedback-fab,
  #feedbackModalOverlay,
  #compareModalOverlay,
  #specialtyCartModalOverlay,
  #ttsModal,
  #drivingHeaderSubnav,
  .a-no-print,
  .no-print,
  .page-view:not(#page-vanban) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: static !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }

  /* 2. Giải phóng hoàn toàn các thẻ cha khỏi overflow:hidden và height:100vh để không bị cắt trang */
  html,
  body,
  html.vanban-page-active,
  body.vanban-page-active,
  #page-vanban,
  #page-vanban.active,
  .vb-wrapper,
  .vb-split-grid,
  .vb-preview-pane {
    display: block !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: #FFFFFF !important;
    float: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* 3. Khung giấy in #a4PaperDoc: Tận dụng đúng 100% vùng in do @page cấp, không bị nhân đôi lề */
  #a4PaperDoc {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    background: #FFFFFF !important;
    overflow: visible !important;
    font-family: 'Times New Roman', Times, serif !important;
    font-size: 13pt !important;
    line-height: 1.45 !important;
    color: #000000 !important;
  }

  /* 4. Đầu trang: Căn chỉnh tỷ lệ 35% / 65% giữ Quốc hiệu luôn nằm trên 1 dòng */
  #docHeaderRow {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    width: 100% !important;
    margin-bottom: 20pt !important;
  }
  #docHeaderLeft {
    width: 38% !important;
    max-width: 38% !important;
    flex: 0 0 38% !important;
    text-align: center !important;
    padding-right: 4px !important;
    box-sizing: border-box !important;
  }
  #docHeaderRight {
    width: 60% !important;
    max-width: 60% !important;
    flex: 0 0 60% !important;
    text-align: center !important;
    padding-left: 4px !important;
    box-sizing: border-box !important;
  }
  .nation-name,
  #docHeaderRight .nation-name {
    white-space: nowrap !important;
    font-size: 12pt !important;
    font-weight: bold !important;
    letter-spacing: -0.2px !important;
    text-transform: uppercase !important;
    line-height: 1.25 !important;
  }
  .motto,
  #docHeaderRight .motto {
    white-space: nowrap !important;
    font-size: 13pt !important;
    font-weight: bold !important;
    line-height: 1.25 !important;
    margin-top: 2px !important;
  }
  .doc-date,
  #docHeaderRight .doc-date {
    font-size: 13pt !important;
    font-style: italic !important;
    line-height: 1.25 !important;
    margin-top: 4px !important;
  }

  /* 5. Tiêu đề loại & trích yếu */
  .doc-type-title {
    font-size: 14pt !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    margin-top: 20pt !important;
    margin-bottom: 4pt !important;
    text-align: center !important;
  }
  .doc-subject {
    font-size: 13pt !important;
    font-weight: bold !important;
    font-style: italic !important;
    text-decoration: underline !important;
    margin-bottom: 18pt !important;
    text-align: center !important;
  }

  /* 6. Nội dung thân văn bản */
  #docPrevNoiDung,
  .document-body {
    font-family: 'Times New Roman', Times, serif !important;
    font-size: 13pt !important;
    line-height: 1.45 !important;
    color: #000000 !important;
    text-align: justify !important;
    text-justify: inter-word !important;
  }
  #docPrevNoiDung p,
  .document-body p {
    text-indent: 1.0cm !important;
    margin: 0 0 6pt 0 !important;
    line-height: 1.45 !important;
    text-align: justify !important;
    page-break-inside: avoid !important;
  }

  /* 7. Chân trang: Nơi nhận và chữ ký */
  #docFooterRow {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    width: 100% !important;
    margin-top: 24pt !important;
    page-break-inside: avoid !important;
  }
  #docRecipientsCol {
    width: 45% !important;
    max-width: 45% !important;
    flex: 0 0 45% !important;
    text-align: left !important;
    box-sizing: border-box !important;
  }
  #docSignatureContainer {
    width: 52% !important;
    max-width: 52% !important;
    flex: 0 0 52% !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }
  .footer-recipients-title {
    font-size: 11.5pt !important;
    font-weight: bold !important;
    font-style: italic !important;
  }
  .footer-recipients {
    font-size: 11pt !important;
    line-height: 1.3 !important;
  }
  .footer-signature {
    text-align: center !important;
    page-break-inside: avoid !important;
  }
}

/* ==========================================================================
   UI/UX PROMAX DESIGN SYSTEM STYLES (ĐIỂM LIỆT & THI SÁT HẠCH)
   ========================================================================== */
@keyframes beaconPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.promax-paralyzed-card {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  color: #0F172A !important;
}

.promax-paralyzed-card h3 {
  color: #0F172A !important;
}

body.midnight-mode .promax-paralyzed-card,
body[data-theme="dark"] .promax-paralyzed-card {
  background: #111E2E !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #F8FAFC !important;
}

body.midnight-mode .promax-paralyzed-card h3,
body[data-theme="dark"] .promax-paralyzed-card h3 {
  color: #F8FAFC !important;
}

.promax-paralyzed-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -4px rgba(220, 38, 38, 0.08), 0 4px 12px rgba(0, 0, 0, 0.03) !important;
}

.beacon-dot-pulse {
  animation: beaconPulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

/* 1. Sub-nav bar ProMax Pills */
.driving-header-subnav {
  position: sticky !important;
  top: 58px !important;
  z-index: 100 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border-bottom: 1px solid var(--color-border) !important;
  box-shadow: var(--shadow-promax-sm) !important;
}

.driving-subnav-btn {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  outline: none !important;
  user-select: none !important;
  white-space: nowrap !important;
}

.driving-subnav-btn:hover:not(.active) {
  background: #F1F5F9 !important;
  color: #0F172A !important;
  border-color: #CBD5E1 !important;
  transform: translateY(-1px);
}

.driving-subnav-btn:active {
  transform: scale(0.97) !important;
}

.driving-subnav-btn.active {
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28) !important;
}

/* 2. ProMax Elevated Card & Hover */
.promax-card {
  background: #FFFFFF !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 16px !important;
  box-shadow: var(--shadow-promax-md) !important;
  transition: var(--transition-promax) !important;
}

.promax-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: var(--shadow-promax-hover) !important;
  border-color: #CBD5E1 !important;
}

/* 3. Button Micro-interactions & Core Styles */
.btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.92rem !important;
  padding: 11px 22px !important;
  border-radius: 10px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  cursor: pointer !important;
  user-select: none !important;
  box-sizing: border-box !important;
  line-height: 1.3 !important;
}

.btn:active {
  transform: scale(0.97) !important;
}

.btn-primary {
  background: linear-gradient(135deg, #0F3D6E 0%, #1E5998 100%) !important;
  color: #FFFFFF !important;
  border: 1.5px solid transparent !important;
  box-shadow: 0 4px 14px rgba(15, 61, 110, 0.25) !important;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #092545 0%, #0F3D6E 100%) !important;
  box-shadow: 0 6px 20px rgba(15, 61, 110, 0.35) !important;
  color: #FFFFFF !important;
  transform: translateY(-2px) !important;
}

body.midnight-mode .btn-primary {
  background: linear-gradient(135deg, #00F2FE 0%, #0284C7 100%) !important;
  color: #040E24 !important;
  font-weight: 800 !important;
  border: 1.5px solid transparent !important;
  box-shadow: 0 4px 18px rgba(0, 242, 254, 0.4), 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

body.midnight-mode .btn-primary:hover {
  background: linear-gradient(135deg, #38BDF8 0%, #67E8F9 100%) !important;
  box-shadow: 0 6px 26px rgba(0, 242, 254, 0.6) !important;
  transform: translateY(-2px) !important;
  color: #040E24 !important;
}

.btn-outline {
  background: #FFFFFF !important;
  border: 1.5px solid #CBD5E1 !important;
  color: #0F3D6E !important;
}

body:not(.midnight-mode) .btn-outline:hover {
  background: #F8FAFC !important;
  border-color: #0F3D6E !important;
  color: #0F3D6E !important;
  transform: translateY(-1px) !important;
}

/* 4. Accessibility & Focus States */
:focus-visible {
  outline: 2.5px solid var(--color-ring) !important;
  outline-offset: 2px !important;
}

/* 5. Impeccable Browser Surfaces */
::selection {
  background: #DBEAFE !important;
  color: #1E3A8A !important;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #F1F5F9;
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   6. UI/UX PRO MAX - MIDNIGHT DARK MODE (DEEP MIDNIGHT #0A0E27)
   ========================================================================== */
/* Theme Toggle Button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border);
  background: #F1F5F9;
  color: var(--ink);
  transition: all .2s ease;
  white-space: nowrap;
}
.theme-toggle-btn:hover {
  background: #E2E8F0;
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* Developer Nav link status */
.nav-link-dev {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.nav-link-dev:hover {
  background: #FEF3C7 !important;
  color: #B45309 !important;
}

/* Light Mode Defaults for ProMax Cards */
.promax-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  transition: var(--transition-promax);
  color: var(--ink);
}
.promax-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  border-color: #CBD5E1;
}

/* ==========================================================================
   6. UI/UX PRO MAX - MIDNIGHT DARK MODE (KHI BẬT THEME TỐI)
   ========================================================================== */
/* Default / Light Mode Classes for Adaptive Components */
.home-quick-tools-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  transition: all .25s ease;
}
.home-quick-tools-card .quick-tools-title {
  color: var(--primary-dark);
}
.home-quick-btn-dev {
  border-color: #FDE68A !important;
  background: #FEFCE8 !important;
  color: #92400E !important;
}
.home-quick-btn-vanban {
  border-color: #C8853F !important;
  background: #F6F1E8 !important;
  color: #9A3412 !important;
}
.home-quick-btn-vanban .btn-lbl,
.home-quick-btn-vanban .btn-arr {
  color: #9A3412 !important;
}
.home-quick-btn-excel {
  border-color: #86EFAC !important;
  background: #F0FDF4 !important;
  color: #166534 !important;
}
.home-quick-btn-excel .btn-lbl,
.home-quick-btn-excel .btn-arr {
  color: #166534 !important;
}

.page-banner-hero {
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
  transition: all .25s ease;
}
.page-banner-title {
  color: var(--primary-dark);
}
.page-banner-desc {
  color: var(--muted);
}
.service-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  transition: all .25s ease;
}
.community-main-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  transition: all .25s ease;
}

/* Midnight Dark Mode Core */
body.midnight-mode {
  background-color: var(--midnight-bg) !important;
  color: var(--midnight-text-primary) !important;
}

body.midnight-mode .theme-toggle-btn {
  background: #1A243B !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: #F8FAFC !important;
}
body.midnight-mode .theme-toggle-btn:hover {
  background: #253352 !important;
  border-color: #38BDF8 !important;
  color: #38BDF8 !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25) !important;
}

body.midnight-mode .nav-link-dev:hover {
  background: rgba(245, 158, 11, 0.18) !important;
  color: #FCD34D !important;
}

body.midnight-mode #driving-portal,
body.midnight-mode .driving-tab-pane {
  background-color: var(--midnight-bg) !important;
  color: var(--midnight-text-primary) !important;
}

body.midnight-mode h1, 
body.midnight-mode h2, 
body.midnight-mode h3, 
body.midnight-mode h4 {
  color: var(--midnight-text-primary);
}

/* Midnight Dark - Hero Section */
body.midnight-mode .hero-section {
  background: radial-gradient(circle at 50% 0%, #151D3B 0%, #0A0E27 80%) !important;
  border-bottom: 1px solid var(--midnight-border) !important;
}

body.midnight-mode .badge-tag {
  background: rgba(56, 189, 248, 0.12) !important;
  color: var(--midnight-accent) !important;
  border: 1px solid rgba(56, 189, 248, 0.25) !important;
}

body.midnight-mode .hero-title {
  color: #F8FAFC !important;
  letter-spacing: -0.02em;
}

body.midnight-mode .hero-desc {
  color: var(--midnight-text-muted) !important;
}

body.midnight-mode .hero-stats {
  border-top: 1px solid var(--midnight-border) !important;
}

body.midnight-mode .hero-stats b {
  color: var(--midnight-accent) !important;
  text-shadow: 0 0 16px rgba(56, 189, 248, 0.35);
}

body.midnight-mode .hero-stats span {
  color: var(--midnight-text-muted) !important;
}

/* Midnight Dark - Quick Tools Card on Home */
body.midnight-mode .home-quick-tools-card {
  background: var(--midnight-card) !important;
  border: 1px solid var(--midnight-border) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
}
body.midnight-mode .home-quick-tools-card .quick-tools-title {
  color: #F8FAFC !important;
}
body.midnight-mode .home-quick-btn-dev {
  background: rgba(245, 158, 11, 0.14) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
  color: #FCD34D !important;
}
body.midnight-mode .home-quick-btn-vanban {
  background: rgba(194, 65, 12, 0.14) !important;
  border-color: rgba(194, 65, 12, 0.4) !important;
  color: #FB923C !important;
}
body.midnight-mode .home-quick-btn-vanban .btn-lbl,
body.midnight-mode .home-quick-btn-vanban .btn-arr {
  color: #FB923C !important;
}
body.midnight-mode .home-quick-btn-excel {
  background: rgba(22, 163, 74, 0.14) !important;
  border-color: rgba(22, 163, 74, 0.4) !important;
  color: #4ADE80 !important;
}
body.midnight-mode .home-quick-btn-excel .btn-lbl,
body.midnight-mode .home-quick-btn-excel .btn-arr {
  color: #4ADE80 !important;
}

/* Midnight Dark - Section Titles & Tool Cards */
body.midnight-mode .section-title-wrap h2 {
  color: var(--midnight-text-primary) !important;
}

body.midnight-mode .section-title-wrap p {
  color: var(--midnight-text-muted) !important;
}

body.midnight-mode .tool-card {
  background: var(--midnight-card) !important;
  border: 1px solid var(--midnight-border) !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4) !important;
  transition: all .25s ease !important;
  color: var(--midnight-text-primary) !important;
}

body.midnight-mode .tool-card:hover {
  border-color: var(--midnight-border-hover) !important;
  background: var(--midnight-card-hover) !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65) !important;
}

body.midnight-mode .tool-card h3 {
  color: var(--midnight-text-primary) !important;
}

body.midnight-mode .tool-card p {
  color: var(--midnight-text-muted) !important;
}

body.midnight-mode .tool-card .go-badge {
  color: var(--midnight-accent) !important;
}

body.midnight-mode .tool-card .tool-ic {
  background: rgba(56, 189, 248, 0.12) !important;
  color: var(--midnight-accent) !important;
  border: 1px solid rgba(56, 189, 248, 0.2) !important;
}

/* Midnight Dark - Floating Header Capsule */
body.midnight-mode header {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

body.midnight-mode .logo-text {
  color: #F8FAFC !important;
}

body.midnight-mode .logo-text small,
body.midnight-mode .logo-sub {
  color: #94A3B8 !important;
}

body.midnight-mode .nav-link {
  color: #CBD5E1 !important;
}

body.midnight-mode .nav-link:hover {
  background: rgba(0, 242, 254, 0.08) !important;
  color: #00F2FE !important;
}

body.midnight-mode .nav-link.active {
  background: rgba(0, 242, 254, 0.1) !important;
  border-color: #00F2FE !important;
  color: #00F2FE !important;
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.25) !important;
}

body.midnight-mode .nav-link-dev:hover {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #FBBF24 !important;
}

body.midnight-mode .nav-dev-badge {
  background: rgba(245, 158, 11, 0.18) !important;
  color: #FBBF24 !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
}

body.midnight-mode .user-badge {
  background: #1A243B !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #F8FAFC !important;
}

body.midnight-mode .promax-card {
  background: var(--midnight-card) !important;
  border: 1px solid var(--midnight-border) !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.45) !important;
  transition: var(--transition-promax) !important;
  color: var(--midnight-text-primary) !important;
}

body.midnight-mode .promax-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.65) !important;
  border-color: var(--midnight-border-hover) !important;
  background: var(--midnight-card-hover) !important;
}

body.midnight-mode .driving-header-subnav {
  background: rgba(10, 14, 39, 0.94) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-bottom: 1px solid var(--midnight-border) !important;
}

body.midnight-mode .driving-subnav-btn {
  background: #131B2E !important;
  color: var(--midnight-text-muted) !important;
  border: 1px solid var(--midnight-border) !important;
}

body.midnight-mode .driving-subnav-btn:hover:not(.active) {
  background: #1E293B !important;
  color: var(--midnight-text-primary) !important;
  border-color: var(--midnight-border-hover) !important;
  transform: translateY(-1px);
}

body.midnight-mode .driving-subnav-btn.active {
  background: #2563EB !important;
  color: #FFFFFF !important;
  border-color: #3B82F6 !important;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4) !important;
}

body.midnight-mode .promax-paralyzed-card {
  background: var(--midnight-card) !important;
  border: 1px solid var(--midnight-border) !important;
  border-left: 4px solid var(--midnight-danger) !important;
  border-radius: 16px !important;
  padding: 22px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
  transition: var(--transition-promax);
  color: var(--midnight-text-primary) !important;
}

body.midnight-mode .promax-paralyzed-card:hover {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6) !important;
  border-color: var(--midnight-danger-border) !important;
  border-left: 4px solid #F87171 !important;
  background: var(--midnight-card-hover) !important;
  transform: translateY(-2px);
}

body.midnight-mode .btn-outline {
  background: #131B2E !important;
  border: 1.5px solid #334155 !important;
  color: #E2E8F0 !important;
}

body.midnight-mode .btn-outline:hover {
  background: #1E293B !important;
  border-color: #38BDF8 !important;
  color: #38BDF8 !important;
}

/* Midnight Dark - Page Banners, Blog, Services & Community */
body.midnight-mode .page-banner-hero {
  background: radial-gradient(circle at 50% 0%, #151D3B 0%, #0A0E27 80%) !important;
  border-bottom: 1px solid var(--midnight-border) !important;
}
body.midnight-mode .page-banner-title {
  color: #F8FAFC !important;
}
body.midnight-mode .page-banner-desc {
  color: var(--midnight-text-muted) !important;
}

body.midnight-mode .blog-card {
  background: var(--midnight-card) !important;
  border: 1px solid var(--midnight-border) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4) !important;
  color: var(--midnight-text-primary) !important;
}
body.midnight-mode .blog-card:hover {
  background: var(--midnight-card-hover) !important;
  border-color: var(--midnight-border-hover) !important;
  transform: translateY(-3px) !important;
}
body.midnight-mode .blog-card h3 {
  color: #F8FAFC !important;
}
body.midnight-mode .blog-card p {
  color: var(--midnight-text-muted) !important;
}
body.midnight-mode .blog-card .read-more {
  color: #38BDF8 !important;
}

body.midnight-mode .service-card {
  background: var(--midnight-card) !important;
  border: 1px solid var(--midnight-border) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4) !important;
  color: var(--midnight-text-primary) !important;
}
body.midnight-mode .service-card h3 {
  color: #F8FAFC !important;
}
body.midnight-mode .service-card p,
body.midnight-mode .service-desc {
  color: var(--midnight-text-muted) !important;
}

body.midnight-mode .community-main-card {
  background: var(--midnight-card) !important;
  border: 1px solid var(--midnight-border) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45) !important;
  color: var(--midnight-text-primary) !important;
}
body.midnight-mode .community-main-card h1 {
  color: #F8FAFC !important;
}
body.midnight-mode .community-desc {
  color: var(--midnight-text-muted) !important;
}

/* Midnight Dark - Prompt Cards & Admin */
body.midnight-mode .prompt-card {
  background: var(--midnight-card) !important;
  border: 1px solid var(--midnight-border) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
  color: var(--midnight-text-primary) !important;
}
body.midnight-mode .prompt-card p {
  color: #CBD5E1 !important;
}
body.midnight-mode .tab-btn {
  background: #131B2E !important;
  border-color: var(--midnight-border) !important;
  color: var(--midnight-text-muted) !important;
}
body.midnight-mode .tab-btn.active {
  background: #2563EB !important;
  border-color: #2563EB !important;
  color: #FFFFFF !important;
}
body.midnight-mode .admin-sidebar {
  background: var(--midnight-card) !important;
  border: 1px solid var(--midnight-border) !important;
}
body.midnight-mode .admin-menu-item {
  color: var(--midnight-text-muted) !important;
}
body.midnight-mode .admin-menu-item:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #38BDF8 !important;
}

/* Midnight Dark - Inputs & Modals */
body.midnight-mode input,
body.midnight-mode select,
body.midnight-mode textarea {
  background: #1A243B !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #F8FAFC !important;
}
body.midnight-mode input:focus,
body.midnight-mode select:focus,
body.midnight-mode textarea:focus {
  border-color: #38BDF8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2) !important;
}
body.midnight-mode .modal-box {
  background: #131B2E !important;
  color: #F8FAFC !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
body.midnight-mode .modal-header {
  background: #0A0E27 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}
body.midnight-mode .modal-body {
  color: #CBD5E1 !important;
}
body.midnight-mode .form-group label {
  color: #E2E8F0 !important;
}
body.midnight-mode .drop-zone {
  background: rgba(37, 99, 235, 0.08) !important;
  border-color: #38BDF8 !important;
  color: #CBD5E1 !important;
}
body.midnight-mode #appDialogCard {
  background: #131B2E !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7) !important;
}
body.midnight-mode #appDialogTitle {
  color: #F8FAFC !important;
}
body.midnight-mode #appDialogMessage {
  color: #CBD5E1 !important;
}
body.midnight-mode #appDialogSub {
  color: #94A3B8 !important;
}
body.midnight-mode #appDialogBtnCancel {
  background: #1E293B !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #CBD5E1 !important;
}

/* ==========================================================================
   UNIVERSAL CONTRAST INVARIANCE GUARD
   Ensures document preview and certificate canvas keep black text,
   while allowing app cards, tools banners, and travel components to adapt to dark mode!
   ========================================================================== */
.community-qr-container,
.community-qr-container *,
.community-qr-label {
  color: #0F172A !important;
}
.vb-a4-sheet,
.vb-a4-sheet * {
  color: #000000 !important;
}
body.midnight-mode .vb-a4-sheet {
  background-color: #FFFFFF !important;
}
body.midnight-mode .community-qr-container {
  background-color: #FFFFFF !important;
  border-color: #38BDF8 !important;
}

/* Midnight Dark Mode - All Headings, Titles & Form Controls */
body.midnight-mode h1,
body.midnight-mode h2,
body.midnight-mode h3,
body.midnight-mode h4,
body.midnight-mode .brand-font,
body.midnight-mode #currentCategoryTitle,
body.midnight-mode .place-card-title {
  color: #F8FAFC !important;
}

body.midnight-mode .page-banner,
body.midnight-mode .tools-header-banner,
body.midnight-mode #page-tools > div:first-child {
  background: #0D1527 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.midnight-mode #page-tools h1,
body.midnight-mode #page-tools .tools-banner-title {
  color: #F8FAFC !important;
}

body.midnight-mode #page-tools p,
body.midnight-mode #page-tools .tools-banner-desc {
  color: #94A3B8 !important;
}

body.midnight-mode .group-title {
  color: #38BDF8 !important;
}

/* Travel Section Dark Mode */
body.midnight-mode .travel-filter-box,
body.midnight-mode #travelFilterBox {
  background: #131B2E !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
}

body.midnight-mode #travelSearch {
  background: #0A0E27 !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #F8FAFC !important;
}

body.midnight-mode #travelSearch::placeholder {
  color: #64748B !important;
}

body.midnight-mode .area-filter-lbl {
  color: #CBD5E1 !important;
}

body.midnight-mode .area-filter-btn {
  background: #1A243B !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #CBD5E1 !important;
}

body.midnight-mode .area-filter-btn:hover {
  border-color: #38BDF8 !important;
  color: #38BDF8 !important;
}

body.midnight-mode .area-filter-btn.active {
  background: #2563EB !important;
  border-color: #38BDF8 !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3) !important;
}

body.midnight-mode #currentCategoryTitle {
  color: #F8FAFC !important;
}

body.midnight-mode #currentPlaceCount {
  color: #94A3B8 !important;
}

body.midnight-mode .travel-card {
  background: #131B2E !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4) !important;
}

body.midnight-mode .travel-card:hover {
  border-color: rgba(56, 189, 248, 0.4) !important;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.6) !important;
}

body.midnight-mode .travel-card h3 {
  color: #F8FAFC !important;
}

body.midnight-mode .travel-card .travel-addr {
  color: #94A3B8 !important;
}

body.midnight-mode .travel-card .travel-highlight {
  background: #1A243B !important;
  color: #E2E8F0 !important;
  border-left: 3px solid #38BDF8 !important;
}

body.midnight-mode .travel-card .travel-price {
  color: #38BDF8 !important;
  border-top-color: rgba(255, 255, 255, 0.1) !important;
}

body.midnight-mode .travel-empty-box {
  background: #131B2E !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

body.midnight-mode .travel-empty-box .empty-title {
  color: #F8FAFC !important;
}

body.midnight-mode .travel-empty-box .empty-desc {
  color: #94A3B8 !important;
}

/* Specialty Cart Modal Dark Mode */
body.midnight-mode #specialtyCartCard {
  background: #131B2E !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #F8FAFC !important;
}

body.midnight-mode #cartCustomerTitle,
body.midnight-mode #cartFooterTotal {
  color: #F8FAFC !important;
}

body.midnight-mode #cartModalBodyContent input {
  background: #0A0E27 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #F8FAFC !important;
}

body.midnight-mode #cartModalBodyContent label {
  color: #CBD5E1 !important;
}

body.midnight-mode #cartPaymentBox {
  background: #0A0E27 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.midnight-mode #cartPaymentBox label span {
  color: #E2E8F0 !important;
}

body.midnight-mode #cartModalFooter {
  background: #0A0E27 !important;
  border-top-color: rgba(255, 255, 255, 0.1) !important;
}

body.midnight-mode #cartItemsList > div > div {
  background: #0A0E27 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.midnight-mode #cartItemsList button {
  background: #1E293B !important;
  color: #F8FAFC !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

body.midnight-mode #cartItemsList [style*="color:#0F172A"] {
  color: #F8FAFC !important;
}

/* Spa & Pho Co Badges & Dark Mode */
.badge-tag-spa {
  background: #F3E8FF !important;
  color: #7C3AED !important;
  border: 1px solid #DDD6FE !important;
}

body.midnight-mode .badge-tag-spa {
  background: rgba(139, 92, 246, 0.16) !important;
  color: #C4B5FD !important;
  border-color: rgba(139, 92, 246, 0.35) !important;
}

body.midnight-mode #travelTabSpa {
  background: rgba(139, 92, 246, 0.15) !important;
  color: #C4B5FD !important;
  border-color: rgba(139, 92, 246, 0.35) !important;
}

body.midnight-mode #travelTabSpa.active {
  background: #7C3AED !important;
  color: #FFFFFF !important;
  border-color: #A78BFA !important;
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.4) !important;
}

body.midnight-mode .area-filter-btn[onclick*="phoco"] {
  border-color: #EF4444 !important;
  color: #F87171 !important;
}

body.midnight-mode .area-filter-btn[onclick*="phoco"].active {
  background: #DC2626 !important;
  color: #FFFFFF !important;
  border-color: #F87171 !important;
}

/* ==========================================================================
   DRIVING EXAM SYSTEM - THEME CONTRAST & RESPONSIVE ADAPTATION (LIGHT & DARK)
   ========================================================================== */
.driving-tab-pane,
#pane-thi-a1,
#pane-meo-a,
#pane-meo-b,
#pane-cau-liet-20 {
  color: var(--ink);
}

#pane-thi-a1 h1,
#pane-thi-a1 h2,
#pane-thi-a1 h3,
#pane-thi-a1 h4,
.driving-tab-pane h1,
.driving-tab-pane h2,
.driving-tab-pane h3,
.driving-tab-pane h4 {
  color: var(--ink);
}

#pane-thi-a1 p,
.driving-tab-pane p {
  color: var(--ink-2);
}

/* =====================================================================
   TRUNG TÂM MINIGAME & HERO BANNER TỐI MÀU TRONG BỘ THI BẰNG LÁI XE:
   Đảm bảo tiêu đề & mô tả luôn SÁNG TRẮNG / BẠC trên nền gradient xanh navy đậm
   ===================================================================== */
.driving-dark-hero,
.driving-tab-pane .driving-dark-hero,
.minigame-banner,
.driving-tab-pane .minigame-banner,
.driving-tab-pane div[style*="#0F3D6E"],
.driving-tab-pane div[style*="#1E1B4B"],
.driving-tab-pane div[style*="#1E3A8A"],
.driving-tab-pane div[style*="#1E293B"],
.driving-tab-pane div[style*="linear-gradient(135deg, #0F3D6E"],
.driving-tab-pane div[style*="linear-gradient(135deg, #1E1B4B"],
.driving-tab-pane div[style*="linear-gradient(135deg, #1E3A8A"],
.driving-tab-pane div[style*="linear-gradient(135deg, #1E293B"],
.driving-tab-pane div[style*="linear-gradient(145deg, #0F3D6E"] {
  color: #FFFFFF !important;
}

.driving-dark-hero h1,
.driving-dark-hero h2,
.driving-dark-hero h3,
.driving-dark-hero h4,
.minigame-banner h1,
.minigame-banner h2,
.minigame-banner h3,
.minigame-banner h4,
.driving-tab-pane .driving-dark-hero h1,
.driving-tab-pane .driving-dark-hero h2,
.driving-tab-pane .driving-dark-hero h3,
.driving-tab-pane .driving-dark-hero h4,
.driving-tab-pane .minigame-banner h1,
.driving-tab-pane .minigame-banner h2,
.driving-tab-pane .minigame-banner h3,
.driving-tab-pane .minigame-banner h4,
.driving-tab-pane div[style*="#0F3D6E"] h1,
.driving-tab-pane div[style*="#0F3D6E"] h2,
.driving-tab-pane div[style*="#0F3D6E"] h3,
.driving-tab-pane div[style*="#0F3D6E"] h4,
.driving-tab-pane div[style*="#1E1B4B"] h1,
.driving-tab-pane div[style*="#1E1B4B"] h2,
.driving-tab-pane div[style*="#1E1B4B"] h3,
.driving-tab-pane div[style*="#1E1B4B"] h4,
.driving-tab-pane div[style*="#1E3A8A"] h1,
.driving-tab-pane div[style*="#1E3A8A"] h2,
.driving-tab-pane div[style*="#1E3A8A"] h3,
.driving-tab-pane div[style*="#1E3A8A"] h4,
.driving-tab-pane div[style*="#1E293B"] h1,
.driving-tab-pane div[style*="#1E293B"] h2,
.driving-tab-pane div[style*="#1E293B"] h3,
.driving-tab-pane div[style*="#1E293B"] h4 {
  color: #FFFFFF !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
}

.driving-dark-hero p,
.minigame-banner p,
.driving-tab-pane .driving-dark-hero p,
.driving-tab-pane .minigame-banner p,
.driving-tab-pane div[style*="#0F3D6E"] p,
.driving-tab-pane div[style*="#1E1B4B"] p,
.driving-tab-pane div[style*="#1E3A8A"] p,
.driving-tab-pane div[style*="#1E293B"] p {
  color: #E2E8F0 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4) !important;
}

.driving-dark-hero p strong,
.driving-dark-hero p b,
.minigame-banner p strong,
.minigame-banner p b,
.driving-tab-pane .driving-dark-hero p strong,
.driving-tab-pane .driving-dark-hero p b,
.driving-tab-pane .minigame-banner p strong,
.driving-tab-pane .minigame-banner p b,
.driving-tab-pane div[style*="#0F3D6E"] p strong,
.driving-tab-pane div[style*="#0F3D6E"] p b,
.driving-tab-pane div[style*="#1E1B4B"] p strong,
.driving-tab-pane div[style*="#1E1B4B"] p b,
.driving-tab-pane div[style*="#1E3A8A"] p strong,
.driving-tab-pane div[style*="#1E3A8A"] p b,
.driving-tab-pane div[style*="#1E293B"] p strong,
.driving-tab-pane div[style*="#1E293B"] p b {
  color: #FFFFFF !important;
}

#pane-thi-a1 .promax-card,
.driving-tab-pane .promax-card {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  box-shadow: var(--shadow-sm, 0 4px 14px rgba(0,0,0,0.05)) !important;
}

#pane-thi-a1 .promax-card h1,
#pane-thi-a1 .promax-card h2,
#pane-thi-a1 .promax-card h3,
#pane-thi-a1 .promax-card h4,
.driving-tab-pane .promax-card h1,
.driving-tab-pane .promax-card h2,
.driving-tab-pane .promax-card h3,
.driving-tab-pane .promax-card h4 {
  color: var(--ink) !important;
}

#pane-thi-a1 > .wrap > div:first-child h1 {
  color: var(--ink) !important;
}

#pane-thi-a1 > .wrap > div:first-child p {
  color: var(--muted) !important;
}

/* Light mode specific contrast */
body:not(.midnight-mode):not([data-theme="dark"]) #pane-thi-a1 .promax-card {
  background: #FFFFFF !important;
  border-color: #E2E8F0 !important;
}

body:not(.midnight-mode):not([data-theme="dark"]) #pane-thi-a1 h1 {
  color: #0F172A !important;
}

/* Dark/Midnight mode specific contrast */
body.midnight-mode #pane-thi-a1 .promax-card,
body[data-theme="dark"] #pane-thi-a1 .promax-card {
  background: #111E2E !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

body.midnight-mode #pane-thi-a1 h1,
body[data-theme="dark"] #pane-thi-a1 h1 {
  color: #F8FAFC !important;
}

/* =====================================================================
   HỆ THỐNG RESPONSIVE TOÀN DIỆN CHO TẤT CẢ THIẾT BỊ (MOBILE, TABLET, DESKTOP)
   ===================================================================== */

/* 1. Ngăn chặn tràn ngang trên mọi thiết bị */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

button, a, input, select, textarea {
  touch-action: manipulation;
}

/* 2. Modal Thi Sát Hạch Lái Xe 2026 Responsive */
.exam-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
}

.exam-sidebar-nav {
  background: #FFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 18px;
  height: fit-content;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.exam-question-numbers-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

@media (max-width: 860px) {
  #examLiveSimulatorModal {
    padding: 8px !important;
  }
  #examLiveSimulatorModal > div {
    max-height: 96vh !important;
    border-radius: 14px !important;
    width: 100% !important;
  }
  .exam-modal-body {
    grid-template-columns: 1fr !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 14px 10px !important;
    gap: 16px !important;
  }
  .exam-sidebar-nav {
    order: 2 !important;
    padding: 14px 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .exam-question-main-content {
    order: 1 !important;
    width: 100% !important;
  }
  .exam-question-numbers-grid {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 6px !important;
  }
  #modalExamTitle {
    font-size: 1rem !important;
  }
  #modalExamCountdownBadge {
    font-size: 0.82rem !important;
    padding: 4px 10px !important;
  }
}

/* 3. Phân Hệ Soạn Thảo Văn Bản Nghị Định 30 Responsive */
@media (max-width: 1100px) {
  .vb-split-grid {
    grid-template-columns: 1fr !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

@media screen and (max-width: 768px) {
  .vb-preview-pane {
    padding: 10px 4px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .vb-a4-sheet {
    padding: 18px 14px !important;
    min-height: auto !important;
    min-width: 620px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* 4. Tự Động Thu Gọn Các Lưới Đa Cột Trên Điện Thoại & Máy Tính Bảng */
@media (max-width: 992px) {
  .dock-grid, .feat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .dock-grid, .feat-grid, .blog-grid, .prompt-grid, .tool-grid, .admin-grid {
    grid-template-columns: 1fr !important;
  }
  /* Thu gọn các inline-grid phổ biến */
  div[style*="grid-template-columns: 1.1fr 0.9fr"],
  div[style*="grid-template-columns: 1.2fr 0.8fr"],
  div[style*="grid-template-columns: 1.2fr 1fr"],
  div[style*="grid-template-columns: 1.45fr 1fr"],
  div[style*="grid-template-columns: 1.5fr 1fr"],
  div[style*="grid-template-columns:1.1fr 0.9fr"],
  div[style*="grid-template-columns:1.2fr 0.8fr"],
  div[style*="grid-template-columns:1.2fr 1fr"],
  div[style*="grid-template-columns:1.45fr 1fr"],
  div[style*="grid-template-columns:1.5fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
  div[style*="grid-template-columns: repeat(4, 1fr)"],
  div[style*="grid-template-columns:repeat(4, 1fr)"],
  div[style*="grid-template-columns: repeat(3, 1fr)"],
  div[style*="grid-template-columns:repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  
  /* Touch target thân thiện ngón tay */
  .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* 5. Chế Độ Dark / Midnight Cho Logo & Brand Elements */
body.midnight-mode .logo-emblem-wrap,
body[data-theme="dark"] .logo-emblem-wrap {
  background: linear-gradient(145deg, #132235, #0D1A29) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4) !important;
}

body.midnight-mode .logo-brand,
body[data-theme="dark"] .logo-brand {
  color: #F8FAFC !important;
}

body.midnight-mode .hero-brand-pill,
body[data-theme="dark"] .hero-brand-pill {
  background: rgba(17, 30, 46, 0.85) !important;
  border-color: rgba(56, 189, 248, 0.3) !important;
}

body.midnight-mode .hero-brand-pill span,
body[data-theme="dark"] .hero-brand-pill span {
  color: #38BDF8 !important;
}

/* ═════════════════════════════════════════════════════════════════════════
   NINH BÌNH TRAVEL & HOMESTAY REDESIGN (MATCHING USER IMAGES 2, 3, 4)
   ═════════════════════════════════════════════════════════════════════════ */

/* 1. Travel Sub-Navigation Bar */
.nb-travel-subnav-bar {
  background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
  position: sticky;
  top: 0;
  z-index: 120;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.nb-travel-subnav-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nb-travel-brand {
  font-size: 1.45rem;
  font-weight: 850;
  color: #1E3A2F;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.nb-travel-main-tabs {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nb-travel-tab-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748B;
  text-decoration: none;
  padding: 6px 2px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nb-travel-tab-link:hover {
  color: #1E3A2F;
}

.nb-travel-tab-link.active {
  color: #1E3A2F;
  font-weight: 800;
}

.nb-travel-tab-link.active::after {
  content: '';
  position: absolute;
  bottom: -13px;
  left: 0;
  right: 0;
  height: 3px;
  background: #1E3A2F;
  border-radius: 3px 3px 0 0;
}

.nb-travel-tools-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nb-search-pill {
  position: relative;
  width: 220px;
}

.nb-search-pill input {
  width: 100%;
  padding: 8px 14px 8px 34px;
  border-radius: 999px;
  border: 1px solid #CBD5E1;
  background: #F8FAFC;
  font-size: 0.88rem;
  color: #0F172A;
  outline: none;
  transition: all 0.2s;
}

.nb-search-pill input:focus {
  border-color: #1E3A2F;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(30, 58, 47, 0.12);
}

.nb-search-pill svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: #64748B;
  pointer-events: none;
}

.nb-circle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.nb-circle-btn:hover {
  background: #E2E8F0;
  transform: scale(1.05);
}

/* ========================================================
   NINH BÌNH HOMESTAY & TRAVEL REDESIGN (FULL BACKGROUND VIDEO & DYNAMIC BLUR)
   ======================================================== */

/* Full Background Video Behind Everything */
.nb-global-video-bg-wrap {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #0B1D16;
}

.nb-global-video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%) scale(1.01);
  object-fit: cover;
  filter: none !important;
  image-rendering: auto !important;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
}

.nb-global-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, transparent 20%, transparent 75%, rgba(11, 29, 22, 0.4) 100%);
  transition: background-color 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
}

/* Hero Section (Transparent over Video) */
.nb-hero-banner {
  position: relative;
  z-index: 5;
  margin: 10px auto 30px;
  max-width: 1440px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10px 16px 20px;
  text-align: center;
}

.nb-hero-content {
  position: relative;
  z-index: 5;
  padding: 20px 10px 24px;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.nb-hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 6px 18px;
  border-radius: 999px;
  background: rgba(27, 77, 62, 0.85);
  border: 1px solid rgba(110, 231, 183, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #A7F3D0;
  font-size: 0.82rem;
  font-weight: 750;
  margin: 0 auto 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.nb-hero-title {
  font-size: 3.2rem;
  font-weight: 850;
  color: #FFFFFF;
  line-height: 1.15;
  margin: 0 auto 12px;
  text-align: center;
  letter-spacing: -0.025em;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.65);
}

.nb-hero-subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.65;
  margin: 0 auto 24px;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
  max-width: 720px;
}

.nb-hero-btn-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0 auto 26px;
}

.nb-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  background: #1B4D3E;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  font-weight: 750;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nb-hero-btn:hover {
  background: #143B30;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 25px rgba(27, 77, 62, 0.5);
}

.nb-hero-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.25s;
}

.nb-hero-btn-outline:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Glassmorphism Search Bar - Immaculate Apple Segmented Pill */
.nb-glass-search-wrap {
  position: relative;
  z-index: 10;
  margin: 10px auto 0;
  padding: 0 4px;
  max-width: 1240px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Search Tabs Header above Pill (Mockup Image 3) */
.nb-search-tabs-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.nb-search-tab {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  padding: 7px 18px;
  color: #FFFFFF;
  font-size: 0.85rem;
  font-weight: 750;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.nb-search-tab:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.nb-search-tab.active {
  background: rgba(255, 255, 255, 0.96);
  color: #1B4D3E;
  border-color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  text-shadow: none;
}

.nb-glass-search {
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 6px 8px 6px 18px;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  min-height: 60px;
}

.nb-search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px;
  flex: 1;
  min-width: 0;
}

.nb-field-icon {
  font-size: 1.15rem;
  line-height: 1;
  opacity: 0.9;
  flex-shrink: 0;
}

.nb-field-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  overflow: visible;
  padding-left: 2px;
}

.nb-field-label {
  font-size: 0.68rem;
  font-weight: 750;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
  margin-bottom: 2px;
  user-select: none;
}

.nb-field-input {
  width: 100%;
  border: none !important;
  background: transparent !important;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0F172A;
  outline: none !important;
  box-shadow: none !important;
  padding: 2px 4px !important;
  margin: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
  line-height: 1.4;
  -webkit-appearance: none;
  appearance: none;
}

.nb-field-input:focus,
.nb-field-input:focus-visible,
.nb-field-input:active {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

/* Fix browser autofill / focus light-blue box bug */
.nb-field-input:-webkit-autofill,
.nb-field-input:-webkit-autofill:hover, 
.nb-field-input:-webkit-autofill:focus,
.nb-field-input:-webkit-autofill:active {
  -webkit-text-fill-color: #0F172A !important;
  -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset !important;
  box-shadow: 0 0 0 1000px #FFFFFF inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

.nb-field-input::placeholder {
  color: #94A3B8;
  font-weight: 500;
}

.nb-search-divider {
  width: 1px;
  height: 32px;
  background: #E2E8F0;
  margin: 0 4px;
  flex-shrink: 0;
}

.nb-glass-select {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  padding-right: 18px !important;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23475569' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 2px center !important;
}

.nb-search-submit-btn {
  background: #1B4D3E;
  color: #FFFFFF;
  border: none;
  border-radius: 999px;
  padding: 12px 28px;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(27, 77, 62, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nb-search-submit-btn:hover {
  background: #143B30;
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(27, 77, 62, 0.5);
}

/* Quick filter chips under search bar */
.nb-search-quick-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.nb-quick-tag-label {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  margin-right: 4px;
}

.nb-quick-tag {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  padding: 6px 14px;
  color: #FFFFFF;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
  transition: all 0.2s;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.nb-quick-tag:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.nb-quick-tag.active {
  background: #1B4D3E;
  border-color: #6EE7B7;
  color: #A7F3D0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

/* Section Headers */
.nb-section-head {
  max-width: 1440px;
  margin: 0 auto 16px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nb-section-title {
  font-size: 1.75rem;
  font-weight: 850;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.nb-view-all-link {
  font-size: 0.88rem;
  font-weight: 750;
  color: #A7F3D0;
  background: rgba(27, 77, 62, 0.85);
  border: 1px solid rgba(110, 231, 183, 0.4);
  backdrop-filter: blur(10px);
  padding: 6px 16px;
  border-radius: 999px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.nb-view-all-link:hover {
  background: #1B4D3E;
  color: #FFFFFF;
  transform: translateX(3px);
}

/* Carousel & Card Grid */
.nb-carousel-wrapper {
  max-width: 1440px;
  margin: 0 auto 40px;
  position: relative;
  padding: 0 4px;
}

.nb-carousel-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nb-carousel-nav-btn {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 25;
  font-size: 1.3rem;
  color: #1B4D3E;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nb-carousel-nav-btn.prev { left: -16px; }
.nb-carousel-nav-btn.next { right: -16px; }

.nb-carousel-nav-btn:hover {
  background: #1B4D3E;
  color: #FFFFFF;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 8px 24px rgba(27, 77, 62, 0.5);
}

/* Cards with Glassmorphism Over Background */
.nb-card {
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 30px -6px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nb-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -8px rgba(27, 77, 62, 0.35);
  border-color: rgba(110, 231, 183, 0.6);
}

.nb-card-img-wrap {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.nb-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.nb-card:hover .nb-card-img {
  transform: scale(1.07);
}

.nb-card-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #FF6B4A;
  color: #FFFFFF;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(255, 107, 74, 0.45);
  z-index: 2;
}

.nb-card-tag.compare {
  left: auto;
  right: 10px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.nb-heart-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #64748B;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s;
  z-index: 3;
}

.nb-heart-btn:hover {
  transform: scale(1.18);
}

.nb-card-img-overlay-badges {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.nb-card-img-overlay-badges span {
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(6px);
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

.nb-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.nb-card-title {
  font-size: 1.08rem;
  font-weight: 800;
  color: #1B4D3E;
  margin-bottom: 4px;
  line-height: 1.35;
}

.nb-card-location {
  font-size: 0.82rem;
  color: #64748B;
  margin-bottom: 12px;
}

.nb-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.nb-card-price-block {
  display: flex;
  flex-direction: column;
}

.nb-card-price-label {
  font-size: 0.72rem;
  color: #64748B;
  font-weight: 600;
}

.nb-card-price-value {
  font-size: 1.15rem;
  font-weight: 850;
  color: #1B4D3E;
}

.nb-card-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nb-card-view-btn {
  background: #1B4D3E;
  color: #FFFFFF;
  border: none;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 750;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(27, 77, 62, 0.3);
}

.nb-card-view-btn:hover {
  background: #143B30;
  transform: scale(1.04);
}

.nb-card-action-btn {
  background: #F1F5F9;
  color: #475569;
  border: 1px solid #CBD5E1;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.nb-card-action-btn:hover {
  background: #E2E8F0;
  color: #0F172A;
  transform: scale(1.04);
}

/* ========================================================
   DYNAMIC EXPANDED DETAIL VIEW - 5-STAR LUXURY EXPERIENCE
   ======================================================== */
.nb-expanded-detail-container {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  border-radius: 28px;
  padding: 32px;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.5);
  margin: 30px auto;
  max-width: 1360px;
  position: relative;
  overflow: hidden;
}

.nb-detail-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Header bar with badges and close button */
.nb-detail-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid #E2E8F0;
  flex-wrap: wrap;
  gap: 12px;
}

.nb-detail-badge-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nb-detail-badge {
  background: linear-gradient(135deg, #1B4D3E 0%, #0F3329 100%);
  color: #A7F3D0;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(27, 77, 62, 0.25);
}

.nb-detail-rating-pill {
  background: #FFFBEB;
  color: #B45309;
  border: 1px solid #FDE68A;
  font-size: 0.82rem;
  font-weight: 750;
  padding: 5px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nb-detail-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: #F1F5F9;
  color: #475569;
  border: 1px solid #CBD5E1;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 750;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nb-detail-close-btn:hover {
  background: #E2E8F0;
  color: #0F172A;
  transform: scale(1.03);
}

/* Grid Layout */
.nb-detail-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 36px;
  align-items: start;
}

@media (max-width: 960px) {
  .nb-detail-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Left Column */
.nb-detail-left-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nb-detail-title {
  font-size: 2rem;
  font-weight: 850;
  color: #0F172A;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0;
}

.nb-detail-location {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: #475569;
  font-weight: 600;
  flex-wrap: wrap;
}

.nb-detail-map-link {
  background: none;
  border: none;
  color: #2563EB;
  font-size: 0.82rem;
  font-weight: 750;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.nb-detail-map-link:hover {
  color: #1D4ED8;
}

.nb-detail-desc {
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.65;
  margin: 4px 0 8px;
}

.nb-detail-features-label {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748B;
  margin-top: 4px;
}

.nb-detail-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.nb-feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: #166534;
  font-size: 0.82rem;
  font-weight: 650;
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Rooms Container */
.nb-detail-rooms-box {
  margin-top: 10px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  padding: 18px 20px;
}

.nb-rooms-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.nb-rooms-box-title {
  font-size: 1rem;
  font-weight: 850;
  color: #1B4D3E;
}

.nb-rooms-box-badge {
  font-size: 0.74rem;
  font-weight: 750;
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
  padding: 3px 10px;
  border-radius: 999px;
}

.nb-rooms-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nb-room-row {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.nb-room-row:hover {
  border-color: #6EE7B7;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(27, 77, 62, 0.15);
}

.nb-room-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nb-room-name {
  font-size: 0.98rem;
  font-weight: 800;
  color: #0F172A;
}

.nb-room-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: #64748B;
  font-weight: 600;
}

.nb-room-avail-tag {
  color: #059669;
  font-weight: 750;
  background: #ECFDF5;
  padding: 2px 8px;
  border-radius: 6px;
}

.nb-room-action-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.nb-room-price-val {
  font-size: 1.15rem;
  font-weight: 900;
  color: #1B4D3E;
  letter-spacing: -0.01em;
}

.nb-room-book-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1B4D3E;
  color: #FFFFFF;
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(27, 77, 62, 0.3);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nb-room-book-btn:hover {
  background: #143B30;
  transform: scale(1.04);
  box-shadow: 0 6px 18px rgba(27, 77, 62, 0.45);
}

/* Right Column: Photos & Guarantee */
.nb-detail-right-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nb-detail-main-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.2);
}

.nb-detail-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nb-detail-img-counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 750;
  padding: 5px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nb-detail-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.nb-detail-thumb-wrap {
  aspect-ratio: 4/3;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.nb-detail-thumb-wrap:hover {
  transform: translateY(-2px);
  border-color: #6EE7B7;
}

.nb-detail-thumb-wrap.active {
  border-color: #1B4D3E;
  box-shadow: 0 0 0 2px #A7F3D0;
  transform: scale(1.02);
}

.nb-detail-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nb-detail-booking-perks {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nb-perk-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.nb-perk-icon {
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.nb-perk-text {
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.45;
}

.nb-perk-text strong {
  color: #0F172A;
}

.nb-collapse-btn:hover {
  background: #E2E8F0;
}

/* Fullscreen 4K Cinematic Video Modal */
.nb-video-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.nb-video-modal-container {
  background: #0B1D16;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  max-width: 1040px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
}

.nb-video-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.nb-video-modal-title {
  font-size: 1rem;
  font-weight: 750;
  color: #A7F3D0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nb-video-close-btn {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.nb-video-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.nb-video-player-wrap {
  position: relative;
  aspect-ratio: 16/9;
  background: #000000;
}

.nb-video-player-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nb-video-modal-footer {
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #94A3B8;
  font-size: 0.85rem;
  gap: 12px;
  flex-wrap: wrap;
}

/* Floating Chat Button */
.nb-floating-chat {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1B4D3E, #0E7C74);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(14, 124, 116, 0.45);
  cursor: pointer;
  z-index: 999;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nb-floating-chat:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 30px rgba(14, 124, 116, 0.65);
}

/* Responsive */
@media (max-width: 1100px) {
  .nb-carousel-track {
    grid-template-columns: repeat(2, 1fr);
  }
  .nb-detail-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .nb-glass-search {
    flex-wrap: wrap;
    border-radius: 24px;
    padding: 12px;
  }
  .nb-search-divider {
    display: none;
  }
  .nb-search-field {
    flex: 1 1 45%;
    padding: 6px 8px;
    border-bottom: 1px solid #F1F5F9;
  }
  .nb-search-submit-btn {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
  }
}

@media (max-width: 640px) {
  .nb-hero-title {
    font-size: 2.1rem;
  }
  .nb-search-field {
    flex: 1 1 100%;
  }
  .nb-carousel-track {
    grid-template-columns: 1fr;
  }
  .nb-detail-gallery {
    grid-template-columns: 1fr;
  }
  .nb-carousel-nav-btn {
    display: none;
  }
}

/* Midnight / Dark Mode */
body.midnight-mode .nb-card,
body[data-theme="dark"] .nb-card,
body.midnight-mode .nb-expanded-detail-container,
body[data-theme="dark"] .nb-expanded-detail-container {
  background: rgba(16, 35, 31, 0.95);
  border-color: #23453D;
}

body.midnight-mode .nb-card-title,
body[data-theme="dark"] .nb-card-title,
body.midnight-mode .nb-detail-title,
body[data-theme="dark"] .nb-detail-title,
body.midnight-mode .nb-card-price-value,
body[data-theme="dark"] .nb-card-price-value,
body.midnight-mode .nb-price-main,
body[data-theme="dark"] .nb-price-main {
  color: #7FE0CB;
}

body.midnight-mode .nb-glass-search,
body[data-theme="dark"] .nb-glass-search {
  background: rgba(16, 35, 31, 0.94);
  border-color: rgba(35, 69, 61, 0.9);
}

body.midnight-mode .nb-glass-select,
body[data-theme="dark"] .nb-glass-select,
body.midnight-mode .nb-search-input-box input,
body[data-theme="dark"] .nb-search-input-box input {
  color: #F1F5F9;
}


/* ========================================================
   TRAVEL TOP NAVIGATION BAR & HERO REDESIGN (VIDEO BANNER)
   ======================================================== */
.nb-travel-header-bar {
  position: relative;
  z-index: 20;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.nb-travel-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
}
.nb-travel-brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #D97706, #B45309);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}
.nb-travel-brand-name {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.22rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.nb-travel-brand-name span {
  color: #F59E0B;
}
.nb-travel-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nb-travel-nav-item {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.86rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}
.nb-travel-nav-item:hover,
.nb-travel-nav-item.active {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.18);
}
.nb-travel-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nb-travel-admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #E2E8F0;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.nb-travel-admin-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #FFF;
}
.nb-travel-book-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #B45309, #D97706);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #FFFFFF;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(180, 83, 9, 0.45);
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.nb-travel-book-btn:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.6);
  background: linear-gradient(135deg, #D97706, #F59E0B);
}
.nb-travel-mascot {
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
  display: flex;
  align-items: center;
  justify-content: center;
}
.nb-travel-mascot:hover {
  transform: scale(1.18) rotate(6deg);
}

/* ========================================================
   HERO BANNER - CINEMATIC FULL VIEWPORT (Video only + down arrow)
   ======================================================== */
.nb-hero-banner {
  position: relative;
  z-index: 5;
  margin: 0 auto;
  max-width: 100%;
  width: 100%;
  height: calc(100vh - var(--header-h));
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 0 16px 44px;
  text-align: center;
  box-sizing: border-box;
}

/* Content section: tiêu đề + nút + search ngay sau hero, gần nhau */
.nb-content-section {
  position: relative;
  z-index: 5;
  max-width: 1440px;
  margin: 0 auto;
  padding: 60px 16px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}


/* Scroll Down To Explore Indicator (Centered Bottom) */
.nb-scroll-explore {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.nb-scroll-explore:hover {
  transform: translateY(3px);
}
.nb-scroll-text {
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #FFFFFF;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}
.nb-scroll-circle-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid rgba(255, 255, 255, 0.45);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), 0 0 15px rgba(255, 255, 255, 0.2);
  animation: bounceChevron 2.2s infinite ease-in-out;
  transition: all 0.25s ease;
}
.nb-scroll-explore:hover .nb-scroll-circle-btn {
  background: rgba(217, 119, 6, 0.9);
  border-color: #FBBF24;
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(217, 119, 6, 0.6), 0 0 20px rgba(251, 191, 36, 0.5);
}

@keyframes bounceChevron {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(8px);
  }
  60% {
    transform: translateY(4px);
  }
}

/* Sound / Mute Toggle Button in Hero */
.nb-sound-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: all 0.2s ease;
}
.nb-sound-toggle-btn:hover {
  background: rgba(217, 119, 6, 0.8);
  border-color: #F59E0B;
  transform: translateY(-2px);
}
.nb-sound-toggle-btn.is-active {
  background: linear-gradient(135deg, #10B981, #059669);
  border-color: #34D399;
}

/* Right Floating Action Stack (Matching Screenshot) */
.nb-travel-floating-stack {
  position: fixed;
  right: 18px;
  bottom: 90px;
  z-index: 9997;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nb-travel-float-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #2D1A10;
  border: 1.5px solid rgba(217, 119, 6, 0.55);
  color: #F59E0B;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
}
.nb-travel-float-btn:hover {
  transform: scale(1.12);
  background: #452414;
  border-color: #F59E0B;
  color: #FEF3C7;
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.55);
}
.nb-travel-float-btn svg {
  width: 22px;
  height: 22px;
}
.nb-travel-float-btn .float-tooltip {
  position: absolute;
  right: 58px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.92);
  color: #FFF;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.nb-travel-float-btn:hover .float-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(-4px);
}

@media (max-width: 992px) {
  .nb-travel-nav-links {
    display: none;
  }
  .nb-travel-header-bar {
    padding: 8px 14px;
  }
  .nb-travel-brand-name {
    font-size: 1.05rem;
  }
}
@media (max-width: 640px) {
  .nb-hero-banner {
    min-height: calc(75vh - 20px);
    padding-bottom: 20px;
  }
  .nb-travel-admin-btn {
    display: none;
  }
  .nb-travel-floating-stack {
    right: 12px;
    bottom: 75px;
  }
  .nb-travel-float-btn {
}
}

/* TTS Modal - Text to Speech Guard */
#ttsModal:not(.open) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#ttsModal.open {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

