/* ==========================================================================
   BẢN ĐỒ SỐ DI TÍCH LỊCH SỬ CÁCH MẠNG HUẾ (1954 - 1975)
   STYLESHEET LÀM MỊN & RESPONSIVE ĐA THIẾT BỊ (CMS & VIEW HOME)
   ========================================================================== */

/* 1. Global Polish & Font Rendering */
:root {
  --primary-color: #113859;
  --primary-hover: #0c2740;
  --accent-color: #2563eb;
  --success-color: #16a34a;
  --warning-color: #f59e0b;
  --danger-color: #dc2626;
  --info-color: #0284c7;
  --bg-light: #f8fafc;
  --border-color: #e2e8f0;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

html, body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  color: var(--text-dark);
  background-color: var(--bg-light);
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}

/* Đồng bộ toàn bộ Modal, tiêu đề, và các nhãn văn bản về font Nunito chuẩn của toàn hệ thống */
.modal,
.modal-dialog,
.modal-content,
.modal-header,
.modal-title,
.modal-body,
.modal-footer,
.modal-delete,
.modal-delete .modal-title,
.modal-delete .modal-confirm-question,
.modal-delete .notiDelDn,
.modal-delete .titleDnDelete,
.modal-delete #titleDiTichDel,
.modal-delete .warning,
.modal-delete .text-muted,
.modal-delete .btn,
.editor-label,
label {
  font-family: "Nunito", sans-serif !important;
}

/* Styling chuẩn, vừa vặn, trực quan và căn giữa cho Modal xác nhận xóa */
#modalDeleteDiTich .modal-dialog,
#modalDeleteImage .modal-dialog,
.modal-dialog:has(.modal-delete) {
  max-width: 480px !important;
  margin: 1.75rem auto !important;
}

.modal-content.modal-delete,
.modal-delete {
  border-radius: 12px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08) !important;
  font-family: "Nunito", sans-serif !important;
  background-color: #ffffff !important;
}

.modal-delete .modal-header {
  position: relative !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  padding: 20px 24px 10px 24px !important;
  border-bottom: none !important;
}

.modal-delete .modal-title,
.modal-delete .modal-delete-title {
  font-family: "Nunito SemiBold", "Nunito", sans-serif !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #dc2626 !important;
  text-align: center !important;
  width: 100% !important;
  margin: 0 !important;
  line-height: 1.4 !important;
}

.modal-delete .modal-title i,
.modal-delete .modal-delete-title i {
  font-size: 18px !important;
}

.modal-delete .btn-close {
  position: absolute !important;
  right: 18px !important;
  top: 18px !important;
  font-size: 13px !important;
  opacity: 0.65 !important;
  padding: 0.5rem !important;
  margin: 0 !important;
}

.modal-delete .btn-close:hover {
  opacity: 1 !important;
}

.modal-delete .modal-body {
  padding: 12px 28px 18px 28px !important;
  text-align: center !important;
}

.modal-delete .modal-confirm-question {
  font-family: "Nunito", sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #1f2937 !important;
  margin-bottom: 8px !important;
  line-height: 1.5 !important;
}

.modal-delete #titleDiTichDel,
.modal-delete .titleDiTichDel,
.modal-delete .modal-delete-target-title {
  font-family: "Nunito SemiBold", "Nunito", sans-serif !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #2563eb !important;
  line-height: 1.5 !important;
  margin: 8px 0 !important;
  word-break: break-word !important;
}

.modal-delete .modal-delete-subtext,
.modal-delete .text-muted {
  font-family: "Nunito", sans-serif !important;
  font-size: 13.5px !important;
  color: #64748b !important;
  line-height: 1.5 !important;
  margin-top: 6px !important;
}

.modal-delete .modal-footer {
  border-top: none !important;
  padding: 4px 24px 24px 24px !important;
  justify-content: center !important;
  display: flex !important;
  gap: 14px !important;
}

