/* ==========================================================================
   54 DÂN TỘC VIỆT NAM - NỀN TẢNG TRI THỨC MỞ & BẢN ĐỒ 34 TỈNH SAU SÁP NHẬP
   Design System & Styling
   ========================================================================== */

/* Nạp font chuẩn Tiếng Việt: Be Vietnam Pro (Local cache 0ms) + Fallback Google CDN */
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/BeVietnamPro-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/BeVietnamPro-SemiBold.ttf') format('truetype');
}

@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/BeVietnamPro-Bold.ttf') format('truetype');
}

@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/BeVietnamPro-ExtraBold.ttf') format('truetype');
}

@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('/fonts/BeVietnamPro-Black.ttf') format('truetype');
}

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600;700&family=Dancing+Script:wght@700&family=Be+Vietnam+Pro:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,600;1,700&display=swap');

:root {
  --primary-navy: #0F2537;
  --primary-dark: #0A1926;
  --primary-blue: #1E6091;
  --accent-gold: #F4A228;
  --accent-gold-dark: #D98218;
  --accent-lime: #B8F234;
  --accent-emerald: #10B981;
  --accent-crimson: #EF4444;
  --accent-purple: #8B5CF6;

  --bg-page: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-card-subtle: #F1F5F9;
  --border-color: #E2E8F0;
  --border-focus: #CBD5E1;

  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --text-white: #FFFFFF;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 37, 55, 0.08);
  --shadow-lg: 0 10px 25px -5px rgba(15, 37, 55, 0.12);
  --shadow-xl: 0 20px 35px -10px rgba(15, 37, 55, 0.18);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* ==========================================================================
     TYPOGRAPHY SYSTEM CHUẨN TIẾNG VIỆT (KHÔNG LỖI DẤU, KHÔNG VỠ FONT 800/900)
     Hỗ trợ đầy đủ bộ ký tự Tiếng Việt có dấu phức tạp: Ộ, Ậ, Ắ, Ỳ, Đ...
     Loại bỏ hoàn toàn 'Montserrat' để triệt tiêu lỗi đè glyph trên Windows.
     ========================================================================== */
  --font-sans: 'Be Vietnam Pro', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-script: 'Be Vietnam Pro', 'Dancing Script', 'Caveat', cursive, sans-serif;
  --transition-smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode Overrides */
body.dark-mode {
  --bg-page: #0B1118;
  --bg-card: #131E29;
  --bg-card-subtle: #192634;
  --border-color: #233446;
  --border-focus: #354E69;
  --text-main: #F1F5F9;
  --text-muted: #94A3B8;
  --text-light: #64748B;
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body,
button,
input,
select,
textarea {
  font-family: var(--font-sans);
}

/* Web Awesome Vector SVG & wa-icon Core Rules (Chuẩn https://webawesome.com/ - 0ms Cache) */
wa-icon,
svg:not(:root).svg-inline--fa,
svg.svg-inline--fa {
  overflow: visible;
  box-sizing: content-box !important;
  display: inline-block;
  height: 1em;
  width: 1em;
  vertical-align: -0.125em;
  font-size: inherit;
  fill: currentColor;
  contain: strict;
  line-height: 1;
}

wa-icon:not(:defined) {
  visibility: hidden;
}

wa-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

i[class*="fa-"] {
  display: inline-block;
  width: 1em;
  height: 1em;
  text-align: center;
  font-style: normal;
  vertical-align: -0.125em;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ==========================================================================
   HEADER NAVIGATION (CHỐT PHONG CÁCH ẢNH 1 & ẢNH MỚI)
   ========================================================================== */
.app-header {
  background-color: var(--primary-navy);
  color: var(--text-white);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.header-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  user-select: none;
}

.logo-emblem {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.bronze-drum-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 6px rgba(244, 162, 40, 0.4));
  transition: transform 0.4s ease;
}

.brand-logo:hover .bronze-drum-svg {
  transform: rotate(30deg);
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #FFFFFF;
  line-height: 1.2;
}

.brand-slogan {
  font-size: 0.72rem;
  color: #CBD5E1;
  font-weight: 400;
  letter-spacing: 0.2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Triệt tiêu 100% gạch chân trên mọi liên kết & menu */
a,
a:hover,
a:focus,
a:visited,
a:active,
a *,
.nav-link,
.nav-link *,
.drawer-nav-item,
.drawer-nav-item *,
.brand-logo,
.brand-logo *,
.bottom-bar-item,
.bottom-bar-item * {
  text-decoration: none !important;
}

.nav-link {
  background: transparent;
  border: 1px solid transparent;
  color: #CBD5E1;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  text-decoration: none !important;
}

.nav-link i,
.nav-link wa-icon {
  font-size: 0.95rem;
}

.nav-link:hover {
  color: #F4A228 !important;
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  text-decoration: none !important;
}

.nav-link.active {
  color: #F4A228 !important;
  font-weight: 700;
  background-color: rgba(244, 162, 40, 0.15);
  border: 1px solid rgba(244, 162, 40, 0.4);
  box-shadow: 0 0 12px rgba(244, 162, 40, 0.12);
  text-decoration: none !important;
}

.nav-link.active::after {
  display: none !important;
}

.admin-nav-btn {
  background-color: rgba(184, 242, 52, 0.15);
  color: var(--accent-lime);
  border: 1px solid rgba(184, 242, 52, 0.35);
  font-weight: 600;
}

.admin-nav-btn:hover {
  background-color: rgba(184, 242, 52, 0.25);
  color: #FFFFFF;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.quick-search-box {
  position: relative;
  width: 250px;
}

.quick-search-box input {
  width: 100%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  padding: 0.5rem 1rem 0.5rem 2.2rem;
  color: #FFFFFF;
  font-size: 0.84rem;
  outline: none;
  transition: var(--transition-smooth);
}

.quick-search-box input::placeholder {
  color: #94A3B8;
}

.quick-search-box input:focus {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--accent-gold);
  width: 290px;
}

.quick-search-box .search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  font-size: 0.85rem;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  max-height: 380px;
  overflow-y: auto;
  z-index: 1100;
  color: var(--text-main);
  padding: 0.5rem;
}

.search-dropdown.hidden {
  display: none;
}

.search-drop-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.15s;
}

.search-drop-item:hover {
  background-color: var(--bg-card-subtle);
}

.search-drop-item img {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  object-position: top center;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #CBD5E1;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.3rem 0.8rem 0.3rem 0.35rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: var(--transition-smooth);
}

.user-pill:hover {
  background: rgba(255, 255, 255, 0.2);
}

.avatar-small {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  object-fit: cover;
  object-position: top center;
}

.user-role-tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-gold);
}

