/**
 * guide-theme.css — Giao diện Trung tâm Hướng dẫn & Trợ lý AI Tương tác Vizio.
 */

.vizio-guide-wrap {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background: #f8fafc;
  padding: 20px 20px 72px;
  box-sizing: border-box;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  color: #1e293b;
}

.vizio-guide-wrap.is-standalone {
  position: fixed;
  inset: 0;
  z-index: 9500;
  height: 100vh;
  overflow-y: auto;
  padding-top: 28px;
}

.vizio-guide-inner {
  max-width: 1120px;
  margin: 0 auto;
}

/* ============================================================================
   1. HERO TRUNG TÂM TÌM KIẾM & HỎI AI THÔNG MINH
   ============================================================================ */
.vg-hero {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.vg-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.vg-hero-left {
  flex: 1;
  min-width: 280px;
}

.vg-badge-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #4f46e5;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  padding: 4px 10px;
  border-radius: 99px;
  margin-bottom: 8px;
}

.vg-title {
  margin: 0 0 4px 0;
  font-size: 21px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.vg-subtitle {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: #475569;
}

.vg-hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.vg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  transition: all 0.15s ease;
}

.vg-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.vg-btn-primary {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.vg-btn-primary:hover {
  background: #1e293b;
}

/* Thanh tìm kiếm thông minh kết hợp Hỏi AI */
.vg-smart-search-bar {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
}

.vg-smart-input-wrap {
  flex: 1;
  min-width: 240px;
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 11px;
  padding: 0 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vg-smart-input-wrap:focus-within {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.vg-smart-search-ico {
  font-size: 17px;
  color: #64748b;
  margin-right: 8px;
  flex-shrink: 0;
}

.vg-smart-input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13.5px;
  color: #0f172a;
  padding: 10px 0;
}

.vg-smart-input::placeholder {
  color: #94a3b8;
}

.vg-smart-clear {
  border: none;
  background: #f1f5f9;
  color: #64748b;
  width: 22px;
  height: 22px;
  border-radius: 99px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vg-smart-clear:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.vg-smart-ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  min-height: 40px;
  border-radius: 11px;
  border: none;
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.vg-smart-ai-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.vg-hero-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.vg-hero-chips-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  margin-right: 2px;
}

.vg-hero-chip {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 99px;
  padding: 4px 11px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.vg-hero-chip:hover {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #93c5fd;
}

/* ============================================================================
   2. THANH LỘ TRÌNH 4 BƯỚC VẬN HÀNH CHUẨN (SMART ONBOARDING CHECKLIST)
   ============================================================================ */
.vg-onboarding-strip {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 18px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.02);
}

.vg-ob-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.vg-ob-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.vg-ob-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.vg-ob-status-pill.is-ready {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.vg-ob-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

.vg-ob-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 7px;
  cursor: pointer;
}

.vg-ob-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.vg-ob-step-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s ease;
}

.vg-ob-step-card.is-done {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.vg-ob-step-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vg-ob-step-num {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #0f172a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vg-ob-step-card.is-done .vg-ob-step-num {
  background: #059669;
}

.vg-ob-step-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.vg-ob-step-desc {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.vg-ob-step-btn {
  margin-top: auto;
  padding: 6px 10px;
  border-radius: 7px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.14s ease;
}

.vg-ob-step-btn:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

/* ============================================================================
   3. THANH TAB VAI TRÒ & LƯỚI THẺ QUY TRÌNH KHOA HỌC
   ============================================================================ */
.vg-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.vg-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.vg-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 9px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}

.vg-tab:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.vg-tab.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.vg-tab-count {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
  background: rgba(100, 116, 139, 0.14);
  color: inherit;
}

.vg-tab.active .vg-tab-count {
  background: rgba(255, 255, 255, 0.22);
}

.vg-result-meta {
  font-size: 12.5px;
  color: #64748b;
}

.vg-empty-state {
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  padding: 36px 20px;
  text-align: center;
  margin-bottom: 20px;
}

.vg-empty-ico {
  font-size: 32px;
  color: #7c3aed;
  margin-bottom: 8px;
}

.vg-empty-state h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: #0f172a;
}

.vg-empty-state p {
  margin: 0 0 14px;
  font-size: 13px;
  color: #64748b;
}

.vg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.vg-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.vg-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -6px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.vg-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.vg-step-badge {
  font-size: 11px;
  font-weight: 800;
  color: #ffffff !important;
  padding: 3px 9px;
  border-radius: 6px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.vg-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.vg-role-tag {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

.vg-time-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 2px 7px;
  border-radius: 6px;
}

.vg-card-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vg-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}

.vg-card-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.32;
}

.vg-row-purpose {
  font-size: 13px;
  line-height: 1.48;
  color: #334155;
  background: #f8fafc;
  border-left: 3px solid #cbd5e1;
  padding: 8px 10px;
  border-radius: 0 8px 8px 0;
}

.vg-row-tag {
  font-weight: 700;
  color: #0f172a;
  margin-right: 5px;
}

