/* ==========================================================================
   NATUR LIFE CARE COSMETIC — MULTI-DEVICE ADAPTIVE ENGINE (2026)
   Hệ thống tối ưu thích ứng đa thiết bị (Mobile, Tablet, Desktop, Auto)
   Chuẩn thiết kế: 8pt grid, WCAG AA contrast, Micro-haptics (:active 0.97)
   ========================================================================== */

:root {
  --dm-primary: #0a5c36;
  --dm-primary-light: #e8f5e9;
  --dm-accent: #c59b27;
  --dm-bg-glass: rgba(255, 255, 255, 0.94);
  --dm-border: rgba(10, 92, 54, 0.15);
  --dm-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --dm-safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ==========================================================================
   1. MODAL CHỌN THIẾT BỊ LẦN ĐẦU (DEVICE SELECTION MODAL)
   ========================================================================== */
.dm-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.dm-modal-backdrop.dm-show {
  opacity: 1;
  visibility: visible;
}

.dm-modal-card {
  background: #ffffff;
  border-radius: 24px;
  max-width: 540px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(10, 92, 54, 0.12);
  overflow: hidden;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.dm-modal-backdrop.dm-show .dm-modal-card {
  transform: translateY(0) scale(1);
}

.dm-modal-header {
  padding: 24px 24px 16px;
  text-align: center;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
  border-bottom: 1px solid rgba(10, 92, 54, 0.08);
}

.dm-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #dcfce7;
  color: #166534;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.dm-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px;
  line-height: 1.3;
}

.dm-modal-desc {
  font-size: 13.5px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.dm-modal-body {
  padding: 20px 24px;
}

.dm-options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.dm-option-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 10px;
  border-radius: 16px;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  position: relative;
}

.dm-option-btn:hover {
  border-color: #86efac;
  background: #f0fdf4;
  transform: translateY(-2px);
}

.dm-option-btn.dm-selected {
  border-color: #0a5c36;
  background: #f0fdf4;
  box-shadow: 0 0 0 3px rgba(10, 92, 54, 0.15);
}

.dm-opt-icon {
  font-size: 28px;
  margin-bottom: 8px;
  transition: transform 0.2s ease;
}

.dm-option-btn:hover .dm-opt-icon {
  transform: scale(1.12);
}

.dm-opt-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.dm-opt-sub {
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
}

.dm-opt-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0a5c36;
  color: #ffffff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.dm-option-btn.dm-selected .dm-opt-check {
  display: flex;
}

.dm-auto-detect-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 16px;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  transition: all 0.15s ease;
}

.dm-auto-detect-bar:hover {
  background: #e2e8f0;
}

.dm-auto-detect-bar.dm-selected {
  background: #e0f2fe;
  border-color: #38bdf8;
}

.dm-auto-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #0369a1;
}

.dm-auto-detected-tag {
  font-size: 11px;
  background: #0284c7;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 500;
}

.dm-remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.dm-remember-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #0a5c36;
  cursor: pointer;
}

.dm-modal-footer {
  display: flex;
  gap: 10px;
  padding: 0 24px 24px;
}