/* Sub-header Banner (34 tỉnh mới) */
.sub-header-alert {
  background: linear-gradient(90deg, #1E3A8A, #1E40AF);
  color: #FFFFFF;
  padding: 0.5rem 1.5rem;
  font-size: 0.83rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.alert-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.badge-new {
  background: var(--accent-gold);
  color: #000000;
  font-weight: 700;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.btn-text-link {
  background: none;
  border: none;
  color: var(--accent-lime);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  margin-left: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* ==========================================================================
   VIEW TOGGLE ENGINE
   ========================================================================== */
.main-content-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.app-view {
  display: none;
  flex: 1;
}

.app-view.active {
  display: block;
}

/* ==========================================================================
   VIEW 1: TRANG CHỦ (HERO & 54 SẮC MÀU VĂN HÓA)
   ========================================================================== */
.hero-banner-container {
  position: relative;
  background: #081220;
  color: #FFFFFF;
  padding: 0;
  overflow: hidden;
  min-height: 520px;
  transition: min-height 0.3s ease;
}

/* ==========================================================================
   HERO 2026: 3D SLIDESHOW CONTINUOUS PANORAMA & DOCK SYSTEM
   ========================================================================== */
.hero-3d-slideshow {
  position: absolute;
  inset: 0;
  perspective: 1200px;
  transform-style: preserve-3d;
  z-index: 1;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(1.05) translateZ(-40px);
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1) translateZ(0);
}

.hero-slide-bg {
  position: absolute;
  inset: -15px;
  background-size: cover;
  background-position: center top;
  transition: transform 10s ease-out;
}

.hero-slide.active .hero-slide-bg {
  animation: heroKenBurns 14s infinite alternate ease-in-out;
}

.hero-slide[data-effect="parallax-tilt"].active .hero-slide-bg {
  animation: heroParallaxTilt 12s infinite alternate ease-in-out;
}

.hero-slide[data-effect="cube-rotate"].active {
  animation: heroCubeRotate 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes heroKenBurns {
  0% {
    transform: scale(1.0) translate3d(0, 0, 0);
  }

  100% {
    transform: scale(1.08) translate3d(-10px, -6px, 15px);
  }
}

@keyframes heroParallaxTilt {
  0% {
    transform: scale(1.02) rotateY(-2deg) translate3d(0, 0, 0);
  }

  100% {
    transform: scale(1.07) rotateY(2deg) translate3d(8px, -4px, 15px);
  }
}

@keyframes heroCubeRotate {
  0% {
    transform: scale(0.92) rotateY(-6deg) translateZ(-80px);
    opacity: 0;
  }

  100% {
    transform: scale(1) rotateY(0deg) translateZ(0);
    opacity: 1;
  }
}

.hero-slideshow-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 18, 32, 0.88) 0%, rgba(8, 18, 32, 0.7) 38%, rgba(8, 18, 32, 0.3) 70%, rgba(8, 18, 32, 0.08) 100%);
  z-index: 2;
  pointer-events: none;
}

.hero-grid {
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 1.75rem;
  align-items: center;
  position: relative;
  z-index: 10;
  padding: 3.5rem 2.5rem 4rem;
  min-height: inherit;
  box-sizing: border-box;
}

/* Khả năng thích ứng chiều cao linh hoạt theo cấu hình Admin Layouts (220px, compact, medium...) */
.hero-banner-container[style*="min-height: 1"],
.hero-banner-container[style*="min-height: 2"],
.hero-banner-container[style*="min-height: 300px"],
.hero-banner-container[style*="min-height: 320px"] {
  min-height: 220px !important;
}

.hero-banner-container[style*="min-height: 1"] .hero-grid,
.hero-banner-container[style*="min-height: 2"] .hero-grid,
.hero-banner-container[style*="min-height: 300px"] .hero-grid,
.hero-banner-container[style*="min-height: 320px"] .hero-grid {
  padding: 1.25rem 2rem !important;
  min-height: 0 !important;
  grid-template-columns: 1fr !important;
  gap: 0.75rem !important;
}

.hero-banner-container[style*="min-height: 1"] .hero-portrait-col,
.hero-banner-container[style*="min-height: 2"] .hero-portrait-col,
.hero-banner-container[style*="min-height: 300px"] .hero-portrait-col,
.hero-banner-container[style*="min-height: 320px"] .hero-portrait-col {
  display: none !important;
}

.hero-banner-container[style*="min-height: 1"] .hero-text-slides,
.hero-banner-container[style*="min-height: 2"] .hero-text-slides,
.hero-banner-container[style*="min-height: 300px"] .hero-text-slides,
.hero-banner-container[style*="min-height: 320px"] .hero-text-slides {
  min-height: 0 !important;
}

.hero-banner-container[style*="min-height: 1"] .hero-main-title,
.hero-banner-container[style*="min-height: 2"] .hero-main-title,
.hero-banner-container[style*="min-height: 300px"] .hero-main-title,
.hero-banner-container[style*="min-height: 320px"] .hero-main-title {
  font-size: 1.85rem !important;
  margin-bottom: 0.35rem !important;
  line-height: 1.2 !important;
}

.hero-banner-container[style*="min-height: 1"] .hero-description,
.hero-banner-container[style*="min-height: 2"] .hero-description,
.hero-banner-container[style*="min-height: 300px"] .hero-description,
.hero-banner-container[style*="min-height: 320px"] .hero-description {
  font-size: 0.85rem !important;
  margin-bottom: 0.75rem !important;
  line-height: 1.35 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-banner-container[style*="min-height: 1"] .hero-search-bar,
.hero-banner-container[style*="min-height: 2"] .hero-search-bar,
.hero-banner-container[style*="min-height: 300px"] .hero-search-bar,
.hero-banner-container[style*="min-height: 320px"] .hero-search-bar {
  margin-bottom: 0.5rem !important;
  padding: 0.35rem 0.5rem 0.35rem 1.15rem !important;
}

.hero-banner-container[style*="min-height: 1"] .hero-filter-pills,
.hero-banner-container[style*="min-height: 2"] .hero-filter-pills,
.hero-banner-container[style*="min-height: 300px"] .hero-filter-pills,
.hero-banner-container[style*="min-height: 320px"] .hero-filter-pills {
  display: none !important;
}

.hero-text-col {
  max-width: 820px;
}

/* Hero Text Dynamic Slideshow (Đồng bộ với Ảnh Nền Hero 3D) */
.hero-text-slides {
  position: relative;
  min-height: 220px;
}

.hero-text-slide {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-text-slide.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: heroTextSlideIn 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heroTextSlideIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .hero-text-slides {
    min-height: 180px;
  }
}

.hero-script-tag {
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.85rem;
  font-style: italic;
  font-weight: 700;
  color: #FFFFFF;
  display: block;
  margin-bottom: 0.35rem;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
}

.hero-main-title {
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 3.1rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: normal;
  color: #FFFFFF;
  text-transform: uppercase;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hero-description {
  font-size: 0.98rem;
  color: #E2E8F0;
  max-width: 600px;
  margin-bottom: 1.6rem;
  line-height: 1.6;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Thanh tìm kiếm hình viên nang màu trắng */
.hero-search-capsule {
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border-radius: 9999px;
  padding: 0.35rem 0.45rem 0.35rem 1.4rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  margin-bottom: 1.75rem;
  max-width: 580px;
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.hero-search-capsule .search-icon {
  color: #64748B;
  font-size: 1.15rem;
  margin-right: 0.85rem;
  flex-shrink: 0;
}

.hero-search-capsule input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.95rem;
  color: #0F172A;
  background: transparent;
}

.hero-search-capsule input::placeholder {
  color: #94A3B8;
}

.btn-hero-search-blue {
  background: #1D6FB8;
  color: #FFFFFF;
  border: none;
  padding: 0.75rem 1.85rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(29, 111, 184, 0.35);
  flex-shrink: 0;
}

.btn-hero-search-blue:hover {
  background: #175a96;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(29, 111, 184, 0.45);
}

/* Dock 5 nút lọc hình viên tròn nền trắng */
.hero-filter-dock-white {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px;
  padding: 0.85rem 1.25rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.9);
  gap: 0.6rem;
  flex-wrap: wrap;
}

.dock-pill-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.75rem;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dock-pill-item:hover {
  background: #F1F5F9;
  transform: translateY(-2px);
}

.dock-circle-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 1.15rem;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.bg-dock-green {
  background: linear-gradient(135deg, #10B981, #059669);
}

.bg-dock-red {
  background: linear-gradient(135deg, #EF4444, #DC2626);
}

.bg-dock-orange {
  background: linear-gradient(135deg, #F59E0B, #D97706);
}

.bg-dock-purple {
  background: linear-gradient(135deg, #8B5CF6, #7C3AED);
}

.bg-dock-blue {
  background: linear-gradient(135deg, #3B82F6, #2563EB);
}

.dock-pill-meta {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.dock-pill-meta strong {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.25;
}

.dock-pill-meta span {
  font-size: 0.72rem;
  color: #64748B;
  margin-top: 2px;
}

/* Cột Phải: Thẻ Trắng Dân tộc nổi bật */
/* Cột Phải: Thẻ Trắng Dân tộc nổi bật - Kích thước tối giản 1/2 để tôn vinh 3D Slideshow */
.hero-spotlight-panel-white {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 14px;
  padding: 0.65rem 0.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.75);
  width: 175px;
  max-width: 175px;
  justify-self: end;
  box-sizing: border-box;
}

.spotlight-panel-header {
  margin-bottom: 0.45rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.spotlight-panel-header h3 {
  font-size: 0.75rem;
  font-weight: 800;
  color: #0F172A;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.spotlight-more-link {
  font-size: 0.62rem;
  color: #0284C7;
  text-decoration: none;
  font-weight: 700;
  transition: color 0.15s ease;
}

.spotlight-more-link:hover {
  color: #0369A1;
  text-decoration: underline;
}

.spotlight-panel-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.spotlight-card-white {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.45rem;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(241, 245, 249, 0.9);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}

.spotlight-card-white:hover {
  background: #FFFFFF;
  border-color: #BAE6FD;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.12);
}

.spotlight-card-avatar {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  object-fit: cover;
  object-position: top center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.spotlight-card-info {
  flex: 1;
  min-width: 0;
}

.spotlight-card-info h4 {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.spotlight-card-info span {
  font-size: 0.64rem;
  color: #64748B;
  display: block;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
}

.spotlight-card-chevron {
  color: #94A3B8;
  font-size: 0.65rem;
  margin-left: auto;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.spotlight-card-white:hover .spotlight-card-chevron {
  color: #0284C7;
  transform: translateX(2px);
}

/* Chỉ số chuyển slide 3D */
.hero-slide-indicators {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 20;
}

.hero-indicator-dot {
  width: 9px;
  height: 9px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.hero-indicator-dot.active {
  width: 28px;
  background: #F4A228;
  box-shadow: 0 0 10px rgba(244, 162, 40, 0.7);
}

/* Responsive */
@media (max-width: 1200px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem 1.5rem;
  }

  .hero-spotlight-panel-white {
    width: 100%;
    max-width: 580px;
    justify-self: start;
  }

  .spotlight-panel-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.75rem;
  }
}

@media (max-width: 768px) {
  .hero-main-title {
    font-size: clamp(1.85rem, 6.5vw, 2.4rem);
    line-height: 1.15;
  }

  .hero-script-tag {
    font-size: 1.6rem;
  }

  .hero-description {
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
  }

  .hero-grid {
    padding: 2.25rem 1rem 3.5rem;
    gap: 1.75rem;
  }

  .hero-filter-dock-white {
    padding: 0.75rem;
    gap: 0.4rem;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .dock-pill-item {
    padding: 0.45rem 0.5rem;
  }
}

@media (max-width: 480px) {
  .hero-search-capsule {
    padding: 0.3rem 0.35rem 0.3rem 0.85rem;
  }

  .hero-search-capsule input {
    font-size: 0.85rem;
  }

  .btn-hero-search-blue {
    padding: 0.65rem 1.1rem;
    font-size: 0.85rem;
  }

  .hero-filter-dock-white {
    grid-template-columns: 1fr;
  }
}

.spotlight-card-item {
  transition: var(--transition-smooth);
}

.spotlight-card-item:hover {
  transform: translateX(4px);
  background: #FFFFFF;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.spotlight-card-item img {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  object-position: top center;
  flex-shrink: 0;
}

.spotlight-meta {
  flex: 1;
}

.spotlight-meta h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.2;
}

.spotlight-meta span {
  font-size: 0.75rem;
  color: #64748B;
}

.spotlight-chevron {
  color: #94A3B8;
  font-size: 0.9rem;
  transition: transform 0.2s;
}

.spotlight-card-item:hover .spotlight-chevron {
  transform: translateX(3px);
  color: var(--primary-blue);
}

/* Quick Stats Strip */
.stats-strip-container {
  width: 100%;
  max-width: 100%;
  margin: -1.75rem 0 0;       /* Xóa margin-bottom gây khoảng trắng */
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
  z-index: 20;
  box-sizing: border-box;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-gold);
}

.stat-num {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary-blue);
  line-height: 1;
  font-feature-settings: "tnum";
}

.stat-meta {
  display: flex;
  flex-direction: column;
}

.stat-meta strong {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
}

.stat-meta span {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* ==========================================================================
   VIEW 2: KHÁM PHÁ (GRID & DETAILED FILTER - ẢNH 2 Ở PROMPT MỚI)
   ========================================================================== */
.explore-layout-wrapper {
  max-width: 1480px;
  width: 100%;
  margin: 1.5rem 0 0;   /* bỏ margin-bottom để tránh double-gap trong flex column */
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 1.75rem;
  align-items: start;
  box-sizing: border-box;
}

.explore-sidebar {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 85px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.detail-right-content {
  display: flex;
  flex-direction: column;
}

.sidebar-block {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.sidebar-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.badge-mini {
  background: rgba(244, 162, 40, 0.2);
  color: var(--accent-gold-dark);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.filter-search-box {
  position: relative;
  margin-bottom: 0.85rem;
  display: block;
}

.filter-search-box input {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.8rem 0.55rem 2.2rem;
  font-size: 0.83rem;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
  height: 38px;
  line-height: 38px;
}

.filter-search-box i,
.filter-search-box wa-icon,
.filter-search-box svg,
.filter-search-box .svg-inline--fa {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
  pointer-events: none;
  z-index: 2;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.filter-group-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* Global utility for input wraps containing icons */
.input-wrap,
.input-with-icon,
.search-input-wrap {
  position: relative;
  display: block;
}

.input-wrap wa-icon,
.input-wrap i,
.input-with-icon wa-icon,
.input-with-icon i,
.search-input-wrap wa-icon,
.search-input-wrap i {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.filter-btn {
  background: transparent;
  border: none;
  text-align: left;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-btn:hover {
  background: var(--bg-card-subtle);
  color: var(--text-main);
}

.filter-btn.active {
  background: rgba(30, 96, 145, 0.1);
  color: var(--primary-blue);
  font-weight: 700;
}

.count-tag {
  background: var(--bg-card-subtle);
  color: var(--text-muted);
  font-size: 0.72rem;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.filter-btn.active .count-tag {
  background: var(--primary-blue);
  color: #FFFFFF;
}

.province-scroll-list {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-right: 0.3rem;
}

.province-filter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color 0.15s;
}

.province-filter-item:hover {
  background: var(--bg-card-subtle);
  color: var(--text-main);
}

.province-filter-item.active {
  background: rgba(244, 162, 40, 0.15);
  color: var(--accent-gold-dark);
  font-weight: 700;
}

/* Explore Main Content */
.explore-content-area {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.explore-content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

.results-heading h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.results-heading p {
  font-size: 0.83rem;
}

.explore-toolbar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.sort-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sort-selector select {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.8rem;
  font-size: 0.84rem;
  color: var(--text-main);
  outline: none;
  font-family: var(--font-sans);
}

.view-toggle-btns {
  display: flex;
  background: var(--bg-card-subtle);
  padding: 0.2rem;
  border-radius: var(--radius-sm);
  gap: 0.2rem;
}

.icon-toggle {
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-toggle.active {
  background: var(--bg-card);
  color: var(--primary-blue);
  box-shadow: var(--shadow-sm);
}

/* Ethnic Cards Grid */
.ethnic-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.ethnic-card {
  aspect-ratio: 1 / 1.6;
  background: var(--bg-card, #FFFFFF);
  border-radius: var(--radius-md, 12px);
  border: 1px solid var(--border-color, #E2E8F0);
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s ease;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  position: relative;
}

.ethnic-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px -4px rgba(15, 23, 42, 0.12);
  border-color: #0284C7;
}

.card-thumb-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  background: #0F172A;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

.ethnic-card:hover .card-thumb-wrap img {
  transform: scale(1.06);
}

.card-region-badge {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full, 999px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.card-body-content {
  flex: 0 0 auto;
  padding: 0.75rem 0.85rem;
  background: #FFFFFF;
  border-top: 1px solid #F1F5F9;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-sizing: border-box;
}

.card-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem;
  margin: 0;
}

.card-title-row h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main, #0F172A);
  margin: 0;
  line-height: 1.25;
}

.card-title-row .card-other-name {
  font-size: 0.72rem;
  color: #64748B;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 48%;
}

.card-pop-info {
  font-size: 0.78rem;
  color: #334155;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  white-space: nowrap;
}

.card-pop-info .pop-icon {
  color: #0284C7;
  font-size: 0.72rem;
  flex-shrink: 0;
}

.card-location-row {
  font-size: 0.74rem;
  color: #64748B;
  line-height: 1.35;
  display: flex;
  align-items: flex-start;
  gap: 0.3rem;
  margin: 0;
}

.card-location-row .loc-icon {
  color: #EF4444;
  font-size: 0.7rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.card-location-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.card-footer-action {
  display: none !important;
}

/* ==========================================================================
   VIEW 3: BẢN ĐỒ TƯƠNG TÁC (34 TỈNH THÀNH MỚI - ẢNH 3 Ở PROMPT MỚI)
   ========================================================================== */
.home-map-section-fullwidth {
  width: 100%;
  max-width: 100%;
  margin: 3.5rem 0 2rem;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

.map-section-heading-wrap {
  margin-bottom: 1.5rem;
}

.map-screen-wrapper {
  max-width: 100%;
  width: 100%;
  margin: 1.5rem 0;
  padding: 0;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr) 360px;
  gap: 1.5rem;
  height: calc(100vh - 120px);
  min-height: 720px;
  box-sizing: border-box;
}

/* Left Map Filter Panel */
.map-left-panel {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
  overflow-y: auto;
}

.map-panel-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.map-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-card-subtle);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  gap: 0.25rem;
}

.map-mode-tab {
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.map-mode-tab.active {
  background: var(--bg-card);
  color: var(--primary-blue);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}

.map-control-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.custom-select-box select {
  width: 100%;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  outline: none;
  font-family: var(--font-sans);
}

.province-ethnic-preview {
  background: var(--bg-card-subtle);
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.province-ethnic-preview h4 {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
}

.province-ethnic-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 200px;
  overflow-y: auto;
}

.province-ethnic-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
}

.province-ethnic-row:hover {
  border-color: var(--accent-gold);
  transform: translateX(2px);
}

.province-ethnic-row .pe-name {
  font-weight: 700;
  color: var(--text-main);
}

.province-highlight-card {
  margin-top: auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.province-card-thumb {
  height: 120px;
  width: 100%;
}

.province-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.province-card-info {
  padding: 0.85rem;
}

.province-card-info h5 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.province-card-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.65rem;
}

.btn-sm-view {
  background: rgba(30, 96, 145, 0.1);
  color: var(--primary-blue);
  border: none;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

/* Center SVG Interactive Map Canvas - Khóa chặt kích thước không bị xê dịch */
.map-canvas-container {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.map-canvas-header-overlay {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 50;
  pointer-events: none;
}

.map-legend {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  pointer-events: auto;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.legend-chip {
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #334155;
}

.color-north {
  color: #38A169;
}

.color-central {
  color: #4C51BF;
}

.color-highland {
  color: #DD6B20;
}

.color-south {
  color: #3182CE;
}

.map-zoom-controls {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  pointer-events: auto;
}

.map-btn {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  color: var(--text-main);
  transition: var(--transition-smooth);
}

.map-btn:hover {
  background: var(--bg-card-subtle);
  color: var(--primary-blue);
}

.svg-map-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  box-sizing: border-box;
}

.google-map-layer-container {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box;
  overflow: hidden;
  z-index: 20;
}

.google-map-layer-container iframe {
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  border: 0 !important;
  display: block;
}

#vietnam-interactive-svg {
  width: 100%;
  height: 100%;
  max-height: 100%;
  user-select: none;
}

/* SVG Provinces Styles */
.province-path {
  cursor: pointer;
  transition: all 0.25s ease;
  stroke: #FFFFFF;
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.province-path:hover {
  filter: brightness(1.15);
  stroke: #0F172A;
  stroke-width: 2.5;
}

.province-path.active,
#svg-map-viewport svg path.active-selected {
  fill: #F59E0B !important;
  stroke: #DC2626 !important;
  stroke-width: 3.5px !important;
  filter: drop-shadow(0 0 10px rgba(220, 38, 38, 0.7));
}

#svg-map-viewport svg {
  width: 100%;
  height: 100%;
  display: block;
  user-select: none;
  touch-action: none;
}

#svg-map-viewport svg path {
  cursor: pointer;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

#svg-map-viewport svg path:hover {
  fill: #FFCC00 !important;
  cursor: pointer;
  filter: drop-shadow(0 0 8px rgba(255, 204, 0, 0.6));
}

#svg-map-viewport svg text {
  pointer-events: none;
  user-select: none;
}

/* Tooltip Tương Tác Bản Đồ Chuẩn 2026 */
.map-tooltip-box {
  position: fixed;
  display: none;
  background: rgba(15, 23, 42, 0.96);
  color: #F8FAFC;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 14px;
  z-index: 99999;
  font-size: 0.85rem;
  line-height: 1.5;
  pointer-events: none;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  max-width: 320px;
  transition: opacity 0.1s ease;
}

.map-tooltip-box .tooltip-header {
  font-size: 0.95rem;
  font-weight: 700;
  color: #F59E0B;
  margin-bottom: 5px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.island-archipelago {
  cursor: pointer;
  transition: transform 0.2s;
}

.island-archipelago:hover {
  transform: scale(1.05);
}

.island-title {
  font-size: 11px;
  font-weight: 700;
  fill: #B91C1C;
}

.country-label {
  font-size: 18px;
  font-weight: 700;
  fill: #94A3B8;
  letter-spacing: 2px;
}

.sea-label {
  font-size: 26px;
  font-weight: 700;
  fill: #94A3B8;
  opacity: 0.55;
  letter-spacing: 4px;
}

.sea-sublabel {
  font-size: 15px;
  font-weight: 700;
  fill: #94A3B8;
  opacity: 0.5;
}

/* Right Province Details Panel */
.map-right-panel {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.panel-hero-cover {
  position: relative;
  height: 180px;
  width: 100%;
  overflow: hidden;
}

.panel-hero-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-badge {
  position: absolute;
  bottom: 0.85rem;
  left: 1rem;
  background: rgba(15, 37, 55, 0.85);
  backdrop-filter: blur(6px);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
}

.panel-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  flex: 1;
}

.province-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.province-title-row h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
}

.province-badge-merge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-full);
}

.province-quick-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.quick-stat-item {
  background: var(--bg-card-subtle);
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.quick-stat-item i,
.quick-stat-item wa-icon {
  font-size: 1.25rem;
}

.qs-info {
  display: flex;
  flex-direction: column;
}

.qs-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.qs-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.province-features-box {
  background: rgba(244, 162, 40, 0.1);
  border-left: 3px solid var(--accent-gold);
  padding: 0.85rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.province-features-box h5 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-gold-dark);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.province-features-box p {
  font-size: 0.78rem;
  color: var(--text-main);
  line-height: 1.45;
}

.province-merge-info-card {
  background: var(--bg-card-subtle);
  border: 1px dashed var(--border-color);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.75rem;
}

.province-merge-info-card i,
.province-merge-info-card wa-icon {
  color: var(--primary-blue);
  margin-top: 0.2rem;
}

.merge-text strong {
  display: block;
  color: var(--text-main);
  margin-bottom: 0.15rem;
}

.merge-text span {
  color: var(--text-muted);
}

.ethnic-mini-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ethnic-pill-tag {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.ethnic-pill-tag:hover {
  background: var(--accent-gold);
  color: #000000;
  border-color: var(--accent-gold);
}

.btn-full-explore {
  background: linear-gradient(135deg, #1E6091, #184E77);
  color: #FFFFFF;
  border: none;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
  margin-top: auto;
}

.btn-full-explore:hover {
  background: linear-gradient(135deg, #2575AE, #1E6091);
}

/* ==========================================================================
   VIEW 4: CHI TIẾT DÂN TỘC (CHUẨN ẢNH 1 BAN ĐẦU)
   ========================================================================== */
.ethnic-detail-container {
  max-width: 1440px;
  margin: 1.5rem auto 3rem;
  padding: 0 1.5rem;
}

.detail-top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.btn-back {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.btn-back:hover {
  background: var(--bg-card-subtle);
  transform: translateX(-3px);
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-action-icon {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.btn-action-icon:hover {
  color: var(--primary-blue);
  border-color: var(--primary-blue);
}

.detail-main-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* ===== DYNAMIC LAYOUT (Cấu trúc bố cục linh hoạt từ Admin Layouts) ===== */
.detail-dynamic-layout {
  /* CSS Grid — display:grid và grid-template-columns được set inline từ EJS */
  display: grid;
  grid-template-columns: repeat(1, 1fr); /* fallback 1 cột, sẽ bị override bởi inline style */
  gap: 1.25rem;
  align-items: start;
}

/* Wrapper cho từng component động */
.det-comp-wrap {
  min-width: 0;
  box-sizing: border-box;
  border-radius: var(--radius-lg);
  overflow: visible; /* cho phép slideshow overflow (lightbox, thumbnail) */
}

/* Component Slideshow: chiều cao tự nhiên, bỏ overflow để slideshow hiển thị đúng */
.det-comp-slideshow {
  overflow: visible;
}

/* Bên trong detail-left-visual khi ở dynamic layout */
.det-comp-wrap .detail-left-visual {
  width: 100%;
  height: 100%;
}

/* Component Facts: min-width để không bị quá hẹp */
.det-comp-facts .facts-info-card {
  height: 100%;
}

/* Component Title: flex grow để fill không gian */
.det-comp-title .detail-header-block {
  height: 100%;
}

/* Component Topics: chiếm hết chiều rộng còn lại */
.det-comp-topics {
  overflow: visible;
}

/* Component tùy chỉnh */
.det-comp-custom {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  padding: 1.5rem;
}

/* Responsive: Trên mobile dưới 768px — tất cả component full width */
@media (max-width: 768px) {
  .detail-dynamic-layout {
    display: flex !important;
    flex-direction: column !important;
  }
  .det-comp-wrap {
    grid-column: 1 / -1 !important;
  }
}

/* Left Visual Column */
.portrait-card-frame {
  position: relative;
  height: 520px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.portrait-card-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.portrait-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 37, 55, 0.9) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  color: #FFFFFF;
}

.region-chip {
  background: var(--accent-gold);
  color: #000000;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  width: fit-content;
  margin-bottom: 0.5rem;
}

.portrait-title {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.1;
}

.portrait-subtitle {
  font-size: 1rem;
  color: #CBD5E1;
}

.media-carousel-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.media-thumb {
  height: 75px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition-smooth);
}

.media-thumb.active {
  border-color: var(--accent-gold);
}

.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Right Content Column */
.detail-header-block {
  margin-bottom: 1.75rem;
}

.title-with-tag {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.title-with-tag h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-main);
}

.badge-pop-status {
  background: rgba(244, 162, 40, 0.18);
  color: var(--accent-gold-dark);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
}

.detail-intro-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Fast Facts Info Card */
.facts-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.fact-row {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.fact-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.fact-body {
  display: flex;
  flex-direction: column;
}

.fact-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.fact-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

/* DYNAMIC TABS BAR */
.dynamic-tabs-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 2rem;
  position: relative;
}

.tabs-scroll-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}

.dynamic-tab-btn {
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.dynamic-tab-btn:hover {
  color: var(--text-main);
  background: var(--bg-card-subtle);
}

.dynamic-tab-btn.active {
  background: #FDF6E2;
  color: var(--accent-gold-dark);
  font-weight: 700;
}

.badge-custom-tab {
  background: var(--accent-lime);
  color: #000000;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.btn-add-custom-tab {
  background: rgba(184, 242, 52, 0.2);
  border: 1px dashed #65A30D;
  color: #4D7C0F;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.btn-add-custom-tab:hover {
  background: #A3E635;
  color: #000000;
}

/* Tab Content Render Body */
.tab-content-render-area {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.tab-topic-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tab-html-article {
  font-size: 0.98rem;
  line-height: 1.8;
  color: var(--text-main);
  margin-bottom: 2rem;
}

.tab-html-article p {
  margin-bottom: 1rem;
}

/* Highlight Box (Khung vàng đặc điểm nhận biết như ảnh 1) */
.highlight-key-box {
  background: #FEF9C3;
  border: 1px solid #FDE047;
  border-left: 5px solid #CA8A04;
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  color: #713F12;
}

.highlight-key-box h5 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.highlight-key-box ul {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.88rem;
}

/* ==========================================================================
   VIEW 5: QUẢN TRỊ ADMIN CMS (ĐỒNG NHẤT 100% & TƯƠNG THÍCH MỌI THIẾT BỊ DI ĐỘNG)
   ========================================================================== */
.admin-cms-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - 110px);
  background: #F4F6F9;
  transition: grid-template-columns 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-cms-layout.sidebar-collapsed,
body.sidebar-collapsed .admin-cms-layout {
  grid-template-columns: 80px 1fr !important;
}

/* Nút Thu nhỏ / Mở rộng Sidebar Desktop */
.sidebar-collapse-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94A3B8;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.sidebar-collapse-btn:hover {
  background: rgba(184, 242, 52, 0.2);
  color: #B8F234;
  border-color: rgba(184, 242, 52, 0.4);
}

.sidebar-collapsed .sidebar-collapse-btn {
  transform: rotate(180deg);
}

/* Trạng thái Sidebar Thu nhỏ */
.admin-sidebar {
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), padding 0.25s ease;
}

.sidebar-collapsed .admin-sidebar,
.admin-sidebar.collapsed,
.admin-cms-layout.sidebar-collapsed .admin-sidebar {
  width: 80px !important;
  padding: 1rem 0.4rem !important;
  align-items: center;
}

.sidebar-collapsed .admin-brand,
.admin-sidebar.collapsed .admin-brand,
.admin-cms-layout.sidebar-collapsed .admin-brand {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  padding: 0.75rem 0.25rem !important;
  width: 100% !important;
}

.sidebar-collapsed .admin-brand a,
.admin-sidebar.collapsed .admin-brand a,
.admin-cms-layout.sidebar-collapsed .admin-brand a {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  flex: none !important;
  margin: 0 auto !important;
}

.sidebar-collapsed .admin-brand-title,
.admin-sidebar.collapsed .admin-brand-title,
.admin-cms-layout.sidebar-collapsed .admin-brand-title {
  display: none !important;
}

.sidebar-collapsed .sidebar-collapse-btn,
.admin-sidebar.collapsed .sidebar-collapse-btn,
.admin-cms-layout.sidebar-collapsed .sidebar-collapse-btn {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  margin: 0.25rem auto 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(184, 242, 52, 0.2) !important;
  border: 1.5px solid #B8F234 !important;
  color: #B8F234 !important;
  border-radius: 8px !important;
  box-shadow: 0 0 10px rgba(184, 242, 52, 0.25) !important;
  cursor: pointer !important;
  transform: none !important;
  z-index: 10 !important;
}

.sidebar-collapsed .sidebar-collapse-btn:hover,
.admin-sidebar.collapsed .sidebar-collapse-btn:hover,
.admin-cms-layout.sidebar-collapsed .sidebar-collapse-btn:hover {
  background: #B8F234 !important;
  color: #0F172A !important;
  transform: scale(1.1) !important;
}

.sidebar-collapsed .admin-role-selector .role-details-text,
.sidebar-collapsed .admin-role-selector .role-header-text,
.sidebar-collapsed .admin-role-selector .user-role-badge span {
  display: none !important;
}

.sidebar-collapsed .admin-role-selector {
  padding: 0.4rem !important;
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
}

.sidebar-collapsed .admin-menu-item {
  justify-content: center !important;
  padding: 0.75rem 0.4rem !important;
  position: relative;
}

.sidebar-collapsed .admin-menu-item span {
  display: none !important;
}

.sidebar-collapsed .admin-menu-item wa-icon {
  font-size: 1.35rem !important;
  margin: 0 !important;
}

.sidebar-collapsed .submenu-arrow {
  display: none !important;
}

.sidebar-collapsed .admin-submenu {
  display: none !important;
}

.sidebar-collapsed .badge-pending-count {
  position: absolute;
  top: 4px;
  right: 6px;
  padding: 2px 5px;
  font-size: 0.65rem;
}

.sidebar-collapsed .admin-sidebar-footer .pro-badge-card div:last-child {
  display: none !important;
}

.sidebar-collapsed .admin-sidebar-footer .pro-badge-card {
  padding: 0.4rem !important;
  justify-content: center !important;
}

/* Nút Thao Tác Chuẩn Hóa Dưới Dạng Icon */
.btn-action-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  font-size: 0.95rem;
  text-decoration: none;
  background: #F1F5F9;
  color: #475569;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-action-icon:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.btn-action-edit {
  background: #EFF6FF;
  color: #2563EB;
  border-color: #BFDBFE;
}

.btn-action-edit:hover {
  background: #2563EB;
  color: #FFFFFF;
  border-color: #2563EB;
}

.btn-action-editor {
  background: #F0FDF4;
  color: #16A34A;
  border-color: #BBF7D0;
}

.btn-action-editor:hover {
  background: #16A34A;
  color: #FFFFFF;
  border-color: #16A34A;
}

.btn-action-view {
  background: #F0F9FF;
  color: #0284C7;
  border-color: #BAE6FD;
}

.btn-action-view:hover {
  background: #0284C7;
  color: #FFFFFF;
  border-color: #0284C7;
}

.btn-action-delete {
  background: #FEF2F2;
  color: #DC2626;
  border-color: #FECACA;
}

.btn-action-delete:hover {
  background: #DC2626;
  color: #FFFFFF;
  border-color: #DC2626;
}

.btn-action-move {
  background: #F8FAFC;
  color: #64748B;
  border-color: #E2E8F0;
}

.btn-action-move:hover {
  background: #E2E8F0;
  color: #0F172A;
}

/* Badge khu vực 4 miền */
.badge-region {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.badge-region-bac {
  background: #EFF6FF;
  color: #1E40AF;
  border: 1px solid #BFDBFE;
}

.badge-region-trung {
  background: #FFFBEB;
  color: #B45309;
  border: 1px solid #FDE68A;
}

.badge-region-taynguyen {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.badge-region-nam {
  background: #FAF5FF;
  color: #6B21A8;
  border: 1px solid #E9D5FF;
}

/* Thumbnail ảnh tỉnh thành */
.province-thumb-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.province-thumb-img {
  width: 54px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #CBD5E1;
  background: #F1F5F9;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  flex-shrink: 0;
}

.province-thumb-img:hover {
  transform: scale(1.2);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  z-index: 10;
  position: relative;
}

/* Admin Mobile Top Header (Chỉ hiện trên điện thoại / tablet <= 991px) */
.admin-mobile-topbar {
  display: none;
}

.admin-sidebar-backdrop {
  display: none;
}

.admin-sidebar-close-btn {
  display: none;
}

/* Dark Sidebar CMS */
.admin-sidebar {
  background: #111827;
  color: #FFFFFF;
  padding: 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  border-top-right-radius: 28px;
  border-bottom-right-radius: 28px;
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 100;
}

.admin-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-brand-icon {
  width: 42px;
  height: 42px;
  background: rgba(244, 162, 40, 0.15);
  border: 1px solid rgba(244, 162, 40, 0.3);
  color: #F4A228;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.admin-brand-title h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.2;
}

.admin-brand-title span {
  font-size: 0.7rem;
  color: #94A3B8;
  letter-spacing: 0.5px;
}

/* Thẻ Vai Trò & Profile Tài Khoản */
.admin-role-selector {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.user-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.user-role-badge.role-admin {
  background: rgba(16, 185, 129, 0.18);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.user-role-badge.role-reviewer {
  background: rgba(245, 158, 11, 0.18);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.user-role-badge.role-editor {
  background: rgba(59, 130, 246, 0.18);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.admin-menu {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.admin-menu-item {
  background: transparent;
  border: none;
  color: #9CA3AF;
  padding: 0.7rem 0.95rem;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  transform: translateX(2px);
}

.admin-menu-item.active {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.admin-menu-item wa-icon {
  font-size: 1.15rem;
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

.admin-icon-svg {
  width: 1.15rem;
  height: 1.15rem;
  font-size: 1.15rem;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: -0.125em;
}

.badge-pending-count {
  margin-left: auto;
  background: #EF4444;
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

/* Desktop Portal Menu Dropdown (Menu Đa Cấp Cổng Tra Cứu) */
.nav-dropdown-group {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 210px;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  padding: 0.5rem;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 1000;
  animation: fadeInDownMenu 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInDownMenu {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-dropdown-group:hover .nav-dropdown-menu,
.nav-dropdown-group:focus-within .nav-dropdown-menu {
  display: flex;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  color: #334155;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.nav-dropdown-item:hover {
  background: #F1F5F9;
  color: #1E6091;
  transform: translateX(2px);
}

.nav-dropdown-item.active {
  background: #E0F2FE;
  color: #0369A1;
  font-weight: 700;
}

/* Multi-level Admin Sub-menu Styling (Menu Đa Cấp Admin CMS) */
.admin-menu-group {
  display: flex;
  flex-direction: column;
}

.menu-parent-dropdown {
  width: 100%;
  text-align: left;
  position: relative;
  justify-content: flex-start;
}

.submenu-arrow {
  margin-left: auto;
  font-size: 0.75rem !important;
  width: 0.75rem !important;
  height: 0.75rem !important;
  transition: transform 0.25s ease;
  color: #94A3B8;
}

.admin-menu-group.open .submenu-arrow {
  transform: rotate(180deg);
  color: #FFFFFF;
}

.admin-submenu {
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  margin-left: 1.15rem;
  padding-left: 0.65rem;
  border-left: 2px solid rgba(255, 255, 255, 0.15);
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

.admin-menu-group.open .admin-submenu {
  display: flex;
}

.admin-submenu-item {
  color: #94A3B8;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.admin-submenu-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  transform: translateX(2px);
}

.admin-submenu-item.active {
  background: rgba(16, 185, 129, 0.25);
  color: #34D399;
  font-weight: 700;
  border-left: 3px solid #10B981;
}

.admin-sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pro-badge-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
}

.pro-badge-card i,
.pro-badge-card wa-icon {
  font-size: 1.25rem;
  color: #F4A228;
}

.pro-badge-card strong {
  display: block;
  color: #FFFFFF;
}

.pro-badge-card p {
  color: #9CA3AF;
  margin: 0;
}

/* Admin Main Body & Unified Topbar */
.admin-main-body,
.admin-main {
  padding: 2rem 2.5rem;
  overflow-y: auto;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #E2E8F0;
  flex-wrap: wrap;
  gap: 1rem;
}

.topbar-welcome h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 0.25rem;
}

.topbar-welcome p {
  font-size: 0.88rem;
  color: #64748B;
  margin: 0;
}

.topbar-user-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* TƯƠNG THÍCH HOÀN HẢO NỀN TẢNG DI ĐỘNG & TABLET (<= 991px) */
@media (max-width: 991px) {
  .admin-cms-layout {
    display: block !important;
    min-height: calc(100vh - 60px);
  }

  .admin-mobile-topbar {
    display: flex !important;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #0F172A;
    z-index: 1000;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  }

  .admin-mobile-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
  }

  .admin-mobile-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
  }

  .admin-mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .admin-mobile-role-tag {
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .admin-mobile-role-tag.role-admin {
    background: rgba(16, 185, 129, 0.2);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.35);
  }

  .admin-mobile-role-tag.role-reviewer {
    background: rgba(245, 158, 11, 0.2);
    color: #F59E0B;
    border: 1px solid rgba(245, 158, 11, 0.35);
  }

  .admin-mobile-role-tag.role-editor {
    background: rgba(59, 130, 246, 0.2);
    color: #3B82F6;
    border: 1px solid rgba(59, 130, 246, 0.35);
  }

  .admin-mobile-logout-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.95rem;
  }

  /* Sidebar trượt từ mép trái mượt mà trên di động */
  .admin-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 290px !important;
    max-width: 85vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.6) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 0 !important;
  }

  .admin-sidebar.show-mobile {
    transform: translateX(0) !important;
  }

  .admin-sidebar-backdrop {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.68) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    z-index: 99990 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease !important;
  }

  .admin-sidebar-backdrop.show-mobile {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .admin-sidebar-close-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #94A3B8;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
  }

  .admin-main-body,
  .admin-main {
    padding: 1.25rem 1rem !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }
}

@media (max-width: 768px) {

  .admin-topbar,
  .admin-top-greeting,
  .card-head-flex {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.85rem !important;
  }

  .admin-topbar .topbar-user-area,
  .editor-action-group {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }

  .admin-topbar .btn,
  .card-head-flex .btn {
    flex: 1 1 auto !important;
    justify-content: center !important;
    font-size: 0.85rem !important;
    padding: 0.6rem 0.85rem !important;
  }

  .table-responsive {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: block !important;
    margin-bottom: 1rem;
    border-radius: 12px;
  }

  .admin-data-table,
  .admin-table {
    min-width: 640px !important;
  }

  .admin-kpi-grid,
  .stats-overview-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.75rem !important;
  }

  /* Cải thiện hiển thị Modal trên điện thoại */
  .modal-box-custom,
  .modal-card {
    max-width: 95vw !important;
    width: 100% !important;
    margin: 10px auto !important;
    padding: 1.25rem !important;
    max-height: 90vh !important;
  }
}

@media (max-width: 480px) {

  .admin-kpi-grid,
  .stats-overview-grid {
    grid-template-columns: 1fr !important;
  }

  .ussh-co-badge .ussh-motto {
    display: none !important;
  }
}
}

.admin-top-greeting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.admin-top-greeting h2 {
  font-size: 1.85rem;
  font-weight: 700;
  color: #111827;
}

.btn-lime-primary {
  background: #B4F82C;
  color: #000000;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(180, 248, 44, 0.4);
  transition: var(--transition-smooth);
}

.btn-lime-primary:hover {
  background: #A3E635;
  transform: translateY(-2px);
}

/* KPI Metric Cards */
.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.kpi-card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.kpi-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.bg-lime-light {
  background: #ECFDC5;
  color: #4D7C0F;
}

.bg-cyan-light {
  background: #E0F2FE;
  color: #0369A1;
}

.bg-purple-light {
  background: #F3E8FF;
  color: #6B21A8;
}

.kpi-info {
  display: flex;
  flex-direction: column;
}

.kpi-label {
  font-size: 0.78rem;
  color: #64748B;
  font-weight: 600;
}

.kpi-number {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0F172A;
}

.kpi-rate {
  font-size: 0.75rem;
  font-weight: 700;
  color: #10B981;
}

.kpi-rate.text-amber {
  color: #D97706;
}

/* Editor Workspace Container */
.admin-card-container {
  background: #FFFFFF;
  border-radius: 22px;
  padding: 1.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.card-head-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #F1F5F9;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.card-subtitle {
  font-size: 0.82rem;
  color: #64748B;
}

.editor-action-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-outline {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: #334155;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: var(--transition-smooth);
}

.btn-outline:hover {
  background: #F8FAFC;
  border-color: #94A3B8;
}

.editor-workspace-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 2rem;
}

.editor-form-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.4rem;
}

.form-field input,
.form-field select {
  width: 100%;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.88rem;
  color: #0F172A;
  outline: none;
  font-family: var(--font-sans);
}

.input-with-button {
  display: flex;
  gap: 0.5rem;
}

.btn-sm-add {
  background: #0F172A;
  color: #FFFFFF;
  border: none;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
}

.editor-toolbar {
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-bottom: none;
  border-top-left-radius: var(--radius-sm);
  border-top-right-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.editor-toolbar button {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
}

.editor-toolbar button:hover {
  background: #E2E8F0;
}

.rich-editable-area {
  min-height: 220px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-bottom-left-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
  padding: 1rem;
  outline: none;
  font-size: 0.92rem;
  line-height: 1.6;
}

.custom-highlight-box-editable {
  background: #FEF9C3;
  border: 1px solid #FDE047;
  border-left: 4px solid #CA8A04;
  border-radius: 8px;
  padding: 0.85rem 1.15rem;
  margin: 1rem 0;
  color: #713F12;
}

.custom-highlight-box-editable.box-blue {
  background: #EFF6FF;
  border-color: #BFDBFE;
  border-left-color: #2563EB;
  color: #1E3A8A;
}

.custom-highlight-box-editable.box-red {
  background: #FEF2F2;
  border-color: #FECACA;
  border-left-color: #DC2626;
  color: #991B1B;
}

.custom-highlight-box-editable.box-green {
  background: #F0FDF4;
  border-color: #BBF7D0;
  border-left-color: #16A34A;
  color: #166534;
}

.custom-highlight-box-editable strong {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.custom-highlight-box-editable ul {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
}

/* Quote Block */
.editor-quote-block,
blockquote {
  border-left: 4px solid #16A34A;
  background: #F0FDF4;
  padding: 0.85rem 1.25rem;
  margin: 1rem 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #15803D;
  position: relative;
}

.editor-quote-block .quote-text {
  font-size: 0.95rem;
  line-height: 1.6;
}

.editor-quote-block .quote-cite {
  display: block;
  font-weight: 700;
  font-style: normal;
  font-size: 0.82rem;
  color: #166534;
  margin-top: 0.5rem;
  text-align: right;
}

/* Figure / Image Block */
.editor-figure-block,
figure {
  margin: 1.25rem 0;
  text-align: center;
}

.editor-figure-block img,
figure img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: inline-block;
}

.editor-figure-block figcaption,
figure figcaption {
  font-size: 0.82rem;
  color: #64748B;
  font-style: italic;
  margin-top: 0.45rem;
  text-align: center;
}

/* Audio Player Block */
.editor-audio-block {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-left: 4px solid #8B5CF6;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.editor-audio-block .audio-title {
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.editor-audio-block audio {
  width: 100%;
  height: 38px;
  border-radius: 6px;
  outline: none;
}

.editor-audio-block .audio-desc {
  font-size: 0.78rem;
  color: #475569;
  margin-top: 0.45rem;
  line-height: 1.4;
  padding-top: 0.35rem;
  border-top: 1px dashed #E2E8F0;
}

.editor-audio-block .audio-desc strong {
  color: #1E293B;
}

/* Video & Google IFrame Block */
.editor-video-wrapper,
.editor-youtube-block,
.editor-iframe-block {
  margin: 1.25rem 0;
}

.editor-video-responsive {
  position: relative;
  padding-bottom: 56.25%;
  /* 16:9 ratio */
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: #000;
}

.editor-video-responsive iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.editor-iframe-fixed {
  width: 100%;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: #000;
}

.editor-iframe-fixed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.editor-video-caption,
.editor-iframe-caption {
  font-size: 0.82rem;
  color: #64748B;
  text-align: center;
  margin-top: 0.45rem;
  font-style: italic;
}

/* Dual Live Preview Mockup Column */
.editor-preview-col {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.preview-device-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
}

.device-switch button {
  background: #E2E8F0;
  border: none;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
}

.device-switch button.active {
  background: #0F172A;
  color: #FFFFFF;
}

.preview-mockup-frame {
  flex: 1;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  overflow-y: auto;
  max-height: 480px;
  transition: max-width 0.3s ease;
}

.preview-mockup-frame.mobile-mode {
  max-width: 340px;
  margin: 0 auto;
  border: 8px solid #1E293B;
  border-radius: 28px;
}

.preview-tag-badge {
  background: #FEF08A;
  color: #854D0E;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  width: fit-content;
  margin-bottom: 0.65rem;
}

.preview-card-preview h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 0.85rem;
}

.prev-body-html {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #334155;
}

/* Review Queue Table */
.table-responsive {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.admin-table th {
  background: #F8FAFC;
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: #475569;
  border-bottom: 1px solid #E2E8F0;
}

.admin-table td {
  padding: 1rem;
  border-bottom: 1px solid #F1F5F9;
  color: #1E293B;
}

.badge-status-pending {
  background: #FEF3C7;
  color: #B45309;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

.action-btns-table {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-tbl-action {
  background: #F1F5F9;
  border: none;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  color: #334155;
}

.btn-tbl-action:hover {
  background: #E2E8F0;
}

.btn-tbl-approve {
  background: #ECFDF5;
  color: #065F46;
}

/* ==========================================================================
   MODAL: REVIEW VISUAL DIFF & DIALOGS
   ========================================================================== */
.app-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.app-modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  background: #FFFFFF;
  border-radius: 20px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  z-index: 10;
  overflow: hidden;
}

.modal-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #94A3B8;
}

.modal-body {
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
}

.diff-split-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.diff-col {
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.diff-col h5 {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #E2E8F0;
}

.diff-col.old-ver {
  background: #FFF1F2;
  border-color: #FECDD3;
}

.diff-col.new-ver {
  background: #F0FDF4;
  border-color: #BBF7D0;
}

.review-feedback-box label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.review-feedback-box textarea {
  width: 100%;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-sm);
  padding: 0.65rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  outline: none;
}

.modal-footer {
  padding: 1.25rem 1.75rem;
  border-top: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.btn-danger {
  background: #EF4444;
  color: #FFFFFF;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.btn-success {
  background: #10B981;
  color: #FFFFFF;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

/* Toast Notification */
.toast-popup {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #0F172A;
  color: #FFFFFF;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 9999;
  border-left: 4px solid var(--accent-lime);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
}

.toast-popup.hidden {
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
}

.toast-icon {
  color: var(--accent-lime);
  font-size: 1.1rem;
}

/* Helpers */
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.mt-4 {
  margin-top: 1.5rem;
}

.text-muted {
  color: var(--text-muted);
}

.text-blue {
  color: var(--primary-blue);
}

.text-amber {
  color: #D97706;
}

.link-small {
  font-size: 0.75rem;
  color: var(--primary-blue);
  font-weight: 700;
  cursor: pointer;
}

/* ==========================================================================
   2026 DESIGN SYSTEM ENHANCEMENTS: HEADER 2026, USSH VNUHCM & MOBILE RESPONSIVE
   ========================================================================== */

/* 1. Header 2026 & USSH Co-Branding */
.header-2026 {
  background: rgba(10, 25, 38, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  transition: all 0.3s ease;
}

.header-brand-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.ussh-co-badge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all 0.25s ease;
}

.ussh-co-badge:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(244, 162, 40, 0.4);
}

.ussh-crest-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  padding-right: 0.5rem;
}

.ussh-acronym {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  color: #FFFFFF;
}

.ussh-sub {
  font-size: 0.62rem;
  font-weight: 700;
  color: #94A3B8;
  letter-spacing: 0.5px;
}

.ussh-title-wrap {
  display: flex;
  flex-direction: column;
}

.ussh-full-vn {
  font-size: 0.75rem;
  font-weight: 700;
  color: #F8FAFC;
  white-space: nowrap;
}

.ussh-motto {
  font-size: 0.62rem;
  color: #F4A228;
  font-weight: 500;
  white-space: nowrap;
}

/* Speed Benchmark Header Pill */
.speed-benchmark-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34D399;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.38rem 0.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.25s ease;
}

.speed-benchmark-pill:hover {
  background: rgba(16, 185, 129, 0.22);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: pulseAnimation 1.6s infinite ease-in-out;
}

@keyframes pulseAnimation {
  0% {
    transform: scale(0.9);
    opacity: 0.7;
  }

  50% {
    transform: scale(1.3);
    opacity: 1;
  }

  100% {
    transform: scale(0.9);
    opacity: 0.7;
  }
}

.speed-badge-grade {
  background: #10B981;
  color: #064E3B;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.btn-login-header {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: linear-gradient(135deg, #1E6091 0%, #0F2537 100%);
  color: #FFFFFF;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.48rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: all 0.25s ease;
}

.btn-login-header:hover {
  border-color: #F4A228;
  transform: translateY(-1px);
}

/* Mobile Hamburger Button */
.mobile-hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 8px;
}

.mobile-hamburger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: #FFFFFF;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-hamburger-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-hamburger-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-hamburger-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer (Offcanvas) */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  background: #0A1926;
  color: #FFFFFF;
  z-index: 1999;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.5);
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.mobile-drawer.active {
  right: 0;
}

.drawer-header {
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.drawer-close-btn {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.4rem;
}

.drawer-ussh-card {
  margin: 1rem 1.25rem 0.5rem;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
}

.ussh-logo-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.ussh-badge-bold {
  font-weight: 700;
  font-size: 0.95rem;
  color: #FFFFFF;
}

.ussh-status-tag {
  font-size: 0.65rem;
  background: rgba(244, 162, 40, 0.2);
  color: #F4A228;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.ussh-drawer-desc {
  font-size: 0.72rem;
  color: #CBD5E1;
  line-height: 1.35;
}

.ussh-motto-row {
  margin-top: 0.35rem;
  font-size: 0.65rem;
  color: #F4A228;
  font-weight: 600;
}

.drawer-nav {
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.85rem;
  color: #CBD5E1;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.drawer-nav-item:hover,
.drawer-nav-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: #F4A228;
}

.drawer-login-btn {
  margin-top: 0.75rem;
  background: var(--primary-blue);
  color: #FFFFFF !important;
  font-weight: 600;
}

.drawer-footer {
  padding: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
}

.drawer-speed-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem;
  background: rgba(16, 185, 129, 0.08);
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 0.5rem;
}

.drawer-partner-row {
  color: #94A3B8;
  text-align: center;
  font-size: 0.7rem;
}

/* Mobile Bottom Navigation Bar (PWA Style) */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(10, 25, 38, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;
  align-items: center;
  justify-content: space-around;
  padding: 0 0.5rem;
}

.bottom-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #94A3B8;
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 500;
  flex: 1;
  padding: 0.4rem 0;
  transition: all 0.2s ease;
}

.bottom-bar-item i,
.bottom-bar-item wa-icon {
  font-size: 1.15rem;
}

.bottom-bar-item.active,
.bottom-bar-item:hover {
  color: #F4A228;
}

/* ==========================================================================
   2. FOOTER 2026: TÁC QUYỀN ĐH KHXH&NV (USSH VNUHCM) & GOOGLE SUPPORT
   ========================================================================== */
.app-footer-2026 {
  background: #08141F;
  color: #94A3B8;
  border-top: 2px solid rgba(244, 162, 40, 0.3);
  padding: 4rem 1.5rem 2rem;
  margin-top: auto;
}

.footer-container {
  max-width: 1480px;
  margin: 0 auto;
}

.footer-brand-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  flex-wrap: wrap;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 3rem;
}

.ussh-logo-display {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ussh-huge-brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.ussh-acronym-block {
  display: flex;
  flex-direction: column;
  line-height: 0.9;
}

.ussh-main-bold {
  font-family: var(--font-sans);
  font-size: 2.6rem;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 1px;
}

.ussh-vnuhcm-bold {
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: 700;
  color: #94A3B8;
  letter-spacing: 0.5px;
}

.ussh-divider-vertical {
  width: 2px;
  height: 52px;
  background: rgba(255, 255, 255, 0.25);
}

.ussh-english-block {
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  color: #F8FAFC;
  line-height: 1.25;
}

.ussh-en-top {
  font-size: 0.85rem;
  font-weight: 400;
  color: #CBD5E1;
}

.ussh-en-mid {
  font-size: 1.05rem;
  font-weight: 700;
}

.ussh-en-bot {
  font-size: 0.95rem;
  font-weight: 600;
  color: #CBD5E1;
}

.ussh-motto-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(244, 162, 40, 0.12);
  border: 1px solid rgba(244, 162, 40, 0.35);
  color: #F4A228;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-full);
}

.footer-mission-lead {
  max-width: 600px;
}

.footer-mission-lead h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 0.5rem;
}

.footer-mission-lead p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #CBD5E1;
}

.footer-details-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-col-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.copyright-notice-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.status-chip-pending {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(244, 162, 40, 0.15);
  color: #F4A228;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.65rem;
}

.copyright-legal-text {
  font-size: 0.8rem;
  line-height: 1.55;
  color: #CBD5E1;
  margin-bottom: 0.85rem;
}

.license-badge-row {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.license-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #E2E8F0;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.google-support-card {
  background: rgba(66, 133, 244, 0.06);
  border: 1px solid rgba(66, 133, 244, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  margin-top: 0.65rem;
}

.google-support-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #93C5FD;
  font-size: 0.78rem;
  margin-bottom: 0.5rem;
}

.google-support-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.google-support-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #CBD5E1;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.82rem;
  color: #CBD5E1;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.contact-item i,
.contact-item wa-icon {
  color: #F4A228;
  margin-top: 3px;
  font-size: 0.85rem;
}

.speed-status-card {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-sm);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.speed-status-card:hover {
  background: rgba(16, 185, 129, 0.1);
  border-color: #10B981;
}

.speed-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  margin-bottom: 0.45rem;
  color: #CBD5E1;
}

.badge-grade-mini {
  background: #10B981;
  color: #064E3B;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.btn-verify-speed-sm {
  width: 100%;
  margin-top: 0.65rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.45rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-verify-speed-sm:hover {
  background: #F4A228;
  color: #0A1926;
  border-color: #F4A228;
}

.footer-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
}

.sovereignty-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #E2E8F0;
}

/* ==========================================================================
   3. SPEED BENCHMARK MODAL SUITE 2026
   ========================================================================== */
.benchmark-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.benchmark-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.benchmark-modal-content {
  background: #0F2537;
  color: #FFFFFF;
  border: 1px solid rgba(244, 162, 40, 0.3);
  border-radius: var(--radius-md);
  max-width: 680px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: modalPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPopIn {
  from {
    transform: scale(0.92);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.benchmark-modal-content .modal-header {
  padding: 1.25rem 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.modal-icon {
  font-size: 1.6rem;
}

.modal-title-wrap h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFFFFF;
}

.modal-title-wrap p {
  font-size: 0.75rem;
  color: #94A3B8;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

.benchmark-modal-content .modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.benchmark-score-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(30, 96, 145, 0.2) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.score-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #10B981;
  color: #064E3B;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
  flex-shrink: 0;
}

.score-number {
  font-size: 1.8rem;
  line-height: 1;
}

.score-label {
  font-size: 0.65rem;
}

.score-details h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.score-details p {
  font-size: 0.78rem;
  color: #CBD5E1;
  line-height: 1.45;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.metric-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.65rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.metric-label {
  font-size: 0.68rem;
  color: #94A3B8;
  font-weight: 600;
}

.metric-val {
  font-size: 1.15rem;
  font-weight: 700;
  font-family: var(--font-sans);
}

.metric-sub {
  font-size: 0.62rem;
  color: #64748B;
}

.stress-test-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.stress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  font-size: 0.82rem;
}

.btn-run-stress {
  background: #F4A228;
  color: #0A1926;
  border: none;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-run-stress:hover {
  background: #D98218;
}

.stress-result-area {
  font-size: 0.78rem;
  color: #94A3B8;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.75rem;
  border-radius: 6px;
  line-height: 1.5;
}

.benchmark-modal-content .modal-footer {
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-academic-note {
  font-size: 0.72rem;
  color: #94A3B8;
}

.btn-close-modal {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border: none;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.82rem;
}

/* ==========================================================================
   4. TOÀN DIỆN MEDIA QUERIES (MOBILE WEB • TABLET • DESKTOP)
   Tối ưu hóa hiển thị 100% nội dung đồng nhất trên thiết bị di động
   ========================================================================== */
@media (max-width: 1200px) {
  .header-inner {
    padding: 0.65rem 1rem;
    gap: 0.75rem;
  }

  .ussh-co-badge {
    display: none;
  }

  /* Thu gọn huy hiệu trường trên màn hình vừa */
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
  }

  .hero-spotlight-col {
    grid-column: span 2;
  }

  .stats-strip-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .explore-layout-wrapper {
    grid-template-columns: 260px 1fr;
    gap: 1.25rem;
  }

  .home-map-section-fullwidth .map-screen-wrapper {
    grid-template-columns: 300px minmax(0, 1fr) 320px;
    height: 720px;
  }
}

@media (max-width: 992px) {
  .desktop-nav {
    display: none !important;
  }

  /* Ẩn menu ngang trên mobile/tablet */
  .mobile-hamburger-btn {
    display: flex !important;
  }

  /* Hiện nút hamburger */

  /* Hero Banner Tinh Chỉnh Mobile */
  .hero-banner-container {
    padding: 2.25rem 1rem 3.5rem;
  }

  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }

  .hero-spotlight-col {
    grid-column: span 1;
    padding: 1.25rem;
  }

  .hero-main-title {
    font-size: clamp(2rem, 5.5vw, 2.6rem) !important;
    line-height: 1.15;
  }

  .hero-filter-pills {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .hero-visual-col {
    order: 2;
  }

  .hero-portrait-frame {
    height: 340px;
    max-width: 100%;
  }

  /* Stats Strip Trên Tablet & Mobile */
  .stats-strip-container {
    grid-template-columns: repeat(2, 1fr);
    margin: -1.75rem 0 0;
    padding: 0 1rem;
    gap: 1rem;
  }

  .stat-card {
    padding: 1rem 1.25rem;
  }

  /* Explore Phân Hệ 54 Dân Tộc */
  .explore-layout-wrapper {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
    padding: 0 1rem;
    margin: 1.5rem 0;
  }

  .explore-sidebar {
    position: static;
    max-height: none;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
  }

  .province-scroll-list {
    max-height: 220px;
  }

  .ethnic-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }

  /* Bản Đồ 34 Tỉnh: Dãn Full Bề Ngang & Sắp Xếp Thứ Tự Khoa Học Cho Mobile */
  .home-map-section-fullwidth {
    padding: 0 1rem !important;
    margin: 2.5rem 0 1.5rem !important;
  }

  .home-map-section-fullwidth .map-screen-wrapper,
  .map-screen-wrapper {
    grid-template-columns: 1fr !important;
    height: auto !important;
    min-height: 0 !important;
    gap: 1.25rem !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .map-left-panel {
    order: 1;
    width: 100%;
    max-height: none;
    padding: 1rem;
  }

  .map-canvas-container {
    order: 2;
    width: 100% !important;
    height: 480px !important;
    min-height: 480px !important;
    position: relative !important;
  }

  .map-right-panel {
    order: 3;
    width: 100%;
    max-height: none;
    padding: 1.25rem;
  }

  .province-highlight-card {
    display: none;
    /* Ẩn thẻ xem nhanh ở cột trái để tránh trùng lặp với thẻ chi tiết cột phải */
  }
}

@media (max-width: 768px) {
  body {
    padding-bottom: 75px;
    /* Dành khoảng trống an toàn cho thanh Mobile Bottom Navigation Bar */
    overflow-x: hidden;
  }

  .mobile-bottom-bar {
    display: flex !important;
  }

  .app-header {
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .header-actions .btn-login-header {
    display: none;
  }

  .speed-benchmark-pill {
    padding: 0.3rem 0.55rem;
    font-size: 0.72rem;
    gap: 0.35rem;
  }

  #header-latency-display {
    display: none;
    /* Giữ lại sấm chớp + hạng A+ để vừa vặn màn hình điện thoại */
  }

  .hero-script-tag {
    font-size: 1.35rem;
  }

  .hero-main-title {
    font-size: clamp(1.75rem, 6.5vw, 2.2rem) !important;
    line-height: 1.2;
    margin-bottom: 0.85rem;
  }

  .hero-description {
    font-size: 0.88rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
  }

  .hero-search-bar {
    width: 100%;
    max-width: 100%;
    margin-bottom: 1.5rem;
    padding: 0.35rem 0.45rem 0.35rem 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.18);
  }

  .hero-search-bar input {
    font-size: 16px;
    /* Ngăn chặn hiện tượng tự động phóng to (auto-zoom) trên iOS Safari */
  }

  .btn-hero-search span {
    display: none;
    /* Thu gọn chữ để nút tìm kiếm luôn gọn đẹp */
  }

  .btn-hero-search {
    padding: 0.55rem 0.95rem;
  }

  .hero-filter-pills {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.55rem;
  }

  .filter-pill-item {
    padding: 0.55rem 0.65rem;
    gap: 0.55rem;
  }

  .pill-icon-circle {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
    flex-shrink: 0;
  }

  .pill-label strong {
    font-size: 0.76rem;
  }

  .pill-label span {
    font-size: 0.65rem;
  }

  .hero-portrait-frame {
    height: 270px;
    border-radius: var(--radius-md);
  }

  .floating-badge-vietnam {
    top: 0.85rem;
    right: 0.85rem;
    padding: 0.4rem 0.75rem;
  }

  /* Thống kê nhanh trên Mobile */
  .stats-strip-container {
    grid-template-columns: repeat(2, 1fr) !important;
    margin: -1.25rem 0 0 !important;
    padding: 0 0.75rem !important;
    gap: 0.65rem !important;
  }

  .stat-card {
    padding: 0.85rem 0.95rem;
    gap: 0.75rem;
  }

  .stat-num {
    font-size: 1.65rem;
  }

  .stat-meta strong {
    font-size: 0.8rem;
    line-height: 1.2;
  }

  .stat-meta span {
    font-size: 0.68rem;
  }

  /* Thẻ Dân Tộc Trên Điện Thoại */
  .ethnic-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }

  .card-thumb-wrap {
    height: auto;
    min-height: 0;
    flex: 1 1 auto;
  }

  .card-body-content {
    padding: 0.65rem 0.75rem;
  }

  .card-title-row h4 {
    font-size: 0.95rem;
  }

  .card-pop-info {
    font-size: 0.72rem;
  }

  .card-footer-action {
    display: none !important;
  }

  /* Bản Đồ Canvas Trên Mobile */
  .map-canvas-container {
    height: 440px !important;
    min-height: 440px !important;
  }

  .map-canvas-header-overlay {
    top: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
  }

  .map-legend {
    padding: 0.35rem 0.65rem;
    gap: 0.45rem;
    overflow-x: auto;
    max-width: 75%;
  }

  .legend-chip {
    font-size: 0.65rem;
    white-space: nowrap;
  }

  /* Footer & Academic Co-branding */
  .footer-brand-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .ussh-huge-brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .footer-details-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .ussh-official-crest-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }
}

@media (max-width: 480px) {
  .brand-title {
    font-size: 0.92rem;
  }

  .brand-slogan {
    display: none;
  }

  .logo-emblem {
    width: 32px;
    height: 32px;
  }

  .hero-filter-pills {
    grid-template-columns: 1fr !important;
  }

  .stats-strip-container {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
  }

  .ethnic-cards-grid {
    grid-template-columns: 1fr !important;
  }

  .map-canvas-container {
    height: 390px !important;
    min-height: 390px !important;
  }

  .google-maps-overlay-bar {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.5rem;
    padding: 0.5rem !important;
  }
}

/* ==========================================================================
   CHUYỂN ĐỔI CHẾ ĐỘ XEM CHUYÊN MỤC DÂN TỘC: DẠNG TAB VS DẠNG DANH SÁCH (LOCALSTORAGE)
   ========================================================================== */
.topic-view-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg-card);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.view-mode-pill-group {
  display: inline-flex;
  background: var(--bg-card-subtle);
  padding: 0.25rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  gap: 0.25rem;
}

.btn-view-mode {
  border: none;
  background: transparent;
  padding: 0.45rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
}

.btn-view-mode:hover {
  color: var(--text-main);
}

.btn-view-mode.active {
  background: var(--primary-blue);
  color: #FFFFFF !important;
  box-shadow: 0 2px 8px rgba(30, 96, 145, 0.3);
  font-weight: 700;
}

.topic-list-nav-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  background: var(--bg-card-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

.toc-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  background: var(--bg-card);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.toc-link-chip:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold-dark);
  transform: translateY(-1px);
}

.topics-continuous-list {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.topic-list-block {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 2rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 100px;
}

.topic-list-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.topic-list-block-header h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* ==========================================================================
   ADMIN CMS: QUẢN LÝ MENU & KÉO THẢ DÂN TỘC (DRAG AND DROP)
   ========================================================================== */
.admin-card-container {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  border: 1px solid #E2E8F0;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.admin-data-table th {
  background: #F8FAFC;
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: #475569;
  border-bottom: 2px solid #E2E8F0;
}

.admin-data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
}

.admin-data-table tr:hover {
  background: #F8FAFC;
}

.drag-handle {
  cursor: grab;
  color: #94A3B8;
  padding: 0.4rem 0.6rem;
  font-size: 1.1rem;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
}

.drag-handle:hover {
  color: #1E6091;
}

.draggable-row {
  transition: transform 0.2s, background-color 0.2s;
}

.draggable-row.dragging {
  opacity: 0.5;
  background-color: #FEF3C7 !important;
  border: 2px dashed #F59E0B;
}

.draggable-row.drag-over {
  border-top: 3px solid #1E6091 !important;
}

.kpi-scale-card {
  transition: all 0.2s ease;
  user-select: none;
}

.kpi-scale-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.kpi-scale-card.active {
  box-shadow: 0 0 0 2px #2563EB, 0 4px 12px rgba(37, 99, 235, 0.15) !important;
}

.ethnic-thumb-cell {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  object-position: top center;
  border: 1px solid #E2E8F0;
  display: block;
}

.badge-status {
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-block;
}

.badge-status-active {
  background: #DCFCE7;
  color: #166534;
}

.badge-status-inactive {
  background: #FEE2E2;
  color: #991B1B;
}

.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  /* Căn trên khi modal cao, căn giữa khi modal thấp */
  align-items: flex-start;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto; /* Backdrop scroll nếu modal vẫn cao hơn viewport */
}

.admin-modal-box {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 550px;
  /* Giới hạn chiều cao tổng — tối đa 92% viewport, luôn để footer hiện */
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column; /* header + body + footer xếp dọc */
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: modalFadeIn 0.25s ease-out;
  /* Căn giữa dọc khi modal thấp hơn viewport */
  margin: auto;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.admin-modal-header {
  padding: 1.25rem 1.5rem;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Header không bao giờ bị co lại */
  flex-shrink: 0;
}

.admin-modal-header h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
}

.admin-modal-body {
  padding: 1.5rem;
  /* Body chiếm không gian còn lại, scroll khi nội dung dài */
  flex: 1;
  overflow-y: auto;
  min-height: 0; /* Quan trọng: cho phép flex-child shrink */
}

.admin-modal-footer {
  padding: 1rem 1.5rem;
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  /* Footer không bao giờ bị ẩn — luôn hiện ở cuối modal */
  flex-shrink: 0;
}

/* ============================================================================
   FIX MODAL EDITOR — NỘI DUNG SCROLLABLE, FOOTER/BUTTONS LUÔN HIỂN THỊ
   Áp dụng cho tất cả admin-modal-box dạng inline (không dùng header/body/footer class)
   ============================================================================ */

/* Đảm bảo tất cả admin-modal-box đều là flex-column */
.admin-modal-box {
  display: flex !important;
  flex-direction: column !important;
}

/* Header dark (background #0F172A) — không co lại */
.admin-modal-box > div:first-child {
  flex-shrink: 0;
}

/* Body chứa form — chiếm phần còn lại, có thể scroll */
.admin-modal-box > div:nth-child(2) {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  /* Giới hạn chiều cao tối đa của body để footer không bị đẩy ra ngoài */
  max-height: calc(100vh - 180px);
}

/* Preview box video trong modal YouTube — co lại khi màn hình thấp */
#google-iframe-preview-box {
  max-height: clamp(80px, 20vh, 200px) !important;
  min-height: 60px !important;
  transition: max-height 0.2s ease;
}

/* ============================================================================
   ETHNIC DETAIL SLIDESHOW & LIGHTBOX ZOOM (2026 PREMIUM UI)
   ============================================================================ */

.slideshow-hero-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
  display: flex;
  flex-direction: column;
}

.slideshow-stage {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  cursor: zoom-in;
  background: #0F172A;
  user-select: none;
}

.slideshow-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: opacity 0.4s ease, transform 0.4s ease;
  display: block;
}

.slideshow-stage:hover .slideshow-img {
  transform: scale(1.02);
}

.slideshow-badge-overlay {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  pointer-events: none;
}

.badge-zoom-hint {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  color: #F8FAFC;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.slide-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 12;
  transition: var(--transition-smooth);
  opacity: 0.85;
}

.slide-nav-btn:hover {
  background: #F59E0B;
  color: #0F172A;
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
}

.slide-nav-btn.prev {
  left: 0.75rem;
}

.slide-nav-btn.next {
  right: 0.75rem;
}

.slideshow-controls-strip {
  position: absolute;
  bottom: 0.85rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 12;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-play-pause {
  background: transparent;
  border: none;
  color: #F8FAFC;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 2px 4px;
}

.btn-play-pause:hover {
  color: #F59E0B;
}

.slide-index-counter {
  color: #E2E8F0;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-sans);
}

.slideshow-thumb-strip {
  display: flex;
  gap: 0.5rem;
  padding: 0.85rem;
  overflow-x: auto;
  background: var(--bg-card-subtle);
  border-top: 1px solid var(--border-color);
  scroll-behavior: smooth;
}

.slideshow-thumb-strip::-webkit-scrollbar {
  height: 5px;
}

.slideshow-thumb-strip::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.4);
  border-radius: 4px;
}

.thumb-strip-item {
  position: relative;
  flex: 0 0 72px;
  height: 52px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.65;
  transition: all 0.25s ease;
}

.thumb-strip-item:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.thumb-strip-item.active {
  border-color: #F59E0B;
  opacity: 1;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.thumb-strip-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-index-num {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.7);
  color: #FFF;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
}

/* Lightbox Modal with Zoom & Pan */
.lightbox-zoom-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 29, 0.96);
  backdrop-filter: blur(12px);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.2s ease-out;
  user-select: none;
}

.lightbox-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.5rem;
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.lightbox-info {
  font-size: 0.95rem;
  color: #E2E8F0;
}

.lightbox-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.lightbox-actions button {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.lightbox-actions button:hover {
  background: #F59E0B;
  color: #0F172A;
  transform: scale(1.05);
}

.btn-close-lightbox {
  font-size: 1.5rem !important;
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #EF4444 !important;
}

.btn-close-lightbox:hover {
  background: #EF4444 !important;
  color: #FFF !important;
}

.lightbox-body {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
}

.lightbox-body:active {
  cursor: grabbing;
}

.lightbox-img-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 80vh;
  transition: transform 0.15s ease-out;
}

.lightbox-img-wrapper img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 20;
  transition: all 0.2s ease;
}

