/* ==========================================================
   King Star - giao diện mobile-first + PWA
   ========================================================== */
:root {
    --c-primary: #0d6efd;
    --c-primary-dark: #0a58ca;
    --c-bg: #f1f4f9;
    --c-card: #ffffff;
    --c-line: #e5e9f0;
    --c-text: #1f2937;
    --c-muted: #6b7280;
    --radius: 14px;
    --appbar-h: 56px;
    --bottom-h: 62px;
    --safe-b: env(safe-area-inset-bottom, 0px);
    --safe-t: env(safe-area-inset-top, 0px);
}

html { -webkit-text-size-adjust: 100%; }
body {
    background: var(--c-bg);
    color: var(--c-text);
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: contain;
}

/* Khung chung của mọi trang */
body > .container-fluid {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 12px calc(var(--bottom-h) + var(--safe-b) + 24px) !important;
}
@media (min-width: 992px) {
    body > .container-fluid { padding-bottom: 32px !important; }
}

/* Input đủ lớn, không bị iOS tự zoom */
@media (max-width: 767.98px) {
    input.form-control, select.form-select, textarea.form-control,
    .form-control-sm, .form-select-sm { font-size: 16px !important; min-height: 44px; }
    textarea.form-control { min-height: 0; }
    .btn { min-height: 42px; }
    .btn-sm { min-height: 38px; }
}