.dm-btn-submit {
  flex: 1;
  background: #0a5c36;
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 20px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(10, 92, 54, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dm-btn-submit:hover {
  background: #08492b;
  transform: translateY(-1px);
}

.dm-btn-submit:active {
  transform: scale(0.97);
}

.dm-btn-close {
  background: transparent;
  color: #64748b;
  border: 1px solid #cbd5e1;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.dm-btn-close:hover {
  background: #f1f5f9;
}

/* ==========================================================================
   2. THANH ĐIỀU HƯỚNG DƯỚI ĐÁY CHO MOBILE (BOTTOM NAVIGATION BAR)
   ========================================================================== */
.nlc-bottom-nav {
  display: none; /* Mặc định ẩn trên desktop */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(62px + var(--dm-safe-bottom));
  padding-bottom: var(--dm-safe-bottom);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(10, 92, 54, 0.12);
  z-index: 9999;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

.nlc-bnav-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 0 4px;
}

.nlc-bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #64748b;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  flex: 1;
  height: 100%;
  transition: all 0.15s ease;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.nlc-bnav-item:active {
  transform: scale(0.92);
}

.nlc-bnav-icon {
  font-size: 20px;
  line-height: 1;
}

.nlc-bnav-item.active,
.nlc-bnav-item:hover {
  color: #0a5c36;
}

.nlc-bnav-item.active .nlc-bnav-icon {
  transform: scale(1.1);
}

/* Nút CTA Soi thành phần ở giữa Bottom Nav */
.nlc-bnav-item.nlc-bnav-highlight {
  position: relative;
  top: -10px;
}

.nlc-bnav-item.nlc-bnav-highlight .nlc-bnav-icon {
  width: 44px;
  height: 44px;
  background: #0a5c36;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 6px 16px rgba(10, 92, 54, 0.35);
  border: 3px solid #ffffff;
}

/* ==========================================================================
   3. NÚT CHUYỂN ĐỔI THIẾT BỊ TRÊN HEADER & FLOATING SWITCHER
   ========================================================================== */
.nav-device-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(10, 92, 54, 0.08);
  color: #0a5c36;
  border: 1px solid rgba(10, 92, 54, 0.18);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-device-btn:hover {
  background: rgba(10, 92, 54, 0.14);
  transform: translateY(-1px);
}

.nav-device-btn:active {
  transform: scale(0.96);
}

/* Floating Quick Switcher (Góc dưới bên trái màn hình) */
.dm-floating-bar {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  padding: 4px 6px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(10, 92, 54, 0.15);
  transition: all 0.25s ease;
}

.dm-floating-bar button {
  background: transparent;
  border: none;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.dm-floating-bar button:hover {
  color: #0a5c36;
  background: #f0fdf4;
}

.dm-floating-bar button.active {
  background: #0a5c36;
  color: #ffffff;
}

.dm-floating-bar button:active {
  transform: scale(0.94);
}

/* ==========================================================================
   4. QUY TẮC HIỂN THỊ KHI Ở CHẾ ĐỘ: DEVICE-MODE-MOBILE
   ========================================================================== */
html.device-mode-mobile body {
  padding-bottom: calc(72px + var(--dm-safe-bottom)) !important;
  font-size: 15px !important;
}

html.device-mode-mobile .nlc-bottom-nav {
  display: block !important;
}

/* Ẩn floating switcher góc dưới trên Mobile để giải phóng không gian màn hình */
html.device-mode-mobile .dm-floating-bar {
  display: none !important;
}

/* Thu gọn biểu tượng Zalo & Hotline thành nút tròn nổi (FAB) nhỏ gọn, thoáng đạt */
html.device-mode-mobile .nlc-floating-contact {
  bottom: calc(80px + var(--dm-safe-bottom)) !important;
  right: 14px !important;
  gap: 10px !important;
  z-index: 9998 !important;
}

html.device-mode-mobile .nlc-floating-contact .float-btn {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22) !important;
  overflow: hidden !important;
}

html.device-mode-mobile .nlc-floating-contact .float-text {
  display: none !important;
}

html.device-mode-mobile .nlc-floating-contact .float-icon {
  font-size: 22px !important;
  margin: 0 !important;
  line-height: 1 !important;
}

/* LOẠI BỎ CÁC MỤC THỪA ĐẦU TRANG TRÊN GIAO DIỆN ĐIỆN THOẠI (Hình 1) */
html.device-mode-mobile .nav .nav-r,
html.device-mode-mobile .nav-r,
html.device-mode-mobile #navDeviceBtn,
html.device-mode-mobile .btn-scanner-cta,
html.device-mode-mobile #burger,
html.device-mode-mobile .burger,
html.device-mode-mobile .nav .menu,
html.device-mode-mobile #menu,
html.device-mode-mobile .menu {
  display: none !important;
}

html.device-mode-mobile .nav {
  height: 52px !important;
}

html.device-mode-mobile .nav .in {
  padding: 6px 14px !important;
  min-height: 52px !important;
  height: 52px !important;
  justify-content: center !important;
}

html.device-mode-mobile .brand {
  margin: 0 auto !important;
}

/* Đảm bảo touch target >= 44px */
html.device-mode-mobile button,
html.device-mode-mobile .btn,
html.device-mode-mobile a.btn,
html.device-mode-mobile input,
html.device-mode-mobile select {
  min-height: 44px;
  font-size: 15px;
}

/* Hero Section trên Mobile */
html.device-mode-mobile .hero {
  padding: 36px 16px 28px !important;
  text-align: center;
}

html.device-mode-mobile .h-hero {
  font-size: 28px !important;
  line-height: 1.25 !important;
}

/* Grid & Layout ép 1 cột */
html.device-mode-mobile .fgrid,
html.device-mode-mobile .about-grid,
html.device-mode-mobile .nlc-grid-2,
html.device-mode-mobile .nlc-grid-3 {
  grid-template-columns: 1fr !important;
  gap: 16px !important;
}

/* Thống kê 5 chỉ số thành 2 cột cân xứng */
html.device-mode-mobile .stats,
html.device-mode-mobile .stats-grid,
html.device-mode-mobile .hero-stats {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 12px !important;
}

html.device-mode-mobile .stats > div:last-child {
  grid-column: span 2;
}

/* Bảng Sổ cái & Telemetry xếp thẻ dọc */
html.device-mode-mobile .ledger-table,
html.device-mode-mobile .nlc-telemetry-grid {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   5. QUY TẮC HIỂN THỊ KHI Ở CHẾ ĐỘ: DEVICE-MODE-TABLET
   ========================================================================== */
html.device-mode-tablet body {
  font-size: 15.5px !important;
}

html.device-mode-tablet .nlc-bottom-nav {
  display: none !important;
}

html.device-mode-tablet .fgrid,
html.device-mode-tablet .about-grid,
html.device-mode-tablet .nlc-grid-3 {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 20px !important;
}

html.device-mode-tablet .h-hero {
  font-size: 38px !important;
}

/* ==========================================================================
   6. QUY TẮC HIỂN THỊ KHI Ở CHẾ ĐỘ: DEVICE-MODE-DESKTOP
   ========================================================================== */
html.device-mode-desktop .nlc-bottom-nav {
  display: none !important;
}

/* ==========================================================================
   7. AUTO MEDIA QUERIES (DÀNH CHO CHẾ ĐỘ AUTO HOẶC TRUY CẬP THỰC TẾ)
   ========================================================================== */
@media (max-width: 767px) {
  html:not(.device-mode-desktop):not(.device-mode-tablet) .nlc-bottom-nav {
    display: block;
  }
  
  html:not(.device-mode-desktop):not(.device-mode-tablet) body {
    padding-bottom: calc(72px + var(--dm-safe-bottom));
  }

  /* Ẩn floating switcher góc dưới trên màn hình nhỏ */
  html:not(.device-mode-desktop):not(.device-mode-tablet) .dm-floating-bar {
    display: none !important;
  }

  /* Thu gọn biểu tượng Zalo & Hotline thành nút tròn nổi (FAB) 44px */
  html:not(.device-mode-desktop):not(.device-mode-tablet) .nlc-floating-contact {
    bottom: calc(80px + var(--dm-safe-bottom)) !important;
    right: 14px !important;
    gap: 10px !important;
    z-index: 9998 !important;
  }

  html:not(.device-mode-desktop):not(.device-mode-tablet) .nlc-floating-contact .float-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22) !important;
    overflow: hidden !important;
  }

  html:not(.device-mode-desktop):not(.device-mode-tablet) .nlc-floating-contact .float-text {
    display: none !important;
  }

  html:not(.device-mode-desktop):not(.device-mode-tablet) .nlc-floating-contact .float-icon {
    font-size: 22px !important;
    margin: 0 !important;
    line-height: 1 !important;
  }

  /* Loại bỏ các mục thừa đầu trang trên mobile (Hình 1) */
  html:not(.device-mode-desktop):not(.device-mode-tablet) .nav .nav-r,
  html:not(.device-mode-desktop):not(.device-mode-tablet) .nav-r,
  html:not(.device-mode-desktop):not(.device-mode-tablet) #navDeviceBtn,
  html:not(.device-mode-desktop):not(.device-mode-tablet) .btn-scanner-cta,
  html:not(.device-mode-desktop):not(.device-mode-tablet) #burger,
  html:not(.device-mode-desktop):not(.device-mode-tablet) .burger,
  html:not(.device-mode-desktop):not(.device-mode-tablet) .nav .menu,
  html:not(.device-mode-desktop):not(.device-mode-tablet) #menu,
  html:not(.device-mode-desktop):not(.device-mode-tablet) .menu {
    display: none !important;
  }

  html:not(.device-mode-desktop):not(.device-mode-tablet) .nav {
    height: 52px !important;
  }

  html:not(.device-mode-desktop):not(.device-mode-tablet) .nav .in {
    padding: 6px 14px !important;
    min-height: 52px !important;
    height: 52px !important;
    justify-content: center !important;
  }

  html:not(.device-mode-desktop):not(.device-mode-tablet) .brand {
    margin: 0 auto !important;
  }
}

/* Toast thông báo chuyển chế độ */
.dm-toast {
  position: fixed;
  top: 68px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #0f172a;
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  z-index: 100001;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.dm-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==========================================================================
   TỐI ƯU GIAO DIỆN NÚT CHỤP ẢNH / TẢI TỆP OCR (Hình 2)
   ========================================================================== */
.ocr-dropzone {
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.ocr-dropzone:hover {
  border-color: rgba(16, 185, 129, 0.7);
  background: rgba(15, 23, 42, 0.75);
}

.ocr-dropzone:active {
  transform: scale(0.99);
}

.ocr-action-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 14px 0 16px;
  flex-wrap: wrap;
}

.ocr-btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 44px;
}

.ocr-btn-camera {
  background: #0a5c36 !important;
  color: #ffffff !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  box-shadow: 0 4px 14px rgba(10, 92, 54, 0.3) !important;
}

.ocr-btn-camera:hover {
  background: #0d7343 !important;
  transform: translateY(-1px);
}

.ocr-btn-camera:active {
  transform: scale(0.97);
}

.ocr-btn-gallery {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #f1f5f9 !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  backdrop-filter: blur(8px) !important;
}

.ocr-btn-gallery:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

.ocr-btn-gallery:active {
  transform: scale(0.97);
}

html.device-mode-mobile .ocr-action-buttons {
  flex-direction: column;
  width: 100%;
  gap: 10px;
}

html.device-mode-mobile .ocr-btn-action {
  width: 100%;
  padding: 12px 18px;
  font-size: 15px;
}

/* Native Accessibility & Touch Fix for File Inputs */
.ocr-file-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.ocr-drop-clickable-area {
  display: block;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  padding: 4px;
}

.ocr-btn-action {
  cursor: pointer !important;
  user-select: none !important;
  -webkit-tap-highlight-color: transparent !important;
  text-decoration: none !important;
}

/* ==========================================================================
   OCR PHOTO CONTROLS & PREVIEW CARD — MOBILE PERFECT FIX 2026
   ========================================================================== */

/* 1. Khung card xem trước ảnh — Chống hoàn toàn tràn chiều ngang trên mobile */
.ocr-preview-card {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  display: flex !important;
  gap: 16px !important;
  background: rgba(15, 23, 42, 0.94) !important;
  border: 1px solid rgba(52, 211, 153, 0.35) !important;
  border-radius: 16px !important;
  padding: 16px !important;
  align-items: stretch !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
  overflow: hidden !important;
}

/* 2. Khung ảnh thumbnail */
.ocr-thumb-wrap {
  position: relative !important;
  width: 130px !important;
  min-width: 130px !important;
  height: 110px !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  flex-shrink: 0 !important;
  background: #020617 !important;
  box-sizing: border-box !important;
}

#ocrPreviewImg {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

/* Nút xóa nhanh hình tròn trên góc thumbnail ảnh — Khóa chặt tỷ lệ 1:1 không bị méo */
.ocr-thumb-del-badge {
  position: absolute !important;
  top: 6px !important;
  right: 6px !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  aspect-ratio: 1 / 1 !important;
  flex-shrink: 0 !important;
  border-radius: 50% !important;
  background: #dc2626 !important;
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45) !important;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), background 0.18s !important;
  z-index: 10 !important;
  padding: 0 !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
}