.lightbox-nav-btn:hover {
  background: #F59E0B;
  color: #0F172A;
  transform: translateY(-50%) scale(1.15);
}

.lightbox-nav-btn.prev {
  left: 1.5rem;
}

.lightbox-nav-btn.next {
  right: 1.5rem;
}

.lightbox-footer-tips {
  padding: 0.65rem 1rem;
  text-align: center;
  font-size: 0.78rem;
  color: #94A3B8;
  background: rgba(15, 23, 42, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   MỨC ĐỘ KIỂM CHỨNG TÀI LIỆU (VERIFICATION LEVEL SELECTION & BADGES)
   🟡 Đang kiểm chứng • 🔵 Nguồn cộng đồng • 🟠 Nguồn tham khảo • 🔴 Có tranh luận
   ========================================================================== */
.verification-level-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .verification-level-grid {
    grid-template-columns: 1fr;
  }
}

.level-radio-card {
  position: relative;
  border: 1.5px solid #E2E8F0;
  background: #FFFFFF;
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}

.level-radio-card:hover {
  border-color: #CBD5E1;
  background: #F8FAFC;
}

.level-radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.level-card-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.level-card-text {
  display: flex;
  flex-direction: column;
}

.level-card-text strong {
  font-size: 0.88rem;
  color: #0F172A;
  font-weight: 700;
  line-height: 1.25;
}

.level-card-text small {
  font-size: 0.73rem;
  color: #64748B;
  margin-top: 2px;
}

/* Chấm tròn trạng thái 3D / Glow chuẩn như hình minh họa */
.level-dot {
  width: 14px;
  height: 14px;
  min-width: 14px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.7);
  transition: transform 0.2s ease;
}