.modal-delete .btn {
  font-family: "Nunito SemiBold", "Nunito", sans-serif !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  padding: 7px 24px !important;
  border-radius: 8px !important;
  min-width: 100px !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* 2. Public Home View Styling & Responsiveness */

/* Header Banner màu chủ đạo Di tích Lịch sử Cách mạng Huế (Đỏ cờ cách mạng & Xanh trầm di tích lịch sử cách mạng Huế) */
.groupbgMenu {
  background: linear-gradient(135deg, #780206 0%, #991b1b 32%, #113859 75%, #081a2f 100%) !important;
  border-bottom: 3px solid #f59e0b !important; /* Dải viền vàng hoàng kim cách mạng */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
  position: relative;
  z-index: 1000;
}
.groupbgMenu::before {
  display: none !important; /* Loại bỏ lớp phủ tối mờ của template cũ */
}

.groupMenu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 8px 0;
}

.menuLogo {
  display: flex;
  align-items: center;
}

.heritage-emblem {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.45);
  border: 2px solid #fef08a;
  color: #ffffff;
  font-size: 20px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}
.menuLogo:hover .heritage-emblem {
  transform: rotate(-10deg) scale(1.08);
}

.header-main-title {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff !important;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  line-height: 1.25;
  margin-bottom: 2px;
}

.header-sub-title {
  font-size: 11.5px;
  font-weight: 600;
  color: #fef08a !important; /* Vàng kim */
  letter-spacing: 0.6px;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  opacity: 0.95;
}

/* Menu điều hướng trên Header */
.header-nav-link {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px !important;
  padding: 6px 16px !important;
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.header-nav-link:hover,
.header-nav-link.active {
  background: #ffffff !important;
  color: #991b1b !important;
  border-color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.header-nav-link.nav-link-cms {
  background: rgba(245, 158, 11, 0.25);
  border-color: #f59e0b;
  color: #fef08a !important;
}
.header-nav-link.nav-link-cms:hover {
  background: #f59e0b !important;
  color: #ffffff !important;
}

/* Nút công cụ tròn bên phải Header */
.btn-login {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-header-tool {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
  font-size: 15px;
  transition: all 0.2s ease;
  text-decoration: none;
  cursor: pointer;
}

.btn-header-tool:hover {
  background: #ffffff;
  color: #991b1b !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.btn-header-tool.btn-header-logout {
  background: rgba(220, 38, 38, 0.35);
  border-color: rgba(220, 38, 38, 0.6);
}
.btn-header-tool.btn-header-logout:hover {
  background: #dc2626;
  color: #ffffff !important;
}

/* Home Map Container */
.body-tree {
  padding-top: 0 !important;
  position: relative;
  width: 100%;
}

.map-home,
#viewDiv {
  height: calc(100dvh - 64px) !important;
  min-height: 450px;
  width: 100%;
  position: relative;
}

/* Sidebars on Home Map (Lớp bản đồ, Tìm kiếm, Chỉ đường) */
.map-sidebar-home.map-sidebar,
.show_sidemenu.show_sidemenu_home {
  top: 76px;
  left: 20px;
  width: 380px;
  max-width: 92vw;
  height: calc(100vh - 160px);
  max-height: 720px;
  z-index: 99;
  position: absolute;
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg) !important;
  overflow-y: auto;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-display {
  display: none !important;
}

.show_sidemenu .nav-tabs {
  border-bottom: 2px solid #e2e8f0;
}

.show_sidemenu .nav-tabs .nav-link {
  font-weight: 600;
  color: var(--text-muted);
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
}

.show_sidemenu .nav-tabs .nav-link.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  background: transparent;
}

/* Footer di tích lịch sử cách mạng Huế */
.footer-heritage {
  background: linear-gradient(135deg, #091726 0%, #0f2742 50%, #1e1115 100%) !important;
  color: #e2e8f0;
  position: relative;
  border-top: 3px solid #d97706 !important;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.25);
  text-align: left !important;
  font-style: normal !important;
  font-weight: normal !important;
}

.footer-heritage p {
  text-align: left !important;
  font-style: normal !important;
  font-weight: normal !important;
}

.footer-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f59e0b;
  font-size: 20px;
  flex-shrink: 0;
}

.footer-title {
  letter-spacing: 0.5px;
  line-height: 1.35;
}

.footer-author-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
}

.footerHome {
  background: transparent;
}

/* 3. CMS Polish & Modern Layout */

