/* ============================================================
   EMERGING CAPITAL GROUP - stylesheet rieng cua site.
   Bang mau lay truc tiep tu file logo: vang #F0CC92 va nau
   #7F573E. Accent dung tren toan trang la #B08442 (cung ho mau,
   du tuong phan de doc tren ca nen sang lan nen toi).
   He bo goc: gan vuong (2px) tren toan bo trang.
   ============================================================ */

:root {
  --ink:        #14161a;   /* off-black, khong dung #000 */
  --ink-soft:   #1d2026;
  --ink-line:   #2a2e36;
  --paper:      #f7f5f1;   /* off-white am, khong dung #fff */
  --paper-2:    #ecE8e1;
  --body:       #4a4f57;
  --body-dark:  #b6bac1;
  --accent:     #b08442;   /* mau chinh - dung y het o moi noi */
  --accent-lit: #d9ae62;   /* ban sang hon, chi dung tren nen toi */
  --radius:     2px;
  --maxw:       1240px;
  --pad:        clamp(28px, 5vw, 64px);
  --sect:       clamp(72px, 8vw, 128px);
  --font-display: 'Sora', system-ui, -apple-system, sans-serif;
  --font-body:    'Manrope', system-ui, -apple-system, sans-serif;

  /* --- bien ma phan CSS chat widget (giu nguyen tu framework) can den.
     Neu xoa nhung dong nay, khung chat se mat mau va mat bo goc. --- */
  --color-primary:    #b08442;
  --color-secondary:  #d9ae62;
  --color-bg:         #f7f5f1;
  --color-surface:    #ffffff;
  --color-border:     #e2ddd4;
  --color-text-muted: #6b7078;
  --radius-md:        6px;
  --shadow-strong:    0 18px 48px rgba(20,22,26,.20);
  --transition:       .18s ease;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.68;
  color: var(--body);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 .5em;
  font-weight: 600;
}
h1 { font-size: clamp(35px, 4.5vw, 58px); letter-spacing: -0.032em; }
h2 { font-size: clamp(29px, 3.6vw, 46px); letter-spacing: -0.028em; }
h3 { font-size: clamp(19px, 1.5vw, 22px); letter-spacing: -0.012em; }
p  { margin: 0 0 1.1em; max-width: 68ch; }
a  { color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
/* Reset nay BAT BUOC phai co: phan CSS chat widget giu tu framework khong tu
   dat background/border cho .chat-close, .chat-launcher, .chat-send - no dua
   vao dong reset chung nay. Thieu no thi cac nut do roi ve kieu nut mac dinh
   cua trinh duyet (nen trang, co vien). */
button { font-family: inherit; font-size: inherit; color: inherit;
         background: none; border: none; cursor: pointer; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
section[id] { scroll-margin-top: 96px; }

/* nhan nho phia tren tieu de - dung toi da 3 lan tren ca trang */
.eyebrow {
  font-family: var(--font-display);
  font-size: 11.5px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
  display: flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ''; width: 26px; height: 1px; background: var(--accent); flex: none; }
.on-dark .eyebrow { color: var(--accent-lit); }
.on-dark .eyebrow::before { background: var(--accent-lit); }

.lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; color: var(--ink); }
.on-dark { background: var(--ink); color: var(--body-dark); }
.on-dark h2, .on-dark h3, .on-dark h4 { color: var(--paper); }
.on-dark .lead { color: #dcdfe4; }

/* ---------- nut ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 9px; padding: 14px 26px; border-radius: var(--radius);
  font-family: var(--font-display); font-size: 14.5px; font-weight: 600;
  letter-spacing: .01em; text-decoration: none; border: 1px solid transparent;
  cursor: pointer; transition: background .16s ease, color .16s ease, border-color .16s ease;
  white-space: nowrap;
}
.btn--primary { background: var(--accent); color: #14161a; }
.btn--primary:hover { background: #c2934a; }
.btn--ghost { border-color: rgba(247,245,241,.34); color: var(--paper); }
.btn--ghost:hover { border-color: var(--accent-lit); color: var(--accent-lit); }
.btn--line { border-color: rgba(20,22,26,.24); color: var(--ink); }
.btn--line:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 300;
  height: 78px; display: flex; align-items: center;
  transition: background .22s ease, border-color .22s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(20,22,26,.94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom-color: var(--ink-line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; }
.brand { display: flex; align-items: center; text-decoration: none; flex: none; }
.brand img { height: 40px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a {
  font-family: var(--font-display); font-size: 13.5px; font-weight: 500;
  letter-spacing: .02em; color: rgba(247,245,241,.82); text-decoration: none;
  padding: 6px 0; border-bottom: 1px solid transparent; transition: color .15s ease, border-color .15s ease;
}
.site-nav a:hover { color: var(--paper); border-bottom-color: var(--accent-lit); }
.nav-tel {
  font-family: var(--font-display); font-size: 13.5px; font-weight: 600;
  color: var(--accent-lit); text-decoration: none; letter-spacing: .01em; flex: none;
}
.nav-tel:hover { color: var(--paper); }
.nav-toggle {
  display: none; width: 42px; height: 42px; border: 1px solid rgba(247,245,241,.3);
  background: transparent; border-radius: var(--radius); cursor: pointer;
  flex-direction: column; gap: 5px; align-items: center; justify-content: center; padding: 0;
}
.nav-toggle span { width: 18px; height: 1.5px; background: var(--paper); display: block; }

/* ---------- hero: chia doi lech, khong can giua ---------- */
.hero {
  position: relative; min-height: min(94vh, 860px);
  display: flex; align-items: flex-end;
  padding: calc(78px + 90px) 0 clamp(56px, 7vw, 96px);
  background: var(--ink);
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.hero__bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(104deg, rgba(20,22,26,.96) 0%, rgba(20,22,26,.86) 42%, rgba(20,22,26,.35) 100%);
}
.hero .wrap { position: relative; z-index: 2; width: 100%; }
.hero__grid { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr); gap: clamp(32px, 5vw, 88px); align-items: end; }
.hero h1 { color: var(--paper); max-width: 21ch; }
.hero h1 em { font-style: normal; color: var(--accent-lit); }
.hero__sub { color: #d3d7dd; font-size: clamp(16.5px, 1.5vw, 19px); max-width: 46ch; margin-bottom: 30px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__aside { border-left: 1px solid var(--ink-line); padding-left: clamp(20px, 2.4vw, 34px); }
.hero__aside p { font-size: 15px; line-height: 1.62; color: #b6bac1; margin: 0 0 18px; }
.hero__since {
  font-family: var(--font-display); font-size: 12px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent-lit);
}

/* ---------- dai chi so / dinh vi ---------- */
.pillars { border-bottom: 1px solid rgba(20,22,26,.1); }
.pillars__inner { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: clamp(30px, 5vw, 80px); padding: var(--sect) 0; }
.pillars h2 { max-width: 13ch; }
.pillars__note { font-size: 15px; color: #6b7078; max-width: 40ch; }
.pillar-list { counter-reset: p; display: flex; flex-direction: column; }
.pillar {
  counter-increment: p; display: grid; grid-template-columns: 46px 1fr; gap: 18px;
  padding: 26px 0; border-top: 1px solid rgba(20,22,26,.12);
}
.pillar:last-child { border-bottom: 1px solid rgba(20,22,26,.12); }
.pillar::before {
  content: counter(p, decimal-leading-zero);
  font-family: var(--font-display); font-size: 13px; font-weight: 600;
  color: var(--accent); letter-spacing: .06em; padding-top: 5px;
}
.pillar h3 { margin-bottom: 7px; }
.pillar p { margin: 0; font-size: 15.5px; max-width: 54ch; }

/* ---------- cong nghe: bang thong so tren nen toi ---------- */
.tech { padding: var(--sect) 0; }
.tech__head { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(30px,5vw,80px); align-items: start; margin-bottom: clamp(34px,4vw,58px); }
.tech__head h2 { max-width: 16ch; }
.spec { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); border-top: 1px solid var(--ink-line); }
.spec__item { padding: 26px 22px 26px 0; border-right: 1px solid var(--ink-line); }
.spec__item:last-child { border-right: 0; }
.spec__item h4 { font-size: 16px; margin: 0 0 8px; letter-spacing: -0.01em; }
.spec__item p { font-size: 14.5px; line-height: 1.6; margin: 0; color: #a5a9b1; }
.tech__foot {
  margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--ink-line);
  font-size: 13.5px; color: #878c95; max-width: none;
}
.tech__foot span { display: block; max-width: 74ch; }

/* ---------- danh muc du an: luoi lech ---------- */
.folio { padding: var(--sect) 0; }
.folio__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(30px,3.5vw,48px); }
.folio__head h2 { margin: 0; max-width: 18ch; }
.folio__count { font-family: var(--font-display); font-size: 13px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: #7d828b; }
.folio-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(14px, 1.6vw, 22px); }
.pcard { position: relative; display: block; text-decoration: none; overflow: hidden; border-radius: var(--radius); background: var(--ink-soft); grid-column: span 2; }
.pcard--wide { grid-column: span 3; }
.pcard img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3/2; transition: transform .5s ease, filter .3s ease; }
.pcard:hover img { transform: scale(1.035); }
.pcard__body {
  position: absolute; inset: auto 0 0 0; padding: 22px 22px 20px;
  background: linear-gradient(to top, rgba(16,18,21,.93) 8%, rgba(16,18,21,.62) 55%, transparent 100%);
}
.pcard__place { font-family: var(--font-display); font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-lit); display: block; margin-bottom: 6px; }
.pcard__name { font-family: var(--font-display); font-size: clamp(16px, 1.35vw, 20px); font-weight: 600; color: var(--paper); letter-spacing: -0.015em; line-height: 1.25; }
.folio__note { margin-top: 26px; font-size: 13.5px; color: #7d828b; }

/* ---------- y kien khach hang: danh sach trich dan lech ---------- */
.voices { padding: var(--sect) 0; border-top: 1px solid rgba(20,22,26,.1); }
.voices h2 { max-width: 15ch; margin-bottom: clamp(28px,3.4vw,46px); }
.voice { display: grid; grid-template-columns: minmax(0,.42fr) minmax(0,1fr); gap: clamp(20px,3vw,54px); padding: 34px 0; border-top: 1px solid rgba(20,22,26,.12); }
.voice:last-of-type { border-bottom: 1px solid rgba(20,22,26,.12); }
.voice__who h3 { font-size: 18px; margin: 0 0 4px; }
.voice__where { font-family: var(--font-display); font-size: 11.5px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: var(--accent); }
.voice blockquote { margin: 0; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.55; color: var(--ink); font-family: var(--font-display); font-weight: 400; letter-spacing: -0.015em; }
.voice--offset { padding-left: 0; }
@media (min-width: 901px) { .voice--offset .voice__who { padding-left: 34px; } }

/* ---------- ban dieu hanh ---------- */
.people { padding: var(--sect) 0; }
.people__intro { max-width: 52ch; margin-bottom: clamp(30px,3.6vw,50px); }
.people-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(12px,1.4vw,20px); }
.person { position: relative; }
.person__ph { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--ink-line); }
.person__ph img { width: 100%; aspect-ratio: 4/5; object-fit: cover; filter: contrast(1.02); }
.person h3 { font-size: 15.5px; margin: 13px 0 3px; letter-spacing: -0.01em; }
.on-dark .person h3 { color: var(--paper); }
.person span { display: block; font-size: 13px; color: #8c9199; line-height: 1.45; }
.person--lead .person__ph::after {
  content: ''; position: absolute; inset: 0; border: 1px solid var(--accent); pointer-events: none;
}

/* ---------- bao chi ---------- */
.press { padding: var(--sect) 0; border-top: 1px solid rgba(20,22,26,.1); }
.press__grid { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: clamp(30px,5vw,76px); align-items: start; }
.press figure { margin: 0; }
.press figure img { border-radius: var(--radius); }
.press figcaption { font-size: 13px; color: #7d828b; margin-top: 10px; }
.article { display: block; padding: 22px 0; border-top: 1px solid rgba(20,22,26,.12); text-decoration: none; transition: border-color .16s ease; }
.article:last-child { border-bottom: 1px solid rgba(20,22,26,.12); }
.article:hover { border-top-color: var(--accent); }
.article__meta { font-family: var(--font-display); font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 7px; }
.article h3 { font-size: clamp(17px, 1.4vw, 20px); margin: 0 0 6px; }
.article p { font-size: 14.5px; margin: 0; color: #6b7078; max-width: 62ch; }

/* ---------- lien he ---------- */
.contact { padding: var(--sect) 0 calc(var(--sect) + 40px); }
.contact__grid { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); gap: clamp(32px,5vw,80px); align-items: start; }
.contact h2 { max-width: 13ch; }
.contact__lead { color: #cfd3d9; max-width: 40ch; }
.cdetail { margin-top: 30px; }
.cdetail__row { padding: 16px 0; border-top: 1px solid var(--ink-line); }
.cdetail__row:last-child { border-bottom: 1px solid var(--ink-line); }
.cdetail__k { font-family: var(--font-display); font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #8c9199; display: block; margin-bottom: 5px; }
.cdetail__v { color: var(--paper); font-size: 15.5px; text-decoration: none; }
a.cdetail__v:hover { color: var(--accent-lit); }

.form { background: #1b1e24; border: 1px solid var(--ink-line); border-radius: var(--radius); padding: clamp(24px, 3vw, 38px); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label {
  display: block; font-family: var(--font-display); font-size: 11.5px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: #9ba0a8; margin-bottom: 7px;
}
.field input, .field select, .field textarea {
  width: 100%; height: 48px; padding: 0 14px; border-radius: var(--radius);
  border: 1px solid var(--ink-line); background: #14171c; color: var(--paper);
  font-family: var(--font-body); font-size: 15px; transition: border-color .15s ease;
}
.field textarea { height: auto; min-height: 108px; padding: 13px 14px; line-height: 1.6; resize: vertical; }
.field select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 40px;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23b08442' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(176,132,66,.16);
}
.form .btn { width: 100%; margin-top: 4px; }
.form__note { font-size: 12.5px; color: #7d828b; margin: 14px 0 0; }
.hp { position: absolute; left: -9999px; }

/* ---------- footer ---------- */
.site-footer { background: #101216; border-top: 1px solid var(--ink-line); padding: clamp(44px,5vw,64px) 0 30px; }
.foot__top { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.4fr); gap: clamp(28px,4vw,64px); padding-bottom: 34px; border-bottom: 1px solid var(--ink-line); }
.foot__brand img { height: 46px; width: auto; margin-bottom: 16px; }
.foot__brand p { font-size: 14px; color: #8c9199; max-width: 40ch; margin: 0; }
.foot__cols { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.foot__cols h4 { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: #7d828b; margin: 0 0 14px; font-weight: 600; }
.foot__cols a, .foot__cols li { font-size: 14.5px; color: #b6bac1; text-decoration: none; display: block; margin-bottom: 9px; line-height: 1.5; }
.foot__cols a:hover { color: var(--accent-lit); }
.foot__bottom { padding-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 13px; color: #6f747c; }

/* ---------- xuat hien khi cuon (motion nhe, co ton trong reduced-motion) ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .spec { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .spec__item:nth-child(2) { border-right: 0; }
  .spec__item:nth-child(1), .spec__item:nth-child(2) { border-bottom: 1px solid var(--ink-line); }
  .people-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .site-nav {
    position: fixed; inset: 78px 0 auto 0; flex-direction: column; align-items: stretch;
    gap: 0; background: rgba(20,22,26,.985); border-bottom: 1px solid var(--ink-line);
    padding: 8px var(--pad) 20px; display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--ink-line); }
  .nav-toggle { display: flex; }
  .nav-tel { display: none; }

  .hero { min-height: auto; padding-top: calc(78px + 64px); }
  .hero__grid, .pillars__inner, .tech__head, .voice, .press__grid, .contact__grid, .foot__top {
    grid-template-columns: minmax(0,1fr);
  }
  .hero__aside { border-left: 0; border-top: 1px solid var(--ink-line); padding-left: 0; padding-top: 24px; }
  .voice { gap: 14px; }
  .folio-grid { grid-template-columns: repeat(2, 1fr); }
  .pcard, .pcard--wide { grid-column: span 1; }
  .people-grid { grid-template-columns: repeat(2, 1fr); }
  .form__row { grid-template-columns: 1fr; gap: 0; }

  /* iOS phong to trang khi focus vao o nhap co font < 16px, lam cac phan tu
     position:fixed (khung chat) bi day ra ngoai man hinh. Khoa 16px de chan. */
  input, textarea, select { font-size: 16px !important; }
}
@media (max-width: 560px) {
  .folio-grid { grid-template-columns: 1fr; }
  .foot__cols { grid-template-columns: 1fr 1fr; }
  .contact { padding-bottom: calc(var(--sect) + 64px); }
  .chat-window { left: 12px; right: 12px; width: auto; max-width: none;
                 bottom: calc(12px + env(safe-area-inset-bottom)); }
}
@supports (height: 100dvh) {
  @media (max-width: 560px) {
    /* 100dvh co lai khi ban phim iOS bat len, 100vh thi khong */
    .chat-window { max-height: calc(100dvh - 120px);
                   bottom: calc(72px + env(safe-area-inset-bottom)); }
  }
}
/* ============================================================
   CHAT WIDGET - style dung chung, KHONG doi khi tao site moi
   (doi mau tu dong theo --color-primary / --color-secondary o tren)
   ============================================================ */
.chat-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-strong);
  z-index: 200;
  font-size: 24px;
  transition: transform var(--transition);
}
.chat-launcher:hover { transform: scale(1.06); }

.chat-window {
  position: fixed;
  right: 24px;
  bottom: 96px;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 140px);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-strong);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 200;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}
.chat-window.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }

.chat-header {
  background: var(--color-primary);
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat-header-title { font-weight: 700; font-size: 14.5px; }
.chat-header-sub { font-size: 11.5px; color: rgba(255,255,255,0.7); }
.chat-close {
  color: #fff; font-size: 22px; line-height: 1;
  width: 34px; height: 34px; flex: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px;
  background: rgba(255,255,255,.12);
  transition: background .15s ease;
}
.chat-close:hover { background: rgba(255,255,255,.26); }

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--color-bg);
}
.chat-msg { max-width: 84%; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; }
.chat-msg--bot {
  align-self: flex-start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-bottom-left-radius: 4px;
}
.chat-msg--user {
  align-self: flex-end;
  background: var(--color-secondary);
  color: #1a1a1a;
  border-bottom-right-radius: 4px;
}
.chat-msg--bot a {
  color: var(--color-secondary);
  font-weight: 700;
  text-decoration: underline;
}
.chat-msg--typing { display: flex; gap: 4px; align-items: center; }
.chat-msg--typing span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--color-text-muted);
  animation: chatTyping 1s infinite ease-in-out;
}
.chat-msg--typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-msg--typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chatTyping { 0%, 60%, 100% { opacity: 0.3; } 30% { opacity: 1; } }

