/* ===========================================
   VIỆCNHÀ247 v4 — DESIGN SYSTEM ĐỒNG BỘ
   Shared styles cho tất cả 9 trang
   =========================================== */

:root {
  /* === MÀU CHỦ ĐẠO === */
  --gold: #E8A627;
  --gold-dark: #C8861A;
  --gold-light: #F5C45E;
  --gold-glow: rgba(232, 166, 39, 0.4);
  --cream: #FBF1DD;
  --cream-light: #FDF8EC;
  --cream-dark: #F0E2C0;
  --warm-white: #FFFCF5;
  --ink: #1F1A0F;
  --charcoal: #2D2820;
  --stone: #6B6358;
  --success: #16A34A;
  --error: #DC2626;
  
  /* === SHADOWS === */
  --shadow-sm: 0 2px 8px rgba(31, 26, 15, 0.06);
  --shadow-md: 0 8px 24px rgba(31, 26, 15, 0.08);
  --shadow-lg: 0 20px 48px rgba(31, 26, 15, 0.12);
  --shadow-gold: 0 8px 24px rgba(232, 166, 39, 0.25);
  
  /* === SPACING === */
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-5: 2.5rem;
  --s-6: 3rem;
  --s-8: 4rem;
  --s-10: 5rem;
  --s-12: 6rem;
  
  /* === LAYOUT === */
  --container: 1200px;
  --container-narrow: 880px;
  
  /* === TRANSITIONS === */
  --t-fast: 200ms ease;
  --t-base: 300ms ease;
  --t-bounce: 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Be Vietnam Pro', sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 1.25rem; }

/* === FLOATING NAVBAR === */
.navbar {
  position: fixed; top: 1rem; left: 50%; transform: translateX(-50%);
  z-index: 100; width: calc(100% - 2rem); max-width: 1140px;
  background: rgba(255, 252, 245, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(232, 166, 39, 0.2);
  border-radius: 100px; padding: 0.625rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow-md);
}
.nav-logo {
  display: flex; align-items: center; gap: 0.625rem;
  font-weight: 800; font-size: 1.0625rem; color: var(--ink); text-decoration: none;
}
.nav-logo .mark {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 900; font-size: 1.125rem; box-shadow: var(--shadow-gold);
}
.nav-logo .mark svg { width: 22px; height: 22px; }
.nav-logo .brand-name { 
  font-weight: 800; 
  letter-spacing: -0.025em;
  font-size: 1.125rem;
}
.nav-logo .brand-name b { 
  color: var(--gold-dark); 
  font-weight: 800; 
  margin-left: -1px;
}
.nav-menu { display: flex; gap: 0.25rem; }
.nav-menu a {
  color: var(--charcoal); text-decoration: none; font-weight: 600; font-size: 0.875rem;
  padding: 0.5rem 0.875rem; border-radius: 100px; transition: all var(--t-fast);
}
.nav-menu a:hover, .nav-menu a.active { background: var(--cream); color: var(--gold-dark); }
.nav-cta {
  background: var(--ink); color: white; padding: 0.5625rem 1.125rem;
  border-radius: 100px; text-decoration: none; font-weight: 700; font-size: 0.8125rem;
  transition: all var(--t-fast); display: inline-flex; align-items: center; gap: 0.375rem;
}
.nav-cta:hover { background: var(--gold-dark); transform: translateY(-1px); }
.nav-toggle { display: none; }

@media (max-width: 880px) {
  .nav-menu { display: none; }
  .nav-toggle {
    display: flex; width: 40px; height: 40px; background: var(--ink);
    border-radius: 50%; align-items: center; justify-content: center;
    color: white; border: none; cursor: pointer; font-size: 1.125rem;
  }
  .nav-cta { display: none; }
}

/* === SIDEBAR (mobile menu) === */
.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(31, 26, 15, 0.6);
  backdrop-filter: blur(8px); z-index: 200;
  opacity: 0; pointer-events: none; transition: opacity var(--t-base);
}
.sidebar-overlay.active { opacity: 1; pointer-events: all; }
.sidebar {
  position: fixed; top: 0; right: -100%;
  width: 85%; max-width: 360px; height: 100vh;
  background: var(--warm-white); z-index: 201;
  padding: 2rem 1.5rem; transition: right var(--t-bounce); overflow-y: auto;
}
.sidebar.active { right: 0; }
.sidebar-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  width: 36px; height: 36px; background: var(--cream); border: none;
  border-radius: 50%; font-size: 1.125rem; cursor: pointer;
}
.sidebar-logo { font-size: 1.25rem; font-weight: 800; margin-bottom: 2rem; color: var(--gold-dark); letter-spacing: -0.025em; }
.sidebar-menu { list-style: none; }
.sidebar-menu li { margin-bottom: 0.25rem; }
.sidebar-menu a {
  display: block; padding: 1rem 1.25rem; color: var(--charcoal);
  text-decoration: none; font-weight: 600; border-radius: 12px; transition: all var(--t-fast);
}
.sidebar-menu a:hover, .sidebar-menu a.active { background: var(--gold); color: white; }
.sidebar-cta {
  margin-top: 2rem; display: block; text-align: center;
  background: var(--ink); color: white; padding: 1rem;
  border-radius: 100px; text-decoration: none; font-weight: 700;
}

