/* Phần riêng của Jiaoban, đặt sau base.css (khung chép từ Banshao).
   Hai màu thương hiệu: ngọc = bot đang lo, lửa = cần người. */
:root { --jade: #008268; --jade-hi: #1FD6A6; --jade-soft: #DDF5EE; --ember: #F0560F; --ember-hi: #FF6B2C; --ember-soft: #FFE8DC; --note: #FFF5D9; --note-line: #E6C766; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 80px; }

/* logo: hai bản, đổi theo trời sáng/tối */
.jb-logo { height: 30px; width: auto; }
.lp-top .jb-logo.light { display: none; }
.sky-live[data-tone="light"] .lp-top .jb-logo.ink { display: none; }
.sky-live[data-tone="light"] .lp-top .jb-logo.light { display: block; }

/* hero */
.sec-hero h1 em { font-style: normal; white-space: nowrap; padding: 0 .06em; background: linear-gradient(transparent 58%, rgba(255,107,44,.5) 0); }
.hero-price .amt small, .price-main .amt small, .price-lite .amt small { font-size: .32em; font-weight: 600; letter-spacing: 0; vertical-align: top; margin-right: 4px; color: #5C5B55; position: relative; top: .35em; }
.hero-price .plus { margin: 0 0 12px; padding: 9px 12px; border-radius: 10px; background: var(--ember-soft); font-size: 17px; }
.hero-price .plus b { font-size: 20px; }

/* bốn trụ */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 30px; }
.pillars a { display: block; color: #111110; background: #fff; border-radius: 16px; padding: 18px 20px 20px; box-shadow: 0 2px 6px rgba(20,20,40,.08), 0 18px 44px rgba(20,20,60,.14); border-top: 5px solid var(--jade-hi); transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s; }
.pillars a:nth-child(even) { border-top-color: var(--ember-hi); }
.pillars a:hover { text-decoration: none; transform: translateY(-5px); box-shadow: 0 2px 6px rgba(20,20,40,.08), 0 26px 60px rgba(20,20,60,.22); }
.pillars b { display: block; font-size: clamp(34px, 3.4vw, 50px); line-height: 1.1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pillars h3 { font-size: 19px; margin: 8px 0 4px; }
.pillars p { font-size: 15.5px; line-height: 1.5; color: #4A4A44; }
.sky-live .pillars.reveal a { opacity: 0; transform: translateY(22px); }
.sky-live .pillars.reveal.in a { animation: jb-pop .6s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--d, 0) * .12s); }

.copy.center p:not(.when) { text-wrap: balance; }
/* nhãn trụ cạnh giờ */
.when span { display: inline-block; margin-left: 10px; padding: 2px 10px; border-radius: 999px; font-size: 14px; letter-spacing: 0; background: color-mix(in srgb, currentColor 14%, transparent); }

/* thẻ nỗi đau: biểu tượng màu lửa; thẻ điểm mạnh: màu ngọc */
.sec-ic { background: var(--ember-soft); color: var(--ember); }
.sec-ic.good { background: var(--jade-soft); color: var(--jade); }
.roles article { box-shadow: 0 1px 3px rgba(20,20,40,.08), 0 14px 34px rgba(20,20,60,.12); }
.roles b.big { display: block; font-size: 44px; line-height: 1.1; letter-spacing: -.03em; margin-bottom: 6px; color: var(--jade); }

/* trạng thái hội thoại */
.st-bot { color: var(--jade); } .st-bot i { background: var(--jade-hi); animation: jb-pulse 1.6s ease-in-out infinite; }
.st-wait { color: var(--ember); } .st-wait i { background: var(--ember-hi); animation: jb-pulse 1.1s ease-in-out infinite; }
.st-human { color: var(--brk); } .st-human i { background: var(--brk-bar); }

/* bong bóng chat dùng chung cho cửa sổ mẫu */
.chat { display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 84%; padding: 9px 13px; border-radius: 14px; font-size: 15.5px; line-height: 1.45; overflow-wrap: anywhere; }
.msg small { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 2px; }
.msg.u { align-self: flex-end; background: #111110; color: #fff; border-bottom-right-radius: 4px; }
.msg.b { align-self: flex-start; background: #F3F2EE; border-bottom-left-radius: 4px; }
.msg.b small { color: var(--jade); }
.msg.h { align-self: flex-start; background: var(--ember-soft); border-bottom-left-radius: 4px; }
.msg.h small { color: var(--ember); }
.sys { align-self: center; display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border-radius: 999px; font-size: 13.5px; color: #5C5B55; background: #F3F2EE; text-align: center; }
.sys::before { content: ""; width: 14px; height: 8px; border-radius: 2px; background: linear-gradient(90deg, var(--jade-hi) 50%, var(--ember-hi) 0); flex: none; }
/* các dòng hiện lần lượt khi khối cuộn tới (lớp .in do bg.js gắn) */
.sky-live .reveal .seq > * { opacity: 0; }
.sky-live .reveal.in .seq > * { animation: jb-pop .5s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--d, 0) * .75s + .35s); }
@keyframes jb-pop { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes jb-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 45%, transparent); } 50% { box-shadow: 0 0 0 5px transparent; } }
@keyframes jb-dot { 0%, 60%, 100% { transform: none; opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }

/* cửa sổ chat của khách (dùng khung .client của Banshao) */
.w-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.w-head img { width: 34px; height: 34px; border-radius: 9px; }
.w-head b { display: block; line-height: 1.2; }
.w-head .st { font-size: 13.5px; }
.w-input { margin-top: 10px; padding: 10px 14px; border-radius: 999px; background: #fff; border: 1px solid #E7E6E1; color: #8C8B83; font-size: 15px; }
.widget .c-card { min-height: 250px; }
.w-lang { margin-top: 10px; font-size: 14px; color: #5C5B55; text-align: center; }

/* ảnh giao diện (dựng mẫu) trong khung .win, luôn kèm thanh nhãn "界面示例"; .dark cho đoạn nền đêm.
   Khi cuộn tới: khung ngả từ sau ra trước rồi một vệt sáng quét qua. Nén ảnh: cong-cu/nen-anh.sh */
.shot { position: relative; margin: 0; }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { padding: 10px 14px 11px; border-top: 1px solid #EEEDE8; font-size: 15.5px; font-weight: 600; text-align: center; }
.shot.phone { width: 404px; max-width: 100%; }
.shot.dark { background: #0A0F0E; box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 30px 90px rgba(0,0,0,.55), 0 0 110px rgba(31,214,166,.2); }
.shot.dark .win-bar { background: #111716; border-bottom-color: rgba(255,255,255,.08); }
.shot.dark .win-bar i { background: #2B3331; }
.shot.dark .win-bar span { color: #9BA5A1; }
.sky-live .reveal .shot { transform: perspective(1600px) rotateX(18deg) scale(.9); transform-origin: 50% 100%; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.sky-live .reveal.in .shot { transform: none; }
.sky-live .reveal.in .shot::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.38) 50%, transparent 62%); transform: translateX(-100%); animation: jb-shine 1.3s .55s ease-out both; }
@keyframes jb-shine { to { transform: translateX(100%); } }
/* ghi chú giao ca + thanh bên đơn nạp/rút */
.pair { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: center; }
.pair .shot + .shot { transition-delay: .18s; }

/* mục giao diện: ba cảnh, mỗi cảnh một số lớn + một câu + một khung ảnh */
.tour { display: grid; gap: 64px; margin-top: 34px; }
.tour-item { position: relative; display: grid; gap: 18px; }
.tour-cap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 20px; align-items: center; }
.tour-cap b { grid-row: 1 / span 2; font-size: clamp(52px, 6vw, 88px); line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; color: var(--jade-hi); }
.tour-item:nth-child(even) .tour-cap b { color: var(--ember-hi); }
.tour-cap h3 { align-self: end; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.2; letter-spacing: -.02em; }
.tour-cap p { align-self: start; font-size: 19px; line-height: 1.5; color: var(--sky-ink-2); }
.sky-live .tour-item:nth-child(odd) .reveal .shot { transform: perspective(1600px) rotateX(14deg) rotateY(-9deg) scale(.88); }
.sky-live .tour-item:nth-child(even) .reveal .shot { transform: perspective(1600px) rotateX(14deg) rotateY(9deg) scale(.88); }
.sky-live .tour-item .reveal.in .shot { transform: none; }
/* 坐席 / 管理员: hai nút radio, ảnh admin quét ngang đè lên ảnh nhân viên */
.views input { position: absolute; opacity: 0; pointer-events: none; }
.view-tabs { justify-self: start; display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
.view-tabs label { padding: 9px 20px; border-radius: 999px; font-size: 16.5px; font-weight: 600; color: rgba(255,255,255,.82); cursor: pointer; transition: background .3s, color .3s; }
#view-agent:checked ~ .view-tabs label[for="view-agent"] { background: var(--jade-hi); color: #03140F; }
#view-admin:checked ~ .view-tabs label[for="view-admin"] { background: var(--ember-hi); color: #1A0A02; }
#view-agent:focus-visible ~ .view-tabs label[for="view-agent"], #view-admin:focus-visible ~ .view-tabs label[for="view-admin"] { outline: 2px solid #fff; outline-offset: 2px; }
#view-agent:checked ~ .tour-cap .v-admin, #view-admin:checked ~ .tour-cap .v-agent { display: none; }
.view-stack { display: grid; }
.view-stack > * { grid-area: 1 / 1; }
/* ảnh nhân viên nằm trên và bị quét đi; ảnh admin nằm dưới, không bị cắt, để trình duyệt vẫn tải lazy trước khi bấm */
.view-stack .v-agent { position: relative; z-index: 1; background: #0A0F0E; clip-path: inset(0); transition: clip-path .85s cubic-bezier(.7,0,.2,1); }
#view-admin:checked ~ .reveal .view-stack .v-agent { clip-path: inset(0 100% 0 0); }
#view-admin:checked ~ .reveal .shot.dark { box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 30px 90px rgba(0,0,0,.55), 0 0 110px rgba(255,107,44,.26); }
.shot.dark { transition: box-shadow .85s; }
.tour-more { margin-top: 56px; }

/* bảng quy trình riêng của một trang */
.flow li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid #F0EFEB; font-size: 15.5px; }
.flow li:last-child { border-bottom: 0; padding-bottom: 0; }
.flow li:first-child { padding-top: 0; }
.flow span { color: #5C5B55; }
.chip { font-style: normal; display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 13.5px; font-weight: 600; white-space: nowrap; background: var(--jade-soft); color: var(--jade); }
.chip.hand { background: var(--ember-soft); color: var(--ember); }
.flow-cap { font-size: 14px; color: #8C8B83; margin-bottom: 12px; }

/* các bước tra hậu đài */
.lookup { display: flex; flex-direction: column; gap: 10px; }
.steps { align-self: stretch; margin: 2px 0; border: 1px solid #EEEDE8; border-radius: 12px; overflow: hidden; }
.steps li { display: grid; grid-template-columns: 22px 92px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 14px; font-size: 15px; border-bottom: 1px solid #F0EFEB; background: #FBFBF9; }
.steps li:last-child { border-bottom: 0; }
.steps i { width: 20px; height: 20px; border-radius: 50%; background: var(--jade-hi) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2303140F' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 10.5l3 3 6-7'/%3E%3C/svg%3E") center/20px no-repeat; }
.steps span { color: #5C5B55; }
.sky-live .reveal .lookup.seq > .steps { opacity: 1; animation: none; }
.sky-live .reveal .steps li { opacity: 0; }
.sky-live .reveal.in .steps li { animation: jb-pop .5s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--d, 0) * .75s + .35s); }

.roles .sec-ic + h3 { margin-top: 10px; }
@media (max-width: 760px) { .split.flip > .win { order: 2; } .sec-cards { gap: 1px; } .sec-cards article { border-radius: 0; box-shadow: none; padding: 16px; } }

/* thanh 24 giờ (dùng khung .nightbar của Banshao) */
.nb-track.all { overflow: hidden; }
.nb-track.all .nb-shift { left: 10px; right: 10px; background: linear-gradient(90deg, #12B98C, #1FD6A6 50%, #12B98C); overflow: hidden; }
.nb-track.all .nb-shift em { color: #03140F; position: relative; z-index: 1; }
.nb-track.all .nb-shift::after { content: ""; position: absolute; top: 0; bottom: 0; left: -30%; width: 30%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); animation: jb-sweep 2.8s linear infinite; }
@keyframes jb-sweep { to { left: 100%; } }
.nb-human { position: relative; height: 40px; margin-top: 10px; border-radius: 12px; background: #10163A; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.nb-human i { position: absolute; top: 9px; bottom: 9px; width: 9px; border-radius: 5px; background: var(--ember-hi); animation: jb-blink 3.2s ease-in-out infinite; animation-delay: calc(var(--d, 0) * -.55s); }
@keyframes jb-blink { 0%, 100% { opacity: .35; transform: scaleY(.7); } 50% { opacity: 1; transform: none; } }
.nb-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; margin-top: 4px; font-size: 15px; color: rgba(255,255,255,.82); }
.nb-legend span { display: inline-flex; align-items: center; gap: 7px; }
.nb-legend i { width: 12px; height: 12px; border-radius: 4px; background: var(--jade-hi); }
.nb-legend i.hand { background: var(--ember-hi); }

/* giá */
.price-page .card { margin: 0; color: #111110; } /* nền đêm cho chữ trắng: thẻ trắng phải tự đặt màu chữ */
.price-main h2 { font-size: 21px; }
.price-main .ticks li { font-size: 17px; }
.grid2.calc { grid-template-columns: 1fr 1fr; }
.calc-total { margin-top: 4px; }
#calc .hint { font-size: 16px; color: #5C5B55; }
.price-cta { margin-top: 18px; text-align: center; }
.plan-tag { display: inline-block; margin: 0 0 8px; padding: 3px 11px; border-radius: 999px; background: var(--jade-soft); color: var(--jade); font-size: 14.5px; font-weight: 600; }
.price-bot { border-top: 4px solid var(--jade-hi); }
.price-extra { margin: 12px 0 0; border-top: 1px solid var(--line); }
.price-extra div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 16.5px; }
.price-extra div:last-child { border-bottom: 0; padding-bottom: 0; }
.price-extra dt { color: #5C5B55; } .price-extra dd { margin: 0; font-weight: 600; text-align: right; }
.price-side { display: grid; gap: 12px; }
.price-lite h2 { font-size: 19px; }
.price-lite .amt { font-size: 44px; font-weight: 600; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.price-lite .per { color: #5C5B55; font-size: 16px; margin: 4px 0 8px; }
.price-lite p { font-size: 16px; color: #4A4A44; }
.price-lite .price-extra { margin-top: 0; border-top: 0; }
.sw { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; font-size: 16.5px; cursor: pointer; }
.sw input { width: 20px; height: 20px; accent-color: var(--jade); flex: none; }
.calc-rows { width: 100%; border-collapse: collapse; margin: 2px 0 10px; font-size: 15.5px; }
.calc-rows th, .calc-rows td { padding: 6px 0; border-bottom: 1px solid var(--line-2); text-align: left; font-weight: 400; }
.calc-rows th { color: #5C5B55; white-space: nowrap; padding-right: 10px; }
.calc-rows td:last-child { text-align: right; font-weight: 600; white-space: nowrap; padding-left: 10px; }
.partner { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 12px; padding: 18px 20px; border-radius: var(--r); background: #fff; color: #111110; }
.partner h3 { font-size: 20px; }
.partner h3 span { margin-left: 10px; padding: 2px 10px; border-radius: 999px; background: var(--ember-soft); color: var(--ember); font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.partner p { margin-top: 6px; font-size: 16.5px; color: #4A4A44; max-width: 760px; }
.sec .partner .btn.primary, .sky-live[data-tone="light"] .sec .partner .btn.primary { background: #111110; color: #fff; border-color: #111110; flex: none; }
.price-def { margin-top: 12px; font-size: 14.5px; color: rgba(255,255,255,.78); }

/* FAQ và liên hệ trên nền đêm */
.faq details { color: #111110; }
.faq summary { list-style-position: outside; }
.faq p { color: #4A4A44; }
.contact-card { max-width: 560px; margin: 22px auto 0; padding: 22px 24px; border-radius: 18px; background: #fff; color: #111110; text-align: center; box-shadow: 0 2px 6px rgba(20,20,40,.08), 0 24px 60px rgba(20,20,60,.25); }
.contact-card b { display: block; font-size: 15px; color: #8C8B83; font-weight: 600; margin-bottom: 6px; }
.contact-card p, .contact-card a#contact-line { font-size: 24px; font-weight: 600; color: #111110; max-width: none; }
.contact-card a#contact-line { text-decoration: underline; text-underline-offset: 4px; }
.foot-brand .jb-logo { height: 28px; }
.foot-note { margin-top: 10px; font-size: 13.5px; color: var(--ink-3); }

@media (max-width: 1000px) {
  .pillars { grid-template-columns: 1fr 1fr; }
  .pair { grid-template-columns: minmax(0, 1fr) 260px; }
}
@media (max-width: 760px) {
  [id] { scroll-margin-top: 12px; }
  .jb-logo { height: 28px; }
  /* di động: bốn trụ lên ngay sau lời mở đầu, trước bảng giá */
  .sec-hero { display: flex; flex-direction: column; }
  .sec-hero > .lp-wrap, .sec-hero .hero-grid { display: contents; }
  .sec-hero .hero-copy { order: 1; } .sec-hero .pillars { order: 2; } .sec-hero .hero-price { order: 3; } .sec-hero .stage { order: 4; }
  .pillars { gap: 1px; margin: 22px 0 1px; }
  .roles article { box-shadow: none; }
  .pillars a { border-radius: 0; box-shadow: none; padding: 14px 16px 16px; }
  .pillars b { font-size: 32px; }
  .pillars h3 { font-size: 15.5px; margin-top: 6px; }
  .pillars p { font-size: 14px; }
  .pair { grid-template-columns: 1fr; gap: 12px; }
  .shot.phone { width: 100%; }
  .tour { gap: 44px; margin-top: 26px; }
  .tour-cap, .view-tabs { margin: 0 16px; }
  .tour-cap { gap: 2px 14px; }
  .tour-cap p { font-size: 17px; }
  .view-tabs { justify-self: stretch; }
  .view-tabs label { flex: 1; text-align: center; padding: 10px 8px; }
  .tour-more { margin-top: 36px; }
  .flow li { grid-template-columns: 1fr auto; gap: 4px 10px; }
  .flow li span { grid-column: 1; grid-row: 2; font-size: 14.5px; }
  .flow li .chip { grid-row: 1 / span 2; grid-column: 2; }
  .steps li { grid-template-columns: 22px 80px minmax(0, 1fr); padding: 10px 12px; }
  .nb-track.all .nb-shift { left: 0; right: 0; border-radius: 0; }
  .nb-human { border-radius: 0; box-shadow: none; }
  .nb-legend, .nb-labels { padding: 0 16px; }
  .price-page { gap: 1px; }
  .price-page .card { border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; }
  .price-side { gap: 1px; }
  .partner { flex-direction: column; align-items: stretch; margin-top: 1px; padding: 18px 16px; border-radius: 0; }
  .price-def { padding: 0 16px; }
  .faq { padding: 0 16px; }
  .contact-card { margin: 18px 16px 0; padding: 18px 16px; }
  .contact-card p, .contact-card a#contact-line { font-size: 20px; }
  .sec .price-cta .btn { width: calc(100% - 32px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
  .sky-live .reveal .seq > *, .sky-live .reveal .steps li, .sky-live .pillars.reveal a { opacity: 1; transform: none; }
  .sky-live .reveal .shot, .sky-live .tour-item:nth-child(n) .reveal .shot { transform: none; }
  .view-stack .v-agent { transition: none; }
}