.chat-quick-replies { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; }
.chat-quick-replies button {
  font-size: 12px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 7px 12px;
  background: var(--color-surface);
  transition: border-color var(--transition), color var(--transition);
}
.chat-quick-replies button:hover { border-color: var(--color-secondary); color: var(--color-secondary); }

.chat-quick-replies button.chat-quick-reply--contact {
  border-color: rgba(178, 138, 62, 0.55);
  color: var(--color-secondary);
  background: rgba(178, 138, 62, 0.08);
  font-weight: 600;
}
.chat-quick-replies button.chat-quick-reply--contact:hover { border-color: var(--color-secondary); }

/* lien he nhanh ngay trong chat - form nho gon, khong bat khach roi
   sang section Lien he rieng. */
.chat-contact-card {
  align-self: stretch;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
}
.chat-contact-card__title { font-weight: 700; color: var(--color-primary); font-size: 13.5px; line-height: 1.4; }
.chat-contact-card label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 4px; color: var(--color-text-muted); }
.chat-contact-card input,
.chat-contact-card textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  background: var(--color-bg);
}
.chat-contact-card input:focus,
.chat-contact-card textarea:focus { outline: none; border-color: var(--color-secondary); }
.chat-contact-card textarea { resize: vertical; min-height: 44px; }
.chat-contact-card__actions { display: flex; gap: 8px; margin-top: 2px; }
.chat-contact-card__submit {
  flex: 1;
  background: var(--color-primary);
  color: #fff;
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.chat-contact-card__submit:disabled { opacity: 0.55; cursor: not-allowed; }
.chat-contact-card__cancel {
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 13px;
  color: var(--color-text-muted);
}
.chat-contact-card__cancel:hover { border-color: var(--color-secondary); color: var(--color-secondary); }
.chat-contact-card__error { color: #b3261e; font-size: 12px; }

.chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}
.chat-input-row input {
  flex: 1;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-family: inherit;
}
.chat-input-row input:focus { outline: none; border-color: var(--color-secondary); }
.chat-send {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.chat-send:disabled { opacity: 0.5; cursor: not-allowed; }

/* === FIX IOS AUTO-ZOOM (27/08/2026) ==========================================
   TRIEU CHUNG: tren iPhone, bam vao o nhap (khung chat hoac form) -> ca trang bi
   phong to, khung chat bi day ra ngoai man hinh, mat nut gui. Tren Chrome may tinh
   thu o 390px thi KHONG tai hien duoc -> rat de ket luan nham la loi cache.

   NGUYEN NHAN: Safari va Chrome tren iOS TU DONG PHONG TO trang khi focus vao mot
   o nhap co font-size NHO HON 16px. Khi phong to, visual viewport co lai (vd 390px
   -> ~300px nhin thay) nhung phan tu position:fixed van bam theo layout viewport
   390px, nen bi day sang phai va cat mat. Trang ket o trang thai phong to nen
   dong ban phim roi van thay lech.

   => Sua left/right/width cua khung chat KHONG an. Phai chan viec phong to tu goc.
   => KHONG dung maximum-scale=1 trong the viewport: no chan luon quyen phong to
      cua nguoi dung, hong kha nang tiep can cho nguoi mat kem.
   ============================================================================ */
@media (max-width: 900px) {
  input, textarea, select { font-size: 16px !important; }
}