/* === PAGE HERO (cho trang con) === */
.page-hero {
  position: relative; padding: 8rem 0 4rem;
  background: var(--cream); overflow: hidden;
}
.page-hero::before {
  content: ""; position: absolute; top: -20%; left: -10%;
  width: 60%; height: 80%;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 60%);
  filter: blur(80px); animation: floatBlob 20s ease-in-out infinite;
}
.page-hero::after {
  content: ""; position: absolute; bottom: -10%; right: -10%;
  width: 50%; height: 70%;
  background: radial-gradient(circle, rgba(245, 196, 94, 0.3) 0%, transparent 60%);
  filter: blur(80px); animation: floatBlob 25s ease-in-out infinite reverse;
}
@keyframes floatBlob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.1); }
  66% { transform: translate(-20px, 30px) scale(0.95); }
}

.page-hero-content { position: relative; z-index: 2; text-align: center; }
.page-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(255, 255, 255, 0.7); backdrop-filter: blur(10px);
  border: 1px solid var(--cream-dark); padding: 0.5rem 1rem;
  border-radius: 100px; font-size: 0.75rem; font-weight: 700;
  color: var(--gold-dark); text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 1.5rem; animation: fadeUp 0.8s ease 0.1s both;
}
.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800;
  line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 1.25rem;
  color: var(--ink); animation: fadeUp 0.8s ease 0.2s both;
}
.page-hero h1 .accent {
  font-family: 'Playfair Display', serif; font-style: italic;
  color: var(--gold-dark); font-weight: 900;
}
.page-hero p {
  font-size: 1.0625rem; color: var(--stone); max-width: 640px;
  margin: 0 auto; animation: fadeUp 0.8s ease 0.3s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === SECTION === */
.section { padding: 5rem 0; position: relative; }
.section-eyebrow {
  display: inline-block; background: var(--cream); color: var(--gold-dark);
  padding: 0.5rem 1rem; border-radius: 100px; font-size: 0.75rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 1rem;
}
.section-title {
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 800;
  line-height: 1.15; letter-spacing: -0.01em; margin-bottom: 1rem; color: var(--ink);
}
.section-title .accent {
  font-family: 'Playfair Display', serif; font-style: italic;
  color: var(--gold-dark); font-weight: 900;
}
.section-desc { font-size: 1.0625rem; color: var(--stone); max-width: 640px; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header .section-desc { margin: 0 auto; }
.section-light { background: var(--warm-white); }
.section-cream { background: var(--cream); }

/* === BUTTONS === */
.btn-primary {
  background: var(--ink); color: white; padding: 1rem 1.875rem;
  border-radius: 100px; text-decoration: none; font-weight: 700; font-size: 0.9375rem;
  display: inline-flex; align-items: center; gap: 0.625rem;
  border: none; cursor: pointer; font-family: inherit; transition: all 0.25s ease;
}
.btn-primary:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-gold); background: var(--gold-dark);
}
.btn-primary .arrow { transition: transform var(--t-base); }
.btn-primary:hover .arrow { transform: translateX(4px); }