.vg-row-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vg-row-steps-head {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
}

.vg-step-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  line-height: 1.48;
  color: #334155;
}

.vg-step-list b {
  color: #0f172a;
  font-weight: 700;
}

.vg-row-tip {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  line-height: 1.45;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 9px;
  padding: 8px 10px;
  margin-top: auto;
}

.vg-row-tip-ico {
  flex-shrink: 0;
  font-size: 13px;
}

.vg-card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 2px;
}

.vg-action-btn {
  flex: 1;
  border: none;
  color: #ffffff !important;
  font-size: 12.5px;
  font-weight: 700;
  padding: 9px 13px;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.vg-action-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.vg-card-ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: #4338ca;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.vg-card-ai-btn:hover {
  background: #e0e7ff;
  border-color: #818cf8;
}

/* ============================================================================
   4. BẢN ĐỒ ĐIỀU HƯỚNG NHANH 23 MÀN HÌNH HỆ THỐNG
   ============================================================================ */
.vg-directory-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px 22px;
}

.vg-directory-head {
  margin-bottom: 16px;
}

.vg-directory-title {
  margin: 0 0 4px;
  font-size: 16.5px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vg-directory-title i {
  color: #2563eb;
  font-size: 20px;
}

.vg-directory-sub {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

.vg-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 14px;
}

.vg-dir-group {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
}

.vg-dir-group-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.vg-dir-group-ico {
  font-size: 17px;
  display: inline-flex;
}

.vg-dir-group-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.vg-dir-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vg-dir-item {
  width: 100%;
  border: 1px solid transparent;
  background: #ffffff;
  border-radius: 8px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  cursor: pointer;
  text-align: left;
  transition: all 0.13s ease;
}

.vg-dir-item:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.vg-dir-item-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #1e293b;
}

.vg-dir-item-right {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #64748b;
  font-size: 12px;
  flex-shrink: 0;
}

.vg-dir-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 99px;
  background: #f1f5f9;
  color: #475569;
}

/* ============================================================================
   NÚT HỎI AI (BÊN TRÊN) + ICON HƯỚNG DẪN TÀI LIỆU (i) MỜ GÓC PHẢI (BÊN DƯỚI)
   ============================================================================ */
.vg-ai-float-btn {
  position: fixed;
  right: 16px;
  bottom: 78px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  cursor: pointer;
  z-index: 9801;
  height: 34px;
  padding: 0 12px 0 10px;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 99px;
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.82) 0%, rgba(37, 99, 235, 0.82) 100%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.18), 0 1px 3px rgba(15, 23, 42, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.56;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.vg-ai-float-btn:hover,
.vg-ai-float-btn.is-open {
  opacity: 0.96;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -2px rgba(37, 99, 235, 0.42), 0 3px 8px rgba(15, 23, 42, 0.16);
}

.vg-trigger-ai-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  pointer-events: none;
}

.vg-trigger-ai-text {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  pointer-events: none;
}

.vg-float-trigger {
  display: none !important;
}

.vg-float-trigger.is-dragging,
.vg-ai-float-btn.is-dragging {
  cursor: grabbing !important;
  opacity: 0.95;
  transform: none !important;
  transition: none !important;
}

.vg-doc-ico,
.vg-doc-ico * {
  pointer-events: none;
}

.vg-doc-ico {
  width: 28px;
  height: 31px;
  display: block;
}

.vg-doc-ico--filled {
  display: none;
}

.vg-float-trigger:hover,
.vg-float-trigger.is-open {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* Khi di chuột, đang kéo, hoặc đang mở: chuyển từ icon viền mảnh sang icon đặc (đúng theo mẫu ảnh) */
.vg-float-trigger:hover .vg-doc-ico--outline,
.vg-float-trigger.is-dragging .vg-doc-ico--outline,
.vg-float-trigger.is-open .vg-doc-ico--outline {
  display: none;
}

.vg-float-trigger:hover .vg-doc-ico--filled,
.vg-float-trigger.is-dragging .vg-doc-ico--filled,
.vg-float-trigger.is-open .vg-doc-ico--filled {
  display: block;
}

/* ============================================================================
   HỘP TRỢ LÝ VIZIO AI — WORK COPILOT OS (4 TẦNG, CÁ NHÂN HOÁ THEO CẤP BẬC)
   ============================================================================ */
.vg-ai-float-btn.has-badge {
  opacity: 0.92;
  padding-right: 10px;
}

.vg-trigger-alert-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1;
  margin-left: 2px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 2px 6px rgba(239, 68, 68, 0.45);
  pointer-events: none;
}

.vg-float-popover {
  position: fixed;
  right: 16px;
  bottom: 110px;
  z-index: 9850;
  width: 456px;
  max-width: calc(100vw - 24px);
  max-height: min(720px, calc(100vh - 100px));
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 0;
  box-shadow:
    0 24px 52px -12px rgba(15, 23, 42, 0.28),
    0 4px 16px rgba(15, 23, 42, 0.08);
  color: #1e293b;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.2s ease, max-height 0.2s ease;
}