/* CMS Header Bar */
.toggleAdmin {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.panelRight {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  color: var(--text-dark);
  text-decoration: none;
  background: #f1f5f9;
  transition: all 0.2s ease;
}

.btn-toggle:hover {
  background: #e2e8f0;
  color: var(--primary-color);
}

.titleMenuCayXanh {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 0.3px;
}

.administrator {
  display: flex;
  align-items: center;
}

.avatar-admin img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  object-fit: cover;
}

.userName {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 14px;
}

/* CMS Content Container */
#content {
  background-color: var(--bg-light);
  min-height: calc(100vh - 120px);
}

.cus-form-general {
  padding: 8px 0;
}

.form-general.viewQlCayXanh {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

.titlePage .TrangChu.title-layout,
.titleViewCMS {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.3px;
}

/* Form Controls & Inputs Polish */
.editor-label {
  font-weight: 600;
  font-size: 14px;
  color: #334155;
  margin-bottom: 6px;
  display: block;
}

.form-control {
  border: 1px solid #cbd5e1 !important;
  border-radius: var(--radius-sm) !important;
  padding: 8px 12px !important;
  font-size: 14px !important;
  color: #1e293b !important;
  background-color: #ffffff !important;
  transition: all 0.2s ease-in-out !important;
}

.form-control:focus {
  border-color: var(--accent-color) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
  outline: none !important;
}

textarea.form-control {
  line-height: 1.6 !important;
}

/* Button Refinement & Hover Effects */
.btn {
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: translateY(0);
}

/* Action Buttons in Data Table (Always Crisp & Visible) */
.btn-action-view,
.btn-action-edit,
.btn-action-delete {
  width: 34px !important;
  height: 34px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: var(--radius-sm) !important;
  border: none !important;
  color: #ffffff !important;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease !important;
}

.btn-action-view {
  background-color: var(--info-color) !important;
}
.btn-action-view:hover {
  background-color: #0369a1 !important;
  color: #ffffff !important;
}

.btn-action-edit {
  background-color: var(--warning-color) !important;
}
.btn-action-edit:hover {
  background-color: #d97706 !important;
  color: #ffffff !important;
}

.btn-action-delete {
  background-color: var(--danger-color) !important;
}
.btn-action-delete:hover {
  background-color: #b91c1c !important;
  color: #ffffff !important;
}

/* Outline Buttons Visibility */
.btn-outline-secondary {
  background-color: #ffffff !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
}
.btn-outline-secondary:hover {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

.btn-outline-primary {
  background-color: #ffffff !important;
  color: var(--accent-color) !important;
  border: 1px solid var(--accent-color) !important;
}
.btn-outline-primary:hover {
  background-color: var(--accent-color) !important;
  color: #ffffff !important;
}

/* Hide unwanted DataTables search box (Lọc nhanh) */
.dataTables_filter,
#dataGridDiTich_filter {
  display: none !important;
}

/* Action Icons */
.action-icon {
  font-size: 16px !important;
  transition: transform 0.15s ease, opacity 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.action-icon:hover {
  transform: scale(1.2);
  opacity: 0.85;
}

/* Data Table Polish */
.dataTable {
  border-collapse: separate !important;
  border-spacing: 0;
  width: 100% !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-md);
  overflow: hidden;
}

table#dataGridDiTich thead th,
table.dataTable.tableCayXanh thead th,
table.dataTable thead th,
.tableCayXanh thead th {
  background-color: #113859 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  border-bottom: 2px solid #0c2740 !important;
  padding: 12px 10px !important;
  vertical-align: middle !important;
}

.dataTable tbody td {
  padding: 12px 10px !important;
  vertical-align: middle !important;
  font-size: 14px;
  border-bottom: 1px solid #f1f5f9 !important;
}

.dataTable tbody tr:hover {
  background-color: #f8fafc !important;
}

/* Phân trang DataTables cách bảng rộng rãi, thoáng mắt */
.page-record-custom {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 16px !important;
  margin-top: 24px !important;
  padding-top: 16px !important;
  padding-bottom: 10px !important;
  border-top: 1px solid #f1f5f9 !important;
}

.dataTables_wrapper > .dataTables_length,
.dataTables_wrapper > .dataTables_paginate {
  margin-top: 24px !important;
  padding-top: 8px !important;
  margin-bottom: 12px !important;
}

.page-record-custom .dataTables_length,
.dataTables_wrapper .dataTables_length {
  display: flex !important;
  align-items: center !important;
  font-size: 14.5px !important;
  color: #4b5563 !important;
  height: auto !important;
}

.page-record-custom .dataTables_length select,
.dataTables_wrapper .dataTables_length select {
  margin: 0 8px !important;
  padding: 5px 12px !important;
  border-radius: 6px !important;
  border: 1px solid #d1d5db !important;
  background-color: #ffffff !important;
  font-weight: 600 !important;
  color: #1f2937 !important;
  cursor: pointer;
}

.page-record-custom .dataTables_paginate,
.dataTables_wrapper .dataTables_paginate {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button,
.page-record-custom .dataTables_paginate .paginate_button {
  border-radius: var(--radius-sm) !important;
  border: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  color: #334155 !important;
  margin: 0 2px !important;
  padding: 5px 12px !important;
  min-width: 34px !important;
  height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 600;
  transition: all 0.15s ease-in-out;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.disabled),
.page-record-custom .dataTables_paginate .paginate_button:hover:not(.disabled) {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover,
.page-record-custom .dataTables_paginate .paginate_button.current,
.page-record-custom .dataTables_paginate .paginate_button.current:hover {
  background: var(--primary-color) !important;
  color: #ffffff !important;
  border-color: var(--primary-color) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.page-record-custom .dataTables_paginate .paginate_button.disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #94a3b8 !important;
}

/* CMS Footer */
footer.footer {
  background: #ffffff !important;
  border-top: 1px solid var(--border-color) !important;
  padding: 12px 20px !important;
  font-size: 13px;
  color: var(--text-muted);
}

/* ==========================================================================
   4. RESPONSIVE BREAKPOINTS (MEDIA QUERIES)
   ========================================================================== */

/* Laptop & Desktop chuẩn (992px - 1200px) */
@media screen and (max-width: 1200px) {
  .titleMenuCayXanh {
    font-size: 15px;
  }
  .form-general.viewQlCayXanh {
    padding: 20px;
  }
}

/* Tablet (768px - 991px) */
@media screen and (max-width: 991px) {
  .header-main-title {
    font-size: 14.5px;
  }
  .header-sub-title {
    font-size: 10.5px;
  }
  .heritage-emblem {
    width: 38px;
    height: 38px;
    font-size: 17px;
  }

  .map-sidebar-home.map-sidebar,
  .show_sidemenu.show_sidemenu_home {
    width: 340px;
    top: 70px;
    left: 12px;
  }

  .titleMenuCayXanh {
    font-size: 14px;
  }

  .form-general.viewQlCayXanh {
    padding: 16px;
  }

  .table-tree-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Mobile ngang & Tablet nhỏ (max-width: 768px) */
@media screen and (max-width: 768px) {
  /* Header Home */
  .groupMenu {
    min-height: 56px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .header-main-title {
    font-size: 12.5px;
    line-height: 1.2;
  }
  .header-sub-title {
    font-size: 9.5px;
  }
  .heritage-emblem {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .menu {
    order: 3;
    width: 100%;
    margin-top: 4px;
  }

  .menu .navbar-nav {
    flex-direction: row;
    gap: 8px;
  }

  .menu .navbar-nav .nav-link {
    padding: 4px 8px !important;
    font-size: 13px;
  }

  /* Home Map & Sidebars */
  .map-home,
  #viewDiv {
    height: calc(100dvh - 100px) !important;
    min-height: 400px;
  }

  .map-sidebar-home.map-sidebar,
  .show_sidemenu.show_sidemenu_home {
    top: 62px !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: calc(100vw - 16px) !important;
    height: auto !important;
    max-height: calc(100dvh - 80px) !important;
    border-radius: var(--radius-md) !important;
  }

  /* CMS Header */
  .toggleAdmin {
    padding: 0 12px;
    min-height: 54px;
  }

  .titleMenuCayXanh {
    font-size: 13px;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .userName {
    display: none;
  }

  /* CMS Pages */
  .titleTable {
    flex-direction: column;
    align-items: stretch !important;
    gap: 12px;
  }

  .titleTable .group-button-action {
    justify-content: space-between;
    width: 100%;
  }

  .title-btn-back {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 10px;
  }

  .title-btn-back .group-button-action {
    width: 100%;
    justify-content: flex-end;
  }

  .form-general.viewQlCayXanh {
    padding: 14px;
    border-radius: var(--radius-md);
  }

  .table-tree-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-bottom: 12px;
  }

  .dataTable thead th,
  .dataTable tbody td {
    white-space: nowrap;
  }

  /* Footer CMS */
  footer.footer .container-fluid {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 6px;
  }
}

/* Smartphone dọc (max-width: 576px) */
@media screen and (max-width: 576px) {
  .nameCuisine span:first-child {
    font-size: 12px;
  }
  .nameCuisine span:last-child {
    display: none; /* Ẩn dòng phụ trên điện thoại nhỏ để tránh vỡ giao diện */
  }

  .titleMenuCayXanh {
    max-width: 150px;
    font-size: 12px;
  }

  .btn {
    padding: 7px 12px;
    font-size: 13px;
  }

  .form-general.viewQlCayXanh {
    padding: 10px;
  }

  #viewDiv {
    height: 300px !important;
    min-height: 280px;
  }

  /* Nút thao tác dưới cùng form */
  .form-general .group-button-action {
    flex-direction: column-reverse;
    width: 100%;
  }

  .form-general .group-button-action .btn {
    width: 100%;
  }

  /* Preview ảnh */
  #imagesPreviewList,
  #existingImagesList,
  #newImagesPreviewList {
    justify-content: center;
  }
}

/* Màn hình siêu lớn (min-width: 1800px) */
@media screen and (min-width: 1800px) {
  .container-new,
  .container-fluid {
    max-width: 1720px;
  }
  .form-control,
  .btn {
    font-size: 15px;
  }
}

/* ==============================================================
   MODAL THÔNG TIN DI TÍCH (TRANG HOME) & TRANG CHI TIẾT
   ============================================================== */

/* 1. Modal thông tin nhanh di tích trên bản đồ */
.modal-di-tich-quick {
  max-width: 680px !important;
  width: 92% !important;
  margin: 1.75rem auto !important;
}

#modalDiTichQuickInfo .modal-content {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

#modalDiTichQuickInfo .modal-body {
  max-height: calc(85vh - 130px);
  overflow-y: auto;
}

#modalDiTichQuickInfo #quickTenDayDu {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  color: #113859;
  word-break: break-word;
}

#modalDiTichQuickInfo #quickTenVietTat {
  font-size: 0.85rem;
  color: #64748b;
  word-break: break-word;
}