.btn-secondary {
  background: transparent; color: var(--ink); padding: 1rem 1.625rem;
  border-radius: 100px; text-decoration: none; font-weight: 700; font-size: 0.9375rem;
  display: inline-flex; align-items: center; gap: 0.625rem;
  border: 2px solid var(--ink); transition: all 0.25s ease;
}
.btn-secondary:hover { background: var(--ink); color: white; transform: translateY(-2px); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: white; padding: 1rem 1.875rem; border-radius: 100px;
  text-decoration: none; font-weight: 700; font-size: 0.9375rem;
  display: inline-flex; align-items: center; gap: 0.625rem;
  border: none; cursor: pointer; font-family: inherit;
  transition: all 0.25s ease; box-shadow: var(--shadow-gold);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(232, 166, 39, 0.4); }

/* === FORMS === */
.form-group { margin-bottom: 1rem; }
.form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem;
}
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-label {
  display: block; font-size: 0.8125rem; font-weight: 700;
  margin-bottom: 0.4375rem; color: var(--ink);
}
.form-label .req { color: var(--error); }
.form-input {
  width: 100%; padding: 0.875rem 1rem; border: 1.5px solid var(--cream-dark);
  border-radius: 12px; font-family: inherit; font-size: 0.9375rem;
  background: var(--cream-light); color: var(--ink); outline: none; transition: all var(--t-fast);
}
.form-input:focus {
  border-color: var(--gold); background: white; box-shadow: 0 0 0 4px var(--gold-glow);
}
select.form-input { cursor: pointer; }
textarea.form-input { resize: vertical; min-height: 80px; }

/* === CARDS === */
.card {
  background: white; border-radius: 20px; padding: 2rem;
  border: 1px solid var(--cream-dark); transition: all var(--t-base);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-cream {
  background: var(--cream); border-radius: 20px; padding: 2rem;
  border: 1px solid var(--cream-dark); transition: all var(--t-base);
}
.card-cream:hover { background: white; transform: translateY(-4px); box-shadow: var(--shadow-md); }

/* === STATS BAR === */
.stats-bar {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  padding: 3rem 0; color: white; position: relative; overflow: hidden;
}
.stats-bar::before {
  content: ""; position: absolute; top: -50%; right: -10%;
  width: 60%; height: 200%;
  background: radial-gradient(circle, rgba(255, 235, 180, 0.4) 0%, transparent 60%);
  filter: blur(40px);
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  position: relative; z-index: 2;
}
@media (max-width: 768px) { .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; } }
.stat-block { text-align: center; }
.stat-block .big {
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; line-height: 1;
  margin-bottom: 0.375rem; font-variant-numeric: tabular-nums;
}
.stat-block .small {
  font-size: 0.8125rem; opacity: 0.95; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
}

/* === CTA FINAL === */
.cta-final { background: var(--cream); padding: 5rem 0; }
.cta-card {
  background: linear-gradient(135deg, var(--ink) 0%, var(--charcoal) 100%);
  border-radius: 32px; padding: 4rem 3rem; text-align: center; color: white;
  position: relative; overflow: hidden;
}
.cta-card::before {
  content: ""; position: absolute; top: -50%; left: -10%;
  width: 60%; height: 200%;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 60%);
  filter: blur(60px);
}
.cta-card::after {
  content: ""; position: absolute; bottom: -50%; right: -10%;
  width: 50%; height: 200%;
  background: radial-gradient(circle, rgba(245, 196, 94, 0.25) 0%, transparent 60%);
  filter: blur(50px);
}
.cta-card > * { position: relative; z-index: 2; }
.cta-card h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 800;
  margin-bottom: 1rem; line-height: 1.2;
}
.cta-card h2 .accent {
  font-family: 'Playfair Display', serif; font-style: italic;
  color: var(--gold-light); font-weight: 900;
}
.cta-card p {
  font-size: 1.0625rem; opacity: 0.85; margin-bottom: 2rem;
  max-width: 540px; margin-left: auto; margin-right: auto;
}
.cta-buttons { display: flex; gap: 0.875rem; justify-content: center; flex-wrap: wrap; }
.btn-cta-primary {
  background: var(--gold); color: white; padding: 1.125rem 2rem;
  border-radius: 100px; text-decoration: none; font-weight: 800; font-size: 1rem;
  display: inline-flex; align-items: center; gap: 0.5rem;
  transition: all 0.25s ease; box-shadow: var(--shadow-gold);
}
.btn-cta-primary:hover { transform: translateY(-2px); background: var(--gold-light); color: var(--ink); }
.btn-cta-secondary {
  background: transparent; color: white; padding: 1.125rem 2rem;
  border-radius: 100px; text-decoration: none; font-weight: 700; font-size: 1rem;
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 2px solid rgba(255, 255, 255, 0.3); transition: all 0.25s ease;
}
.btn-cta-secondary:hover { background: white; color: var(--ink); border-color: white; }