.vg-float-popover.is-expanded-size {
  width: 540px;
  max-height: min(780px, calc(100vh - 80px));
}

/* Header gọn 1 dòng — phong cách AI Copilot tương lai */
.vg-pop-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #0f172a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: move;
  user-select: none;
  flex-shrink: 0;
}

.vg-pop-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.vg-ai-pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.65);
  animation: vgPulseGlow 2s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes vgPulseGlow {
  0%, 100% { opacity: 0.7; transform: scale(0.95); box-shadow: 0 0 6px rgba(168, 85, 247, 0.4); }
  50% { opacity: 1; transform: scale(1.15); box-shadow: 0 0 12px rgba(59, 130, 246, 0.8); }
}

.vg-pop-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.vg-pop-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  white-space: nowrap;
  line-height: 1.2;
}

.vg-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 1.5px 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #cbd5e1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vg-pop-head-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.vg-pop-mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.09);
  color: #f1f5f9;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.vg-pop-mini-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.vg-pop-icon-btn {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.vg-pop-icon-btn:hover,
.vg-pop-icon-btn.active {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
}

.vg-pop-close {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  font-size: 16px;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.vg-pop-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

/* Thanh chuyển tab chế độ (Tầng 2: Trợ lý AI vs Hướng dẫn màn này vs Chỉ nút) */
.vg-context-strip {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 7px 11px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex-shrink: 0;
}

.vg-mode-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vg-mode-tab {
  flex: 1;
  min-width: 0;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 9px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.vg-mode-tab:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.vg-mode-tab.active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.08);
}

.vg-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.vg-spotlight-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 9px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.14s ease;
}

.vg-spotlight-pill:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

/* Ngữ cảnh khách hàng đang mở trên Live Chat (Quân sư chốt đơn 1 chạm) */
.vg-customer-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(90deg, #f0fdf4 0%, #eff6ff 100%);
  border-bottom: 1px solid #dbeafe;
  flex-shrink: 0;
}

.vg-cust-brief {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.vg-cust-avatar-ico {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #dbeafe;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.vg-cust-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.vg-cust-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.vg-cust-sub {
  font-size: 10.5px;
  color: #64748b;
  line-height: 1.2;
}

.vg-cust-sub.is-warn {
  color: #f59e0b;
}

.vg-cust-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.vg-cust-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.vg-cust-btn.is-magic {
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(124, 58, 237, 0.25);
}

.vg-cust-btn.is-magic:hover {
  filter: brightness(1.1);
  transform: translateY(-0.5px);
}

.vg-cust-btn.is-note {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}

.vg-cust-btn.is-note:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.vg-screen-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
}

.vg-screen-bar-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  min-width: 0;
  flex: 1;
}

.vg-screen-name-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vg-screen-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
  flex-shrink: 0;
}

.vg-screen-bar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 12px;
  flex-shrink: 0;
}

.vg-spotlight-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.14s ease;
}

.vg-spotlight-pill:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

.vg-screen-expand-toggle {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* Vùng cuộn lịch sử chat & Bản tin đầu ca (Tầng 3) */
.vg-ai-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8fafc;
  min-height: 200px;
  max-height: 420px;
}

.vg-float-popover.is-expanded-size .vg-ai-body {
  max-height: 520px;
}

/* Thẻ tóm tắt màn hình đang đứng */
.vg-screen-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 11px 13px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.vg-screen-card-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: #0f172a;
  margin-bottom: 7px;
}

.vg-screen-quick-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

/* Bản tin khởi đầu thông minh (Tối giản & Khoa học, thay cho các khối thô kệch) */
.vg-smart-overview {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

/* THẺ QUÂN SƯ KHÁCH HÀNG 1 CHẠM (CUSTOMER AI HUB) */
.vg-cust-hub-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  padding: 11px 12px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.vg-chub-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 9px;
  border-bottom: 1px solid #f1f5f9;
}

.vg-chub-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.22);
}

.vg-chub-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vg-chub-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vg-chub-name {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.vg-chub-channel {
  font-size: 10px;
  font-weight: 700;
  padding: 1.5px 6px;
  border-radius: 99px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  white-space: nowrap;
  flex-shrink: 0;
}

.vg-chub-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #64748b;
}

.vg-chub-phone {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 600;
  color: #334155;
}

.vg-chub-phone.is-none {
  color: #94a3b8;
  font-style: italic;
}

.vg-chub-dot-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #059669;
  font-weight: 600;
  font-size: 10.5px;
}

.vg-chub-dot-status::before {
  content: "";
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: #10b981;
}

/* Lưới hành động AI quân sư khách hàng */
.vg-chub-actions-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vg-chub-act {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7.5px 10px;
  border-radius: 9px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  text-align: left;
  transition: all 0.14s ease;
  width: 100%;
}

.vg-chub-act:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  transform: translateY(-0.5px);
}

