/* ---------- Trợ lý Mentor VietSCI (góc trái) + Zalo, Messenger (góc phải) ---------- */
.cb { position: fixed; left: 20px; bottom: 20px; z-index: 900; font-family: var(--font) }
.cb-launch { position: relative; display: flex; align-items: center; gap: 10px; border: 0; cursor: pointer; padding: 0; background: none }
.cb-launch .cb-orb { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--grad-brand); box-shadow: 0 16px 30px -12px rgba(26,0,174,.7); transition: transform .3s var(--ease) }
.cb-launch .cb-orb::after { content: ""; position: absolute; left: 0; top: 0; width: 58px; height: 58px; border-radius: 50%; border: 2px solid rgba(124,58,237,.6); animation: ring 2.6s ease-out infinite }
.cb-launch .cb-orb .ic { width: 27px; height: 27px }
.cb-launch:hover .cb-orb { transform: scale(1.06) rotate(-6deg) }
.cb-launch .cb-dot { position: absolute; left: 42px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #22C55E; border: 2.5px solid #fff }
.cb-tip { padding: 9px 14px; border-radius: 14px 14px 14px 4px; background: #fff; color: var(--navy); font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow); border: 1px solid #E8E6F7; white-space: nowrap; opacity: 0; transform: translateX(-8px); pointer-events: none; transition: .35s var(--ease) }
.cb.hint .cb-tip, .cb-launch:hover .cb-tip { opacity: 1; transform: none }
.cb.open .cb-tip { display: none }
.cb.open .cb-orb .ic { transform: rotate(90deg) }
.cb-panel { position: absolute; left: 0; bottom: 74px; width: 370px; max-width: calc(100vw - 32px); height: 560px; max-height: calc(100vh - 110px); display: flex; flex-direction: column; background: #fff; border-radius: 22px; overflow: hidden; border: 1px solid #E8E6F7; box-shadow: 0 40px 80px -30px rgba(16,14,51,.45); transform-origin: bottom left; animation: cbIn .3s var(--ease) }
@keyframes cbIn { from { opacity: 0; transform: translateY(12px) scale(.96) } }
.cb-panel[hidden] { display: none }
.cb-head { position: relative; display: flex; align-items: center; gap: 11px; padding: 14px 14px 14px 16px; color: #fff; background: radial-gradient(240px 140px at 100% 120%, rgba(255,102,0,.55), transparent 70%), var(--grad-brand) }
.cb-head .cb-hava { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3) }
.cb-head .cb-hava .ic { width: 21px; height: 21px }
.cb-head b { display: block; font-size: 15px } .cb-head small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #DCD8FF }
.cb-head small::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #34D399 }
.cb-head .cb-acts { margin-left: auto; display: flex; gap: 4px }
.cb-head button { width: 32px; height: 32px; border-radius: 10px; border: 0; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; display: grid; place-items: center }
.cb-head button:hover { background: rgba(255,255,255,.24) } .cb-head button .ic { width: 16px; height: 16px }
.cb-log { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 12px; background: linear-gradient(180deg, #FAF9FF, #fff) }
.cb-msg { display: flex; gap: 8px; align-items: flex-end; animation: fadeUp .3s var(--ease) }
.cb-msg.me { justify-content: flex-end }
.cb-ava { width: 28px; height: 28px; flex: none; border-radius: 9px; background: var(--grad-brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8z'/%3E%3C/svg%3E") center / 16px no-repeat }
.cb-bub { max-width: 82%; padding: 10px 13px; border-radius: 16px 16px 16px 4px; background: #fff; border: 1px solid #ECEAF6; font-size: 14px; line-height: 1.55; color: #2A2E48; box-shadow: 0 6px 14px -12px rgba(26,0,174,.4) }
.cb-msg.me .cb-bub { border-radius: 16px 16px 4px 16px; background: var(--grad-brand); color: #fff; border: 0 }
.cb-bub p { margin: 0 0 6px } .cb-bub p:last-child { margin: 0 } .cb-bub ul { margin: 4px 0 6px; padding-left: 18px } .cb-bub li { margin: 2px 0 }
.cb-bub a { color: var(--indigo-2); font-weight: 600 }
.cb-calc { margin: 8px 0; padding: 10px 12px; border-radius: 12px; background: #F6F4FF; border: 1px solid #E2DDFB }
.cb-calc p { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 4px; font-size: 13px } .cb-calc p:last-child { margin: 0 }
.cb-calc .t { border-top: 1px dashed #D9D3FB; padding-top: 6px; margin-top: 6px } .cb-calc .t b { color: var(--indigo); font-size: 15px }
.cb-calc .ok { color: var(--green) }
.cb-note { font-size: 12px; color: var(--muted) }
.cb-ms { display: grid; gap: 6px; margin-top: 6px }
.cb-ms a { display: flex; gap: 9px; align-items: center; padding: 7px 9px; border-radius: 12px; border: 1px solid #ECEAF6; color: inherit; font-weight: 500 }
.cb-ms a:hover { border-color: #CFC8FF; background: #FAF9FF }
.cb-ms .cb-av { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--grad-brand); color: #fff; font-weight: 700; font-size: 12px }
.cb-ms b { display: block; font-size: 13px; color: var(--navy) } .cb-ms small { display: block; font-size: 11.5px; color: var(--muted) }
.cb-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px }
.cb-links a { display: inline-flex; padding: 5px 11px; border-radius: 99px; background: var(--grad-warm); color: #fff !important; font-size: 12.5px; font-weight: 700; text-decoration: none }
.cb-sug { display: grid; gap: 5px; margin-top: 9px }
.cb-sug button, .cb-chips button { text-align: left; border: 1px solid #E2DDFB; background: #F8F7FF; color: var(--indigo); border-radius: 11px; padding: 7px 11px; font: 600 12.5px var(--font); cursor: pointer; transition: .2s }
.cb-sug button:hover, .cb-chips button:hover { background: var(--indigo-2); color: #fff; border-color: transparent }
.cb-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px }
.cb-chips[hidden] { display: none }
.cb-chips button { border-radius: 99px }
.cb-typing .cb-bub { display: flex; gap: 4px; padding: 13px 14px }
.cb-typing i { width: 7px; height: 7px; border-radius: 50%; background: #A9A2F5; animation: cbDot 1.1s infinite ease-in-out }
.cb-typing i:nth-child(2) { animation-delay: .15s } .cb-typing i:nth-child(3) { animation-delay: .3s }
@keyframes cbDot { 40% { transform: translateY(-5px); opacity: 1 } 0%, 80%, 100% { opacity: .45 } }
.cb form { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid #F0EEF8; background: #fff }
.cb form input { flex: 1; padding: 11px 14px !important; border-radius: 13px !important; font-size: 14px !important }
.cb form button { width: 44px; height: 44px; flex: none; border: 0; border-radius: 13px; cursor: pointer; display: grid; place-items: center; color: #fff; background: var(--grad-warm); box-shadow: 0 10px 18px -10px rgba(255,102,0,.8) }
.cb form button .ic { width: 19px; height: 19px }
.cb-foot { padding: 0 12px 10px; font-size: 11px; color: #A0A4BA; text-align: center; background: #fff }

/* Góc phải: Zalo, Messenger */
.fab { position: fixed; right: 20px; bottom: 20px; z-index: 890; display: grid; gap: 12px; justify-items: end }
.fab a { position: relative; display: flex; align-items: center; gap: 10px; text-decoration: none }
.fab .fab-i { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: 0 14px 26px -12px rgba(16,14,51,.55); transition: transform .3s var(--ease) }
.fab .fab-i .ic { width: 26px; height: 26px }
.fab .zalo .fab-i { background: #0068FF } .fab .mess .fab-i { background: linear-gradient(135deg, #00B2FF, #006AFF 45%, #A033FF 80%, #FF5C87) }
.fab .zalo .fab-i::after { content: ""; position: absolute; right: 0; width: 54px; height: 54px; border-radius: 50%; border: 2px solid rgba(0,104,255,.55); animation: ring 2.4s ease-out infinite }
.fab a:hover .fab-i { transform: scale(1.08) rotate(-8deg) }
.fab .fab-l { padding: 7px 12px; border-radius: 12px; background: #fff; color: var(--navy); font-size: 13px; font-weight: 700; box-shadow: var(--shadow); border: 1px solid #E8E6F7; opacity: 0; transform: translateX(8px); pointer-events: none; transition: .3s var(--ease); white-space: nowrap }
.fab a:hover .fab-l { opacity: 1; transform: none }
@media (max-width: 640px) {
  .cb { left: 12px; bottom: 12px } .fab { right: 12px; bottom: 12px; gap: 10px }
  .cb-launch .cb-orb, .cb-launch .cb-orb::after { width: 52px; height: 52px } .cb-launch .cb-dot { left: 37px }
  .fab .fab-i, .fab .zalo .fab-i::after { width: 48px; height: 48px }
  .cb-tip { display: none }
  .cb-panel { position: fixed; left: 8px; right: 8px; bottom: 74px; width: auto; max-width: none; height: calc(100vh - 100px) }
}
@media print { .cb, .fab { display: none } }
@media (prefers-reduced-motion: reduce) { .cb-launch .cb-orb::after, .fab .zalo .fab-i::after { animation: none } }

/* Logo Zalo chuẩn */
.ic.zl { border-radius: 22%; stroke: none !important }
.fab .zalo .fab-i { background: none; width: 54px; height: 54px; border-radius: 16px; box-shadow: 0 14px 26px -12px rgba(0,104,255,.7) }
.fab .zalo .fab-i .ic.zl { width: 54px; height: 54px; border-radius: 16px }
.fab .zalo .fab-i::after { border-radius: 18px }
@media (max-width: 640px) { .fab .zalo .fab-i, .fab .zalo .fab-i .ic.zl { width: 48px; height: 48px; border-radius: 14px } }