#modalDiTichQuickInfo #quickLoaiHinh {
  white-space: normal !important;
  word-break: break-word !important;
  text-align: left;
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.4;
  padding: 4px 10px;
  border-radius: 6px;
  background-color: #475569 !important;
  max-width: 100%;
}

#modalDiTichQuickInfo .quick-info-box {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
}

#modalDiTichQuickInfo .quick-info-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}

#modalDiTichQuickInfo .quick-info-val {
  font-size: 13.5px;
  color: #1e293b;
  line-height: 1.55;
  word-break: break-word;
}

@media (max-width: 576px) {
  .modal-di-tich-quick {
    max-width: 96% !important;
    width: 96% !important;
    margin: 0.5rem auto !important;
  }
  #modalDiTichQuickInfo .modal-body {
    padding: 16px !important;
  }
}

/* 2. Thống nhất Typography trang Chi tiết di tích */
.ditich-detail-wrapper {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#detailTenDayDu {
  font-size: 1.38rem !important;
  font-weight: 700;
  line-height: 1.35;
  color: #113859 !important;
  word-break: break-word;
}

#detailTenVietTat {
  font-size: 0.92rem !important;
  color: #64748b !important;
  word-break: break-word;
}

#detailLoaiHinh,
.badge-loaihinh-detail {
  white-space: normal !important;
  word-break: break-word !important;
  text-align: left !important;
  display: inline-block !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  padding: 5px 14px !important;
  border-radius: 6px !important;
  background-color: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
  max-width: 100%;
}