.vg-chub-act.is-primary {
  background: linear-gradient(135deg, #faf5ff 0%, #eff6ff 100%);
  border-color: #c7d2fe;
}

.vg-chub-act.is-primary:hover {
  background: linear-gradient(135deg, #f3e8ff 0%, #e0e7ff 100%);
  border-color: #a5b4fc;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
}

.vg-chub-act-ico {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #6366f1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.vg-chub-act.is-primary .vg-chub-act-ico {
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.25);
}

.vg-chub-act-ico.c-amber {
  background: #fef3c7;
  color: #d97706;
}

.vg-chub-act-ico.c-rose {
  background: #ffe4e6;
  color: #e11d48;
}

.vg-chub-act-ico.c-blue {
  background: #e0f2fe;
  color: #0284c7;
}

.vg-chub-act-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.vg-chub-act-text strong {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.vg-chub-act-text span {
  font-size: 10.5px;
  color: #64748b;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vg-chub-act-arr {
  color: #94a3b8;
  font-size: 12px;
  flex-shrink: 0;
  transition: transform 0.14s ease;
}

.vg-chub-act:hover .vg-chub-act-arr {
  transform: translateX(2px);
  color: #475569;
}

.vg-chub-toggle-bar {
  display: flex;
  justify-content: center;
  padding-top: 2px;
}

.vg-chub-toggle-btn {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 6px;
  transition: all 0.14s ease;
}

.vg-chub-toggle-btn:hover {
  color: #2563eb;
  background: #f1f5f9;
}

.vg-shift-summary-block {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.vg-ai-hero-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.vg-ai-hero-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(124, 58, 237, 0.28);
}

.vg-ai-hero-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.vg-ai-hero-greet {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.vg-ai-hero-sub {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.35;
}

.vg-ai-hero-sub strong.c-rose {
  color: #e11d48;
}

/* Metric Ribbon tinh tế, khoa học — tự xuống dòng gọn gàng không bị cắt chữ */
.vg-metric-ribbon {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 2px 0;
}

.vg-metric-ribbon::-webkit-scrollbar {
  display: none;
}

.vg-metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 3.5px 8px;
  border-radius: 7px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
}

.vg-metric-chip .vg-m-label {
  color: #64748b;
  font-weight: 500;
}

.vg-metric-chip .vg-m-val {
  font-weight: 700;
  color: #0f172a;
}

.vg-metric-chip.tone-rose .vg-m-val { color: #dc2626; font-weight: 800; }
.vg-metric-chip.tone-emerald .vg-m-val { color: #059669; }
.vg-metric-chip.tone-amber .vg-m-val { color: #d97706; }
.vg-metric-chip.tone-blue .vg-m-val { color: #2563eb; }

/* Việc khẩn cấp cần xử lý ngay */
.vg-urgent-smart-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vg-urgent-smart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: 10px;
}

.vg-urgent-smart-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.vg-urgent-smart-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #991b1b;
}

.vg-smart-badge {
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  background: #ef4444;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.vg-urgent-smart-sub {
  font-size: 11px;
  color: #7f1d1d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vg-urgent-smart-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid #fca5a5;
  background: #ffffff;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.14s ease;
}

.vg-urgent-smart-action:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

/* Khung gợi ý tác vụ thông minh */
.vg-smart-prompts-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 1px;
}

.vg-prompts-caption {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.02em;
}

.vg-prompts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.vg-prompt-card {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 11.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.14s ease;
  line-height: 1.25;
}

.vg-prompt-card i {
  color: #4f46e5;
  font-size: 14px;
  flex-shrink: 0;
}

.vg-prompt-card span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vg-prompt-card:hover {
  border-color: #c7d2fe;
  background: #f5f3ff;
  color: #4338ca;
  transform: translateY(-0.5px);
}

.vg-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.vg-kpi-grid.is-in-reply {
  margin: 8px 0;
}

.vg-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 3.5px solid #3b82f6;
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
}

.vg-kpi-card.tone-emerald { border-left-color: #10b981; background: #fcfdfc; }
.vg-kpi-card.tone-blue { border-left-color: #2563eb; }
.vg-kpi-card.tone-amber { border-left-color: #f59e0b; background: #fffdf7; }
.vg-kpi-card.tone-rose { border-left-color: #ef4444; background: #fffafb; }
.vg-kpi-card.tone-indigo { border-left-color: #4f46e5; }
.vg-kpi-card.tone-purple { border-left-color: #7c3aed; }
.vg-kpi-card.tone-slate { border-left-color: #64748b; }

.vg-kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vg-kpi-value {
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}

.vg-kpi-card.tone-emerald .vg-kpi-value { color: #047857; }
.vg-kpi-card.tone-rose .vg-kpi-value { color: #b91c1c; }
.vg-kpi-card.tone-amber .vg-kpi-value { color: #b45309; }
.vg-kpi-card.tone-blue .vg-kpi-value { color: #1d4ed8; }

.vg-kpi-sub {
  font-size: 10.5px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Danh sách việc cần xử lý ngay (Urgent Items) */
.vg-urgent-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.vg-section-caption {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 800;
  color: #0f172a;
}

.vg-section-caption i {
  color: #ef4444;
  font-size: 14px;
}

.vg-urgent-list,
.vg-reply-items-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vg-reply-items-list {
  margin: 8px 0;
}

.vg-urgent-item,
.vg-reply-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 7px 9px;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.vg-urgent-item:hover,
.vg-reply-item-row:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}

.vg-urgent-main,
.vg-reply-item-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vg-urgent-title-row,
.vg-reply-item-top {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.vg-urgent-title,
.vg-reply-item-title {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.vg-urgent-sub,
.vg-reply-item-sub {
  font-size: 11.2px;
  color: #475569;
  line-height: 1.35;
}

.vg-reply-item-meta {
  font-size: 10.8px;
  color: #64748b;
  line-height: 1.3;
}

.vg-item-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  padding: 1.5px 6px;
  border-radius: 99px;
  background: #e0f2fe;
  color: #0369a1;
  white-space: nowrap;
}

.vg-item-badge.tone-rose { background: #fee2e2; color: #b91c1c; }
.vg-item-badge.tone-amber { background: #fef3c7; color: #b45309; }
.vg-item-badge.tone-emerald { background: #d1fae5; color: #047857; }
.vg-item-badge.tone-purple { background: #ede9fe; color: #6d28d9; }
.vg-item-badge.tone-blue { background: #dbeafe; color: #1d4ed8; }
.vg-item-badge.tone-slate { background: #e2e8f0; color: #334155; }

.vg-item-act-btn {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.14s ease;
}

.vg-item-act-btn:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.vg-pulse-clean {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  color: #475569;
  line-height: 1.4;
}

.vg-pulse-clean i {
  font-size: 18px;
  color: #10b981;
  flex-shrink: 0;
}

/* Câu trả lời mẫu gợi ý chốt đơn (Draft Replies) */
.vg-draft-replies {
  margin: 9px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vg-draft-head {
  font-size: 11.5px;
  font-weight: 700;
  color: #4338ca;
}

.vg-draft-box {
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  border-radius: 9px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vg-draft-text {
  font-size: 12px;
  color: #1e1b4b;
  line-height: 1.42;
  font-style: italic;
}

.vg-draft-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vg-draft-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.vg-draft-btn.is-fill {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
}

.vg-draft-btn.is-fill:hover {
  background: #4338ca;
}

.vg-draft-btn:hover:not(.is-fill) {
  background: #f1f5f9;
}

.vg-ai-reply-card.is-rbac-denied {
  border-color: #fecaca;
  background: #fffafb;
}

.vg-ai-reply-card.is-rbac-denied .vg-ai-reply-title {
  color: #991b1b;
}

.vg-ai-reply-card.is-rbac-denied .vg-ai-reply-title i {
  color: #dc2626;
}

.vg-pop-desc {
  margin: 0 0 8px 0;
  font-size: 12.5px;
  color: #334155;
  line-height: 1.45;
  background: #f8fafc;
  border-left: 3px solid #3b82f6;
  padding: 6px 9px;
  border-radius: 0 7px 7px 0;
}

.vg-pop-steps {
  margin: 0;
  padding-left: 17px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  line-height: 1.46;
  color: #334155;
}

.vg-pop-steps b {
  color: #0f172a;
  font-weight: 700;
}

.vg-pop-note {
  margin-top: 8px;
  padding: 7px 9px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  font-size: 11.8px;
  color: #92400e;
  line-height: 1.4;
}

/* Lịch sử Chat AI */
.vg-ai-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vg-ai-msg.is-user {
  display: flex;
  justify-content: flex-end;
}

.vg-ai-user-bubble {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #ffffff;
  font-size: 12.8px;
  font-weight: 500;
  padding: 8px 13px;
  border-radius: 14px 14px 3px 14px;
  max-width: 85%;
  line-height: 1.42;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.18);
}

.vg-ai-reply-card {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 14px 14px 14px 4px;
  padding: 12px 13px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.06);
}

.vg-ai-reply-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 6px;
}

.vg-ai-reply-title i {
  color: #7c3aed;
  font-size: 15px;
}

.vg-ai-reply-desc {
  margin: 0 0 8px 0;
  font-size: 12.5px;
  color: #334155;
  line-height: 1.46;
}

.vg-ai-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.vg-act-btn {
  width: 100%;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  transition: all 0.15s ease;
}

.vg-act-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.vg-act-btn.is-primary {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
}

.vg-act-btn.is-primary:hover {
  filter: brightness(1.06);
}

/* Chữ câu hỏi / câu trả lời của Trợ lý to, dễ đọc (chủ shop 07/11/2026: "cho cái font chữ lớn lên tý cho dễ nhìn"). Chỉ vùng
   hội thoại (.vg-ai-messages) — thẻ "Hướng dẫn màn này", bản tin ca, ô nhập giữ nguyên. Câu trả lời 15px; bảng 13.5px. */
.vg-ai-messages .vg-ai-user-bubble {
  font-size: 14.5px;
  line-height: 1.5;
}

.vg-ai-messages .vg-ai-reply-card {
  padding: 13px 14px;
}

.vg-ai-messages .vg-ai-reply-title {
  font-size: 15px;
  line-height: 1.35;
  gap: 7px;
  margin-bottom: 8px;
}

.vg-ai-messages .vg-ai-reply-title i {
  font-size: 17px;
}

.vg-ai-messages .vg-ai-reply-desc {
  font-size: 15px;
  line-height: 1.6;
  color: #1e293b;
  margin-bottom: 10px;
}

.vg-ai-messages .vg-pop-steps {
  font-size: 14.5px;
  line-height: 1.55;
  gap: 6px;
  padding-left: 20px;
}

.vg-ai-messages .vg-pop-note {
  font-size: 13.5px;
  line-height: 1.5;
  padding: 8px 10px;
}

.vg-ai-messages .vg-kpi-card {
  padding: 9px 11px;
}

.vg-ai-messages .vg-kpi-label {
  font-size: 12.5px;
  line-height: 1.3;
  white-space: normal;
}

.vg-ai-messages .vg-kpi-value {
  font-size: 16px;
  /* Số tiền rất dài (VD doanh thu năm nhiều cơ sở "12.345.678.901đ") xuống dòng trong thẻ thay vì tràn ra ngoài ở khung điện thoại. */
  word-break: break-word;
  overflow-wrap: anywhere;
}

.vg-ai-messages .vg-kpi-sub {
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
}

.vg-ai-messages .vg-ai-table-title {
  font-size: 13px;
}

.vg-ai-messages .vg-ai-table {
  font-size: 13.5px;
}

.vg-ai-messages .vg-ai-table th {
  font-size: 12.5px;
  white-space: normal; /* tiêu đề cột xuống dòng thay vì đẩy bảng tràn ngang ở khung hẹp (điện thoại) */
}

.vg-ai-messages .vg-ai-table th,
.vg-ai-messages .vg-ai-table td {
  padding: 6px 8px;
}

.vg-ai-messages .vg-ai-table td:first-child {
  min-width: 84px;
}

.vg-ai-messages .vg-ai-data-note {
  font-size: 12.5px;
  line-height: 1.5;
}

.vg-ai-messages .vg-reply-item-title {
  font-size: 14px;
}

.vg-ai-messages .vg-reply-item-sub {
  font-size: 13px;
  line-height: 1.4;
}

.vg-ai-messages .vg-reply-item-meta {
  font-size: 12.5px;
}

.vg-ai-messages .vg-item-badge {
  font-size: 11.5px;
}

.vg-ai-messages .vg-item-act-btn {
  font-size: 12.5px;
}

.vg-ai-messages .vg-draft-head {
  font-size: 13px;
}

.vg-ai-messages .vg-draft-text {
  font-size: 14px;
  line-height: 1.5;
}

.vg-ai-messages .vg-draft-btn {
  font-size: 12.5px;
}

.vg-ai-messages .vg-act-btn {
  font-size: 14px;
  padding: 9px 12px;
}

.vg-ai-messages .vg-ai-loading {
  font-size: 13.5px;
}

/* Loading indicator */
.vg-ai-loading {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #64748b;
  padding: 7px 11px;
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.vg-ai-typing-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6366f1;
  animation: vgTypingPulse 1.2s infinite ease-in-out;
}

.vg-ai-typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.vg-ai-typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes vgTypingPulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.85); }
  40% { opacity: 1; transform: scale(1.15); }
}

/* ============================================================================
   KHAY GỢI Ý THÔNG MINH CỐ ĐỊNH TRÊN Ô NHẬP (KHÔNG BAO GIỜ BỊ CẮT KHUẤT)
   ============================================================================ */
.vg-ai-smart-dock {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 7px 11px;
  flex-shrink: 0;
}

.vg-dock-chips-bar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vg-dock-chips-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
  flex-shrink: 0;
}

.vg-dock-chips-scroll {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 1px;
}

.vg-dock-chips-scroll::-webkit-scrollbar {
  display: none;
}

.vg-ai-chip {
  border: 1px solid #dbeafe;
  background: #f8fafc;
  color: #1e40af;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 99px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.14s ease;
}

.vg-ai-chip:hover:not(:disabled) {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.vg-ai-chip:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Gợi ý bắt từ khoá tức thì khi khách đang gõ */
.vg-typing-matches {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.vg-typing-matches-head {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #4f46e5;
}

.vg-typing-matches-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vg-typing-match-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 4px 6px;
}

.vg-typing-match-ask {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: #0f172a;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  text-align: left;
  cursor: pointer;
  padding: 2px 4px;
}

.vg-typing-match-ask i {
  color: #2563eb;
  flex-shrink: 0;
}

.vg-typing-match-ask span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vg-typing-match-ask:hover {
  color: #2563eb;
}

.vg-typing-match-go {
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: #4338ca;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.vg-typing-match-go:hover {
  background: #4f46e5;
  color: #ffffff;
  border-color: #4f46e5;
}

/* ============================================================================
   THANH SOẠN LỆNH THÔNG MINH (NEXT-GEN AI PROMPT BAR)
   ============================================================================ */
.vg-ai-prompt-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 10px 10px;
  padding: 5px 6px 5px 12px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
  flex-shrink: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vg-ai-prompt-bar:focus-within {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.vg-ai-prompt-input {
  flex: 1;
  min-height: 24px;
  max-height: 96px;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.4;
  color: #0f172a;
  padding: 4px 0;
}

.vg-ai-prompt-input::placeholder {
  color: #94a3b8;
}

.vg-prompt-bar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.vg-prompt-mini-tool {
  width: 28px;
  height: 28px;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.14s ease;
}

.vg-prompt-mini-tool:hover {
  background: #e2e8f0;
  color: #2563eb;
}

.vg-prompt-send-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.14s ease;
}

.vg-prompt-send-btn:hover:not(:disabled) {
  transform: scale(1.06);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.vg-prompt-send-btn:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
}

.vg-typing-matches-dock {
  margin: 0 10px 6px;
  padding: 4px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 120px;
  overflow-y: auto;
}

/* Ô NHẬP CHAT RỘNG RÃI & THOÁNG ĐÃNG (ĐA DÒNG + PHÍM TẮT THÔNG MINH) */
.vg-ai-composer {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0 10px 10px;
  padding: 10px 13px 9px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
  flex-shrink: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vg-ai-composer:focus-within {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14);
}

.vg-ai-textarea {
  width: 100%;
  min-height: 56px;
  max-height: 140px;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.48;
  color: #0f172a;
  padding: 2px 0;
}

.vg-ai-textarea::placeholder {
  color: #94a3b8;
  font-size: 12.5px;
}

.vg-ai-composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 7px;
  border-top: 1px solid #f1f5f9;
}

.vg-ai-composer-tools {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.vg-comp-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  padding: 4.5px 9px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.vg-comp-tool-btn:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.vg-ai-send-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
  transition: all 0.15s ease;
}

.vg-ai-send-btn:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.vg-ai-send-btn:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
}

.vg-btn-ai {
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  color: #ffffff;
  border-color: transparent;
}

.vg-btn-ai:hover {
  background: linear-gradient(135deg, #6d28d9 0%, #1d4ed8 100%);
}


/* ============================================================================
   SPOTLIGHT KHOANH SÁNG NÚT BẤM TRÊN MÀN HÌNH (CHỈ TẬN TAY)
   ============================================================================ */
.vg-spotlight-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9990;
}

.vg-spotlight-ring {
  position: fixed;
  border-radius: 10px;
  border: 3px solid #2563eb;
  box-shadow:
    0 0 0 4px rgba(37, 99, 235, 0.28),
    0 0 24px rgba(37, 99, 235, 0.55);
  animation: vgSpotlightPulse 1.1s infinite ease-in-out;
  pointer-events: none;
  transition: all 0.15s ease;
}

.vg-spotlight-badge {
  position: fixed;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 13px;
  border-radius: 99px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.32);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  z-index: 9991;
  animation: vgBadgeBounce 1s infinite ease-in-out;
}

.vg-spotlight-hand {
  font-size: 15px;
  line-height: 1;
}

@keyframes vgSpotlightPulse {
  0%, 100% {
    transform: scale(1);
    border-color: #2563eb;
  }
  50% {
    transform: scale(1.03);
    border-color: #7c3aed;
  }
}

@keyframes vgBadgeBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* ==========================================================================
   VOICE COPILOT — ĐÀM THOẠI AI HAI CHIỀU RẢNH TAY ("HI VIZIO")
   ========================================================================== */

/* Nút kích hoạt Microphone trên Header */
.vg-voice-toggle-btn {
  position: relative;
  transition: all 0.2s ease;
}

.vg-voice-toggle-btn.is-active {
  background: rgba(16, 185, 129, 0.22);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.55);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}

.vg-voice-toggle-btn.is-listening {
  background: rgba(59, 130, 246, 0.25);
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.6);
  animation: vgVoicePulseRing 1.2s infinite ease-in-out;
}

.vg-voice-toggle-btn.is-speaking {
  background: rgba(168, 85, 247, 0.25);
  color: #c084fc;
  border-color: rgba(192, 132, 252, 0.6);
  animation: vgVoiceSpeakingGlow 1.4s infinite ease-in-out;
}

@keyframes vgVoicePulseRing {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.45);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0);
  }
}

@keyframes vgVoiceSpeakingGlow {
  0%, 100% {
    box-shadow: 0 0 6px rgba(168, 85, 247, 0.4);
  }
  50% {
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.8);
  }
}

/* THANH TRẠNG THÁI ĐÀM THOẠI RẢNH TAY (VOICE COPILOT HUD) */
.vg-voice-active-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin: 0 12px 8px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 10px;
  color: #e2e8f0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.3);
  backdrop-filter: blur(8px);
  animation: vgFadeSlideDown 0.25s ease;
}

.vg-voice-active-bar.is-speaking {
  border-color: rgba(168, 85, 247, 0.45);
  background: linear-gradient(135deg, rgba(26, 16, 45, 0.95), rgba(35, 25, 60, 0.95));
}

.vg-voice-active-bar.is-cmd {
  border-color: rgba(16, 185, 129, 0.45);
  background: linear-gradient(135deg, rgba(6, 30, 24, 0.95), rgba(15, 45, 35, 0.95));
}

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

/* Biểu đồ sóng âm thanh 5 vạch nảy (Waveform visualizer) */
.vg-voice-wave-anim {
  display: flex;
  align-items: center;
  gap: 2.5px;
  height: 20px;
  flex-shrink: 0;
}

.vg-voice-wave-anim .vbar {
  width: 3.5px;
  height: 6px;
  border-radius: 99px;
  background: #38bdf8;
  transition: all 0.2s ease;
}

.vg-voice-active-bar.is-speaking .vbar {
  background: #c084fc;
  animation: vgWaveDance 0.8s infinite ease-in-out;
}

.vg-voice-active-bar.is-cmd .vbar {
  background: #34d399;
  animation: vgWaveDance 0.5s infinite ease-in-out;
}

.vg-voice-active-bar:not(.is-speaking):not(.is-cmd) .vbar {
  animation: vgWaveSubtle 1.8s infinite ease-in-out;
}

.vg-voice-wave-anim .vb1 { animation-delay: 0.0s !important; }
.vg-voice-wave-anim .vb2 { animation-delay: 0.15s !important; }
.vg-voice-wave-anim .vb3 { animation-delay: 0.3s !important; }
.vg-voice-wave-anim .vb4 { animation-delay: 0.45s !important; }
.vg-voice-wave-anim .vb5 { animation-delay: 0.6s !important; }

@keyframes vgWaveDance {
  0%, 100% { height: 4px; }
  50% { height: 18px; }
}

@keyframes vgWaveSubtle {
  0%, 100% { height: 4px; opacity: 0.5; }
  50% { height: 10px; opacity: 1; }
}

.vg-voice-info {
  flex: 1;
  min-width: 0;
}

.vg-voice-status-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vg-voice-transcript-text {
  font-size: 11px;
  color: #94a3b8;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.vg-voice-stop-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.vg-voice-stop-btn:hover {
  background: rgba(239, 68, 68, 0.4);
  color: #ffffff;
}

.vg-voice-mute-btn {
  width: 22px;
  height: 22px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 12px;
}

.vg-voice-mute-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* NÚT MICRO BẤM NÓI 1 CHẠM TRONG KHUNG GÕ TIN NHẮN (COMPOSER) */
.vg-ai-send-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vg-comp-mic-btn {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.vg-comp-mic-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #94a3b8;
}

.vg-comp-mic-btn.is-recording {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.5);
  animation: vgMicRecordingPulse 1s infinite ease-in-out;
}

@keyframes vgMicRecordingPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 5px rgba(239, 68, 68, 0);
  }
}

@media (max-width: 767px) {
  .vizio-guide-wrap {
    padding: 14px 12px 80px;
  }
  .vg-grid {
    grid-template-columns: 1fr;
  }
  .vg-ai-float-btn {
    bottom: 66px;
    right: 12px;
  }
  .vg-float-popover {
    bottom: 112px;
    right: 12px;
    width: calc(100vw - 24px);
    max-height: calc(100vh - 130px);
  }
}

@media print {
  .no-print,
  .vg-ai-float-btn,
  .vg-float-trigger,
  .vg-float-popover,
  .vg-spotlight-layer,
  .fx-nav {
    display: none !important;
  }
  .vizio-guide-wrap {
    padding: 0;
  }
}

/* Bảng số liệu nhỏ trong câu trả lời của Trợ lý (theo page / cơ sở / nhân viên / ngày) + dòng cách tính */
.vg-ai-table-wrap {
  margin: 8px 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
}

.vg-ai-table-title {
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

/* Bảng dài (tới 62 dòng — "30 ngày qua theo ngày") cuộn trong khung, tiêu đề cột đứng yên */
.vg-ai-table-scroll {
  max-width: 100%;
  max-height: 340px;
  overflow: auto;
}

.vg-ai-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #ffffff;
}

.vg-ai-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  color: #0f172a;
}

.vg-ai-table th,
.vg-ai-table td {
  padding: 5px 10px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}

.vg-ai-table th {
  font-size: 10.5px;
  font-weight: 700;
  color: #64748b;
  text-transform: none;
}

.vg-ai-table td:first-child {
  white-space: normal;
  min-width: 96px;
}

.vg-ai-table .is-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.vg-ai-table tbody tr:last-child td {
  border-bottom: none;
}

.vg-ai-table tfoot td {
  font-weight: 700;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  border-bottom: none;
}

.vg-ai-data-note {
  margin: 4px 0 8px;
  font-size: 10.5px;
  line-height: 1.45;
  color: #64748b;
}