.ocr-thumb-del-badge:hover {
  background: #b91c1c !important;
  transform: scale(1.1) !important;
}

.ocr-thumb-del-badge:active {
  transform: scale(0.92) !important;
}

/* 3. Phần thông tin preview bên phải — Triệt để min-width: 0 */
.ocr-preview-info {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
}

/* Thanh tiêu đề trạng thái */
.ocr-status-top {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  gap: 8px !important;
  margin-bottom: 8px !important;
}

.ocr-status-title-box {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  overflow: hidden !important;
}

#ocrStatusTitle {
  font-size: 13.5px !important;
  color: #f8fafc !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: block !important;
}

/* Nút xóa nhanh ở thanh tiêu đề trạng thái */
.ocr-btn-delete-quick {
  background: rgba(239, 68, 68, 0.18) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.45) !important;
  padding: 5px 12px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  flex-shrink: 0 !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  white-space: nowrap !important;
}

.ocr-btn-delete-quick:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
  border-color: #ef4444 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25) !important;
}

.ocr-btn-delete-quick:active {
  transform: scale(0.96) !important;
}

/* Thanh tiến trình */
.ocr-progress-wrap {
  height: 6px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-radius: 3px !important;
  overflow: hidden !important;
  margin-bottom: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.ocr-progress-bar {
  height: 100% !important;
  background: linear-gradient(90deg, #10b981, #06b6d4, #10b981) !important;
  transition: width 0.3s ease !important;
  max-width: 100% !important;
}

.ocr-status-desc {
  font-size: 12.5px !important;
  color: #94a3b8 !important;
  margin: 0 0 8px !important;
  line-height: 1.4 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: block !important;
}

/* Hộp trích xuất INCI xem trước — Tuyệt đối không tràn */
.ocr-extracted-preview {
  font-size: 12px !important;
  color: #34d399 !important;
  background: rgba(16, 185, 129, 0.12) !important;
  padding: 6px 10px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(52, 211, 153, 0.3) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
}

/* 4. Thanh hành động chính dưới khung preview */
.ocr-preview-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-top: 12px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  flex-wrap: wrap !important;
}

.ocr-act-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 9px 14px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
  text-decoration: none !important;
  border: none !important;
  box-sizing: border-box !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

.ocr-act-btn svg {
  flex-shrink: 0 !important;
}

.ocr-act-btn span {
  display: inline-block !important;
  color: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  white-space: nowrap !important;
}

/* Nút Xóa ảnh đỏ nổi bật */
.ocr-act-delete {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.5) !important;
}