.level-dot.dot-yellow {
  background: radial-gradient(circle at 35% 35%, #FDE047, #EAB308, #CA8A04);
  box-shadow: 0 0 0 1px rgba(234, 179, 8, 0.4), 0 2px 5px rgba(234, 179, 8, 0.35);
}

.level-dot.dot-blue {
  background: radial-gradient(circle at 35% 35%, #60A5FA, #2563EB, #1D4ED8);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.4), 0 2px 5px rgba(37, 99, 235, 0.35);
}

.level-dot.dot-orange {
  background: radial-gradient(circle at 35% 35%, #FB923C, #F97316, #C2410C);
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.4), 0 2px 5px rgba(249, 115, 22, 0.35);
}

.level-dot.dot-red {
  background: radial-gradient(circle at 35% 35%, #F87171, #EF4444, #B91C1C);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.4), 0 2px 5px rgba(239, 68, 68, 0.35);
}

/* Active card styles */
.level-radio-card.active {
  border-color: #0284C7;
  background: #F0F9FF;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

.level-radio-card.active[data-level="Đang kiểm chứng"] {
  border-color: #EAB308;
  background: #FEFCE8;
  box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.15);
}

.level-radio-card.active[data-level="Nguồn cộng đồng"] {
  border-color: #2563EB;
  background: #EFF6FF;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.level-radio-card.active[data-level="Nguồn tham khảo"] {
  border-color: #F97316;
  background: #FFF7ED;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.15);
}

.level-radio-card.active[data-level="Có tranh luận"] {
  border-color: #EF4444;
  background: #FEF2F2;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

.level-radio-card.active .level-dot {
  transform: scale(1.15);
}

/* Live Preview Footer in Editor */
.prev-verification-footer {
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px dashed #CBD5E1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.prev-verification-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  width: fit-content;
}

.prev-sources-preview {
  font-size: 0.78rem;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* User-facing Card on Portal Detail Page */
.topic-verification-card {
  margin-top: 1.25rem;
  font-size: 0.84rem;
  color: #475569;
  border-top: 1px dashed #CBD5E1;
  padding-top: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.verification-sources-col {
  flex: 1;
  min-width: 230px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.verification-sources-col strong {
  color: #334155;
}

.verification-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Color palettes for pills */
.pill-yellow {
  background: #FEFCE8;
  border: 1px solid #FDE047;
  color: #854D0E;
}

.pill-blue {
  background: #EFF6FF;
  border: 1px solid #93C5FD;
  color: #1E40AF;
}

.pill-orange {
  background: #FFF7ED;
  border: 1px solid #FDBA74;
  color: #C2410C;
}

.pill-red {
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  color: #991B1B;
}

/* ==========================================================================
   GLOBAL AVATAR & PORTRAIT TOP-ALIGNMENT CRITERIA (Căn đỉnh lấy top làm tiêu chí)
   Đảm bảo toàn bộ ảnh đại diện, avatar, chân dung nhân vật luôn căn từ đỉnh (top)
   để không bị mất phần đầu/mặt/khuôn mặt khi tỉ lệ ảnh co giãn hoặc cắt crop.
   ========================================================================== */
.avatar-small,
.ethnic-thumb-cell,
.hero-portrait-img,
.portrait-card-frame img,
.slideshow-img,
.card-thumb-wrap img,
.spotlight-card-item img,
.search-drop-item img,
.media-thumb img,
#preview-avatar,
img[id*="avatar"],
img[class*="avatar"],
img[id*="thumb"],
img[class*="thumb"],
img[class*="portrait"] {
  object-fit: cover !important;
  object-position: top center !important;
}

/* ==========================================================================
   ADMIN CMS COLLAPSIBLE SIDEBAR & ACTION ICONS (2027 STANDARDIZATION)
   ========================================================================== */

/* 1. Collapsible Admin CMS Grid Layout */
.admin-cms-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  transition: grid-template-columns 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-cms-layout.sidebar-collapsed,
html.preload-sidebar-collapsed .admin-cms-layout {
  grid-template-columns: 80px 1fr;
}

/* Sidebar Width & Transitions */
.admin-sidebar {
  width: 280px;
  background: #0F2537;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-x: hidden;
  position: relative;
  z-index: 50;
}

.admin-sidebar.collapsed,
.admin-cms-layout.sidebar-collapsed .admin-sidebar,
html.preload-sidebar-collapsed .admin-sidebar {
  width: 80px;
}

/* Toggle Collapse Button */
.sidebar-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #B4F82C;
  cursor: pointer;
  transition: all 0.25s ease;
  flex-shrink: 0;
  margin-left: auto;
}

.sidebar-collapse-btn:hover {
  background: rgba(180, 248, 44, 0.2);
  border-color: #B4F82C;
  transform: scale(1.08);
}

.admin-sidebar.collapsed .sidebar-collapse-btn,
.admin-cms-layout.sidebar-collapsed .sidebar-collapse-btn {
  margin: 0 auto;
}

/* Hide branding text & details in collapsed mode */
.admin-sidebar.collapsed .admin-brand-title,
.admin-cms-layout.sidebar-collapsed .admin-brand-title,
html.preload-sidebar-collapsed .admin-brand-title {
  display: none !important;
}

.admin-sidebar.collapsed .admin-brand a,
.admin-cms-layout.sidebar-collapsed .admin-brand a {
  justify-content: center;
  padding: 0;
}

.admin-sidebar.collapsed .admin-brand,
.admin-cms-layout.sidebar-collapsed .admin-brand {
  padding: 1.25rem 0.75rem;
  justify-content: center;
}

/* Collapsed Role / Profile Box */
.admin-sidebar.collapsed .role-header-text,
.admin-sidebar.collapsed .role-details-text,
.admin-cms-layout.sidebar-collapsed .role-header-text,
.admin-cms-layout.sidebar-collapsed .role-details-text {
  display: none !important;
}

.admin-sidebar.collapsed .admin-role-selector,
.admin-cms-layout.sidebar-collapsed .admin-role-selector {
  padding: 0.65rem 0.5rem;
  margin: 0.5rem 0.65rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Collapsed Navigation Items */
.admin-sidebar.collapsed .admin-nav-item,
.admin-cms-layout.sidebar-collapsed .admin-nav-item {
  padding: 0.75rem 0.5rem;
  justify-content: center;
  text-align: center;
  position: relative;
}

.admin-sidebar.collapsed .admin-nav-item span:not(.menu-icon):not(wa-icon),
.admin-sidebar.collapsed .menu-arrow,
.admin-sidebar.collapsed .menu-badge,
.admin-sidebar.collapsed .menu-section-header,
.admin-cms-layout.sidebar-collapsed .admin-nav-item span:not(.menu-icon):not(wa-icon),
.admin-cms-layout.sidebar-collapsed .menu-arrow,
.admin-cms-layout.sidebar-collapsed .menu-badge,
.admin-cms-layout.sidebar-collapsed .menu-section-header {
  display: none !important;
}

.admin-sidebar.collapsed .admin-nav-item wa-icon,
.admin-cms-layout.sidebar-collapsed .admin-nav-item wa-icon {
  font-size: 1.35rem;
  margin: 0 !important;
}

/* Tooltip on hover in collapsed mode */
.admin-sidebar.collapsed .admin-nav-item:hover::after,
.admin-cms-layout.sidebar-collapsed .admin-nav-item:hover::after {
  content: attr(title);
  position: absolute;
  left: 88px;
  top: 50%;
  transform: translateY(-50%);
  background: #0A1926;
  color: #FFFFFF;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  z-index: 9999;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(180, 248, 44, 0.4);
  pointer-events: none;
}

/* 2. Standardized Action Icon Buttons */
.btn-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  font-size: 0.95rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
}

.btn-action-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-action-icon.btn-action-edit:hover {
  background: #EFF6FF;
  border-color: #93C5FD;
  color: #1D4ED8;
}

.btn-action-icon.btn-action-editor:hover {
  background: #F5F3FF;
  border-color: #C4B5FD;
  color: #6D28D9;
}

.btn-action-icon.btn-action-view:hover {
  background: #ECFDF5;
  border-color: #6EE7B7;
  color: #047857;
}

.btn-action-icon.btn-action-delete:hover {
  background: #FEF2F2;
  border-color: #FCA5A5;
  color: #B91C1C;
}

.btn-action-icon.btn-action-diff:hover {
  background: #FFFBEB;
  border-color: #FCD34D;
  color: #B45309;
}

/* 3. Datamap Province Badges & Images */
.province-thumb-img {
  width: 48px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #CBD5E1;
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
  cursor: zoom-in;
  background: #F1F5F9;
}

.province-thumb-img:hover {
  transform: scale(2.2);
  z-index: 99;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  border-color: #1E6091;
}

.badge-region {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-region-bac {
  background: #EFF6FF;
  color: #1E40AF;
  border: 1px solid #BFDBFE;
}

.badge-region-trung {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
}

.badge-region-taynguyen {
  background: #F0FDF4;
  color: #166534;
  border: 1px solid #BBF7D0;
}

.badge-region-nam {
  background: #FAF5FF;
  color: #6B21A8;
  border: 1px solid #E9D5FF;
}