.card-detail-section .info-label {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #64748b !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
  margin-bottom: 4px !important;
}

.card-detail-section .info-value {
  font-size: 14px !important;
  color: #1e293b !important;
  line-height: 1.6 !important;
  word-break: break-word;
}

.card-detail-header h5 {
  font-size: 1rem !important;
  font-weight: 700 !important;
}

.history-card h6 {
  font-size: 13.5px !important;
  font-weight: 700 !important;
}

/* 3. Tối đa 3 dòng và hiển thị ... cho các ô nhiều dữ liệu trong bảng CMS */
.cell-clamp-3,
#dataGridDiTich td .cell-clamp-3 {
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.45 !important;
  max-height: calc(1.45em * 3) !important;
  word-break: break-word !important;
}

#dataGridDiTich td {
  vertical-align: middle !important;
}

/* ==============================================================
   4. CMS RESPONSIVE TOÀN DIỆN (TABLET, MOBILE & PHÂN GIẢI < 992px)
   ============================================================== */
@media screen and (max-width: 991.98px) {
  /* Content Wrapper: 100% full width */
  body:not(.sidebar-mini-md) .content-wrapper,
  .content-wrapper,
  .sidebar-mini .content-wrapper,
  .sidebar-mini.sidebar-collapse .content-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  /* Main Sidebar: Drawer trượt từ bên trái */
  .main-sidebar,
  .sidebar-mini .main-sidebar,
  .sidebar-mini.sidebar-collapse .main-sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 260px !important;
    margin-left: -260px !important;
    z-index: 1050 !important;
    transition: margin-left 0.3s ease-in-out !important;
    box-shadow: none !important;
  }

  /* Khi mở sidebar */
  body.sidebar-open .main-sidebar {
    margin-left: 0 !important;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.45) !important;
  }

  /* Lớp phủ mờ nền khi mở sidebar */
  body.sidebar-open::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1045;
  }

  /* Header CMS trên tablet / mobile */
  .toggleAdmin {
    padding: 10px 14px !important;
  }

  .panelRight .titleMenuCayXanh span {
    font-size: 15px !important;
    line-height: 1.3 !important;
  }

  .panelRight .btn-toggle {
    margin-right: 8px !important;
    font-size: 20px !important;
  }

  .navAdmin .userName {
    max-width: 110px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
  }

  /* Content padding */
  #content .container-fluid {
    padding: 10px !important;
  }

  .cus-form-general,
  .form-general-home.cus-form-general {
    padding: 14px 10px !important;
  }

  /* Title bar danh sách di tích */
  .titleTable {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .titleTable .titlePage .TrangChu {
    font-size: 17px !important;
  }
}