.ocr-act-delete:hover {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35) !important;
}

.ocr-act-delete:active {
  transform: scale(0.96) !important;
}

/* Nút Chụp ảnh mới xanh thương hiệu */
.ocr-act-camera {
  background: #0a5c36 !important;
  color: #ffffff !important;
  border: 1px solid #10b981 !important;
  box-shadow: 0 4px 12px rgba(10, 92, 54, 0.25) !important;
}

.ocr-act-camera:hover {
  background: #0d7042 !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

.ocr-act-camera:active {
  transform: scale(0.96) !important;
}

/* Nút Chọn ảnh khác kính mờ */
.ocr-act-upload {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #f1f5f9 !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  backdrop-filter: blur(8px) !important;
}

.ocr-act-upload:hover {
  background: rgba(255, 255, 255, 0.24) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  transform: translateY(-1px) !important;
}

.ocr-act-upload:active {
  transform: scale(0.96) !important;
}

/* 5. ĐẶC TRỊ GIAO DIỆN ĐIỆN THOẠI (MOBILE SCREENS <= 640px & DEVICE-MODE-MOBILE) */
@media (max-width: 640px) {
  .ocr-preview-card {
    flex-direction: column !important;
    padding: 14px !important;
    gap: 12px !important;
  }
  .ocr-thumb-wrap {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: 160px !important;
  }
  #ocrPreviewImg {
    object-fit: contain !important;
    background: #0a0f1d !important;
  }
  .ocr-preview-actions {
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }
  .ocr-act-btn {
    width: 100% !important;
    max-width: 100% !important;
    padding: 11px 16px !important;
    font-size: 14px !important;
    justify-content: center !important;
  }
}