/* ---------- App bar ---------- */
.appbar {
    position: sticky; top: 0; z-index: 1030;
    margin: 0 -12px 10px;
    padding: calc(8px + var(--safe-t)) 12px 8px;
    min-height: var(--appbar-h);
    display: flex; align-items: center; gap: 10px;
    background: linear-gradient(135deg, #0d6efd, #0a4fc4);
    color: #fff;
    box-shadow: 0 2px 10px rgba(13, 110, 253, .25);
}
.appbar-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; flex: 1 1 auto; }
.appbar-brand .logo {
    width: 38px; height: 38px; border-radius: 11px; flex: 0 0 auto;
    background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 1.1rem;
}
.appbar-brand b { display: block; font-size: 1rem; line-height: 1.15; }
.appbar-brand small { display: block; opacity: .85; font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.appbar-actions .btn { background: rgba(255,255,255,.16); border: 0; color: #fff; font-weight: 600; font-size: .85rem; min-height: 38px; }
.appbar-actions .btn:hover { background: rgba(255,255,255,.28); color: #fff; }
.appbar-btn {
    flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; border: 0;
    background: rgba(255,255,255,.16); color: #fff; font-size: 1.15rem;
}
.appbar-btn:active { background: rgba(255,255,255,.3); }

/* ---------- Tìm kiếm ---------- */
.searchbar { margin-bottom: 10px; }
.searchbar .input-group { box-shadow: 0 2px 8px rgba(0,0,0,.05); border-radius: 12px; }
.searchbar .form-control, .searchbar .btn { border-color: #cfe0ff; }
.searchbar .form-control { border-radius: 12px 0 0 12px; background: #fff; }
.searchbar .btn:last-child { border-radius: 0 12px 12px 0; }

/* ---------- Tabs cuộn ngang ---------- */
.tab-scroll {
    display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -12px 4px; padding-left: 12px; padding-right: 12px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
}
.tab-scroll::-webkit-scrollbar { display: none; }
.tab-pill {
    flex: 0 0 auto; scroll-snap-align: center;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 999px;
    background: #fff; color: var(--c-text); border: 1px solid var(--c-line);
    font-size: .9rem; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.tab-pill i { color: var(--c-muted); }
.tab-pill.active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; box-shadow: 0 3px 10px rgba(13,110,253,.3); }
.tab-pill.active i { color: #fff; }

/* ---------- Menu dưới (mobile) ---------- */
.bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
    height: calc(var(--bottom-h) + var(--safe-b)); padding-bottom: var(--safe-b);
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    background: #fff; border-top: 1px solid var(--c-line);
    box-shadow: 0 -4px 16px rgba(0,0,0,.06);
}
.bottom-nav a, .bottom-nav button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border: 0; background: none; color: var(--c-muted); font-size: .7rem; font-weight: 600; text-decoration: none;
}
.bottom-nav i { font-size: 1.15rem; }
.bottom-nav .active { color: var(--c-primary); }
.bottom-nav .active i { transform: translateY(-1px); }

/* ---------- Offcanvas menu ---------- */
.menu-user { display: flex; align-items: center; gap: 12px; padding: 4px 0 12px; }
.menu-user .avatar {
    width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
    background: var(--c-primary); color: #fff; font-weight: 700; font-size: 1.1rem;
}
.menu-list { display: grid; gap: 4px; }
.menu-list a, .menu-list button {
    display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
    padding: 12px 12px; border-radius: 12px; border: 0; background: transparent;
    color: var(--c-text); font-weight: 600; text-decoration: none; font-size: .98rem;
}
.menu-list a i, .menu-list button i { width: 22px; text-align: center; color: var(--c-primary); }
.menu-list a.active { background: #e7f1ff; color: var(--c-primary); }
.menu-list a:active, .menu-list button:active { background: #eef2f7; }
.menu-list .danger, .menu-list .danger i { color: #dc3545; }
.menu-sep { height: 1px; background: var(--c-line); margin: 8px 0; }
.menu-quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.menu-quick button { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--c-line); background: #f8fafc;
    border-radius: 10px; padding: 8px 10px; font-weight: 600; font-size: .85rem; color: var(--c-text); }
.menu-quick button i { color: var(--c-primary); }
.menu-group { border-top: 1px solid var(--c-line); padding-top: 4px; margin-top: 4px; }
.menu-head { list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer; user-select: none;
    padding: 10px 12px 6px; font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #64748b; }
.menu-head::-webkit-details-marker { display: none; }
.menu-head i { font-size: .7rem; transition: transform .15s; }
.menu-group:not([open]) .menu-head i { transform: rotate(-90deg); }
.menu-head-static { cursor: default; border-top: 1px solid var(--c-line); margin-top: 4px; padding-top: 14px; }
.menu-group .menu-list a { padding-top: 10px; padding-bottom: 10px; }

/* ---------- Banner offline + toast ---------- */
.offline-banner {
    display: none; position: sticky; top: var(--appbar-h); z-index: 1029;
    margin: 0 -12px 10px; padding: 7px 12px; background: #b45309; color: #fff; font-size: .85rem; font-weight: 600; text-align: center;
}
body.is-offline .offline-banner { display: block; }
.app-toast {
    position: fixed; left: 50%; bottom: calc(var(--bottom-h) + var(--safe-b) + 16px); transform: translate(-50%, 20px);
    max-width: 90vw; padding: 10px 16px; border-radius: 12px; background: #111827; color: #fff; font-size: .9rem;
    opacity: 0; pointer-events: none; transition: .25s; z-index: 2000;
}
.app-toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 992px) { .app-toast { bottom: 24px; } }

/* ---------- Thanh công cụ danh sách ---------- */
.list-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px;
}
.list-toolbar .quick-filter { flex: 1 1 220px; position: relative; }
.list-toolbar .quick-filter i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--c-muted); }
.list-toolbar .quick-filter input { padding-left: 36px; border-radius: 12px; }
.list-count { font-size: .85rem; color: var(--c-muted); font-weight: 600; white-space: nowrap; }
.select-all { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; }
.select-all input { width: 1.25rem; height: 1.25rem; }

/* ---------- Thẻ khách hàng ---------- */
.cust-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 768px) { .cust-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .cust-grid { grid-template-columns: repeat(3, 1fr); } }

.cust-card {
    position: relative; background: var(--c-card); border-radius: var(--radius);
    border: 1px solid var(--c-line); border-left: 5px solid #9ca3af;
    box-shadow: 0 2px 8px rgba(17, 24, 39, .05);
    padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.cust-card.st-chua-goi { border-left-color: #9ca3af; }
.cust-card.st-chua-nghe { border-left-color: #f59e0b; }
.cust-card.st-dang-lam { border-left-color: #0dcaf0; }
.cust-card.st-khao-sat { border-left-color: #0d6efd; }
.cust-card.st-ky-hd, .cust-card.st-hoan-thanh { border-left-color: #198754; }
.cust-card.st-huy { border-left-color: #dc3545; opacity: .8; }
.cust-card.is-due { box-shadow: 0 0 0 2px rgba(220,53,69,.35), 0 2px 8px rgba(17,24,39,.05); }
.cust-card.is-highlight { background: #fff8e1; box-shadow: 0 0 0 2px #ffc107; }

.cc-head { display: flex; align-items: flex-start; gap: 10px; }
.cc-head .form-check-input { width: 1.4rem; height: 1.4rem; margin-top: 2px; flex: 0 0 auto; }
.cc-title { flex: 1 1 auto; min-width: 0; }
.cc-name { font-weight: 700; font-size: 1.05rem; line-height: 1.25; word-break: break-word; }
.cc-sub { font-size: .78rem; color: var(--c-muted); }
.cc-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-badges .badge { font-weight: 600; white-space: normal; text-align: left; }

.cc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cc-actions .btn { display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; border-radius: 12px; min-height: 46px; }
.cc-actions .btn-call { grid-column: 1 / -1; background: #198754; border-color: #198754; color: #fff; font-size: 1.05rem; }
.cc-actions .btn-call:active { background: #146c43; }
.btn-zalo { background-color: #0068ff; border-color: #0068ff; color: #fff; font-weight: 600; }
.btn-zalo:hover, .btn-zalo:active { background-color: #0052cc; border-color: #0052cc; color: #fff; }

.cc-meta { display: grid; gap: 4px; font-size: .88rem; }
.cc-meta div { display: flex; gap: 8px; align-items: flex-start; }
.cc-meta i { width: 16px; margin-top: 3px; color: var(--c-muted); text-align: center; flex: 0 0 auto; }
.cc-meta span { min-width: 0; word-break: break-word; }

.cc-log { background: #f8fafc; border: 1px solid var(--c-line); border-radius: 12px; padding: 8px 10px; font-size: .88rem; }
.cc-log .last { line-height: 1.4; word-break: break-word; }
.cc-log .when { font-weight: 700; color: var(--c-primary); margin-right: 4px; }
.cc-log details summary { cursor: pointer; color: var(--c-primary); font-weight: 600; font-size: .82rem; margin-top: 6px; list-style: none; }
.cc-log details summary::-webkit-details-marker { display: none; }
.call-history-item { padding: 6px 0; border-top: 1px dashed var(--c-line); line-height: 1.4; word-break: break-word; }
.call-history-item:first-child { border-top: 0; }

.cc-foot { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.select-status { font-weight: 700; border-radius: 10px; cursor: pointer; }
.cc-foot .btn-edit { font-weight: 700; border-radius: 12px; min-height: 44px; padding-left: 16px; padding-right: 16px; }

/* Thanh chia data hàng loạt */
.bulk-bar {
    display: none; position: fixed; z-index: 1035; left: 10px; right: 10px;
    bottom: calc(var(--bottom-h) + var(--safe-b) + 10px);
    background: #fff; border: 1px solid #b6d4fe; border-radius: 16px; padding: 10px 12px;
    box-shadow: 0 8px 28px rgba(13,110,253,.25);
}
.bulk-bar.show { display: block; }
.bulk-bar .row-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bulk-bar select { flex: 1 1 160px; }
@media (min-width: 992px) { .bulk-bar { left: 50%; right: auto; transform: translateX(-50%); bottom: 20px; width: min(720px, 90vw); } }

.empty-state { text-align: center; padding: 48px 16px; color: var(--c-muted); }
.empty-state i { font-size: 2.2rem; display: block; margin-bottom: 10px; opacity: .6; }

/* ---------- Modal ---------- */
.modal-content { border: 0; border-radius: 18px; }
@media (max-width: 767.98px) {
    .modal-fullscreen-md-down .modal-content { border-radius: 0; }
}
.modal-header { position: sticky; top: 0; background: #fff; z-index: 2; }
.modal-footer { position: sticky; bottom: 0; background: #fff; z-index: 2; padding-bottom: calc(.75rem + var(--safe-b)); }
.modal-footer .btn { flex: 1 1 0; }

.info-box { border: 1px solid var(--c-line); border-radius: 12px; background: #f8fafc; margin-bottom: 12px; }
.info-box > summary { padding: 12px; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.info-box > summary::-webkit-details-marker { display: none; }
.info-box[open] > summary { border-bottom: 1px solid var(--c-line); }
.info-box .inner { padding: 12px; }

.call-step { background: #f8fafc; border: 1px solid var(--c-line); border-left: 4px solid var(--c-primary); border-radius: 12px; margin-bottom: 10px; }
.call-step .call-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; }
.call-step .call-head h6 { margin: 0; font-weight: 700; color: var(--c-primary); }
.call-step .call-head .tag { font-size: .75rem; color: var(--c-muted); font-weight: 600; }
.call-step .call-body { padding: 0 12px 12px; }
.call-step.is-collapsed .call-body { display: none; }
.call-step.is-collapsed { border-left-color: #cbd5e1; }
.call-step.is-collapsed .call-head h6 { color: var(--c-muted); }
.call-step.has-data:not(.is-collapsed) { border-left-color: #198754; }

.btn-recording { background-color: #dc3545 !important; border-color: #dc3545 !important; color: #fff !important; animation: pulse-red 1.2s infinite; }
@keyframes pulse-red { 0% { opacity: 1; } 50% { opacity: .55; } 100% { opacity: 1; } }

/* ---------- Các trang còn lại: bảng -> thẻ trên mobile ---------- */
.kpi-card { border-radius: var(--radius) !important; }
.card-custom, .main-card { border-radius: var(--radius) !important; }

@media (max-width: 767.98px) {
    .card-custom, .main-card { padding: 12px !important; }

    table.table:not(.no-cards) { display: block; border: 0; }
    table.table:not(.no-cards) thead { display: none; }
    table.table:not(.no-cards) tbody { display: block; }
    table.table:not(.no-cards) tr {
        display: block; margin-bottom: 10px; padding: 6px 12px;
        background: #fff; border: 1px solid var(--c-line); border-radius: 12px;
        box-shadow: 0 1px 4px rgba(17,24,39,.04);
    }
    table.table:not(.no-cards) td {
        display: flex; justify-content: space-between; align-items: center; gap: 12px;
        width: auto; padding: 7px 0 !important; border: 0 !important; border-bottom: 1px dashed var(--c-line) !important;
        text-align: right !important; white-space: normal !important; background: transparent !important; box-shadow: none !important;
        min-width: 0 !important; max-width: none !important;
    }
    table.table:not(.no-cards) td:last-child { border-bottom: 0 !important; }
    table.table:not(.no-cards) td[data-label]::before {
        content: attr(data-label); flex: 0 0 38%; max-width: 45%; text-align: left;
        font-size: .78rem; font-weight: 700; color: var(--c-muted);
    }
    table.table:not(.no-cards) td[colspan] { display: block; text-align: center !important; }
    .table-responsive { overflow: visible; }
}

/* ---------- Đăng nhập ---------- */
.login-page {
    min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center;
    padding: calc(16px + var(--safe-t)) 16px calc(16px + var(--safe-b));
    background: linear-gradient(160deg, #0b3d91, #0d6efd 55%, #4aa3ff);
}
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 22px; padding: 28px 22px; box-shadow: 0 18px 50px rgba(0,0,0,.28); }
.login-logo {
    width: 68px; height: 68px; border-radius: 20px; margin: 0 auto 10px; display: grid; place-items: center;
    background: linear-gradient(135deg, #0d6efd, #0a4fc4); color: #fff; font-size: 1.8rem; box-shadow: 0 8px 20px rgba(13,110,253,.4);
}
.login-card .form-control { min-height: 50px; font-size: 16px; }
.login-card .btn-primary { min-height: 50px; border-radius: 12px; font-weight: 700; }
.login-card .input-group-text { border-radius: 10px 0 0 10px; }
.login-card .form-control { border-radius: 0 10px 10px 0; }

/* Chế độ standalone (đã cài PWA) */
@media (display-mode: standalone) {
    .hide-in-app { display: none !important; }
}

/* ---------- Thanh nhắc lịch gọi ---------- */
.due-bar {
    position: sticky; top: calc(var(--appbar-h) + var(--safe-t)); z-index: 1028;
    margin: 0 0 10px; border-radius: 14px; overflow: hidden;
    background: #fff; border: 1px solid #f5c2c7; box-shadow: 0 4px 14px rgba(220, 53, 69, .15);
}
.due-bar.only-today { border-color: #ffe69c; box-shadow: 0 4px 14px rgba(255, 193, 7, .2); }
.due-bar > summary {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; list-style: none;
    background: #dc3545; color: #fff; font-size: .92rem;
}
.due-bar.only-today > summary { background: #f59e0b; color: #1f2937; }
.due-bar > summary::-webkit-details-marker { display: none; }
.due-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.22); flex: 0 0 auto; animation: due-ring 2.4s ease-in-out infinite; transform-origin: 50% 10%; }
.due-text { flex: 1 1 auto; min-width: 0; }
.due-chev { transition: transform .2s; }
.due-bar[open] .due-chev { transform: rotate(180deg); }
.due-list { max-height: 48vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.due-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 12px; border-top: 1px solid var(--c-line); }
.due-main { flex: 1 1 auto; min-width: 0; color: var(--c-text); text-decoration: none; display: block; }
.due-name { display: block; font-weight: 700; line-height: 1.25; word-break: break-word; }
.due-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .78rem; margin-top: 2px; }
.due-call { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #198754; color: #fff; text-decoration: none; }
.due-call:active { background: #146c43; }
.due-more { padding: 8px 12px; font-size: .78rem; color: var(--c-muted); border-top: 1px solid var(--c-line); text-align: center; }
@keyframes due-ring { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(14deg); } 80% { transform: rotate(-12deg); } 85% { transform: rotate(8deg); } 90% { transform: rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { .due-ic { animation: none; } }
@media (min-width: 992px) { .due-bar { max-width: 760px; } }

/* ==========================================================
   Bảng màu dịu cho thẻ khách: 1 màu nhấn (nút Gọi, xanh lá),
   còn lại trắng / xám. Màu chỉ dùng để báo hiệu (quá hạn, trạng thái).
   ========================================================== */
.cust-card { border-left-width: 4px; }
.cust-card.st-chua-goi { border-left-color: #cbd2dc; }
.cust-card.st-chua-nghe { border-left-color: #f2b441; }
.cust-card.st-dang-lam, .cust-card.st-khao-sat { border-left-color: #5b9bff; }
.cust-card.st-ky-hd, .cust-card.st-hoan-thanh { border-left-color: #3fa66b; }
.cust-card.st-huy { border-left-color: #b8bec8; }
.cust-card.is-due { box-shadow: 0 0 0 1.5px rgba(220,53,69,.45), 0 2px 8px rgba(17,24,39,.05); }

/* Nút phụ (SĐT 2, Zalo, Facebook): trắng, viền xám, chỉ biểu tượng có màu nhẹ */
.cc-actions .btn:not(.btn-call) {
    background: #fff; border: 1px solid #d5dbe3; color: #1f2937; font-weight: 600;
}
.cc-actions .btn:not(.btn-call):active { background: #f3f5f8; }
.cc-actions .btn:not(.btn-call) i { color: #8a93a2; }
.cc-actions .btn.btn-zalo i { color: #0068ff; }
.cc-actions .btn.btn-fb i { color: #1877f2; }
.cc-actions .btn-call { font-size: 1rem; }

/* Huy hiệu: nền nhạt, chữ đậm hơn nền một chút */
.cc-badges .badge { font-weight: 600; font-size: .76rem; border: 0; padding: .4em .7em; }
.cc-badges .bg-secondary { background: #eef1f5 !important; color: #4b5563 !important; }
.cc-badges .bg-warning   { background: #fff4d6 !important; color: #8a5a00 !important; }
.cc-badges .bg-danger    { background: #fde8ea !important; color: #b02a37 !important; }
.cc-badges .bg-info      { background: #e1f3f9 !important; color: #0b6b85 !important; }
.cc-badges .bg-success   { background: #e3f4ea !important; color: #146c43 !important; }
.cc-badges .bg-primary-subtle { background: #eef1f5 !important; color: #4b5563 !important; border: 0 !important; }

/* Ô đổi trạng thái: trung tính (màu trạng thái đã có ở viền trái) */
.select-status {
    background-color: #fff !important; color: #1f2937 !important;
    border: 1px solid #d5dbe3 !important; font-weight: 600;
}

/* Nút Gọi / Hẹn: viền xanh, nền trắng */
.cc-foot .btn-edit { background: #fff; border: 1.5px solid var(--c-primary); color: var(--c-primary); }
.cc-foot .btn-edit:active { background: #e7f1ff; }

/* Nhật ký gọi gần nhất: dịu hơn */
.cc-log { background: #f7f8fa; }
.cc-log .when { color: #4b5563; }

/* ==========================================================
   Nền dịu mắt + nút gọn hơn
   ========================================================== */
:root { --c-bg: #e8edf4; }
body { background: var(--c-bg); }

/* Mỗi khách là một ô nền xanh nhạt, các phần tử bên trong màu trắng */
.cust-card { background: #f3f7fc; border-color: #d6e0ec; box-shadow: 0 1px 3px rgba(40, 60, 90, .08); }
.cust-card.is-highlight { background: #fff8e1; }
.cc-log { background: #fff; border-color: #dfe6ef; }

/* Hàng nút: gọn, xếp ngang theo nội dung thay vì bè full chiều rộng */
.cc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-actions .btn { flex: 0 0 auto; min-height: 40px; padding: 6px 14px; font-size: .92rem; border-radius: 10px; }

/* Nút gọi: xanh lá nhạt, không còn khối đặc to */
.cc-actions .btn-call {
    grid-column: auto; background: #dff3e8; border: 1px solid #b7dfc8; color: #146c43;
    font-size: .98rem; font-weight: 700;
}
.cc-actions .btn-call:active { background: #cbeadb; }
.cc-actions .btn-call i { color: #198754; }

/* Ô trạng thái + nút Gọi/Hẹn thấp hơn một chút */
.cc-foot .btn-edit { min-height: 40px; border-radius: 10px; }
.select-status { min-height: 40px; }

/* ==========================================================
   Nền trang tối #010914
   Ô khách / thẻ vẫn là nền sáng nên chữ bên trong giữ nguyên;
   chỉ chỉnh các chữ nằm trực tiếp trên nền trang.
   ========================================================== */
:root { --c-bg: #010914; }
html, body { background: #010914; }

.select-all { color: #e2e8f0; }
.list-count { color: #94a3b8; }
.empty-state { color: #94a3b8; }
.select-all input { border-color: #64748b; }
.list-toolbar .quick-filter input { background: #fff; }
.alert { border: 0; }

/* Chia trang */
.pager-wrap { margin: 14px 0 18px; }
.pager-info { text-align: center; font-size: .82rem; color: #94a3b8; font-weight: 600; margin-bottom: 8px; }
.pager-wrap .page-link { min-width: 38px; text-align: center; }
.pager-jump { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; font-size: .85rem; color: #94a3b8; font-weight: 600; }
.pager-jump input[type=number] { width: 84px; padding: 3px 8px; border-radius: 8px; border: 1px solid #334155; background: transparent; color: inherit; text-align: center; }

/* Thanh báo đang xem với tư cách nhân viên */
.impersonate-bar {
    position: sticky; top: 0; z-index: 1040; display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin: 0 -12px 8px; padding: 8px 12px; background: #b45309; color: #fff; font-size: .9rem;
}
.impersonate-bar .btn { white-space: nowrap; }
/* Đã bỏ thanh tab cuộn ngang: điều hướng nằm trong menu */
.tab-scroll { display: none !important; }

/* Tên khách: dải màu đậm nhất, sát mép trên và trải hết chiều rộng của ô */
.cust-card > .cc-head {
    width: auto; box-sizing: border-box; align-items: center;
    margin: -12px -12px 0; padding: 11px 14px;
    background: #1e3a8a; border: 0;
    border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
}
.cust-card > .cc-head .form-check-input { margin-top: 0; }
.cust-card > .cc-head .cc-name { color: #fff; }
.cust-card > .cc-head .cc-sub { color: rgba(255,255,255,.72); }

/* Số đếm cạnh mục menu */
.menu-list a .menu-count {
    margin-left: auto; min-width: 34px; padding: 2px 9px; border-radius: 999px; text-align: center;
    background: #eef2f7; color: #475569; font-size: .8rem; font-weight: 700;
}
.menu-list a.active .menu-count { background: var(--c-primary); color: #fff; }

/* Logo King Star (thanh trên + đăng nhập) */
.appbar-brand .logo { background: #fff; }
.appbar-brand .logo img { width: 30px; height: 30px; object-fit: contain; }
.login-logo { background: #fff; box-shadow: 0 8px 20px rgba(13,110,253,.25); border: 1px solid #e3ecff; }
.login-logo img { width: 52px; height: 52px; object-fit: contain; }

/* ---------- Chat Zalo ---------- */
.zc .zc-head { background: #0068ff; color: #fff; align-items: center; gap: 10px; padding: 10px 14px; }
.zc .zc-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: #fff; flex: 0 0 auto; }
.zc .zc-title { min-width: 0; flex: 1 1 auto; }
.zc .zc-sub { opacity: .85; }
.zc-body { background: #e8eef7; padding: 10px 12px; min-height: 40vh; }
.zc-notice { display: none; background: #fff; border-radius: 12px; padding: 12px; font-size: .9rem; margin-bottom: 8px; border: 1px solid #d5e0f3; }
.zc-msgs { display: flex; flex-direction: column; gap: 4px; }
.zc-day { text-align: center; margin: 8px 0 2px; }
.zc-day span { background: rgba(0,0,0,.08); border-radius: 999px; font-size: .72rem; padding: 2px 10px; color: #475569; }
.zc-row { display: flex; }
.zc-row.me { justify-content: flex-end; }
.zc-bub { max-width: 82%; padding: 7px 11px 4px; border-radius: 14px; font-size: .93rem; line-height: 1.35; word-break: break-word; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.zc-row.them .zc-bub { background: #fff; color: #1f2937; border-bottom-left-radius: 4px; }
.zc-row.me .zc-bub { background: #cfe3ff; color: #0f2a5c; border-bottom-right-radius: 4px; }
.zc-time { display: block; text-align: right; font-size: .68rem; color: #64748b; margin-top: 1px; }
.zc-foot { background: #fff; padding: 8px 10px; }
.zc-form { display: none; width: 100%; gap: 8px; align-items: flex-end; margin: 0; }
.zc-form textarea { resize: none; border-radius: 18px; max-height: 120px; }
.zc-form .btn { border-radius: 50%; width: 42px; height: 42px; flex: 0 0 auto; }
.zalo-thread { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #e3e8f0; border-radius: 12px; background: #fff; margin-bottom: 8px; text-decoration: none; color: inherit; width: 100%; text-align: left; }
.zalo-thread img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #e8eef7; flex: 0 0 auto; }
.zalo-thread .zt-main { min-width: 0; flex: 1 1 auto; }
.zalo-thread .zt-last { color: #64748b; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zalo-thread .zt-unread { background: #dc3545; color: #fff; border-radius: 999px; font-size: .75rem; font-weight: 700; min-width: 22px; text-align: center; padding: 2px 7px; }
.zalo-qr { width: 240px; max-width: 70vw; background: #fff; padding: 10px; border-radius: 12px; border: 1px solid #d5e0f3; }

/* ---------- AI ---------- */
.ai-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: .82rem; color: #fff; background: var(--c, #94a3b8); }
.cust-card .ai-pill { font-size: .72rem; padding: 2px 8px; }
.ai-bar { flex: 1 1 120px; max-width: 220px; height: 8px; border-radius: 99px; background: rgba(127,127,127,.2); overflow: hidden; }
.ai-bar i { display: block; height: 100%; border-radius: 99px; }
.ai-sec { padding: 12px 0; border-bottom: 1px solid rgba(127,127,127,.2); }
.ai-sec:last-child { border-bottom: 0; }
.ai-h { font-weight: 800; margin-bottom: 6px; }
.ai-propose { background: rgba(25,135,84,.07); border-radius: 12px; padding: 12px; border: 1px solid rgba(25,135,84,.25); margin: 8px 0; }
.ai-row { margin-bottom: 10px; }
.ai-kv { display: flex; gap: 8px; padding: 3px 0; font-size: .92rem; }
.ai-kv span { flex: 0 0 150px; color: #6b7280; }
.ai-ul, .ai-ol { margin: 2px 0 0; padding-left: 20px; font-size: .92rem; }
.ai-draft { background: rgba(0,104,255,.07); border: 1px solid rgba(0,104,255,.25); border-radius: 12px; padding: 10px 12px; }
.ai-hist { padding: 4px 0; font-size: .88rem; }
.cc-actions .btn-ai i { color: #7c3aed; }

/* ===== Chat Zalo đầy đủ (.zx) ===== */
.zx { --zb: #0068ff; display: flex; height: 100%; min-height: 0; background: #fff; color: #1f2937; position: relative; overflow: hidden; }
.zx * { box-sizing: border-box; }
.zx-iconbtn { border: 0; background: transparent; color: #475569; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; text-decoration: none; cursor: pointer; }
.zx-iconbtn:hover { background: rgba(0,0,0,.07); color: #0f172a; }
.zx-iconbtn.on { background: #dbeafe; color: var(--zb); }
.zx-list { width: 320px; flex: 0 0 320px; border-right: 1px solid #e3e8f0; display: flex; flex-direction: column; min-height: 0; background: #fff; }
.zx-list-head { display: flex; align-items: center; gap: 4px; padding: 10px; border-bottom: 1px solid #eef2f7; }
.zx-search { position: relative; flex: 1 1 auto; }
.zx-search i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: .8rem; }
.zx-search input { width: 100%; border: 0; background: #eef2f7; border-radius: 18px; padding: 8px 12px 8px 30px; font-size: .9rem; outline: none; }
.zx-threads { overflow-y: auto; flex: 1 1 auto; }
.zx-th { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.zx-th:hover { background: #f4f7fb; }
.zx-th.active { background: #e5efff; }
.zx-th img, .zx-ph { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: #dbe5f5; }
.zx-ph { display: inline-flex; align-items: center; justify-content: center; color: #7b8fb0; }
.zx-th-main { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; }
.zx-th-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zx-zn { color: #94a3b8; font-weight: 400; }
.zx-th-last { color: #64748b; font-size: .83rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zx-th.unread .zx-th-last, .zx-th.unread .zx-th-name { color: #0f172a; font-weight: 700; }
.zx-th-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: .72rem; color: #94a3b8; }
.zx-th-meta b { background: #dc3545; color: #fff; border-radius: 999px; min-width: 20px; text-align: center; padding: 1px 6px; font-size: .72rem; }
.zx-none { padding: 18px 14px; color: #94a3b8; font-size: .88rem; text-align: center; width: 100%; grid-column: 1 / -1; }
.zx-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; min-height: 0; position: relative; background: #e8eef7; }
.zx-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #fff; border-bottom: 1px solid #e3e8f0; min-height: 56px; }
.zx-back { display: none; }
.zx-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.zx-title { min-width: 0; flex: 1 1 auto; }
.zx-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zx-sub { font-size: .76rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.zx-notice { display: none; background: #fff; border-bottom: 1px solid #d5e0f3; padding: 12px 14px; font-size: .9rem; }
.zx-body { flex: 1 1 auto; overflow-y: auto; padding: 10px 14px; min-height: 0; position: relative; }
.zx-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #94a3b8; font-size: 1rem; pointer-events: none; }
.zx-empty i { font-size: 3rem; opacity: .5; }
.zx-older { display: block; margin: 0 auto 8px; border: 0; background: #fff; border-radius: 999px; padding: 4px 14px; font-size: .78rem; color: var(--zb); }
.zx-msgs { display: flex; flex-direction: column; gap: 3px; }
.zx-day { text-align: center; margin: 10px 0 4px; }
.zx-day span { background: rgba(0,0,0,.09); border-radius: 999px; font-size: .72rem; padding: 2px 10px; color: #475569; }
.zx-row { display: flex; position: relative; align-items: flex-end; gap: 6px; }
.zx-row.me { justify-content: flex-end; flex-direction: row; }
.zx-bub { max-width: 72%; padding: 7px 11px 4px; border-radius: 14px; font-size: .94rem; line-height: 1.38; word-break: break-word; box-shadow: 0 1px 1px rgba(0,0,0,.08); position: relative; }
.zx-row.them .zx-bub { background: #fff; border-bottom-left-radius: 4px; }
.zx-row.me .zx-bub { background: #cfe3ff; color: #0f2a5c; border-bottom-right-radius: 4px; }
.zx-bub.zx-plain { background: transparent !important; box-shadow: none; padding: 0 0 2px; }
.zx-bub.zx-plain .zx-time { background: rgba(0,0,0,.45); color: #fff; border-radius: 8px; padding: 0 6px; display: inline-block; float: right; margin-top: 2px; }
.zx-recalled { font-style: italic; color: #94a3b8 !important; background: transparent !important; border: 1px dashed #c3cfe2; box-shadow: none; }
.zx-time { display: block; text-align: right; font-size: .68rem; color: #64748b; margin-top: 1px; }
.zx-tick { font-size: .6rem; opacity: .6; }
.zx-seen { color: var(--zb); font-weight: 600; }
.zx-img { max-width: 260px; max-height: 320px; border-radius: 12px; display: block; cursor: zoom-in; object-fit: cover; }
.zx-sticker-img { width: 130px; height: 130px; object-fit: contain; display: block; }
.zx-cap { margin-top: 4px; }
.zx-muted { color: #94a3b8; }
.zx-bub video { max-width: 260px; border-radius: 10px; display: block; }
.zx-bub audio { max-width: 240px; height: 36px; }
.zx-file { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 200px; }
.zx-file > i:first-child { font-size: 1.6rem; color: var(--zb); }
.zx-file span { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.zx-file b { word-break: break-all; font-size: .9rem; }
.zx-file small { color: #64748b; }
.zx-linkcard { display: flex; gap: 8px; color: inherit; text-decoration: none; background: rgba(0,0,0,.04); border-radius: 8px; padding: 6px; }
.zx-linkcard img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; }
.zx-linkcard span { display: flex; flex-direction: column; min-width: 0; }
.zx-linkcard small { color: #64748b; }
.zx-quote { border-left: 3px solid var(--zb); background: rgba(0,0,0,.05); border-radius: 6px; padding: 3px 8px; margin-bottom: 4px; font-size: .82rem; display: flex; flex-direction: column; }
.zx-quote span { color: #475569; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.zx-quote-img { width: 34px; height: 34px; object-fit: cover; border-radius: 4px; vertical-align: middle; margin-right: 4px; float: left; }
.zx-rx { position: absolute; right: 8px; bottom: -11px; background: #fff; border: 1px solid #e3e8f0; border-radius: 999px; font-size: .8rem; padding: 0 6px; box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.zx-row:has(.zx-rx) { margin-bottom: 12px; }
.zx-act { display: none; align-items: center; gap: 2px; background: #fff; border-radius: 999px; padding: 2px 4px; box-shadow: 0 1px 4px rgba(0,0,0,.18); align-self: center; order: -1; }
.zx-row.me .zx-act { order: -1; }
.zx-row.them .zx-act { order: 2; }
.zx-act button { border: 0; background: transparent; width: 28px; height: 28px; border-radius: 50%; font-size: .85rem; color: #475569; }
.zx-act button:hover { background: #eef2f7; }
@media (hover: hover) { .zx-row:hover .zx-act { display: inline-flex; } }
.zx-row.tap .zx-act { display: inline-flex; }
.zx-rxpick { position: absolute; bottom: 100%; z-index: 5; background: #fff; border-radius: 999px; padding: 3px 6px; display: flex; gap: 2px; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.zx-row.me .zx-rxpick { right: 10px; } .zx-row.them .zx-rxpick { left: 10px; }
.zx-rxpick button { border: 0; background: transparent; font-size: 1.3rem; width: 34px; height: 34px; border-radius: 50%; transition: transform .1s; }
.zx-rxpick button:hover { transform: scale(1.25); }
.zx-typing { padding: 2px 16px 4px; font-size: .8rem; color: #2563eb; font-weight: 600; background: transparent; }
.zx-typing::after { content: ''; display: inline-block; width: 1.2em; text-align: left; animation: zxDots 1.2s steps(4, end) infinite; vertical-align: bottom; }
@keyframes zxDots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.zx-reply { display: flex; align-items: center; background: #fff; border-top: 1px solid #e3e8f0; padding: 6px 10px 6px 14px; border-left: 4px solid var(--zb); }
.zx-reply[hidden], .zx-tray[hidden], .zx-panel[hidden], .zx-compose[hidden], .zx-drop[hidden], .zx-typing[hidden], .zx-info[hidden], .zx-older[hidden] { display: none !important; }
.zx-reply-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; font-size: .82rem; }
.zx-reply-t span { color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zx-tray { display: flex; gap: 8px; padding: 8px 12px; background: #fff; border-top: 1px solid #e3e8f0; overflow-x: auto; }
.zx-tf { position: relative; display: flex; align-items: center; gap: 6px; background: #eef2f7; border-radius: 10px; padding: 4px 24px 4px 4px; flex: 0 0 auto; max-width: 180px; font-size: .78rem; }
.zx-tf img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.zx-tf > i { font-size: 1.4rem; color: var(--zb); padding: 0 8px; }
.zx-tf span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zx-tf button { position: absolute; top: 0; right: 2px; border: 0; background: transparent; font-size: 1.1rem; color: #64748b; }
.zx-panel { background: #fff; border-top: 1px solid #e3e8f0; max-height: 260px; overflow-y: auto; }
.zx-emoji { display: flex; flex-wrap: wrap; padding: 6px; }
.zx-emoji:not([hidden]) { display: flex; }
.zx-emoji button { border: 0; background: transparent; font-size: 1.4rem; width: 40px; height: 40px; border-radius: 8px; }
.zx-emoji button:hover { background: #eef2f7; }
.zx-st-bar { padding: 8px 10px 4px; position: sticky; top: 0; background: #fff; }
.zx-st-bar input { width: 100%; border: 0; background: #eef2f7; border-radius: 18px; padding: 7px 12px; outline: none; font-size: .9rem; }
.zx-st-words { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 10px; }
.zx-st-words button { border: 0; background: #e5efff; color: var(--zb); border-radius: 999px; padding: 2px 10px; font-size: .78rem; }
.zx-st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; padding: 6px 10px 10px; }
.zx-st-grid button { border: 0; background: transparent; border-radius: 10px; padding: 2px; }
.zx-st-grid button:hover { background: #eef2f7; }
.zx-st-grid img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.zx-tpl-list { padding: 6px; }
.zx-tpl-item { display: flex; align-items: flex-start; border-radius: 10px; }
.zx-tpl-item:hover { background: #f4f7fb; }
.zx-tpl-use { flex: 1 1 auto; text-align: left; border: 0; background: transparent; padding: 6px 8px; display: flex; flex-direction: column; min-width: 0; }
.zx-tpl-use span { color: #64748b; font-size: .83rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.zx-tpl-del { border: 0; background: transparent; font-size: 1.2rem; color: #94a3b8; width: 32px; }
.zx-tpl-add { border-top: 1px solid #eef2f7; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.zx-tpl-add input, .zx-tpl-add textarea { border: 1px solid #dbe3ef; border-radius: 8px; padding: 6px 10px; font-size: .88rem; resize: none; }
.zx-compose { background: #fff; border-top: 1px solid #e3e8f0; padding: 4px 8px 8px; margin: 0; }
.zx-tools { display: flex; gap: 2px; }
.zx-input { display: flex; align-items: flex-end; gap: 8px; }
.zx-input textarea { flex: 1 1 auto; resize: none; border: 1px solid #dbe3ef; border-radius: 20px; padding: 8px 14px; font-size: .95rem; max-height: 140px; outline: none; line-height: 1.35; }
.zx-input textarea:focus { border-color: var(--zb); }
.zx-send { border: 0; background: var(--zb); color: #fff; width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; }
.zx-send:disabled { opacity: .5; }
.zx-drop { position: absolute; inset: 0; background: rgba(0,104,255,.18); border: 3px dashed var(--zb); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--zb); z-index: 20; pointer-events: none; }
.zx-info { width: 280px; flex: 0 0 280px; border-left: 1px solid #e3e8f0; background: #fff; overflow-y: auto; padding: 12px 14px; font-size: .88rem; }
.zx-ihead { display: flex; align-items: center; justify-content: space-between; font-weight: 700; margin-bottom: 8px; }
.zx-iname { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.zx-irow { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0; color: #334155; }
.zx-irow i { color: #94a3b8; width: 16px; text-align: center; margin-top: 3px; }
.zx-ilv { margin-top: 10px; padding: 6px 10px; border-radius: 8px; background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); }
.zx-isum { margin-top: 6px; color: #475569; }
.zx-ilabel { margin-top: 12px; font-weight: 700; font-size: .78rem; text-transform: uppercase; color: #94a3b8; }
.zx-ilog { margin-top: 4px; white-space: pre-wrap; color: #334155; max-height: 220px; overflow-y: auto; }
.zx-lb { position: fixed; inset: 0; background: rgba(0,0,0,.88); z-index: 3000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; cursor: zoom-out; }
.zx-lb img { max-width: 94vw; max-height: 84vh; object-fit: contain; }
.zx-lb-dl { color: #fff; }
/* cửa sổ nổi */
.zx-modal .modal-content { height: min(86vh, 820px); overflow: hidden; border-radius: 14px; }
.zx-modal .zx-host { height: 100%; display: flex; }
.zx-modal .zx { width: 100%; }
.zx-modal .zx-list { display: none; width: 280px; flex-basis: 280px; }
.zx-modal .zx-list.force { display: flex; }
.zx-page-host { height: calc(100vh - 250px); min-height: 480px; border: 1px solid #e3e8f0; border-radius: 12px; overflow: hidden; }
@media (max-width: 991.98px) {
    .zx-info { position: absolute; right: 0; top: 0; bottom: 0; z-index: 10; box-shadow: -4px 0 14px rgba(0,0,0,.15); }
    .zx-modal .modal-content { height: 100vh; border-radius: 0; }
}
@media (max-width: 767.98px) {
    .zx-list { width: 100%; flex-basis: 100%; }
    .zx:not(.show-chat) .zx-main { display: none; }
    .zx.show-chat .zx-list { display: none; }
    .zx-back { display: inline-flex; }
    .zx-modal .zx-list { display: none; }
    .zx-bub { max-width: 84%; }
    .zx-page-host { height: calc(100vh - 130px); }
}
.zx-modal .zx-back { display: none !important; }
.zx-modal .zx:not(.show-chat) .zx-main { display: flex; }
.zx-head, .zx-notice, .zx-typing, .zx-reply, .zx-tray, .zx-panel, .zx-compose { flex-shrink: 0; }
.zx-panel { height: 260px; }
.zx-emoji { align-content: flex-start; }
/* Cố vấn bán hàng */
.ai-stages { display: flex; gap: 4px; flex-wrap: wrap; }
.ai-stg { font-size: .72rem; padding: 3px 9px; border-radius: 999px; background: #eef2f7; color: #64748b; }
.ai-stg.done { background: #dcfce7; color: #166534; }
.ai-stg.now { background: #0d6efd; color: #fff; font-weight: 700; }
.ai-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 14px; font-size: .85rem; }
.ai-kv span { display: block; color: #94a3b8; font-size: .72rem; text-transform: uppercase; }
.ai-bar2 { border-left: 3px solid #cbd5e1; padding: 2px 0 2px 10px; margin: 6px 0; font-size: .9rem; }
.ai-todo { display: flex; gap: 8px; align-items: flex-start; margin: 5px 0; font-size: .9rem; cursor: pointer; }
.ai-todo input { margin-top: 3px; flex: 0 0 auto; }
.ai-todo em { color: #64748b; font-style: normal; }
.ai-pri { font-style: normal; font-size: .68rem; font-weight: 700; color: var(--c); border: 1px solid var(--c); border-radius: 999px; padding: 0 6px; margin-left: 4px; white-space: nowrap; }
.ai-script { background: #f8fafc; border-radius: 10px; padding: 8px 12px; }
/* Chuyên gia chốt sale: hồ sơ tâm lý */
.atl-key { margin-top: 10px; background: #fff7ed; border: 1px solid #fed7aa; border-left: 4px solid #f97316; border-radius: 10px; padding: 8px 12px; color: #7c2d12; }
.atl-h { font-weight: 700; font-size: .85rem; margin-bottom: 4px; }
.atl-box { background: #f5f3ff; border: 1px solid #ddd6fe; border-radius: 12px; padding: 10px 12px; font-size: .9rem; }
.atl-type { display: inline-block; background: #7c3aed; color: #fff; border-radius: 999px; padding: 1px 10px; font-size: .75rem; font-weight: 700; margin-right: 4px; }
.atl-meters { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: .8rem; }
.atl-meters > div { display: flex; align-items: center; gap: 6px; }
.atl-meters span { color: #64748b; }
.atl-m { width: 70px; height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; }
.atl-m i { display: block; height: 100%; background: linear-gradient(90deg, #f97316, #16a34a); }
.atl-card { border: 1px solid #e2e8f0; border-radius: 10px; padding: 8px 10px; margin: 6px 0; font-size: .9rem; background: #fff; }
.atl-lev { border-left: 3px solid #16a34a; }
.atl-badge { display: inline-block; font-size: .68rem; font-weight: 700; color: var(--c); border: 1px solid var(--c); border-radius: 999px; padding: 0 7px; vertical-align: 1px; }
.atl-q { font-style: italic; color: #475569; font-size: .8rem; margin-top: 4px; padding-left: 8px; border-left: 2px solid #cbd5e1; }
.atl-say { margin-top: 6px; background: rgba(0,104,255,.06); border: 1px dashed rgba(0,104,255,.35); border-radius: 8px; padding: 6px 10px; font-size: .88rem; color: #0f172a; }
.lt-chat { display: flex; flex-direction: column; gap: 8px; max-height: 55vh; overflow-y: auto; padding: 6px 2px; }
.lt-b { max-width: 82%; padding: 8px 12px; border-radius: 14px; font-size: .95rem; line-height: 1.35; white-space: pre-wrap; }
.lt-me { align-self: flex-end; background: #0d6efd; color: #fff; border-bottom-right-radius: 4px; }
.lt-kh { align-self: flex-start; background: #f1f5f9; color: #0f172a; border-bottom-left-radius: 4px; }
.lt-kh .atl-tone { color: #7c3aed; }
.lt-typing { color: #94a3b8; letter-spacing: 3px; }
.lt-meter { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: #475569; margin-bottom: 8px; }
.lt-skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 6px 16px; font-size: .82rem; }
.lt-skills > div { display: grid; grid-template-columns: 100px 1fr 24px; align-items: center; gap: 6px; }
.lt-foot { display: block; }
.hq-style { background: #faf5ff; border-radius: 10px; padding: 8px 12px; }
.hq-q { border-left: 3px solid #cbd5e1; padding: 2px 0 2px 8px; margin: 4px 0; }
.hq-q.good { border-color: #16a34a; } .hq-q.bad { border-color: #dc2626; }
.atl-tone { color: #7c3aed; font-style: italic; font-size: .85em; }
.atl-voice { background: #faf5ff; border-radius: 8px; padding: 5px 9px; color: #3b0764; }
.gl-voice { background: #faf5ff; border-radius: 8px; padding: 6px 10px; color: #3b0764; font-size: .88rem; }
.atl-unv { font-size: .66rem; font-weight: 700; color: #b45309; background: #fef3c7; border-radius: 999px; padding: 0 6px; white-space: nowrap; }
.atl-step { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; font-size: .9rem; cursor: pointer; }
.atl-step input { margin-top: 3px; flex: 0 0 auto; }
.atl-step i { color: #2563eb; }
.atl-deep summary, .ai-deal details > summary { cursor: pointer; }

.zx-wait { font-style: normal; background: #fee2e2; color: #b91c1c; border-radius: 999px; padding: 0 7px; font-size: .68rem; font-weight: 700; white-space: nowrap; }
.ai-cad { color: #475569; }

/* ==========================================================
   Gọi liên tục · Báo giá · Lịch hẹn · Chuông thông báo
   ========================================================== */
.page-title { color: #e2e8f0; font-weight: 700; }
.page-title i { color: #60a5fa; }
.page-sub { color: #94a3b8; font-size: .875rem; }
body > .container-fluid > h5.fw-bold, body > .container-fluid > h5.fw-bold + .text-muted { color: #e2e8f0 !important; }
body > .container-fluid > h5.fw-bold + .text-muted { color: #94a3b8 !important; }
.c6-card { background: #fff; border: 1px solid #dfe6ef; border-radius: var(--radius); padding: 14px 16px; }
.c6-quick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* chuông */
.c6-bell { position: relative; }
.c6-bell-n { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ef4444; color: #fff; font-size: .68rem; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #0b5ed7; }
.c6-panel { position: fixed; z-index: 1060; top: calc(var(--appbar-h) + var(--safe-t) + 4px); right: 10px; width: min(380px, calc(100vw - 20px)); max-height: 70vh; overflow-y: auto; background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.c6-pn-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid #e5e9f0; position: sticky; top: 0; background: #fff; }
.c6-pn-empty { padding: 18px 14px; color: #64748b; font-size: .9rem; }
.c6-pn-item { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #f1f5f9; color: #1f2937; text-decoration: none; font-size: .9rem; }
.c6-pn-item i { color: #64748b; margin-top: 3px; width: 16px; text-align: center; }
.c6-pn-item.unread { background: #eff6ff; }
.c6-pn-item.unread i { color: #0d6efd; }
.c6-pn-item small { display: block; color: #94a3b8; font-size: .75rem; }
.c6-pn-item:hover { background: #f8fafc; color: #111827; }

/* gọi liên tục */
.gl-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.gl-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.gl-stats span { background: rgba(255,255,255,.08); color: #e2e8f0; border: 1px solid rgba(255,255,255,.12); border-radius: 99px; padding: 3px 10px; font-size: .82rem; }
.gl-stats b { color: #fff; }
.gl-stats small { color: #94a3b8; align-self: center; }
.gl-queue { color: #94a3b8; margin-bottom: 10px; }
.gl-queue span { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; color: #cbd5e1; }
.gl-queue span i { color: var(--c); }
.gl-main { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.gl-main > * { min-width: 0; }
@media (min-width: 992px) { .gl-main { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } }
.gl-card { background: #fff; border-radius: 16px; padding: 16px; min-height: 240px; }
.gl-empty { padding: 40px 10px; text-align: center; color: #64748b; }
.gl-why { display: inline-block; background: #f1f5f9; border: 1px solid #e2e8f0; }
.gl-why { background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 35%, #fff); border-radius: 99px; padding: 3px 12px; font-size: .82rem; font-weight: 700; margin-bottom: 8px; }
.gl-head { margin-bottom: 8px; }
.gl-name { font-size: 1.4rem; font-weight: 800; line-height: 1.2; }
.gl-sub { color: #64748b; font-size: .85rem; margin: 2px 0 6px; }
.gl-note-warn { background: #fff7ed; color: #9a3412; border-radius: 10px; padding: 6px 10px; font-size: .85rem; margin-bottom: 6px; }
.gl-chip-line { font-size: .85rem; color: #334155; margin-bottom: 4px; }
.gl-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.gl-actions .btn { border-radius: 12px; }
.gl-callbtn { flex: 1 1 100%; font-weight: 800; font-size: 1.15rem; padding: 12px; }
@media (min-width: 576px) { .gl-callbtn { flex: 0 0 auto; } }
.gl-meta { font-size: .9rem; color: #334155; margin-bottom: 6px; }
.gl-meta i { color: #94a3b8; margin-right: 6px; }
.gl-quote { background: #f1f5f9; border-radius: 10px; padding: 8px 12px; font-size: .9rem; color: #334155; white-space: pre-line; }
.gl-tips, .gl-log { margin-top: 10px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 8px 12px; font-size: .9rem; }
.gl-tips summary, .gl-log summary { font-weight: 700; cursor: pointer; color: #1e3a8a; }
.gl-log summary { color: #334155; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl-log > div { padding: 4px 0; border-top: 1px dashed #e2e8f0; }
.gl-day { background: #fff; border-radius: 14px; padding: 10px 14px; margin: 8px 0 10px; }
.gl-day > summary { cursor: pointer; font-weight: 700; color: #1e3a8a; }
.gl-day-row { display: flex; gap: 10px; align-items: flex-start; padding: 6px 4px; border-bottom: 1px solid #f1f5f9; }
.gl-day-row[role=button]:hover { background: #f8fafc; }
.gl-day-t { flex: 0 0 48px; font-weight: 700; color: #0d6efd; }
.gl-gold { margin-top: 6px; font-size: .88rem; background: #fefce8; border: 1px solid #fde68a; color: #713f12; border-radius: 10px; padding: 5px 10px; }
.gl-gold.now { background: #dcfce7; border-color: #86efac; color: #14532d; }
.gl-key { background: #fff7ed; border-left: 3px solid #f97316; border-radius: 8px; padding: 6px 10px; margin-top: 6px; color: #7c2d12; }
.gl-kieu { display: inline-block; background: #ede9fe; color: #5b21b6; border-radius: 999px; padding: 0 9px; font-size: .75rem; font-weight: 700; margin-right: 4px; }
.gl-ask { display: flex; flex-wrap: wrap; gap: 6px; }
.gl-ask span { background: #fff; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 2px 8px; font-size: .8rem; color: #475569; }
.gl-ask span i { margin-right: 4px; color: #f59e0b; }
.gl-ask span.ok { border-style: solid; border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.gl-ask span.ok i { color: #16a34a; }
.gl-out-h { margin-top: 14px; font-weight: 700; font-size: .85rem; color: #475569; text-transform: uppercase; letter-spacing: .03em; }
.gl-out { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 6px; border-radius: 12px; transition: box-shadow .3s; }
@media (min-width: 768px) { .gl-out { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gl-out .btn { font-weight: 700; border-radius: 12px; min-height: 48px; }
.gl-pulse { box-shadow: 0 0 0 4px rgba(13,110,253,.45); }
.gl-form { margin-top: 10px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px; }
.gl-mic.active { background: #dc2626; color: #fff; border-color: #dc2626; }
.gl-side .gl-box { background: #fff; border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.gl-box-h { font-weight: 700; margin-bottom: 6px; }
.gl-nx { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px solid #f1f5f9; }
.gl-nx i { margin-top: 3px; }
.gl-ai { position: fixed; z-index: 1050; right: 12px; bottom: calc(var(--bottom-h) + var(--safe-b) + 12px); width: min(360px, calc(100vw - 24px)); background: #fff; border-radius: 14px; padding: 12px 14px; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
@media (min-width: 992px) { .gl-ai { bottom: 16px; } }

/* báo giá */
.bg-pk { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .bg-pk { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bg-pk-item { display: block; border: 1px solid #dfe6ef; border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.bg-pk-item.hl { border-color: #0d6efd; background: #f5f9ff; }
.bg-row { display: flex; gap: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid #eef2f7; }
.bg-row-main { min-width: 0; flex: 1 1 320px; }
.bg-row-act { display: flex; gap: 6px; flex-wrap: wrap; }

/* lịch hẹn */
.lh-day { font-weight: 700; color: #334155; font-size: .85rem; margin: 12px 0 4px; text-transform: uppercase; letter-spacing: .03em; }
.lh-day.today { color: #0d6efd; }
.lh-day span { color: #94a3b8; font-weight: 500; }
.lh-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid #eef2f7; flex-wrap: wrap; }
.lh-time { flex: 0 0 54px; text-align: center; background: #f1f5f9; border-radius: 10px; padding: 4px 0; }
.lh-time b { display: block; font-size: 1rem; }
.lh-time small { color: #64748b; font-size: .75rem; }
.lh-body { flex: 1 1 220px; min-width: 0; }
.lh-act { display: flex; gap: 6px; flex-wrap: wrap; }
.lh-type { display: inline-block; font-size: .75rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: #e0e7ff; color: #3730a3; }
.lh-khao_sat { background: #dcfce7; color: #166534; }
.lh-xem_ct { background: #fef3c7; color: #92400e; }
.lh-ky_hd { background: #fee2e2; color: #991b1b; }

@media (max-width: 575.98px) { .lh-act { padding-left: 66px; } }
.gl-plan { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 8px 10px; margin: 6px 0 8px; }
.gl-plan-f { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gl-plan-f .form-select { max-width: 170px; }
.gl-plan-f input[type=datetime-local] { max-width: 220px; }
.ai-plan .ai-h .badge { font-weight: 600; margin-left: 6px; }

/* Lọc theo mức khách + sắp xếp */
.c6-lf { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.c6-lf-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; max-width: 100%; }
.c6-lf-chips::-webkit-scrollbar { display: none; }
.c6-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #e2e8f0; font-size: .85rem; text-decoration: none; white-space: nowrap; }
.c6-chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--c, #94a3b8); }
.c6-chip b { font-weight: 700; color: #fff; }
.c6-chip:hover { color: #fff; background: rgba(255,255,255,.16); }
.c6-chip.on { background: #fff; color: #0f172a; border-color: #fff; }
.c6-chip.on b { color: #0f172a; }
.c6-chip.zero { opacity: .5; }
.c6-lf-sort { display: inline-flex; align-items: center; gap: 6px; color: #94a3b8; margin: 0; }
.c6-lf-sort .form-select { min-width: 220px; }
.c6-when { color: #fde68a; font-weight: 600; }
.nav-pills.flex-nowrap .nav-link { white-space: nowrap; }

/* Xóa khách: toast có nút Hoàn tác */
.xk-undo {
    position: fixed; left: 12px; right: 12px; margin: 0 auto; width: fit-content; max-width: 560px;
    bottom: calc(var(--bottom-h) + var(--safe-b) + 16px); transform: translateY(20px);
    padding: 8px 8px 8px 16px; border-radius: 12px; background: #111827; color: #fff; font-size: .9rem;
    display: flex; align-items: center; gap: 12px; opacity: 0; pointer-events: none; transition: .25s; z-index: 2001;
}
.xk-undo .btn { flex: 0 0 auto; white-space: nowrap; }
.xk-undo.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
@media (min-width: 992px) { .xk-undo { bottom: 24px; } }

/* Bảng AI: thêm ghi âm (nhiều file, mỗi file một cuộc gọi) */
.ai-drop { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 2px dashed #93c5fd; border-radius: 14px; background: rgba(59,130,246,.06); color: #1d4ed8; cursor: pointer; margin: 0; transition: .15s; }
.ai-drop:hover, .ai-drop.is-over { background: rgba(59,130,246,.14); border-color: #3b82f6; }
.ai-drop > i { font-size: 1.8rem; flex: 0 0 auto; }
.ai-drop .small { color: #475569; }
.ai-file-in { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ai-q { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.ai-q:empty { display: none; }
.ai-q-row { border: 1px solid rgba(127,127,127,.25); border-left: 4px solid #94a3b8; border-radius: 10px; padding: 8px 10px; font-size: .86rem; }
.ai-q-tai, .ai-q-ai { border-left-color: #3b82f6; }
.ai-q-xong { border-left-color: #16a34a; }
.ai-q-loi { border-left-color: #dc2626; }
.ai-q-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.ai-q-at { color: #2563eb; font-weight: 600; white-space: nowrap; }
.ai-q-name { flex: 1 1 120px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #64748b; }
.ai-q-st { margin-top: 4px; }

/* Chat Zalo: AI gợi ý trả lời khi khách nhắn đến */
.zx-aib { flex-shrink: 0; background: #fff; border-top: 1px solid #e3e8f0; border-left: 4px solid #7c3aed; font-size: .88rem; }
.zx-aib[hidden] { display: none !important; }
.zx-aib-head { display: flex; align-items: center; gap: 6px; padding: 2px 4px 2px 10px; min-height: 38px; }
.zx-aib-head > b { color: #5b21b6; white-space: nowrap; }
.zx-aib-ico { color: #7c3aed; }
.zx-aib-sp { flex: 1 1 auto; }
.zx-aib-head .zx-iconbtn { width: 32px; height: 32px; font-size: .85rem; }
.zx-aib-temp { font-size: .72rem; font-weight: 700; color: #fff; background: var(--c, #64748b); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.zx-aib-dirtag { font-size: .72rem; color: #5b21b6; background: #ede9fe; border-radius: 999px; padding: 1px 8px; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zx-aib-peek { display: none; padding: 0 12px 8px; color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.zx-aib.min .zx-aib-peek { display: block; }
.zx-aib.min .zx-aib-body { display: none; }
.zx-aib.min .zx-aib-min i { transform: rotate(180deg); }
.zx-aib.min .zx-aib-head { cursor: pointer; }
.zx-aib-body { max-height: min(46vh, 430px); overflow-y: auto; padding: 0 12px 10px; }
.zx-aib-wait { padding: 4px 0 6px; color: #475569; }
.zx-aib-errtxt { padding: 4px 0 6px; color: #b91c1c; }
.zx-aib-read { margin: 2px 0 6px; color: #1f2937; }
.zx-aib-emo { color: #7c3aed; font-weight: 600; }
.zx-aib-note { margin: 4px 0; padding: 5px 9px; border-radius: 8px; font-size: .84rem; }
.zx-aib-call { background: #ecfdf5; color: #065f46; }
.zx-aib-tel { font-weight: 700; margin-left: 4px; white-space: nowrap; }
.zx-aib-op { background: #fff7ed; color: #9a3412; }
.zx-aib-avoid { background: #f1f5f9; color: #475569; }
.zx-aib-stop { background: #fef2f2; color: #991b1b; }
.zx-aib-opts { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.zx-aib-opt { border: 1px solid #e2e8f0; border-radius: 12px; padding: 8px 10px; background: #fafaff; }
.zx-aib-opt:first-child { border-color: #c4b5fd; background: #f5f3ff; }
.zx-aib-oh { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-bottom: 4px; }
.zx-aib-n { width: 20px; height: 20px; border-radius: 50%; background: #7c3aed; color: #fff; font-size: .72rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; align-self: center; }
.zx-aib-why { color: #64748b; font-size: .8rem; flex: 1 1 200px; }
.zx-aib-txt { background: #cfe3ff; color: #0f2a5c; border-radius: 12px 12px 4px 12px; padding: 7px 11px; line-height: 1.38; font-size: .92rem; }
.zx-aib-warn { color: #b45309; font-size: .8rem; margin-top: 4px; }
.zx-aib-act { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.zx-aib-dir { display: flex; gap: 6px; margin-top: 8px; }
.zx-aib-dir input { flex: 1 1 auto; min-width: 0; border: 1px solid #dbe3ef; border-radius: 18px; padding: 5px 12px; font-size: .86rem; outline: none; }
.zx-aib-dir input:focus { border-color: #7c3aed; }
.zx-aib-auto { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: .8rem; color: #64748b; }
.zx-aib-idle { display: block; width: 100%; border: 0; background: transparent; text-align: left; padding: 9px 12px; color: #5b21b6; font-weight: 600; }
.zx-ai-sg i { color: #7c3aed; }
/* khung thông tin khách: AI theo dõi */
.zx-iai { margin-top: 4px; color: #334155; display: flex; flex-direction: column; gap: 4px; }
.zx-iai-at { font-size: .72rem; color: #94a3b8; }
.zx-iai-l { font-size: .84rem; }
.zx-iai-ok b { color: #15803d; }
.zx-iai-bad b { color: #b91c1c; }
.zx-iai-none { margin-top: 4px; color: #94a3b8; font-size: .82rem; }
.zx-iai-warn { margin-top: 8px; padding: 6px 8px; border-radius: 8px; background: #fef3c7; color: #92400e; font-size: .8rem; }
@media (max-width: 767.98px) { .zx-aib-body { max-height: 40vh; } }

/* Bảng AI: tab có / không có ghi âm */
.ai-rec-tabs { display: flex; gap: 4px; background: #eef2f7; border-radius: 12px; padding: 3px; margin-bottom: 10px; }
.ai-rec-tabs button { flex: 1 1 0; border: 0; background: transparent; border-radius: 9px; padding: 7px 8px; font-weight: 600; font-size: .86rem; color: #475569; white-space: nowrap; }
.ai-rec-tabs button.on { background: #fff; color: #1d4ed8; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.ai-rec-pane[hidden] { display: none !important; }
/* Bảng AI: nhật ký sự kiện */
.ase-day { font-size: .74rem; font-weight: 700; color: #94a3b8; text-transform: uppercase; margin: 10px 0 4px; }
.ase-ev { display: flex; gap: 10px; position: relative; padding-bottom: 10px; }
.ase-ev::before { content: ''; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px; background: rgba(127,127,127,.18); }
.ase-dot { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; color: #fff; background: var(--c, #64748b); z-index: 1; }
.ase-zalo_di .ase-dot { background: #e2e8f0; color: #64748b; }
.ase-main { min-width: 0; flex: 1 1 auto; font-size: .88rem; }
.ase-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.ase-t { color: #94a3b8; font-size: .78rem; }
.ase-tag { font-size: .7rem; background: #eef2f7; color: #475569; border-radius: 999px; padding: 1px 8px; }
.ase-tag-ai { background: #ede9fe; color: #5b21b6; }
.ase-txt { color: #334155; margin-top: 1px; word-break: break-word; }
.ase-zalo_di .ase-txt { color: #64748b; }
.ase-wait { font-size: .78rem; color: #94a3b8; margin-top: 3px; }
.ase-ai { margin-top: 5px; padding: 7px 10px; border-radius: 10px; background: rgba(124,58,237,.07); border: 1px solid rgba(124,58,237,.18); font-size: .85rem; display: flex; flex-direction: column; gap: 3px; }
.ase-ai-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-weight: 700; color: #6d28d9; font-size: .8rem; }
.ase-ai-h .ai-pill { font-size: .7rem; padding: 1px 8px; }
.ase-heat { font-size: .7rem; font-weight: 700; color: #fff; background: #d97706; border-radius: 999px; padding: 1px 7px; }
.ase-trend { font-size: .76rem; font-weight: 700; }
.ase-l b { color: #475569; }
.ase-op b { color: #c2410c; }
.ase-warn b { color: #b91c1c; }
.ase-call b { color: #047857; }

/* Văn phong riêng (khung gợi ý Zalo) */
.zx-aib-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.zx-aib-foot .zx-aib-auto { margin-top: 0; }
.zx-aib-vpbtn { font-size: .8rem; padding: 0; color: #6d28d9; text-decoration: none; }
.zx-vp { margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: #f5f3ff; border: 1px solid #ddd6fe; display: flex; flex-direction: column; gap: 6px; font-size: .84rem; }
.zx-vp label { display: flex; align-items: center; gap: 6px; }
.zx-vp textarea { border: 1px solid #dbe3ef; border-radius: 8px; padding: 6px 10px; font-size: .84rem; resize: vertical; }
.zx-vp-so { color: #475569; font-size: .8rem; }

/* Bảng AI: hành trình chăm sóc */
.acs-ky { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 8px 10px; border-radius: 10px; background: rgba(127,127,127,.07); }
.acs-ky > span:first-child { font-weight: 600; font-size: .86rem; }
.acs-ky > b { font-size: 1.4rem; line-height: 1; }
.acs-ky > b small { font-size: .75rem; color: #94a3b8; font-weight: 600; }
.acs-ky-d { font-size: .78rem; font-weight: 700; }
.acs-ky-d.up, .acs-kyp .up { color: #16a34a; }
.acs-ky-d.down, .acs-kyp .down { color: #dc2626; }
.acs-ky-st { font-size: .78rem; color: #64748b; }
.acs-ky-bar { flex: 1 1 100%; height: 6px; border-radius: 999px; background: rgba(127,127,127,.18); overflow: hidden; }
.acs-ky-bar i { display: block; height: 100%; border-radius: 999px; }
.acs-open { border: 1px dashed #93c5fd; background: rgba(59,130,246,.06); border-radius: 12px; padding: 9px 11px; margin-bottom: 10px; font-size: .88rem; }
.acs-open-h { color: #1d4ed8; }
.acs-msgs { margin-top: 6px; font-size: .82rem; }
.acs-msgs summary { color: #2563eb; cursor: pointer; }
.acs-m { padding: 2px 0; color: #334155; }
.acs-m span { color: #94a3b8; font-size: .74rem; margin-right: 6px; }
.acs-m.me { color: #64748b; }
.acs-s { border: 1px solid rgba(127,127,127,.22); border-radius: 12px; margin-bottom: 8px; background: rgba(127,127,127,.03); }
.acs-s[open] { border-color: #c4b5fd; background: rgba(124,58,237,.04); }
.acs-s > summary { list-style: none; cursor: pointer; padding: 8px 11px; }
.acs-s > summary::-webkit-details-marker { display: none; }
.acs-row1 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.acs-no { font-weight: 800; color: #6d28d9; font-size: .86rem; }
.acs-ic { color: #64748b; font-size: .8rem; }
.acs-t { font-size: .82rem; color: #475569; flex: 1 1 auto; }
.acs-kyp { font-size: .72rem; font-weight: 700; background: #ecfdf5; color: #047857; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.acs-kyp i { margin-left: 3px; font-size: .65rem; }
.acs-s .ai-pill { font-size: .7rem; padding: 1px 8px; }
.acs-peek { font-size: .82rem; color: #64748b; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.acs-s[open] .acs-peek { display: none; }
.acs-body { padding: 0 11px 10px; font-size: .87rem; display: flex; flex-direction: column; gap: 3px; }
.acs-l b { color: #475569; }
.acs-new { background: #fff7ed; border-radius: 8px; padding: 4px 8px; }
.acs-new b { color: #c2410c; }
.acs-ok b { color: #15803d; }
.acs-bad b { color: #b91c1c; }
.acs-zl { max-height: 260px; overflow-y: auto; color: #334155; }

/* Bảng AI: khối điểm đầu bảng */
.ai-score .sc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sc-box { border: 1px solid rgba(127,127,127,.22); border-radius: 12px; padding: 9px 12px 10px; background: rgba(127,127,127,.04); min-width: 0; }
.sc-l { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: #64748b; }
.sc-v { font-size: 1.9rem; font-weight: 800; line-height: 1.1; margin-top: 2px; }
.sc-v small { font-size: .8rem; color: #94a3b8; font-weight: 600; margin-left: 2px; }
.sc-v.sc-none { color: #cbd5e1; }
.sc-s { font-size: .8rem; color: #64748b; margin-top: 2px; min-height: 1.3em; }
.sc-s .ai-pill { font-size: .72rem; padding: 1px 8px; }
.sc-bar { height: 6px; border-radius: 999px; background: rgba(127,127,127,.18); overflow: hidden; margin-top: 6px; }
.sc-bar i { display: block; height: 100%; border-radius: 999px; }
.sc-why { font-size: .86rem; color: #475569; margin-top: 8px; }
/* Bảng AI: mục gói gọn (chuyên gia chốt sale, công cụ) */
.ai-fold > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.ai-fold > summary::-webkit-details-marker { display: none; }
.ai-fold > summary .ai-h { margin: 0; }
.ai-fold-s { font-size: .8rem; color: #64748b; }
.ai-fold-c { margin-left: auto; color: #94a3b8; transition: transform .15s; }
.ai-fold[open] > summary .ai-fold-c { transform: rotate(180deg); }
.deal-chip { font-size: .74rem; font-weight: 700; background: #0d6efd; color: #fff; border-radius: 999px; padding: 1px 9px; }
.deal-tr { font-size: .78rem; font-weight: 700; }
.deal-key { flex: 1 1 100%; font-size: .84rem; color: #9a3412; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ai-fold[open] > summary .deal-key { display: none; }
@media (max-width: 420px) { .sc-v { font-size: 1.6rem; } .ai-score .sc-grid { gap: 8px; } }
.ai-fold > summary .deal-key { order: 10; }
.ai-fold > summary .ai-fold-s { flex: 1 1 auto; }
/* Điểm bất thường AI phát hiện khi trò chuyện như bạn bè */
.ai-kv.ai-kv-warn b { color: #b45309; }
.ai-kv.ai-kv-warn span::before { content: "\f071"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-right: 4px; color: #d97706; }
/* Tính cách khách (bảng AI) */
.ai-ps .ps-conf { font-size: .72rem; font-weight: 600; color: #6b7280; background: #f3f4f6; border-radius: 999px; padding: 1px 8px; }
.ai-ps .ps-type { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-bottom: 6px; }
.ai-ps .ps-kieu { font-weight: 700; color: #6d28d9; background: #f5f3ff; border: 1px solid #ddd6fe; border-radius: 999px; padding: 2px 10px; font-size: .85rem; }
.ai-ps .ps-nets { display: grid; gap: 4px; margin-bottom: 6px; }
.ai-ps .ps-net { font-size: .88rem; line-height: 1.35; }
.ai-ps .ps-net b { color: #111827; margin-right: 6px; }
.ai-ps .ps-net span { color: #6b7280; }
.ai-ps .ps-row { display: flex; gap: 8px; font-size: .88rem; padding: 2px 0; }
.ai-ps .ps-row > span { flex: 0 0 82px; color: #6b7280; }
.ai-ps .ps-chip { display: inline-block; background: #ecfeff; color: #0e7490; border: 1px solid #a5f3fc; border-radius: 999px; padding: 0 8px; margin: 0 4px 4px 0; font-size: .8rem; }
.ai-ps .ps-plan { margin-top: 8px; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 10px; padding: 8px 10px; }
.ai-ps .ps-plan-h { font-weight: 700; font-size: .85rem; margin-bottom: 4px; color: #0d4064; }
.ai-ps .ps-do, .ai-ps .ps-dont { display: flex; gap: 6px; font-size: .88rem; line-height: 1.35; padding: 2px 0; }
.ai-ps .ps-do i { color: #16a34a; margin-top: 3px; }
.ai-ps .ps-dont i { color: #dc2626; margin-top: 3px; }
/* Tính cách khách (khung chat Zalo) */
.zx-ips { margin-top: 6px; font-size: .82rem; line-height: 1.4; }
.zx-ips .ps-kieu { font-weight: 700; color: #6d28d9; }
.zx-ips .ps-chip { display: inline-block; background: #ecfeff; color: #0e7490; border-radius: 999px; padding: 0 7px; margin: 2px 3px 0 0; font-size: .76rem; }
.zx-ips .ps-do { color: #166534; }
.zx-ips .ps-dont { color: #991b1b; }
/* Lịch chăm sóc Zalo (bảng AI) */
.ai-lz .lz-cl { font-size: .88rem; color: #374151; background: #f0f9ff; border-left: 3px solid #0ea5e9; padding: 6px 10px; border-radius: 6px; margin-bottom: 8px; }
.ai-lz .lz-note { font-size: .8rem; color: #92400e; margin-bottom: 6px; }
.ai-lz .lz-list { display: grid; gap: 2px; }
.ai-lz .lz-it { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px dashed #e5e7eb; }
.ai-lz .lz-it:last-child { border-bottom: 0; }
.ai-lz .lz-it > i { margin-top: 3px; color: #cbd5e1; }
.ai-lz .lz-it.done > i { color: #16a34a; }
.ai-lz .lz-it.skip > i { color: #9ca3af; }
.ai-lz .lz-it.next > i { color: #2563eb; }
.ai-lz .lz-it.done .lz-m, .ai-lz .lz-it.skip .lz-m { color: #6b7280; }
.ai-lz .lz-t { font-size: .78rem; color: #6b7280; font-weight: 600; }
.ai-lz .lz-m { font-size: .9rem; font-weight: 600; color: #111827; }
.ai-lz .lz-g { font-size: .82rem; color: #6b7280; }
.ai-lz .lz-badge { background: #2563eb; color: #fff; border-radius: 999px; padding: 0 7px; font-size: .7rem; margin-left: 4px; }
.ai-lz .lz-st { color: #9ca3af; font-weight: 400; margin-left: 4px; }
/* Mở lời đàm phán giá (bảng AI) */
.ai-dp .dp-tag { font-size: .74rem; font-weight: 700; border-radius: 999px; padding: 1px 9px; margin-left: 6px; }
.ai-dp .dp-tag.ok { background: #dcfce7; color: #166534; }
.ai-dp .dp-tag.wait { background: #fef3c7; color: #92400e; }
.ai-dp .dp-tag.no { background: #f3f4f6; color: #6b7280; }
.ai-dp .dp-when { font-size: .9rem; margin-bottom: 2px; }
.ai-dp .dp-h { font-weight: 700; font-size: .84rem; color: #0d4064; margin: 8px 0 3px; }
.ai-dp .dp-q { font-size: .9rem; font-style: italic; color: #1f2937; background: #f9fafb; border-left: 3px solid #cbd5e1; padding: 4px 8px; border-radius: 4px; margin-bottom: 4px; }
.ai-dp .dp-msg { font-size: .9rem; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; padding: 7px 10px; margin-bottom: 6px; }
.ai-dp .ps-plan { margin-top: 8px; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 10px; padding: 8px 10px; }
.ai-dp .ps-do, .ai-dp .ps-dont { display: flex; gap: 6px; font-size: .88rem; line-height: 1.35; padding: 2px 0; }
.ai-dp .ps-do i { color: #0d4064; margin-top: 3px; }
.ai-dp .ps-dont i { color: #dc2626; margin-top: 3px; }

/* Nút tick "AI tự nhắn" trong khung chat Zalo */
.zx-aitog { display: inline-flex; align-items: center; gap: 5px; margin: 0; padding: 4px 9px; border: 1px solid #cbd5e1; border-radius: 999px; font-size: .78rem; font-weight: 600; color: #475569; background: #f8fafc; cursor: pointer; white-space: nowrap; flex-shrink: 0; user-select: none; }
.zx-aitog[hidden] { display: none; }
.zx-aitog input { margin: 0; width: 15px; height: 15px; accent-color: #16a34a; cursor: pointer; }
.zx-aitog.on { border-color: #16a34a; background: #dcfce7; color: #166534; }
.zx-aitog.off { opacity: .55; cursor: not-allowed; }
.zx-aitog.off input { cursor: not-allowed; }
@media (max-width: 480px) { .zx-aitog span { display: none; } .zx-aitog { padding: 4px 8px; } }

/* Nhắc AI về khách */
.ai-nhac { border-left: 3px solid #7c3aed; }
.ai-nhac .nh-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 4px; }
.ai-nhac .nh-it { display: flex; gap: 8px; align-items: flex-start; background: #f5f3ff; border-radius: 8px; padding: 6px 8px; }
.ai-nhac .nh-t { flex: 1; font-size: .88rem; color: #1f2937; white-space: pre-wrap; }
.ai-nhac .nh-m { font-size: .72rem; color: #6b7280; margin-top: 2px; }

/* Bảng AI: tiêu đề 6 phần (Tình trạng → Việc tiếp theo → Chuẩn bị chốt → Hiểu khách → Lịch sử → Công cụ) */
.ai-part{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:18px 0 8px;padding-bottom:6px;border-bottom:2px solid #e2e8f0}
.ai-part:first-child{margin-top:0}
.ai-part-n{width:22px;height:22px;border-radius:50%;background:#2563eb;color:#fff;font-size:.75rem;font-weight:800;display:inline-flex;align-items:center;justify-content:center;flex:0 0 22px}
.ai-part-t{font-weight:800;font-size:.95rem;text-transform:uppercase;letter-spacing:.03em;color:#0f172a}
.ai-part-r{margin-left:auto;display:flex;gap:6px;flex-wrap:wrap}
/* Hồ sơ khách (bộ nhớ AI) */
.ai-hs-g { margin-bottom: 6px; }
.ai-hs-t { font-size: .72rem; font-weight: 700; text-transform: uppercase; color: #94a3b8; margin-top: 4px; }
.ai-hs-l { display: flex; align-items: flex-start; gap: 4px; font-size: .88rem; padding: 2px 0; border-bottom: 1px dashed rgba(127,127,127,.15); }
.ai-hs-l.ai-hs-k { background: rgba(59,130,246,.08); border-radius: 4px; }
.ai-hs-b { border: 0; background: transparent; color: #94a3b8; padding: 0 4px; font-size: .78rem; }
.ai-hs-b:hover { color: #3b82f6; }

/* Nhiều Zalo cho một tài khoản */
.zx-ztabs { display: flex; gap: 4px; padding: 6px 10px; border-bottom: 1px solid #eef2f7; overflow-x: auto; white-space: nowrap; }
.zx-ztab { border: 1px solid #dbe3ee; background: #fff; color: #334155; border-radius: 999px; padding: 2px 10px; font-size: 12px; }
.zx-ztab.on { background: #0068ff; border-color: #0068ff; color: #fff; }
.zx-ztab b { background: #ef4444; color: #fff; border-radius: 999px; padding: 0 5px; font-size: 11px; margin-left: 2px; }
.zx-zchip { display: inline-block; font-size: 10px; font-weight: 600; color: #0068ff; background: #e8f1ff; border-radius: 4px; padding: 0 4px; margin-right: 2px; vertical-align: 1px; }
.zx-zsel { width: auto; max-width: 150px; flex: 0 0 auto; font-size: 12px; padding-top: 2px; padding-bottom: 2px; }

/* Kho mẫu trong khung chat Zalo */
.zx-panel.zx-kit { max-height: 360px; height: auto; min-height: 200px; }
.zx-kho-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: #fff; border-bottom: 1px solid #eef2f7; font-size: 14px; }
.zx-kho-tops { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; padding: 10px; }
.zx-kho-top { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid #dbe3ee; background: #f8fbff; border-radius: 12px; padding: 12px; color: #0f172a; }
.zx-kho-top:hover { border-color: #0068ff; }
.zx-kho-top > i:first-child { color: #f59e0b; font-size: 22px; }
.zx-kho-top > i:last-child { margin-left: auto; color: #94a3b8; }
.zx-kho-top span { display: flex; flex-direction: column; min-width: 0; }
.zx-kho-top small { color: #64748b; }
.zx-kho-subs { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px 2px; }
.zx-kho-sub { border: 1px solid #dbe3ee; background: #fff; border-radius: 999px; padding: 2px 10px; font-size: 12px; color: #334155; }
.zx-kho-sub span { color: #0068ff; font-weight: 700; }
.zx-kho-body { padding: 4px 10px 10px; }
.zx-kho-sec { font-size: 12px; font-weight: 700; color: #475569; margin: 10px 0 6px; text-transform: uppercase; letter-spacing: .02em; }
.zx-kho-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.zx-kho-it { display: flex; flex-direction: column; text-align: left; border: 1px solid #e3e8f0; background: #fff; border-radius: 10px; padding: 0; overflow: hidden; color: #0f172a; }
.zx-kho-it:hover { border-color: #0068ff; box-shadow: 0 2px 8px rgba(0,104,255,.12); }
.zx-kho-it img { width: 100%; height: 96px; object-fit: cover; background: #f1f5f9; display: block; }
.zx-kho-ic { display: flex; align-items: center; justify-content: center; height: 56px; background: #f1f5f9; color: #64748b; font-size: 22px; }
.zx-kho-it.tin .zx-kho-ic { height: 34px; font-size: 16px; color: #0068ff; background: #e8f1ff; }
.zx-kho-tx { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; font-size: 12px; min-width: 0; }
.zx-kho-tx b { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.zx-kho-tx small { color: #64748b; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Thanh chọn thư mục data (lĩnh vực / mảng) */
.tm-bar { display: flex; gap: 6px; align-items: center; overflow-x: auto; padding: 6px 12px; background: #fff; border-bottom: 1px solid #e5e7eb; scrollbar-width: none; }
.tm-bar::-webkit-scrollbar { display: none; }
.tm-lbl { color: #64748b; font-size: 13px; flex: none; }
.tm-chip { flex: none; padding: 3px 10px; border-radius: 999px; border: 1px solid #cbd5e1; font-size: 13px; color: #334155; text-decoration: none; white-space: nowrap; background: #f8fafc; }
.tm-chip.cha { font-weight: 600; }
.tm-chip.con { font-size: 12px; }
.tm-chip.con::before { content: "› "; color: #94a3b8; }
.tm-chip.on { background: #0d6efd; border-color: #0d6efd; color: #fff; }
.tm-chip.on::before { color: #dbeafe; }
.tm-note { padding: 6px 12px; font-size: 13px; background: #eff6ff; color: #1e3a8a; border-bottom: 1px solid #dbeafe; }
.app-ver { font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 6px; background: #fbbf24; color: #1f2937; vertical-align: middle; }