/* Đảm bảo bảng danh sách di tích scroll ngang mượt mà, không bị ép mất cột */
.table-responsive {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  width: 100% !important;
}

#dataGridDiTich {
  min-width: 900px !important;
}

/* ==============================================================
   5. TÙY CHỈNH FORM ĐĂNG NHẬP (TRÁNH ICON ĐÈ LÊN PLACEHOLDER)
   ============================================================== */
.login-form .user,
.login-form .pwd {
  position: relative !important;
  margin-bottom: 16px !important;
}

.login-form .user input.form-control {
  padding-left: 48px !important;
  padding-right: 16px !important;
  height: 48px !important;
  font-size: 15px !important;
}

.login-form .pwd input.form-control {
  padding-left: 48px !important;
  padding-right: 48px !important;
  height: 48px !important;
  font-size: 15px !important;
}

.login-form .user:before,
.login-form .user::before {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  left: 15px !important;
  width: 22px !important;
  height: 22px !important;
  content: "" !important;
  display: block !important;
  background: url("../lib/imgages/icon-nv.svg") no-repeat center center !important;
  background-size: contain !important;
  z-index: 5 !important;
  pointer-events: none !important;
}

.login-form .pwd:before,
.login-form .pwd::before {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  left: 15px !important;
  width: 22px !important;
  height: 22px !important;
  content: "" !important;
  display: block !important;
  background: url("../lib/imgages/icon-lock.svg") no-repeat center center !important;
  background-size: contain !important;
  z-index: 5 !important;
  pointer-events: none !important;
}

.login-form .pwd .toggle-password {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  right: 14px !important;
  cursor: pointer !important;
  z-index: 5 !important;
  user-select: none !important;
  color: #94a3b8 !important;
}