html.device-mode-mobile .ocr-preview-card {
  flex-direction: column !important;
  padding: 14px !important;
  gap: 12px !important;
}

html.device-mode-mobile .ocr-thumb-wrap {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  height: 160px !important;
}

html.device-mode-mobile #ocrPreviewImg {
  object-fit: contain !important;
  background: #0a0f1d !important;
}

html.device-mode-mobile .ocr-preview-actions {
  flex-direction: column !important;
  width: 100% !important;
  gap: 8px !important;
}

html.device-mode-mobile .ocr-act-btn {
  width: 100% !important;
  max-width: 100% !important;
  padding: 11px 16px !important;
  font-size: 14px !important;
  justify-content: center !important;
}

/* ==========================================================================
   DIỄN ĐÀN CỘNG ĐỒNG CHĂM SÓC DA & PHỤC HỒI SINH HỌC (2026)
   - Bộ lọc chủ đề mượt mà
   - Đánh giá sao tương tác (Interactive Star Rating)
   - Thả icon biểu cảm (Reactions với animation nảy)
   - Danh sách bình luận & Form viết bình luận cộng đồng
   ========================================================================== */

/* 1. Bộ lọc chủ đề diễn đàn */
.forum-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 24px;
  flex-wrap: wrap;
}

.forum-filter-btn {
  background: rgba(255, 255, 255, 0.9);
  color: #475569;
  border: 1px solid rgba(10, 92, 54, 0.15);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.forum-filter-btn:hover {
  background: #f0fdf4;
  color: #0a5c36;
  border-color: rgba(10, 92, 54, 0.3);
  transform: translateY(-1px);
}

.forum-filter-btn.active {
  background: #0a5c36;
  color: #ffffff;
  border-color: #0a5c36;
  box-shadow: 0 4px 12px rgba(10, 92, 54, 0.2);
}

.forum-filter-btn:active {
  transform: scale(0.96);
}

/* 2. Thẻ bài viết trên danh sách */
.post-card-2026 {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease !important;
  cursor: pointer;
}

.post-card-2026:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 12px 30px rgba(10, 92, 54, 0.1) !important;
  border-color: rgba(10, 92, 54, 0.3) !important;
}

