/* Winta Center — giao diện: dải màu Winta – Cam (xanh lá → xanh nõn chuối → cam) như header Web ERP; chữ tối thiểu 14px. */
:root {
    --ct-chinh: #1b8a3e;
    --ct-nen: #f4f6f8;
    --ct-vien: #e2e8f0;
    --ct-chu: #0f172a;
    --ct-phu: #64748b;
    --ct-dai: linear-gradient(100deg, #1b8a3e 0%, #1b8a3e 38%, #65a30d 72%, #ef7d00 100%);
}
html, body { margin: 0; height: 100%; }
body { font-family: "Nunito Sans", "Segoe UI", Arial, sans-serif; font-size: 15px; color: var(--ct-chu); background: var(--ct-nen); }
a { color: var(--ct-chinh); text-decoration: none; }
a:hover { text-decoration: underline; }
a.do { color: #dc2626; }

.ct-khung { display: flex; flex-direction: column; height: 100vh; }
.ct-tren { flex: 0 0 56px; display: flex; align-items: center; gap: 14px; padding: 0 18px; background: var(--ct-dai); color: #fff; box-shadow: 0 6px 14px -8px rgba(15, 23, 42, .4); position: relative; z-index: 2; }
.ct-logo { display: flex; align-items: center; gap: 10px; color: #fff !important; text-decoration: none !important; }
.ct-logo img { width: 36px; height: 36px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .6); }
.ct-logo span { display: flex; flex-direction: column; line-height: 1.15; }
.ct-logo b { font-size: 17px; letter-spacing: .3px; }
.ct-logo small { font-size: 14px; opacity: .9; }
.ct-gian { flex: 1; }
.ct-nguoi, .ct-thoat { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .45); color: #fff !important; font-size: 14px; }
.ct-thoat:hover { background: #fff; color: var(--ct-chinh) !important; text-decoration: none; }

.ct-than { flex: 1; min-height: 0; display: flex; }
.ct-menu { flex: 0 0 230px; overflow: auto; background: #fff; border-right: 1px solid var(--ct-vien); padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; }
.ct-menu .nhom { margin: 12px 10px 6px; font-size: 14px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--ct-phu); }
.ct-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--ct-chu); font-size: 15px; text-decoration: none; }
.ct-menu a .oi { width: 18px; color: var(--ct-chinh); }
.ct-menu a:hover { background: #f0f7f2; }
.ct-menu a.active { background: #e3f3e8; font-weight: 700; box-shadow: inset 3px 0 0 var(--ct-chinh); }
.ct-noidung { flex: 1; min-width: 0; overflow: auto; }

.ct-trang { padding: 18px 22px 30px; display: flex; flex-direction: column; gap: 14px; }
.ct-dautrang { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.ct-dautrang h2 { margin: 0; font-size: 21px; font-weight: 800; }
.ct-loc { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ct-ghi { color: var(--ct-phu); font-size: 14px; line-height: 1.5; }
.ct-rong { padding: 18px; text-align: center; color: var(--ct-phu); }
.ct-bao { padding: 10px 14px; border-radius: 10px; font-size: 14px; }
.ct-bao.loi { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.ct-bao.ok { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.ct-bao.cam { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

.ct-the-hang { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.ct-the { background: #fff; border: 1px solid var(--ct-vien); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 2px 8px -6px rgba(15, 23, 42, .3); border-top: 3px solid var(--ct-chinh); }
.ct-the span { color: var(--ct-phu); font-size: 14px; }
.ct-the b { font-size: 26px; font-weight: 800; }
.ct-the small { color: var(--ct-phu); font-size: 14px; font-weight: 600; }
.ct-the.cam { border-top-color: #ef7d00; } .ct-the.xanhduong { border-top-color: #2563eb; } .ct-the.tim { border-top-color: #7c3aed; } .ct-the.do { border-top-color: #dc2626; }

.ct-hai { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 1100px) { .ct-hai { grid-template-columns: 1fr; } }
.ct-khoi { background: #fff; border: 1px solid var(--ct-vien); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.ct-khoi h3 { margin: 0; font-size: 16px; font-weight: 800; }
.ct-bang { width: 100%; border-collapse: collapse; font-size: 14px; }
.ct-bang th, .ct-bang td { padding: 7px 8px; border-bottom: 1px solid var(--ct-vien); text-align: left; vertical-align: middle; }
.ct-bang th { color: var(--ct-phu); font-weight: 700; background: #f8fafc; }
.ct-bang .so { text-align: right; font-variant-numeric: tabular-nums; }
.ct-bang .nho, .nho { color: var(--ct-phu); }

.ct-nhan { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 14px; font-weight: 700; background: #f1f5f9; color: #334155; white-space: nowrap; }
.ct-nhan.xanh { background: #dcfce7; color: #166534; } .ct-nhan.cam { background: #ffedd5; color: #9a3412; } .ct-nhan.do { background: #fee2e2; color: #991b1b; }
.ct-nhan.xanhduong { background: #dbeafe; color: #1e40af; } .ct-nhan.tim { background: #ede9fe; color: #5b21b6; } .ct-nhan.xam { background: #f1f5f9; color: #64748b; }

.ct-chia { display: flex; gap: 14px; align-items: flex-start; }
.ct-luoi { flex: 1; min-width: 0; }
.ct-grid { font-size: 14px; }
.ct-grid .dxbl-grid-table { font-size: 14px; }
.ct-chitiet { flex: 0 0 420px; max-width: 45%; background: #fff; border: 1px solid var(--ct-vien); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; position: sticky; top: 0; }
.ct-chitiet .dau { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 16px; }
.ct-chitiet dl { display: grid; grid-template-columns: 100px 1fr; gap: 4px 10px; margin: 0; font-size: 14px; }
.ct-chitiet dt { color: var(--ct-phu); }
.ct-chitiet dd { margin: 0; word-break: break-word; }
.ct-chitiet .nd { white-space: pre-wrap; padding: 10px; border-radius: 10px; background: #f8fafc; font-size: 14px; max-height: 220px; overflow: auto; }
.ct-chitiet label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 14px; }
.ct-chitiet .nut { display: flex; gap: 8px; justify-content: flex-end; }
.ct-nut-lk { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; border: 1px dashed var(--ct-chinh); font-weight: 700; }
.ct-pre { white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow: auto; padding: 10px; border-radius: 10px; background: #0f172a; color: #e2e8f0; font-size: 14px; margin: 0; }
@media (max-width: 1000px) { .ct-chia { flex-direction: column; } .ct-chitiet { max-width: none; width: 100%; flex-basis: auto; position: static; } }

/* Truy vấn dữ liệu */
.tv-chon { display: flex; flex-wrap: wrap; gap: 12px; }
.tv-chon label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 14px; }
.tv-o textarea, .tv-o .dxbl-text-edit-input { font-family: Consolas, "Cascadia Mono", monospace !important; font-size: 14px !important; }
.tv-nut { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tv-ghi { color: var(--ct-phu); font-size: 14px; }
.tv-kq { display: flex; flex-direction: column; gap: 8px; }
.tv-tom { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14px; }
.tv-loi { color: #b91c1c; white-space: pre-wrap; }
.tv-msg { font-family: Consolas, monospace; font-size: 14px; color: var(--ct-phu); }
.tv-bang-dau { font-weight: 700; font-size: 14px; margin-top: 6px; }
.tv-cuon { max-height: 460px; overflow: auto; border: 1px solid var(--ct-vien); border-radius: 10px; background: #fff; }
.tv-bang { border-collapse: collapse; font-size: 14px; font-family: Consolas, "Cascadia Mono", monospace; }
.tv-bang th, .tv-bang td { padding: 5px 10px; border-bottom: 1px solid var(--ct-vien); border-right: 1px solid #f1f5f9; white-space: nowrap; max-width: 420px; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.tv-bang th { position: sticky; top: 0; background: #f1f5f9; z-index: 1; font-family: "Nunito Sans", "Segoe UI", sans-serif; }
.tv-bang .stt { color: var(--ct-phu); text-align: right; background: #f8fafc; }
.tv-bang td.null { color: #94a3b8; font-style: italic; }
.tv-bang tbody tr:hover td { background: #f0f7f2; }
.tv-ls summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.tv-ls button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 6px 4px; font-size: 14px; cursor: pointer; border-bottom: 1px solid var(--ct-vien); }
.tv-ls button:hover { background: #f0f7f2; }
.tv-ls code { color: var(--ct-phu); }
.tv-xn p { margin: 0 0 8px; font-size: 15px; }

/* Form máy chủ */
.mc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.mc-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 14px; }
.mc-form .rong { grid-column: 1 / -1; }
.mc-form .nhom { font-weight: 800; color: var(--ct-chinh); margin-top: 6px; font-size: 14px; }
.mc-form .hang { display: flex; gap: 20px; }

/* Đăng nhập */
.dn-nen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--ct-dai); }
.dn-the { width: min(440px, 100%); background: #fff; border-radius: 18px; padding: 24px; box-shadow: 0 24px 60px -20px rgba(15, 23, 42, .55); display: flex; flex-direction: column; gap: 14px; }
.dn-dau { display: flex; align-items: center; gap: 12px; }
.dn-dau img { width: 48px; height: 48px; border-radius: 50%; }
.dn-dau div { display: flex; flex-direction: column; }
.dn-dau b { font-size: 19px; }
.dn-dau span { color: var(--ct-phu); font-size: 14px; }
.dn-the form { display: flex; flex-direction: column; gap: 12px; }
.dn-the label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 14px; }
.dn-the input:not([type=hidden]) { height: 42px; padding: 0 12px; border: 1px solid #cbd5e1; border-radius: 10px; font-size: 15px; font-family: inherit; }
.dn-the button { height: 44px; border: 0; border-radius: 10px; background: var(--ct-chinh); color: #fff; font-size: 15px; font-weight: 800; cursor: pointer; }
.dn-the p, .dn-the small { margin: 0; color: var(--ct-phu); font-size: 14px; }
.dn-loi { padding: 10px 12px; border-radius: 10px; background: #fef2f2; color: #b91c1c; font-size: 14px; }
.dn-lai { text-align: center; font-size: 14px; }
.dn-the label.dn-chk { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 700; cursor: pointer; }
.dn-the label.dn-chk input[type=checkbox] { width: 20px; height: 20px; padding: 0; margin: 1px 0 0; flex: none; accent-color: var(--ct-chinh); cursor: pointer; }
.dn-the label.dn-chk span { display: flex; flex-direction: column; gap: 2px; }
.dn-the label.dn-chk small { font-weight: 400; font-size: 13px; }
.mtc-ds { width: 100%; border-collapse: collapse; font-size: 14px; }
.mtc-ds th, .mtc-ds td { padding: 8px 6px; border-bottom: 1px solid #e2e8f0; text-align: left; vertical-align: middle; }
.mtc-ds th { color: var(--ct-phu); font-weight: 700; }
.mtc-nay { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #e3f3e8; color: #15702f; font-size: 12px; font-weight: 700; }
.dn-the button.mtc-go { height: 32px; padding: 0 12px; background: #fff; color: #b91c1c; border: 1px solid #fecaca; font-size: 13px; }
.dn-the button.mtc-go-het { background: #b91c1c; color: #fff; border: 0; }

/* Nút chính DevExpress theo màu Winta (mặc định chủ đề blazing-berry là tím). */
.dxbl-btn.dxbl-btn-primary, .dxbl-btn-primary { background-color: var(--ct-chinh) !important; border-color: var(--ct-chinh) !important; color: #fff !important; }
.dxbl-btn.dxbl-btn-primary:hover { background-color: #15702f !important; border-color: #15702f !important; }
.dxbl-checkbox-checked .dxbl-checkbox-check-element, .dxbl-checkbox .dxbl-checkbox-check-element:checked { background-color: var(--ct-chinh) !important; border-color: var(--ct-chinh) !important; }
.dxbl-tabs .dxbl-tabs-item.dxbl-active { color: var(--ct-chinh) !important; }
.ct-grid .dxbl-grid-selected-row td { background-color: #e3f3e8 !important; }

/* Tìm nhanh trên thanh trên */
.ct-tim { display: flex; align-items: center; gap: 8px; margin-left: 18px; height: 34px; padding: 0 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .45); width: min(420px, 38vw); }
.ct-tim .oi { color: #fff; }
.ct-tim input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #fff; font-size: 14px; font-family: inherit; }
.ct-tim input::placeholder { color: rgba(255, 255, 255, .8); }
.ct-tim:focus-within { background: #fff; }
.ct-tim:focus-within input, .ct-tim:focus-within .oi { color: var(--ct-chu); }
.tim-dong { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--ct-vien); font-size: 14px; }
.tim-dong small { color: var(--ct-phu); }

/* Truy vấn kiểu SSMS */
.tv2 { display: grid; grid-template-columns: 280px minmax(0, 1fr); height: 100%; min-height: 0; }
.tv2.co-ai { grid-template-columns: 280px minmax(0, 1fr) 400px; }
.tv2-cay { display: flex; flex-direction: column; gap: 8px; min-height: 0; padding: 12px 10px; background: #fff; border-right: 1px solid var(--ct-vien); }
.tv2-chon { display: flex; flex-direction: column; gap: 6px; }
.tv2-quyen { align-self: flex-start; }
.tv2-timdt { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 1px solid var(--ct-vien); border-radius: 8px; }
.tv2-timdt input { flex: 1; border: 0; outline: 0; font-size: 14px; font-family: inherit; min-width: 0; }
.tv2-ds { flex: 1; min-height: 0; overflow: auto; font-size: 14px; }
.tv2-nhom { display: flex; align-items: center; gap: 6px; width: 100%; padding: 6px 4px; border: 0; background: transparent; font-weight: 800; font-size: 14px; cursor: pointer; color: var(--ct-chu); }
.tv2-nhom small { margin-left: auto; color: var(--ct-phu); font-weight: 600; }
.tv2-dt { display: flex; align-items: center; border-radius: 6px; }
.tv2-dt:hover, .tv2-dt.chon { background: #e3f3e8; }
.tv2-dt .ten { flex: 1; min-width: 0; text-align: left; border: 0; background: transparent; padding: 4px 6px 4px 20px; font-size: 14px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: Consolas, "Cascadia Mono", monospace; }
.tv2-dt .ten small { color: var(--ct-phu); margin-left: 4px; font-family: "Nunito Sans", sans-serif; }
.tv2-dt .nut { border: 0; background: transparent; padding: 4px 6px; color: var(--ct-chinh); cursor: pointer; opacity: 0; }
.tv2-dt:hover .nut { opacity: 1; }
.tv2-chinh { min-width: 0; min-height: 0; overflow: auto; padding: 12px 16px 24px; display: flex; flex-direction: column; gap: 8px; }
.tv2-the { display: flex; align-items: flex-end; gap: 4px; border-bottom: 1px solid var(--ct-vien); flex-wrap: wrap; }
.tv2-the-muc { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--ct-vien); border-bottom: 0; border-radius: 8px 8px 0 0; background: #f1f5f9; font-size: 14px; cursor: pointer; }
.tv2-the-muc.chon { background: #fff; font-weight: 700; box-shadow: inset 0 3px 0 var(--ct-chinh); }
.tv2-the-muc button, .tv2-them { border: 0; background: transparent; cursor: pointer; color: var(--ct-phu); padding: 2px 4px; }
.tv2-them { padding: 6px 10px; }
.tv2-cong-cu { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tv2-vach { width: 1px; height: 24px; background: var(--ct-vien); }
.tv2-gian { flex: 1; }
.tv2-mau { position: relative; }
.tv2-mau-ds { position: absolute; z-index: 20; top: 100%; left: 0; width: 360px; max-height: 420px; overflow: auto; background: #fff; border: 1px solid var(--ct-vien); border-radius: 10px; box-shadow: 0 16px 32px -12px rgba(15, 23, 42, .35); padding: 6px; }
.tv2-mau-ds .nhom { padding: 8px 8px 4px; font-weight: 800; font-size: 14px; color: var(--ct-phu); }
.tv2-mau-ds button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 6px 8px; border-radius: 6px; font-size: 14px; cursor: pointer; }
.tv2-mau-ds button:hover { background: #f0f7f2; }
.tv2-mau-ds .dong { display: flex; }
.tv2-mau-ds .dong .xoa { width: auto; color: #dc2626; }
.tv2-mau-ds small { color: var(--ct-phu); }
.tv2-mau-ds .chan { border-top: 1px solid var(--ct-vien); margin-top: 6px; padding-top: 4px; }
.tv2-sql .tv-o textarea { min-height: 200px; resize: vertical; }
.tv2-kq-the { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; border-bottom: 1px solid var(--ct-vien); margin-top: 6px; }
.tv2-kq-the button { border: 0; background: transparent; padding: 7px 12px; font-size: 14px; cursor: pointer; border-bottom: 3px solid transparent; }
.tv2-kq-the button.chon { border-bottom-color: var(--ct-chinh); font-weight: 700; }
.tv2-tom { font-size: 14px; color: var(--ct-phu); }
.tv2-bang-dau { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; margin-top: 6px; }
.tv2-bang-dau span { color: var(--ct-phu); }
.tv2-bang-dau button, .tv2-nut-ai { border: 1px solid var(--ct-vien); background: #fff; border-radius: 8px; padding: 4px 10px; font-size: 14px; cursor: pointer; }
.tv2-nut-ai { border-color: var(--ct-chinh); color: var(--ct-chinh); font-weight: 700; }
.tv2-loc { height: 30px; padding: 0 10px; border: 1px solid var(--ct-vien); border-radius: 8px; font-size: 14px; font-family: inherit; width: 200px; }
.tv2-loi { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; background: #fef2f2; }
.tv2-tb { white-space: pre-wrap; font-family: Consolas, "Cascadia Mono", monospace; font-size: 14px; background: #fff; border: 1px solid var(--ct-vien); border-radius: 10px; padding: 12px; margin: 0; max-height: 480px; overflow: auto; }
.tv2-tt h4 { margin: 12px 0 6px; font-size: 15px; }
.tv2-ai { min-height: 0; border-left: 1px solid var(--ct-vien); background: #fff; display: flex; }
.tv2-ai .ai-khung { flex: 1; border: 0; border-radius: 0; }
.ct-noidung:has(.tv2) { overflow: hidden; }
@media (max-width: 1200px) { .tv2.co-ai { grid-template-columns: 240px minmax(0, 1fr) 340px; } }

/* Khung trò chuyện AI */
.ai-khung { display: flex; flex-direction: column; min-height: 0; background: #fff; border: 1px solid var(--ct-vien); border-radius: 14px; overflow: hidden; }
.ai-khung.trong-the { height: 520px; }
.ai-khung.toan-trang { height: calc(100vh - 210px); }
.ai-dau { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--ct-dai); color: #fff; font-size: 15px; }
.ai-gian { flex: 1; }
.ai-nho { border: 0; background: rgba(255, 255, 255, .18); color: #fff; border-radius: 8px; width: 30px; height: 28px; cursor: pointer; }
.ai-than { flex: 1; min-height: 0; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: #f8fafc; }
.ai-chao { color: var(--ct-phu); font-size: 14px; line-height: 1.5; }
.ai-goiy { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-goiy.nho { padding: 6px 10px; border-top: 1px solid var(--ct-vien); background: #fff; }
.ai-goiy button { border: 1px solid #bbdfc7; background: #f0f7f2; color: #166534; border-radius: 999px; padding: 5px 12px; font-size: 14px; cursor: pointer; text-align: left; }
.ai-tin { max-width: 100%; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.55; }
.ai-tin.nguoi { align-self: flex-end; max-width: 88%; }
.ai-tin.nguoi .nd { background: var(--ct-chinh); color: #fff; padding: 8px 12px; border-radius: 14px 14px 4px 14px; white-space: pre-wrap; }
.ai-tin.ai .nd { background: #fff; border: 1px solid var(--ct-vien); padding: 8px 12px; border-radius: 14px 14px 14px 4px; white-space: pre-wrap; word-break: break-word; }
.ai-tin.ai .nd code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; font-family: Consolas, monospace; }
.ai-tde { display: block; margin-top: 4px; }
.ai-ma { border-radius: 10px; overflow: hidden; border: 1px solid #1e293b; }
.ai-ma-dau { display: flex; align-items: center; gap: 6px; padding: 4px 8px; background: #1e293b; color: #cbd5e1; font-size: 14px; }
.ai-ma-dau span { flex: 1; text-transform: uppercase; letter-spacing: .5px; }
.ai-ma-dau button, .ai-chan button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 14px; padding: 2px 6px; border-radius: 6px; }
.ai-ma-dau button:hover { background: rgba(255, 255, 255, .12); }
.ai-ma pre { margin: 0; padding: 10px; background: #0f172a; color: #e2e8f0; font-family: Consolas, "Cascadia Mono", monospace; font-size: 14px; white-space: pre-wrap; word-break: break-word; max-height: 360px; overflow: auto; }
.ai-chan { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--ct-phu); font-size: 14px; }
.ai-chan button { color: var(--ct-chinh); }
.ai-chan button:hover { background: #e3f3e8; }
.ai-cc { margin-right: auto; }
.ai-cho { display: flex; align-items: center; gap: 4px; color: var(--ct-phu); font-size: 14px; }
.ai-cho span { width: 7px; height: 7px; border-radius: 50%; background: var(--ct-chinh); animation: ai-nhay 1.2s infinite ease-in-out; }
.ai-cho span:nth-child(2) { animation-delay: .2s; }
.ai-cho span:nth-child(3) { animation-delay: .4s; margin-right: 6px; }
@keyframes ai-nhay { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
.ai-nhap { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--ct-vien); background: #fff; }
.ai-nhap textarea { flex: 1; resize: none; border: 1px solid #cbd5e1; border-radius: 10px; padding: 8px 10px; font-size: 14px; font-family: inherit; }
.ai-nhap button { width: 44px; border: 0; border-radius: 10px; background: var(--ct-chinh); color: #fff; cursor: pointer; font-size: 16px; }
.ai-nhap button:disabled { opacity: .45; cursor: default; }
.ai-nhap button.dung { background: #dc2626; }
.yc-mau { display: flex; align-items: center; gap: 8px; }
.cd-khoi .nut { display: flex; gap: 8px; justify-content: flex-end; }
.cd-lay { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--ct-vien); font-size: 14px; color: var(--ct-phu); }
.ct-chitiet .nut { flex-wrap: wrap; }

.ai-goiy.nho { flex-wrap: nowrap; overflow-x: auto; }
.ai-goiy.nho button { white-space: nowrap; flex: 0 0 auto; }

/* Menu chia nhóm + thu gọn (center.js) */
.ct-nut-menu { width: 38px; height: 34px; border: 1px solid rgba(255, 255, 255, .45); border-radius: 10px; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; font-size: 16px; flex: 0 0 auto; }
.ct-nut-menu:hover { background: #fff; color: var(--ct-chinh); }
.ct-menu { transition: flex-basis .18s ease, width .18s ease; }
.ct-menu .ct-nhom { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.ct-menu .nhom { display: flex; align-items: center; gap: 10px; width: 100%; margin: 6px 0 2px; padding: 7px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ct-phu); font-size: 14px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; cursor: pointer; text-align: left; }
.ct-menu .nhom:hover { background: #f1f5f9; }
.ct-menu .nhom .oi:first-child { width: 18px; color: var(--ct-phu); }
.ct-menu .nhom .mui { margin-left: auto; font-size: 11px; transition: transform .15s ease; }
.ct-menu .ct-nhom.dong .mui { transform: rotate(-90deg); }
.ct-menu .ct-nhom.dong .ds { display: none; }
.ct-menu .ds { display: flex; flex-direction: column; gap: 2px; }
.ct-menu a .chu, .ct-menu .nhom .chu { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ct-khung.menu-gon .ct-menu { flex-basis: 64px; width: 64px; padding: 10px 6px; overflow-x: hidden; }
.ct-khung.menu-gon .ct-menu .chu, .ct-khung.menu-gon .ct-menu .mui { display: none; }
.ct-khung.menu-gon .ct-menu .nhom { justify-content: center; padding: 6px 0; border-top: 1px solid var(--ct-vien); border-radius: 0; }
.ct-khung.menu-gon .ct-menu .ct-nhom:first-child .nhom { border-top: 0; }
.ct-khung.menu-gon .ct-menu .ct-nhom.dong .ds { display: flex; }
.ct-khung.menu-gon .ct-menu a { justify-content: center; padding: 10px 0; }
.ct-khung.menu-gon .ct-menu a .oi { width: auto; font-size: 17px; }
.ct-khung.menu-gon .ct-menu a.active { box-shadow: inset 3px 0 0 var(--ct-chinh); }
@media (max-width: 900px) {
    .ct-nguoi .chu, .ct-thoat .chu { display: none; }
    .ct-tim { width: auto; flex: 1; }
}

/* Chọn nguồn AI, bảng cấu hình */
.cd-nguon { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cd-nguon button { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px 14px; border: 1px solid var(--ct-vien); border-radius: 12px; background: #fff; cursor: pointer; font-size: 14px; }
.cd-nguon button small { color: var(--ct-phu); font-size: 14px; }
.cd-nguon button.chon { border-color: var(--ct-chinh); box-shadow: inset 0 0 0 2px var(--ct-chinh); }
.ct-khoi-bang { background: #fff; border: 1px solid var(--ct-vien); border-radius: 12px; overflow: hidden; }
.ct-bang td.do { color: #dc2626; font-weight: 800; }
.ct-khoi .nut { display: flex; gap: 8px; justify-content: flex-end; }

.dxbl-btn.dxbl-btn-outline-primary { color: var(--ct-chinh) !important; border-color: var(--ct-chinh) !important; background: #fff !important; }
.dxbl-btn.dxbl-btn-outline-primary:hover { background: #e3f3e8 !important; }
.ct-khung:not(.menu-gon) .ct-menu { flex-basis: 250px; }

/* Ô soạn câu lệnh rộng hơn: cao 18 dòng (kéo giãn được), Ẩn cây đối tượng để rộng ngang, Phóng to ô lệnh. */
.tv2-sql .tv-o textarea { min-height: 340px; resize: vertical; line-height: 1.5; }
.tv2.an-cay { grid-template-columns: 0 minmax(0, 1fr); }
.tv2.an-cay.co-ai { grid-template-columns: 0 minmax(0, 1fr) 400px; }
.tv2.an-cay .tv2-cay { display: none; }
.tv2.o-to .tv2-sql .tv-o textarea { min-height: calc(100vh - 300px); }
.dn-tot { padding: 10px 12px; border-radius: 10px; background: #ecfdf5; color: #047857; font-size: 14px; }
.dmk-the { width: min(480px, 100%); box-shadow: 0 2px 8px -6px rgba(15, 23, 42, .3); border: 1px solid var(--ct-vien); }
.mtc-the { width: min(760px, 100%); margin-top: 16px; }
.ai-hm tr.chon td { background: #f0fdf4; }
.ai-hm td.nut { white-space: nowrap; }
.ai-thanh { width: 140px; height: 8px; border-radius: 6px; background: #e2e8f0; overflow: hidden; margin-bottom: 4px; }
.ai-thanh i { display: block; height: 100%; background: var(--ct-chinh); }
.ai-thanh i.gan { background: #ef7d00; }
.ai-thanh i.het { background: #dc2626; }

/* ═════ Giao diện mới 12/11: nút, danh sách, điện thoại ═════ */
:root { --ct-chinh-dam: #15702f; --ct-nhat: #f0f7f2; --ct-bong: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 18px -12px rgba(15, 23, 42, .28); }
.ct-trang { gap: 16px; }
.ct-dautrang h2 { display: flex; align-items: center; gap: 10px; }
.ct-dautrang h2::before { content: ""; flex: 0 0 auto; width: 6px; height: 24px; border-radius: 4px; background: linear-gradient(180deg, #1b8a3e, #ef7d00); }

/* Nút đứng riêng (không đụng nút trong ô nhập / sổ xuống) */
.dxbl-btn.dxbl-btn-standalone { min-height: 36px; padding: 0 14px; border-radius: 10px !important; font-weight: 700; font-size: 14px; gap: 6px; transition: background-color .15s, box-shadow .15s, border-color .15s, transform .05s; }
.dxbl-btn.dxbl-btn-standalone:active { transform: translateY(1px); }
.dxbl-btn.dxbl-btn-standalone.dxbl-btn-primary { background: linear-gradient(180deg, #22a04b, #1b8a3e) !important; border-color: #1b8a3e !important; box-shadow: 0 6px 14px -8px rgba(27, 138, 62, .8); }
.dxbl-btn.dxbl-btn-standalone.dxbl-btn-primary:hover { background: linear-gradient(180deg, #1b8a3e, var(--ct-chinh-dam)) !important; }
.dxbl-btn.dxbl-btn-standalone.dxbl-btn-secondary { background: #fff !important; border: 1px solid #d5dee8 !important; color: #1e293b !important; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); }
.dxbl-btn.dxbl-btn-standalone.dxbl-btn-secondary:hover { background: var(--ct-nhat) !important; border-color: #9fd2b0 !important; color: var(--ct-chinh-dam) !important; }
.dxbl-btn.dxbl-btn-standalone.dxbl-btn-outline-primary { background: #fff !important; }
.dxbl-btn.dxbl-btn-standalone.dxbl-btn-outline-primary:hover { background: var(--ct-nhat) !important; }
.dxbl-btn.dxbl-btn-standalone[class*="dxbl-btn-text-"] { color: var(--ct-chinh-dam) !important; }
.dxbl-btn.dxbl-btn-standalone[class*="dxbl-btn-text-"]:hover { background: var(--ct-nhat) !important; }
.dxbl-btn.dxbl-btn-standalone .oi { font-size: 13px; }
.dxbl-btn.dxbl-btn-standalone.dxbl-disabled { opacity: .5; box-shadow: none; }

/* Lưới DevExpress (ct-grid) và bảng thường (ct-bang): khung bo tròn, tiêu đề nhạt, dòng thoáng, rê chuột tô nhẹ */
.ct-grid.dxbl-grid { border: 1px solid var(--ct-vien) !important; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: var(--ct-bong); }
.ct-grid .dxbl-grid-table > thead > tr > th { background: #f8fafc; color: #475569; font-weight: 800; border-left: 0 !important; border-right: 0 !important; border-bottom: 1px solid var(--ct-vien) !important; padding-top: 10px; padding-bottom: 10px; }
.ct-grid .dxbl-grid-table > tbody > tr > td { border-left: 0 !important; border-right: 0 !important; border-color: #eef2f6 !important; padding-top: 9px; padding-bottom: 9px; }
.ct-grid .dxbl-grid-table > tbody > tr:hover > td { background: #f6fbf7; }
.ct-grid .dxbl-grid-table > tbody > tr.dxbl-grid-selected-row > td { background: #e3f3e8 !important; }
.ct-grid .dxbl-grid-table > tbody > tr.dxbl-grid-selected-row > td:first-child { box-shadow: inset 3px 0 0 var(--ct-chinh); }
.ct-rong-luoi { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 12px; color: var(--ct-phu); font-size: 14px; }
.ct-rong-luoi .oi { font-size: 26px; color: #cbd5e1; }
.ct-khoi-bang { box-shadow: var(--ct-bong); border-radius: 14px; }
.ct-bang th { padding: 10px; font-weight: 800; color: #475569; }
.ct-bang td { padding: 9px 10px; border-bottom-color: #eef2f6; }
.ct-bang tbody tr:hover td { background: #f6fbf7; }
.ct-bang tbody tr:last-child td { border-bottom: 0; }
.ct-khoi, .ct-chitiet, .ct-the { box-shadow: var(--ct-bong); }

.ct-bang .giua { text-align: center; }
.ai-gh { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ai-gh .kieu { width: 170px !important; }
.ai-gh .so-hm { width: 150px !important; }
.ai-gh .ky { width: 130px !important; }
/* Chỉ hiện trên điện thoại */
.ct-chan, .ct-man, .ct-menu .ct-menu-ai, .ct-menu .ct-menu-tk { display: none; }
.ct-grid .dxbl-grid-header-content { font-weight: 800; color: #475569; }

@media (max-width: 900px) {
    .ct-tren { gap: 8px; padding: 0 10px; }
    .ct-logo span { display: none; }
    .ct-logo img { width: 32px; height: 32px; }
    .ct-tim { margin-left: 0; }
    .ct-gian { display: none; }
    .ct-nguoi { display: none; }
    .ct-thoat { width: 36px; padding: 0; justify-content: center; }
    /* Menu thành ngăn trượt; trạng thái "thu gọn" của máy tính không áp dụng */
    .ct-menu, .ct-khung.menu-gon .ct-menu { position: fixed; z-index: 60; top: 56px; bottom: 0; left: 0; width: min(300px, 86vw); flex-basis: auto; padding: 10px 8px 24px; transform: translateX(-105%); transition: transform .22s ease; box-shadow: 12px 0 30px -12px rgba(15, 23, 42, .45); overflow-y: auto; }
    .ct-khung.menu-gon .ct-menu .chu, .ct-khung.menu-gon .ct-menu .mui { display: inline; }
    .ct-khung.menu-gon .ct-menu a, .ct-khung.menu-gon .ct-menu .nhom { justify-content: flex-start; padding: 11px 12px; border-top: 0; border-radius: 10px; }
    .ct-khung.menu-gon .ct-menu .mui { margin-left: auto; }
    .ct-khung.menu-gon .ct-menu .ct-nhom.dong .ds { display: none; }
    .ct-khung.menu-mo .ct-menu { transform: none; }
    .ct-man { display: block; position: fixed; z-index: 55; top: 56px; left: 0; right: 0; bottom: 0; background: rgba(15, 23, 42, .4); opacity: 0; pointer-events: none; transition: opacity .2s; }
    .ct-khung.menu-mo .ct-man { opacity: 1; pointer-events: auto; }
    .ct-menu a { padding: 11px 12px; font-size: 15px; }
    .ct-menu .ct-menu-ai { display: flex; align-items: center; gap: 10px; padding: 10px 12px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--ct-vien); }
    .ct-menu-ai > .oi { flex: 0 0 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--ct-nhat); color: var(--ct-chinh); }
    .ct-menu-ai span { display: flex; flex-direction: column; min-width: 0; }
    .ct-menu-ai small { color: var(--ct-phu); font-size: 14px; }
    .ct-menu .ct-menu-tk { display: flex; border-top: 1px solid var(--ct-vien); padding-top: 8px; margin-top: 4px; }
    .ct-trang { padding: 14px 12px 24px; gap: 12px; }
    .ct-dautrang { align-items: stretch; }
    .ct-dautrang h2 { font-size: 19px; }
    .ct-dautrang > div:not(:first-child) { width: 100%; }
    .ct-loc { gap: 8px; }
    .ct-loc > * { flex: 1 1 150px; min-width: 0; }
    .ct-loc .dxbl-text-edit, .ct-loc .dxbl-combobox, .ct-loc .dxbl-date-edit, .ct-loc > .dxbl-btn { width: auto !important; max-width: 100%; }
    .ct-the-hang { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .ct-the { padding: 12px 14px; }
    .ct-the b { font-size: 22px; }
    .ct-chitiet .nut, .ct-khoi .nut, .cd-khoi .nut { justify-content: stretch; }
    .ct-chitiet .nut > *, .ct-khoi .nut > *, .cd-khoi .nut > * { flex: 1 1 140px; }
    .mc-form, .cd-nguon { grid-template-columns: 1fr; }
    .ct-chitiet dl { grid-template-columns: 96px 1fr; }
    /* Truy vấn: xếp dọc (cây đối tượng gọn, ô lệnh, kết quả, AI) */
    .ct-noidung:has(.tv2) { overflow: auto; }
    .tv2, .tv2.co-ai, .tv2.an-cay, .tv2.an-cay.co-ai { display: flex; flex-direction: column; height: auto; }
    .tv2-cay { border-right: 0; border-bottom: 1px solid var(--ct-vien); }
    .tv2-ds { max-height: 240px; }
    .tv2-chinh { overflow: visible; padding: 12px; }
    .tv2-sql .tv-o textarea { min-height: 200px; }
    .tv2.o-to .tv2-sql .tv-o textarea { min-height: 60vh; }
    .tv2-ai { border-left: 0; border-top: 1px solid var(--ct-vien); height: 560px; }
    .tv2-dt .nut { opacity: 1; }
    .tv2-mau-ds { width: min(360px, 92vw); }
    .tv2-loc { width: 100%; }
    .ai-khung.toan-trang { height: calc(100vh - 200px); }
}

@media (max-width: 760px) {
    .ct-thoat { display: none; }
    .ct-tim { height: 36px; }
    .ct-noidung { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
    /* Thanh chân trang 5 nút */
    .ct-chan { display: flex; position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; height: calc(60px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--ct-vien); box-shadow: 0 -8px 20px -14px rgba(15, 23, 42, .45); }
    .ct-chan a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ct-phu); font-size: 14px; font-weight: 700; text-decoration: none !important; }
    .ct-chan a .oi { font-size: 18px; }
    .ct-chan a.active { color: var(--ct-chinh); }
    .ct-chan a.active .oi { background: var(--ct-nhat); border-radius: 999px; padding: 4px 14px; }
    .ct-menu, .ct-khung.menu-gon .ct-menu { z-index: 70; }
    .ct-man { z-index: 65; }

    /* Lưới / bảng thành thẻ: mỗi dòng một thẻ, nhãn ô = tiêu đề cột (center.js gắn data-n) */
    .ct-grid.dxbl-grid { border: 0 !important; box-shadow: none; background: transparent; overflow: visible; }
    .ct-grid .dxbl-scroll-viewer, .ct-grid .dxbl-scroll-viewer-content { overflow: visible !important; height: auto !important; max-height: none !important; }
    .ct-grid .dxbl-scroll-viewer-vert-scroll-bar, .ct-grid .dxbl-scroll-viewer-hor-scroll-bar { display: none !important; }
    .ct-grid table.dxbl-grid-table, table.ct-bang { display: block; width: 100% !important; min-width: 0 !important; table-layout: auto !important; border: 0; }
    .ct-grid table.dxbl-grid-table > colgroup, .ct-grid table.dxbl-grid-table > thead, table.ct-bang > thead { display: none; }
    .ct-grid table.dxbl-grid-table > tbody, table.ct-bang > tbody { display: flex; flex-direction: column; gap: 10px; }
    .ct-grid table.dxbl-grid-table > tbody > tr, table.ct-bang > tbody > tr { display: block; background: #fff; border: 1px solid var(--ct-vien); border-radius: 14px; padding: 6px 14px; box-shadow: var(--ct-bong); }
    .ct-grid table.dxbl-grid-table > tbody > tr > td, table.ct-bang > tbody > tr > td { display: block; position: relative; min-height: 36px; padding: 8px 0 8px calc(38% + 10px) !important; border: 0 !important; border-bottom: 1px dashed #eef2f6 !important; white-space: normal !important; text-align: left !important; overflow: visible !important; text-overflow: clip !important; word-break: break-word; background: transparent !important; box-shadow: none !important; }
    .ct-grid table.dxbl-grid-table > tbody > tr > td:last-child, table.ct-bang > tbody > tr > td:last-child { border-bottom: 0 !important; }
    .ct-grid table.dxbl-grid-table > tbody > tr > td::before, table.ct-bang > tbody > tr > td::before { content: attr(data-n); position: absolute; left: 0; top: 8px; width: 38%; color: var(--ct-phu); font-size: 14px; font-weight: 700; line-height: 1.4; }
    .ct-grid table.dxbl-grid-table > tbody > tr > td[data-n=""]::before, table.ct-bang > tbody > tr > td[data-n=""]::before { display: none; }
    .ct-grid table.dxbl-grid-table > tbody > tr > td[data-n=""], table.ct-bang > tbody > tr > td[data-n=""] { padding-left: 0 !important; }
    .ct-grid table.dxbl-grid-table > tbody > tr > td:empty, table.ct-bang > tbody > tr > td:empty { display: none; }
    .ct-grid table.dxbl-grid-table > tbody > tr > td:first-child, table.ct-bang > tbody > tr > td:first-child { font-size: 15px; font-weight: 800; }
    .ct-grid table.dxbl-grid-table > tbody > tr.dxbl-grid-selected-row { border-color: var(--ct-chinh); box-shadow: 0 0 0 2px #bfe3cb, var(--ct-bong); }
    .ct-grid table.dxbl-grid-table > tbody > tr.dxbl-grid-selected-row { background: #f3faf5; }
    .ct-grid table.dxbl-grid-table > tbody > tr.dxbl-grid-selected-row > td { background: transparent !important; box-shadow: none !important; }
    .ct-grid table.dxbl-grid-table > tbody > tr > td[data-n]::before { content: attr(data-n) !important; position: absolute !important; inset: 8px auto auto 0 !important; width: 38% !important; height: auto !important; background: none !important; opacity: 1 !important; z-index: 1 !important; color: var(--ct-phu) !important; font-size: 14px; font-weight: 700; line-height: 1.4; pointer-events: none; }
    .ct-grid table.dxbl-grid-table > tbody > tr > td[data-n=""]::before { display: none !important; }
    .ct-grid table.dxbl-grid-table > tbody > tr.ct-dong-rong, table.ct-bang > tbody > tr.ct-dong-rong { padding: 0; }
    .ct-grid table.dxbl-grid-table > tbody > tr.ct-dong-rong > td, table.ct-bang > tbody > tr.ct-dong-rong > td { display: block; }
    table.ct-bang > tbody > tr > td .dxbl-text-edit, table.ct-bang > tbody > tr > td .dxbl-combobox, table.ct-bang > tbody > tr > td .dxbl-spin-edit { width: 100% !important; max-width: 100%; }
    table.ct-bang .so, table.ct-bang .giua { text-align: left !important; }
    .ai-gh .kieu, .ai-gh .so-hm, .ai-gh .ky { width: 100% !important; }
    table.ct-bang td.nut { display: flex !important; flex-wrap: wrap; gap: 8px; padding: 10px 0 6px !important; }
    table.ct-bang td.nut::before { display: none; }
    table.ct-bang td.nut > * { flex: 1 1 120px; }
    .ct-khoi-bang { border: 0; background: transparent; box-shadow: none; overflow: visible; }
    .ai-thanh { width: 100%; }
}

/* ═════ Quản lý & chăm sóc khách hàng (cs-*) ═════ */
.ct-the-hang a.ct-the { color: var(--ct-chu); text-decoration: none; }
.ct-the-hang a.ct-the:hover { border-color: #9fd2b0; }
.ct-the small.nho { font-size: 14px; }
.cs-luoi-bam .dxbl-grid-table > tbody > tr, .cs-bam tbody tr { cursor: pointer; }
.cs-form.ba { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cs-form.ba .rong { grid-column: 1 / -1; }
.cs-form .hang-chk { flex-direction: row; align-items: center; gap: 8px; font-weight: 600; }
.cs-cuon { overflow-x: auto; margin: 8px 0; border: 1px solid var(--ct-vien); border-radius: 12px; }
.cs-cuon .ct-bang { min-width: 100%; }
.cs-dong { min-width: 1500px !important; }
.cs-dong td { padding: 6px; }
.cs-o-sp { width: 230px !important; } .cs-o-ten { width: 240px !important; } .cs-o-sl { width: 82px !important; } .cs-o-dvt { width: 80px !important; }
.cs-o-tien { width: 130px !important; } .cs-o-ngay { width: 140px !important; } .cs-o-data { width: 160px !important; }
.cs-nut-hang { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0; }
.cs-them { margin-top: 8px; }
.cs-tong { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 10px 14px; margin-bottom: 8px; border-radius: 12px; background: #f6fbf7; border: 1px solid #d6ecdd; font-size: 14px; }
.cs-tong b { font-size: 16px; }
.cs-tong .lon b { color: var(--ct-chinh); font-size: 18px; }
.cs-tong .do b { color: #dc2626; }
.cs-popup .dxbl-modal-body { max-height: calc(100vh - 170px); overflow: auto; }

/* Hồ sơ 360 */
.ct-chitiet.cs-360 { flex: none; max-width: none; width: auto; position: static; }
.cs-360-dau { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cs-360-dau b { font-size: 18px; }
.cs-360-dau .nut { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-hai { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding-top: 10px; }
.cs-hai dl { display: grid; grid-template-columns: 130px 1fr; gap: 6px 10px; margin: 0; font-size: 14px; }
.cs-hai dt { color: var(--ct-phu); }
.cs-hai dd { margin: 0; word-break: break-word; }
.cs-lh { padding: 8px 0; border-bottom: 1px dashed var(--ct-vien); font-size: 14px; }
.cs-lh a { margin-right: 14px; }
.ct-chitiet-nd { white-space: pre-wrap; padding: 10px; border-radius: 10px; background: #f8fafc; font-size: 14px; margin-top: 6px; }
.cs-dong-thoi { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; }
.cs-moc { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--ct-vien); border-left: 4px solid #94a3b8; background: #fff; cursor: pointer; font-size: 14px; }
.cs-moc.xong { border-left-color: var(--ct-chinh); }
.cs-moc.qua { border-left-color: #dc2626; background: #fff7f7; }
.cs-moc .ngay { font-weight: 800; margin-right: 8px; }
.cs-quyen { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px dashed var(--ct-vien); border-radius: 12px; }

/* Cơ hội dạng bảng giai đoạn */
.cs-bang-gd { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.cs-cot { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 14px; background: #eef2f6; min-height: 200px; }
.cs-cot.thang { background: #ecfdf3; } .cs-cot.thua { background: #fdf0f0; }
.cs-cot-dau { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.cs-co-hoi { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--ct-vien); box-shadow: var(--ct-bong); cursor: pointer; font-size: 14px; }
.cs-co-hoi:hover { border-color: #9fd2b0; }
.cs-co-hoi.tre { border-left: 4px solid #dc2626; }
.cs-co-hoi .cs-sp { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-co-hoi-so { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; color: #334155; }
.cs-co-hoi-nut { display: flex; gap: 6px; margin-top: 4px; }
.cs-co-hoi-nut button { border: 1px solid var(--ct-vien); background: #fff; border-radius: 8px; padding: 4px 10px; cursor: pointer; font-size: 14px; color: var(--ct-chu); }
.cs-co-hoi-nut button:hover { background: var(--ct-nhat); border-color: #9fd2b0; }
.cs-co-hoi-nut button.bg { flex: 1; color: var(--ct-chinh-dam); font-weight: 700; }

/* Lịch chăm sóc */
.cs-viec { display: flex; flex-direction: column; gap: 8px; }
.cs-viec-nhom { margin-top: 8px; font-weight: 800; color: var(--ct-phu); text-transform: uppercase; letter-spacing: .5px; font-size: 14px; }
.cs-viec-the { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--ct-vien); border-left: 4px solid #2563eb; box-shadow: var(--ct-bong); cursor: pointer; }
.cs-viec-the.qua { border-left-color: #dc2626; background: #fff8f8; }
.cs-viec-the.xong { border-left-color: var(--ct-chinh); opacity: .8; }
.cs-viec-the.huy { border-left-color: #94a3b8; opacity: .6; }
.cs-viec-the .gio { flex: 0 0 58px; display: flex; flex-direction: column; align-items: center; font-weight: 800; font-size: 17px; }
.cs-viec-the .gio small { font-size: 14px; color: var(--ct-phu); font-weight: 600; }
.cs-viec-the .nd { flex: 1; min-width: 0; font-size: 14px; display: flex; flex-direction: column; gap: 3px; }
.cs-xong { border: 1px solid #9fd2b0; background: var(--ct-nhat); color: var(--ct-chinh-dam); border-radius: 10px; padding: 8px 14px; font-weight: 800; cursor: pointer; font-size: 14px; white-space: nowrap; }
.cs-xong:hover { background: #d9efe0; }

/* Tổng quan */
.cs-thanh-dong { display: grid; grid-template-columns: 120px 1fr auto; align-items: center; gap: 10px; font-size: 14px; }
.cs-thanh-dong .thanh { height: 12px; border-radius: 6px; background: #eef2f6; overflow: hidden; }
.cs-thanh-dong .thanh i { display: block; height: 100%; border-radius: 6px; background: var(--ct-chinh); }
.cs-thanh-dong .thanh i.cam { background: #ef7d00; } .cs-thanh-dong .thanh i.do { background: #dc2626; } .cs-thanh-dong .thanh i.tim { background: #7c3aed; } .cs-thanh-dong .thanh i.xanhduong { background: #2563eb; }
.cs-thanh-dong .so { color: var(--ct-phu); white-space: nowrap; }
.cs-cot-thang { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: 180px; }
.cs-cot-thang .cot { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; font-size: 14px; color: var(--ct-phu); }
.cs-cot-thang .cot i { display: block; width: 70%; min-height: 2px; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, #22a04b, #1b8a3e); }
.cs-cot-thang .cot.nay i { background: linear-gradient(180deg, #f59e0b, #ef7d00); }
.cs-cot-thang .cot.nay span { color: var(--ct-chu); font-weight: 800; }
.ct-khoi h3 .nho { font-weight: 600; font-size: 14px; margin-left: 8px; }
tr.cs-qua td { color: #b91c1c; }

@media (max-width: 900px) {
    .cs-form.ba { grid-template-columns: 1fr; }
    .cs-hai { grid-template-columns: 1fr; }
    .cs-360-dau .nut > * { flex: 1 1 140px; }
    .cs-bang-gd { grid-auto-columns: minmax(82vw, 1fr); scroll-snap-type: x mandatory; }
    .cs-cot { scroll-snap-align: start; }
}
@media (max-width: 760px) {
    .cs-cuon { border: 0; overflow: visible; }
    .cs-dong { min-width: 0 !important; }
    .cs-o-sp, .cs-o-ten, .cs-o-sl, .cs-o-dvt, .cs-o-tien, .cs-o-ngay, .cs-o-data { width: 100% !important; }
    .cs-viec-the { align-items: flex-start; flex-wrap: wrap; }
    .cs-viec-the .cs-xong { width: 100%; padding: 10px; }
    .cs-thanh-dong { grid-template-columns: 96px 1fr; }
    .cs-thanh-dong .so { grid-column: 2; }
    .cs-popup .dxbl-modal-body { max-height: none; }
}

/* ── Mẫu báo giá / hợp đồng và văn bản (soạn như Word) ── */
.cs-nut-tep { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px; background: var(--ct-chinh); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; overflow: hidden; }
.cs-nut-tep input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cs-mau-luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.cs-mau-the { background: #fff; border: 1px solid var(--ct-vien); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--ct-bong); }
.cs-mau-the.ngung { opacity: .65; }
.cs-mau-the .dau { display: flex; gap: 12px; align-items: flex-start; }
.cs-mau-the .dau b { font-size: 15.5px; line-height: 1.35; }
.cs-mau-the .bieu { flex: 0 0 auto; width: 44px; height: 54px; border-radius: 8px; display: grid; place-items: center; font-size: 20px; color: #fff; box-shadow: inset 0 -10px 0 rgba(0,0,0,.08); }
.cs-mau-the .bieu.bg { background: linear-gradient(160deg, #22a04b, #157a35); }
.cs-mau-the .bieu.hd { background: linear-gradient(160deg, #3b82f6, #1d4ed8); }
.cs-mau-the .nhan { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cs-mau-the p { margin: 0; color: #334155; font-size: 14px; line-height: 1.5; }
.cs-mau-the small { color: var(--ct-phu); font-size: 13.5px; }
.cs-mau-the .nut { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; border-top: 1px dashed var(--ct-vien); }
.cs-vb-popup .dxbl-modal-body.cs-vb-than { padding: 10px 12px !important; overflow: hidden; display: flex; flex-direction: column; }
.cs-vb-soan { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; height: 100%; }
.cs-vb-thanh { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cs-vb-thanh .ten { flex: 1 1 280px; min-width: 200px; }
.cs-vb-thanh .gian { flex: 1 1 auto; }
.cs-mau-tt { display: grid; grid-template-columns: minmax(220px, 2fr) 210px minmax(220px, 2fr) auto auto; gap: 8px 12px; align-items: end; }
.cs-mau-tt label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; margin: 0; }
.cs-mau-tt .hang-chk { flex-direction: row; align-items: center; gap: 6px; padding-bottom: 8px; white-space: nowrap; }
.cs-mau-tt .mota { grid-column: 1 / -1; }
.cs-soan { flex: 1 1 auto; min-height: 0; display: flex; gap: 10px; }
.cs-soan-re { position: relative; flex: 1 1 auto; min-width: 0; height: 100%; border: 1px solid var(--ct-vien); border-radius: 10px; overflow: hidden; }
.cs-re { height: 100% !important; width: 100% !important; }
.cs-soan-cho { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.85); color: var(--ct-phu); font-size: 15px; z-index: 5; }
.cs-soan-ben { flex: 0 0 250px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; font-size: 14px; padding-right: 2px; }
.cs-soan-ben small { color: var(--ct-phu); font-size: 13px; line-height: 1.45; margin-bottom: 4px; }
.cs-soan-nhom { margin-top: 8px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; color: #475569; }
.cs-soan-ben button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 5px 10px; border: 1px solid var(--ct-vien); border-radius: 10px; background: #fff; color: inherit; text-align: left; cursor: pointer; font-size: 14px; line-height: 1.35; }
.cs-soan-ben button code { font-size: 14px; color: #64748b; background: none; padding: 0; }
.cs-soan-ben button.bang { border-color: #93c5fd; background: #eff6ff; }
.cs-soan-ben button:hover { background: #ecfdf3; border-color: #86efac; }
.cs-vb-lap { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 6px; }
.cs-vb-lap label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; flex: 1 1 360px; margin: 0; }
.cs-vb-ds { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.cs-vb-dong { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--ct-vien); border-radius: 12px; background: #fff; }
.cs-vb-dong .bieu { font-size: 20px; color: #2563eb; }
.cs-vb-dong .nd { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cs-vb-dong .nd b { font-size: 15px; }
.cs-vb-dong .nd small { color: var(--ct-phu); font-size: 13.5px; }
.cs-vb-dong .nut { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 900px) {
    .cs-mau-tt { grid-template-columns: 1fr 1fr; }
    .cs-mau-tt .ten, .cs-mau-tt .ad { grid-column: 1 / -1; }
    .cs-soan { flex-direction: column; }
    .cs-soan-ben { flex: 0 0 auto; max-height: 150px; flex-direction: row; flex-wrap: wrap; overflow-y: auto; }
    .cs-soan-ben > b, .cs-soan-ben > small, .cs-soan-nhom { flex: 1 1 100%; }
    .cs-soan-ben button code { display: none; }
    .cs-soan-re { min-height: 60vh; }
}
@media (max-width: 760px) {
    .cs-mau-luoi { grid-template-columns: 1fr; }
    .cs-vb-dong { flex-wrap: wrap; }
    .cs-vb-dong .nut { width: 100%; }
}

/* ── Truy vấn kiểu SSMS: ô lệnh trên, thanh kéo, kết quả dưới (mỗi vùng tự cuộn) ── */
.tv2-chinh { overflow: hidden; padding: 10px 14px 10px; gap: 6px; }
.tv2-huong { margin: 0; }
.tv2-cong-cu { gap: 6px 14px; padding: 4px 0; }
.tv2-nhom-nut { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tv2-nhom-nut + .tv2-nhom-nut { padding-left: 14px; border-left: 1px solid var(--ct-vien); }
.tv2-them { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; }
.tv2-sql { flex: 0 0 auto; height: var(--tv-cao, 36%); min-height: 70px; display: flex; }
.tv2-sql .tv-o { flex: 1; height: 100% !important; }
.tv2-sql .tv-o textarea, .tv2-sql textarea { height: 100% !important; min-height: 0 !important; resize: none !important; line-height: 1.5; }
.tv2.kq-to .tv2-sql { height: 76px !important; }
.tv2-keo { flex: 0 0 auto; height: 10px; cursor: row-resize; display: flex; align-items: center; justify-content: center; border-radius: 6px; touch-action: none; }
.tv2-keo span { width: 64px; height: 4px; border-radius: 4px; background: #cbd5e1; }
.tv2-keo:hover span, .tv2-keo.dang span { background: var(--ct-chinh); }
.tv2-kq { flex: 1 1 auto; min-height: 120px; display: flex; flex-direction: column; border: 1px solid var(--ct-vien); border-radius: 12px; background: #fff; overflow: hidden; }
.tv2-kq .tv2-kq-the { margin: 0; padding: 0 8px; background: #f8fafc; flex: 0 0 auto; }
.tv2-kq-the button { display: inline-flex; align-items: center; gap: 6px; }
.tv2-nut-to { border: 1px solid var(--ct-vien) !important; border-radius: 8px; background: #fff !important; margin: 4px 0; padding: 4px 10px !important; }
.tv2-kq-than { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 8px; }
.tv2-bang { display: flex; flex-direction: column; gap: 4px; }
.tv2-bang .tv-cuon { max-height: 55vh; }
.tv2-bang.mot { flex: 1 1 auto; min-height: 0; }
.tv2-bang.mot .tv-cuon { flex: 1 1 auto; min-height: 80px; max-height: none; }
.tv2-bang-dau { margin-top: 0; }
.tv2-bao { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; cursor: pointer; }
.tv-bang .tv-th { resize: horizontal; overflow: hidden; min-width: 40px; padding-right: 6px; }
.tv-bang td { cursor: cell; }
.tv-bang td.o-chon { outline: 2px solid var(--ct-chinh); outline-offset: -2px; background: #ecfdf3 !important; }
.tv-bang.bao td { white-space: pre-wrap; max-width: 520px; word-break: break-word; vertical-align: top; }
.tv2-trong { flex-direction: column; text-align: center; gap: 6px; }
.tv2-trong .oi { font-size: 26px; color: #cbd5e1; }
.tv2-trong small { color: var(--ct-phu); font-size: 13.5px; max-width: 640px; }
.tv-ls { display: flex; flex-direction: column; }
.tv-o-xem { position: fixed; z-index: 2000; width: min(560px, 92vw); max-height: 60vh; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--ct-vien); border-radius: 12px; box-shadow: 0 18px 40px -14px rgba(15, 23, 42, .45); }
.tv-o-xem .dau { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--ct-vien); font-size: 14px; }
.tv-o-xem .dau b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-o-xem .dau button { border: 1px solid var(--ct-vien); background: #fff; border-radius: 8px; padding: 3px 10px; font-size: 14px; cursor: pointer; }
.tv-o-xem pre { margin: 0; padding: 10px 12px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-family: Consolas, "Cascadia Mono", monospace; font-size: 14px; }
@media (max-width: 900px) {
    .tv2-chinh { overflow: visible; }
    .tv2-sql { height: 220px; }
    .tv2.kq-to .tv2-sql { height: 76px !important; }
    .tv2-keo { display: none; }
    .tv2-kq { min-height: 320px; }
    .tv2-kq-than { max-height: 75vh; }
    .tv2-nhom-nut + .tv2-nhom-nut { padding-left: 0; border-left: 0; }
}

/* ── Mọi hộp thoại: không cao quá màn hình, thân tự cuộn, chân (Lưu / Đóng) luôn thấy ── */
.dxbl-modal-content { max-height: calc(100dvh - 16px); display: flex; flex-direction: column; }
.dxbl-modal-content > .dxbl-modal-header, .dxbl-modal-content > .dxbl-modal-footer { flex: 0 0 auto; }
.dxbl-modal-content > .dxbl-modal-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
.dxbl-modal-footer { gap: 8px; background: #f8fafc; }

/* ── Email hệ thống ── */
.em-luoi { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.em-form { display: flex; flex-direction: column; gap: 10px; }
.em-buoc { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 15.5px; }
.em-buoc span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ct-chinh); color: #fff; font-weight: 800; font-size: 14px; }
/* Chữ ký: chuyển Soạn thảo / Mã HTML */
.em-buoc span.ck-che { width: auto; height: auto; border-radius: 9px; background: #f1f5f9; color: inherit; display: inline-flex; gap: 2px; padding: 2px; margin-left: auto; font-weight: 600; }
.ck-che button { height: 28px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; font-size: 13px; font-weight: 600; cursor: pointer; color: #475569; }
.ck-che button.chon { background: #fff; color: #14532d; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.ck-ma { width: 100%; min-height: 160px; resize: vertical; padding: 10px; border: 1px solid var(--ct-vien); border-radius: 10px; font: 12.5px/1.5 Consolas, "Cascadia Mono", monospace; tab-size: 2; }
.ck-xem { width: 100%; height: 200px; border: 1px dashed var(--ct-vien); border-radius: 10px; background: #fff; }
.em-dv { display: flex; flex-wrap: wrap; gap: 8px; }
.em-dv button { height: 36px; padding: 0 14px; border: 1px solid var(--ct-vien); border-radius: 10px; background: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.em-dv button.chon { border-color: var(--ct-chinh); background: #ecfdf3; color: #14532d; box-shadow: inset 0 0 0 1px var(--ct-chinh); }
.em-goi-y { margin: 0; }
.em-form small { color: var(--ct-phu); font-size: 13.5px; font-weight: 500; }
.em-lk { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.em-thu { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.em-thu label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 280px; font-size: 14px; font-weight: 600; }
.em-hd { font-size: 14px; line-height: 1.55; }
.em-hd ol { margin: 8px 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 1000px) { .em-luoi { grid-template-columns: 1fr; } }

/* ── Nhân viên hỗ trợ ── */
.nv-mk { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #fcd34d; background: #fffbeb; border-radius: 12px; }
.nv-mk > .oi { font-size: 20px; color: #b45309; }
.nv-mk > div { flex: 1 1 320px; display: flex; flex-direction: column; gap: 2px; font-size: 14.5px; }
.nv-mk code { font-size: 18px; font-weight: 800; letter-spacing: 1px; color: #0f172a; background: #fff; padding: 2px 8px; border-radius: 6px; border: 1px solid #fde68a; align-self: flex-start; }
.nv-mk small { color: #92400e; font-size: 13.5px; }
.nv-muc { margin-top: 6px; padding-bottom: 4px; border-bottom: 1px solid var(--ct-vien); font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: .3px; color: #475569; }
.nv-chk { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 18px; }
.nv-mk-o { display: flex; gap: 8px; }
.nv-mk-o > :first-child { flex: 1; }
.mc-form small { color: var(--ct-phu); font-size: 13.5px; font-weight: 500; }

/* ── Liên kết chia sẻ của người dùng ── */
.lk-nd { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px solid #bfdbfe; background: #eff6ff; border-radius: 12px; }
.lk-nd > b { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #1e40af; }
.lk-nd .dong { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: space-between; font-size: 14px; }
.lk-nd .dong small { display: block; color: var(--ct-phu); font-size: 13px; }
.lk-nd .nut, .cs-mo-lk { display: flex; flex-wrap: wrap; gap: 6px; }
.ct-nut-lk.chinh { background: var(--ct-chinh); color: #fff !important; border-color: var(--ct-chinh); }
.tv2-trong { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 12px; }

/* ── Form chuẩn Winta Center (popup): tiêu đề, ô nhập phẳng bo 8px, nhãn đậm, chân form trái / phải ── */
.dxbl-modal-header { background: #fff; border-bottom: 1px solid var(--ct-vien); }
.dxbl-modal-header .dxbl-modal-title { font-size: 17px; font-weight: 800; color: #0f172a; }
.cf-tieude { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 800; color: #0f172a; }
.cf-che-do { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 999px; font-size: 14px; font-weight: 500; color: #475569; background: #fff; }
.dxbl-modal .dxbl-text-edit, .dxbl-modal .dxbl-memo-edit { border-radius: 8px; }
.dxbl-modal .dxbl-text-edit:focus-within { border-color: var(--ct-chinh); box-shadow: 0 0 0 3px rgba(27, 138, 62, .14); }
.dxbl-modal .mc-form label, .cf-luoi label { color: #29333d; }
.dxbl-modal-body .ct-bang th { background: #f1f5f9; color: #334155; border-bottom: 1px solid #cbd5e1; }
.dxbl-modal-body .ct-bang tbody tr:nth-child(even) td { background: #fafcfb; }
.dxbl-modal-footer { padding: 10px 16px; border-top: 1px solid var(--ct-vien); }
.dxbl-modal-footer .dxbl-btn { height: 34px; border-radius: 9px; font-size: 14px; }
.dxbl-modal-footer .dxbl-btn-primary { font-weight: 800; }

.cf-popup .dxbl-modal-body { padding: 0 16px 12px; }
.cf-dau { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 -16px 10px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--ct-vien); box-shadow: 0 6px 10px -10px rgba(15, 23, 42, .5); }
.cf-dau.bg { border-top: 4px solid #2563eb; }
.cf-dau.hd { border-top: 4px solid var(--ct-chinh); }
.cf-dau-trai { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-width: 0; }
.cf-dau-trai > b { font-size: 17px; color: #0f172a; }
.cf-loai { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 6px; font-size: 14px; font-weight: 800; letter-spacing: .8px; color: #fff; }
.cf-dau.bg .cf-loai { background: #2563eb; }
.cf-dau.hd .cf-loai { background: var(--ct-chinh); }
.cf-khach, .cf-nguon { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 14px; border: 1px solid var(--ct-vien); background: #f8fafc; color: #334155; max-width: 420px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cf-nguon { border-color: #bfdbfe; background: #eff6ff; color: #1e40af; }
.cf-dau-tong { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; font-size: 14px; color: #475569; }
.cf-dau-tong b { font-size: 15px; color: #0f172a; margin-left: 4px; }
.cf-dau-tong .lon b { font-size: 18px; color: var(--ct-chinh); }
.cf-dau-tong .lon.cam b { color: #c2410c; }
.cf-dau-tong .do b { color: #dc2626; }
.cf-dai { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; padding: 10px 12px; border-radius: 10px; font-size: 14.5px; border: 1px solid; }
.cf-dai > span:nth-child(2) { flex: 1 1 360px; }
.cf-dai.cam { background: #fff7ed; border-color: #fdba74; color: #7c2d12; }
.cf-dai.xanhduong { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.cf-dai.xanh { background: #ecfdf3; border-color: #86efac; color: #14532d; }
.cf-bao { position: sticky; top: 58px; z-index: 2; }
.cf-the .dxbl-tabs-item { font-size: 14.5px; }
.cf-the .dxbl-tabs-content { padding-top: 12px; }
.cf-luoi { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; margin-bottom: 8px; }
.cf-luoi label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 14px; }
.cf-luoi .hai { grid-column: span 2; }
.cf-luoi .rong { grid-column: 1 / -1; }
.cf-luoi .cf-chk { flex-direction: row; align-items: center; gap: 8px; align-self: end; height: 36px; padding: 0 10px; border: 1px dashed #93c5fd; border-radius: 8px; background: #eff6ff; color: #1e40af; cursor: pointer; }
.cf-nhom { grid-column: 1 / -1; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; padding-bottom: 4px; border-bottom: 1px solid var(--ct-vien); font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: .4px; color: #475569; }
.cf-nhom small { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ct-phu); font-size: 14px; }
.cf-nhom-rieng { margin: 14px 0 0; }
.cf-pa { display: grid; grid-template-columns: 220px 220px minmax(0, 1fr); gap: 10px; margin-bottom: 10px; }
.cf-pa > button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 12px; border: 1px solid var(--ct-vien); border-top: 4px solid #16a34a; border-radius: 10px; background: #fff; cursor: pointer; text-align: left; font-family: inherit; }
.cf-pa > button.pa2 { border-top-color: #ef7d00; }
.cf-pa > button small { font-size: 13px; font-weight: 800; letter-spacing: .5px; color: #c2410c; }
.cf-pa > button b { font-size: 15px; color: #0f172a; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-pa > button span { font-size: 16px; font-weight: 800; color: var(--ct-chinh); }
.cf-pa > button.chon { background: #ecfdf3; box-shadow: inset 0 0 0 2px #16a34a; }
.cf-pa > button.pa2.chon { background: #fff7ed; box-shadow: inset 0 0 0 2px #ef7d00; }
.cf-pa-sua { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; align-content: center; }
.cf-pa-sua label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 14px; }
.cs-dong.gon { min-width: 1000px !important; }
.cf-o-cv { width: 300px !important; } .cf-o-mt { width: 320px !important; } .cf-o-nd { min-width: 360px; }
.cf-lo-trinh, .cf-tt { min-width: 900px; }
.cf-gantt { display: grid; gap: 2px; min-width: 160px; height: 18px; }
.cf-gantt i { border-radius: 3px; background: #eef2f6; }
.cf-gantt i.co { background: linear-gradient(90deg, #16a34a, #22c55e); }
.cf-tt tfoot td { background: #f8fafc; border-top: 1px solid #cbd5e1; }
.cf-lech { color: #dc2626; font-weight: 700; }
.cf-chan { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
.cf-chan .trai, .cf-chan .phai { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cf-chan .phai { margin-left: auto; }
@media (max-width: 900px) {
    .cf-luoi { grid-template-columns: 1fr 1fr; }
    .cf-pa { grid-template-columns: 1fr 1fr; }
    .cf-pa-sua { grid-column: 1 / -1; }
    .cf-dau, .cf-bao { position: static; }
}
@media (max-width: 560px) { .cf-luoi { grid-template-columns: 1fr; } .cf-luoi .hai { grid-column: auto; } }

/* ── Menu trái: nhóm chính (thẻ có biểu tượng màu) tách hẳn với chức năng con (thụt vào, có đường dẫn) ── */
.ct-menu { background: #f8fafc; gap: 6px; }
.ct-menu .ct-nhom { --mau: var(--ct-chinh); --mau-nen: #e7f5ec; margin-bottom: 4px; padding: 4px; border-radius: 14px; background: #fff; border: 1px solid #e8edf3; }
.ct-menu .ct-nhom[data-nhom="hotro"] { --mau: #2563eb; --mau-nen: #e8f0fe; }
.ct-menu .ct-nhom[data-nhom="cskh"] { --mau: #db2777; --mau-nen: #fce7f3; }
.ct-menu .ct-nhom[data-nhom="dulieu"] { --mau: #7c3aed; --mau-nen: #efe9fe; }
.ct-menu .ct-nhom[data-nhom="hethong"] { --mau: #ea580c; --mau-nen: #ffedd5; }
.ct-menu .nhom { margin: 0; padding: 7px 8px; gap: 10px; border-radius: 10px; color: #0f172a; font-size: 14.5px; font-weight: 800; letter-spacing: .2px; text-transform: none; }
.ct-menu .nhom:hover { background: var(--mau-nen); }
.ct-menu .nhom .oi:first-child { flex: 0 0 30px; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: var(--mau); color: #fff; font-size: 14px; box-shadow: 0 4px 10px -6px var(--mau); }
.ct-menu .nhom .mui { color: #94a3b8; }
.ct-menu .ct-nhom .ds { margin: 2px 0 4px 22px; padding-left: 8px; border-left: 2px solid var(--mau-nen); gap: 1px; }
.ct-menu .ct-nhom .ds a { padding: 7px 10px; border-radius: 8px; font-size: 14.5px; font-weight: 500; color: #334155; }
.ct-menu .ct-nhom .ds a .oi { width: 16px; font-size: 13px; color: #94a3b8; }
.ct-menu .ct-nhom .ds a:hover { background: var(--mau-nen); color: #0f172a; }
.ct-menu .ct-nhom .ds a:hover .oi { color: var(--mau); }
.ct-menu .ct-nhom .ds a.active { background: var(--mau-nen); color: #0f172a; font-weight: 800; box-shadow: inset 3px 0 0 var(--mau); }
.ct-menu .ct-nhom .ds a.active .oi { color: var(--mau); }
.ct-menu .ct-nhom.dong { background: transparent; border-color: transparent; }
.ct-menu .ct-menu-tk { background: transparent; border: 0; }
.ct-menu .ct-menu-tk .ds { margin-left: 0; border-left: 0; }
.ct-khung.menu-gon .ct-menu .ct-nhom { padding: 4px 2px; border-radius: 12px; }
.ct-khung.menu-gon .ct-menu .nhom { border-top: 0; padding: 4px 0; }
.ct-khung.menu-gon .ct-menu .ct-nhom .ds { margin: 2px 0 0; padding-left: 0; border-left: 0; }
.ct-khung.menu-gon .ct-menu .ct-nhom .ds a .oi { color: #64748b; font-size: 16px; }
@media (max-width: 900px) {
    .ct-khung.menu-gon .ct-menu .ct-nhom .ds, .ct-menu .ct-nhom .ds { margin: 2px 0 4px 22px; padding-left: 8px; border-left: 2px solid var(--mau-nen); }
    .ct-khung.menu-gon .ct-menu .nhom { padding: 7px 8px; }
}
.cf-tieude .cf-so { font-weight: 500; color: #475569; }

/* ── Số tự nhảy, rà soát & AI, yêu cầu riêng, đính kèm, thông tin công ty Winta ── */
.cf-tu { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 999px; background: #e1ebe4; color: #3f6b4c; font-size: 13px; font-weight: 700; }
.cf-rs { margin-bottom: 10px; padding: 10px 12px; border: 1px solid #c9dace; border-left: 4px solid #6a9a78; border-radius: 10px; background: #f6f9f7; display: flex; flex-direction: column; gap: 8px; }
.cf-rs-dau { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 15px; color: #2f5a3c; }
.cf-rs-dau .gian { flex: 1; }
.cf-rs-dong { border: 0; background: transparent; color: #64748b; cursor: pointer; padding: 4px 8px; font-size: 14px; }
.cf-rs-ds { display: flex; flex-direction: column; gap: 4px; }
.cf-rs-diem { display: flex; align-items: flex-start; gap: 8px; width: 100%; padding: 6px 10px; border: 1px solid transparent; border-radius: 8px; background: #fff; text-align: left; font-family: inherit; font-size: 14px; color: #1e293b; cursor: pointer; }
.cf-rs-diem:hover { border-color: #c9dace; }
.cf-rs-diem .oi { margin-top: 3px; }
.cf-rs-diem.loi .oi { color: #dc2626; } .cf-rs-diem.loi { background: #fef2f2; }
.cf-rs-diem.canh .oi { color: #c9742a; } .cf-rs-diem.canh { background: #fdf3e8; }
.cf-rs-diem.goiy .oi, .cf-rs-diem.ok .oi { color: #4a7a5a; }
.cf-rs-nhap { display: flex; flex-direction: column; gap: 6px; }
.cf-rs-nhap .dxbl-btn, .cf-ai-khung .dxbl-btn { align-self: flex-start; }
.cf-rs-ai { padding: 10px 12px; border-radius: 8px; background: #fff; border: 1px dashed #b8ccbe; font-size: 14px; }
.cf-rs-ai .nd { white-space: pre-wrap; line-height: 1.55; margin-top: 4px; }
.cf-muc { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 10px; margin-bottom: 8px; border: 1px solid #c9dace; border-radius: 10px; background: #fff; }
.cf-muc .so { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #e58a2e; color: #fff; font-weight: 800; font-size: 14px; }
.cf-muc .nd { display: flex; flex-direction: column; gap: 6px; }
.cf-muc .nut { display: flex; flex-direction: column; gap: 2px; }
.cf-ai-khung { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; padding: 10px 12px; border: 1px dashed #e58a2e; border-radius: 10px; background: #fdf6ee; font-size: 14px; }
.cf-ai-khung > b { color: #a85a16; }
.cf-ai-khung small { color: #6b5b4b; font-size: 14px; }
.cf-ai-khung.gon { margin: 0 0 10px; }
.cf-ai-khung.gon summary { cursor: pointer; font-weight: 700; color: #a85a16; }
.cf-ai-khung.gon[open] summary { margin-bottom: 6px; }
.dk-khung { display: flex; flex-direction: column; gap: 10px; }
.dk-tha { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 2px dashed #b8ccbe; border-radius: 12px; background: #f6f9f7; cursor: pointer; }
.dk-tha:hover { border-color: #6a9a78; background: #eef4f0; }
.dk-tha.ban { opacity: .7; }
.dk-tha > .oi { font-size: 24px; color: #6a9a78; }
.dk-tha span { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.dk-tha small { color: #64748b; font-size: 14px; }
.dk-tha input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dk-ds { display: flex; flex-direction: column; gap: 6px; }
.dk-dong { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--ct-vien); border-radius: 10px; background: #fff; }
.dk-dong .bieu { font-size: 18px; color: #6a9a78; }
.dk-dong .nd { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; }
.dk-dong .nd b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-dong .nd small { color: #64748b; font-size: 13.5px; }
.wt-luoi { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 14px; align-items: start; }
.wt-phai { display: flex; flex-direction: column; gap: 14px; }
.wt-tieu { display: flex; align-items: center; gap: 8px; font-size: 15px; color: #2f5a3c; }
.wt-tieu.nho { font-size: 14px; margin-top: 6px; }
.wt-o { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 14px; }
.wt-vd { font-size: 14px; color: #475569; }
.wt-vd b { color: #a85a16; font-family: Consolas, monospace; font-size: 15px; }
.wt-xem { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; background: #6a9a78; color: #fff; border-bottom: 3px solid #e58a2e; }
.wt-xem img { width: 48px; height: 48px; border-radius: 8px; background: #fff; }
.wt-xem div { display: flex; flex-direction: column; font-size: 13.5px; gap: 1px; }
.wt-xem b { font-size: 15px; }
.wt-xem .cam { color: #fde3c8; }
.wt-benb { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 10px; background: #e1ebe4; font-size: 14px; }
.wt-benb b { color: #2f5a3c; }
.wt-quy-uoc textarea { font-size: 14px; line-height: 1.5; }
@media (max-width: 1100px) { .wt-luoi { grid-template-columns: 1fr; } }
.cf-chan .trai .dxbl-btn-danger, .cf-chan .trai .dxbl-btn.dxbl-btn-danger { color: #dc2626 !important; }

/* ── Ô chọn (combobox, ngày, số): bo 8px, nút sổ xuống là vòng tròn nhỏ nằm trong ô — không còn góc phải vuông / lẹm ── */
.dxbl-text-edit { border-radius: 8px !important; overflow: hidden; }
.dxbl-text-edit .dxbl-edit-btn-dropdown, .dxbl-text-edit .dxbl-btn.dxbl-edit-btn-dropdown { align-self: center; width: 26px !important; min-width: 26px; height: 26px !important; margin: 0 5px 0 2px; padding: 0 !important; border: 0 !important; border-radius: 50% !important; background: transparent !important; color: #4a7a5a !important; box-shadow: none !important; }
.dxbl-text-edit .dxbl-edit-btn-dropdown::before, .dxbl-text-edit .dxbl-edit-btn-dropdown::after { display: none !important; }
.dxbl-text-edit .dxbl-edit-btn-dropdown:hover { background: #e1ebe4 !important; }
.dxbl-text-edit:focus-within .dxbl-edit-btn-dropdown { background: #e1ebe4 !important; }
.dxbl-text-edit .dxbl-edit-btn-spin, .dxbl-text-edit .dxbl-spin-btn-group { border-left: 0 !important; }
.cf-hang { display: flex; gap: 6px; align-items: center; }
.cf-hang > :first-child { flex: 1; min-width: 0; }
.kh-nhom { display: flex; align-items: center; gap: 8px; margin: 16px 0 8px; padding-bottom: 6px; border-bottom: 2px solid #e1ebe4; font-size: 16px; font-weight: 800; color: #2f5a3c; }
.kh-nhom .oi { color: #e58a2e; }
.kh-nhom small { margin-left: auto; font-size: 14px; font-weight: 600; color: #64748b; }
.kh-luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.kh-the { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid #c9dace; border-top: 4px solid #6a9a78; border-radius: 12px; background: #fff; cursor: pointer; }
.kh-the:hover { box-shadow: 0 6px 16px -10px rgba(47, 90, 60, .6); border-color: #6a9a78; }
.kh-the.an { opacity: .6; }
.kh-the .dau { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; color: #0f172a; }
.kh-the .nhan { display: flex; flex-wrap: wrap; gap: 6px; }
.kh-gantt { display: flex; flex-direction: column; gap: 4px; }
.kh-gantt .dong { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 8px; align-items: center; font-size: 13.5px; color: #334155; }
.kh-gantt .dong span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.kh-gantt .cf-gantt { min-width: 0; height: 12px; }
.cs-mau-the { border-top: 4px solid #6a9a78; }
.dxbl-btn[class*="danger"], .dxbl-btn[class*="danger"] .oi, .dxbl-btn:has(.oi-trash) { color: #dc2626 !important; }
.dxbl-btn:has(.oi-trash):hover { background: #fef2f2 !important; }
.ct-khung:not(.menu-gon) .ct-menu { flex-basis: 276px; }
.gt-luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.gt-the { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 12px; border: 1px solid #c9dace; border-top: 3px solid #6a9a78; border-radius: 10px; background: #fff; cursor: pointer; }
.gt-the:hover { border-color: #6a9a78; box-shadow: 0 6px 14px -10px rgba(47, 90, 60, .6); }
.gt-the.an { opacity: .55; }
.gt-the b { font-size: 15px; color: #2f5a3c; }
.gt-the .mt { font-size: 14px; color: #475569; line-height: 1.45; }

/* Thanh quy trình trên form báo giá / hợp đồng + thẻ Phát sinh & dịch vụ (13/11/2026) */
.cf-qt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px; margin-bottom: 10px; padding: 8px 12px; border-radius: 12px; background: #f4f8f5; border: 1px solid #d2e1d7; font-size: 14px; }
.cf-qt .b { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; color: #64748b; white-space: nowrap; }
.cf-qt .b i { font-style: normal; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #e2e8f0; color: #475569; font-size: 13px; font-weight: 700; }
.cf-qt .b.xong { color: #2f5a3c; }
.cf-qt .b.xong i { background: #6a9a78; color: #fff; }
.cf-qt .b.dang { background: #fbe8d5; color: #9a4f12; font-weight: 700; }
.cf-qt .b.dang i { background: #e58a2e; color: #fff; }
.cf-qt .noi { width: 18px; height: 2px; background: #cbd5e1; border-radius: 2px; }
.cf-qt .noi.xong { background: #6a9a78; }
.cf-qt .gian { flex: 1 1 12px; }
.cf-th { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-bottom: 10px; }
.cf-th > div { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 10px; background: #f4f8f5; border: 1px solid #d2e1d7; }
.cf-th > div span { font-size: 14px; color: #4a7a5a; }
.cf-th > div b { font-size: 16px; color: #1f2937; }
.cf-th > div.lon { background: #e1ebe4; border-color: #6a9a78; }
.cf-th > div.lon b { font-size: 18px; color: #2f5a3c; }
.cf-th > div.cam { background: #fbe8d5; border-color: #f2c497; }
.cf-th > div.cam span { color: #c9742a; }
.cf-th > div.xam { background: #f8fafc; border-color: #e2e8f0; }
.cf-ps { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 12px; align-items: end; margin: 6px 0 10px; padding: 10px 12px; border-radius: 10px; border: 1px dashed #e58a2e; background: #fffaf4; }
.cf-ps label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: #4a7a5a; }
.cf-ps label.hai { grid-column: span 2; }
.cf-ps label.cf-chk { flex-direction: row; align-items: center; gap: 8px; color: #1f2937; }
.cf-ps .nut { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
.ct-bang tr.nhom td { background: #e1ebe4; color: #2f5a3c; font-weight: 700; font-size: 14px; }
.ct-bang td.nut { white-space: nowrap; text-align: right; }
@media (max-width: 640px) { .cf-ps label.hai { grid-column: 1 / -1; } .cf-qt .noi { display: none; } }
.ct-nhan.dv-BAO_HANH { background: #e1ebe4; color: #2f5a3c; }
.ct-nhan.dv-BAO_TRI { background: #fbe8d5; color: #9a4f12; }
.ct-nhan.dv-MAY_CHU { background: #e0f2fe; color: #075985; }
.ct-nhan.dv-THUE_BAO { background: #ede9fe; color: #5b21b6; }
.ct-nhan.dv-KHAC, .ct-nhan.dv-PHAN_MEM { background: #f1f5f9; color: #475569; }
.ct-loc .cf-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; }

/* Hộp chọn phân nhóm CsChonNhom + dòng sản phẩm có nhóm (13/11/2026) */
.cn-hop { position: relative; width: 100%; min-width: 0; }
.cn-nut { width: 100%; min-height: 38px; display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 12px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: #1f2937; font-size: 14px; text-align: left; cursor: pointer; }
.cn-nut:hover, .cn-hop.mo .cn-nut { border-color: #6a9a78; box-shadow: 0 0 0 3px rgba(106, 154, 120, .18); }
.cn-nut.tat { pointer-events: none; background: #f8fafc; color: #94a3b8; cursor: default; }
.cn-nut > .oi { margin-left: auto; font-size: 11px; color: #64748b; }
.cn-chon { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.cn-chon b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cn-duong { font-size: 14px; color: #c9742a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cn-rong { color: #94a3b8; }
.cn-phu { position: fixed; inset: 0; z-index: 1990; }
.cn-khung { position: absolute; z-index: 1991; top: calc(100% + 4px); left: 0; right: 0; min-width: 320px; max-height: 420px; display: flex; flex-direction: column; background: #fff; border: 1px solid #d2e1d7; border-radius: 12px; box-shadow: 0 18px 40px -16px rgba(15, 23, 42, .45); overflow: hidden; }
.cn-tim { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid #e2e8f0; color: #64748b; }
.cn-tim input { flex: 1; border: 0; outline: 0; font-size: 15px; background: transparent; }
.cn-ds { overflow: auto; padding: 4px 0 8px; }
.cn-n1 { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 6px; padding: 7px 12px; background: #e1ebe4; color: #2f5a3c; font-weight: 700; font-size: 14px; }
.cn-n1 .dem { margin-left: auto; font-size: 13px; font-weight: 600; background: #fff; color: #4a7a5a; border-radius: 999px; padding: 0 8px; }
.cn-n1.goiy { background: #fbe8d5; color: #9a4f12; }
.cn-n2 { padding: 6px 12px 2px 22px; color: #c9742a; font-weight: 700; font-size: 13.5px; }
.cn-muc { display: flex; align-items: baseline; gap: 8px; padding: 6px 12px 6px 22px; font-size: 14px; cursor: pointer; }
.cn-muc.c3 { padding-left: 36px; }
.cn-muc b { font-weight: 500; }
.cn-muc small { color: #64748b; font-size: 14px; }
.cn-muc:hover { background: #f4f8f5; }
.cn-muc.dang { background: #e1ebe4; }
.cn-muc.dang b { font-weight: 700; color: #2f5a3c; }
.cn-nhan { margin-left: auto; font-size: 13px; padding: 1px 8px; border-radius: 999px; background: #f1f5f9; color: #475569; white-space: nowrap; }
.cn-trong { padding: 14px; color: #64748b; font-size: 14px; }
.sp-muc { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.sp-muc .sp-nhom { flex: 0 0 auto; font-size: 13px; padding: 1px 8px; border-radius: 999px; background: #e1ebe4; color: #2f5a3c; white-space: nowrap; }
.sp-muc b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-muc small { color: #94a3b8; font-size: 14px; }
/* Thư viện tài liệu giới thiệu */
.tl-khung { display: grid; grid-template-columns: 280px 1fr; gap: 14px; align-items: start; }
.tl-nhom { display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: 12px; background: #f4f8f5; border: 1px solid #d2e1d7; }
.tl-nhom button { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border: 0; border-radius: 8px; background: transparent; font-size: 14.5px; color: #1f2937; text-align: left; cursor: pointer; }
.tl-nhom button:hover { background: #e1ebe4; }
.tl-nhom button.dang { background: #6a9a78; color: #fff; font-weight: 700; }
.tl-nhom button b { min-width: 24px; padding: 0 7px; border-radius: 999px; background: #fbe8d5; color: #9a4f12; font-size: 13px; text-align: center; }
.tl-ds { min-width: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid #e2e8f0; background: #fff; }
@media (max-width: 760px) { .tl-khung { grid-template-columns: 1fr; } }
.cn-hop.trong-dong .cn-khung { position: relative; top: auto; margin-top: 4px; max-height: 340px; box-shadow: 0 8px 22px -14px rgba(15, 23, 42, .4); }
.cn-hop.trong-dong .cn-phu { display: none; }

/* Bảng chi tiết báo giá / hợp đồng: tiêu đề thẳng hàng với ô nhập, số căn phải, cột thuế / loại tiền / tỷ giá (13/11/2026) */
.cs-dong { border-collapse: separate; border-spacing: 0; }
.cs-dong.gon { min-width: 1280px !important; }
.cs-dong th { padding: 9px 6px; white-space: nowrap; vertical-align: bottom; font-size: 14px; }
.cs-dong th.so { text-align: right; padding-right: 16px; }
.cs-dong td { vertical-align: middle; }
.cs-dong td.so { text-align: right; }
.cs-dong td.so > b { display: inline-block; min-width: 120px; padding-right: 10px; }
.cs-dong .dxbl-spin-edit input, .cs-dong .cs-o-tien input, .cs-dong .cs-o-sl input, .cs-dong .cs-o-tg input { text-align: right; }
.cs-o-lt { width: 86px !important; } .cs-o-tg { width: 100px !important; } .cs-o-thue { width: 112px !important; }
.cs-dong .cs-nt { display: block; color: #64748b; font-size: 14px; padding-right: 10px; }
@media (max-width: 760px) { .cs-o-lt, .cs-o-tg, .cs-o-thue { width: 100% !important; } }
/* Nút phóng to / thu nhỏ form nổi */
.cf-tieude { display: flex; align-items: center; gap: 10px; width: 100%; }
.cs-phong-to { margin-left: auto; width: 32px; height: 32px; display: inline-grid; place-items: center; border: 1px solid #d2e1d7; border-radius: 8px; background: #fff; color: #4a7a5a; cursor: pointer; font-size: 13px; }
.cs-phong-to:hover { background: #e1ebe4; color: #2f5a3c; }

/* Phân quyền chức năng */
.pq-khung { display: grid; grid-template-columns: 320px 1fr; gap: 14px; align-items: start; }
.pq-trai { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 12px; background: #f4f8f5; border: 1px solid #d2e1d7; position: sticky; top: 8px; max-height: calc(100vh - 140px); }
.pq-the { display: flex; gap: 4px; }
.pq-the button { flex: 1; padding: 8px 6px; border: 1px solid #d2e1d7; border-radius: 8px; background: #fff; font-size: 14px; color: #2f5a3c; cursor: pointer; }
.pq-the button.dang { background: #6a9a78; border-color: #6a9a78; color: #fff; font-weight: 700; }
.pq-ds { overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.pq-muc { padding: 8px 10px; border-radius: 8px; background: #fff; border: 1px solid transparent; cursor: pointer; }
.pq-muc:hover { border-color: #b8ccbe; }
.pq-muc.dang { border-color: #6a9a78; background: #e1ebe4; }
.pq-muc.tat { opacity: .55; }
.pq-muc b { display: block; font-size: 14.5px; color: #1f2937; }
.pq-muc small { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; color: #64748b; font-size: 14px; margin-top: 2px; }
.pq-them { margin-top: 6px; }
.pq-phai { min-width: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid #e2e8f0; background: #fff; }
.pq-nv { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 16px; margin-bottom: 8px; }
.pq-nhom-nv { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding: 8px 10px; border-radius: 10px; background: #f4f8f5; font-size: 14px; }
.pq-nhom-nv > span { font-weight: 700; color: #2f5a3c; }
.pq-pham-vi { margin: 8px 0 4px; display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: #9a4f12; }
.pq-chep { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; color: #475569; }
.pq-chu { margin-left: auto; font-size: 13px; color: #64748b; display: inline-flex; gap: 6px; align-items: center; }
.pq-bang th.giua, .pq-bang td.giua { text-align: center; width: 76px; }
.pq-bang tr.nhom td { background: #e1ebe4; color: #2f5a3c; font-weight: 800; }
.pq-bang tr.nhom a { color: #c9742a; text-decoration: none; font-weight: 800; }
.pq-bang td { font-size: 14px; }
.pq-bang .pq-mo { display: block; color: #64748b; font-size: 14px; }
.pq-bang .pq-cb { display: inline-flex; justify-content: center; }
.pq-khong { color: #cbd5e1; }
.pq-o { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; font-size: 13px; font-style: normal; }
.pq-o.tu-nhom { background: #d2e1d7; color: #2f5a3c; }
.pq-o.rieng { background: #6a9a78; }
@media (max-width: 900px) { .pq-khung { grid-template-columns: 1fr; } .pq-trai { position: static; max-height: 360px; } }
/* Gửi email cho khách */
.mc-form label .dxbl-html-editor, .em-form .dxbl-html-editor { font-weight: 400; font-size: 14.5px; }
.dxbl-html-editor p { margin: 0 0 8px; }
.eg-kem { display: flex; flex-direction: column; gap: 6px; padding: 4px 2px; }
.eg-kem label.cf-chk { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 400; cursor: pointer; }
.eg-kem label .oi { color: #6a9a78; }
.eg-kem small { color: #64748b; }
.eg-nv { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.eg-nv:hover { background: #f4f8f5; } .eg-nv.dang { background: #e1ebe4; font-weight: 700; }

/* Kết nối dữ liệu */
.kn-luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.kn-the { padding: 14px 16px; border-radius: 14px; border: 1px solid #d2e1d7; background: #fff; cursor: pointer; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.kn-the:hover { border-color: #6a9a78; box-shadow: 0 10px 24px -16px rgba(20, 52, 36, .5); }
.kn-the.tat { background: #f8fafc; }
.kn-dau { display: flex; align-items: center; gap: 10px; }
.kn-dau .oi { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; background: #e1ebe4; color: #2f5a3c; }
.kn-dau b { flex: 1; font-size: 16px; color: #1f2937; }
.kn-loai { color: #c9742a; font-weight: 700; }
.kn-chi { color: #334155; word-break: break-all; }
.kn-ghi { color: #64748b; }
.kn-thu { padding: 6px 8px; border-radius: 8px; background: #f4f8f5; color: #2f5a3c; }
.kn-thu.do { background: #fef2f2; color: #b91c1c; }
.kn-thu small { color: #64748b; margin-left: 4px; }
/* Key phần mềm */
.wk-key { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 14px; border-radius: 12px; background: #f4f8f5; border: 1px solid #d2e1d7; margin-bottom: 10px; }
.wk-key > div { display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.wk-key > div span { color: #4a7a5a; }
.wk-key > div b { font-size: 16px; font-family: Consolas, monospace; }
.wk-key > div.lon b { font-size: 20px; color: #9a4f12; letter-spacing: .5px; }
.ct-the.chon { outline: 2px solid #6a9a78; }
/* Khách đăng ký */
.dk-ds { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 10px; }
.dk-the { padding: 12px 14px; border-radius: 12px; border: 1px solid #e2e8f0; border-left: 4px solid #e58a2e; background: #fff; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.dk-the.xong { border-left-color: #6a9a78; }
.dk-the.an { opacity: .55; }
.dk-dau { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.dk-dau b { font-size: 15.5px; }
.dk-dau small { margin-left: auto; color: #64748b; }
.dk-lh { display: flex; flex-wrap: wrap; gap: 6px 14px; color: #334155; }
.dk-lh a { color: #2f5a3c; text-decoration: none; }
.dk-nd { padding: 8px 10px; border-radius: 8px; background: #f8fafc; color: #334155; white-space: pre-wrap; }
.dk-nut { display: flex; flex-wrap: wrap; gap: 6px; }

.wk-huy { display: inline-flex; gap: 6px; align-items: center; }
.wk-nk { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; max-height: 180px; overflow: auto; }
.wk-nk div { display: grid; grid-template-columns: 130px 110px 1fr auto; gap: 8px; padding: 4px 8px; border-radius: 6px; background: #f8fafc; }
.wk-nk b { color: #2f5a3c; } .wk-nk small { color: #64748b; }

/* Công nợ hợp đồng (kế toán) */
.kt-no { color: #c62828; }
.ct-the-hang .ct-the[title] { cursor: pointer; }
.ct-the.xam { border-top-color: #94a3b8; }
.wk-ma-key { user-select: all; }

/* Chuông Winta hỗ trợ (thanh trên) + thẻ báo khách đang chờ */
.ct-chuong { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: inherit; text-decoration: none; margin-right: 6px; }
.ct-chuong:hover { background: rgba(255, 255, 255, .18); }
.ct-chuong .so { position: absolute; top: -2px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 14px; line-height: 20px; text-align: center; }
.ct-chuong .so[hidden] { display: none; }
.ct-chuong.co .oi { animation: ctRung 1.4s ease-in-out infinite; }
@keyframes ctRung { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(-14deg); } 85% { transform: rotate(12deg); } 95% { transform: rotate(-6deg); } }
.ct-bao-chat { position: fixed; right: 18px; top: 70px; z-index: 200; display: flex; align-items: center; gap: 12px; max-width: 420px; padding: 12px 14px; border-radius: 14px; background: #fff; color: #0f172a;
    box-shadow: 0 20px 40px -12px rgba(15, 23, 42, .35); border-left: 5px solid #dc2626; }
.ct-bao-chat[hidden] { display: none; }
.ct-bao-chat > .oi { color: #dc2626; font-size: 20px; }
.ct-bao-chat div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ct-bao-chat small { font-size: 14px; color: #475569; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-bao-chat a { padding: 7px 14px; border-radius: 8px; background: #0f766e; color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; }
.ct-bao-chat button { border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: #64748b; }
@media (prefers-reduced-motion: reduce) { .ct-chuong.co .oi { animation: none; } }

small, .small { font-size: 13.5px; }
.ct-grid .dxbl-grid-table > tbody > tr.dxbl-grid-selected-row > td, .ct-grid .dxbl-grid-table > tbody > tr.dxbl-grid-focused-row > td { color: #1f2937 !important; }
.ct-grid .dxbl-grid-table > tbody > tr.dxbl-grid-focused-row > td { background: #e3f3e8 !important; }
code, kbd { font-size: 13.5px; }
.dn-qr { width: 220px; height: 220px; align-self: center; image-rendering: pixelated; border: 1px solid var(--ct-vien); border-radius: 12px; padding: 6px; background: #fff; }
.dn-khoa { font-family: Consolas, monospace; letter-spacing: 1px; word-break: break-all; color: #0f172a; }
.dn-kp { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.dn-kp code { padding: 8px 10px; border-radius: 8px; background: #f1f5f9; font-size: 16px; font-weight: 700; text-align: center; letter-spacing: 1px; color: #0f172a; }
.dn-vao { display: flex; align-items: center; justify-content: center; height: 44px; border-radius: 10px; background: var(--ct-chinh); color: #fff; font-weight: 800; text-decoration: none; }
.dn-the form.dn-phu { gap: 0; }
.dn-the button.dn-nut-phu { height: 40px; background: transparent; color: var(--ct-chinh); border: 1px solid var(--ct-vien); font-weight: 700; }
.xtl { width: min(460px, 100%); display: flex; flex-direction: column; gap: 12px; padding: 18px; border: 1px solid var(--ct-vien); border-radius: 14px; background: #fff; }
.xtl-dau { display: flex; gap: 12px; align-items: flex-start; }
.xtl-dau > .oi { font-size: 26px; color: var(--ct-chinh); margin-top: 2px; }
.xtl-dau div { display: flex; flex-direction: column; gap: 2px; }
.xtl-dau b { font-size: 17px; }
.xtl-dau small, .xtl p { color: var(--ct-phu); font-size: 14px; margin: 0; }
.xtl label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14px; }
.xtl-o { font-size: 18px; letter-spacing: 2px; }
.xtl-nut { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dn-the details.dn-mo summary { cursor: pointer; color: var(--ct-chinh); font-size: 14px; font-weight: 700; }
.dn-the details.dn-mo small { display: block; margin-top: 6px; }

/* ═════ Rà soát giao diện 23/11/2026: thanh trên không xuống dòng, chữ tối thiểu 14px, điện thoại dùng như app ═════ */
.ct-khung { height: 100vh; height: 100dvh; }
.ct-logo span, .ct-nguoi, .ct-thoat { white-space: nowrap; }
.ct-nguoi { min-width: 0; flex: 0 1 auto; }
.ct-nguoi .chu { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.mtc-nay { font-size: 14px; }
.dn-the button.mtc-go { font-size: 14px; }
.dn-the label.dn-chk small { font-size: 14px; }
.em-dv button, .ck-che button { font-size: 14px; }
.ct-noidung .wm-hai { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ct-noidung .wm-muc b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-chuong, .ct-nut-menu, .ct-logo { flex: 0 0 auto; }
.mtc-the { overflow-x: auto; }
.cty-cuon { overflow-x: auto; border-radius: 14px; box-shadow: var(--ct-bong); }
.cty-cuon > .ct-bang { min-width: 1180px; box-shadow: none; }
.cty-cuon td:nth-child(2) .dxbl-text-edit { width: 200px; }
.cty-cuon td:nth-child(3) .dxbl-text-edit { width: 230px; }
.cty-cuon td:nth-child(4) .dxbl-text-edit { width: 150px; }
.cty-cuon td:nth-child(6) .dxbl-text-edit, .cty-cuon td:nth-child(8) .dxbl-text-edit { width: 100px; }
.ct-grid td.dxbl-grid-empty-data-area { text-align: center; }
@media (max-width: 1500px) and (min-width: 901px) {
    .ct-thoat.doi-mk { width: 36px; padding: 0; justify-content: center; }
    .ct-thoat.doi-mk .chu { display: none; }
    .ct-nguoi .chu { max-width: 200px; }
}
@media (max-width: 1100px) and (min-width: 901px) {
    .ct-logo span { display: none; }
    .ct-thoat .chu { display: none; }
    .ct-thoat { width: 36px; padding: 0; justify-content: center; }
}
@media (max-width: 1000px) {
    .em-luoi, .ct-hai, .wt-luoi, .ct-noidung .wm-hai { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
    .tl-khung, .pq-khung { grid-template-columns: minmax(0, 1fr); }
    .ct-nut-menu { width: 44px; height: 40px; font-size: 18px; }
    .ct-chuong { width: 44px; height: 44px; margin-right: 0; }
    .ct-menu .ct-nhom .ds a, .ct-khung.menu-gon .ct-menu .ct-nhom .ds a { min-height: 44px; padding: 10px 12px; font-size: 15px; }
    .ct-menu .nhom, .ct-khung.menu-gon .ct-menu .nhom { min-height: 48px; }
    .ct-loc .cf-chk { white-space: normal; min-height: 40px; }
    .ct-logo img { width: 40px; height: 40px; }
    .dk-ds { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
    .ct-tim { height: 40px; min-width: 0; }
    .ct-tim input { font-size: 16px; }
    input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), textarea, select, .tv-o textarea, .tv-o .dxbl-text-edit-input { font-size: 16px !important; }
    .dn-the input:not([type=hidden]) { height: 46px; }
    .dn-the button { height: 48px; }
    .dxbl-btn.dxbl-btn-standalone { min-height: 42px; }
    .dxbl-text-edit { min-height: 42px; }
    .ct-chan a { min-height: 48px; }
    .ct-grid table.dxbl-grid-table > tbody > tr > td.dxbl-grid-empty-data-area { padding: 0 !important; border: 0 !important; }
    .ct-grid table.dxbl-grid-table > tbody > tr > td.dxbl-grid-empty-data-area[data-n]::before { display: none !important; content: none !important; }
    .ct-grid table.dxbl-grid-table > tbody > tr:has(> td.dxbl-grid-empty-data-area) { padding: 0; }
    .ct-grid table.dxbl-grid-table > tbody > tr > td.dxbl-grid-empty-cell { display: none !important; }
    dxbl-modal-dialog.dxbl-popup:not(.dxbl-edit-dropdown) { width: calc(100vw - 16px) !important; max-width: calc(100vw - 16px) !important; margin: 8px auto !important; }
    dxbl-modal-dialog.dxbl-popup:not(.dxbl-edit-dropdown)[style*="98vw"], dxbl-modal-dialog.dxbl-popup:not(.dxbl-edit-dropdown)[style*="99vw"], dxbl-modal-dialog.dxbl-popup:not(.dxbl-edit-dropdown)[style*="100vw"] { width: 100vw !important; max-width: 100vw !important; margin: 0 !important; }
    dxbl-modal-dialog.dxbl-popup:not(.dxbl-edit-dropdown)[style*="98vw"] > .dxbl-modal-content, dxbl-modal-dialog.dxbl-popup:not(.dxbl-edit-dropdown)[style*="99vw"] > .dxbl-modal-content, dxbl-modal-dialog.dxbl-popup:not(.dxbl-edit-dropdown)[style*="100vw"] > .dxbl-modal-content { height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
    .dxbl-modal-footer { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
    .dxbl-modal-footer .dxbl-btn { min-height: 44px; }
    .cs-phong-to { display: none; }
    .cty-cuon { overflow: visible; box-shadow: none; }
    .cty-cuon > .ct-bang { min-width: 0; }
    .ct-noidung .wm-muc { flex-wrap: wrap; row-gap: 4px; }
    .ct-noidung .wm-muc b { white-space: normal; }
    .ct-noidung .wm-muc small { flex: 1 1 100%; max-width: 100%; margin-left: 0; }
}
#ct-bao-mua { top: 140px; }
#ct-bao-mua > .oi { color: #ea580c; }
#ct-bao-mua a { background: #ea580c; }
.gsd-the { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; }
.gsd-the button { border: 1px solid #d6dde3; background: #fff; border-radius: 999px; padding: 6px 16px; font: inherit; font-size: 14px; font-weight: 700; color: #334155; cursor: pointer; }
.gsd-the button.on { background: var(--ct-chinh); border-color: var(--ct-chinh); color: #fff; }
.gsd-the button b { display: inline-block; min-width: 20px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 14px; line-height: 20px; }
.gsd-tinh { padding: 10px 12px; border-radius: 10px; background: #f6f8fa; font-size: 14px; line-height: 1.6; }
.gsd-tinh b { color: #0f172a; }
.gsd-nk { width: 100%; border-collapse: collapse; font-size: 14px; }
.gsd-nk td, .gsd-nk th { padding: 6px 8px; border-bottom: 1px solid #eef2f5; text-align: left; vertical-align: top; }
.gsd-nk th { color: #64748b; font-weight: 700; }
.gsd-loi-dong { color: #b91c1c; font-size: 14px; }
.gsd-lech { margin: 4px 0 0; padding-left: 18px; font-size: 14px; }
.gsd-sk { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 10px; margin-top: 10px; }
.gsd-sk-the { border: 1px solid #e2e8f0; border-left: 4px solid #22c55e; border-radius: 10px; padding: 10px 12px; background: #fff; font-size: 14px; }
.gsd-sk-the.cam { border-left-color: #f59e0b; }
.gsd-sk-the.do { border-left-color: #dc2626; }
.gsd-sk-the .dau { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.gsd-sk-the .dau small { flex-basis: 100%; color: #64748b; font-size: 14px; }
.gsd-sk-the ul { margin: 6px 0 0; padding-left: 18px; }
.gsd-sk-the li.do { color: #b91c1c; }
.gsd-sk-the li.cam { color: #b45309; }
.gsd-sk-the li.xanh { color: #475569; }
.wta-mobile .gsd-sk, .gsd-sk { min-width: 0; }
@media (max-width: 600px) { .gsd-sk { grid-template-columns: 1fr; } }
.tdl-nk { font-family: Consolas, "Cascadia Mono", monospace; font-size: 14px; line-height: 1.55; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; max-height: 420px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.tdl-nk.nho { max-height: 260px; }
.tdl-nk .xanh { color: #166534; }
.tdl-nk .cam { color: #b45309; }
.tdl-nk .do { color: #b91c1c; font-weight: 700; }
.tdl-ma { display: flex; gap: 8px; align-items: center; }
.tdl-ma .tdl-ma-o { flex: 1; min-width: 0; }
.tdl-form { max-width: 980px; }
.tdl-chitiet { flex-basis: 480px; }
.tdl-kb { font-size: 14px; background: #0f172a; color: #e2e8f0; padding: 10px 12px; border-radius: 10px; overflow: auto; white-space: pre; margin: 0; }
.tdl-nut-mail { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 8px; background: var(--ct-chinh); color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; }
.tdl-nut-mail:hover { color: #fff; filter: brightness(1.08); }
.tdl-buoc { background: #fff; border: 1px solid var(--ct-vien); border-left: 5px solid #94a3b8; border-radius: 12px; padding: 12px 16px; margin: 10px 0; display: flex; flex-direction: column; gap: 8px; max-width: 1000px; }
.tdl-buoc.dat { border-left-color: #16a34a; }
.tdl-buoc.dang { border-left-color: var(--ct-chinh); }
.tdl-buoc.khoa { opacity: .6; background: #f8fafc; }
.tdl-buoc-dau { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 16px; }
.tdl-buoc-dau .so { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #e2e8f0; color: #334155; font-weight: 800; font-size: 15px; flex: none; }
.tdl-buoc.dat .tdl-buoc-dau .so { background: #16a34a; color: #fff; }
.tdl-buoc.dang .tdl-buoc-dau .so { background: var(--ct-chinh); color: #fff; }
.tdl-buoc-dau .tom { color: #475569; font-size: 14px; }
.tdl-buoc-than { display: flex; flex-direction: column; gap: 8px; }
.tdl-khoa { color: #64748b; font-size: 14px; font-style: italic; }
.tdl-link { border: 0; background: none; color: var(--ct-chinh); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; padding: 2px 6px; text-decoration: underline; }
.tdl-link:disabled { color: #94a3b8; cursor: default; }
.tdl-goiy { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-weight: 500; font-size: 14px; color: #64748b; }
.tdl-goiy button { border: 1px solid #cbd5e1; background: #f8fafc; border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 14px; cursor: pointer; }
.tdl-chon { display: flex; flex-wrap: wrap; gap: 8px; }
.tdl-chon button { border: 1px solid #cbd5e1; background: #fff; border-radius: 10px; padding: 8px 14px; font: inherit; font-size: 14px; font-weight: 700; color: #334155; cursor: pointer; text-align: left; }
.tdl-chon button.on { border-color: var(--ct-chinh); background: var(--ct-chinh); color: #fff; }
.tdl-nangcao { font-size: 14px; }
.tdl-nangcao summary { cursor: pointer; color: #475569; font-weight: 700; margin: 4px 0; }
.tdl-nangcao label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 14px; margin-top: 8px; }
.tdl-kq { max-height: 320px; }
.tdl-bang td, .tdl-bang th { font-size: 14px; }