/* === FOOTER === */
.footer {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: white; padding: 4rem 0 2rem; position: relative; overflow: hidden;
}
.footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem; margin-bottom: 3rem;
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.75rem; letter-spacing: -0.025em; }
.footer-brand p { font-size: 0.875rem; opacity: 0.9; line-height: 1.6; margin-bottom: 1rem; }
.footer-col h4 {
  font-size: 0.875rem; font-weight: 800; margin-bottom: 1rem;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.625rem; }
.footer-col a {
  color: rgba(255, 255, 255, 0.85); text-decoration: none;
  font-size: 0.875rem; transition: color var(--t-fast);
}
.footer-col a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1.5rem; display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 1rem; font-size: 0.8125rem; opacity: 0.85;
}
.footer-bottom .social { display: flex; gap: 0.625rem; }
.footer-bottom .social a {
  width: 36px; height: 36px; background: rgba(255, 255, 255, 0.15);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: white; text-decoration: none; transition: all var(--t-fast);
}
.footer-bottom .social a:hover { background: white; color: var(--gold-dark); }

/* === FLOATING CALL BUTTON === */
.floating-call {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 90;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: white; padding: 0.875rem 1.5rem; border-radius: 100px;
  text-decoration: none; font-weight: 800; font-size: 0.9375rem;
  display: inline-flex; align-items: center; gap: 0.5rem;
  box-shadow: 0 12px 32px rgba(232, 166, 39, 0.5);
  transition: transform var(--t-base);
  animation: floatCallButton 3s ease-in-out infinite;
}
@keyframes floatCallButton {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.floating-call:hover { transform: scale(1.05); }
.floating-call .ring {
  width: 12px; height: 12px; background: white; border-radius: 50%; position: relative;
}
.floating-call .ring::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: white; animation: ringPulse 1.5s ease-in-out infinite;
}
@keyframes ringPulse {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(2.5); opacity: 0; }
}
@media (max-width: 480px) {
  .floating-call .label { display: none; }
  .floating-call { padding: 1rem; }
}

/* === BREADCRUMB === */
.breadcrumb {
  display: flex; gap: 0.5rem; align-items: center;
  font-size: 0.8125rem; color: var(--stone);
  margin-bottom: 1.5rem; flex-wrap: wrap; justify-content: center;
}
.breadcrumb a { color: var(--stone); text-decoration: none; transition: color var(--t-fast); }
.breadcrumb a:hover { color: var(--gold-dark); }
.breadcrumb .separator { opacity: 0.4; }
.breadcrumb .current { color: var(--ink); font-weight: 600; }

/* === PROSE === */
.prose {
  max-width: 760px; margin: 0 auto;
  font-size: 1.0625rem; line-height: 1.7; color: var(--charcoal);
}
.prose h2 {
  font-size: 1.875rem; font-weight: 800;
  margin-top: 3rem; margin-bottom: 1rem; color: var(--ink); line-height: 1.2;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-size: 1.375rem; font-weight: 700;
  margin-top: 2rem; margin-bottom: 0.75rem; color: var(--ink);
}
.prose p { margin-bottom: 1.25rem; }
.prose ul, .prose ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.prose li { margin-bottom: 0.5rem; }
.prose a {
  color: var(--gold-dark); text-decoration: underline;
  text-decoration-color: var(--gold); text-underline-offset: 3px;
}
.prose strong { color: var(--ink); font-weight: 700; }
.prose blockquote {
  border-left: 4px solid var(--gold); padding: 0.75rem 1.25rem;
  background: var(--cream); border-radius: 8px;
  margin: 1.5rem 0; font-style: italic; color: var(--charcoal);
}

/* === UTILITY === */
.text-center { text-align: center; }
.text-gold { color: var(--gold-dark); }
.text-stone { color: var(--stone); }
.font-serif { font-family: 'Playfair Display', serif; font-style: italic; }
.italic { font-style: italic; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }
.mt-6 { margin-top: 3rem; }

/* === ANIMATIONS === */
.fade-in { animation: fadeUp 0.8s ease both; }
.fade-in-2 { animation: fadeUp 0.8s ease 0.2s both; }
.fade-in-3 { animation: fadeUp 0.8s ease 0.4s both; }