.post-card-rating-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fefce8;
  color: #854d0e;
  border: 1px solid #fef08a;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

/* 3. Modal xem chi tiết bài viết */
.post-modal-view {
  padding: 8px 4px;
}

.post-author-community-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f0fdf4 0%, #f8fafc 100%);
  border-radius: 14px;
  border: 1px solid rgba(10, 92, 54, 0.12);
  margin-bottom: 20px;
}

.post-author-comm-av {
  font-size: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.post-author-comm-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.post-author-comm-role {
  font-size: 12.5px;
  color: #0a5c36;
  font-weight: 600;
  margin-top: 2px;
}

.post-body-content {
  line-height: 1.85;
  color: #334155;
  font-size: 15px;
  white-space: pre-line;
  margin: 18px 0 24px;
  letter-spacing: -0.1px;
}

/* 4. Khối Đánh Giá Sao Tương Tác (Interactive Star Rating) */
.post-rating-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px 20px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.rating-left-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rating-title-text {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.rating-summary-text {
  font-size: 12.5px;
  color: #64748b;
}

.star-rating-interactive {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  direction: ltr;
}

.star-btn {
  font-size: 26px;
  color: #cbd5e1;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  transition: transform 0.15s ease, color 0.15s ease;
  user-select: none;
}

.star-btn:hover,
.star-btn.active {
  color: #eab308;
  transform: scale(1.2);
}

.star-btn:active {
  transform: scale(0.9);
}

/* 5. Khối Thả Icon Biểu Cảm (Reactions) */
.post-reactions-card {
  background: #f8fafc;
  border-radius: 16px;
  padding: 16px 20px;
  margin: 20px 0;
  border: 1px solid #e2e8f0;
}

.reactions-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.reactions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.reaction-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.reaction-btn:hover {
  border-color: #0a5c36;
  background: #f0fdf4;
  transform: translateY(-2px);
}

.reaction-btn.active {
  background: #dcfce7;
  color: #166534;
  border-color: #166534;
  box-shadow: 0 2px 8px rgba(22, 101, 52, 0.15);
  animation: popReaction 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reaction-btn:active {
  transform: scale(0.95);
}

@keyframes popReaction {
  0% { transform: scale(0.85); }
  50% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* 6. Khu Vực Bình Luận & Thảo Luận (Comments) */
.post-comments-container {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.comments-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.comments-count-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.comment-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
  animation: fadeIn 0.3s ease-out;
}

.comment-card:hover {
  border-color: rgba(10, 92, 54, 0.25);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.comment-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.comment-user-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-user-av {
  font-size: 20px;
  line-height: 1;
}

.comment-user-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

.comment-user-tag {
  font-size: 11px;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 4px;
}

.comment-date-text {
  font-size: 11.5px;
  color: #94a3b8;
}

.comment-text-content {
  font-size: 13.5px;
  color: #334155;
  line-height: 1.6;
  white-space: pre-line;
}

.comment-like-btn {
  background: transparent;
  border: none;
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
  padding: 4px 6px;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.comment-like-btn:hover {
  color: #dc2626;
  background: #fee2e2;
}

/* 7. Form Viết Bình Luận Mới */
.add-comment-card {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border: 1.5px solid rgba(10, 92, 54, 0.15);
  border-radius: 16px;
  padding: 18px 20px;
  margin-top: 20px;
}

.add-comment-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #0a5c36;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.comment-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

@media (max-width: 600px) {
  .comment-input-row {
    grid-template-columns: 1fr;
  }
}

.comment-input-row input,
.comment-textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  font-size: 13.5px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.comment-input-row input:focus,
.comment-textarea:focus {
  border-color: #0a5c36;
  box-shadow: 0 0 0 3px rgba(10, 92, 54, 0.12);
}

.comment-textarea {
  resize: vertical;
  min-height: 70px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.comment-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.comment-tip-text {
  font-size: 11.5px;
  color: #64748b;
}

.btn-submit-comment {
  background: #0a5c36;
  color: #ffffff;
  font-weight: 700;
  font-size: 13.5px;
  padding: 9px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(10, 92, 54, 0.2);
  transition: all 0.2s ease;
}

.btn-submit-comment:hover {
  background: #08492b;
  transform: translateY(-1px);
}

.btn-submit-comment:active {
  transform: scale(0.96);
}


/* ==========================================================================
   DIỄN ĐÀN: HÌNH ẢNH CHỦ ĐỀ & TÍNH NĂNG ĐÍNH KÈM ẢNH BÌNH LUẬN 2026
   ========================================================================== */

/* 1. Thumbnail ảnh chủ đề trên thẻ bài viết */
.post-card-thumb-wrap {
  width: 100% !important;
  height: 168px !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  margin-bottom: 14px !important;
  background: #f1f5f9 !important;
  position: relative !important;
  border: 1px solid #e2e8f0 !important;
}

.post-card-thumb {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.post-card-2026:hover .post-card-thumb {
  transform: scale(1.05) !important;
}

/* 2. Ảnh lớn minh họa trong Modal chi tiết bài viết */
.post-modal-featured-img-wrap {
  width: 100% !important;
  max-height: 280px !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  margin: 14px 0 20px !important;
  position: relative !important;
  background: #0f172a !important;
  cursor: zoom-in !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
}

.post-modal-featured-img {
  width: 100% !important;
  max-height: 280px !important;
  object-fit: cover !important;
  display: block !important;
  transition: opacity 0.2s ease !important;
}

.post-modal-featured-img-wrap:hover .post-modal-featured-img {
  opacity: 0.95 !important;
}

.post-modal-img-zoom-hint {
  position: absolute !important;
  bottom: 10px !important;
  right: 10px !important;
  background: rgba(15, 23, 42, 0.78) !important;
  backdrop-filter: blur(4px) !important;
  color: #ffffff !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  padding: 5px 12px !important;
  border-radius: 20px !important;
  pointer-events: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

/* 3. Ảnh đính kèm trong từng bình luận */
.comment-attached-img-wrap {
  margin: 10px 0 6px !important;
  display: inline-block !important;
  cursor: zoom-in !important;
  position: relative !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  border: 1px solid #cbd5e1 !important;
  background: #f8fafc !important;
  max-width: 240px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

.comment-attached-img {
  width: 100% !important;
  max-height: 150px !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform 0.25s ease !important;
}

.comment-attached-img-wrap:hover .comment-attached-img {
  transform: scale(1.04) !important;
}

.comment-img-badge {
  display: block !important;
  font-size: 10.5px !important;
  color: #0369a1 !important;
  background: #e0f2fe !important;
  padding: 4px 8px !important;
  text-align: center !important;
  font-weight: 700 !important;
  border-top: 1px solid #bae6fd !important;
}

/* 4. Khối đính kèm ảnh trong form bình luận */
.comment-attach-row {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 10px 0 12px !important;
  flex-wrap: wrap !important;
}

.btn-attach-photo {
  background: #f0fdf4 !important;
  border: 1.5px dashed #10b981 !important;
  color: #047857 !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  padding: 8px 16px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: all 0.2s ease !important;
}

.btn-attach-photo:hover {
  background: #dcfce7 !important;
  border-color: #059669 !important;
  transform: translateY(-1px) !important;
}

.btn-attach-photo:active {
  transform: scale(0.97) !important;
}

.comment-img-preview-box {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  background: #ffffff !important;
  border: 1.5px solid #10b981 !important;
  border-radius: 8px !important;
  padding: 4px 8px !important;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.15) !important;
}

.comment-img-preview-box img {
  width: 40px !important;
  height: 40px !important;
  object-fit: cover !important;
  border-radius: 6px !important;
  border: 1px solid #cbd5e1 !important;
}

.btn-del-preview-img {
  background: #ef4444 !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 50% !important;
  width: 22px !important;
  height: 22px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.15s ease !important;
}

.btn-del-preview-img:hover {
  background: #dc2626 !important;
  transform: scale(1.1) !important;
}

/* 5. Lightbox Modal Phóng to Ảnh Toàn Màn Hình */
.lightbox-img-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(15, 23, 42, 0.92) !important;
  backdrop-filter: blur(8px) !important;
  z-index: 9999999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  animation: fadeIn 0.2s ease-out !important;
}

.lightbox-img-container {
  position: relative !important;
  max-width: 95vw !important;
  max-height: 92vh !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

.lightbox-img {
  max-width: 100% !important;
  max-height: 80vh !important;
  object-fit: contain !important;
  border-radius: 12px !important;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6) !important;
  border: 2px solid rgba(255, 255, 255, 0.2) !important;
}

.lightbox-close-btn {
  align-self: flex-end !important;
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  padding: 8px 18px !important;
  border-radius: 20px !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  margin-bottom: 12px !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.lightbox-close-btn:hover {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  transform: scale(1.05) !important;
}

/* Tối ưu riêng cho Mobile */
@media (max-width: 767px) {
  .post-card-thumb-wrap {
    height: 148px !important;
  }
  .post-modal-featured-img-wrap {
    max-height: 220px !important;
  }
  .comment-attached-img-wrap {
    max-width: 180px !important;
  }
  .comment-attached-img {
    max-height: 120px !important;
  }
}

/* Nút Xem thêm bình luận */
.btn-load-more-comments {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #0f172a !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  padding: 10px 24px !important;
  border-radius: 25px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  transition: all 0.25s ease !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

.btn-load-more-comments:hover {
  background: #0a5c36 !important;
  color: #ffffff !important;
  border-color: #0a5c36 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(10, 92, 54, 0.2) !important;
}

.btn-load-more-comments:active {
  transform: scale(0.97) !important;
}

html.device-mode-desktop .h-hero {
  font-size: 38px !important;
  line-height: 1.38 !important;
  letter-spacing: -0.015em !important;
  max-width: 900px !important;
}