/* ============================================================ */
/* === FLOATING AI CHAT WIDGET ============================== */
/* ============================================================ */

/* Floating button (luôn hiện ở góc phải dưới) */
.chat-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(232, 166, 39, 0.4);
  z-index: 1000;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
}
.chat-fab:hover {
  transform: scale(1.08) translateY(-4px);
  box-shadow: 0 14px 36px rgba(232, 166, 39, 0.5);
}
.chat-fab:active { transform: scale(0.96); }

.chat-fab .badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #DC2626;
  color: white;
  font-size: 11px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  border: 2px solid white;
}

/* Chat panel */
.chat-panel {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 140px);
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  z-index: 999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: chatSlideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.chat-panel.open { display: flex; }

@keyframes chatSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-header {
  background: linear-gradient(135deg, var(--ink), var(--charcoal));
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
  flex-shrink: 0;
}
.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.chat-header-text { flex: 1; }
.chat-header-title {
  font-weight: 800;
  font-size: 0.9375rem;
  margin-bottom: 0.125rem;
}
.chat-header-status {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.chat-header-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 8px #4ADE80;
}
.chat-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background 0.2s;
}
.chat-close:hover { background: rgba(255, 255, 255, 0.2); }

/* Messages area */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  background: var(--cream-light);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-msg {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  max-width: 85%;
  animation: msgFadeIn 0.3s ease;
}
@keyframes msgFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-msg.bot { align-self: flex-start; }
.chat-msg.user { align-self: flex-end; flex-direction: row-reverse; }

.chat-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.chat-msg.bot .chat-msg-avatar {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: white;
}
.chat-msg.user .chat-msg-avatar {
  background: var(--charcoal);
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.chat-msg-bubble {
  padding: 0.75rem 1rem;
  border-radius: 16px;
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-msg.bot .chat-msg-bubble {
  background: white;
  color: var(--ink);
  border-top-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.chat-msg.user .chat-msg-bubble {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: white;
  border-top-right-radius: 4px;
}

/* Action button trong tin nhắn (vd: "Mở form đặt lịch") */
.chat-action-btn {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--ink), var(--charcoal));
  color: white !important;
  text-decoration: none;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.8125rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  font-family: inherit;
}
.chat-action-btn:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  transform: translateY(-1px);
}

/* Typing indicator */
.chat-typing {
  display: flex;
  gap: 4px;
  padding: 0.75rem 1rem;
  align-self: flex-start;
}
.chat-typing-dot {
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite;
}
.chat-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-8px); opacity: 1; }
}

/* Quick suggestions */
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1rem 0.5rem;
  background: var(--cream-light);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}
.chat-suggest {
  background: white;
  border: 1px solid var(--cream-dark);
  padding: 0.5rem 0.875rem;
  border-radius: 100px;
  font-size: 0.75rem;
  color: var(--charcoal);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  font-weight: 600;
}
.chat-suggest:hover {
  background: var(--gold);
  color: white;
  border-color: var(--gold);
}

/* Input area */
.chat-input-wrap {
  padding: 0.875rem 1rem;
  background: white;
  border-top: 1px solid var(--cream-dark);
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  flex-shrink: 0;
}
.chat-input {
  flex: 1;
  border: 1.5px solid var(--cream-dark);
  border-radius: 100px;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  resize: none;
  max-height: 100px;
  background: var(--cream-light);
  color: var(--ink);
  transition: border-color 0.2s;
}
.chat-input:focus {
  border-color: var(--gold);
  background: white;
}
.chat-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.chat-send:hover { transform: scale(1.08); }
.chat-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Footer trong panel - link Zalo/Messenger */
.chat-footer {
  padding: 0.5rem 1rem;
  background: white;
  font-size: 0.6875rem;
  color: var(--stone);
  text-align: center;
  border-top: 1px solid var(--cream-dark);
  flex-shrink: 0;
}
.chat-footer a {
  color: var(--gold-dark);
  font-weight: 700;
  text-decoration: none;
}
.chat-footer a:hover { text-decoration: underline; }

/* Mobile adjustments */
@media (max-width: 480px) {
  .chat-panel {
    bottom: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  .chat-fab {
    bottom: 16px;
    right: 16px;
    width: 56px;
    height: 56px;
    font-size: 24px;
  }
}
