/* PAN CRM - giao dien chung. Kieu chu Inter, mau chu va bo cuc theo phong cach Perfex CRM ma cong ty quen dung. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("inter.woff2") format("woff2"); }

:root {
    --nen: #f4f4f5;        /* nen trang */
    --the: #fff;           /* nen khung, bang */
    --chu: #111827;        /* chu chinh */
    --xam: #374151;        /* chu trong bang, lien ket trong bang */
    --nhan: #4b5563;       /* nhan o nhap, menu */
    --mo: #6b7280;         /* chu phu */
    --vien: #e5e7eb;
    --vien-o: #d1d5db;     /* vien o nhap */
    --chinh: #1d4ed8;      /* lien ket */
    --nut: #1f2937;        /* nut chinh (xam dam nhu Perfex) */
    --do: #dc2626;
    --xanh: #16a34a;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--nen); color: var(--chu); font-family: Inter, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; font-size: 13.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--chinh); text-decoration: none; }
a:hover, a:focus { color: #1e40af; }
h1, h2, h3 { color: var(--chu); }
.logo { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; background: var(--nut); color: #fff; font-weight: 700; font-size: 12px; flex: none; }

.logo-anh { width: 36px; height: 36px; object-fit: contain; border-radius: 6px; background: #fff; flex: none; }
.hop-le-dau .logo-anh { width: 44px; height: 44px; }

/* ===== khung chinh: menu trai sang mau, thanh tren trang ===== */
.ung-dung { display: flex; min-height: 100vh; }
.menu { width: 230px; background: var(--nen); border-right: 1px solid #cbd5e1; flex: none; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 0 7px 0 6px; }
.menu-dau { display: flex; gap: 10px; align-items: center; height: 57px; padding: 0 8px; }
.menu-dau b { display: block; color: var(--chu); font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.menu-dau small { color: var(--mo); font-size: 11.5px; }
.menu nav { padding: 6px 0 24px; }
.menu nav a, .menu nav .sap { display: block; margin-top: .2rem; padding: 6px 13px; border: 1px solid transparent; border-radius: 6px; color: var(--nhan); font-size: 14px; font-weight: 600; }
.menu nav a:hover, .menu nav a.dang { background: #fff; color: var(--chu); border-color: rgba(15, 23, 42, .15); box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05); }
.menu nav .sap { color: #9ca3af; font-weight: 500; cursor: default; }
.menu nav .sap i { display: inline-block; white-space: nowrap; font-style: normal; font-size: 10.5px; font-weight: 500; color: #9ca3af; border: 1px solid #d1d5db; border-radius: 8px; padding: 0 5px; margin-left: 4px; }
.menu .tieu-de-nhom { padding: 16px 13px 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #9ca3af; }
.menu nav a.muc, .menu .cha { display: flex; align-items: center; gap: 10px; }
.menu .bt { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: #374151; }
.menu nav a.muc.dang .bt, .menu .cha.co-dang .bt, .menu nav a.muc:hover .bt, .menu .cha:hover .bt { color: #2563eb; }
.menu nav a.muc > span:first-of-type, .menu .cha > span { flex: 1; min-width: 0; }
.menu .cha { width: 100%; margin-top: .2rem; padding: 6px 13px; border: 1px solid transparent; border-radius: 6px; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--nhan); text-align: left; cursor: pointer; }
.menu .cha:hover { background: #fff; color: var(--chu); border-color: rgba(15, 23, 42, .15); box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05); }
.menu .cha.co-dang { color: var(--chu); }
.menu .cha:focus-visible { outline: 2px solid #3b82f6; outline-offset: -2px; }
.menu .mui { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: #94a3b8; transition: transform .15s; }
.menu .muc-cha.mo .mui { transform: rotate(-90deg); }
.menu .menu-con { display: none; margin: 2px 0 4px 21px; padding-left: 10px; border-left: 1px solid #d5dbe3; }
.menu .muc-cha.mo .menu-con { display: block; }
.menu nav .menu-con a { margin-top: 1px; padding: 5px 10px; font-size: 13.5px; font-weight: 500; }
.menu nav .menu-con a.dang { font-weight: 600; }
.than { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.thanh-tren { display: flex; align-items: center; gap: 12px; height: 57px; background: #fff; padding: 0 22px; position: sticky; top: 0; z-index: 5; box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px -1px rgba(0, 0, 0, .1); }
.thanh-tren-giua { flex: 1; min-width: 0; }
.tieu-de-trang { margin: 2px 0 14px; font-size: 20px; line-height: 28px; font-weight: 700; color: var(--chu); overflow-wrap: anywhere; }
.nguoi { display: flex; align-items: center; gap: 12px; font-size: 13.5px; }
.nguoi form { margin: 0; }
.ten-toi { color: var(--nhan); font-weight: 600; }
.ten-toi:hover { color: var(--chu); }
.nut-menu { display: none; border: 0; background: none; font-size: 22px; color: var(--nhan); cursor: pointer; }
.noi-dung { padding: 22px; max-width: 1320px; width: 100%; }

/* ===== nut ===== */
.nut { display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--nut); background: var(--nut); color: #fff; font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05); }
.nut:hover { background: #374151; border-color: #374151; color: #fff; }
.nut-phu { background: #fff; color: var(--xam); border-color: var(--vien-o); }
.nut-phu:hover { background: #f9fafb; color: var(--chu); border-color: var(--vien-o); }
.nut-do { color: var(--do); border-color: #fecaca; }
.nut-do:hover { background: #fef2f2; color: var(--do); border-color: #fca5a5; }
.nut-rong { width: 100%; height: 40px; }
a.nut { text-decoration: none; }

/* ===== khung noi dung (panel) ===== */
.the { background: var(--the); border-radius: 6px; padding: 22px 24px; margin-bottom: 18px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1); }
.the h2 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.the-bang { padding: 0; overflow: hidden; }
.mo-ta { color: var(--mo); margin: 0 0 14px; }
.phu { color: var(--mo); font-size: 12.5px; }
.hep { max-width: 720px; }
.thanh-cong-cu { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.o-so { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.o-so > div { background: #fff; border-radius: 6px; padding: 14px 18px; box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px -1px rgba(0, 0, 0, .1); }
.o-so span { display: block; color: var(--mo); font-size: 12.5px; font-weight: 500; }
.o-so b { font-size: 22px; font-weight: 600; }

/* ===== bang ===== */
.bang { width: 100%; border-collapse: collapse; }
.bang th { text-align: left; background: #f9fafb; color: var(--xam); font-size: 12.5px; font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--vien); }
.bang th + th { border-left: 1px solid #eef0f3; }
.bang td { color: var(--xam); padding: 10px 12px; border-bottom: 1px solid #f1f2f4; vertical-align: top; }
.bang tr:last-child td { border-bottom: 0; }
.bang tbody tr:hover td { background: #f9fafb; }
.bang a { color: var(--xam); }
.bang a:hover { color: var(--chinh); }
.bang b { font-weight: 600; }
.bang tr.mo td { opacity: .55; }
.bang .trong { text-align: center; color: var(--mo); padding: 30px; }

/* ===== nhan, thong bao ===== */
.nhan { display: inline-block; font-size: 11.5px; font-weight: 500; border-radius: 6px; padding: 1px 8px; }
.nhan-xanh { background: #dbeafe; color: #1e40af; }
.bao { border-radius: 6px; padding: 10px 14px; margin-bottom: 16px; font-size: 13.5px; }
.bao-loi { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.bao-canh { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.bao-tot { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* ===== bieu mau ===== */
.bieu-mau label { display: block; color: var(--nhan); font-size: 13.5px; font-weight: 600; margin-bottom: 15px; }
.bieu-mau label small { font-weight: 400; color: var(--mo); }
.bieu-mau input, .bieu-mau select { display: block; width: 100%; height: 34px; margin-top: 6px; border: 1px solid var(--vien-o); border-radius: 6px; padding: 0 12px; font: inherit; font-size: 14px; font-weight: 400; color: #555; background: rgba(249, 250, 251, .7); box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05); }
.bieu-mau input:focus, .bieu-mau select:focus { outline: 0; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .2); }
.bieu-mau input::placeholder { color: #9ca3af; }
.bieu-mau .o-chon, .o-chon { display: flex; align-items: flex-start; gap: 8px; color: var(--xam); font-weight: 500; margin-bottom: 10px; cursor: pointer; }
.bieu-mau .o-chon input, .o-chon input { display: inline-block; width: 16px; height: 16px; margin: 2px 0 0; flex: none; box-shadow: none; accent-color: var(--nut); }
.hai-cot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
.luoi-quyen { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.nhom-quyen { border: 1px solid var(--vien); border-radius: 6px; padding: 8px 14px 4px; margin: 0; }
.nhom-quyen legend { padding: 0 6px; }
.nhom-quyen legend .o-chon { color: var(--chu); font-weight: 600; margin: 0; }
.xoa-vt { margin-top: 18px; }
.thanh-luu { position: sticky; bottom: 0; background: rgba(244, 244, 245, .95); padding: 10px 0; border-top: 1px solid var(--vien); z-index: 4; }

/* ===== trang le (dang nhap, cai dat dau) ===== */
.trang-le { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 20px 16px; }
.hop-le { background: #fff; border-radius: 8px; padding: 28px 30px; width: 100%; max-width: 420px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1); }
.hop-le-dau { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; }
.hop-le-dau b { display: block; font-size: 16px; font-weight: 600; }
.hop-le-dau small { color: var(--mo); }
.tieu-de-le { font-size: 18px; font-weight: 600; margin: 0 0 4px; }
.chan-le { color: #9ca3af; font-size: 12px; }

/* ===== cai dat cong ty ===== */
.o-rong { grid-column: 1 / -1; }
.khung-logo { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.xem-dau { width: 220px !important; height: 150px !important; }
.xem-dau img { max-width: 100%; max-height: 100%; }
.xem-logo { width: 120px; height: 120px; border: 1px dashed var(--vien-o); border-radius: 8px; display: flex; align-items: center; justify-content: center; background: #fafafa; color: #9ca3af; font-size: 12px; text-align: center; }
.xem-logo img { max-width: 110px; max-height: 110px; object-fit: contain; }
.tieu-de-muc { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.nut { white-space: nowrap; }
.chon-tep { position: relative; overflow: hidden; cursor: pointer; }
.chon-tep input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.tieu-de-muc h2 { margin: 0; }
.so-tk { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.nhan-xam { background: #f3f4f6; color: #4b5563; }

/* ===== sao luu ===== */
.duong-dan { overflow-wrap: anywhere; word-break: break-all; }
.hang-nut { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hang-nut form { margin: 0; }
.hang-nut .nut { height: 30px; padding: 0 10px; font-size: 13px; }
.hop-thoai { border: 0; border-radius: 8px; padding: 24px; width: min(520px, calc(100vw - 32px)); box-shadow: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.1); }
.hop-thoai::backdrop { background: rgba(17, 24, 39, .45); }
.hop-thoai h2 { margin: 0 0 12px; font-size: 16px; font-weight: 600; }

/* ===== ban quyen ===== */
.dai-bq { background: #fffbeb; color: #92400e; border-bottom: 1px solid #fde68a; padding: 8px 22px; font-size: 13px; font-weight: 500; }
.dai-bq a { color: #78350f; font-weight: 700; margin-left: 6px; }
.ma-may { font-family: Consolas, "Courier New", monospace; font-size: 18px; font-weight: 600; letter-spacing: .05em; color: var(--chu); background: #f3f4f6; border-radius: 6px; padding: 6px 12px; display: inline-block; }
.bang-tt { width: 100%; border-collapse: collapse; }
.bang-tt th { text-align: left; width: 210px; color: var(--mo); font-weight: 500; padding: 7px 0; vertical-align: top; }
.bang-tt td { padding: 7px 0; color: var(--chu); font-weight: 500; }
.bieu-mau textarea { display: block; width: 100%; margin-top: 6px; border: 1px solid var(--vien-o); border-radius: 6px; padding: 6px 12px; font: inherit; font-size: 14px; line-height: 20px; font-weight: 400; color: #555; background: rgba(249, 250, 251, .7); box-shadow: 0 1px 2px 0 rgba(0,0,0,.05); resize: vertical; }
.bieu-mau textarea:focus { outline: 0; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .2); }
.bieu-mau textarea.o-lic { min-height: 90px; font: 12.5px Consolas, monospace; }

/* ===== khach hang ===== */
.loc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.loc input, .loc select { height: 34px; border: 1px solid var(--vien-o); border-radius: 6px; padding: 0 10px; font: inherit; color: var(--chu); background: #fff; box-shadow: 0 1px 2px 0 rgba(0,0,0,.05); }
.loc input { flex: 1 1 280px; min-width: 0; }
.loc input:focus, .loc select:focus { outline: 0; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .2); }
.phan-trang { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin: -4px 0 16px; }
.phan-trang .phu { margin-right: auto; }
.o-kem { display: flex; gap: 6px; margin-top: 6px; }
.bieu-mau .o-kem input { margin-top: 0; }
.o-kem .nut { height: 34px; flex: none; }
.khong-vien { border: 0; padding: 0; margin: 0; min-width: 0; }
.khong-vien[disabled] input, .khong-vien[disabled] select, .khong-vien[disabled] textarea { background: #f9fafb; color: var(--xam); }
.chon-loai { display: flex; gap: 22px; margin-bottom: 12px; }
.nw { white-space: nowrap; }
.chu-do { color: #b91c1c; }
.chu-xanh { color: #15803d; }
.ds-trung { margin: 6px 0 10px; padding-left: 18px; }

/* ===== san pham ===== */
.bang th.so, .bang td.so { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bang th .dv { font-weight: 400; color: var(--mo); font-size: 11.5px; }
.xem-anh-sp { width: 120px; height: 120px; flex: none; border: 1px dashed var(--vien-o); border-radius: 8px; display: flex; align-items: center; justify-content: center; background: #fafafa; color: #9ca3af; font-size: 12px; overflow: hidden; }
.xem-anh-sp img { max-width: 100%; max-height: 100%; object-fit: contain; }
.o-tien { text-align: right; font-variant-numeric: tabular-nums; }

/* ===== danh sach kieu Perfex: cong cu trong khung bang, tuy chon duoi ten dong ===== */
.dau-trang { margin: -6px 0 10px; }
.lk-nhom { font-size: 13.5px; }
.loc-bang { padding: 12px 14px; margin: 0; border-bottom: 1px solid var(--vien); align-items: center; }
.loc-bang select { height: 32px; font-size: 13px; }
.loc-bang .o-tim-bang { flex: 0 1 260px; height: 32px; margin-left: auto; font-size: 13px; }
.chan-bang { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 10px 14px; border-top: 1px solid var(--vien); }
.chan-bang .phu:first-child { margin-right: auto; }
.chan-bang .nut { height: 30px; font-size: 13px; }
.bang td.ma-noi-bo { color: #1e40af; font-weight: 600; max-width: 190px; overflow-wrap: break-word; }
.bang a.ten-sp { color: var(--xam); font-weight: 500; }
.bang a.ten-sp:hover { color: var(--chinh); }
.bang .thong-so { max-width: 420px; }
.thong-so > div { white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nut-dong:focus { outline: 0; }
.nut-dong:focus-visible { color: var(--chu); }
.tuy-chon-dong { font-size: 12px; color: var(--mo); margin-top: 2px; visibility: hidden; }
.bang tr:hover .tuy-chon-dong, .tuy-chon-dong:focus-within { visibility: visible; }
.tuy-chon-dong a, .bang .tuy-chon-dong a { color: var(--xam); }
.tuy-chon-dong a:hover { color: var(--chinh); }
.form-dong { display: inline; margin: 0; }
.lk, .lk-do { border: 0; background: none; padding: 0; font: inherit; color: var(--xam); cursor: pointer; }
.lk:hover { color: var(--chinh); }
.lk-do { color: var(--do); }
.lk-do:hover { color: #b91c1c; }

/* ===== khung noi them / sua (giong modal Perfex) ===== */
/* so do tu modal "Thêm mục mới" cua CRM cu: rong 600, bo 16, dau / chan dem 20, than dem 24 20, nen toi rgba(55,65,81,.7) */
dialog.hop-phu { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; overflow-y: auto; }
dialog.hop-phu::backdrop { background: rgba(55, 65, 81, .7); }
.hop-hop { width: 600px; max-width: calc(100% - 20px); margin: 30px auto; background: #fff; border: 1px solid var(--vien); border-radius: 16px; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05); }
.hop-dau { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 20px; border-bottom: 1px solid #e5e5e5; }
.hop-dau h2 { margin: 0; font-size: 18px; line-height: 25.7px; font-weight: 600; color: var(--xam); }
.nut-dong { width: 28px; height: 28px; margin-top: -4px; border: 0; background: none; font-size: 30px; font-weight: 300; line-height: 28px; color: #9ca3af; cursor: pointer; padding: 0; }
.nut-dong:hover { color: var(--nhan); }
.hop-than { padding: 24px 20px; }
.hop-than > .bang { border: 1px solid var(--vien); }
.hop-chan { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 20px; border-top: 1px solid #e5e5e5; }
.chan-trai { margin-right: auto; }
.hop-trang { margin: 0; }
.hop-trang-duoi { margin-top: 12px; }
.form-sp .bao { margin-bottom: 15px; }
.bat-buoc { color: #ef4444; font-size: 12.8px; font-weight: 600; margin-right: 3px; }
.dau-hoi { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; border: 1.3px solid var(--nhan); border-radius: 50%; font-size: 9.5px; font-weight: 700; color: var(--nhan); vertical-align: 1px; margin-left: 2px; cursor: help; }
.bieu-mau input.o-ma-noi-bo { color: #1e40af; font-weight: 600; }
.bieu-mau input.o-ma-noi-bo::placeholder { color: #9ca3af; }
.bieu-mau input[readonly] { background: #f3f4f6; }
.goi-y { display: block; margin-top: 2px; font-size: 12.8px; font-weight: 400; color: var(--mo); }
.bieu-mau .o-tien-trai { text-align: left; }
.them-tt { border: 1px solid var(--vien); border-radius: 8px; padding: 10px 14px; margin-bottom: 0; }
.them-tt summary { cursor: pointer; color: var(--nhan); font-weight: 600; }
.them-tt[open] summary { margin-bottom: 12px; }
.sp-anh-dong { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.sp-anh-dong .o-chon { margin: 8px 0 0; }
.sp-anh-dong .phu { margin: 6px 0 0; }

/* ===== dien thoai ===== */
@media (max-width: 860px) {
    .menu { position: fixed; left: -250px; z-index: 20; transition: left .2s; box-shadow: 0 0 30px rgba(0, 0, 0, .25); }
    .menu.mo { left: 0; }
    .nut-menu { display: block; }
    .thanh-tren { padding: 0 12px; }
    .noi-dung { padding: 14px; }
    .hai-cot { grid-template-columns: minmax(0, 1fr); }
    .bang-tt th { width: 38%; padding-right: 10px; }
    .ten-toi { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .bang thead { display: none; }
    .bang, .bang tbody, .bang tr, .bang td { display: block; width: 100%; }
    .bang tr { border-bottom: 1px solid var(--vien); padding: 8px 4px; }
    .bang tbody tr:hover td { background: none; }
    .bang td { border: 0; padding: 3px 12px; }
    .bang td[data-n]::before { content: attr(data-n) ": "; color: var(--mo); font-size: 12px; }
    .bang td:first-child::before, .bang td[data-n=""]::before { content: none; }
    .bang td:empty { display: none; }
    .nw { white-space: normal; }
    .bang td.so { text-align: left; }
    .tuy-chon-dong { visibility: visible; font-size: 13px; margin-top: 4px; }
    .bang .thong-so { max-width: none; }
    .bang td.ma-noi-bo { max-width: none; }
    .loc-bang .o-tim-bang { flex: 1 1 100%; margin-left: 0; order: -1; }
    .hop-hop { margin: 10px auto; }
    .hop-than { padding: 20px 14px; }
    .hop-dau, .hop-chan { padding: 16px 14px; }
}

/* ===== Nhap Muc (nhap san pham tu tep) ===== */
.dau-nhap { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.bang-cuon { overflow-x: auto; }
.bang-mau { border: 1px solid var(--vien); border-radius: 6px; margin-bottom: 12px; }
.ghi-chu-nhap { margin: 0 0 16px; padding-left: 18px; }
.ghi-chu-nhap li { margin-bottom: 3px; }
.form-nhap { max-width: 460px; }
.form-nhap input[type=file] { height: auto; padding: 5px 8px; }
.hang-nut-nhap { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 860px) {
    .an-dt { display: none !important; }
    .bang-mau .bang thead { display: table-header-group; }
    .bang-mau .bang { display: table; width: auto; }
    .bang-mau .bang tbody { display: table-row-group; }
    .bang-mau .bang tr { display: table-row; }
    .bang-mau .bang td, .bang-mau .bang th { display: table-cell; width: auto; padding: 8px 10px; }
}

/* ===== o chon tha xuong co tim (chon.js) - so do o chon Perfex: cao 34, muc 32, chu 14 ===== */
.chon-tim { position: relative; margin-top: 6px; font-weight: 400; }
.chon-tim select.chon-goc { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; margin: 0; padding: 0; border: 0; }
.chon-tim .chon-nut { margin: 0; }
.chon-nut { display: flex; align-items: center; width: 100%; height: 34px; padding: 0 10px 0 12px; border: 1px solid var(--vien-o); border-radius: 6px; background: rgba(249, 250, 251, .7); font: inherit; font-size: 14px; color: var(--chu); text-align: left; cursor: pointer; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05); }
.chon-nut.chua-chon { color: #9ca3af; }
.chon-nut:focus, .chon-tim.mo .chon-nut { outline: 0; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .2); }
.chon-nut:disabled { cursor: default; background: #f3f4f6; }
.chon-chu { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chon-mui { width: 16px; height: 16px; flex: none; color: #4b5563; transition: transform .15s; }
.chon-tim.mo .chon-mui { transform: rotate(180deg); }
.chon-menu { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60; background: #fff; border: 1px solid var(--vien); border-radius: 8px; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1); overflow: hidden; }
.chon-tim.mo .chon-menu { display: block; }
.chon-tim.len .chon-menu { top: auto; bottom: calc(100% + 4px); }
.chon-o-tim { padding: 8px; border-bottom: 1px solid var(--vien); }
.bieu-mau .chon-o-tim input { margin: 0; }
.chon-ds { list-style: none; margin: 0; padding: 4px 0; max-height: 280px; overflow-y: auto; }
.chon-ds li { min-height: 32px; padding: 6px 16px; font-size: 14px; color: var(--chu); cursor: pointer; line-height: 20px; }
.chon-ds li.chon-tro { background: #f3f4f6; }
.chon-ds li.chon-dang { font-weight: 600; }
.chon-khong { padding: 8px 16px 10px; font-size: 13.5px; color: var(--mo); }

/* hop Nhom: o ten + nut Nhom moi (nhu Perfex) */
.nhom-moi { display: flex; gap: 0; margin-bottom: 16px; }
.nhom-moi input { margin: 0; border-radius: 6px 0 0 6px; }
.nhom-moi .nut { border-radius: 0 8px 8px 0; flex: none; }

/* ===== Doi thue hang loat ===== */
.doi-thue { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 18px; align-items: start; }
.doi-thue .the { margin-bottom: 18px; }
.buoc { font-weight: 600; color: var(--chu); margin: 2px 0 10px; }
.buoc + .dong-thue { margin-top: 0; }
.dong-thue { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-weight: 400; color: var(--xam); }
.dong-thue .the-so { margin-left: auto; }
.the-so { font-size: 11.5px; color: var(--mo); background: #f3f4f6; border-radius: 6px; padding: 1px 8px; white-space: nowrap; }
.doi-thue-trai .buoc:not(:first-child) { margin-top: 18px; }
.an-nhan { font-size: 0; margin-bottom: 12px; }
.an-nhan .chon-tim { font-size: 14px; margin-top: 0; }
.ap-dung { border-top: 1px solid var(--vien); margin-top: 18px; padding-top: 14px; }
.ap-dung p { margin: 0 0 10px; color: var(--chu); font-size: 14px; }
.chip { display: inline-block; font-size: 11.5px; font-weight: 500; border-radius: 6px; padding: 1px 8px; background: #f3f4f6; color: #4b5563; white-space: nowrap; }
.chip-xanh { background: #dcfce7; color: #15803d; }
.dau-the { display: flex; align-items: center; gap: 6px; padding: 14px 16px; border-bottom: 1px solid var(--vien); color: var(--chu); }
.dau-the .loc-xem { margin-left: auto; height: 32px; width: 220px; max-width: 45%; border: 1px solid var(--vien-o); border-radius: 6px; padding: 0 10px; font: inherit; font-size: 13px; background: rgba(249, 250, 251, .7); }
.cuon-xem { max-height: 520px; overflow-y: auto; }
.cuon-xem thead th { position: sticky; top: 0; z-index: 1; }
.ma-nho { color: #1e40af; font-weight: 600; font-size: 12.5px; margin-right: 4px; }
.nut-nho { height: 28px; padding: 0 10px; font-size: 12.5px; }
.doi-thue-phai .trong { padding: 40px 16px; text-align: center; color: var(--mo); margin: 0; }
@media (max-width: 860px) {
    .doi-thue { grid-template-columns: 1fr; }
}

/* ===== bang danh sach kieu Perfex (so do tu trang San pham CRM cu) ===== */
.dau-trang { margin: -12px 0 12px; }
.nut-dau { margin-bottom: 10px; gap: 4px; }
.nut .bt { width: 15px; height: 15px; margin-right: 6px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.khung-bang { padding: 24px; border: 1px solid rgba(209, 213, 219, .6); border-radius: 8px; }
.dt-cong-cu { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.dt-so { height: 30px; width: 75px; padding: 0 6px 0 10px; border: 1px solid var(--vien-o); border-radius: 6px; font: inherit; font-size: 12px; color: #555; background: #fff; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05); }
.nhom-nut { display: inline-flex; align-items: stretch; }
.nut-dt { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border: 1px solid var(--vien-o); background: #fff; color: var(--xam); font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; border-radius: 0; margin-left: -1px; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05); white-space: nowrap; }
.nut-dt:hover, .tha.mo > .nut-dt { background: #f9fafb; color: var(--chu); }
.nhom-nut > :first-child, .nhom-nut > :first-child .nut-dt { margin-left: 0; border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
.nhom-nut > :last-child, .nhom-nut > :last-child .nut-dt { border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
.nhom-nut > .tha { margin-left: -1px; }
.nhom-nut > .tha:first-child { margin-left: 0; }
.nhom-nut > .tha .nut-dt { margin-left: 0; }
.nut-tai svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dang-loc { color: var(--chinh); }
.cham-loc { width: 6px; height: 6px; border-radius: 50%; background: var(--chinh); display: inline-block; }
.tha { position: relative; display: inline-flex; }
.tha-menu { display: none; position: absolute; top: calc(100% + 4px); left: 0; z-index: 40; min-width: 160px; padding: 4px 0; background: #fff; border: 1px solid var(--vien); border-radius: 8px; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1); }
.tha.mo .tha-menu { display: block; }
.tha-menu a { display: block; padding: 7px 16px; color: var(--chu); font-size: 13.5px; white-space: nowrap; }
.tha-menu a:hover { background: #f3f4f6; color: var(--chu); }
.tha-loc { width: 250px; padding: 12px 14px 6px; }
.tha-loc label { display: block; font-size: 12.5px; font-weight: 600; color: var(--nhan); margin-bottom: 10px; }
.tha-loc select { display: block; width: 100%; height: 32px; margin-top: 4px; border: 1px solid var(--vien-o); border-radius: 6px; padding: 0 8px; font: inherit; font-size: 13px; color: var(--chu); background: #fff; }
.tha-loc .bo-loc { padding: 4px 0 8px; color: var(--chinh); font-size: 13px; }
.tha-loc .bo-loc:hover { background: none; }
.dt-tim { display: flex; margin-left: auto; }
.dt-kinh { display: inline-flex; align-items: center; justify-content: center; width: 45px; height: 30px; border: 1px solid var(--vien-o); border-right: 0; border-radius: 6px 0 0 6px; color: var(--nhan); background: #fff; }
.dt-kinh svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.dt-tim input { height: 30px; width: 198px; padding: 0 10px; border: 1px solid var(--vien-o); border-radius: 0 6px 6px 0; font: inherit; font-size: 12.8px; color: #555; background: #fff; }
.dt-tim input:focus, .dt-so:focus { outline: 0; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .2); }
.bang-vien { border: 1px solid var(--vien); border-radius: 6px; overflow-x: auto; }
.bang-luoi th, .bang-luoi td { border: 1px solid var(--vien); padding: 10px; }
.bang-luoi tr > :first-child { border-left: 0; }
.bang-luoi tr > :last-child { border-right: 0; }
.bang-luoi thead tr:first-child > * { border-top: 0; }
.bang-luoi tbody tr:last-child > * { border-bottom: 0; }
.bang-luoi th { vertical-align: middle; }
.bang-luoi th a.sx { display: inline-flex; align-items: center; gap: 6px; color: inherit; font-weight: 600; }
.bang-luoi th.so a.sx { justify-content: flex-end; text-align: right; }
.bang-luoi th a.sx:hover { color: var(--chu); }
.sx-mui { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 4px; background: #e5e7eb; flex: none; }
.sx-mui svg { width: 13px; height: 13px; fill: none; stroke: #4b5563; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sx-mui.giam svg { transform: rotate(180deg); }
.cot-chon, .bang th.cot-chon, .bang td.cot-chon { width: 44px; text-align: center; }
.bang-luoi td.cot-chon, .bang-luoi th.cot-chon { padding: 10px 0; }
.cot-chon input { display: block; width: 16px; height: 16px; margin: 2px auto 0; accent-color: var(--nut); cursor: pointer; }
.bang th.cot-chon input { margin-top: 0; }
.bang tr.dang-chon td { background: #eff6ff; }
.dt-chan { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; }
.dt-info { color: var(--mo); font-size: 13.5px; }
.dt-trang { display: flex; flex-wrap: wrap; gap: 4px; }
.dt-trang a, .dt-trang span { display: inline-flex; align-items: center; justify-content: center; min-width: 31px; height: 31px; padding: 0 12px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--xam); }
.dt-trang a:hover { background: #f3f4f6; color: var(--chu); }
.dt-trang .dang { background: #e5e7eb; color: var(--chu); }
.dt-trang .tat { color: #9ca3af; font-weight: 500; }
.da-chon { margin: 0 0 14px; color: var(--chu); }
.hl-sua { border-top: 1px solid var(--vien); margin-top: 6px; padding-top: 14px; }
.hl-sua.mo-di { opacity: .45; }
.hl-nhom { margin-top: -4px; }
@media (max-width: 860px) {
    .khung-bang { padding: 12px; }
    .dt-tim { margin-left: 0; width: 100%; order: -1; }
    .dt-tim input { width: 100%; flex: 1; }
    .bang-vien { border: 0; }
    .bang-luoi th, .bang-luoi td { border: 0; padding: 3px 12px; }
    .bang-luoi td.cot-chon { width: auto; text-align: left; padding: 3px 12px; }
    .bang-luoi td.cot-chon input { margin: 2px 0 0; }
    .bang-luoi tr { border-bottom: 1px solid var(--vien); }
}

/* ===== Bao gia ===== */
.o-so-lieu { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.o-sl { display: block; padding: 12px 14px; background: #fff; border: 1px solid rgba(209, 213, 219, .8); border-radius: 8px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); color: var(--chu); }
.o-sl:hover { border-color: #9ca3af; color: var(--chu); }
.o-sl.dang { border-color: var(--nut); box-shadow: 0 0 0 1px var(--nut); }
.o-sl .sl-ten { font-size: 14px; font-weight: 600; }
.o-sl .sl-pt { font-size: 12px; color: var(--mo); }
.o-sl b { display: block; margin-top: 2px; font-size: 13.5px; font-weight: 600; color: var(--xam); }
.o-sl.tt-xam .sl-ten { color: #4b5563; }
.o-sl.tt-xanh .sl-ten { color: #2563eb; }
.o-sl.tt-cam .sl-ten { color: #d97706; }
.o-sl.tt-do .sl-ten { color: #dc2626; }
.o-sl.tt-luc .sl-ten { color: #16a34a; }
.nhan-tt { display: inline-block; font-size: 12px; font-weight: 500; border-radius: 6px; padding: 1px 8px; border: 1px solid; white-space: nowrap; }
.nhan-tt.tt-xam { color: #4b5563; border-color: #d1d5db; background: #f9fafb; }
.nhan-tt.tt-xanh { color: #2563eb; border-color: #bfdbfe; background: #eff6ff; }
.nhan-tt.tt-cam { color: #b45309; border-color: #fde68a; background: #fffbeb; }
.nhan-tt.tt-do { color: #dc2626; border-color: #fecaca; background: #fef2f2; }
.nhan-tt.tt-luc { color: #15803d; border-color: #bbf7d0; background: #f0fdf4; }
.the-bg { display: inline-block; font-size: 12.5px; background: #f3f4f6; border-radius: 6px; padding: 3px 8px; margin: 1px 0; color: var(--chu); }
.bang a.so-bg { font-weight: 500; }

/* form */
.form-bg .the { padding: 24px; border: 1px solid rgba(209, 213, 219, .6); border-radius: 8px; }
.bg-dau { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 40px; }
.o-kem-nut { display: flex; align-items: stretch; margin-top: 6px; }
.o-kem-nut .chon-tim, .o-kem-nut > select { flex: 1; min-width: 0; margin-top: 0; }
.o-kem-nut .chon-nut { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.nut-vuong { width: 42px; padding: 0; height: 34px; font-size: 18px; border-radius: 0 6px 6px 0; margin-left: -1px; }
.nhan-nho { font-weight: 600; color: var(--nhan); font-size: 13.5px; margin-bottom: 4px; }
.gia-tri-nho { color: var(--xam); }
.lk-nho { font-weight: 500; font-size: 12.5px; margin-left: 4px; }
.dia-chi-bg { margin: 2px 0 14px; }
.bieu-mau .dia-chi-bg textarea { margin-top: 0; }
.o-tien-to { display: flex; margin-top: 6px; }
.o-tien-to .tien-to { display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid var(--vien-o); border-right: 0; border-radius: 6px 0 0 6px; background: #f9fafb; color: var(--nhan); font-weight: 500; }
.bieu-mau .o-tien-to input { margin-top: 0; border-radius: 0 6px 6px 0; }
/* o chon ngay (tinh/ngay.js) - kieu CRM cu: o chu + nut lich lien, bang lich CN dau tuan */
.o-ngay { display: flex; position: relative; min-width: 0; }
label > .o-ngay:not([style]) { margin-top: 6px; }
span.o-ngay > input { flex: 1 1 auto; min-width: 0; margin: 0 !important; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.o-kem-nut > .o-ngay { flex: 1 1 auto; margin: 0 !important; }
.o-kem-nut > .o-ngay .nut-lich { border-radius: 0; }
.nut-lich { width: 42px; flex: none; margin: 0; padding: 0; border: 1px solid var(--vien-o); border-left: 0; border-radius: 0 6px 6px 0; background: #fff; color: var(--nhan); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05); }
span.o-ngay > button.nut-lich { margin: 0; align-self: stretch; height: auto; }
.nut-lich:hover { background: #f9fafb; color: var(--chu); }
.nut-lich svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.lich-bang { position: fixed; z-index: 2000; width: 290px; padding: 10px 12px 8px; background: #fff; border: 1px solid var(--vien); border-radius: 8px; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .12), 0 4px 6px -4px rgba(0, 0, 0, .1); font-size: 13.5px; color: var(--chu); }
.lich-bang[hidden] { display: none; }
.lich-dau { display: flex; align-items: center; gap: 2px; margin-bottom: 6px; }
.lich-nut { width: 28px; height: 28px; flex: none; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 6px; background: none; color: #4b5563; cursor: pointer; }
.lich-nut:hover { background: #f3f4f6; color: var(--chu); }
.lich-nut svg { width: 16px; height: 16px; fill: currentColor; }
.lich-toi { margin-left: auto; }
.lich-chon { position: relative; margin-left: 6px; }
.lich-chon select { appearance: none; -webkit-appearance: none; height: 28px; margin: 0; padding: 0 16px 0 6px; border: 0; border-radius: 6px; background: transparent; font: inherit; font-size: 14px; font-weight: 500; color: var(--chu); cursor: pointer; box-shadow: none; }
.lich-chon select:hover { background: #f3f4f6; }
.lich-chon select:focus { outline: 0; box-shadow: 0 0 0 2px rgba(59, 130, 246, .3); }
.lich-chon::after { content: ""; position: absolute; right: 6px; top: 12px; border: 3.5px solid transparent; border-top: 4px solid #4b5563; pointer-events: none; }
.lich-luoi { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; }
.lich-thu { height: 28px; display: flex; align-items: center; justify-content: center; font-size: 12.5px; color: #6b7280; }
.lich-ngay { height: 30px; padding: 0; border: 0; border-radius: 5px; background: none; font: inherit; font-size: 13.5px; color: var(--chu); cursor: pointer; }
.lich-ngay:hover { background: #f3f4f6; }
.lich-ngay.ngoai { color: #b6bcc6; }
.lich-ngay.lich-hom-nay { color: #2563eb; font-weight: 700; }
.lich-ngay.lich-chon-ngay, .lich-ngay.lich-chon-ngay:hover { background: #2563eb; color: #fff; font-weight: 700; }
.mo-nhat { opacity: .6; }
.bg-cong-cu { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.tim-sp-bg { flex: 0 1 500px; }
.tim-sp-bg .o-kem-nut { margin-top: 0; }
.o-tim-sp { position: relative; flex: 1; }
.bieu-mau .o-tim-sp input { margin-top: 0; border-radius: 6px 0 0 6px; }
.kq-tim-sp { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 50; max-height: 360px; overflow-y: auto; background: #fff; border: 1px solid var(--vien); border-radius: 8px; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1); padding: 4px 0; }
.kq-tim-sp a { display: block; padding: 7px 14px; color: var(--chu); font-weight: 400; }
.kq-tim-sp a.tro, .kq-tim-sp a:hover { background: #f3f4f6; color: var(--chu); }
.kq-tim-sp b { font-weight: 600; }
.kq-ma { color: #1e40af; font-size: 12px; font-weight: 600; margin-left: 4px; }
.kq-phu { display: block; color: var(--mo); font-size: 12.5px; }
.kq-trong { display: block; padding: 8px 14px; color: var(--mo); }
.hien-sl { display: flex; align-items: center; gap: 14px; font-weight: 600; color: var(--nhan); }
.bieu-mau .hien-sl .o-chon { margin: 0; align-items: center; }
.goi-y-hm { margin-bottom: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.goi-y-hm .nut-dt { border-radius: 4px; border-style: dashed; margin-left: 0; }
.bang-dong-bg td { vertical-align: top; padding: 8px 6px; }
.bang-dong-bg th { padding: 8px 6px; }
.bang-dong-bg th .dv { display: block; font-weight: 400; color: var(--mo); font-size: 11.5px; }
.bieu-mau .bang-dong-bg input, .bieu-mau .bang-dong-bg select, .bieu-mau .bang-dong-bg textarea { margin-top: 0; }
.bieu-mau .bang-dong-bg textarea { margin-top: 6px; font-size: 13px; min-height: 52px; }
.bieu-mau .bang-dong-bg input.so { text-align: right; }
.bieu-mau .bang-dong-bg select { padding: 0 4px; }
.cot-keo { width: 26px; text-align: center; }
.keo { cursor: grab; color: #9ca3af; letter-spacing: -2px; user-select: none; display: inline-block; padding-top: 7px; }
.cot-ma { width: 230px; }
.cot-dv { width: 80px; }
.cot-sl { width: 80px; }
.cot-gia { width: 130px; }
.cot-thue { width: 108px; }
.bieu-mau .cot-thue select { font-size: 13px; }
.bang .cot-tong { width: 120px; padding-top: 16px; font-weight: 500; color: var(--chu); }
.cot-xoa { width: 34px; text-align: center; }
.nut-xoa-dong { border: 0; background: none; color: #9ca3af; font-size: 20px; line-height: 1; cursor: pointer; padding: 6px 4px; }
.nut-xoa-dong:hover { color: var(--do); }
.bang tr.dong-hm td { background: #f8fafc; }
.bang .so-hm { font-weight: 700; color: var(--chu); text-align: center; padding-top: 16px; }
.bieu-mau input.o-hm { font-weight: 700; }
tr.dang-keo td { opacity: .45; }
.bg-tong { display: flex; justify-content: flex-end; margin-top: 16px; }
.bang-tong { border-collapse: collapse; min-width: 420px; }
.bang-tong th { text-align: right; font-weight: 500; color: var(--xam); padding: 8px 12px; white-space: nowrap; }
.bang-tong td { padding: 6px 4px; }
.bang-tong td.so { text-align: right; min-width: 120px; padding-right: 8px; color: var(--chu); font-variant-numeric: tabular-nums; }
.bang-tong tr + tr th, .bang-tong tr + tr td, .bang-tong tbody tr th, .bang-tong tbody tr td { border-top: 1px solid var(--vien); }
.bieu-mau .bang-tong input { margin-top: 0; width: 160px; text-align: right; }
.o-ck { display: inline-flex; }
.bieu-mau .o-ck input { width: 110px; border-radius: 6px 0 0 6px; }
.bieu-mau .o-ck select { width: 54px; border-radius: 0 6px 6px 0; margin-left: -1px; padding: 0 6px; margin-top: 0; }
.bang-tong .dong-thanh-tien th, .bang-tong .dong-thanh-tien td { font-weight: 700; color: var(--chu); font-size: 15px; }
.thanh-luu { position: sticky; bottom: 0; z-index: 10; display: flex; justify-content: flex-end; gap: 8px; padding: 12px 22px 12px 0; margin: 0 -22px -22px; background: rgba(255, 255, 255, .96); border-top: 1px solid var(--vien); box-shadow: 0 -2px 6px rgba(0, 0, 0, .04); }

/* xem */
.xem-bg { padding: 0; overflow: visible; }
.xem-bg-cong-cu { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--vien); }
.xem-bg-nut { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.xem-bg-nut form { margin: 0; }
.tha-phai { left: auto; right: 0; min-width: 210px; }
.muc-menu { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 7px 16px; font: inherit; font-size: 13.5px; color: var(--chu); cursor: pointer; white-space: nowrap; }
.muc-menu:hover { background: #f3f4f6; }
.to-bg { padding: 24px 28px; }
.to-bg-dau { display: flex; justify-content: space-between; gap: 30px; margin-bottom: 20px; }
.to-bg-dau .ben-phai { text-align: right; max-width: 50%; }
.so-bg-lon { font-size: 20px; font-weight: 600; color: var(--chinh); margin-bottom: 6px; }
.ten-ct-bg { font-weight: 600; color: var(--chu); }
.phu-bg { color: var(--nhan); font-size: 13.5px; }
.nhan-den { font-weight: 600; color: var(--chu); }
.ten-kh-bg { font-weight: 500; text-transform: uppercase; }
.ngay-bg { margin-top: 12px; color: var(--chu); }
.bang-xem-bg th .dv { display: block; font-weight: 400; color: var(--mo); font-size: 11.5px; }
.bang-xem-bg td.giua, .bang-xem-bg th.giua { text-align: center; width: 50px; }
.ten-dong-xem { color: var(--chu); font-weight: 500; }
.mo-ta-xem { color: var(--nhan); white-space: pre-line; font-size: 13px; }
.ma-dong-xem { color: #6b7280; font-size: 12px; }
.bang tr.dong-hm-xem td { background: #f8fafc; color: var(--chu); }
.khoi-bg { margin-top: 18px; color: var(--chu); }
.chu-nhieu-dong { white-space: pre-line; }
.ghi-chu-noi-bo { margin: 0 20px 14px; }
.xem-bg > .phu { padding: 0 20px 16px; margin: 0; }
@media (max-width: 860px) {
    .o-so-lieu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bg-dau { grid-template-columns: minmax(0, 1fr); }
    .form-bg .the { padding: 14px; }
    .bang-dong-bg thead { display: none; }
    .bang-dong-bg td { padding: 4px 12px; }
    .cot-ma, .cot-dv, .cot-sl, .cot-gia, .cot-thue, .bang .cot-tong, .cot-xoa, .cot-keo { width: auto; }
    .bang-tong { min-width: 0; width: 100%; }
    .bang-tong th { white-space: normal; padding: 8px 6px; }
    .bieu-mau .bang-tong input { width: 100%; min-width: 90px; }
    .bang-tong td.so { min-width: 0; }
    .to-bg { padding: 16px 14px; }
    .to-bg-dau { flex-direction: column; gap: 14px; }
    .to-bg-dau .ben-phai { text-align: left; max-width: none; }
    .thanh-luu { margin: 0 -14px -14px; padding-right: 14px; }
}

/* xem bao gia: gui khach, khach da xem / da ky */
.nut-gui { background: #0068ff; border-color: #0068ff; }
.nut-gui:hover { background: #0054cc; border-color: #0054cc; }
.nut .bt-do { color: #e5252a; }
.tt-khach { padding: 12px 20px 0; }
.tt-khach .bao { margin-bottom: 8px; }
.da-ky-bg { display: flex; gap: 14px; align-items: center; }
.da-ky-bg img { max-height: 60px; max-width: 160px; background: #fff; border-radius: 6px; padding: 4px; }
.dong-xem { margin: 0; }

.lien-ket-tg { margin: 0 0 8px; }
.bang-doi-chieu th { text-align: center; }
.bang-doi-chieu tr.dc-them td { background: #f0fdf4; }
.bang-doi-chieu tr.dc-bo td { background: #fef2f2; color: #9ca3af; }
.bang-doi-chieu tr.dc-doi td { background: #fffbeb; }
.khong-vien { border-bottom: 0; padding: 0 0 14px; }

/* anh tung dong bao gia */
.o-anh-dong { position: relative; margin-top: 6px; height: 56px; border: 1px dashed var(--vien-o); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #9ca3af; font-size: 12px; cursor: pointer; background: #fafafa; }
.o-anh-dong:hover { border-color: #9ca3af; color: var(--xam); }
.o-anh-dong.co-anh { cursor: default; background: #fff; }
.o-anh-dong img { max-width: 100%; max-height: 52px; object-fit: contain; }
.o-anh-dong .bo-anh { position: absolute; top: -8px; right: -8px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--vien-o); background: #fff; color: var(--do); font-size: 14px; line-height: 1; cursor: pointer; padding: 0; }
.anh-dong-xem { float: right; width: 64px; height: 48px; object-fit: contain; margin-left: 10px; }

/* man hinh chia doi: danh sach bao gia ben trai + bao gia dang xem (nhu Perfex) */
.chia-doi { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.ds-trai { padding: 0; position: sticky; top: 70px; max-height: calc(100vh - 90px); display: flex; flex-direction: column; overflow: hidden; }
.tim-trai { display: flex; padding: 10px; border-bottom: 1px solid var(--vien); margin: 0; }
.tim-trai input { flex: 1; min-width: 0; height: 32px; border: 1px solid var(--vien-o); border-left: 0; border-radius: 0 6px 6px 0; padding: 0 10px; font: inherit; font-size: 13px; }
.tim-trai .dt-kinh { width: 36px; height: 32px; }
.ds-trai-cuon { overflow-y: auto; flex: 1; }
.muc-trai { display: block; padding: 9px 12px; border-bottom: 1px solid #f1f2f4; color: var(--xam); }
.muc-trai:hover { background: #f9fafb; color: var(--xam); }
.muc-trai.dang { background: #eff6ff; box-shadow: inset 3px 0 0 var(--chinh); }
.mt-dau { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.mt-dau b { color: var(--chu); font-weight: 600; }
.mt-kh { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 2px 0; }
.mt-cuoi { display: flex; justify-content: space-between; font-size: 12px; color: var(--mo); }
.mt-tien { color: var(--chu); font-weight: 500; font-variant-numeric: tabular-nums; }
.xem-het { display: block; padding: 9px 12px; font-size: 13px; border-top: 1px solid var(--vien); }
@media (max-width: 1200px) { .chia-doi { grid-template-columns: minmax(0, 1fr); } .ds-trai { display: none; } }
.da-hd { color: #15803d; font-size: 12.5px; white-space: normal; }
.nut-hd { background: #16a34a; border-color: #16a34a; color: #fff; }
.nut-hd:hover { background: #15803d; border-color: #15803d; color: #fff; }

/* ---------- hoa don (giong CRM cu) ---------- */
.vach-menu { display: block; height: 1px; margin: 4px 0; background: #e5e7eb; }
.tha-menu a.dang { font-weight: 600; background: #f3f4f6; }
.bt-tt { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.o-sl-hd .sl-ten { display: flex; align-items: center; gap: 6px; }
.o-sl-hd .sl-dem { display: block; margin-top: 4px; }
.o-sl-hd .sl-dem b { display: inline; margin: 0; }
.o-sl.tt-qua-han .sl-ten { color: #ea580c; }
.o-sl.tt-xam .sl-ten .bt-tt { color: #9ca3af; }
.nhan-tt.tt-qua-han { color: #c2410c; border-color: #fed7aa; background: #fff7ed; }
.tt-hd { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; }
.tt-hd .bt-tt { width: 18px; height: 18px; }
.tt-hd.tt-do { color: #dc2626; }
.tt-hd.tt-luc { color: #16a34a; }
.tt-hd.tt-cam { color: #d97706; }
.tt-hd.tt-qua-han { color: #ea580c; }
.tt-hd.tt-xam { color: #6b7280; }
.tt-hd .tt-chu { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bang-hd td.giua, .bang-hd th.giua { text-align: center; }
.bang-hd .cham { color: #9ca3af; }
.hd-dau { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; margin: -6px 0 12px; }
.hd-dau .tha { order: 2; }
.hd-tien { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-tien { display: inline-flex; gap: 6px; align-items: baseline; padding: 3px 8px; border: 1px solid; border-radius: 6px; font-size: 13px; background: #fff; }
.chip-tien b { font-weight: 600; color: var(--chu); }
.chip-luc { color: #16a34a; border-color: #bbf7d0; }
.chip-do { color: #dc2626; border-color: #fecaca; }
.chip-cam { color: #d97706; border-color: #fde68a; }
.nut-nam { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border: 1px solid var(--vien-o); border-radius: 6px; background: #fff; font: inherit; font-size: 13px; color: var(--chu); cursor: pointer; }
.nut-nam svg, .loc-nguoi-tao svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.hd-cong-cu { align-items: center; }
.hd-cong-cu .loc-nguoi-tao { margin-left: auto; }
.hd-cong-cu .loc-nguoi-tao .nut { min-width: 240px; justify-content: space-between; }
.dong-bang-chu td { text-align: right; padding-top: 8px; font-size: 13px; }
.o-cham::placeholder { color: #9ca3af; }
@media (max-width: 700px) { .hd-dau { justify-content: flex-start; } .hd-cong-cu .loc-nguoi-tao { margin-left: 0; } }
.goi-y-ma { position: absolute; right: auto; z-index: 1060; max-height: 340px; }
.goi-y-ma a { white-space: normal; }
.kq-ma-dau { margin-left: 0; margin-right: 2px; }
.goi-y-ma .kq-trong { font-size: 12px; background: #f9fafb; border-top: 1px solid #f3f4f6; }

/* ===== Bang dong hang bao gia / hoa don theo mau CRM cu (14/11) =====
   Tieu de nen xam chu thuong; o nhap vien bo tron cao 40px; Ma SP + nut "Dán ảnh" | Thông tin sản phẩm | ĐVT | SLượng | Đơn giá | Thuế | Tổng */
.form-bg .bg-cong-cu { margin-bottom: 14px; }
.form-bg .tim-sp-bg { flex: 0 1 520px; }
.form-bg .o-tim-sp { position: relative; display: block; }
.form-bg .o-tim-sp .kinh-tim { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: #9ca3af; pointer-events: none; }
.form-bg .o-tim-sp .kinh-tim svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.bieu-mau.form-bg .o-tim-sp input { padding-left: 36px; border-radius: 8px; height: 40px; }

.bang-dong-vien { border: 1px solid #e5e7eb; border-radius: 6px; }
.form-bg table.bang-dong-bg { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.form-bg .bang-dong-bg thead th { background: #f3f4f6; color: #111827; font-size: 15px; font-weight: 500; padding: 15px 8px; border-bottom: 1px solid #e5e7eb; text-align: left; white-space: nowrap; text-transform: none; letter-spacing: 0; }
.form-bg .bang-dong-bg thead th.so { text-align: right; }
.form-bg .bang-dong-bg thead th.giua { text-align: center; }
.form-bg .bang-dong-bg thead th:first-child { border-top-left-radius: 6px; }
.form-bg .bang-dong-bg thead th:last-child { border-top-right-radius: 6px; }
.form-bg .bang-dong-bg td { padding: 18px 8px; vertical-align: top; background: #f9fafb; border-bottom: 1px solid #e5e7eb; }
.form-bg .bang-dong-bg tbody tr:last-child td { border-bottom: 0; }

/* do rong cot */
.form-bg .bang-dong-bg .cot-keo { width: 26px; padding-left: 4px; padding-right: 0; }
.form-bg .bang-dong-bg .cot-ma { width: 200px; }
.form-bg .bang-dong-bg .cot-tt { width: auto; }
.form-bg .bang-dong-bg .cot-dv { width: 104px; }
.form-bg .bang-dong-bg .cot-sl { width: 108px; }
.form-bg .bang-dong-bg .cot-gia { width: 176px; }
.form-bg .bang-dong-bg .cot-thue { width: 100px; }
.form-bg .bang-dong-bg .cot-tong { width: 150px; }
.form-bg .bang-dong-bg .cot-xoa { width: 52px; text-align: center; }

/* o nhap vien bo tron */
.bieu-mau.form-bg .bang-dong-bg input, .bieu-mau.form-bg .bang-dong-bg select, .bieu-mau.form-bg .bang-dong-bg textarea {
    margin: 0; height: 44px; padding: 0 14px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); font-size: 15px; color: var(--chu); }
.bieu-mau.form-bg .bang-dong-bg input:focus, .bieu-mau.form-bg .bang-dong-bg select:focus, .bieu-mau.form-bg .bang-dong-bg textarea:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .15); outline: 0; }
.bieu-mau.form-bg .bang-dong-bg input::placeholder, .bieu-mau.form-bg .bang-dong-bg textarea::placeholder { color: #9ca3af; }
.bieu-mau.form-bg .bang-dong-bg input.so { text-align: right; font-variant-numeric: tabular-nums; }
.bieu-mau.form-bg .bang-dong-bg input.giua { text-align: center; }
.bieu-mau.form-bg .bang-dong-bg select { padding: 0 6px; text-align: center; text-align-last: center; cursor: pointer; }
.bieu-mau.form-bg .bang-dong-bg textarea.tu-gian { height: auto; min-height: 44px; padding: 10px 14px; line-height: 1.45; resize: vertical; overflow: hidden; }
.form-bg .bang-dong-bg .cot-tong { padding-top: 29px; padding-right: 12px; font-size: 15px; font-weight: 500; color: var(--chu); font-variant-numeric: tabular-nums; text-align: right; }

/* nut "Dán ảnh" duoi o Ma SP */
.form-bg .bang-dong-bg .o-anh-dong { display: inline-flex; width: auto; height: auto; margin-top: 8px; padding: 0; border: 0; background: none; cursor: pointer; }
.form-bg .anh-pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px dashed #c9cdd4; border-radius: 6px; background: #fff; color: #6b7280; font-size: 13.5px; }
.form-bg .anh-pill:hover { border-color: #9ca3af; color: #374151; }
.form-bg .anh-pill svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.form-bg .bang-dong-bg .o-anh-dong.co-anh { position: relative; padding: 3px; border: 1px solid #e5e7eb; border-radius: 6px; background: #fff; cursor: default; }
.form-bg .bang-dong-bg .o-anh-dong img { display: block; max-width: 96px; max-height: 64px; object-fit: contain; }

/* keo tha + xoa */
.form-bg .bang-dong-bg .keo { display: block; width: 18px; height: 18px; margin-top: 13px; padding: 0; color: #c0c5cd; cursor: grab; letter-spacing: 0; opacity: 0; }
.form-bg .bang-dong-bg .keo svg { width: 18px; height: 18px; fill: currentColor; }
.form-bg .bang-dong-bg tr:hover .keo { opacity: 1; }
.form-bg .nut-xoa-dong { width: 34px; height: 34px; margin-top: 5px; padding: 8px; border: 0; border-radius: 8px; background: none; color: #9ca3af; cursor: pointer; }
.form-bg .nut-xoa-dong svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.form-bg .nut-xoa-dong:hover { color: #dc2626; background: #fef2f2; }

/* hang muc */
.form-bg .bang-dong-bg tr.dong-hm td { background: #eef7f1; }
.form-bg .o-hm-dong { display: flex; align-items: center; gap: 12px; }
.form-bg .bang-dong-bg .so-hm { min-width: 26px; font-weight: 700; font-size: 15px; color: #15803d; text-align: center; padding: 0; }
.bieu-mau.form-bg .bang-dong-bg input.o-hm { flex: 1; font-weight: 700; text-transform: uppercase; }
.form-bg .bang-dong-bg .tong-hm { color: #15803d; font-weight: 700; }

/* them dong / hang muc duoi bang */
.dong-them { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.nut-them-dong { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: #374151; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.nut-them-dong:hover { background: #f9fafb; border-color: #9ca3af; }
.nut-them-dong svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.dong-them .phu { font-size: 12.5px; margin-left: 4px; }

/* dien thoai: moi dong thanh 1 the */
@media (max-width: 860px) {
    .bang-dong-vien { border: 0; }
    .form-bg table.bang-dong-bg, .form-bg .bang-dong-bg tbody { display: block; width: 100%; }
    .form-bg .bang-dong-bg thead { display: none; }
    .form-bg .bang-dong-bg tr { display: grid; grid-template-columns: 1fr .8fr 1.5fr 1fr; gap: 8px; padding: 12px; margin-bottom: 10px; border: 1px solid #e5e7eb; border-radius: 10px; background: #f9fafb; position: relative; }
    .form-bg .bang-dong-bg td { display: block; width: auto !important; padding: 0; border: 0; background: none !important; }
    .form-bg .bang-dong-bg .cot-keo { display: none; }
    .form-bg .bang-dong-bg .cot-ma, .form-bg .bang-dong-bg .cot-tt, .form-bg .bang-dong-bg tr.dong-hm td[colspan] { grid-column: 1 / -1; }
    .form-bg .bang-dong-bg .cot-ma, .form-bg .bang-dong-bg tr.dong-hm td[colspan] { padding-right: 38px; }
    .form-bg .bang-dong-bg .cot-tong { grid-column: 1 / -1; padding: 4px 4px 0; }
    .form-bg .bang-dong-bg .cot-tong::before { content: "Tổng: "; font-weight: 400; color: #6b7280; }
    .form-bg .bang-dong-bg .cot-xoa { position: absolute; right: 8px; top: 12px; width: auto; }
    .form-bg .bang-dong-bg .cot-dv::before, .form-bg .bang-dong-bg .cot-sl::before, .form-bg .bang-dong-bg .cot-gia::before, .form-bg .bang-dong-bg .cot-thue::before { display: block; font-size: 12px; color: #6b7280; margin: 0 0 3px 2px; }
    .form-bg .bang-dong-bg .cot-dv::before { content: "ĐVT"; }
    .form-bg .bang-dong-bg .cot-sl::before { content: "SLượng"; }
    .form-bg .bang-dong-bg .cot-gia::before { content: "Đơn giá"; }
    .form-bg .bang-dong-bg .cot-thue::before { content: "Thuế"; }
    .bieu-mau.form-bg .bang-dong-bg input, .bieu-mau.form-bg .bang-dong-bg select { height: 40px; padding: 0 8px; font-size: 14px; }
}
/* can lai do rong: nhuong cho cot Thong tin san pham */
.form-bg .bang-dong-bg .cot-keo { width: 22px; }
.form-bg .bang-dong-bg .cot-ma { width: 190px; }
.form-bg .bang-dong-bg .cot-dv { width: 86px; }
.form-bg .bang-dong-bg .cot-sl { width: 92px; }
.form-bg .bang-dong-bg .cot-gia { width: 142px; }
.form-bg .bang-dong-bg .cot-thue { width: 92px; }
.form-bg .bang-dong-bg .cot-tong { width: 130px; }
.form-bg .bang-dong-bg .cot-xoa { width: 40px; }
.form-bg .bang-dong-bg thead th, .form-bg .bang-dong-bg thead th.cot-tong { padding-top: 15px; padding-bottom: 15px; vertical-align: middle; }
/* 14/11: thu gon cac cot so, nhuong cho "Thông tin sản phẩm" */
.form-bg .bang-dong-bg td { padding-left: 5px; padding-right: 5px; }
.form-bg .bang-dong-bg thead th { padding-left: 5px; padding-right: 5px; }
.form-bg .bang-dong-bg .cot-keo { width: 18px; padding-left: 2px; padding-right: 0; }
.form-bg .bang-dong-bg .cot-ma { width: 170px; }
.form-bg .bang-dong-bg .cot-dv { width: 70px; }
.form-bg .bang-dong-bg .cot-sl { width: 70px; }
.form-bg .bang-dong-bg .cot-gia { width: 118px; }
.form-bg .bang-dong-bg .cot-thue { width: 78px; }
.form-bg .bang-dong-bg .cot-tong { width: 112px; padding-right: 8px; }
.form-bg .bang-dong-bg .cot-xoa { width: 34px; }
.bieu-mau.form-bg .bang-dong-bg input, .bieu-mau.form-bg .bang-dong-bg select { padding: 0 10px; font-size: 14.5px; }
.bieu-mau.form-bg .bang-dong-bg select { padding: 0 4px; }
.bieu-mau.form-bg .bang-dong-bg textarea.tu-gian { padding: 10px 12px; font-size: 14.5px; }
.form-bg .nut-xoa-dong { width: 30px; height: 30px; padding: 6px; margin-top: 7px; }

/* 14/11: thanh tim san pham + nut "+" va "Thêm hạng mục" tren bang nhu CRM cu */
.form-bg .tim-sp-bg { flex: 0 1 500px; }
.form-bg .o-tim-sp { display: block; flex: 1; }
.bieu-mau.form-bg .o-tim-sp input { padding-left: 12px; height: 36px; border-radius: 6px 0 0 6px; }
.form-bg .goi-y-hm { margin-bottom: 12px; }

/* ---------- thanh toan / bien lai (14/11, theo CRM cu) ---------- */
.chu-luc { color: #15803d; }
.nut-luc { background: #22c55e; border-color: #22c55e; color: #fff; }
.nut-luc:hover { background: #16a34a; border-color: #16a34a; color: #fff; }
.nut-xoa-do { background: #dc2626; border-color: #dc2626; color: #fff; }
.nut-xoa-do:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.tt-tieu { font-size: 18px; font-weight: 600; color: var(--chu); margin: -4px 0 12px; }
.tt-tieu .phu { font-size: 13px; font-weight: 400; }
.tab-tt { display: flex; gap: 4px; padding: 4px; background: #eef0f3; border-radius: 8px; margin-bottom: 12px; }
.tab-tt button { border: 0; background: none; padding: 8px 14px; border-radius: 6px; font: inherit; font-size: 14px; color: var(--chu); cursor: pointer; }
.tab-tt button.dang { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); font-weight: 500; }
.tt-cong-cu { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.tt-cong-cu .tt-xoa { margin-left: auto; }
.tt-chia { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 16px; align-items: start; }
.tt-bl { padding: 0; overflow: hidden; }
.khung-bl { display: block; width: 100%; min-height: 520px; border: 0; }
.the-tt { padding: 14px 16px; margin-bottom: 14px; }
.the-tt h3 { margin: 0 0 10px; font-size: 14.5px; font-weight: 600; }
.the-tt dl { display: grid; grid-template-columns: 116px 1fr; gap: 7px 10px; margin: 0; font-size: 13.5px; }
.the-tt dt { color: var(--mo); }
.the-tt dd { margin: 0; color: var(--chu); }
.form-ghi-tt .chan-form { display: flex; justify-content: flex-end; margin-top: 8px; }
.ghi-tt { margin: 0 20px 16px; border: 1px solid var(--vien); border-radius: 8px; background: #fff; }
.ghi-tt-dau { padding: 10px 16px; background: #f9fafb; border-bottom: 1px solid var(--vien); border-radius: 8px 8px 0 0; font-weight: 600; }
.ghi-tt-than { padding: 14px 16px 4px; }
.ghi-tt-chan { display: flex; justify-content: flex-end; gap: 6px; padding: 10px 16px; background: #f9fafb; border-top: 1px solid var(--vien); border-radius: 0 0 8px 8px; }
.cac-tt .bang-vien { margin-top: 6px; }
dialog.hop-phu.hop-rong .hop-hop { width: 1360px; }
.dot-dau { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.dot-loc { display: flex; flex-direction: column; gap: 12px; }
.bieu-mau .dot-loc select#dot-kh { width: 430px; max-width: 100%; margin: 0; }
.dot-hien { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.bieu-mau .dot-hien select { width: auto; margin: 0; }
.dot-tong { text-align: right; font-size: 13.5px; }
.dot-dem { color: #2563eb; }
.dot-dem b { display: inline-block; min-width: 40px; padding: 2px 8px; margin-left: 4px; border: 1px solid #bfdbfe; border-radius: 6px; background: #eff6ff; text-align: center; }
.dot-tien { color: #dc2626; font-size: 14.5px; margin-top: 6px; }
.dot-chu { color: #dc2626; font-size: 12px; }
.dot-hien-so { margin-top: 6px; font-weight: 600; color: var(--chu); }
.bang-dot th { font-size: 12.5px; vertical-align: top; }
.bieu-mau .bang-dot th select { display: block; margin-top: 4px; height: 32px; font-weight: 400; }
.bieu-mau .bang-dot td input, .bieu-mau .bang-dot td select { margin: 0; height: 34px; }
.bang-dot .cot-ngay { width: 150px; }
.bang-dot .cot-pt { width: 200px; }
.bang-dot .cot-gd { width: 140px; }
.bang-dot .cot-tien { width: 140px; }
.bang-dot .cot-du { width: 130px; }
.bang-dot .cot-danh { width: 80px; text-align: center; }
.dot-kh-ten { font-size: 13px; color: var(--chu); margin-top: 2px; }
.dot-trang { justify-content: center; margin: 12px 0 0; }
.dot-chan { margin: 16px -20px -24px; }
@media (max-width: 1000px) { .tt-chia { grid-template-columns: 1fr; } }
.bieu-mau .bang-dot input[type=checkbox] { width: 16px; height: 16px; margin: 6px 0 0; }
.bang-dot td a { color: #2563eb; }

/* ---------- thu tien khach hang (14/11) ---------- */
.ttk-goi-y { margin: -8px 0 12px; }
.ttk-chon-kh { padding: 16px 20px; margin-bottom: 14px; }
.ttk-het-no { padding: 28px; text-align: center; color: #15803d; }
.ttk-het-no svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.ttk-form { padding: 18px 20px; }
.ttk-hang { display: grid; grid-template-columns: 150px 220px minmax(260px, 1.4fr) 180px 1fr; gap: 0 14px; align-items: end; }
.ttk-hang .o-kem-nut input { margin-top: 0; text-align: right; }
.ttk-luoi { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 6px 0 14px; }
.ttk-o { border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px 14px; }
.ttk-o .n { font-size: 12.5px; color: #6b7280; }
.ttk-o .v { font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; color: #111827; }
.ttk-o .v.do { color: #b91c1c; }
.ttk-o .v.xanh { color: #15803d; }
.ttk-bang tr.chon td { background: #f0fdf4; }
.ttk-bang .cot-chon { width: 40px; }
.bieu-mau .ttk-bang input.o-so-thu { width: 150px; margin: 0 0 0 auto; height: 32px; text-align: right; }
.bieu-mau .ttk-bang input[type=checkbox] { width: 16px; height: 16px; margin: 0; }
.ttk-bang tfoot td { background: #f9fafb; font-weight: 600; }
.ttk-tag { font-size: 12px; border-radius: 10px; padding: 1px 8px; white-space: nowrap; }
.ttk-tag.do { background: #fee2e2; color: #991b1b; }
.ttk-tag.cam { background: #ffedd5; color: #9a3412; }
.ttk-tag.xanh { background: #dcfce7; color: #166534; }
.ttk-chan { display: flex; justify-content: flex-end; margin-top: 14px; }
@media (max-width: 1100px) { .ttk-hang { grid-template-columns: 1fr 1fr; } .ttk-luoi { grid-template-columns: 1fr; } }
/* thu tien: o tich thang hang (tieu de + tung dong cung can giua), moi o can giua theo chieu doc voi o nhap so thu */
.ttk-bang th.cot-chon, .ttk-bang tbody td:first-child, .ttk-bang tfoot td:first-child { width: 44px; padding-left: 0; padding-right: 0; text-align: center; }
.bieu-mau .ttk-bang input[type=checkbox] { display: inline-block; vertical-align: middle; margin: 0; }
.ttk-bang tbody td { vertical-align: middle; }

/* ---------- cong no khach hang (14/11) ---------- */
.tab-kh { display: inline-flex; margin-bottom: 14px; }
.tab-kh a { padding: 8px 16px; border-radius: 6px; color: var(--chu); font-size: 14px; }
.tab-kh a.dang { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); font-weight: 500; }
.cn-dau { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.cn-tieu { margin: 0; font-size: 17px; font-weight: 600; flex: 1 1 100%; color: #dc2626; }
.cn-tieu span { color: var(--chu); }
.cn-bang td a { color: #2563eb; }
.cn-nut .nut { display: inline-flex; align-items: center; gap: 6px; }
.cn-ky { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bieu-mau.cn-ky select, .bieu-mau.cn-ky input { margin: 0; width: auto; height: 34px; }
.bieu-mau.cn-ky input { width: 120px; }
.cn-tuy { display: inline-flex; align-items: center; gap: 6px; }
.cn-tuy[hidden] { display: none; }
.cn-nut { display: flex; gap: 6px; margin-left: auto; }
.cn-o { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.cn-the { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px 14px; }
.cn-the small { display: block; color: #6b7280; font-size: 12.5px; }
.cn-the b { font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cn-the.chinh { background: #fef2f2; border-color: #fecaca; }
.cn-the.chinh small, .cn-the.chinh b { color: #a51c30; }
.cn-khung { padding: 6px 16px 16px; }
.cn-h { font-weight: 600; font-size: 14px; margin: 12px 0 8px; }
.cn-bang tr.cn-cong td { font-weight: 600; background: #f9fafb; }
.cn-bang tr.cn-cuoi td { font-weight: 700; background: #fef2f2; color: #a51c30; }
.cn-tre { color: #c2410c; font-weight: 600; }
.cn-tre.xau { color: #b91c1c; }
.cn-tuoi { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #e5e7eb; border-top: 0; border-radius: 0 0 8px 8px; font-size: 13px; }
.cn-tuoi div { padding: 7px 12px; }
.cn-tuoi div + div { border-left: 1px solid #eef0f3; }
.cn-tuoi small { display: block; color: #6b7280; }
.cn-het { margin: 4px 0; }
@media (max-width: 860px) { .cn-o, .cn-tuoi { grid-template-columns: 1fr 1fr; } .cn-nut { margin-left: 0; } }

.cn-tt { border-radius: 8px; padding: 9px 14px; margin-bottom: 12px; font-size: 13.5px; }
.cn-tt.dong-y { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.cn-tt.sai-lech { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.cn-tt.cho { background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; }
.hd-khach { margin: 0 20px 12px; }
/* o nhap + nut di kem (o link gui khach, tong tien khach chuyen...): cung dong, cung chieu cao, lien vien */
.o-kem-nut > input, .o-kem-nut > .o-tim-sp { flex: 1; min-width: 0; }
.bieu-mau .o-kem-nut > input { margin-top: 0; border-radius: 6px 0 0 6px; }
.o-kem-nut > .nut-vuong, .o-kem-nut > .nut { flex: none; display: inline-flex; align-items: center; justify-content: center; height: auto; min-height: 34px; margin-top: 0; border-radius: 0 6px 6px 0; margin-left: -1px; }
.o-kem-nut > .nut:not(.nut-vuong) { padding: 0 12px; }

/* ---------- mua hang (14/11, theo module Mua hang CRM cu) ---------- */
.mh-nut-dau { justify-content: flex-end; margin-top: -6px; }
.mh-o3, .mh-o4 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.mh-o4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mh-o { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px 14px; }
.mh-o small { display: block; color: #6b7280; font-size: 12px; text-transform: none; letter-spacing: .02em; }
.mh-o b { font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mh-tim { max-width: 520px; margin-bottom: 12px; }
.bieu-mau.mh-tim .o-kem-nut { margin-top: 0; }
.bang-ncc .phu, .bang-mh .phu { font-size: 12px; }
tr.mo-nhat td { opacity: .6; }
.mh-loc { display: grid; grid-template-columns: 140px 140px minmax(220px, 1.4fr) 150px minmax(240px, 1.6fr); gap: 0 12px; align-items: end; margin-bottom: 8px; }
.bieu-mau.mh-loc label { margin-bottom: 8px; font-size: 12.5px; }
.mh-tien { margin: 0 0 12px; }
.chip-xam { color: #4b5563; border-color: #e5e7eb; }
a.chip-tien { text-decoration: none; }
.o-sl-mh .sl-ten { display: flex; justify-content: space-between; align-items: baseline; }
.o-sl-mh .sl-pt { font-weight: 400; }
.o-sl-mh .sl-dem { display: block; font-size: 13px; color: #6b7280; margin-top: 2px; }
.o-sl-mh .sl-tien { display: block; margin-top: 4px; font-size: 16px; font-weight: 600; color: var(--chu); }
.bang-mh td.c-ncc { max-width: 0; width: 34%; }
.bang-mh td.c-ncc a, .bang-mh td.c-ncc .phu { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mh-luoi3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
.mh-luoi3 .doi { grid-column: span 2; }
.mh-form-ncc { max-width: 900px; padding: 18px 20px; }
.chan-form { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.mh-dau { padding: 16px 18px 4px; margin-bottom: 14px; }
.mh-dau-luoi { display: grid; grid-template-columns: minmax(280px, 2fr) minmax(180px, 1.2fr) 160px 160px; gap: 0 16px; align-items: end; }
.mh-dau textarea { min-height: 38px; resize: vertical; }
.canh-trung { color: #b45309; }
.mh-hang { padding: 12px 14px; margin-bottom: 14px; }
.bang-dong-mh { width: 100%; border-collapse: collapse; table-layout: fixed; }
.bang-dong-mh th { font-size: 13px; text-align: left; padding: 8px 6px; border-bottom: 1px solid #e5e7eb; }
.bang-dong-mh th.so { text-align: right; }
.bang-dong-mh td { padding: 8px 6px; vertical-align: top; border-bottom: 1px solid #f1f2f4; }
.bang-dong-mh .c-stt { width: 46px; text-align: center; color: #6b7280; padding-top: 16px; }
.bang-dong-mh .c-dv { width: 100px; }
.bang-dong-mh .c-sl { width: 80px; }
.bang-dong-mh .c-gia { width: 130px; }
.bang-dong-mh .c-thue { width: 100px; }
.bang-dong-mh .c-tt { width: 120px; text-align: right; padding-top: 16px; font-variant-numeric: tabular-nums; }
.bang-dong-mh .c-xoa { width: 36px; text-align: center; }
.bieu-mau .bang-dong-mh input, .bieu-mau .bang-dong-mh select, .bieu-mau .bang-dong-mh textarea { margin-top: 0; }
.bieu-mau .bang-dong-mh textarea { margin-top: 6px; min-height: 34px; height: 34px; resize: none; overflow: hidden; font-size: 13px; padding: 7px 12px; }
.bieu-mau .bang-dong-mh input.so { text-align: right; }
.gan-mh { display: inline-block; margin-top: 4px; color: #15803d; font-size: 12px; }
.goi-y-gia { display: block; margin-top: 4px; color: #6b7280; font-size: 11.5px; text-align: right; }
.nut-xoa-mh { border: 0; background: none; color: #9ca3af; font-size: 20px; cursor: pointer; padding: 6px 4px; }
.nut-xoa-mh:hover { color: var(--do); }
.mh-chan-bang { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.mh-tong { border-collapse: collapse; min-width: 330px; font-variant-numeric: tabular-nums; }
.mh-tong th { text-align: left; font-weight: 400; color: #4b5563; padding: 4px 12px 4px 0; }
.mh-tong td { text-align: right; padding: 4px 0; }
.mh-tong tr.dam th, .mh-tong tr.dam td { font-weight: 700; color: var(--chu); font-size: 15px; }
.bieu-mau .mh-tong input { margin: 0; width: 140px; height: 32px; margin-left: auto; }
.hoi { display: inline-flex; width: 16px; height: 16px; border-radius: 50%; background: #6b7280; color: #fff; font-size: 11px; align-items: center; justify-content: center; cursor: help; }
.mh-tra-ngay { padding: 12px 18px; margin-bottom: 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bieu-mau .mh-tra-ngay label { margin: 0; }
.bieu-mau .mh-tra-ngay select { width: auto; margin: 0; }
.mh-nut-phai { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.mh-tt { padding: 14px 18px; margin-bottom: 14px; }
.mh-tt dl { display: grid; grid-template-columns: 170px 1fr; gap: 7px 14px; margin: 0; font-size: 14px; }
.mh-tt dt { color: #6b7280; }
.mh-tt dd { margin: 0; }
.mh-tt-hd dl { grid-template-columns: 150px 1fr 150px 1fr; }
.khung-bang tfoot td { font-weight: 600; background: #f9fafb; }
.khung-bang tfoot tr.dam td { font-weight: 700; color: var(--chu); }
.mh-tra { padding: 14px 18px; }
.mh-tra h3 { margin: 0 0 10px; font-size: 15px; }
.mh-ghi-tra { display: grid; grid-template-columns: 140px 160px 220px 1fr auto; gap: 0 12px; align-items: end; margin-top: 12px; }
.bieu-mau.mh-ghi-tra label { margin-bottom: 0; }
.mh-nut-ghi .nut { margin-top: 6px; height: 34px; }
.lk-do { color: #dc2626; }
.mh-tab { display: inline-flex; margin: 4px 0 10px; }
@media (max-width: 1000px) {
    .mh-loc, .mh-dau-luoi, .mh-ghi-tra, .mh-luoi3 { grid-template-columns: 1fr 1fr; }
    .mh-luoi3 .doi, .mh-loc-tim, .mh-loc-ncc, .mh-o-ncc { grid-column: 1 / -1; }
    .mh-o3, .mh-o4 { grid-template-columns: 1fr 1fr; }
    .mh-tt-hd dl, .mh-tt dl { grid-template-columns: 120px 1fr; }
}
.bang-dong-mh th { vertical-align: middle; }
.goi-y-gia { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bang-dong-mh th.c-stt, .bang-dong-mh th.c-tt { padding-top: 8px; }

/* ---------- kho hang (14/11) ---------- */
.kho-tab { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid #e5e7eb; margin: 0 0 14px; }
.kho-tab a { padding: 8px 14px; color: #4b5563; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.kho-tab a:hover { color: var(--chinh); }
.kho-tab a.dang { color: var(--chinh); border-bottom-color: var(--chinh); }
a.mh-o { display: block; color: inherit; }
a.mh-o:hover { border-color: var(--chinh); }
.mh-o .phu { display: block; font-size: 12px; margin-top: 2px; }
.kho-o5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.kho-loc select { height: 30px; width: auto; max-width: 240px; padding: 0 8px; border: 1px solid var(--vien-o); border-radius: 6px; font: inherit; font-size: 13px; color: #555; background: #fff; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05); }
.kho-loc select:focus { outline: 0; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .2); }
.kho-loc .dt-tim { margin-left: auto; }
.kho-nut { white-space: nowrap; }
.kho-nut .form-dong { margin-left: 4px; display: inline-flex; vertical-align: middle; }
.kho-nut > .nut { vertical-align: middle; }
.bang-kho td.kho-nut { vertical-align: middle; padding-top: 6px; padding-bottom: 6px; }
.nut-vuong-nho { width: 28px; padding: 0; justify-content: center; }
.nut-vuong-nho .bt { margin: 0; }
.kho-dvt { font-size: 13px; font-weight: 500; color: #6b7280; }
.kho-loai { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid; }
.kho-loai.nhap { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.kho-loai.xuat { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.kho-loai.kk { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.kho-chu-thich { margin: 10px 2px 0; font-size: 12.5px; }
.kho-h { font-weight: 600; font-size: 15px; margin: 0 0 10px; }
.kho-bat-dau { max-width: 720px; }
.kho-bat-dau h3 { margin: 0 0 8px; }
.kho-form-bd { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin: 12px 0 4px; }
.bieu-mau.kho-form-bd label { margin: 0; width: 220px; }
.kho-form-bd .nut { height: 34px; }
.kho-cai-dat { margin-top: 14px; }
.kho-cai-dat p { margin: 0 0 6px; }
.kho-ky { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.bieu-mau.kho-ky label { margin: 0; width: 150px; }
.bieu-mau.kho-ky label.kho-ky-nut { width: auto; }
.kho-ky-nut span { display: none; }
.kho-ky-nut .nut { height: 34px; margin: 0; }
.kho-ky-nhanh { display: flex; gap: 4px; flex-wrap: wrap; align-self: flex-end; }
.kho-ky-nhanh a { display: inline-flex; align-items: center; height: 34px; padding: 0 10px; border: 1px solid #e5e7eb; border-radius: 6px; color: #4b5563; font-size: 13px; background: #fff; }
.kho-ky-nhanh a.dang, .kho-ky-nhanh a:hover { border-color: var(--chinh); color: var(--chinh); }
.kho-huong-dan p { margin: 0 0 6px; }
.kho-huong-dan p:last-child { margin: 0; }
.kho-loc-td { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.bieu-mau .kho-loc-td input[type=search], .bieu-mau .kho-loc-td select { height: 32px; font-size: 13px; width: 260px; margin: 0; display: inline-block; }
.bieu-mau .kho-loc-td select { width: 180px; }
.bieu-mau .kho-loc-td .o-chon { margin: 0; align-items: center; }
.bieu-mau .kho-loc-td .o-chon input { margin: 0; }
.kho-tong-td { margin-left: auto; color: #4b5563; font-weight: 500; }
.kho-dau-kk { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.bieu-mau .kho-dau-kk label { margin: 0; width: 180px; }
.bieu-mau .kho-dau-kk label + label { flex: 1; max-width: 420px; width: auto; }
.bang-td td { vertical-align: top; padding-top: 16px; }
.bang-td td.c-sl, .bang-td td.c-gia, .bang-td td.c-dv { padding-top: 10px; }
.bang-td .c-sl { width: 120px; }
.bang-td .c-gia { width: 160px; }
.bieu-mau .bang-td input { margin: 0; height: 32px; text-align: right; }
.bang-td tr.da-nhap td { background: #f0f9ff; }
.bang-td .nguon-gia { font-size: 11.5px; text-align: right; margin-top: 2px; }
.bang-td .goi-y-sl { font-size: 12px; }
.bang-gan td { vertical-align: middle; }
.bang-gan .goi-y-gan { margin: 2px 4px 2px 0; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; line-height: 26px; }
.bang-gan .form-gan-khac { margin: 0; min-width: 240px; }
.bieu-mau.form-gan-khac .o-kem-nut > input { height: 30px; font-size: 13px; }
.bang-gan .form-gan-khac .nut { min-height: 30px; height: 30px; font-size: 13px; }
@media (max-width: 760px) {
    .kho-o5 { grid-template-columns: 1fr 1fr; }
    .kho-loc .dt-tim { margin-left: 0; flex: 1 1 100%; }
    .kho-tong-td { margin-left: 0; flex: 1 1 100%; }
    .bieu-mau .kho-loc-td input[type=search], .bieu-mau .kho-loc-td select { width: 100%; }
    .bang-td .c-sl, .bang-td .c-gia { width: auto; }
    .bang-td td, .bang-td td.c-sl, .bang-td td.c-gia, .bang-td td.c-dv { padding-top: 3px; }
}
.bang-gan .form-gan-khac .o-kem-nut { margin-top: 0; }

/* ---------- kho: don vi quy doi (14/11) ---------- */
.kho-don-vi { margin-bottom: 14px; }
.kho-don-vi .kho-h { display: flex; align-items: center; gap: 6px; }
.kho-don-vi .kho-h .bt { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.kho-don-vi > p { margin: 0 0 12px; }
.kho-form-dv { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0 24px; }
.bieu-mau.kho-form-dv .kho-dv-goc { margin: 0; }
.kho-dv-qd .nhan { display: block; color: var(--nhan); font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.kho-dv-dong { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.bieu-mau .kho-dv-dong input { margin: 0; width: 180px; }
.bieu-mau .kho-dv-dong input.so { width: 120px; text-align: right; }
.kho-dv-dong .nut-vuong-nho { height: 34px; width: 34px; }
.dv-goc-chu { min-width: 40px; white-space: nowrap; }
.kho-dv-luu { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.kho-goc { font-size: 11.5px; }
.kho-dv-td { font-size: 11.5px; }
@media (max-width: 760px) {
    .kho-form-dv { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .kho-dv-dong { gap: 6px; }
    .dv-goc-chu { min-width: 0; }
    .bieu-mau .kho-dv-dong input { width: auto; flex: 1; min-width: 0; }
    .bieu-mau .kho-dv-dong input.so { width: 80px; flex: none; }
    .kho-dv-luu { justify-content: stretch; }
}
.bang-td .c-dv { width: 150px; }
.kho-dv-td { white-space: nowrap; }
.bieu-mau .bang-td input.o-dv-td { text-align: left; }
@media (max-width: 760px) { .bang-td .c-dv { width: auto; } }
/* goi y gan dong kho: muc khop */
.bang-gan .goi-y-gan { display: inline-flex; align-items: center; gap: 6px; max-width: 300px; }
.goi-y-gan .goi-y-ten { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.goi-y-gan .goi-y-pt { flex: none; font-size: 11px; font-weight: 600; padding: 0 5px; line-height: 16px; border-radius: 8px; background: #f3f4f6; color: #4b5563; }
.goi-y-gan .bt { margin: 0; }
.nut.goi-y-cao { background: #ecfdf5; border-color: #34d399; color: #047857; font-weight: 600; }
.nut.goi-y-cao:hover { background: #d1fae5; border-color: #10b981; color: #065f46; }
.nut.goi-y-cao .goi-y-pt { background: #10b981; color: #fff; }
.nut.goi-y-thap { color: #9ca3af; border-style: dashed; }
.nut.goi-y-thap:hover { color: #4b5563; }
.goi-y-mau { color: #047857; font-weight: 600; }

/* ---------- chu ky cua toi (14/11, theo trang Chu ky cua toi CRM cu) ---------- */
.ck-wrap { max-width: 640px; }
.ck-mo { color: #6b7280; font-size: 13.5px; margin: 0 0 16px; }
.ck-hien { display: flex; flex-direction: column; align-items: center; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 16px; background: #f8fafc; }
.ck-hien .nhan { font-weight: 700; font-size: 14px; }
.ck-hien .chu { font-size: 12px; color: #6b7280; font-style: italic; }
.ck-hien img { max-height: 72px; max-width: 200px; margin: 10px 0 4px; }
.ck-hien .ten { font-weight: 700; }
.ck-o { position: relative; border: 1.5px solid #94a3b8; border-radius: 8px; background: #fff; height: 200px; touch-action: none; }
.ck-o canvas { width: 100%; height: 100%; display: block; border-radius: 8px; cursor: crosshair; }
.ck-o .goi-y { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #cbd5e1; font-size: 22px; pointer-events: none; }
.ck-o .goi-y[hidden] { display: none; }
.ck-luc { margin-top: 6px; font-size: 13px; }
.ck-nut { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.ck-nut .ck-luu { margin-left: auto; }
.ten-ck { color: var(--nhan); font-size: 13px; font-weight: 500; margin-right: 12px; }
.ten-ck:hover, .ten-ck.dang { color: var(--chinh); }
.form-nguoi-giao { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.form-nguoi-giao select { height: 28px; font: inherit; font-size: 12.5px; padding: 0 6px; border: 1px solid var(--vien-o); border-radius: 6px; background: #fff; color: #374151; }
@media (max-width: 640px) { .ck-o { height: 180px; } .ten-ck { display: none; } }

/* ---------- viec hang ngay (15/11, theo trang Viec hang ngay CRM cu) ---------- */
.dem-menu { min-width: 22px; height: 20px; padding: 0 7px; border-radius: 10px; background: #ca8a04; color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
.chu-cam { color: #ea580c; }
.vv-tab { display: flex; gap: 4px; border-bottom: 1px solid #e5e7eb; margin: -6px 0 14px; }
.vv-tab a { padding: 10px 10px; color: #4b5563; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.vv-tab a span { color: #9ca3af; font-weight: 500; margin-left: 4px; }
.vv-tab a.dang { color: var(--chu); border-bottom-color: var(--chu); }
.vv-loc { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.vv-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.vv-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 13px; border: 1px solid #e5e7eb; border-radius: 15px; color: #374151; font-size: 13px; background: #fff; }
.vv-chip b { color: #9ca3af; font-weight: 600; }
.vv-chip b.do { color: #dc2626; }
.vv-chip:hover { border-color: #9ca3af; }
.vv-chip.dang { background: var(--chu); border-color: var(--chu); color: #fff; }
.vv-chip.dang b { color: #fff; }
.vv-tim { margin-left: auto; }
.vv-tim input { width: 210px; }
.vv-nv { margin-left: auto; width: auto; max-width: 240px; height: 30px; padding: 0 8px; border: 1px solid var(--vien-o); border-radius: 6px; font: inherit; font-size: 12.8px; color: #374151; background-color: #fff; cursor: pointer; }
.vv-nv:focus { outline: 0; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .2); }
.vv-nv + .vv-tim { margin-left: 0; }
.vv-bang td { vertical-align: top; }
.vv-bang .vv-stt { width: 46px; color: #6b7280; }
.vv-bang th.vv-ngay, .vv-bang td.vv-ngay { width: 150px; }
.vv-c > span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.vv-bang .vv-nut { width: 190px; white-space: nowrap; text-align: right; }
.vv-nut .form-dong { margin-left: 2px; }
.vv-nut .nut, .vv-nut .form-dong { vertical-align: top; }
.nut.nut-xong { background: #22c55e; border-color: #22c55e; color: #fff; }
.nut.nut-xong:hover { background: #16a34a; border-color: #16a34a; }
.vv-nd { color: var(--chu); white-space: pre-line; overflow-wrap: anywhere; }
.vv-muc { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 0 6px; border-radius: 4px; vertical-align: 1px; }
.vv-muc.muc-1 { color: #c2410c; background: #ffedd5; }
.vv-muc.muc-2 { color: #b91c1c; background: #fee2e2; }
.vv-bang tr.muc-1 > td { background: #fffbf5; }
.vv-bang tr.muc-2 > td { background: #fff7f7; }
.vv-o { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.vv-c { display: inline-flex; align-items: center; gap: 4px; max-width: 320px; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 1px solid transparent; }
.vv-c svg, .vv-lam svg, .vv-lk svg { width: 13px; height: 13px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vv-c.xanh-la { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.vv-c.xanh { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.vv-c.xam { color: #4b5563; background: #f3f4f6; }
a.vv-c:hover { filter: brightness(.96); }
.vv-nguoi { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 6px; font-size: 12.8px; color: #6b7280; }
.vv-lam { display: inline-flex; align-items: center; gap: 4px; color: #4b5563; }
.vv-lk { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 0; font: inherit; color: #6b7280; cursor: pointer; }
.vv-lk:hover { color: var(--chinh); }
.vv-lk.xanh { color: #2563eb; }
.vv-ghi { color: #9ca3af; }
.vv-ngay-chip { display: inline-flex; flex-direction: column; padding: 3px 8px; border-radius: 6px; font-size: 12px; line-height: 1.35; background: #f3f4f6; color: #374151; white-space: nowrap; }
.vv-ngay-chip b { font-weight: 700; }
.vv-ngay-chip.qua-han { background: #fef2f2; color: #b91c1c; }
.vv-ngay-chip.hom-nay { background: #fff7ed; color: #c2410c; }
.vv-xong-luc { color: #4b5563; font-size: 13px; }
.vv-bang tr.da-xong .vv-nd { color: #9ca3af; text-decoration: line-through; }
/* hop thoai */
.form-viec .hop-than > label { margin-bottom: 14px; }
.vs-luoi { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 12px; }
.vg-viec { padding: 10px 12px; background: #f9fafb; border: 1px solid #eef0f3; border-radius: 8px; color: var(--chu); white-space: pre-line; margin-bottom: 12px; }
.vg-hd { margin: 0 0 10px; }
.vg-ds { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.bieu-mau .vg-ds .o-chon { align-items: center; margin-bottom: 10px; color: var(--chu); }
.bieu-mau .vg-ds .o-chon input { margin: 0; }
.td-ds { max-height: 50vh; overflow-y: auto; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.td-trong { text-align: center; color: #6b7280; margin: 4px 0; }
.td-he { align-self: center; font-size: 12px; color: #6b7280; background: #f3f4f6; border-radius: 10px; padding: 2px 10px; }
.td-tin { max-width: 85%; align-self: flex-start; background: #f3f4f6; border-radius: 10px; padding: 6px 10px; }
.td-tin.toi { align-self: flex-end; background: #e0f2fe; }
.td-ai { font-size: 12px; font-weight: 600; color: #4b5563; }
.td-ai span { font-weight: 400; color: #9ca3af; margin-left: 4px; }
.td-nd { white-space: pre-line; overflow-wrap: anywhere; color: var(--chu); }
.hop-dau h2 .bt-td { width: 18px; height: 18px; margin-right: 6px; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
#hop-viec .hop-hop { width: 720px; }
/* them nhieu dong */
.vm-ds { border: 1px solid #e5e7eb; border-radius: 6px; overflow: hidden; }
.vm-dong { display: grid; grid-template-columns: 34px 54px minmax(0, 1fr) 140px 28px; align-items: start; background: #f8fafc; border-top: 1px solid #e5e7eb; }
.vm-dong:first-child { border-top: 0; }
.vm-stt { padding: 9px 0; text-align: center; color: #2563eb; font-weight: 600; }
.vm-icon { display: grid; grid-template-columns: 22px 22px; gap: 2px; padding: 6px 2px; }
.vm-ico { width: 22px; height: 22px; border: 0; background: none; padding: 0; color: #9ca3af; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; }
.vm-ico svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.vm-ico:hover { background: #e5e7eb; color: #4b5563; }
.vm-ico.co { color: #2563eb; }
.vm-co.muc-1 { color: #ea580c; }
.vm-co.muc-2 { color: #dc2626; }
.vm-co.muc-1 svg, .vm-co.muc-2 svg { fill: currentColor; }
.vm-giua { padding: 4px 6px; border-left: 1px solid #e5e7eb; border-right: 1px solid #e5e7eb; background: #fff; }
.bieu-mau .vm-giua textarea { margin: 0; border: 0; box-shadow: none; background: transparent; padding: 4px; resize: vertical; min-height: 54px; }
.bieu-mau .vm-giua .vm-phu { margin: 4px 0 2px; height: 30px; font-size: 13px; }
.vm-ngay { padding: 4px 6px; display: grid; gap: 4px; }
.bieu-mau .vm-ngay input { margin: 0; height: 28px; font-size: 13px; padding: 0 8px; }
.vm-xoa { border: 0; background: none; color: #9ca3af; font-size: 18px; line-height: 1; padding: 8px 0; cursor: pointer; }
.vm-xoa:hover { color: #dc2626; }
.vm-them { margin: 8px 0 6px; color: #2563eb; font-weight: 600; }
.vm-hd { font-size: 12.5px; line-height: 1.5; margin: 0; }
@media (max-width: 760px) {
    .vv-nv { margin-left: 0; max-width: none; width: 100%; }
    .vv-tim { margin-left: 0; width: 100%; }
    .vv-tim input { width: 100%; flex: 1; }
    .vv-bang .vv-stt { display: none; }
    .vv-bang td.vv-ngay, .vv-bang .vv-nut { width: auto; text-align: left; }
    .vs-luoi, .vg-ds { grid-template-columns: 1fr; }
    .vm-dong { grid-template-columns: 28px 50px minmax(0, 1fr) 26px; }
    .vm-ngay { grid-column: 2 / 4; grid-row: 2; grid-template-columns: 1fr 1fr; }
}

/* ---------- anh / tep dinh kem (15/11) ---------- */
.tep-khung { margin-bottom: 14px; border-radius: 8px; }
.tep-khung.tep-keo { outline: 2px dashed #60a5fa; outline-offset: 2px; background: #eff6ff; }
.tep-nhan { display: block; color: var(--nhan); font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.tep-ds { display: flex; flex-wrap: wrap; gap: 6px; }
.tep-ds:empty { display: none; }
.vm-giua .tep-ds { margin: 4px 0; }
.tep-o { position: relative; display: inline-flex; align-items: center; max-width: 220px; min-height: 30px; border: 1px solid #e5e7eb; border-radius: 6px; background: #fff; overflow: hidden; }
.tep-o img { display: block; width: 64px; height: 64px; object-fit: cover; }
.tep-o.dang { opacity: .55; }
.tep-o.dang::after { content: "Đang tải…"; position: absolute; inset: auto 0 0 0; font-size: 10px; text-align: center; background: rgba(255,255,255,.85); }
.tep-ten { padding: 4px 26px 4px 8px; font-size: 12.5px; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.tep-ten:hover, .tep-o a:hover { color: var(--chinh); }
.tep-ten small { color: #9ca3af; margin-left: 4px; }
.tep-xoa { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border: 0; border-radius: 50%; background: rgba(17,24,39,.65); color: #fff; font-size: 13px; line-height: 18px; padding: 0; cursor: pointer; }
.tep-goi-y { margin-top: 6px; font-size: 12.5px; color: #6b7280; }
.lk.xanh { color: #2563eb; font-weight: 600; }
.lk.xanh:hover { color: #1d4ed8; }
.tep-xem { margin-top: 6px; }
.tep-xem .tep-ten { padding-right: 8px; }
.tep-to .tep-o img { width: 150px; height: 150px; }
.tep-ds-tep { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; margin-top: 10px; }
.tep-ds-tep:empty { display: none; }
.td-gui textarea { margin-top: 0; }
.td-tin .tep-xem { margin-top: 4px; }

/* ---------- thong bao (chuong) 15/11 ---------- */
.chuong { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; color: var(--nhan); margin-right: 6px; }
.chuong:hover, .chuong.dang { background: #f3f4f6; color: var(--chinh); }
.chuong svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.chuong-so { position: absolute; top: 1px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #2563eb; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.tb-the { max-width: 860px; }
.tb-dau { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; min-height: 28px; }
.tb-ds { border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.tb-dong { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 11px 14px; border-top: 1px solid #f1f2f4; color: #4b5563; }
.tb-dong:first-child { border-top: 0; }
.tb-dong:hover { background: #f9fafb; }
.tb-dong.moi { background: #eff6ff; color: var(--chu); font-weight: 500; }
.tb-cham { width: 8px; height: 8px; border-radius: 50%; align-self: center; }
.tb-dong.moi .tb-cham { background: #2563eb; }
.tb-luc { font-size: 12.5px; color: #9ca3af; white-space: nowrap; font-weight: 400; }
@media (max-width: 640px) { .tb-dong { grid-template-columns: 10px minmax(0, 1fr); } .tb-luc { grid-column: 2; } }

/* ---------- ban do cong viec + da den (15/11) ---------- */
.vv-den { display: inline-flex; align-items: center; gap: 4px; color: #15803d; font-weight: 600; }
.vv-den svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.thanh-cong-cu.mh-nut-dau { gap: 8px; }
.bd-thanh { flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 10px; }
.bd-chu-thich { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #4b5563; }
.bd-chu-thich i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #d1d5db; margin-left: 6px; }
.bd-chu-thich i.qua-han { background: #dc2626; }
.bd-chu-thich i.hom-nay { background: #ea580c; }
.bd-chu-thich i.xam { background: #2563eb; }
.bd-chu-thich i.den { background: #7c3aed; }
.bd-khung { padding: 0; overflow: hidden; }
.ban-do { height: calc(100vh - 230px); min-height: 420px; }
@media (max-width: 760px) { .bd-chu-thich { margin-left: 0; flex-wrap: wrap; } .ban-do { height: 70vh; } }

/* ---------- lo trinh, tuyen, dieu phoi (15/11) ---------- */
.vv-lt { margin-top: 6px; border-left: 2px dashed #cbd5e1; padding-left: 10px; display: grid; gap: 4px; }
.vv-lt-diem { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 13px; color: #374151; }
.vv-lt-diem.xong { color: #9ca3af; }
.vv-lt-so { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: #2563eb; color: #fff; font-size: 11px; font-weight: 700; }
.vv-lt-diem.xong .vv-lt-so { background: #9ca3af; }
.vv-lt-noi { color: #1d4ed8; }
.vv-lt .nut-nho { height: 24px; font-size: 12px; padding: 0 8px; }
.tuyen-chon { height: 32px; font: inherit; font-size: 13px; padding: 0 8px; border: 1px solid var(--vien-o); border-radius: 6px; background: #fff; }
.tuyen-luoi { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.tuyen-ol { list-style: none; margin: 0; padding: 0; border: 1px solid #e5e7eb; border-radius: 8px; }
.tuyen-ol li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 12px; border-top: 1px solid #f1f2f4; }
.tuyen-ol li:first-child { border-top: 0; }
.tuyen-ol li.qua-han { background: #fff7f7; }
.tuyen-so { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: #2563eb; color: #fff; font-weight: 700; font-size: 13px; }
.tuyen-viec { color: var(--chu); margin: 2px 0; overflow-wrap: anywhere; }
.tuyen-nut { display: inline-flex; gap: 4px; }
.tuyen-bd { height: calc(100vh - 250px); min-height: 380px; }
.tuyen-ghim span { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: #2563eb; color: #fff; font: 700 13px Inter, Arial, sans-serif; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.dp-luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.dp-the { display: flex; flex-direction: column; gap: 8px; }
.dp-the.co-qua-han { border-color: #fecaca; }
.dp-dau { display: flex; flex-direction: column; gap: 2px; }
.dp-dau b { font-size: 15px; }
.dp-tt { font-size: 13px; color: #15803d; }
.dp-tien-do { height: 6px; border-radius: 3px; background: #e5e7eb; overflow: hidden; }
.dp-tien-do span { display: block; height: 100%; background: #22c55e; }
.dp-so { font-size: 12.5px; }
.dp-muc { font-size: 13px; color: #374151; }
.dp-nhan { display: block; font-size: 11.5px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 2px; }
.dp-muc ol, .dp-muc ul { margin: 0; padding-left: 18px; }
.dp-nut { display: flex; gap: 6px; margin-top: auto; padding-top: 4px; }
@media (max-width: 900px) { .tuyen-luoi { grid-template-columns: 1fr; } .tuyen-bd { height: 55vh; } }

/* ---------- tong ket + hoi lap hoa don (15/11) ---------- */
.dem-menu.do { background: #dc2626; }
.vv-c.do-nhat { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.tk-loc { flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.tk-loc .vv-chip { cursor: pointer; font: inherit; font-size: 13px; }
.tk-ky { display: inline-flex; align-items: center; gap: 8px; }
.tk-do { border-color: #fecaca; margin-bottom: 14px; }
.tk-do .kho-h { margin-bottom: 2px; }
.tk-do > .phu { margin: 0 0 10px; }
.tk-viec { color: var(--chu); }
.tk-nut { white-space: nowrap; text-align: right; }
.tk-khong { display: inline-flex; gap: 4px; margin-left: 4px; }
.tk-khong input { width: 160px; height: 28px; font: inherit; font-size: 12.5px; padding: 0 8px; border: 1px solid var(--vien-o); border-radius: 6px; }
.hd-goi-y { margin: 10px 0 14px; display: grid; gap: 6px; }
.hd-goi-y-dong { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 4px 0 0; font-size: 13px; }
.hd-goi-y .hd-goi-y-dong { padding: 6px 10px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 6px; }
.bieu-mau.hd-khong label { margin: 0; }
.bieu-mau.hd-khong .o-kem-nut > input { margin-top: 0; }
.tk-ngay { margin-bottom: 14px; }
.tk-ngay-dau { padding: 6px 0; border-bottom: 1px solid #e5e7eb; margin-bottom: 4px; }
.tk-dong-tg td { border-bottom: 1px solid #f3f4f6; padding: 7px 8px; vertical-align: middle; }
.tk-gio { color: #6b7280; width: 54px; font-variant-numeric: tabular-nums; }
.tk-hd { text-align: right; }
.tk-cong td { background: #f9fafb; }
@media (max-width: 760px) { .tk-nut { text-align: left; white-space: normal; } .tk-khong { margin: 6px 0 0; } }
.bang a.nut:not(.nut-phu), .bang a.nut:not(.nut-phu):hover { color: #fff; }

/* ---------- bao hanh & sua chua (15/11, theo module BH & Sua chua CRM cu) ---------- */
.bh-chips { margin-bottom: 12px; }
.bh-tim { margin-left: 0; }
.bh-tim input { width: 420px; }
.bh-tt { display: inline-block; padding: 2px 9px; border-radius: 11px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--m); background: color-mix(in srgb, var(--m) 12%, #fff); border: 1px solid color-mix(in srgb, var(--m) 35%, #fff); }
.bh-bang td { vertical-align: top; }
.bh-form .the { margin-bottom: 14px; }
.bh-luoi3 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 14px; }
.bh-luoi3 > label { grid-column: span 2; }
.bh-luoi3 > label.doi { grid-column: span 4; }
.bh-luoi3 > label.ruoi { grid-column: span 3; }
.bh-luoi3 > label.ca { grid-column: 1 / -1; }
.bh-dau-mon { margin: 6px 0 8px; }
.bh-mon-dau { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.bh-so-mon { display: inline-block; padding: 1px 10px; border-radius: 10px; background: #1f2937; color: #fff; font-size: 12.5px; font-weight: 600; }
.bh-chip-goi-y { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.bh-chip { border: 1px solid #e5e7eb; background: #fff; border-radius: 4px; padding: 1px 8px; font: inherit; font-size: 12px; font-weight: 400; color: #4b5563; cursor: pointer; }
.bh-chip:hover { border-color: #9ca3af; }
#bh-them-mon { margin-bottom: 4px; }
.bh-xem { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.bh-tt-phieu { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; }
.bh-o small { display: block; font-size: 11px; color: #6b7280; letter-spacing: .03em; margin-bottom: 2px; }
.bh-o.doi { grid-column: span 2; }
.bh-mon-xem { margin-top: 14px; }
.bh-mon-xem .bh-mon-dau { border-bottom: 1px solid #f1f2f4; padding-bottom: 10px; }
.bh-kt { margin-top: 12px; border: 1px solid #e9d5ff; background: #faf5ff; border-radius: 8px; padding: 10px 12px; }
.bh-kt-dau { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; color: #6b21a8; margin-bottom: 6px; }
.bh-chon-kt { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #4b5563; }
.bh-chon-kt select { height: 28px; font: inherit; font-size: 13px; padding: 0 6px; border: 1px solid var(--vien-o); border-radius: 6px; background: #fff; }
.bh-nhan-nho { font-size: 11px; letter-spacing: .03em; }
.bh-cd { white-space: pre-line; margin-bottom: 4px; }
.bh-nut { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; margin-top: 12px; }
.bh-mo summary { list-style: none; cursor: pointer; }
.bh-mo summary::-webkit-details-marker { display: none; }
.bh-mo[open] { flex-basis: 100%; order: 10; }
.bh-mo[open] summary { margin-bottom: 6px; }
.bh-form-nho { display: grid; gap: 8px; max-width: 520px; padding: 10px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; }
.bieu-mau.bh-form-nho label { margin: 0; }
.bieu-mau.bh-form-nho textarea { margin: 0; }
.bh-form-nho .nut { justify-self: start; }
.bh-tra { margin-top: 14px; border-color: #bbf7d0; }
.bh-tra-ds { display: grid; gap: 4px; margin-bottom: 10px; }
.bh-tra-dong { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.bieu-mau .bh-tra-dong label { margin: 0; width: 320px; }
.bh-tra-dong .nut { height: 34px; }
.bh-ls { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid #e5e7eb; }
.bh-ls li { position: relative; padding: 0 0 12px 4px; font-size: 13px; }
.bh-ls li::before { content: ""; position: absolute; left: -21px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--m, #94a3b8); border: 2px solid #fff; }
@media (max-width: 900px) {
    .bh-xem { grid-template-columns: 1fr; }
    .bh-tim input { width: 100%; }
    .bh-luoi3 { grid-template-columns: 1fr 1fr; }
    .bh-luoi3 > label, .bh-luoi3 > label.ruoi { grid-column: span 1; }
    .bh-luoi3 > label.doi, .bh-luoi3 > label.ca { grid-column: 1 / -1; }
    .bh-tt-phieu { grid-template-columns: 1fr 1fr; }
}
/* gui NCC (15/11) */
.nut.nut-xanh { background: #0891b2; border-color: #0891b2; color: #fff; }
.bh-cach { grid-column: span 2; display: flex; flex-direction: column; gap: 4px; margin-bottom: 15px; }
.bieu-mau .bh-cach .o-chon { margin: 0; align-items: center; color: var(--chu); font-weight: 400; }
.bieu-mau .bh-cach .o-chon input { margin: 0; }
.bh-o-chon { width: 44px; }
.bh-o-chon input { width: 16px; height: 16px; margin: 0; vertical-align: middle; accent-color: var(--nut); }
.bh-nut-o { white-space: nowrap; }
.bh-ls-khung.bieu-mau label { margin-bottom: 10px; }
/* sua chua co phi (15/11) */
.bh-lk-dau { margin-top: 10px; }
.bh-lk { margin: 4px 0 8px; background: #fff; }
.bh-lk td, .bh-lk th { padding: 6px 8px; font-size: 13px; }
.bh-form-lk { max-width: 620px; }
.bh-luoi-lk { display: grid; grid-template-columns: 90px 1fr 1fr; gap: 8px; }
.bieu-mau .bh-luoi-lk label { margin: 0; }
.bh-bg { margin: 8px 0; font-size: 13.5px; }
.bh-kt .form-dong { margin-right: 4px; }
.bh-thu { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 12px; margin-bottom: 10px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; }
.bh-thu > div { flex-basis: 100%; }
.bieu-mau .bh-thu .o-chon { margin: 0; align-items: center; color: var(--chu); font-weight: 500; }
.bieu-mau .bh-thu .o-chon input { margin: 0; }
.bieu-mau .bh-thu .bh-pt { margin: 0; display: flex; align-items: center; gap: 6px; font-weight: 400; }
.bieu-mau .bh-thu .bh-pt select { margin: 0; width: auto; height: 32px; }

/* ===== serial / IMEI ===== */
.sn-dong { font-size: 12.5px; color: var(--nhan); margin-top: 2px; word-break: break-word; }
.sr-the { padding: 16px; }
.sr-mo { margin: 0 0 12px; }
.sr-bang td { vertical-align: top; }
.sr-bang td:nth-child(4) { width: 46%; }
.sr-o { width: 100%; min-height: 54px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; line-height: 1.5; padding: 6px 8px; resize: vertical; }
.sr-duoi { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.sr-duoi .sr-dem { margin-right: auto; font-size: 12.5px; }
.sr-chan { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.quet-nen { position: fixed; inset: 0; z-index: 1000; background: rgba(17, 24, 39, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.quet-hop { background: #fff; border-radius: 8px; width: 100%; max-width: 460px; padding: 14px 16px 16px; }
.quet-dau { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.quet-khung { position: relative; background: #000; border-radius: 6px; overflow: hidden; aspect-ratio: 4 / 3; }
.quet-khung video { width: 100%; height: 100%; object-fit: cover; display: block; }
.quet-ngam { position: absolute; left: 10%; right: 10%; top: 35%; bottom: 35%; border: 2px solid rgba(255, 255, 255, .85); border-radius: 6px; }
.quet-goi-y { margin: 8px 0; font-size: 13px; }
.quet-ma { display: flex; flex-wrap: wrap; gap: 6px; }
.quet-ma .da-chon { background: #ecfdf5; border-color: #10b981; color: #047857; }
@media (max-width: 760px) { .sr-bang td:nth-child(4) { width: auto; } }
.bh-luoi3 > .bh-tra-sr, .bh-luoi3 > .bh-ds-hd { grid-column: 1 / -1; }
.bh-tra-sr { margin: -4px 0 12px; padding: 7px 10px; background: #f0f7ff; border: 1px solid #dbeafe; border-radius: 6px; font-size: 13px; color: var(--nhan); }
.bh-mon-dau .bh-chon-hd { margin-left: auto; }
.bh-mon-dau .bh-chon-hd + .bh-bo-mon { margin-left: 0; }
.bh-ds-hd { margin: -4px 0 12px; border: 1px solid var(--vien); border-radius: 6px; max-height: 300px; overflow-y: auto; font-size: 13px; }
.bh-ds-hd > span { display: block; padding: 8px 10px; }
.bh-ds-hd-dau { position: sticky; top: 0; background: #f9fafb; padding: 7px 10px; border-bottom: 1px solid var(--vien); }
.bh-hd-dong { display: flex; width: 100%; gap: 12px; justify-content: space-between; align-items: baseline; padding: 7px 10px; border: 0; border-bottom: 1px solid #f1f2f4; background: #fff; text-align: left; font: inherit; color: var(--chu); cursor: pointer; }
.bh-hd-dong:last-child { border-bottom: 0; }
.bh-hd-dong:hover { background: #f0f7ff; }
.bh-hd-dong .ten { min-width: 0; }
.bh-hd-dong > .phu { flex: none; white-space: nowrap; font-size: 12.5px; }
@media (max-width: 760px) { .bh-hd-dong { flex-direction: column; gap: 2px; } .bh-hd-dong > .phu { white-space: normal; } }

/* ===== bien ban kiem tra thiet bi ===== */
.bb-dau-ds { display: flex; align-items: center; gap: 12px; margin: -6px 0 12px; }
.bb-dau-ds p { margin: 0; flex: 1; }
.bb-nut-ds { text-align: right; }
.bb-nut-ds .nut + .nut { margin-left: 4px; }
.bb-chip { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; background: #f3f4f6; color: #374151; white-space: nowrap; }
.bb-chip-xanh, .bb-chip.dx-binh_thuong { background: #dcfce7; color: #166534; }
.bb-chip-lam { background: #dbeafe; color: #1e40af; }
.bb-chip.dx-thay_moi, .bb-chip.dx-thanh_ly { background: #fee2e2; color: #991b1b; }
.bb-chip.dx-sua_chua, .bb-chip.dx-thay_lk { background: #fef3c7; color: #92400e; }
.bb-chip.dx-khong_sua { background: #e5e7eb; color: #374151; }
.bb-chip.dx-chua { background: #fee2e2; color: #b91c1c; }
.bb-dau { display: flex; align-items: center; gap: 10px; margin: -6px 0 12px; flex-wrap: wrap; }
.bieu-mau .bb-ngay { display: flex; align-items: center; gap: 8px; margin: 0 0 0 auto; font-weight: 500; }
.bieu-mau .bb-ngay input { width: 130px; margin: 0; }
.bb-dau-nut { display: flex; gap: 6px; }
.bb-dau .nut { height: 34px; }
.bb-tt { display: flex; align-items: center; gap: 12px; padding: 9px 14px; margin-bottom: 12px; border-radius: 8px; background: #eff6ff; border: 1px solid #dbeafe; color: #1e3a8a; font-size: 13.5px; }
.bb-tt-xanh { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.bb-tt-ky { max-height: 44px; max-width: 140px; background: #fff; border-radius: 4px; }
.bb-tt-bo { margin-left: auto; }
.bb-muc { padding: 16px 18px; margin-bottom: 14px; }
.bb-tieu { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid #f1f2f4; font-size: 13.5px; font-weight: 700; letter-spacing: .02em; color: var(--chu); }
.bb-tieu small { font-weight: 400; color: var(--mo); letter-spacing: 0; }
.bb-so { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #1f2937; color: #fff; font-size: 12px; }
.bb-soan { margin-left: auto; font-weight: 500; font-size: 13px; letter-spacing: 0; }
.bb-luoi2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.bb-luoi2 > .ca { grid-column: 1 / -1; }
.bb-tim-kh { position: relative; display: block; margin-top: 6px; }
.bb-tim-kh > svg { position: absolute; left: 11px; top: 17px; transform: translateY(-50%); width: 15px; height: 15px; fill: none; stroke: #9ca3af; stroke-width: 1.8; pointer-events: none; }
.bieu-mau .bb-tim-kh input, .bb-tim-kh input { margin-top: 0; padding-left: 34px; }
.bb-goi-y { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; margin-top: 2px; background: #fff; border: 1px solid var(--vien); border-radius: 6px; box-shadow: 0 8px 20px rgba(0,0,0,.1); max-height: 320px; overflow-y: auto; }
.bb-goi-y button { display: block; width: 100%; padding: 7px 12px; border: 0; border-bottom: 1px solid #f3f4f6; background: #fff; text-align: left; font: inherit; font-size: 13.5px; cursor: pointer; color: var(--chu); }
.bb-goi-y button:hover { background: #f0f7ff; }
.bb-goi-y button .phu { display: block; font-size: 12.5px; font-weight: 400; }
.bb-kh-tt { display: flex; gap: 10px; margin: -9px 0 14px; font-size: 13px; }
.bb-kh-tt #bb-them-kh { margin-left: auto; }
.bb-nhan { display: block; color: var(--nhan); font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.bb-nhan small { font-weight: 400; color: var(--mo); }
.bb-kt { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 15px; }
.bieu-mau .bb-kt-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; margin: 0; border: 1px solid var(--vien-o); border-radius: 16px; font-weight: 500; font-size: 13px; color: var(--chu); cursor: pointer; background: #fff; }
.bieu-mau .bb-kt-chip input { width: 15px; height: 15px; margin: 0; box-shadow: none; accent-color: var(--nut); }
.bieu-mau .bb-kt-chip:has(input:checked) { border-color: #93c5fd; background: #eff6ff; color: #1e40af; }
.bb-o-gd { padding-top: 26px; }
.bb-gd { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.bb-thanh-tb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; font-size: 13px; }
.bb-thanh-tb:empty { display: none; }
.bb-thanh-tb a.bb-chip { text-decoration: none; }
.bb-mo-het { margin-left: auto; font-size: 13px; }
.bb-tb { border: 1px solid var(--vien); border-radius: 8px; margin-bottom: 10px; background: #fff; }
.bb-tb-dau { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; }
.bb-tb.mo .bb-tb-dau { border-bottom: 1px solid #f1f2f4; background: #fafafa; border-radius: 8px 8px 0 0; }
.bb-tb-so { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; border-radius: 11px; background: #f3f4f6; color: #374151; font-size: 12px; font-weight: 600; }
.bb-tb-tom { flex: 1; min-width: 0; font-size: 13.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.bb-chua { color: #dc2626; font-size: 12px; font-weight: 600; }
.bb-so-anh { color: #7c3aed; font-size: 12.5px; }
.bb-tb-mo { flex: none; border: 0; background: none; padding: 2px; cursor: pointer; color: var(--mo); }
.bb-tb-mo svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform .15s; display: block; }
.bb-tb.mo .bb-tb-mo svg { transform: rotate(180deg); }
.bb-tb-bo { flex: none; font-size: 13px; }
.bb-tb-than { display: none; padding: 12px 12px 4px; }
.bb-tb.mo .bb-tb-than { display: block; }
.bb-luoi3 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 14px; }
.bb-luoi3 > label { grid-column: span 1; }
.bb-luoi3 > label.doi { grid-column: span 3; }
.bb-luoi3 > label.doi3, .bb-luoi3 > label.ba { grid-column: span 2; }
.bb-anh { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.bb-anh-o { position: relative; width: 76px; height: 76px; }
.bb-anh-o img { width: 76px; height: 76px; object-fit: cover; border-radius: 6px; border: 1px solid var(--vien); display: block; }
.bb-anh-xoa { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: #374151; color: #fff; font-size: 14px; line-height: 20px; cursor: pointer; padding: 0; }
.bieu-mau .bb-anh-them { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 76px; height: 76px; margin: 0; border: 1px dashed #a78bfa; border-radius: 6px; color: #7c3aed; font-size: 12px; font-weight: 500; cursor: pointer; }
.bb-anh-them svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.bb-cp input { margin: 0; }
.bieu-mau .bb-cp input { margin: 0; }
.bb-cp td { vertical-align: middle; }
.bb-cp td:nth-child(2) { width: 42%; }
.bb-cp td:nth-child(3), .bb-cp td:nth-child(4) { width: 9%; }
.bb-cp td:nth-child(5) { width: 15%; }
#bb-cp-vien { margin-bottom: 10px; }
#bb-nut-bg { margin-left: 6px; }
#bb-kl { min-height: 80px; margin-top: 0; }
.bb-luu { align-items: center; margin: 0; padding: 12px 16px; border-radius: 0 0 8px 8px; }
.bb-luu .bb-xoa { margin-right: auto; }
.bb-in-kem { display: flex; align-items: center; gap: 12px; margin-right: 8px; font-size: 13px; }
.bieu-mau .bb-in-kem .o-chon { margin: 0; align-items: center; color: var(--chu); font-size: 13px; }
.bieu-mau .bb-in-kem .o-chon input { margin: 0; }
.bb-noi { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%); z-index: 1000; padding: 9px 16px; border-radius: 8px; background: #1f2937; color: #fff; font-size: 13.5px; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.bb-noi.loi { background: #b91c1c; }
@media (max-width: 760px) {
    .bb-dau-ds { flex-wrap: wrap; }
    .bb-luoi2, .bb-gd { grid-template-columns: 1fr; }
    .bb-o-gd { padding-top: 0; }
    .bb-luoi3 { grid-template-columns: 1fr 1fr; }
    .bb-luoi3 > label.doi, .bb-luoi3 > label.doi3, .bb-luoi3 > label.ba { grid-column: 1 / -1; }
    .bieu-mau .bb-ngay { margin-left: 0; }
    .bb-dau-nut { width: 100%; flex-wrap: wrap; }
    .bb-in-kem { display: none; }
    .bb-cp td:nth-child(n) { width: auto; }
}

/* ===== bao cao bao hanh ===== */
.bc-loc { display: flex; align-items: center; gap: 10px; margin: -6px 0 12px; flex-wrap: wrap; }
.bc-ngay { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.bc-ngay input { width: 120px; height: 32px; border: 1px solid var(--vien-o); border-radius: 6px; padding: 0 10px; font: inherit; font-size: 13.5px; background: #fff; }
.bc-loc .nut { height: 32px; }
.bc-the { padding: 16px 18px; margin-bottom: 14px; }
.bc-tieu { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--chu); }
.bc-tieu small { font-weight: 400; color: var(--mo); font-size: 12px; }
.bc-so { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px 18px; margin-bottom: 4px; }
.bc-so > div { display: flex; flex-direction: column; }
.bc-so span { font-size: 12px; text-transform: uppercase; letter-spacing: .02em; color: var(--mo); }
.bc-so b { font-size: 21px; font-weight: 600; color: var(--chu); margin-top: 2px; font-variant-numeric: tabular-nums; }
.bc-so b a { color: inherit; }
.bc-so small { font-size: 12px; color: var(--mo); }
.bc-cam { color: #d97706 !important; }
.bc-so + .bang-vien { margin-top: 14px; }
.bc-hai { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; align-items: start; }
.bc-thanh { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 6px; }
.bc-thanh span { width: 60px; color: var(--nhan); }
.bc-thanh i { flex: 1; height: 12px; background: #f3f4f6; border-radius: 3px; overflow: hidden; }
.bc-thanh em { display: block; height: 100%; background: #2563eb; border-radius: 3px; }
.bc-thanh b { width: 32px; text-align: right; font-variant-numeric: tabular-nums; }
.bc-gon { width: 100%; border-collapse: collapse; }
.bc-gon td.so { text-align: right; white-space: nowrap; }
.bc-gon .trong { color: var(--mo); }
.bc-gon td { padding: 8px 10px; border-bottom: 1px solid #f1f2f4; font-size: 13.5px; }
.bc-gon tr:last-child td { border-bottom: 0; }
@media (max-width: 1100px) { .bc-so { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .bc-so { grid-template-columns: 1fr 1fr; } .bc-hai { grid-template-columns: 1fr; } .bc-ngay { margin-left: 0; } }

/* ===== bao duong dinh ky ===== */
.bd-mo { margin: -6px 0 10px; }
.bd-ht { display: inline-block; margin: 0 4px 3px 0; padding: 1px 8px; border-radius: 10px; background: #eef2ff; color: #3730a3; font-size: 12px; white-space: nowrap; }
.bd-tt { display: inline-block; padding: 1px 9px; border-radius: 10px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #f3f4f6; color: #374151; }
.bd-tt-xanh { background: #dcfce7; color: #166534; }
.bd-tt-lam { background: #dbeafe; color: #1e40af; }
.bd-tt-do { background: #fee2e2; color: #b91c1c; }
.bd-tt-cam { background: #fef3c7; color: #92400e; }
.mo-nhat td { opacity: .65; }
.chu-cam { color: #b45309; }
.bd-luoi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 16px; align-items: end; }
.bd-luoi > .hai { grid-column: span 2; }
.bd-luoi > .ba { grid-column: span 3; }
.bd-luoi > .bon, .bd-luoi > .ca { grid-column: 1 / -1; }
.bd-luoi .bb-kt-tt { grid-column: 1 / -1; }
.bd-ht-chon { margin-bottom: 15px; }
.bd-nhom { border: 1px solid var(--vien); border-radius: 8px; margin-bottom: 10px; }
.bd-nhom-dau { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: #fafafa; border-bottom: 1px solid #f1f2f4; border-radius: 8px 8px 0 0; font-size: 13.5px; }
.bd-nhom-dau .bd-them-tb { margin-left: auto; font-size: 13px; }
.bd-tb-dau, .bd-tb-dong { display: grid; grid-template-columns: 2.2fr 1.6fr 60px 1.4fr 1.4fr 28px; gap: 8px; align-items: center; padding: 0 12px; }
.bd-tb-dong.co-tt { grid-template-columns: 2.2fr 1.6fr 60px 1.4fr auto 1.4fr 28px; }
.bd-tb-dau { padding-top: 8px; font-size: 12px; font-weight: 600; color: var(--mo); }
.bd-tb-dong { padding-top: 6px; padding-bottom: 6px; }
.bd-tb-ds .bd-tb-dong:last-child { padding-bottom: 10px; }
.bieu-mau .bd-tb-dong input { margin: 0; height: 32px; font-size: 13.5px; }
.bd-tb-dong.hong input[name=tb_ten] { border-color: #fca5a5; }
.bd-tt-chon, .bd-kq { display: inline-flex; border: 1px solid var(--vien-o); border-radius: 6px; overflow: hidden; flex: none; }
.bd-tt-chon button, .bd-kq button { border: 0; border-left: 1px solid var(--vien-o); background: #fff; padding: 0 10px; height: 30px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--nhan); white-space: nowrap; }
.bd-tt-chon button:first-child, .bd-kq button:first-child { border-left: 0; }
.bd-tt-chon button.chon[data-tt=tot], .bd-kq button.chon[data-kq=dat] { background: #16a34a; color: #fff; font-weight: 600; }
.bd-tt-chon button.chon[data-tt=theo_doi] { background: #f59e0b; color: #fff; font-weight: 600; }
.bd-tt-chon button.chon[data-tt=hong], .bd-kq button.chon[data-kq=kd] { background: #dc2626; color: #fff; font-weight: 600; }
.bd-kq button.chon[data-kq=na] { background: #6b7280; color: #fff; font-weight: 600; }
.bd-hm-dau { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; font-size: 13.5px; }
.bd-hm-dau .bd-tat-ca { margin-left: auto; }
.bd-hm { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 10px; border: 1px solid #f1f2f4; border-radius: 6px; margin-bottom: 5px; }
.bd-hm-nd { flex: 1; min-width: 220px; font-size: 13.5px; }
.bd-ghi-nut { border: 0; background: none; padding: 2px; cursor: pointer; color: #9ca3af; }
.bd-ghi-nut svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; display: block; }
.bd-ghi-nut.co { color: #2563eb; }
.bieu-mau .bd-hm-ghi { flex-basis: 100%; margin: 0; height: 30px; font-size: 13px; }
.bd-phan .bd-tb-ds { margin-bottom: 8px; }
.bd-phan .bd-tb-dong { padding-left: 0; padding-right: 0; }
.bd-phan .bb-anh { margin-top: 4px; }
.bd-ky-ten { color: #16a34a; font-weight: 600; font-size: 13.5px; }
.bd-kh-dong { flex: 1; min-width: 0; }
.bd-lk-nho { margin-left: 6px; font-weight: 500; font-size: 12.5px; }
.bd-gia td { vertical-align: top; }
.bieu-mau .bd-gia input, .bieu-mau .bd-gia textarea { margin: 0; }
.bieu-mau .bd-gia textarea { margin-top: 4px; font-style: italic; font-size: 13px; }
.bd-gia td:nth-child(2) { width: 90px; }
.bd-gia td:nth-child(3) { width: 80px; }
.bd-gia td:nth-child(4) { width: 130px; }
.bd-gia td:nth-child(5) { width: 120px; }
.bd-gia tfoot th { font-weight: 600; }
.bd-mau-o textarea { min-height: 120px; }
@media (max-width: 900px) {
    .bd-luoi { grid-template-columns: 1fr 1fr; }
    .bd-luoi > .ba, .bd-luoi > .hai { grid-column: 1 / -1; }
    .bd-tb-dau { display: none; }
    .bd-tb-dong, .bd-tb-dong.co-tt { grid-template-columns: 1fr 70px 28px; padding: 8px 12px; border-top: 1px solid #f1f2f4; }
    .bd-tb-dong > [name=tb_ten] { grid-column: 1 / 2; }
    .bd-tb-dong > [name=tb_vi_tri], .bd-tb-dong > [name=tb_model], .bd-tb-dong > [name=tb_ghi], .bd-tb-dong > .bd-tt-chon { grid-column: 1 / -1; }
    .bd-hm-nd { min-width: 100%; }
}

/* bao duong dot 2 */
.bd-tien { justify-content: flex-start; flex-wrap: wrap; background: #f9fafb; border-color: var(--vien); color: var(--chu); }
.bd-tien .nut { height: 28px; }
.bd-tien-phai { margin-left: auto; }
.bd-o-tong { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.bd-o-tong .the { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.bd-o-tong span { font-size: 13px; color: var(--nhan); }
.bd-o-tong b { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bd-o-tong small { font-size: 12px; color: var(--mo); }
.bd-o-tong .bd-o-canh { background: #fffbeb; border-color: #fde68a; }
.bd-o-tong .bd-o-canh b { color: #b45309; }
@media (max-width: 900px) { .bd-o-tong { grid-template-columns: 1fr 1fr; } }

/* cho thue thiet bi */
.ct-chip { display: inline-block; margin: 0 4px 3px 0; padding: 1px 8px; border-radius: 10px; background: #eef2ff; color: #3730a3; font-size: 12px; white-space: nowrap; }
.ct-chip-cho { background: #fffbeb; color: #92400e; }
.ct-chip-thu { opacity: .5; text-decoration: line-through; }
.ct-chips { margin-bottom: 12px; }
.hop-hop.hop-vua { width: 900px; }
.ct-chon-mau { display: flex; align-items: flex-end; height: 60px; }
.bieu-mau .ct-chon-mau .o-chon { height: 34px; align-items: center; margin: 0; }
.bieu-mau .ct-chon-mau .o-chon input { margin: 0; }
.ct-xoa-trai { margin-right: auto; }
.ct-nut-bb { display: flex; flex-wrap: wrap; gap: 8px; }
.ct-nut-bb .tat { opacity: .5; cursor: default; pointer-events: none; }
.ct-bb-ds { margin-top: 12px; }
.ct-may-bang td { vertical-align: top; }
.bieu-mau .ct-may-bang input, .bieu-mau .ct-may-bang select { margin: 0; }
.ct-may-bang td:nth-child(2) { width: 140px; }
.ct-may-bang td:nth-child(3), .ct-may-bang td:nth-child(5) { width: 120px; }
.ct-may-bang td:nth-child(4), .ct-may-bang td:nth-child(6) { width: 110px; }
.ct-may-bang td:nth-child(7) { width: 40px; }
.ct-may-bang .ct-bo-may { margin-top: 3px; }
.ct-may-bang .ct-ten-may { font-weight: 600; font-size: 13.5px; padding-top: 7px; }
.ct-may-bang .ct-tt { font-size: 12px; margin-top: 3px; }
.ct-may-bang .an-mau > * { visibility: hidden; }
.ct-may-bang tfoot th { font-weight: 600; }
.ct-them-dong { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.ct-counter { display: flex; flex-wrap: wrap; gap: 12px; }
.ct-loai { flex: 1 1 260px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; border: 1px solid #eef2f7; border-radius: 8px; padding: 10px 12px; background: #fcfcfd; }
.ct-loai > b { width: 100%; font-size: 13.5px; }
.ct-loai > .ct-truoc { width: 100%; margin-top: -4px; }
.bieu-mau .ct-loai label { flex: 1 1 110px; margin: 0; }
.bieu-mau .ct-loai input { font-size: 16px; font-variant-numeric: tabular-nums; }
.ct-tinh { margin-top: 10px; font-size: 13px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 8px 12px; line-height: 1.7; }
.ct-tinh .tien { font-size: 15px; color: #1d4ed8; }
.ct-tinh .loi { color: #dc2626; font-weight: 600; }
.bieu-mau .ct-tt-may { margin-top: 12px; }
.ct-tong-the { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; padding: 14px 18px; margin-bottom: 14px; background: #eff6ff; border-color: #bfdbfe; }
.ct-tong-the span { font-weight: 600; color: #1e3a8a; margin-right: 10px; }
.ct-tong-the b { font-size: 20px; color: #1d4ed8; font-variant-numeric: tabular-nums; }
/* cho thue: lap hoa don tu bien ban chot */
.ct-hd-tt { flex-wrap: wrap; }
.ct-hd-form { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ct-hd-thue { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 500; white-space: nowrap; }
.ct-hd-thue select { width: 104px; height: 30px; padding: 0 26px 0 8px; font-size: 13px; }
.ct-hd-form .nut-nho { height: 30px; }
.ct-chua-hd { margin-bottom: 14px; }
.ct-chua-hd .phu { margin: 2px 0 8px; }
.ct-chua-dong { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 0; border-top: 1px solid var(--vien, #e5e7eb); }
@media (max-width: 640px) { .ct-hd-form { margin-left: 0; width: 100%; flex-wrap: wrap; } .ct-hd-thue select { width: 96px; } .ct-hd-form .nut-nho { flex: 1 1 150px; min-width: 0; white-space: normal; justify-content: center; } }
.bieu-mau .ct-ghi { margin: 0; }
@media (max-width: 900px) {
    .ct-chon-mau { height: auto; margin-bottom: 15px; }
    .ct-may-bang td { width: auto !important; }
    .ct-may-bang td.an-mau { display: none; }
}
@media (max-width: 640px) { .bb-luu { flex-wrap: wrap; row-gap: 8px; } }

/* tab Hop dong cua khach */
.kh-hd-dau { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.kh-hd-tieu { margin: 0; font-size: 16px; font-weight: 600; }
.kh-hd-dau .tat { opacity: .5; pointer-events: none; }
.bd-mac { margin-bottom: 12px; }
.dau-menu { display: block; padding: 6px 16px 3px; font-size: 12px; color: var(--mo); white-space: nowrap; }
.dau-menu-canh { white-space: normal; max-width: 260px; color: #b45309; }
.dem-hd { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #7c3aed; color: #fff; font-size: 11.5px; line-height: 18px; text-align: center; }

/* du an / viec du an */
.da-thanh { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.da-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.da-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; color: var(--m); font-size: 13px; }
.da-chip b { color: var(--chu); font-weight: 600; }
.da-chip.dang { border-color: var(--m); box-shadow: inset 0 0 0 1px var(--m); }
.vda-nguoi { display: inline-block; margin: 0 4px 4px 0; padding: 2px 9px; border-radius: 12px; background: #f1f5f9; color: #334155; font-size: 12.5px; white-space: nowrap; }
.da-dem { font-size: 11.5px; background: #eef2ff; color: #3730a3; border-radius: 999px; padding: 0 7px; font-weight: 600; }
.da-tong { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 14px; align-items: start; }
.da-luoi { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; font-size: 14px; }
.da-luoi > div > span:first-child { display: block; color: var(--mo); font-size: 12.5px; margin-bottom: 2px; }
.da-luoi .ca { grid-column: 1 / -1; }
.da-tien-do-chu { margin: 0 0 8px; }
.da-thanh-td { height: 8px; border-radius: 4px; background: #eef0f3; overflow: hidden; margin-bottom: 12px; }
.da-thanh-td i { display: block; height: 100%; background: #16a34a; }
.vda-cho-tom { padding: 9px 14px; margin-bottom: 12px; border-radius: 8px; background: #fffbeb; border: 1px solid #fde68a; color: #78350f; font-size: 13.5px; }
.vda-the { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.vda-o { display: flex; flex-direction: column; gap: 2px; padding: 9px 14px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; color: var(--chu); }
.vda-o i { font-style: normal; color: var(--m); }
.vda-o small { color: var(--mo); font-size: 12.5px; }
.vda-o.dang { border-color: var(--m); box-shadow: inset 0 0 0 1px var(--m); }
.vda-loc { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.vda-loc .vda-cua-toi { margin: 0; }
tr.vda-qua-han td:first-child { box-shadow: inset 3px 0 0 #dc2626; }
select.vda-tt { height: 30px; padding: 0 26px 0 9px; border: 1px solid color-mix(in srgb, var(--m) 45%, #fff); border-radius: 6px; color: var(--m); background-color: color-mix(in srgb, var(--m) 8%, #fff); font: inherit; font-size: 13px; font-weight: 500; }
.vda-xem { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 14px; align-items: start; }
.vda-tao { margin: 0 0 4px; }
.vda-lq { margin: 0 0 14px; }
.vda-mo-ta { font-size: 14px; }
.vda-bl-form textarea { margin-bottom: 6px; }
.vda-bl-nut { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.vda-bl { padding: 10px 0; border-top: 1px solid #f1f2f4; font-size: 14px; }
.vda-bl-dau { margin-bottom: 4px; }
.vda-bl .tep-ds { margin-top: 6px; }
.vda-tt-dong { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 34px; font-size: 14px; border-bottom: 1px dashed #f1f2f4; }
.vda-tt-dong > span:first-child { color: var(--mo); }
.vda-cho { margin-top: 10px; padding: 9px 12px; border-radius: 8px; background: #fffbeb; border: 1px solid #fde68a; font-size: 13.5px; }
.vda-cho-sua summary { cursor: pointer; color: #2563eb; margin-top: 4px; }
.vda-cho-sua form { margin-top: 8px; }
.vda-can-anh { margin-top: 10px; padding: 8px 12px; border-radius: 8px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; font-size: 13.5px; }
.vda-can-anh.co { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.vda-tieu-2 { margin-top: 16px; }
.vda-tep { margin-bottom: 10px; }
.vda-tep .tep-o form { position: absolute; top: 0; right: 0; }
.vda-tha { padding: 10px; border: 1px dashed #cbd5e1; border-radius: 8px; margin-bottom: 8px; }
@media (max-width: 900px) { .da-tong, .vda-xem { grid-template-columns: 1fr; } .vda-the { grid-template-columns: 1fr 1fr; } .da-chips { margin-left: 0; } .da-luoi { grid-template-columns: 1fr; } }
.vda-xem .nl, .da-luoi .nl { white-space: pre-line; }
.bb-dau .da-phai { margin-left: auto; }
.bieu-mau [data-loai-bn][hidden] { display: none; }
.vda-gio { margin: 0 0 14px; }
.vda-gio-dung { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vda-gio-dung input { width: 220px; height: 30px; margin: 0; }
.vda-gio-chay { color: #16a34a; font-weight: 600; font-size: 13.5px; }
.nut-xanh-la { background: #16a34a; border-color: #16a34a; }
.nut-xanh-la:hover { background: #15803d; border-color: #15803d; }
.nut-do-dac { background: #dc2626; border-color: #dc2626; }
.nut-do-dac:hover { background: #b91c1c; border-color: #b91c1c; }
.vda-gio-ds { margin-top: 8px; font-size: 13px; }
.vda-gio-ds summary { cursor: pointer; color: #2563eb; }
.vda-gio-ds div { padding: 4px 0; border-bottom: 1px dashed #f1f2f4; }
.da-ap-mau { margin-top: 14px; padding-top: 12px; border-top: 1px solid #f1f2f4; }
.vda-lien-ket { display: flex; gap: 18px; margin: -6px 0 6px; font-size: 14px; }
.vda-lien-ket:empty { display: none; }
.da-mau-dau, .da-mau-dong { display: grid; grid-template-columns: 28px minmax(0, 3fr) minmax(0, 2fr) 80px 60px 90px; gap: 10px; align-items: center; }
.da-mau-dau { font-size: 12px; font-weight: 600; color: var(--mo); padding: 6px 0; border-bottom: 1px solid #f1f2f4; }
.da-mau-dong { padding: 5px 0; border-bottom: 1px solid #f7f7f8; }
.bieu-mau .da-mau-dong input:not([type=checkbox]) { margin: 0; }
.da-mau-dong .da-mau-anh { width: 16px; height: 16px; margin: 0 auto; accent-color: var(--nut); }
.da-mau-stt { color: var(--mo); text-align: center; }
.da-mau-nut { display: flex; gap: 4px; justify-content: flex-end; }
.da-mau-nut button { width: 26px; height: 26px; border: 0; background: none; cursor: pointer; color: #475569; font-size: 15px; border-radius: 4px; }
.da-mau-nut button:hover { background: #f1f5f9; }
.da-mau-chan { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.da-mau-chan > span { display: flex; gap: 8px; }
.da-tt-dong { display: grid; grid-template-columns: 44px minmax(0, 360px) 1fr auto; gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid #f7f7f8; }
.bieu-mau .da-tt-dong input { margin: 0; }
.bieu-mau .da-tt-dong input[type=color] { width: 40px; height: 34px; padding: 2px; }
.da-tt-dong .o-chon { margin: 0; color: #dc2626; }
.da-tt-goc { margin: 10px 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .03em; color: var(--mo); text-transform: uppercase; }
@media (max-width: 640px) { .da-mau-dau { display: none; } .da-mau-dong { grid-template-columns: 24px 1fr 1fr; } .da-mau-dong [name=b_ten] { grid-column: 2 / 4; } .da-tt-dong { grid-template-columns: 44px 1fr; } }
.vda-dd { margin-top: 10px; padding: 9px 12px; border: 1px solid #f1f2f4; border-radius: 8px; font-size: 13.5px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.vda-chi-duong { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 9px; border-radius: 10px; background: #dcfce7; color: #166534; font-size: 12.5px; font-weight: 600; }
.vda-phai-chu { text-align: right; }
.vda-lap-tuy[hidden] { display: none; }
.vda-lap-tuy .o-kem-nut input { width: 80px; flex: none; }
.bieu-mau .vda-lap-so[hidden] { display: none; }

/* Module */
.md-goi { display: flex; flex-direction: column; gap: 6px; padding: 14px 18px; }
.md-co { color: #15803d; font-weight: 500; }
.md-bang td:first-child { min-width: 260px; }
.md-bang tr.md-tat td:not(:last-child) { opacity: .6; }

/* Ke toan quan tri */
.kt-dau { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: -10px 0 12px; }
@media (min-width: 901px) { .kt-dau { margin-top: -52px; flex-wrap: nowrap; align-items: flex-start; } .kt-dau .kt-phu { padding-top: 34px; flex: 1 1 auto; min-width: 0; } .kt-dau .kt-loc { flex: none; } }
.kt-phu { margin: 0; font-size: 13px; }
.kt-loc { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.kt-loc label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--mo); }
.kt-loc input, .kt-loc select { height: 34px; border: 1px solid var(--vien-o); border-radius: 6px; padding: 0 10px; font: inherit; font-size: 14px; color: var(--chu); background: #fff; }
.kt-loc input { width: 122px; }
.kt-loc select { min-width: 170px; }
.kt-loc .nut { height: 34px; }
.kt-tab { margin-bottom: 12px; }
.kt-o4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.kt-o { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; margin: 0; }
.kt-o span { font-size: 13px; color: var(--mo); }
.kt-o b { font-size: 22px; font-weight: 600; color: var(--chu); letter-spacing: .02em; }
.kt-o small { font-size: 12.5px; color: var(--mo); }
.kt-o b.kt-cam { color: #ea580c; }
.kt-o b.kt-do { color: #dc2626; }
.kt-the { padding: 16px 18px; margin-bottom: 12px; }
.kt-h { margin: 0 0 10px; font-size: 15px; font-weight: 600; color: var(--chu); }
.kt-h small { font-weight: 400; font-size: 13px; }
.kt-thanh { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: #f3f4f6; margin-bottom: 8px; }
.kt-t0 { background: #16a34a; } .kt-t1 { background: #f59e0b; } .kt-t2 { background: #f97316; } .kt-t3 { background: #ea580c; } .kt-t4 { background: #dc2626; }
.kt-chu-giai { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: var(--mo); }
.kt-chu-giai i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: 0; }
.kt-chu-giai b { color: var(--chu); font-weight: 600; }
.kt-bang-dau { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.kt-bang-dau .kt-h { margin: 0; }
.kt-bang-loc { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.kt-bang-loc .o-chon { font-size: 13px; color: var(--mo); margin: 0; }
.kt-bang-loc input[type=search] { height: 30px; width: 190px; border: 1px solid var(--vien-o); border-radius: 6px; padding: 0 10px; font: inherit; font-size: 13px; }
@media (min-width: 901px) {
  .kt-bang:not(.kt-bang-gv):not(.kt-bang-dt):not(.kt-bang-thue):not(.kt-bang-lg-hd) > thead > tr > th:first-child { min-width: 230px; }
  .kt-bang-gv > thead > tr > th:first-child { width: 44px; }
  .kt-bang-dt > thead > tr > th:first-child { width: 120px; }
  .kt-bang-lg-hd > thead > tr > th:first-child { width: 150px; }
  .kt-bang-gv > thead > tr > th:nth-child(2) { min-width: 230px; }
}
.kt-dong { cursor: pointer; }
.kt-dong:hover td, .kt-dong.dang-mo td { background: #f9fafb; }
.kt-mo { display: inline-block; width: 12px; color: var(--mo); transition: transform .15s; }
.kt-dong.dang-mo .kt-mo { transform: rotate(90deg); }
.kt-c1 { color: #d97706; } .kt-c2 { color: #ea580c; } .kt-c3 { color: #c2410c; } .kt-c4 { color: #dc2626; }
.kt-giua { text-align: center; }
.kt-ngay { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 10px; background: #fff7ed; color: #c2410c; }
.kt-ngay-do { background: #fef2f2; color: #b91c1c; }
.kt-icon { display: inline-flex; color: var(--chinh); }
.kt-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.kt-ct > td { background: #f9fafb; padding: 6px 12px 12px 30px !important; }
.kt-bang-hd { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; }
.kt-bang-hd th { text-align: left; font-weight: 500; color: var(--mo); padding: 6px 10px; border-bottom: 1px solid #e5e7eb; background: #f9fafb; }
.kt-bang-hd td { padding: 6px 10px; border-bottom: 1px solid #f3f4f6; }
.kt-bang-hd .so { text-align: right; }
.kt-tong td { font-weight: 600; background: #f9fafb; }
.kt-chu-thich { margin: 10px 0 0; font-size: 12.5px; }
@media (max-width: 900px) { .kt-o4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .kt-o b { font-size: 18px; }
  .kt-loc { width: 100%; }
  .kt-loc label { flex: 1 1 140px; }
  .kt-loc input, .kt-loc select { width: 100%; min-width: 0; }
  .kt-bang-loc, .kt-bang-loc input[type=search] { width: 100%; }
  .kt-ct > td { padding: 6px !important; }
  .kt-giua { text-align: left; }
}

.kt-o b.kt-xanh, .kt-duong { color: #16a34a; }
.kt-am { color: #dc2626; }
.kt-o b.kt-chua { font-size: 15px; font-weight: 500; color: var(--mo); padding: 6px 0 4px; }
.kt-so-du { align-items: flex-end; }
.kt-so-du .kt-o-tien { width: 170px; }
.kt-so-du .kt-o-dai { flex: 1 1 220px; }
.kt-so-du .kt-o-dai input { width: 100%; }
.kt-bieu { display: flex; align-items: flex-end; gap: 3px; height: 150px; border-bottom: 1px solid #e5e7eb; }
.kt-cot { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 1px; height: 100%; }
.kt-cot span { width: 45%; max-width: 14px; min-height: 1px; border-radius: 2px 2px 0 0; }
.kt-vao { background: #16a34a; } .kt-ra { background: #ef4444; }
.kt-truc { display: flex; gap: 3px; margin: 4px 0 8px; }
.kt-truc span { flex: 1; text-align: center; font-size: 11px; color: var(--mo); }
.kt-tuong-lai td { color: #9ca3af; }
.kt-bang-khoan td { border-bottom: 1px solid #f3f4f6; }
.kt-loai { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 10px; }
.kt-loai-thu { background: #dcfce7; color: #15803d; } .kt-loai-ncc { background: #fee2e2; color: #b91c1c; }
.kt-dubao { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kt-dubao > div { border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
@media (max-width: 640px) { .kt-dubao { grid-template-columns: 1fr; } .kt-so-du .kt-o-tien { width: 100%; } .kt-truc span { font-size: 9px; } }

.kt-canh { margin-bottom: 12px; font-size: 13px; line-height: 1.55; }
.kt-o small b.kt-dam { font-size: inherit; font-weight: 600; letter-spacing: 0; color: var(--chu); }
.kt-xem { display: inline-flex; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
.kt-xem a { padding: 6px 12px; font-size: 13px; color: #374151; border-right: 1px solid #e5e7eb; }
.kt-xem a:last-child { border-right: 0; }
.kt-xem a.dang { background: #1f2937; color: #fff; }
.kt-nv { font-size: 13px; color: var(--mo); }
.kt-nhan-thieu { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 8px; background: #fff7ed; color: #c2410c; white-space: nowrap; }

.kt-o3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.kt-thanh-phu { margin: 6px 0 4px; }
.kt-gv-mo { margin: 0 0 12px; font-size: 13px; line-height: 1.55; }
.kt-goi-y-mau, .kt-goi-y { color: var(--chinh); }
.kt-o-gv { min-width: 170px; }
.kt-o-gv .kt-gia { width: 130px; height: 32px; border: 1px solid var(--vien-o); border-radius: 6px; padding: 0 8px; font: inherit; font-size: 14px; text-align: right; }
.kt-o-gv .kt-gia:disabled { background: #f3f4f6; }
.kt-goi-y { display: block; border: 0; background: none; padding: 2px 0 0; font: inherit; font-size: 12px; cursor: pointer; text-align: left; }
.kt-goi-y:disabled { cursor: default; color: var(--mo); }
.kt-canh-gia { font-size: 12px; color: #b45309; padding-top: 2px; }
.kt-dv { display: inline-flex; align-items: center; gap: 6px; margin: 0; cursor: pointer; }
.kt-dv-chu { display: none; font-size: 13px; }
.kt-luu { display: flex; justify-content: flex-end; padding-top: 12px; }
.kt-du { text-align: center; color: #15803d; margin: 16px 0; }
.kt-h-sau { margin-top: 18px; }
.kt-the-ten { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.kt-ten { display: inline-flex; align-items: center; gap: 5px; margin: 0; padding: 3px 10px; border: 1px solid #e5e7eb; border-radius: 14px; font-size: 13px; font-weight: 400; color: var(--chu); background: #fff; }
.kt-ten-dv { background: #f0fdf4; }
@media (max-width: 900px) { .kt-o3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .kt-o-gv .kt-gia { width: 100%; height: 40px; }
  .kt-dv-chu { display: inline; }
  .kt-luu { position: sticky; bottom: 0; background: #fff; padding: 10px 14px; margin: 0 -14px; border-top: 1px solid #e5e7eb; }
  .kt-luu .nut { width: 100%; }
}

.kt-o b .kt-chua { font-size: 15px; font-weight: 500; color: #c2410c; }
.kt-bang-thue .kt-dong { cursor: pointer; }
.kt-bang-thue tr.kt-dang td { background: #eff6ff; }
.kt-thue-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 12px; align-items: start; }
.kt-cuon { max-height: 520px; overflow-y: auto; }
@media (max-width: 1100px) { .kt-thue-2 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .kt-cuon { max-height: none; } }
.kt-vao-tu { margin-top: 10px; align-items: center; }
.kt-vao-tu label { flex-direction: row; align-items: center; gap: 8px; }
.kt-vao-tu .phu { font-size: 12.5px; }
@media (min-width: 641px) { .kt-bang-thue { font-size: 13px; } .kt-bang.kt-bang-thue > thead > tr > th { white-space: normal; min-width: 0; } }

.kt-luong { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px 14px; margin: 4px 0 12px; }
.kt-luong label { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: 13px; color: var(--mo); }
.kt-luong input { height: 34px; border: 1px solid var(--vien-o); border-radius: 6px; padding: 0 10px; font: inherit; font-size: 14px; text-align: right; color: var(--chu); }
.kt-luong-chan { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.kt-luong-chan .phu { font-size: 12.5px; }
.kt-truot { overflow-x: auto; }
.kt-bang-kq { min-width: 100%; border-collapse: collapse; font-size: 13.5px; }
.kt-bang-kq th, .kt-bang-kq td { white-space: nowrap; padding: 8px 10px; border-bottom: 1px solid #e5e7eb; text-align: left; }
.kt-bang-kq th { background: #f9fafb; font-weight: 600; color: var(--chu); font-size: 13px; }
.kt-bang-kq .so { text-align: right; }
.kt-truot { border: 1px solid #e5e7eb; border-radius: 6px; }
.kt-bang-kq .kt-cot-dinh { position: sticky; left: 0; z-index: 1; background: #fff; min-width: 230px; box-shadow: 1px 0 0 #e5e7eb; }
.kt-bang-kq thead .kt-cot-dinh { background: #f9fafb; }
.kt-dam-dong td { font-weight: 600; }
.kt-bang-kq .kt-dam-dong td { background: #f9fafb; }
.kt-o small .kt-am { color: #dc2626; }
.kt-o small .kt-duong { color: #16a34a; }
.kt-ty-suat td { font-size: 12.5px; color: var(--mo); }
.kt-ty-suat .kt-cot-dinh { padding-left: 24px; }
.kt-ss { max-width: 860px; }
@media (max-width: 900px) { .kt-luong { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .kt-luong { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kt-bang-kq .kt-cot-dinh { min-width: 150px; white-space: normal; }
}

/* So du dau ky */
.sdd-hai { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.sdd-ngay { align-items: flex-end; align-content: flex-start; }
.sdd-ghi { flex-basis: 100%; margin: 8px 0 0; font-size: 12.5px; line-height: 1.5; }
.sdd-nhap .sdd-ghi { margin: 0 0 10px; }
.sdd-them { position: relative; }
.sdd-them input { height: 32px; width: 320px; border: 1px solid var(--vien-o); border-radius: 6px; padding: 0 10px; font: inherit; font-size: 13.5px; }
.sdd-goi-y { position: absolute; right: 0; top: 36px; z-index: 5; width: 420px; max-width: 90vw; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); padding: 4px; display: flex; flex-direction: column; }
.sdd-goi-y[hidden] { display: none; }
.sdd-goi-y button { border: 0; background: none; text-align: left; padding: 7px 10px; border-radius: 6px; font: inherit; font-size: 13.5px; cursor: pointer; }
.sdd-goi-y button:hover { background: #f3f4f6; }
.sdd-goi-y .phu { padding: 7px 10px; }
.sdd-bang input { height: 32px; border: 1px solid var(--vien-o); border-radius: 6px; padding: 0 8px; font: inherit; font-size: 14px; }
.sdd-tien { width: 150px; text-align: right; }
.sdd-han { width: 120px; }
.sdd-bang + .kt-chu-thich, #sdd-trong { margin-top: 10px; }
#sdd-form .kt-luu { justify-content: space-between; align-items: center; gap: 12px; }
@media (max-width: 900px) { .sdd-hai { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .sdd-them, .sdd-them input { width: 100%; } .sdd-bang td input { display: block; width: 100%; margin-top: 4px; } }

/* Trang chu */
.tc-lk { display: inline-flex; align-items: center; gap: 12px; font-size: 13px; }
.tc-vda { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 9px 12px; margin-bottom: 10px; border-radius: 8px; background: #eff6ff; color: #1e40af; font-size: 13.5px; }
.tc-vda .tc-mui { margin-left: auto; }
.tc-viec, .tc-ds { list-style: none; margin: 0; padding: 0; }
.tc-viec li, .tc-ds li { display: flex; align-items: baseline; gap: 6px; padding: 8px 2px; border-bottom: 1px solid #f3f4f6; font-size: 14px; }
.tc-viec li:last-child, .tc-ds li:last-child { border-bottom: 0; }
.tc-viec li a { color: var(--chu); }
.tc-ngay { margin-left: auto; white-space: nowrap; font-size: 12.5px; color: var(--mo); }
.tc-trong, .tc-xong { margin: 6px 0 0; }
.tc-xong { color: #15803d; font-size: 13.5px; }
.tc-kt { margin-bottom: 0; }
a.tc-o { border: 1px solid #e5e7eb; border-radius: 8px; color: inherit; box-shadow: none; }
a.tc-o:hover { border-color: #cbd5e1; }
.tc-o small b { font-size: inherit; letter-spacing: 0; }
.tc-nam select { height: 30px; border: 1px solid var(--vien-o); border-radius: 6px; padding: 0 8px; font: inherit; font-size: 13px; background: #fff; }
.tc-hai { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.tc-h4 { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.tc-h4 a { color: var(--chu); }
.tc-tt { display: flex; flex-direction: column; }
.tc-tt-dong { display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; padding: 6px 0; color: var(--chu); font-size: 13.5px; }
.tc-tt-ten b { font-weight: 600; }
.tc-tt-ten.tt-do { color: #dc2626; } .tc-tt-ten.tt-cam { color: #d97706; } .tc-tt-ten.tt-luc { color: #16a34a; } .tc-tt-ten.tt-xanh { color: #2563eb; } .tc-tt-ten.tt-qua-han { color: #ea580c; }
.tc-tt-thanh, .tc-thanh { grid-column: 1 / -1; display: block; height: 5px; background: #f3f4f6; border-radius: 3px; overflow: hidden; }
.tc-tt-thanh i, .tc-thanh i { display: block; height: 100%; background: #6b7280; }
.tc-tt-thanh i.tt-do, .tc-thanh i.tt-do { background: #dc2626; } .tc-tt-thanh i.tt-cam, .tc-thanh i.tt-cam { background: #f59e0b; } .tc-tt-thanh i.tt-luc { background: #16a34a; }
.tc-tt-thanh i.tt-xanh, .tc-thanh i.tt-xanh { background: #2563eb; } .tc-tt-thanh i.tt-qua-han { background: #ea580c; } .tc-tt-thanh i.tt-xam { background: #9ca3af; }
.tc-ba { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.tc-tien { border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.tc-tien span { font-size: 13px; color: var(--mo); }
.tc-tien b { font-size: 16px; font-weight: 600; }
.tc-cam span { color: #d97706; } .tc-luc span { color: #16a34a; }
.tc-dem { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 12px; }
.tc-dem-o { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 14px 16px; margin: 0; color: var(--chu); font-size: 14px; }
.tc-dem-o b { font-weight: 600; }
@media (max-width: 900px) { .tc-hai, .tc-dem { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .tc-ba { grid-template-columns: 1fr; } .tc-viec li { flex-wrap: wrap; } .tc-ngay { margin-left: 0; } }

/* Huong dan */
.hd-bo { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; align-items: start; }
.hd-muc { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 2px; padding: 14px; margin: 0; font-size: 13.5px; }
.hd-muc b { margin-bottom: 6px; }
.hd-muc a { padding: 4px 6px; border-radius: 6px; color: var(--chu); }
.hd-muc a:hover { background: #f3f4f6; }
.hd-in { margin-top: 10px; }
.hd-noi { display: flex; flex-direction: column; gap: 12px; max-width: 860px; }
.hd-phan { margin: 0; padding: 18px 22px; line-height: 1.6; font-size: 14.5px; scroll-margin-top: 12px; }
.hd-phan h2 { margin: 0 0 8px; font-size: 17px; }
.hd-phan ol, .hd-phan ul { margin: 6px 0; padding-left: 22px; }
.hd-phan li { margin: 4px 0; }
.hd-phan code { font-family: Consolas, monospace; font-size: 13px; background: #f3f4f6; padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
.hd-sc dt { font-weight: 600; margin-top: 10px; }
.hd-sc dd { margin: 2px 0 0; }
@media (max-width: 900px) { .hd-bo { grid-template-columns: 1fr; } .hd-muc { position: static; } }
@media print { .menu, .thanh-tren, .dai-bq, .hd-muc { display: none !important; } .hd-bo { display: block; } .hd-phan { box-shadow: none; border: 0; break-inside: avoid; padding: 6px 0; } }
/* dang nhap: ghi nho + quen mat khau */
.dn-phu { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -2px 0 14px; }
.bieu-mau .dn-phu .o-chon { margin: 0; align-items: center; }
.bieu-mau .dn-phu .o-chon input { margin: 0; }
.dn-phu a { font-size: 14px; font-weight: 500; white-space: nowrap; }
.dn-ghi { margin: 10px 0 0; font-size: 12.5px; }
/* quen mat khau */
.qm-h { margin: 0 0 4px; font-size: 20px; }
.qm-mo { margin: 0 0 14px; }
.qm-phan { border-top: 1px solid var(--vien, #e5e7eb); padding: 14px 0 6px; }
.qm-phan h3 { margin: 0 0 8px; font-size: 15.5px; }
.qm-phan p { font-size: 14px; line-height: 1.55; margin: 0 0 10px; }
.qm-buoc { margin: 0 0 12px; padding-left: 20px; font-size: 14px; line-height: 1.6; }
.qm-ma { display: grid; gap: 6px; padding: 12px 14px; margin-bottom: 14px; border-radius: 8px; background: #eff6ff; border: 1px solid #bfdbfe; }
.qm-ma > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.qm-ma span { color: var(--xam); font-size: 13.5px; }
.qm-ma b { font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.qm-ma-lon { font-size: 22px; color: #1d4ed8; letter-spacing: 2px !important; }
.qm-ve { margin: 12px 0 0; font-size: 14px; }
/* khoa so */
.ks-hai { display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: 14px; align-items: start; margin-bottom: 14px; }
.ks-tt { display: flex; flex-direction: column; gap: 6px; }
.ks-ngay { font-size: 18px; color: #b45309; }
.ks-mo { color: var(--xam); }
.ks-nut { display: flex; flex-wrap: wrap; gap: 8px; }
.ks-ghi { margin: 10px 0 0; font-size: 13px; }
.khoa-so-nhan { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 6px; background: #fef3c7; color: #92400e; font-size: 13px; font-weight: 500; }
@media (max-width: 760px) { .ks-hai { grid-template-columns: 1fr; } }
/* cai dat lan dau */
.hop-le:has(.cdd) { max-width: 620px; }
.cdd-h { display: flex; align-items: center; gap: 8px; margin: 18px 0 2px; font-size: 15.5px; }
.cdd-so { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--nut, #1f2937); color: #fff; font-size: 12.5px; }
.cdd-ghi { margin: 0 0 10px; font-size: 13px; }
.cdd-kq { margin: -6px 0 10px; font-size: 13px; }
.cdd-hai { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .cdd-hai { grid-template-columns: 1fr; } }
/* bang tin: viec nen lam khi moi dung */
.bd-ds { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.bd-ds li a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--vien, #e5e7eb); border-radius: 8px; color: inherit; }
.bd-ds li a:hover { background: #f8fafc; }
.bd-ds .bd-dau { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #cbd5e1; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.bd-ds .xong .bd-dau { background: #16a34a; border-color: #16a34a; color: #fff; }
.bd-ds .xong a { color: var(--mo); }
.bd-ds small { display: block; color: var(--mo); font-size: 12.5px; }
.bd-an { margin-left: auto; }
/* cap nhat tu trang phat hanh */
.cn-ban { font-size: 15px; margin-bottom: 6px; }
.cn-ghi { white-space: pre-line; font-size: 13.5px; background: #f8fafc; border: 1px solid var(--vien, #e5e7eb); border-radius: 6px; padding: 8px 12px; margin-bottom: 10px; }
.cn-dong { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 4px; }
.cn-tu { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--vien, #e5e7eb); font-size: 13.5px; }
.cn-moi a { font-weight: 500; }
/* chi phi */
.cp-form { max-width: 980px; }
.cp-luoi { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.cp-luoi .ca { grid-column: 1 / -1; }
.cp-tach { margin: -6px 0 10px; font-size: 13px; }
.cp-tep-khung { border: 1.5px dashed var(--vien, #d1d5db); border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; }
.cp-tep-khung.tep-keo { border-color: #2563eb; background: #eff6ff; }
.cp-dinh-kem { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13.5px; }
.cp-dinh-kem .nut { margin-left: auto; }
.cp-luu { display: flex; justify-content: flex-end; gap: 8px; }
.cp-gc { white-space: pre-line; }
.cp-tep { display: block; font-size: 13px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-nhom-o { padding: 6px 10px !important; }
.cp-nhom-dong { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cp-nhom-dong input[name=ten] { flex: 1 1 200px; } .cp-nhom-dong input[name=mo_ta] { flex: 2 1 260px; }
.cp-nhom-dong select { width: auto; } .cp-nhom-dong .o-chon { margin: 0; align-items: center; } .cp-dem { min-width: 64px; text-align: right; }
.cp-nhom-moi { margin-top: 14px; }
.cpn-luoi td { vertical-align: middle; padding: 8px 10px; }
.cpn-luoi input:not([type=checkbox]), .cpn-luoi select { display: block; width: 100%; height: 34px; margin: 0; padding: 0 10px; border: 1px solid var(--vien-o); border-radius: 6px; background: rgba(249, 250, 251, .7); font: inherit; font-size: 14px; color: var(--chu); box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05); }
.cpn-luoi input:focus, .cpn-luoi select:focus { outline: 0; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .2); }
.cpn-luoi .cpn-ten { width: 24%; } .cpn-luoi .cpn-kieu { width: 210px; }
.cpn-luoi .o-chon { margin: 0; display: inline-flex; align-items: center; gap: 6px; }
.cpn-nut .form-dong { display: inline-flex; gap: 6px; }
.cp-nhom-moi .cp-nhom-dong > * { margin: 0; }
@media (max-width: 760px) { .cp-luoi { grid-template-columns: 1fr; } }
/* phieu giam tru */
.gt-dau { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gt-nut { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.gt-the { margin-bottom: 14px; }
.gt-tren { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-bottom: 14px; line-height: 1.6; }
.gt-ma { margin: 0 0 4px; font-size: 20px; color: #1d4ed8; }
.gt-kh { text-align: right; }
.gt-tong { margin: 12px 0 6px auto; min-width: 320px; }
.gt-hai { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.gt-form { margin-top: 10px; }
@media (max-width: 760px) { .gt-hai { grid-template-columns: 1fr; } .gt-kh { text-align: left; } .gt-tong { min-width: 0; width: 100%; } }

/* ===== Hoa don tu trang thue / HD VAT ===== */
.tt-the { margin-bottom: 14px; }
.tt-hang { display: flex; flex-wrap: wrap; gap: 0 14px; align-items: flex-start; }
.tt-hang > label { width: 150px; }
.tt-dn { display: contents; }
.tt-dn[hidden] { display: none; }
.tt-dn > label { width: 190px; }
.tt-dn > label:last-child { width: auto; }
.tt-nho { display: flex; align-items: center; gap: 6px; font-weight: 400; font-size: 12px; color: #6b7280; margin-top: 4px; }
.tt-nho input { width: auto; margin: 0; }
.tt-cap { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.tt-cap > * { margin-top: 0 !important; flex: none; }
.tt-cap .nut { height: 34px; }
.tt-cap img { height: 34px; box-sizing: border-box; min-width: 120px; border: 1px solid #e5e7eb; border-radius: 6px; background: #fff; }
.tt-cap .tt-cap-o { width: 100px; }
.tt-nut { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.tt-nut-phu { margin-top: 6px; }
.tt-nut-phu:empty { display: none; }
.tt-da-dn { color: #15803d; font-weight: 500; }
.tt-thieu { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.tt-tab-hang { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid #e5e7eb; margin-bottom: 14px; }
.tt-tab-hang .kho-tab { border-bottom: 0; margin-bottom: 0; }
.tt-tab-hang .kho-tab { flex: 1; min-width: 0; }
.dem-tab { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: #f3f4f6; color: #4b5563; font-size: 11px; text-align: center; }
.tt-dau th { text-align: left; font-weight: 400; color: #6b7280; padding: 3px 14px 3px 0; white-space: nowrap; }
.tt-dau td { padding: 3px 0; }
.tt-kieu { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 12px; }
.tt-kieu .o-chon { font-weight: 600; }
.tt-hep { max-width: 560px; }
.tt-dong .tt-sp { min-width: 240px; margin-top: 0; }
.tt-dong + .o-chon, .bang-vien + .o-chon { margin-top: 10px; }
.tt-chua-ghep td { background: #fffbeb; }
.tt-gy { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 4px; font-size: 12px; }
.tt-goc { margin: 10px 0; }
.tt-goc summary { cursor: pointer; }
.tt-cuoi { display: flex; justify-content: flex-end; margin-top: 10px; }
.ba-cot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
@media (max-width: 760px) { .ba-cot { grid-template-columns: 1fr; } .tt-hang > label, .tt-dn > label { width: 100%; } }
.hdv-ten { min-width: 220px; }
.hdv-luoi { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 14px; align-items: start; }
.hdv-phu { display: flex; flex-direction: column; gap: 14px; }
.hdv-phu .the { margin: 0; }
.hdv-dong { cursor: pointer; }
.hdv-dong:hover > td { background: #f9fafb; }
.hdv-mui { display: inline-block; color: #9ca3af; transition: transform .15s; }
.hdv-dong.hdv-mo .hdv-mui { transform: rotate(90deg); color: var(--chinh); }
.hdv-con > td { background: #f8fafc; padding: 8px 12px 12px 24px; }
.hdv-tay { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid #f3f4f6; }
.hdv-thue-dau { margin: 0 0 8px; align-items: center; }
.chu-xanh-la { color: #15803d; font-weight: 600; }
.hdv-o { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 14px; }
.bieu-mau .hdv-tien { width: 130px; margin: 0 0 0 auto; text-align: right; }
.bieu-mau input.hdv-chon { width: 16px; height: 16px; margin: 0; box-shadow: none; accent-color: var(--nut); }
.hdv-nut { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; white-space: nowrap; }
.hdv-con table { width: 100%; }
.hdv-cong { margin: 10px 0; }
.hdv-nhan { margin: 10px 0; padding: 8px 12px; border-radius: 8px; font-size: 13px; line-height: 1.8; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.hdv-nhan.hdv-cho { background: #fff7ed; color: #c2410c; }
.hdv-nhan.hdv-mot_phan { background: #eff6ff; color: #1d4ed8; }
.hdv-nhan.hdv-da_xuat { background: #f0fdf4; color: #15803d; }
.hdv-nhan.hdv-khong_xuat { background: #f9fafb; color: #6b7280; }
@media (max-width: 960px) { .hdv-luoi { grid-template-columns: 1fr; } .hdv-o { grid-template-columns: 1fr 1fr; } }
/* ===== Nhap chi phi nhanh: bang kieu bang tinh ===== */
.cpn-the { padding: 0; overflow: visible; }
.cpn-goi-y { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; padding: 12px 16px; border-bottom: 1px solid #eef0f3; font-size: 12.5px; color: #4b5563; }
.cpn-goi-y kbd { display: inline-block; min-width: 18px; padding: 1px 6px; border: 1px solid #d1d5db; border-bottom-width: 2px; border-radius: 4px; background: #f9fafb; font: 600 11px/1.5 inherit; color: #374151; text-align: center; }
.cpn-goi-y .phu { margin-left: auto; }
.cpn-the .bang-vien { margin: 0; border: 0; border-radius: 0; }
.cpn-bang { min-width: 900px; width: 100%; border-collapse: collapse; }
.cpn-bang thead th { padding: 8px 10px; }
.cpn-bang td { padding: 0; height: 38px; vertical-align: middle; border-bottom: 1px solid #eef0f3; }
.cpn-bang td + td { border-left: 1px solid #f1f2f4; }
.cpn-bang input, .cpn-bang select { display: block; width: 100%; height: 38px; margin: 0; padding: 0 10px; border: 0; border-radius: 0; background: transparent; box-shadow: none; font: inherit; font-size: 14px; color: var(--chu); outline: 0; }
.cpn-bang select { cursor: pointer; padding-right: 4px; }
.cpn-bang input::placeholder { color: #c4c8cf; }
.cpn-bang input:focus, .cpn-bang select:focus { box-shadow: inset 0 0 0 2px #3b82f6; background: #fff; position: relative; z-index: 1; }
.cpn-bang tr.cpn-dong:focus-within td { background: #f5f9ff; }
.cpn-bang .cpn-ngay { width: 112px; }
.cpn-bang .cpn-nhom { width: 170px; }
.cpn-bang .cpn-ten { min-width: 220px; }
.cpn-bang .cpn-tong { width: 125px; text-align: right; font-variant-numeric: tabular-nums; }
.cpn-bang .cpn-pt { width: 160px; }
.cpn-bang .cpn-gc { min-width: 150px; }
.cpn-bang select.cpn-trong { color: #9ca3af; }
.cpn-bang td.cpn-stt { color: #9ca3af; width: 40px; padding: 0 6px; text-align: center; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.cpn-chua td input, .cpn-chua td select { color: #b0b5bd; }
.cpn-chua .cpn-stt { color: #d1d5db; }
.cpn-bang .cpn-thieu { box-shadow: inset 0 0 0 2px #f87171; background: #fef2f2; }
.cpn-o-xoa { width: 34px; }
.cpn-xoa { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border: 0; border-radius: 6px; background: none; color: #9ca3af; cursor: pointer; opacity: 0; }
.cpn-xoa svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.8; fill: none; }
.cpn-xoa:hover { background: #fef2f2; color: #dc2626; }
.cpn-dong:hover .cpn-xoa, .cpn-dong:focus-within .cpn-xoa, .cpn-xoa:focus { opacity: 1; }
.cpn-loi td { background: #fef2f2; }
.cpn-loi-chu td { background: #fef2f2; color: #b91c1c; font-size: 12.5px; height: auto; padding: 2px 10px 6px; }
.cpn-cuoi { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px; background: #fff; border-top: 1px solid #e5e7eb; border-radius: 0 0 8px 8px; box-shadow: 0 -4px 12px -8px rgba(0, 0, 0, .15); }
.cpn-tong-chu { margin-left: auto; color: #4b5563; }
.cpn-tong-chu b { color: var(--chu); font-variant-numeric: tabular-nums; }
.cpn-thieu-chu { color: #dc2626; font-size: 13px; }
@media (max-width: 760px) {
    .cpn-goi-y { display: none; }
    .cpn-bang { min-width: 0; }
    .cpn-bang td { height: auto; padding: 3px 12px; border: 0; }
    .cpn-bang td + td { border-left: 0; }
    .cpn-bang input, .cpn-bang select { height: 34px; margin-top: 2px; border: 1px solid var(--vien-o); border-radius: 6px; background: #fff; }
    .cpn-bang .cpn-ngay, .cpn-bang .cpn-nhom, .cpn-bang .cpn-tong, .cpn-bang .cpn-pt { width: 100%; }
    .cpn-bang tr.cpn-dong:focus-within td { background: none; }
    .cpn-bang tr.cpn-dong { position: relative; padding: 8px 0 12px; }
    .bang td.cpn-stt::before { content: "Dòng "; color: inherit; font-size: inherit; }
    .cpn-bang td.cpn-stt { width: auto; padding: 2px 12px 4px; text-align: left; font-size: 14px; font-weight: 600; color: var(--chu); }
    .cpn-chua td.cpn-stt { color: #9ca3af; }
    .cpn-bang td.cpn-o-xoa { position: absolute; top: 6px; right: 8px; width: auto; padding: 0; }
    .cpn-xoa { opacity: 1; }
    .cpn-cuoi { border-radius: 0; gap: 10px; }
    .cpn-tong-chu { order: -1; width: 100%; margin-left: 0; }
    .cpn-thieu-chu { order: -1; width: 100%; }
    .cpn-cuoi > .nut:last-child { margin-left: auto; }
}
/* ===== Hop dong kinh te ===== */
.hdkt-khoa { border: 0; padding: 0; margin: 0; min-width: 0; }
.hdkt-the { margin-bottom: 14px; }
.hdkt-rong2 { grid-column: span 2; }
.hdkt-dd { display: flex; gap: 6px; }
.bieu-mau .hdkt-dd select { width: 76px; flex: none; }
.hdkt-bang td { vertical-align: top; }
.bieu-mau .hdkt-bang input, .bieu-mau .hdkt-bang select, .bieu-mau .hdkt-bang textarea { margin-top: 0; }
.bieu-mau .hdkt-bang textarea { margin-top: 4px; min-height: 34px; font-size: 13px; }
.bieu-mau .hdkt-bang .hdkt-dv { width: 80px; }
.bieu-mau .hdkt-bang .hdkt-sl { width: 70px; text-align: right; }
.bieu-mau .hdkt-bang .hdkt-gia { width: 130px; text-align: right; }
.bieu-mau .hdkt-bang .hdkt-thue { width: 110px; }
.bieu-mau .hdkt-bang .hdkt-pt { width: 80px; text-align: right; }
.bieu-mau .hdkt-bang .hdkt-dot-ten { width: 140px; }
.hdkt-bang .hdkt-tt { padding-top: 16px; white-space: nowrap; }
.hdkt-duoi { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.hdkt-tong { min-width: 320px; }
.hdkt-mau-dot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; color: #4b5563; font-size: 13px; }
.hdkt-cau { margin-top: 12px; padding: 10px 14px; background: #f9fafb; border-radius: 8px; font-family: "Times New Roman", serif; font-size: 15px; }
.hdkt-cau p { margin: 4px 0; }
.hdkt-luu { display: flex; justify-content: flex-end; gap: 10px; position: sticky; bottom: 0; padding: 12px 0; background: var(--nen, #f9fafb); }
.hdkt-cd { margin-top: 14px; }
@media (max-width: 760px) { .hdkt-rong2 { grid-column: auto; } .hdkt-tong { min-width: 0; width: 100%; } }
/* ===== Cham cong ===== */
.cc-dau { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.cc-dau .cc-phai { margin-left: auto; }
.cc-thang { height: 30px; border: 1px solid var(--vien-o); border-radius: 6px; padding: 0 8px; font: inherit; }
.cc-the { padding: 0; }
.cc-thanh { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid #eef0f3; }
.cc-che-do { display: inline-flex; border: 1px solid var(--vien-o); border-radius: 8px; overflow: hidden; }
.cc-che-do button { border: 0; background: #fff; padding: 6px 14px; font: inherit; font-size: 13px; cursor: pointer; color: #4b5563; }
.cc-che-do button.dang { background: var(--chinh); color: #fff; }
.cc-chu { font-size: 12.5px; color: #4b5563; }
.cc-k { display: inline-block; min-width: 22px; padding: 0 4px; border-radius: 4px; text-align: center; font-weight: 600; margin-left: 6px; }
.cc-cuon { overflow-x: auto; }
.cc-bang { border-collapse: collapse; font-size: 13px; min-width: 100%; }
.cc-bang th, .cc-bang td { border: 1px solid #eef0f3; padding: 0; text-align: center; height: 34px; }
.cc-bang thead th { background: #f9fafb; font-weight: 600; padding: 4px 2px; min-width: 34px; }
.cc-bang thead th small { display: block; font-weight: 400; color: #9ca3af; font-size: 10.5px; }
.cc-bang .cc-ten { position: sticky; left: 0; background: #fff; z-index: 1; text-align: left; padding: 4px 10px; min-width: 170px; white-space: nowrap; }
.cc-bang thead .cc-ten { background: #f9fafb; }
.cc-dien { display: block; font-size: 11.5px; }
.cc-bang .cc-cn { background: #fff7ed; }
.cc-bang .cc-tong { padding: 0 8px; min-width: 46px; background: #f9fafb; }
.cc-o { position: relative; }
.cc-chon, .cc-gio { width: 34px; height: 32px; border: 0; background: transparent; text-align: center; text-align-last: center; font: inherit; font-weight: 600; appearance: none; -webkit-appearance: none; cursor: pointer; padding: 0; }
.cc-gio { font-weight: 400; color: #1d4ed8; cursor: text; }
.cc-chon:focus, .cc-gio:focus { outline: 2px solid #3b82f6; outline-offset: -2px; }
.cc-x, .cc-k.cc-x { color: #15803d; } .cc-nua, .cc-k.cc-nua { color: #0369a1; } .cc-le, .cc-k.cc-le { color: #7c3aed; }
.cc-phep, .cc-k.cc-phep { color: #b45309; } .cc-kl, .cc-k.cc-kl { color: #6b7280; } .cc-vang, .cc-k.cc-vang { color: #dc2626; }
.cc-chon.cc-x { background: #f0fdf4; } .cc-chon.cc-vang { background: #fef2f2; } .cc-chon.cc-phep { background: #fffbeb; } .cc-chon.cc-le { background: #f5f3ff; }
.cc-them { position: absolute; bottom: 0; left: 0; right: 0; font-size: 9.5px; color: #1d4ed8; line-height: 1; pointer-events: none; }
.cc-cuoi { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; background: #fff; border-top: 1px solid #e5e7eb; }
@media (max-width: 760px) { .cc-bang .cc-ten { min-width: 110px; white-space: normal; } .cc-gio { font-size: 16px; } }
/* ===== Bang luong ===== */
.luong-nut { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.luong-bang td .phu { font-size: 11.5px; }
.luong-ung { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: flex-end; margin-top: 12px; }
.luong-ung label { width: 170px; }
.luong-ung button { margin-bottom: 15px; }
.luong-tong { margin: 4px 0 14px auto; min-width: 360px; }
.luong-tra { border-top: 1px solid #eef0f3; padding-top: 12px; max-width: 520px; }
.bieu-mau .luong-cd input { margin-top: 0; text-align: right; }
.bieu-mau .luong-cd .luong-hs { width: 80px; }
@media (max-width: 760px) { .luong-ung label { width: 100%; } .luong-tong { min-width: 0; width: 100%; } }
.cc-vr { color: #6b7280; }
.cc-vr-thieu { color: #ea580c; font-weight: 600; }
.cc-vr-ghi { width: 100%; }
/* ===== Vao ca / Ra ca ===== */
.vr-the { max-width: 560px; }
.vr-dau { font-weight: 600; margin-bottom: 12px; }
.vr-nut { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vr-b { width: 100%; height: 72px; border: 0; border-radius: 12px; font: inherit; font-size: 20px; font-weight: 700; color: #fff; cursor: pointer; opacity: .55; }
.vr-b.vr-mo { opacity: 1; box-shadow: 0 4px 12px rgba(0, 0, 0, .15); }
.vr-b:disabled { opacity: .4; }
.vr-vao { background: #16a34a; }
.vr-ra { background: #dc2626; }
.vr-ds { margin: 14px 0 6px; padding-left: 18px; line-height: 1.9; }
.vr-loc { max-width: 320px; }
.vr-ghim { margin-top: 12px; max-width: 560px; }
/* ===== Gop trung ===== */
.gop-nhom { margin-bottom: 12px; }
.gop-dau { margin-bottom: 8px; }
.gop-nut { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gop-nhom input[type=radio] { width: 16px; height: 16px; accent-color: var(--nut); }
/* ===== Tra truoc / dat coc ===== */
.tt-truoc-form { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: flex-end; margin-bottom: 14px; }
.tt-truoc-form label { width: 180px; }
.tt-truoc-form label:first-of-type { width: 280px; }
.tt-truoc-form label.tt-gc { flex: 1 1 240px; width: auto; }
.tt-truoc-form label.tt-gd { width: 200px; }
.tt-truoc-form button { margin-bottom: 15px; }
.tt-o { margin: 10px 0; padding: 8px 12px; border-radius: 8px; background: #eff6ff; color: #1e3a8a; font-size: 13px; line-height: 1.9; }
.tt-dung { margin-right: 10px; }
@media (max-width: 760px) { .tt-truoc-form label, .tt-truoc-form label:first-of-type { width: 100%; } }
/* ===== Sao ke ===== */
.sk-tai { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.sk-tai label { width: 320px; }
.sk-tai button { margin-bottom: 15px; }
.sk-nd { max-width: 280px; font-size: 12.5px; color: #4b5563; }
.sk-xl { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sk-xl select { max-width: 240px; height: 30px; border: 1px solid var(--vien-o); border-radius: 6px; font: inherit; font-size: 13px; padding: 0 6px; }
/* ===== Key ban quyen ===== */
.key-in { font-family: Consolas, "Courier New", monospace; white-space: pre-line; }
.key-nhap { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.key-nhap textarea { font-family: Consolas, monospace; }
.key-ma { font-family: Consolas, monospace; letter-spacing: .5px; }
.key-dong { margin-bottom: 14px; }
.key-dong .bieu-mau { margin-top: 10px; }
.key-sapHet { color: #c2410c; font-weight: 600; }
@media (max-width: 760px) { .key-nhap { grid-template-columns: 1fr; } }
/* ===== Hoa hong ===== */
.hh-hai { margin-top: 14px; gap: 14px; }
.hh-chi { border-top: 1px solid #eef0f3; margin-top: 12px; padding-top: 12px; }
.hh-gan { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: flex-end; margin-top: 14px; }
.hh-gan label { width: 200px; }
.hh-gan button { margin-bottom: 15px; }
/* ===== Dong gop ===== */
.dg-o { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
.dg-o .the { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.dg-o b { font-size: 20px; font-variant-numeric: tabular-nums; }
.dg-ghi { margin: 0 0 12px; padding-left: 18px; line-height: 1.7; }
.dg-cd { margin-top: 14px; }
.dg-bang { font-size: 13.5px; }
.dg-bang th, .dg-bang td { padding: 8px 10px; }
.dg-bang thead th { vertical-align: bottom; line-height: 1.3; }
.dg-bang th.dg-nhom { text-align: center; border-bottom: 1px solid var(--vien); }
.dg-bang td.dg-dam { background: #f9fafb; }
.dg-bang .dg-dg { min-width: 150px; }
.dg-bang .dg-dg .nhan-tt { white-space: nowrap; }
.dg-bang .dg-dg .phu { margin-top: 3px; font-size: 12px; white-space: normal; line-height: 1.35; }
.dg-cd summary { cursor: pointer; }
.dg-luoi { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0 12px; margin-top: 12px; }
.bieu-mau .dg-nv input, .bieu-mau .dg-nv select { margin-top: 0; }
@media (max-width: 760px) { .dg-o { grid-template-columns: 1fr 1fr; } .dg-luoi { grid-template-columns: 1fr 1fr; } }

/* ---------- Kien thuc – ho tro khach ---------- */
.thanh-cong-cu .kth-link { margin-top: 0; }
.kth-link input { width: 300px; max-width: 100%; margin-top: 0; color: var(--mo); }
.kth-bo { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.kth-nhom { padding: 8px; }
.kth-nhom-dau { padding: 6px 10px 8px; font-size: 13px; color: var(--mo); text-transform: uppercase; letter-spacing: .03em; }
.kth-nhom-muc { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 6px; color: var(--chu); font-size: 14px; }
.kth-nhom-muc:hover { background: #f3f4f6; }
.kth-nhom-muc.dang { background: #eff6ff; color: #1d4ed8; font-weight: 600; }
.kth-nhom-muc .dem-tab { margin-left: auto; }
.kth-cham { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; margin-right: 6px; vertical-align: 0; }
.kth-nhom-muc .kth-cham { margin-right: 0; }
.kth-nhom-sua { margin-top: 8px; padding: 8px 10px 4px; border-top: 1px solid var(--vien); }
.kth-nhom-sua summary { cursor: pointer; font-size: 13.5px; }
.kth-nhom-form { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--vien); }
.kth-nhom-dong { display: flex; gap: 6px; align-items: center; }
.kth-nhom-dong input[type=color] { width: 34px; height: 34px; padding: 2px; flex: none; }
.kth-nhom-dong input[name=ten] { flex: 1; min-width: 0; }
.bieu-mau .kth-thu-tu { width: 44px; flex: none; text-align: center; }
.kth-nhom-nut { display: flex; align-items: center; justify-content: space-between; }
.kth-phai { min-width: 0; }
.kth-tom { margin-top: 2px; font-size: 13px; }
.kth-dau-form { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 12px; padding: 14px 16px; margin-bottom: 12px; }
.kth-soan { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: stretch; }
.kth-o-soan, .kth-o-xem { padding: 14px 16px; min-width: 0; }
.kth-cc { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.bieu-mau .kth-o-soan textarea { width: 100%; min-height: 460px; font: 14px/1.55 Consolas, "Cascadia Mono", monospace; resize: vertical; }
.kth-goi-y { margin: 8px 0 0; font-size: 12.5px; }
.kth-goi-y code { background: #f3f4f6; padding: 0 4px; border-radius: 3px; }
.kth-trang-thai { margin: 4px 0 0; font-size: 13px; min-height: 18px; }
.kth-xem-dau { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.kth-o-xem { max-height: 640px; overflow: auto; }
.kth-bai { font-size: 15px; line-height: 1.6; }
.kth-bai h2 { font-size: 16.5px; margin: 16px 0 6px; }
.kth-bai p { margin: 0 0 10px; }
.kth-bai ol, .kth-bai ul { margin: 0 0 10px; padding-left: 22px; }
.kth-bai li { margin-bottom: 4px; }
.kth-bai .kth-luu-y { background: #fffbeb; border-left: 4px solid #f59e0b; padding: 8px 12px; border-radius: 6px; }
.kth-bai .kth-anh img { max-width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--vien); }
.kth-lien-he-mau { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--vien); font-size: 12.5px; }
.kth-luu { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-top: 12px; position: sticky; bottom: 0; z-index: 5; }
.kth-luu .o-chon { margin: 0; }
.kth-xoa { margin-top: 10px; }
@media (max-width: 900px) {
  .kth-bo, .kth-soan, .kth-dau-form { grid-template-columns: 1fr; }
  .bieu-mau .kth-o-soan textarea { min-height: 300px; }
  .kth-luu { padding-right: 76px; }
}

/* ---------- Hop dong kinh te dot 2: hoa don + thu tien, gop ---------- */
.hdkt-thu-hd { margin-bottom: 12px; }
.hdkt-thu-hd > p { margin: 0 0 8px; }
.hdkt-hd-ds { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.hdkt-hd-the { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--vien); border-radius: 8px; background: #f9fafb; font-size: 14px; }
.hdkt-hd-nut { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hdkt-hd-nut .o-kem-nut { margin-top: 0; }
.hdkt-gan select { min-width: 280px; }
.hdkt-thu tfoot th { background: #f9fafb; }
.hdkt-thu-ls { margin-top: 12px; }
.hdkt-thu-dong { display: flex; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid #f3f4f6; font-size: 14px; }
.hdkt-thu-dong > span:nth-child(2) { flex: 1; min-width: 0; }
.hdkt-thu-form { display: grid; grid-template-columns: 140px 170px 200px minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-top: 14px; }
.bieu-mau.hdkt-thu-form .nut, .bieu-mau .gop-luu .nut { margin: 0; }
.bieu-mau.hdkt-thu-form label, .bieu-mau .gop-luu label { margin-bottom: 0; }
.bieu-mau .gop-hai input[type=checkbox] { width: 16px; height: 16px; margin: 0; padding: 0; box-shadow: none; vertical-align: middle; accent-color: var(--nut); }
.gop-hai .bang td { vertical-align: middle; }
.hdkt-thu-ghi { margin: 6px 0 0; font-size: 13px; }
.gop-kh { max-width: 560px; padding: 14px 16px; margin-bottom: 12px; }
.gop-hai { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.gop-hai .kt-h { padding: 12px 14px 0; }
.gop-luu { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; padding: 12px 16px; margin-top: 12px; position: sticky; bottom: 0; z-index: 5; }
.gop-luu label { min-width: 200px; }
.gop-luu #gop-tom { flex: 1; padding-bottom: 8px; }
@media (max-width: 900px) {
  .hdkt-thu-form, .gop-hai { grid-template-columns: 1fr; }
  .hdkt-gan select { min-width: 0; }
  .hdkt-thu tfoot tr { display: flex; flex-wrap: wrap; gap: 2px 14px; }
  .hdkt-thu tfoot th { border: 0; padding: 6px 0; }
  .hdkt-thu tfoot th:empty { display: none; }
  .gop-luu { padding-right: 76px; }
}

/* ---------- Ho so khach dang tab + vi tri khach (18/11) ---------- */
.kh-ve { margin: 0 0 8px; }
.tab-kh2 { display: flex; flex-wrap: wrap; gap: 2px; scrollbar-width: thin; border-bottom: 1px solid var(--vien); margin-bottom: 16px; -webkit-overflow-scrolling: touch; }
.tab-kh2 a { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 9px 13px; color: #4b5563; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab-kh2 a:hover { color: var(--chu); background: #f9fafb; }
.tab-kh2 a.dang { color: #1d4ed8; border-bottom-color: #2563eb; font-weight: 600; }
.tab-kh2 a.dang .dem-tab { background: #dbeafe; color: #1d4ed8; }
.tab-kh2 .bt { display: none; }
/* ho so khach: cot muc doc ben trai tren may tinh (nhu CRM cu) */
@media (min-width: 992px) {
    main.noi-dung { position: relative; }
    .kh-ben { position: absolute; left: 22px; width: 196px; flex-direction: column; flex-wrap: nowrap; gap: 2px; border-bottom: 0; margin: 4px 0 0; }
    .kh-ben ~ * { margin-left: 220px; }
    .kh-ben a { gap: 12px; padding: 8px 12px; margin: 0; border: 0; border-radius: 6px; color: #374151; font-weight: 500; white-space: normal; line-height: 1.35; }
    .kh-ben a:hover { background: #f3f4f6; }
    .kh-ben a.dang { background: #fff; color: #2563eb; font-weight: 500; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
    .kh-ben .bt { display: block; width: 19px; height: 19px; flex: none; fill: none; stroke: #6b7280; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .kh-ben a.dang .bt, .kh-ben a:hover .bt { stroke: #2563eb; }
    .kh-ben .kh-ben-chu { flex: 1; min-width: 0; }
    .kh-ben .dem-tab { background: none; color: #374151; font-size: 12.5px; }
    .kh-ben a.dang .dem-tab { background: none; color: #2563eb; }
}
.kh-ds-dau { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; margin-bottom: 12px; }
.kh-ds-dau .kh-hd-tieu { margin-right: 6px; }
.kh-ds-moi { margin-left: auto; }
.kh-ds-ghi { margin: -6px 0 10px; font-size: 13px; }
td.dam { font-weight: 600; }
.bh-nhan { display: inline-block; padding: 1px 8px; border: 1px solid; border-radius: 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.kh-vt-the { padding: 20px 24px; margin-bottom: 16px; }
.kh-vt-the .kh-hd-tieu { margin-bottom: 10px; }
.vtk-nut { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vtk-mo-ta { margin-top: 8px; font-size: 13.5px; }
.vtk-link { margin-top: 10px; max-width: 620px; }
.vtk-link .o-kem-nut { margin-top: 0; }
.vtk-link input { flex: 1; min-width: 0; height: 32px; border: 1px solid var(--vien-o); border-radius: 6px 0 0 6px; padding: 0 10px; font: inherit; font-size: 14px; }
.vtk-bao { margin: 6px 0 0; font-size: 13px; min-height: 0; }
.vtk-bao:empty { display: none; }
.kh-ban-do { height: 460px; }
.bd-chu-thich i.kh { background: #dc2626; }
.kh-bd-chu { margin: 8px 0 0; }
.kh-bd-chu .bd-chu-thich { margin-left: 0; }
.kh-bd-trong { padding: 24px; }
.kh-hd-kt { margin-bottom: 18px; }
@media (max-width: 900px) {
  .kh-ban-do { height: 360px; }
  .tab-kh2 { flex-wrap: nowrap; overflow-x: auto; }
  .kh-ds-moi { margin-left: 0; }
}

/* ---------- Chi tiet cong no phai thu theo mat hang (18/11) ---------- */
.ctmh-phu { margin: -8px 0 12px; font-size: 13.5px; }
.ctmh-loc { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.ctmh-loc label { margin: 0; }
.ctmh-loc label .o-ngay { width: 162px; }
.ctmh-loc .nut { display: inline-flex; align-items: center; gap: 6px; }
.bt-nut { width: 16px; height: 16px; flex: none; }
.nut-xanh-la { background: #16a34a; border-color: #16a34a; color: #fff; }
.nut-xanh-la:hover { background: #15803d; border-color: #15803d; color: #fff; }
.ctmh-o4 { margin-bottom: 14px; }
.ctmh-bang { font-size: 13.5px; }
.ctmh-bang td { vertical-align: top; }
.ctmh-bang td.ctmh-so { width: 92px; }
.ctmh-bang .ctmh-dau-ky td { font-weight: 600; background: #eef4ff; color: var(--chu); }
.ctmh-bang .ctmh-dau-ct td { border-top: 1px solid #d1d5db; }
.ctmh-bang .ctmh-dau-hd td { font-weight: 600; color: var(--chu); }
.ctmh-bang .ctmh-thue td, .ctmh-bang .ctmh-ck td, .ctmh-bang .ctmh-dc td { color: #6b7280; }
.ctmh-bang .ctmh-cong td { font-weight: 600; background: #f9fafb; color: var(--chu); }
.ctmh-bang .ctmh-tong td { font-weight: 700; background: #f3f4f6; }
.ctmh-ten { color: var(--chu); }
.ctmh-ma { display: inline-flex; align-items: center; gap: 2px; color: #6b7280; font-size: 12.5px; }
.ctmh-ma svg { width: 11px; height: 11px; fill: currentColor; }
.ctmh-mt { color: #6b7280; font-size: 12.5px; margin-top: 2px; }
.ctmh-the-ds { display: none; }
.ctmh-ghi { font-size: 12.5px; margin-top: 10px; }
@media (max-width: 900px) {
  .ctmh-bang-the { display: none; }
  .ctmh-the-ds { display: flex; flex-direction: column; gap: 10px; }
  .ctmh-the { padding: 12px 14px; }
  .ctmh-the-dau { display: flex; justify-content: space-between; gap: 8px; }
  .ctmh-the-dau small { display: block; }
  .ctmh-the-dong { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid #f3f4f6; font-size: 14px; }
  .ctmh-the-ten { min-width: 0; flex: 1; }
  .ctmh-the-dong.ctmh-thue, .ctmh-the-dong.ctmh-ck, .ctmh-the-dong.ctmh-dc { color: #4b5563; font-size: 13px; font-style: italic; }
  .ctmh-the-cuoi { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid #e5e7eb; font-size: 13.5px; }
  .bieu-mau.ctmh-loc input { width: 110px; }
}
@media print {
  .khong-in, .ctmh-loc, .ctmh-the-ds { display: none !important; }
  .ctmh-bang-the { display: block !important; box-shadow: none; }
  .ctmh-bang { font-size: 10.5px; }
  .ctmh-o4 .the { box-shadow: none; border: 1px solid #d1d5db; }
  .than, .noi-dung { padding: 0 !important; margin: 0 !important; }
}

/* ---------- Gia tham khao duoi dong bao gia / hoa don (18/11) ---------- */
tr.gtk-dong > td { background: #fffbeb !important; padding: 6px 10px !important; border-top: 0 !important; }
.gtk { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 18px; font-size: 12px; line-height: 1.45; }
.gtk-tieu { font-weight: 600; color: #92400e; white-space: nowrap; padding-top: 1px; }
.gtk-nhom { min-width: 0; }
.gtk-nhom > small { display: block; color: #6b7280; font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; }
.gtk-muc { display: inline-flex; align-items: center; gap: 3px; margin: 1px 8px 1px 0; }
.gtk-gia { display: inline-flex; align-items: baseline; gap: 4px; height: auto; padding: 1px 8px; border-radius: 10px; border: 1px solid #fcd34d; background: #fff; color: var(--chu); font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gtk-gia:hover { background: #fef3c7; }
.gtk-gia span { color: #6b7280; font-size: 10.5px; }
.gtk-gia.gtk-khach { border-color: #16a34a; }
.gtk-so { font-size: 10.5px; color: #6b7280; }
.gtk-von { color: #6b7280; font-size: 10.5px; margin-left: 4px; }
.gtk-trong { color: #9ca3af; font-style: italic; padding-top: 1px; }
.gtk-da-dien { color: #166534; background: #dcfce7; border-radius: 10px; padding: 0 8px; white-space: nowrap; }
.gtk-x { margin-left: auto; border: 0; background: none; color: #9ca3af; cursor: pointer; font-size: 13px; padding: 0 4px; }
.gtk-x:hover { color: #4b5563; }
input.gtk-nhay { background: #bbf7d0 !important; transition: background .2s; }

/* ---------- Bao cao doanh so / chi phi (18/11) ---------- */
.bc-dau { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.bc-phu { margin: 0; font-size: 13.5px; }
.bc-loc { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bieu-mau.bc-loc select, .bieu-mau.bc-loc input { margin: 0; width: auto; height: 34px; }
.bieu-mau.bc-loc input { width: 120px; }
.bc-tuy { display: inline-flex; align-items: center; gap: 6px; }
.bc-tab { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.bc-loc .nut { height: 34px; }
.bc-tab a { white-space: nowrap; }
.bc-chip { margin-bottom: 10px; }
.bc-ghi { margin: -2px 0 10px; font-size: 13px; }
.bc-bieu { padding: 14px 16px 10px; margin-bottom: 12px; }
.bc-chu-giai { display: flex; gap: 16px; font-size: 12.5px; color: #4b5563; margin-bottom: 8px; }
.bc-chu-giai i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.bc-cot-ds { display: flex; align-items: flex-end; gap: 6px; height: 170px; overflow-x: auto; }
.bc-cot { flex: 1 0 34px; display: flex; flex-direction: column; align-items: center; height: 100%; }
.bc-cot-trong { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; border-bottom: 1px solid #d1d5db; }
.bc-cot-trong span { width: 40%; max-width: 18px; min-height: 1px; border-radius: 3px 3px 0 0; }
.bc-a { background: #2563eb; }
.bc-b { background: #f59e0b; }
.bc-cot small { font-size: 11px; color: #6b7280; margin-top: 4px; white-space: nowrap; }
.bc-bang tfoot th { background: #f3f4f6; font-weight: 700; }

/* ---------- Ghi chu / nhac nho / tep cua khach (18/11) ---------- */
.khg-form { padding: 16px 20px; margin-bottom: 14px; }
.khg-form .nut { margin-top: 0; }
.khg-nhac-form { display: grid; grid-template-columns: minmax(0, 1fr) 130px 140px 190px auto; gap: 10px; align-items: end; }
.bieu-mau.khg-nhac-form label { margin-bottom: 0; }
.khg-ghi { margin: -6px 0 12px; font-size: 13px; }
.khg-ds { display: flex; flex-direction: column; gap: 10px; }
.khg-muc { padding: 12px 16px; }
.khg-dau { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; margin-bottom: 6px; }
.khg-nut { margin-left: auto; display: inline-flex; gap: 10px; }
.khg-nd { white-space: pre-wrap; font-size: 14.5px; line-height: 1.55; }
.khg-sua textarea { width: 100%; }
.khg-nut2 { display: inline-flex; gap: 8px; margin-top: 8px; }
.khg-trong { padding: 8px 2px; }
.khg-tep-dau { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.khg-tep-dau .nut { margin-left: auto; }
.khg-anh img { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; vertical-align: middle; border: 1px solid var(--vien); }
@media (max-width: 900px) { .khg-nhac-form { grid-template-columns: 1fr 1fr; } .khg-nhac-form .khg-rong { grid-column: 1 / -1; } }

/* ---------- Don dat hang NCC (18/11) ---------- */
.dh-dau-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 0 14px; }
.dh-them { padding: 16px 20px; margin-bottom: 14px; }
.dh-cc { align-items: center; }
.dh-tt .o-kem-nut { margin-top: 0; }
.dh-nhan { padding: 12px 16px; margin-bottom: 12px; }
.dh-hd { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dh-giay { max-width: 900px; padding: 28px 32px; font-size: 14px; line-height: 1.5; }
.dh-giay-dau { display: flex; justify-content: space-between; gap: 20px; border-bottom: 2px solid #111827; padding-bottom: 12px; margin-bottom: 14px; }
.dh-logo { display: block; height: 44px; margin-bottom: 6px; }
.dh-so { text-align: right; }
.dh-tieu { font-size: 20px; font-weight: 700; letter-spacing: .03em; }
.dh-ben { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 12px; }
.dh-ben > div > .phu { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.dh-ben > div > b { display: block; }
.dh-bang .so { text-align: right; white-space: nowrap; }
.dh-bang .giua { text-align: center; }
.dh-cuon { overflow-x: auto; }
.dh-bang { width: 100%; border-collapse: collapse; margin: 6px 0 12px; }
.dh-bang th, .dh-bang td { border: 1px solid #d1d5db; padding: 6px 8px; vertical-align: top; }
.dh-bang th { background: #f3f4f6; font-weight: 600; font-size: 13px; }
.dh-bang tfoot td { font-weight: 600; }
.dh-bang tr.dam td { font-weight: 700; }
.dh-mt { color: #6b7280; font-size: 12.5px; font-style: italic; }
.dh-dk div { white-space: pre-wrap; }
.dh-ky { display: grid; grid-template-columns: 1fr 1fr; text-align: center; margin-top: 28px; min-height: 110px; }
.dh-ky span { display: block; font-style: italic; font-size: 12.5px; color: #4b5563; }
@media (max-width: 900px) { .dh-dau-2, .dh-ben { grid-template-columns: 1fr; } .dh-giay { padding: 18px 14px; } .dh-bang { font-size: 13px; min-width: 560px; } }
@media print { .khong-in { display: none !important; } .dh-giay { box-shadow: none; border: 0; padding: 0; max-width: none; } }

/* HTTPS noi bo: trang /chung-chi + nhac tren trang dang nhap */
.dn-cc { margin: 14px 0 0; }
.cc-tieu-de { font-size: 18px; margin: 0 0 12px; }
.cc-muc { margin: 14px 0 8px; font-size: 14px; }
.cc-hd { border: 1px solid #e5e7eb; border-radius: 6px; padding: 8px 12px; margin-bottom: 8px; background: #fff; }
.cc-hd summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.cc-hd ol { margin: 8px 0 4px; padding-left: 20px; font-size: 13.5px; line-height: 1.55; }
.cc-hd li { margin-bottom: 4px; }
.cc-dc { margin: 0 0 10px; padding-left: 20px; font-size: 14px; }
.cc-dc li { margin-bottom: 4px; }
.cc-van-tay { font-size: 12px; word-break: break-all; }
.cc-van-tay span { font-family: ui-monospace, Consolas, monospace; }
.cc-qt { margin-top: 16px; padding-top: 12px; border-top: 1px solid #e5e7eb; }
.cc-qt .o-chon { margin-bottom: 4px; }
.cc-ve { margin: 16px 0 0; font-size: 13.5px; }

/* Nhap du lieu ban dau */
.nx-mo-ta { margin: 0 0 12px; font-size: 13.5px; }
.nx-tieu-de { margin: 0; }
.nx-phu { margin: 2px 0 0; font-size: 13px; }

/* Dieu khoan su dung */
.dk-phu { margin: 0 0 12px; font-size: 12.5px; }
.dk-muc { font-size: 14px; margin: 16px 0 6px; }
.dk-doan { margin: 0 0 6px; font-size: 13.5px; line-height: 1.55; }
.cdd-dk { margin: 6px 0 14px; align-items: flex-start; }
.chan-le a { color: inherit; }

/* Du lieu mau (demo) */
.demo-bao { margin: 0 0 12px; padding: 6px 12px; border-radius: 6px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: 13px; font-weight: 500; }

/* Tep dinh kem hoa don / bao gia */
.khoi-tep-kem .tep-khung { margin-bottom: 8px; }
.khoi-tep-kem .tk-luu { margin-bottom: 10px; }
.khoi-tep-kem .bang-vien { margin-top: 4px; }

/* Rut gon ma san pham */
.rg-so { margin-bottom: 18px; }
.rg-loc { gap: 12px; }
.rg-loc .rg-tab { margin: 0; padding: 3px; height: 32px; box-sizing: border-box; align-items: stretch; }
.rg-tab button { padding: 0 12px; font-size: 13.5px; display: inline-flex; align-items: center; }
.rg-tab .the-so { margin-left: 4px; }
.rg-nguong { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--mo); white-space: nowrap; }
.rg-nguong input { width: 64px; flex: none; height: 32px; text-align: right; }
.rg-bang th.rg-chon, .rg-bang td.rg-chon { width: 36px; text-align: center; }
.rg-bang td.rg-chon input, .rg-bang th.rg-chon input { margin: 0; vertical-align: middle; }
.rg-bang td { vertical-align: top; }
.rg-bang td.rg-chon { padding-top: 9px; }
.rg-bang .rg-moi { width: 38%; }
.rg-ten { word-break: break-word; }
.rg-ten mark { background: #fef08a; color: inherit; border-radius: 2px; padding: 0 1px; }
.rg-o { width: 100%; height: 34px; border: 1px solid var(--vien-o); border-radius: 6px; padding: 0 10px; font: inherit; font-weight: 600; box-shadow: 0 1px 2px 0 rgba(0,0,0,.05); }
.rg-o:focus { outline: 0; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .2); }
.rg-dem { margin-top: 3px; font-size: 12px; }
.rg-trung { margin-top: 4px; font-size: 12.5px; color: #b45309; }
.rg-thanh { align-items: center; margin: 0 0 18px; padding: 12px 76px 12px 14px; border-radius: 0 0 6px 6px; }
.rg-da-chon { margin-right: auto; color: var(--mo); }
@media (max-width: 768px) {
    .rg-so { grid-template-columns: 1fr 1fr; gap: 10px; }
    .rg-so > div { padding: 10px 12px; }
    .rg-so b { font-size: 19px; }
    .rg-bang .rg-moi { width: auto; }
    .rg-nguong { order: 3; }
    .rg-loc .rg-tab { width: 100%; }
    .rg-tab button { flex: 1; justify-content: center; padding: 0 6px; white-space: nowrap; font-size: 13px; }
    .rg-thanh { padding-right: 76px; white-space: nowrap; }
    .rg-bang tbody td.rg-chon, .rg-bang tbody td.so { display: inline-block; width: auto; padding: 10px 0 0 12px; border: 0; vertical-align: middle; }
    .rg-bang tbody td.so::before { content: "#"; }
}

/* Dong chua gan san pham: 2 khung Hoa don ban / mua nhu CRM cu */
.kg-the { margin-bottom: 18px; }
.kg-dau { padding: 0 0 12px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.kg-dem { min-width: 20px; padding: 0 7px; border-radius: 10px; background: #dcfce7; color: #15803d; font-size: 11.5px; font-weight: 600; text-align: center; }
.kg-dem.con { background: #fef3c7; color: #b45309; }
.kg-the .bang-vien { margin: 0; }
.kg-xong { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; color: #4b5563; }
.kg-xong svg { width: 16px; height: 16px; fill: none; stroke: #16a34a; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.bang-gan .kg-ten { min-width: 180px; }
.bang-gan .kg-khac { width: 270px; }
.kg-bo-qua { padding: 16px 20px; }
.kg-bo-qua summary { cursor: pointer; color: #2563eb; font-weight: 600; }
.kg-bo-qua .bang-vien { margin-top: 12px; }

/* o chon tep (tinh/o_tep.js): khung cao 34 nhu o nhap */
.o-tep { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; height: 34px; padding: 0 10px 0 3px; border: 1px solid var(--vien-o); border-radius: 6px; background: rgba(249, 250, 251, .7); box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05); font-weight: 400; box-sizing: border-box; }
label > .o-tep { width: 100%; }
.o-tep.loi { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .15); }
span.o-tep > button.o-tep-nut { flex: none; height: 26px; margin: 0; padding: 0 12px; border: 1px solid var(--vien-o); border-radius: 5px; background: #fff; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--chu); cursor: pointer; }
.o-tep-nut:hover { background: #f3f4f6; }
.o-tep-nut:focus-visible { outline: 0; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .2); }
.o-tep-ten { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: #9ca3af; cursor: pointer; }
.o-tep.co-tep .o-tep-ten { color: var(--chu); }
input.o-tep-goc { position: absolute !important; left: 0; bottom: 0; width: 1px !important; height: 1px !important; margin: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0; clip: rect(0 0 0 0); pointer-events: none; }

/* danh sach khach hang (nhu CRM cu): o so lieu + cong tac giao dich */
.khds-so { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.khds-so .the { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; margin: 0; color: inherit; border: 1px solid transparent; }
.khds-so a.the:hover { border-color: #cbd5e1; }
.khds-so .the.dang { border-color: #93c5fd; }
.khds-so b { font-size: 22px; font-weight: 600; line-height: 1.2; color: var(--chu); }
.khds-so .xanh-la b { color: #16a34a; } .khds-so .do b { color: #dc2626; } .khds-so .xanh b { color: #2563eb; }
.khds-so span { font-size: 13px; color: var(--mo); }
.khds-bang td { vertical-align: middle; }
.cong-tac { position: relative; display: inline-block; width: 40px; height: 22px; margin: 0; cursor: pointer; }
.cong-tac input { position: absolute; opacity: 0; width: 0; height: 0; }
.cong-tac span { position: absolute; inset: 0; border-radius: 11px; background: #d1d5db; transition: background .15s; }
.cong-tac span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.cong-tac input:checked + span { background: #2563eb; }
.cong-tac input:checked + span::after { transform: translateX(18px); }
.cong-tac input:focus-visible + span { box-shadow: 0 0 0 3px rgba(59, 130, 246, .3); }
.cong-tac input:disabled + span { opacity: .55; cursor: default; }
@media (max-width: 768px) { .khds-so { grid-template-columns: 1fr 1fr; } }

/* them khach hang nhanh (tinh/kh_nhanh.js) */
.khn-hop { width: min(580px, calc(100vw - 24px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: 12px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); overflow: auto; }
.khn-hop::backdrop { background: rgba(15, 23, 42, .45); }
.khn-dau { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--vien); }
.khn-dau h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; font-weight: 600; }
.khn-dau h3 svg { width: 20px; height: 20px; fill: var(--chu); stroke-width: 2; stroke-linecap: round; }
.khn-x { width: 32px; height: 32px; border: 0; border-radius: 6px; background: none; font-size: 24px; line-height: 1; color: #6b7280; cursor: pointer; }
.khn-x:hover { background: #f3f4f6; color: var(--chu); }
.khn-form { padding: 18px 20px 20px; margin: 0; }
.khn-form .khn-tra { display: inline-flex; align-items: center; gap: 6px; }
.khn-form .khn-tra svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.khn-tra-kq { margin: -8px 0 12px; font-size: 13px; }
.khn-trung .o-chon { margin: 6px 0 12px; }
.khn-chan { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* ho so khach - trang Thong tin nhu CRM cu */
.khs-the { padding: 0; overflow: hidden; }
.khs-h { margin: 0; font-size: 17px; font-weight: 600; }
.khs-dau { padding: 18px 24px 12px; }
.khs-tab { display: flex; gap: 4px; padding: 0 24px; background: #f9fafb; border-top: 1px solid var(--vien); border-bottom: 1px solid var(--vien); }
.khs-tab button { padding: 12px 12px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; font: inherit; font-size: 14px; color: #4b5563; cursor: pointer; }
.khs-tab button.dang { color: var(--chu); border-bottom-color: var(--chu); font-weight: 500; }
.khs-than { padding: 8px 24px 4px; max-width: 980px; }
.khs-pad { margin: 14px 24px 0; }
.khs-muc { margin: 18px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--vien); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #4b5563; }
.khs-tra { display: inline-flex; align-items: center; gap: 6px; }
.khs-tra svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.khs-vt { margin: 0 0 15px; }
.khs-nhan { display: block; margin-bottom: 6px; color: var(--nhan); font-size: 13.5px; font-weight: 600; }
.khs-them { margin: 0 0 16px; padding: 10px 14px; border: 1px solid var(--vien); border-radius: 6px; }
.khs-them summary { cursor: pointer; font-size: 13.5px; color: #4b5563; }
.khs-them[open] summary { margin-bottom: 12px; }
.khs-chan { display: flex; justify-content: flex-end; padding: 14px 24px; background: #f9fafb; border-top: 1px solid var(--vien); }
.khs-tieu { padding: 18px 24px 8px; }

/* ton kho: san pham + ma noi bo 1 cot, can giua doc */
.bang-kho td { vertical-align: middle; }
.bang-kho .ten-sp { font-weight: 600; }
.bang-kho .kho-ma { margin-top: 2px; font-size: 12.5px; color: #6b7280; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* xem hoa don: thanh cong cu bieu tuong kieu CRM cu + hop gui Zalo */
.hdx-cc { align-items: center; }
.hdx-nut { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nut-bt { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 38px; height: 36px; padding: 0 9px; }
.nut-bt svg { width: 18px; height: 18px; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nut-bt .bt-pdf { width: 20px; height: 20px; stroke: none; }
.nut-bt .mui-nho, .hdx-them .mui-nho { width: 14px; height: 14px; fill: none; stroke: #6b7280; stroke-width: 2; }
.hdx-them { display: inline-flex; align-items: center; gap: 4px; height: 36px; }
.nut-dem { font-size: 11.5px; color: #6b7280; }
.hdx-nut .nut-xanh-la { display: inline-flex; align-items: center; gap: 6px; height: 36px; }
.hdx-nut .tha-menu form { margin: 0; }
.hdx-nut .muc-menu.chu-do { color: #dc2626; }
.hop-zalo .hop-hop { width: min(680px, calc(100vw - 24px)); }
.hz-dau { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hz-dau label { flex: 0 1 320px; margin: 0; }
.hz-gui { font-size: 13px; margin-top: 18px; }
.hz-kieu { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 12px 0 8px; }
.hz-kieu .o-chon { margin: 0; }
#loi-nhan { width: 100%; min-height: 190px; }
.hz-link { margin-top: 10px; }
.hz-link-bt { display: inline-flex; align-items: center; justify-content: center; width: 42px; flex: none; border: 1px solid var(--vien-o); border-right: 0; border-radius: 6px 0 0 6px; background: #f9fafb; }
.hz-link-bt svg { width: 16px; height: 16px; fill: none; stroke: #4b5563; stroke-width: 1.8; stroke-linecap: round; }
.hz-link input { border-radius: 0 !important; color: #6b7280; }
.hz-ghi { font-size: 12.5px; margin: 6px 0 10px; }
.hz-sua { margin-top: 8px; }
.hz-cuoi { padding: 0 24px 14px; font-size: 12.5px; }
.hop-chan .chan-trai { margin-right: auto; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; color: #2563eb; font-weight: 500; }
.hop-chan .chan-trai svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.hop-zalo .hop-chan .nut svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* KQKD: thang co bang luong (khong nhap) + so nhap tay mau tim nhu CRM cu */
.kt-luong-bl { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.kt-luong-bl span { color: var(--mo); font-weight: 400; font-size: 13px; }
.kt-luong-bl b { margin-top: 6px; color: #16a34a; font-weight: 500; font-size: 14px; }
.kt-luong-bl small { color: var(--mo); font-size: 12px; }
.kt-tay { color: #7c3aed; }

/* thanh tren cung nhu CRM cu: menu, tim kiem chung, tao nhanh, cai dat, viec cua toi, thong bao, tai khoan */
.thanh-tren .nut-menu { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border-radius: 6px; color: #4b5563; }
.thanh-tren .nut-menu:hover { background: #f3f4f6; }
.thanh-tren .nut-menu svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.ung-dung.menu-an > .menu { display: none; }
.tt-giua { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 10px; }
.tt-tim { position: relative; flex: 0 1 420px; }
.tt-tim input { width: 100%; height: 38px; padding: 0 12px 0 38px; border: 1px solid transparent; border-radius: 8px; background: #f3f4f6; font: inherit; font-size: 14px; color: var(--chu); }
.tt-tim input:focus { outline: 0; background: #fff; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .15); }
.tt-tim-bt { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; fill: none; stroke: #6b7280; stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }
.tt-kq { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 70; max-height: min(70vh, 560px); overflow-y: auto; background: #fff; border: 1px solid var(--vien); border-radius: 10px; box-shadow: 0 12px 24px -6px rgba(0, 0, 0, .18); padding: 6px 0; }
.tt-kq-nhom + .tt-kq-nhom { border-top: 1px solid #f1f2f4; margin-top: 4px; padding-top: 4px; }
.tt-kq-dau { display: flex; justify-content: space-between; align-items: center; padding: 6px 14px 4px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; }
.tt-kq-dau a { text-transform: none; letter-spacing: 0; font-weight: 500; color: #2563eb; }
.tt-kq-dong { display: flex; flex-direction: column; gap: 1px; padding: 6px 14px; color: var(--chu); }
.tt-kq-dong b { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-kq-dong small { font-size: 12.5px; color: #6b7280; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-kq-dong:hover, .tt-kq-dong.dang { background: #eff6ff; }
.tt-kq-trong { padding: 14px; color: var(--mo); font-size: 13.5px; }
.tt-cong { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: #2563eb; color: #fff; cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.tt-cong:hover { background: #1d4ed8; }
.tt-cong svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.tt-tao .tha-menu { left: 50%; transform: translateX(-50%); min-width: 210px; }
.tt-tao-dau { display: block; padding: 6px 14px 4px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; }
.tt-cai-dat { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: 6px; color: #4b5563; font-size: 14px; }
.tt-cai-dat:hover, .tt-cai-dat.dang { background: #f3f4f6; color: var(--chu); }
.tt-cai-dat svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.chuong-so.vang { background: #ca8a04; }
.tt-toi-nut { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 8px 0 4px; border: 0; border-radius: 20px; background: none; font: inherit; font-size: 14px; font-weight: 500; color: var(--chu); cursor: pointer; }
.tt-toi-nut:hover { background: #f3f4f6; }
.tt-avatar { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: #dbeafe; color: #1d4ed8; font-size: 12.5px; font-weight: 700; }
.tt-toi .tha-menu form { margin: 0; }
.tt-toi-nut > span:not(.tt-avatar) { white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.tt-toi-nut .mui-nho { width: 14px; height: 14px; flex: none; fill: none; stroke: #6b7280; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tt-toi .tha-menu .muc-menu { display: block; width: 100%; text-align: left; }
.thanh-tren .tha-menu { z-index: 70; }
@media (max-width: 900px) {
    .tt-giua { justify-content: flex-start; }
    .tt-tim { flex: 1 1 auto; }
    .tt-tao .tha-menu { left: auto; right: 0; transform: none; }
    .thanh-tren { gap: 6px; padding: 0 10px; }
    .tt-giua { gap: 6px; }
    .tt-cai-dat { display: none; }
    .thanh-tren .nguoi { gap: 2px; }
    .thanh-tren .chuong { margin-right: 0; }
    .tt-toi-nut { padding: 0 2px; gap: 2px; }
    .tt-toi-nut .mui-nho { display: none; }
    .tt-tim input { padding-right: 6px; }
}

/* danh sach khach: chon nhieu + thao tac hang loat */
.khds-bang .khds-chon { width: 36px; text-align: center; }
.khds-bang .khds-chon input { margin: 0; vertical-align: middle; }
.khds-hl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; margin: 0; background: #eff6ff; border-bottom: 1px solid #bfdbfe; }
.khds-hl-dem { margin-right: 6px; font-size: 13.5px; color: #1e3a8a; }
.khds-hl-o { display: inline-flex; align-items: center; gap: 4px; }
.khds-hl-o input, .khds-hl-o select { height: 30px; padding: 0 8px; border: 1px solid var(--vien-o); border-radius: 6px; font: inherit; font-size: 13px; background: #fff; }
.khds-hl-o input { width: 150px; }
.loc-bang .dt-so { flex: none; width: auto; }

/* tab chung tu: nhat ky / ghi chu / nhac nho / viec lien quan */
.ct-tab { padding: 0; margin-top: 16px; overflow: hidden; }
.ct-tab-dau { padding: 0 20px; }
.ct-phan { padding: 14px 20px 18px; }
.ct-dong { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 9px 0; border-bottom: 1px solid #f1f2f4; font-size: 13.5px; }
.ct-dong:last-child { border-bottom: 0; }
.ct-luc { min-width: 118px; color: var(--mo); font-size: 12.5px; }
.ct-dong .form-dong { margin-left: auto; }
.ct-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin-bottom: 10px; }
.ct-form textarea { flex: 1 1 100%; margin: 0; }
.ct-form label { margin: 0; }
.ct-nhac-form label { width: 170px; }
.ct-nhac-form .ct-nd { flex: 1 1 260px; width: auto; }
.hdx-nut > .tha > .nut-nho, .hdx-nut > .nut-nho, .hdx-nut > a.nut-nho { height: 36px; display: inline-flex; align-items: center; gap: 4px; }

/* tra truoc NCC (cho hoa don) */
.ttn-so { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 12px; }
.ttn-so .the { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 12px 16px; color: inherit; border: 1px solid transparent; }
.ttn-so a.the.dang { border-color: #93c5fd; }
.ttn-so .the span { font-size: 13px; color: var(--mo); }
.ttn-so .the b { font-size: 20px; }
.ttn-tab { margin-bottom: 12px; }
.ttn-tep { flex: 1 1 100%; margin-bottom: 12px; }
.chu-cam { color: #c2410c; }
@media (max-width: 760px) { .ttn-so { grid-template-columns: 1fr; } }

/* thanh toan nhieu hoa don mua (nhu CRM cu) */
.tn-dau { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: -6px 0 12px; }
.tn-dau p { margin: 0; }
.tn-nut { display: flex; gap: 6px; }
.tn-so { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.tn-o { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 14px 18px; }
.tn-o span { font-size: 13px; color: var(--mo); }
.tn-o b { font-size: 22px; font-weight: 600; }
.tn-o b small { font-size: 13px; font-weight: 400; }
.tn-o.do { background: #fef2f2; border: 1px solid #fecaca; }
.tn-o.do b { color: #dc2626; }
.tn-o.vang b { color: #b45309; }
.tn-form { padding: 0; }
.tn-khoi { padding: 4px 20px 16px; border-bottom: 1px solid var(--vien); }
.tn-hang { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 14px; }
.tn-ds-dau { display: flex; align-items: center; gap: 8px; padding: 14px 0 10px; }
.tn-ds-dau b { margin-right: auto; }
.tn-ds-dau .o-tim-bang { flex: 0 1 320px; height: 32px; margin: 0; }
.tn-ncc { border: 1px solid var(--vien); border-radius: 8px; margin-bottom: 8px; }
.tn-ncc.co-chon { border-color: #93c5fd; background: #f8fbff; }
.tn-ncc-dau { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.tn-ncc-dau .tn-chon-ncc { margin: 0; flex: none; }
.tn-ten { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 0; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; color: var(--chu); }
.tn-ten small { font-size: 12.5px; }
.tn-nhanh { flex: 0 0 270px; margin: 0 !important; }
.tn-nhanh input { text-align: right; }
.tn-no { flex: 0 0 120px; text-align: right; color: #dc2626; font-size: 15px; }
.tn-mo { flex: none; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 6px; background: none; color: #6b7280; cursor: pointer; }
.tn-mo:hover { background: #f3f4f6; }
.tn-mo svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .15s; }
.tn-ncc.mo .tn-mo svg { transform: rotate(90deg); }
.tn-hd { display: none; padding: 0 14px 12px; }
.tn-ncc.mo .tn-hd { display: block; }
.tn-chan { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 76px 12px 20px; background: rgba(255, 255, 255, .97); border-top: 1px solid var(--vien); border-radius: 0 0 8px 8px; }
.tn-chan span { color: #4b5563; font-size: 13.5px; }
@media (max-width: 900px) {
    .tn-so { grid-template-columns: 1fr 1fr; }
    .tn-hang { grid-template-columns: 1fr 1fr; }
    .tn-ncc-dau { flex-wrap: wrap; }
    .tn-nhanh { flex: 1 1 100%; order: 5; }
    .tn-no { flex: 0 0 auto; }
    .tn-chan { flex-direction: column; align-items: stretch; padding-right: 76px; }
}
.tn-form .tn-ncc-dau input.tn-chon-ncc { width: 16px; height: 16px; flex: none; margin: 0; padding: 0; box-shadow: none; }
.tn-form .tn-nhanh input { margin: 0; height: 34px; width: auto; flex: 1; min-width: 0; }
.tn-form .tn-ten { width: auto; margin: 0; }
.tn-form .ttk-bang input.ttk-chon { width: 16px; height: 16px; margin: 0; }
.tn-form .ttk-bang .o-so-thu { margin: 0; height: 32px; }
.tn-form .khs-muc small { text-transform: none; letter-spacing: 0; font-weight: 400; }

.sk-lich { margin-top: 16px; }

.dv-trung td { background: #fffbeb; }
.dv-form { max-width: 320px; margin: 0; }
.dv-bang td { vertical-align: middle; }
.dv-form input { margin: 0; height: 32px; padding: 0 10px; border: 1px solid var(--vien-o); border-radius: 6px 0 0 6px; background: rgba(249, 250, 251, .7); font: inherit; font-size: 14px; flex: 1; min-width: 0; }
.dv-form .nut { height: 32px; }

/* hoa hong moi gioi (nhu CRM cu) */
.thanh-cong-cu.hh-nut-dau { justify-content: flex-end; gap: 8px; margin-bottom: 10px; }
.hh-rieng { margin: 0 0 12px; }
.hh-so { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; }
.hh-so > a, .hh-so > div { display: flex; flex-direction: column; gap: 2px; background: #fff; border-radius: 6px; padding: 12px 16px; color: inherit; border: 1px solid transparent; box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px -1px rgba(0, 0, 0, .1); }
.hh-so > a.dang { border-color: #3b82f6; box-shadow: 0 0 0 1px #3b82f6; }
.hh-so b { font-size: 20px; }
.hh-so small { font-size: 12px; }
.bieu-mau.hh-loc { display: grid; justify-content: start; grid-template-columns: minmax(200px, 260px) 150px 150px 150px auto; gap: 0 12px; align-items: end; margin-bottom: 12px; }
.bieu-mau.hh-loc label { margin-bottom: 0; font-size: 12.5px; }
.bieu-mau.hh-loc-gn { grid-template-columns: minmax(240px, 320px) 150px 150px auto auto; }
.bieu-mau.hh-loc .hh-loc-chk { align-self: center; margin-top: 18px; font-size: 13.5px; }
.hh-loc-nut { justify-self: start; }
.hh-o-chon { width: 40px; }
.hh-bang input[type=checkbox] { width: 17px; height: 17px; margin: 0; vertical-align: middle; }
.hh-thanh-chi { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 10px 76px 10px 14px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 6px; }
.hh-thanh-chi[hidden] { display: none; }
.hh-thanh-chi.loi { background: #fef2f2; border-color: #fecaca; }
.hh-thanh-chi.loi .hh-nguoi { color: #dc2626; }
.hh-p { margin: 0 0 6px; }
.hh-tt-ghi { font-size: 12.5px; margin: 0 0 10px; }
.hh-tinh { width: 100%; margin-bottom: 12px; }
.hh-tinh td { padding: 8px 6px; border-bottom: 1px solid var(--vien); }
.bieu-mau .hh-o-thue input { width: 170px; margin: 0; text-align: right; }
.hh-thuc-to { font-size: 16px; }
.bieu-mau .hh-ct { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; font-size: 13.5px; }
.bieu-mau .hh-ct input { width: auto; margin: 3px 0 0; }
.nhan-tt.tt-tim { color: #7c3aed; border-color: #ddd6fe; background: #f5f3ff; }
.hh-thao-tac { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.hh-thao-tac .form-dong { margin: 0; }
.hh-huy { color: #dc2626; min-width: 34px; justify-content: center; }
.hh-mo { opacity: .55; }
.hh-them-luoi { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 0 12px; align-items: end; }
.hh-them-nut { padding-bottom: 15px; }
.hh-kh-luoi { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) 160px 160px; gap: 0 12px; align-items: end; }
.hh-kh-ghi { grid-column: 1 / -1; }
.hh-kh-cuoi { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bieu-mau .hh-kh-cuoi .o-chon { margin: 0; }
.bieu-mau .hh-kh-tu { display: flex; align-items: center; gap: 6px; margin: 0; white-space: nowrap; }
.bieu-mau .hh-kh-tu input { width: 140px; margin: 0; }
.hh-kh-cuoi .nut { margin-left: auto; }
.bieu-mau.hh-gn-dau { display: grid; grid-template-columns: minmax(200px, 260px) 170px 170px 1fr; gap: 0 12px; align-items: end; }
.hh-gn-tong { text-align: right; padding-bottom: 15px; line-height: 1.6; }
.hh-gn-tong .nut { margin-top: 4px; }
@media (max-width: 900px) {
    .hh-so { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bieu-mau.hh-loc, .bieu-mau.hh-loc-gn, .hh-kh-luoi, .bieu-mau.hh-gn-dau { grid-template-columns: 1fr 1fr; }
    .bieu-mau.hh-loc label, .hh-kh-luoi label { margin-bottom: 10px; }
    .bieu-mau.hh-loc .hh-loc-nut { margin-bottom: 10px; }
    .bieu-mau.hh-loc > label:first-of-type, .hh-kh-luoi > label:first-child, .hh-gn-tong, .bieu-mau.hh-loc .hh-loc-chk { grid-column: 1 / -1; }
    .hh-thao-tac { justify-content: flex-start; }
}
@media (max-width: 560px) {
    .hh-so { grid-template-columns: 1fr; }
    .hh-thanh-chi { flex-direction: column; align-items: stretch; padding-right: 14px; }
    .hh-them-luoi { grid-template-columns: 1fr; }
}

/* HD VAT (nhu CRM cu): 3 o so, o tim canh tab, khung phu duoi bang */
.vat-so { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 14px; }
.vat-so > div { display: flex; flex-direction: column; gap: 2px; border: 1px solid transparent; }
.vat-so > .vat-so-noi { background: #fffbeb; border-color: #fcd34d; }
.vat-so > .vat-so-noi b { color: #c2410c; }
.vat-tab-hang { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--vien); }
.vat-tab-hang .kho-tab { margin-bottom: -1px; border-bottom: 0; }
.vat-tim { width: 260px; height: 34px; margin: 0 0 6px; padding: 0 12px 0 34px; border: 1px solid #d1d5db; border-radius: 6px; font: inherit; font-size: 13.5px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%239ca3af' stroke-width='1.8'%3E%3Ccircle cx='9' cy='9' r='5.5'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") no-repeat 11px center / 16px; }
.vat-tim:focus { outline: none; border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(59, 130, 246, .15); }
.vat-ngay { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 4px; background: #f3f4f6; color: #6b7280; font-size: 12px; }
.vat-ngay.vat-ngay-lau { background: #fff7ed; color: #c2410c; }
.hdv-nut { flex-direction: row; align-items: center; justify-content: flex-end; gap: 6px; }
.nut.vat-nut-xanh { color: #2563eb; border-color: #bfdbfe; background: #eff6ff; }
.nut.vat-nut-xanh:hover { background: #dbeafe; }
.nut.vat-nut-xanh .bt { stroke: currentColor; }
.vat-icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #9ca3af; cursor: pointer; }
.vat-icon:hover { background: #f3f4f6; color: #374151; }
.vat-icon.vat-icon-do:hover { color: #dc2626; background: #fef2f2; }
.vat-icon .bt { width: 17px; height: 17px; margin: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.vat-khop { font-size: 12.5px; }
.hdv-duoi { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 14px; }
.hdv-duoi .the { margin: 0; }
.vat-them-kh { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.vat-them-kh select, .vat-them-kh .chon-tim { margin: 0; }
@media (max-width: 960px) { .hdv-duoi { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
    .vat-so { grid-template-columns: 1fr; }
    .vat-tab-hang { flex-direction: column; align-items: stretch; border-bottom: 0; }
    .vat-tab-hang .kho-tab { border-bottom: 1px solid var(--vien); }
    .vat-tim { width: 100%; }
    .vat-them-kh { grid-template-columns: 1fr; }
    .hdv-nut { justify-content: flex-start; }
}

/* ung tien nhan vien (nhu CRM cu) */
.bieu-mau.ut-loc { display: grid; grid-template-columns: 160px 160px; gap: 0 12px; padding: 14px 18px; margin-bottom: 14px; }
.bieu-mau.ut-loc label { margin: 0; }
.ut-so { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 14px; }
.ut-so > div { display: flex; flex-direction: column; gap: 2px; }
.chu-xanh-duong { color: #0284c7; }
.ut-ghi { display: flex; gap: 8px; background: #f0f9ff; border: 1px solid #e0f2fe; color: #075985; border-radius: 8px; padding: 8px 12px; font-size: 13px; margin-bottom: 14px; }
.ut-bang tfoot td { background: #f9fafb; }
.ut-trong { text-align: center; padding: 28px 10px; color: #6b7280; }
.ut-trong-bt { font-size: 30px; margin-bottom: 8px; opacity: .6; }
.ut-trong .nut { margin-top: 12px; }
@media (max-width: 760px) { .ut-so { grid-template-columns: 1fr 1fr; } .ut-so > div:first-child { grid-column: 1 / -1; } .bieu-mau.ut-loc { grid-template-columns: 1fr 1fr; } }

/* bao cao loi nhuan (nhu CRM cu) */
.ln-loc { align-items: center; }
.ln-loc select { width: auto; min-width: 120px; height: 32px; padding: 0 28px 0 10px; border: 1px solid #d1d5db; border-radius: 6px; font: inherit; font-size: 13.5px; background-color: #fff; }
.ln-so { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; }
.ln-so > div { display: flex; flex-direction: column; gap: 2px; border: 1px solid transparent; }
.ln-so > div > span { font-size: 11.5px; letter-spacing: .03em; }
.ln-so > .ln-noi { border-color: #93c5fd; }
.ln-mo > td { color: #9ca3af; }
.ln-chon > td { background: #eff6ff; }
.ln-h4 { font-size: 14px; margin: 16px 0 8px; }
.ln-h4:first-of-type { margin-top: 4px; }
.ln-cuon { overflow-x: auto; }
.ln-cp td, .ln-cp th { white-space: nowrap; }
.ln-cach p { margin: 0 0 10px; line-height: 1.6; }
@media (max-width: 900px) { .ln-so { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .ln-so { grid-template-columns: 1fr; } }
.bang td.chu-do, .bang td.chu-do b { color: #dc2626; }

/* thanh "con N viec du an" tren Viec hang ngay */
.vda-con { margin-bottom: 14px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; color: #1e3a8a; }
.vda-con > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 9px 14px; cursor: pointer; list-style: none; }
.vda-con > summary::-webkit-details-marker { display: none; }
.vda-con-phai { display: inline-flex; align-items: center; gap: 12px; font-size: 13px; }
.vda-con-xem { color: #2563eb; font-weight: 500; }
.vda-con-xem::after { content: " ▾"; }
.vda-con[open] .vda-con-xem::after { content: " ▴"; }
.vda-con ul { margin: 0; padding: 4px 14px 6px 34px; border-top: 1px solid #dbeafe; }
.vda-con li { padding: 3px 0; }
.vda-con > .lk { display: inline-block; margin: 0 14px 10px; }

/* Viec du an - Kanban */
.vda-kb-ghi { margin: 4px 0 10px; }
.vda-kb { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; }
.vda-kb-cot { flex: 0 0 260px; background: #f8fafc; border: 1px solid #e5e7eb; border-top: 3px solid var(--m, #9ca3af); border-radius: 8px; min-height: 120px; }
.vda-kb-cot.tha { background: #eff6ff; border-color: #93c5fd; }
.vda-kb-cot h4 { display: flex; justify-content: space-between; align-items: center; margin: 0; padding: 10px 12px; font-size: 13.5px; color: var(--m, #374151); }
.vda-kb-cot h4 b { font-size: 12px; color: #6b7280; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 0 7px; }
.vda-kb-ds { display: flex; flex-direction: column; gap: 8px; padding: 0 8px 10px; min-height: 60px; }
.vda-kb-the { background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; padding: 9px 10px; box-shadow: 0 1px 2px rgba(0,0,0,.05); cursor: grab; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.vda-kb-the.dang-keo { opacity: .5; }
.vda-kb-the.vda-qua-han { border-left: 3px solid #dc2626; }
.vda-kb-ten { font-weight: 500; color: var(--chu); line-height: 1.35; }
.vda-kb-duoi { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; }
.vda-kb-nguoi { display: flex; flex-wrap: wrap; gap: 4px; }
.vda-kb-the .vda-tt { width: 100%; margin-top: 2px; font-size: 12.5px; height: 30px; }
/* Gantt du an */
.gt-ca-xong { margin: 0; }
.gt-the { padding: 0; overflow: hidden; }
.gt-khung { overflow-x: auto; }
.gt-dong { display: flex; min-width: calc(260px + var(--so-thang) * 110px); border-bottom: 1px solid #eef0f3; }
.gt-dong:last-child { border-bottom: 0; }
.gt-ten { position: sticky; left: 0; z-index: 2; flex: 0 0 260px; padding: 0 12px; background: #fff; border-right: 1px solid #e5e7eb; display: flex; align-items: center; min-height: 36px; font-size: 13px; overflow: hidden; }
.gt-ten a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--chu); padding-left: 14px; }
.gt-da .gt-ten a { font-weight: 600; padding-left: 0; }
.gt-da > div { background: #f8fafc; }
.gt-truc { position: relative; flex: 1; display: flex; min-height: 36px; }
.gt-o { border-right: 1px dashed #eef0f3; height: 100%; }
.gt-dau .gt-ten, .gt-dau .gt-truc { background: #f9fafb; font-weight: 600; font-size: 12.5px; color: #374151; min-height: 46px; }
.gt-thang { border-right: 1px solid #e5e7eb; padding: 4px 6px; display: flex; flex-direction: column; justify-content: flex-end; font-weight: 500; font-size: 12px; }
.gt-thang b { font-size: 12px; color: #111827; }
.gt-nay { position: absolute; top: 0; bottom: 0; width: 2px; background: #ef4444; opacity: .7; z-index: 1; }
.gt-thanh { position: absolute; top: 8px; height: 20px; min-width: 6px; border-radius: 4px; background: var(--m, #64748b); color: #fff; font-size: 11.5px; line-height: 20px; padding: 0 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; z-index: 1; }
.gt-thanh:hover { filter: brightness(1.1); }
.gt-thanh.gt-thieu { background: repeating-linear-gradient(45deg, var(--m, #64748b), var(--m, #64748b) 6px, rgba(255,255,255,.35) 6px, rgba(255,255,255,.35) 10px); }
.gt-thanh.gt-xong { opacity: .55; }
.gt-thanh span { pointer-events: none; }
@media (max-width: 760px) { .gt-ten { flex-basis: 150px; } .gt-dong { min-width: calc(150px + var(--so-thang) * 90px); } }

/* bang tin: lich + cot phai (nhu CRM cu) */
.tc-luoi2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 14px; align-items: start; margin-top: 14px; }
.tc-luoi2 > .the, .tc-cot-phai > .the { margin: 0; }
.tc-cot-phai { display: flex; flex-direction: column; gap: 14px; }
.tc-lich-dau { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.tc-lich-dau .kt-h { margin: 0; }
.tc-lich-nut { display: flex; gap: 4px; }
.tc-lich-chu { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: #4b5563; margin-bottom: 8px; }
.tc-lich-chu span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; background: var(--m); }
.tc-lich-bang { border: 1px solid #e5e7eb; border-radius: 6px; overflow: hidden; }
.tc-lich-thu, .tc-lich-tuan { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tc-lich-thu span { padding: 6px; text-align: center; font-size: 12.5px; font-weight: 600; background: #f9fafb; border-bottom: 1px solid #e5e7eb; }
.tc-lich-o { min-height: 86px; padding: 4px; border-right: 1px solid #eef0f3; border-bottom: 1px solid #eef0f3; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tc-lich-o:nth-child(7n) { border-right: 0; }
.tc-lich-tuan:last-child .tc-lich-o { border-bottom: 0; }
.tc-lich-o.ngoai { background: #fafafa; }
.tc-lich-o.ngoai .tc-lich-so { color: #c0c4cc; }
.tc-lich-so { align-self: flex-end; font-size: 12px; color: #6b7280; width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 50%; }
.tc-lich-o.nay .tc-lich-so { background: #2563eb; color: #fff; font-weight: 600; }
.tc-sk { display: block; font-size: 11.5px; line-height: 1.35; padding: 1px 5px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; background: var(--m); }
.tc-sk-viec { --m: #2563eb; } .tc-sk-vda { --m: #7c3aed; } .tc-sk-hd { --m: #ea580c; } .tc-sk-nhac { --m: #0d9488; }
.tc-sk-them { font-size: 11px; padding-left: 4px; }
.tc-xem { float: right; font-size: 13px; font-weight: 500; }
.tc-da { list-style: none; margin: 0; padding: 0; }
.tc-da li { padding: 8px 0; border-bottom: 1px solid #f3f4f6; }
.tc-da li:last-child { border-bottom: 0; }
.tc-da-dong { display: flex; gap: 8px; align-items: center; margin: 4px 0; font-size: 12.5px; }
.tc-nhac li { display: flex; justify-content: space-between; gap: 8px; }
.tc-hd { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.tc-hd li { position: relative; margin-left: 6px; padding: 0 0 12px 16px; border-left: 2px solid #e5e7eb; font-size: 13px; }
.tc-hd li:last-child { border-left-color: transparent; }
.tc-hd li::before { content: ""; position: absolute; left: -7px; top: 2px; width: 8px; height: 8px; border-radius: 50%; background: #fff; border: 2px solid #9ca3af; }
.tc-hd-luc { display: block; font-size: 11px; color: #6b7280; text-transform: uppercase; letter-spacing: .03em; }
.tc-dem-phu { display: block; font-size: 12px; }
@media (max-width: 1100px) { .tc-luoi2 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .tc-lich-o { min-height: 56px; } .tc-sk { font-size: 0; height: 6px; padding: 0; } .tc-lich-thu span { font-size: 11px; padding: 4px 0; } }

/* bao hanh: nut quet serial canh o tim */
.bh-quet { height: 34px; }
.bh-quet svg, #bh-mo-cd svg { fill: none; }

/* mau bien ban khach hang */
.mbb-luoi { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.mbb-luoi .the { margin: 0 0 14px; }
.bieu-mau .mbb-cot input { margin: 0; }
.bieu-mau .mbb-cot input[type=checkbox] { width: 16px; height: 16px; }
.bieu-mau input.mbb-so { width: 70px; text-align: right; margin-left: auto; display: block; }
.mbb-tong { margin-top: 12px; }
.bieu-mau #mbb-tim { margin: 0 0 8px; }
.mbb-khach { max-height: 360px; overflow-y: auto; border: 1px solid var(--vien); border-radius: 6px; padding: 8px 10px; }
.mbb-khach .o-chon { margin-bottom: 6px; font-size: 13px; }
.mbb-chu { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.mbb-chu li { padding: 2px 0; }
.mbb-chu code { background: #f3f4f6; border-radius: 4px; padding: 0 4px; font-size: 12px; }
.mbb-luu { display: flex; justify-content: flex-end; gap: 8px; position: sticky; bottom: 0; padding: 10px 76px 10px 0; background: var(--nen, #f3f4f6); }
@media (max-width: 960px) { .mbb-luoi { grid-template-columns: 1fr; } }
.mbb-cot td { vertical-align: middle; }

/* chuan hoa dia chi */
.dc-chips { margin-bottom: 12px; }
.dc-moi { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
.bieu-mau .dc-moi input, .bieu-mau .dc-moi select { margin: 0; height: 32px; font-size: 13px; }
.dc-bang td { vertical-align: middle; }
.dc-thanh { display: flex; }
@media (max-width: 760px) { .dc-moi { grid-template-columns: 1fr; } }
.dc-bang th:last-child { width: 44%; }

/* tro ly AI (nhu CRM cu: 1 cot chat giua trang, goi y + o hoi ben duoi) */
.ai-khung { max-width: 920px; margin: 0 auto; display: flex; flex-direction: column; }
.ai-dau { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ai-dau .phu { margin: 0; }
.ai-nut-dau { display: flex; gap: 6px; flex-wrap: wrap; }
.ai-xem-nv { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; }
.ai-chua { text-align: center; background: #fff; border: 1px dashed #cbd5e1; border-radius: 10px; padding: 22px 16px; margin-bottom: 12px; }
.ai-chua-bt { font-size: 26px; color: #2563eb; line-height: 1; margin-bottom: 6px; }
.ai-chua p { color: var(--mo); margin: 6px 0 12px; }
.ai-chat { display: flex; flex-direction: column; gap: 8px; height: calc(100vh - 330px); min-height: 360px; overflow-y: auto; padding: 16px; margin-bottom: 10px; }
.ai-tin { max-width: 82%; padding: 9px 13px; border-radius: 10px; line-height: 1.55; overflow-wrap: anywhere; }
.ai-hoi { align-self: flex-end; background: #1f2937; color: #fff; white-space: pre-wrap; border-bottom-right-radius: 3px; }
.ai-dap { align-self: flex-start; background: #fff; border: 1px solid var(--vien); border-bottom-left-radius: 3px; }
.ai-dap p { margin: 0 0 6px; } .ai-dap p:last-child { margin-bottom: 0; }
.ai-dap ul, .ai-dap ol { margin: 4px 0 6px; padding-left: 20px; }
.ai-dap code { background: #f3f4f6; border-radius: 4px; padding: 0 4px; font-size: 12.5px; }
.ai-dap .ai-bang { overflow-x: auto; margin: 6px 0; }
.ai-bang table { border-collapse: collapse; font-size: 12.5px; min-width: 100%; }
.ai-bang th, .ai-bang td { border: 1px solid var(--vien); padding: 4px 8px; text-align: left; white-space: nowrap; }
.ai-bang th { background: #f9fafb; font-weight: 600; color: var(--xam); }
.ai-bang .so { text-align: right; font-variant-numeric: tabular-nums; }
.ai-bang a { color: var(--chinh); }
.ai-loi { align-self: flex-start; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.ai-meta { align-self: flex-start; font-size: 11.5px; color: #9ca3af; margin: -4px 0 2px 4px; }
.ai-cho { color: var(--mo); }
.ai-cham { display: inline-flex; gap: 3px; margin-right: 4px; vertical-align: middle; }
.ai-cham i { width: 5px; height: 5px; border-radius: 50%; background: #9ca3af; animation: ai-nhay 1s infinite ease-in-out; }
.ai-cham i:nth-child(2) { animation-delay: .15s; } .ai-cham i:nth-child(3) { animation-delay: .3s; }
@keyframes ai-nhay { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ai-trong { color: var(--mo); text-align: center; margin: auto; }
.ai-goi-y { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ai-chip { border: 0; background: #eff6ff; color: #1d4ed8; border-radius: 6px; padding: 4px 10px; font: inherit; font-size: 12.5px; cursor: pointer; }
.ai-chip:hover { background: #dbeafe; }
.ai-o { display: flex; gap: 8px; align-items: stretch; }
.ai-o textarea { flex: 1; min-width: 0; resize: vertical; min-height: 54px; max-height: 200px; padding: 8px 12px; border: 1px solid var(--vien-o); border-radius: 8px; font: inherit; }
.ai-o textarea:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.ai-o .ai-gui { height: auto; min-width: 84px; justify-content: center; }
.ai-chan { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12px; margin-top: 6px; }
.ai-lk { border: 0; background: none; padding: 0; color: var(--chinh); font: inherit; cursor: pointer; }
.ai-ds-cuoc { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow-y: auto; }
.ai-ds-cuoc li { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--vien); }
.ai-ds-cuoc li.dang { background: #eff6ff; }
.ai-ds-cuoc a { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 8px 6px; color: var(--chu); }
.ai-ds-cuoc a b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-ds-cuoc .phu { font-size: 12px; }
.ai-chon-nv { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; font-weight: 500; }
.ai-ds-nho { margin: 0; padding-left: 20px; }
.ai-ds-nho li { padding: 4px 0; }
.ai-ds-nho li span { margin-right: 6px; }
.ai-ds-nho .form-dong { display: inline; }
.ai-hop-cd { width: min(620px, calc(100vw - 32px)); }
.ai-chon-ncc { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.ai-chon-ncc legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.bieu-mau .ai-ncc { display: flex; margin: 0; gap: 10px; align-items: flex-start; border: 1px solid var(--vien); border-radius: 8px; padding: 9px 12px; cursor: pointer; font-weight: 400; }
.ai-ncc:has(input:checked) { border-color: #2563eb; background: #eff6ff; }
.bieu-mau .ai-ncc input[type=radio] { width: 16px; height: 16px; margin: 2px 0 0; padding: 0; flex: none; box-shadow: none; accent-color: var(--nut); }
.ai-ncc b { color: var(--chu); }
.ai-ncc span { display: flex; flex-direction: column; gap: 2px; }
.ai-ncc small { color: var(--mo); font-size: 12px; line-height: 1.45; }
.ai-cd-nhom { display: grid; gap: 10px; margin-bottom: 10px; }
.ai-cd-ghi { font-size: 12px; margin: 4px 0 0; }
.ai-thu { margin-top: 10px; padding: 8px 12px; border-radius: 8px; background: #f3f4f6; font-size: 13px; }
.ai-thu-tot { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.ai-thu-loi { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
@media (max-width: 760px) {
    .ai-chat { height: calc(100vh - 360px); min-height: 300px; padding: 10px; }
    .ai-tin { max-width: 92%; }
    .ai-o .ai-gui { min-width: 64px; }
    .ai-chan { margin-right: 76px; }
}

/* xem hoa don nhu CRM cu: tab tren cung, nut, dong ky nhan + nguoi giao, dau bien ban co thong tin cong ty */
.hdx-the { padding: 0; overflow: visible; }
.hdx-tab { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0 2px; padding: 0 12px; border-bottom: 1px solid var(--vien); }
.hdx-tab::-webkit-scrollbar { display: none; }
.hdx-tab button { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 13px 11px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; font: inherit; font-size: 14px; color: #4b5563; cursor: pointer; white-space: nowrap; }
.hdx-tab button:hover { color: var(--chu); }
.hdx-tab button.dang { color: var(--chu); border-bottom-color: var(--chu); font-weight: 500; }
.hdx-tab .hdx-tab-bt { padding: 13px 12px; border-left: 1px solid var(--vien); }
.hdx-tab .hdx-tab-bt + .hdx-tab-bt { border-left: 1px solid var(--vien); }
.hdx-tab .hdx-tab-hh { border-left: 1px solid var(--vien); }
.hdx-tab svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hdx-tab-hh svg { color: #0f766e; }
.hdx-tt-lon .bt-tt { width: 26px; height: 26px; }
.hdx-dong-tren { padding: 14px 20px 0; font-size: 13px; color: var(--xam); display: grid; gap: 6px; }
.hdx-dong-tren .bt { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; color: #6b7280; }
.hdx-ky.da { color: #166534; }
.hdx-ky.da .bt { color: #16a34a; }
.bt-nho { width: 13px; height: 13px; vertical-align: -2px; fill: #2563eb; stroke: #2563eb; }
.hdx-giao-2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hdx-giao-2 .form-nguoi-giao { margin: 0; }
.hdx-giao-2 select { height: 30px; min-width: 150px; padding: 0 28px 0 10px; border: 1px solid var(--vien-o); border-radius: 6px; font: inherit; font-size: 13px; background-color: #fff; }
.hdx-to-bg { padding-top: 14px; }
.hdx-ct { margin-top: 6px; line-height: 1.5; color: var(--chu); }
.hdx-ct b { font-weight: 600; }
.hdx-vat { display: inline-flex; flex-direction: column; gap: 4px; margin-top: 12px; padding: 8px 14px; border-radius: 8px; font-size: 13px; }
.hdx-vat-cham { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; background: currentColor; }
.hdx-vat-cho, .hdx-vat-mot_phan { background: #fff7ed; color: #c2410c; }
.hdx-vat-da_xuat { background: #f0fdf4; color: #15803d; }
.hdx-vat-khong_xuat { background: #f3f4f6; color: #6b7280; }
.hdx-vat b { font-weight: 500; }
.hdx-vat-nut { display: flex; align-items: center; gap: 10px; }
.hdx-vat-nut .nut-nho { height: 24px; padding: 0 8px; font-size: 12px; }
.hdx-vat-nut .form-dong { margin: 0; }
.hdx-ngay { margin-top: 14px; display: grid; gap: 1px; }
.bang-tong .hdx-con.con-no th, .bang-tong .hdx-con.con-no td { color: #dc2626; font-weight: 500; }
.chia-doi.an-trai { grid-template-columns: minmax(0, 1fr); }
.chia-doi.an-trai > .ds-trai { display: none; }
#hdx-to.dang { color: #2563eb; }
#hd-tab > .ct-phan, #hd-tab > [data-ct-phan] { padding: 16px 20px 20px; }
@media (max-width: 760px) {
    .hdx-tab { padding: 0 4px; }
    .hdx-tab button { padding: 12px 9px; font-size: 13.5px; }
    .hdx-dong-tren { padding: 12px 14px 0; }
    #hdx-to { display: none; }
}
[data-hdt-phan="hoa-don"] > p.phu { margin: 0; padding: 0 20px 16px; }
[data-hdt-phan="hoa-don"] > .khoi-bg, [data-hdt-phan="hoa-don"] > .bao { margin-left: 20px; margin-right: 20px; }
[data-hdt-phan="hoa-don"] > .tt-o { margin: 10px 20px; }
[data-hdt-phan="hoa-don"] > .khoi-bg:last-of-type { margin-bottom: 14px; }

/* menu "+" Tao nhanh nhu CRM cu: 3 cot co bieu tuong mau + dong mo ta */
.tt-tao .tha-menu.tn-hop { position: fixed; top: 64px; left: calc(230px + (100vw - 230px) / 2); transform: translateX(-50%); width: min(830px, calc(100vw - 260px)); max-height: calc(100vh - 80px); overflow-y: auto; padding: 18px 22px 20px; border-radius: 14px; box-shadow: 0 20px 40px -12px rgba(15, 23, 42, .25), 0 4px 10px -4px rgba(15, 23, 42, .1); }
.tn-dau { font-size: 16px; font-weight: 600; color: var(--chu); margin-bottom: 12px; }
.tn-luoi { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 18px; }
.tn-nhom { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #6b7280; margin: 0 0 8px 2px; }
.tha-menu a.tn-muc { display: flex; align-items: center; gap: 14px; padding: 8px; border-radius: 10px; white-space: normal; }
.tha-menu a.tn-muc:hover { background: #f3f4f6; }
.tn-bt { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 9px; }
.tn-bt svg { width: 20px; height: 20px; }
.tn-xanh { background: #e0ecff; color: #2563eb; }
.tn-luc { background: #dcfce7; color: #16a34a; }
.tn-cam { background: #ffedd5; color: #ea580c; }
.tn-chu { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.tn-chu b { font-size: 15px; font-weight: 600; color: var(--chu); }
.tn-chu small { font-size: 12.5px; color: #6b7280; margin-top: 2px; }
.tn-cot:empty, .tn-cot:not(:has(.tn-muc)) { display: none; }
.ung-dung.menu-an .tt-tao .tha-menu.tn-hop { left: 50%; width: min(830px, calc(100vw - 32px)); }
@media (max-width: 860px) {
    .tt-tao .tha-menu.tn-hop { left: 50%; width: calc(100vw - 24px); top: 60px; padding: 14px 12px 16px; }
    .tn-luoi { grid-template-columns: 1fr; gap: 2px; }
    .tn-nhom { margin-top: 8px; }
}

/* menu tha xuong kieu CRM cu (Perfex/Tailwind): vien vong mong + bong nhe, chu 14px, dong 32px */
.tha-menu { padding: 5px 0; border: 0; border-radius: 8px; min-width: 160px; box-shadow: 0 0 0 1px rgba(17, 24, 39, .1), 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1); }
.tha-menu a, .muc-menu { padding: 6px 16px; font-size: 14px; line-height: 20px; color: #111827; }
.tha-menu a:hover, .muc-menu:hover { background: #f3f4f6; color: #111827; }
.tha-menu .muc-menu.chu-do, .tha-menu .chu-do { color: #dc2626; }
.hdx-nut .tha-menu, .xem-bg-nut .tha-menu { width: max-content; min-width: 200px; max-width: min(360px, calc(100vw - 32px)); }
.hdx-nut .tha-menu .muc-menu, .xem-bg-nut .tha-menu .muc-menu, .hdx-nut .tha-menu a, .xem-bg-nut .tha-menu a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.muc-menu .bt-mm { width: 15px; height: 15px; flex: none; }
.muc-menu.co-bt { display: flex; align-items: center; gap: 7px; }

/* bang "Thiet lap" thay cho cot menu (nhu CRM cu) */
.menu-tl { padding: 4px 0 24px; }
.menu-tl .tl-dau { display: flex; align-items: center; justify-content: space-between; padding: 14px 13px 10px; }
.menu-tl .tl-dau b { font-size: 15px; font-weight: 600; color: var(--chu); }
.menu-tl .tl-dong { border: 0; background: none; font-size: 22px; line-height: 1; color: #6b7280; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.menu-tl .tl-dong:hover { background: #fff; color: var(--chu); }
.menu-tl a.muc, .menu-tl .cha { padding-top: 7px; padding-bottom: 7px; }
.menu .muc-nut-tl { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: .2rem; padding: 6px 13px; border: 1px solid transparent; border-radius: 6px; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--nhan); cursor: pointer; text-align: left; }
.menu .muc-nut-tl:hover { background: #fff; color: var(--chu); border-color: rgba(15, 23, 42, .15); box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05); }
.menu .muc-nut-tl:hover .bt { color: #2563eb; }

/* Tong ket: hoa don goi y noi bat (khac mau dia chi / ghi chu xam ben tren) */
.tk-goi-y { margin-top: 8px; padding: 7px 8px 7px 12px; background: #eff6ff; border: 1px solid #bfdbfe; border-left: 3px solid #2563eb; border-radius: 6px; flex-wrap: nowrap; }
.tk-goi-y-chu { display: flex; flex-direction: column; gap: 1px; min-width: 0; color: #1e3a8a; }
.tk-goi-y-chu small { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #2563eb; }
.bang .tk-goi-y a.tk-goi-y-so, .tk-goi-y a.tk-goi-y-so { color: #1d4ed8; font-weight: 600; }
.tk-goi-y a.tk-goi-y-so:hover { text-decoration: none; color: #1e40af; }
.tk-goi-y .tk-goi-y-nut { flex: none; background: #2563eb; border-color: #2563eb; color: #fff; }
.tk-goi-y .tk-goi-y-nut:hover { background: #1d4ed8; border-color: #1d4ed8; }
@media (max-width: 760px) { .tk-goi-y { flex-wrap: wrap; } }

/* menu goi y thay datalist cua trinh duyet (tinh/goi_y.js): giong menu tha xuong PAN */
.gy-hop { position: fixed; z-index: 1000; max-width: min(460px, calc(100vw - 16px)); overflow-y: auto; padding: 5px 0; background: #fff; border-radius: 8px; box-shadow: 0 0 0 1px rgba(17, 24, 39, .1), 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1); font-size: 14px; color: #111827; }
.gy-muc { display: flex; flex-direction: column; padding: 6px 14px; line-height: 20px; cursor: pointer; }
.gy-muc:hover, .gy-muc.dang { background: #f3f4f6; }
.gy-muc b { font-weight: 600; color: #1d4ed8; }
.gy-muc small { font-size: 12px; color: #6b7280; line-height: 16px; }

/* ===== cong khach hang (/kh) ===== */
.ck-than { background: #f4f5f7; }
.ck-dau { background: #fff; border-bottom: 1px solid var(--vien); position: sticky; top: 0; z-index: 30; }
.ck-dau-trong { max-width: 1100px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ck-ten { display: flex; align-items: center; gap: 10px; color: var(--chu); min-width: 0; }
.ck-ten span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.ck-ten b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-ten small { font-size: 12px; color: var(--mo); }
.ck-toi { position: relative; }
.ck-toi-nut { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 4px 6px; border-radius: 8px; cursor: pointer; font: inherit; color: var(--chu); text-align: left; }
.ck-toi-nut:hover { background: #f3f4f6; }
.ck-toi-nut .an-dt { display: flex; flex-direction: column; line-height: 1.2; }
.ck-toi-nut small { font-size: 11.5px; color: var(--mo); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck-toi .tha-menu form { margin: 0; }
.ck-nav { max-width: 1100px; margin: 0 auto; padding: 0 10px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.ck-nav::-webkit-scrollbar { display: none; }
.ck-nav a { flex: none; padding: 10px 12px; border-bottom: 2px solid transparent; color: #4b5563; font-size: 14px; font-weight: 500; white-space: nowrap; }
.ck-nav a:hover { color: var(--chu); }
.ck-nav a.dang { color: #1d4ed8; border-bottom-color: #1d4ed8; }
.ck-noi { max-width: 1100px; margin: 0 auto; padding: 20px 16px 32px; }
.ck-chan { text-align: center; color: var(--mo); font-size: 12.5px; padding: 12px 16px 24px; }
.ck-h1 { font-size: 20px; margin: 0 0 14px; }
.ck-h2 { font-size: 15px; margin: 0 0 10px; }
.ck-the { padding: 16px 18px; margin-bottom: 16px; }
.ck-the .bang-vien { margin: 0 -2px; }
.ck-the-dau { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ck-the-dau .ck-h2 { margin: 0; }
.ck-hep { max-width: 520px; }
.ckh-o-so { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.ckh-o-so-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ckh-o { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; background: #fff; border: 1px solid var(--vien); border-radius: 10px; color: var(--chu); }
a.ckh-o:hover { border-color: #93c5fd; box-shadow: 0 2px 6px rgba(37, 99, 235, .08); color: var(--chu); }
.ckh-o span { font-size: 12.5px; color: var(--mo); }
.ckh-o b { font-size: 22px; font-weight: 700; }
.ckh-o small { font-size: 12px; color: var(--mo); }
.ckh-o-do b { color: #dc2626; }
.ckh-o-cam b { color: #d97706; }
.ckh-o b.ckh-o-lk { font-size: 16px; color: #1d4ed8; }
.bang a.ck-lk, a.ck-lk { color: #1d4ed8; font-weight: 600; }
.ck-qua-han td { background: #fff7f7; }
.ck-ghi { margin: 10px 0 0; font-size: 12.5px; }
.ck-trong { color: var(--mo); text-align: center; padding: 18px 0; margin: 0; }
.ck-bh { display: grid; gap: 0; }
.ck-bh-may { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 7px 0; border-top: 1px solid #f1f5f9; font-size: 13.5px; }
.ck-cham { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.ck-key { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.ck-key-ma { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.ck-key-ma code { font-size: 14px; background: #f3f4f6; border-radius: 6px; padding: 5px 10px; letter-spacing: .03em; word-break: break-all; }
.ck-key-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 8px; align-items: end; margin-top: 10px; }
.bieu-mau.ck-key-form label { margin: 0; font-size: 12.5px; }
.bieu-mau.ck-key-form input { height: 32px; margin-top: 3px; }
.ck-key-form .nut { height: 32px; }
.ck-dh-bang td { padding: 4px 6px; vertical-align: middle; }
.bieu-mau .ck-dh-bang input { margin: 0; height: 32px; }
.bieu-mau .ck-dh-bang .ck-dv { width: 90px; }
.bieu-mau .ck-dh-bang .ck-sl { width: 90px; text-align: right; }
.ck-them { margin: 8px 0 14px; }
.ck-ba { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 12px; }
.ck-hai { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ck-hop-le { max-width: 560px; }
.ck-gioi-thieu { margin: 0 0 14px; }
.ck-dk { text-align: center; margin: 14px 0 0; }
.ck-bay { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 860px) {
    .ckh-o-so, .ckh-o-so-3 { grid-template-columns: 1fr 1fr; gap: 8px; }
    .ckh-o { padding: 10px 12px; gap: 1px; }
    .ckh-o b { font-size: 18px; }
    .ckh-o span, .ckh-o small { font-size: 11.5px; line-height: 1.35; }
    .ck-noi { padding: 14px 12px 24px; }
    .ck-the { padding: 12px; }
    .ck-h1 { font-size: 18px; }
    .ck-key { grid-template-columns: 1fr; }
    .ck-key-form { grid-template-columns: 1fr 1fr; }
    .ck-ba, .ck-hai { grid-template-columns: 1fr; gap: 0; }
    .ck-toi-nut .an-dt { display: none; }
}
/* quan tri cong khach */
.ckq-dau { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 14px; }
.ckq-dau p { margin: 6px 0 0; max-width: 760px; }
.ckq-dau code { background: #f3f4f6; padding: 2px 6px; border-radius: 5px; }
.ckq-cd { margin: 0; }
.ckq-moi-hang { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.ckq-moi-hang input { flex: 1; min-width: 240px; height: 32px; padding: 0 10px; border: 1px solid #bbf7d0; border-radius: 6px; font: inherit; font-size: 13px; }
.ckq-duyet { display: flex; gap: 6px; margin: 0; }
.ckq-duyet input { flex: 1; min-width: 200px; height: 32px; padding: 0 10px; border: 1px solid var(--vien-o); border-radius: 6px; font: inherit; font-size: 13px; }

/* ===== email gui di (/cai-dat/email, /email/soan) ===== */
.em-cd .the { margin-bottom: 16px; }
.em-cong { display: grid; grid-template-columns: 110px 1fr; gap: 12px; }
.em-cong label { margin: 0; }
.em-nn { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.em-nn label small { display: block; margin-top: 4px; font-weight: 400; }
.em-luu { display: flex; justify-content: flex-end; gap: 8px; margin: 4px 0 16px; }
.em-thu-hang { display: flex; gap: 8px; align-items: flex-end; max-width: 560px; }
.em-thu-hang label { flex: 1; margin: 0; }
.em-soan { max-width: 860px; }
.em-soan textarea { font-family: inherit; line-height: 1.55; }
.em-link { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 2px; }
.em-nut-mau { background: #2563eb; color: #fff; font-weight: 600; padding: 7px 16px; border-radius: 6px; font-size: 13px; }
.em-link a { word-break: break-all; }
.em-dk { border: 1px solid var(--vien, #e5e7eb); border-radius: 6px; padding: 8px 12px 10px; margin: 12px 0; }
.em-dk legend { font-weight: 600; padding: 0 4px; }
.em-dk .o-chon { display: flex; margin: 6px 0; }
@media (max-width: 760px) {
  .em-nn { grid-template-columns: 1fr; }
  .em-thu-hang { flex-direction: column; align-items: stretch; }
}
.ck-tai a { display: inline-flex; align-items: center; gap: 4px; margin-right: 12px; font-size: 13px; white-space: nowrap; }
.ck-tai a:last-child { margin-right: 0; }
.ck-tai .bt { width: 14px; height: 14px; }

/* ===== lich su sua chung tu ===== */
.ls-dong { padding: 10px 0; border-bottom: 1px solid var(--vien, #e5e7eb); }
.ls-dong:last-child { border-bottom: 0; }
.ls-dau { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.ls-viec { color: #2563eb; font-weight: 600; }
.ls-ct { margin: 6px 0 0 0; padding-left: 18px; color: #374151; font-size: 13px; line-height: 1.55; }
.ls-ct li { word-break: break-word; }

/* ===== cham soc khach hang ===== */
.cs-loc { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; flex-wrap: wrap; }
.cs-loc select { width: auto; min-width: 200px; }
.cs-loc input { width: 260px; }
.cs-ngay { margin: 0 4px; padding: 2px 8px; border-radius: 12px; border: 1px solid var(--vien, #e5e7eb); }
.cs-ngay.dang { background: #2563eb; color: #fff; border-color: #2563eb; }
.cs-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.cs-form .o-rong { grid-column: 1 / -1; }
.cs-kh { grid-column: 1 / -1; margin: 0 0 8px; }
.cs-dau { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cs-nd { margin: 4px 0 2px; }
.cs-xoa { margin-left: auto; }
@media (max-width: 760px) { .cs-form { grid-template-columns: 1fr; } .cs-loc input { width: 100%; } }

/* ===== muc tieu doanh so ===== */
.mt-ds { display: grid; gap: 14px; }
.mt-hang { display: grid; gap: 6px; }
.mt-ten { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.mt-thanh { height: 10px; background: #f3f4f6; border-radius: 6px; overflow: hidden; }
.mt-thanh span { display: block; height: 100%; border-radius: 6px; background: #9ca3af; }
.mt-thanh.mt-luc span { background: #16a34a; }
.mt-thanh.mt-cam span { background: #f59e0b; }
.mt-thanh.mt-do span { background: #dc2626; }
.mt-so { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.mt-luoi td { padding: 4px; }
.mt-o { width: 100%; min-width: 70px; text-align: right; }
.tc-thanh i.tt-luc { background: #16a34a; }

/* ===== hom nay cua toi (/hom-nay) ===== */
.hn-dau { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.hn-chao { font-size: 20px; font-weight: 700; }
.hn-ca { min-height: 44px; display: inline-flex; align-items: center; }
.hn-nhanh { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.hn-o { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px; text-align: center; background: #fff; border: 1px solid var(--vien, #e5e7eb); border-radius: 8px; font-weight: 600; color: #1f2937; }
.hn-o:hover { border-color: #2563eb; color: #2563eb; }
.hn-nhom { padding: 12px 14px; margin-bottom: 12px; }
.hn-nhom-dau { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.hn-nhom-dau h2 { font-size: 15px; margin: 0; }
.hn-nhom-dau .bt { width: 18px; height: 18px; }
.hn-het { margin-left: auto; font-size: 13px; }
.hn-muc { display: block; padding: 10px 0; border-top: 1px solid #f1f5f9; color: #1f2937; }
.hn-muc:first-of-type { border-top: 0; }
.hn-ten { display: block; font-weight: 500; }
.hn-gio { color: #2563eb; }
.hn-phu { display: block; font-size: 13px; color: #6b7280; margin-top: 2px; }
.hn-qua .hn-phu { color: #dc2626; }
.hn-trong { margin: 6px 0 2px; }
.hn-ghi { margin-top: 8px; }
@media (max-width: 760px) { .hn-nhanh { grid-template-columns: 1fr 1fr; } .hn-ca { width: 100%; justify-content: center; } }
.hn-nhom-dau .bt { fill: none; stroke: #2563eb; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.hn-het { white-space: nowrap; }
.mt-luoi table { min-width: 0; }
.mt-luoi th, .mt-luoi td { padding: 4px 3px; }
.mt-o { min-width: 0; padding-left: 4px; padding-right: 4px; font-size: 13px; }
.mt-luoi td:first-child { min-width: 130px; }
.cs-loc > select, .cs-loc > input, .cs-loc > button { margin: 0; }

/* ===== tong ket: thanh chon ky (Ngay/Tuan/Thang + ‹ ngay ›) ===== */
.tk-loc { gap: 10px; }
.tk-doan { display: inline-flex; height: 36px; padding: 3px; background: #f3f4f6; border: 1px solid var(--vien, #e5e7eb); border-radius: 8px; }
.tk-doan button { border: 0; background: none; padding: 0 14px; border-radius: 6px; font: inherit; font-size: 13.5px; color: #4b5563; cursor: pointer; }
.tk-doan button:hover { color: #111827; }
.tk-doan button.dang { background: #fff; color: #111827; font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px rgba(17, 24, 39, .06); }
.tk-dh { display: inline-flex; align-items: stretch; height: 36px; background: #fff; border: 1px solid var(--vien, #e5e7eb); border-radius: 8px; overflow: hidden; }
.tk-dh-mui { display: inline-flex; align-items: center; justify-content: center; width: 36px; color: #4b5563; }
.tk-dh-mui:hover { background: #f3f4f6; color: #111827; }
.tk-dh-mui svg, .tk-dh-giua svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tk-dh-giua { position: relative; display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 0 14px; border-left: 1px solid var(--vien, #e5e7eb); border-right: 1px solid var(--vien, #e5e7eb); font-weight: 600; font-size: 14px; color: #111827; cursor: pointer; white-space: nowrap; }
.tk-dh-giua svg { color: #2563eb; }
.tk-dh-giua:hover { background: #f9fafb; }
.tk-dh-giua input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.tk-hn { height: 36px; display: inline-flex; align-items: center; }
.tk-loc .tuyen-chon { height: 36px; }

/* ===== dan hang hoa tu Excel (form bao gia / hoa don / giam tru) ===== */
#dan-excel { margin-left: 14px; display: inline-flex; align-items: center; gap: 5px; }
#dan-excel .bt { width: 15px; height: 15px; fill: none; stroke: #16a34a; stroke-width: 1.7; }
.hop-dan-excel .hop-hop { width: min(1100px, calc(100vw - 32px)); max-width: none; }
.dx-hd { margin-top: 0; }
.dx-o { width: 100%; font-family: inherit; }
.dx-tuy { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin: 10px 0; }
.dx-ln { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; }
.dx-pt { width: 64px; text-align: right; }
.dx-xem { max-height: 52vh; overflow: auto; }
.dx-bang th { padding: 4px; background: #f9fafb; position: sticky; top: 0; z-index: 1; }
.dx-bang th select { min-width: 120px; font-size: 13px; height: 32px; }
.dx-bang td { font-size: 13px; vertical-align: top; }
.dx-bang td[data-bo] { color: #9ca3af; }
.dx-bang tr.dx-bo td { color: #9ca3af; text-decoration: line-through; }
.dx-dem { margin-right: auto; }
#dong-bg tr.dx-moi td { background: #f0fdf4; transition: background 1s; }
.thue-md-hang { display: flex; gap: 8px; align-items: center; max-width: 360px; } .thue-md-hang select { flex: 1; margin: 0; } .thue-md-hang .nut { margin: 0; }

/* bao cao: hang the so lieu tong (chia deu, khong de o le) */
.bcs-so { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 12px; }
.bcs-o { background: #fff; border: 1px solid var(--vien, #e5e7eb); border-radius: 8px; padding: 10px 14px; min-width: 0; }
.bcs-o span { display: block; font-size: 12.5px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bcs-o b { display: block; margin-top: 2px; font-size: 17px; font-weight: 700; color: #111827; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bcs-o.bcs-do b { color: #dc2626; }
@media (max-width: 600px) { .bcs-so { grid-template-columns: 1fr 1fr; } .bcs-o b { font-size: 15px; } }

.hop-email .hop-hop { width: min(720px, calc(100vw - 32px)); } .hop-email .he-ghi { margin: -6px 0 8px; } .hop-email .em-link { margin: 4px 0 8px; }
.dn-kh { margin-top: 16px; padding: 12px 14px; background: #f8fafc; border: 1px solid var(--vien, #e5e7eb); border-radius: 8px; font-size: 13px; line-height: 1.55; color: #4b5563; }
.ck-mst { display: flex; gap: 8px; }
.ck-mst input { flex: 1; margin: 0; }
.ck-mst .nut { margin: 0; white-space: nowrap; }
.ck-mst-kq { margin: -6px 0 10px; font-size: 13px; }
.dn-hoac { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; color: #9ca3af; font-size: 13px; }
.dn-hoac::before, .dn-hoac::after { content: ""; flex: 1; height: 1px; background: var(--vien, #e5e7eb); }
.dn-dk { display: flex; justify-content: center; }

/* ===== cai dat ban do ===== */
.bd-cd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; align-items: start; }
.bd-cd-nut { display: flex; gap: 8px; margin-top: 4px; }
.bd-xem { height: 260px; border: 1px solid var(--vien, #e5e7eb); border-radius: 8px; overflow: hidden; background: #f3f4f6; }
.bd-bao { background: rgba(255, 255, 255, .95); padding: 6px 10px; border-radius: 6px; font-size: 12.5px; max-width: 360px; color: #92400e; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
@media (max-width: 760px) { .bd-cd { grid-template-columns: 1fr; } }

/* ===== sao luu ra ngoai ===== */
.sl-h3 { margin: 22px 0 4px; font-size: 15px; }
.sl-mk { margin-bottom: 10px; }
.sl-mk input { margin: 0; }
.sl-may { border: 1px solid var(--vien, #e5e7eb); border-radius: 8px; padding: 10px 14px; margin: 10px 0 14px; }
.sl-may summary { cursor: pointer; font-weight: 600; }
.sl-may[open] summary { margin-bottom: 8px; }
.sl-nut { display: flex; gap: 8px; flex-wrap: wrap; }

/* ra soat 19/11: cho tran mep tren dien thoai */
@media (max-width: 760px) {
  .bc-ngay { flex-wrap: wrap; width: 100%; }
  .bc-ngay input { flex: 1 1 110px; min-width: 0; }
  .cn-nut { flex-wrap: wrap; }
  .bb-dau > a.nut:first-child { max-width: 100%; height: auto; min-height: 32px; padding-top: 5px; padding-bottom: 5px; white-space: normal; text-align: left; line-height: 1.35; }
  .kth-link { min-width: 0; flex: 1 1 100%; }
  .kth-link input { min-width: 0; }
  .bieu-mau .dot-loc select#dot-kh { width: 100%; }
  .dot-chan { flex-wrap: wrap; }
}

/* ===== chat noi bo (/cai-dat/chat, hop Gui vao chat) ===== */
.ch-loai { display: grid; gap: 6px; margin: 4px 0 12px; }
.ch-loai .o-chon { margin: 0; }
.ch-hang { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; max-width: 720px; }
.ch-hang label { margin: 0; }
.ch-hang small { display: block; margin-top: 4px; font-weight: 400; }
.ch-ghep select { width: 100%; max-width: 340px; }
.ch-thu { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ch-nd { white-space: pre-line; max-width: 520px; }
.hop-chat .hop-hop { width: min(520px, calc(100vw - 32px)); }
.hop-chat .hc-kq { margin: 8px 0 0; }
@media (max-width: 700px) { .ch-hang { grid-template-columns: minmax(0, 1fr); } }

/* ===== tong quan bam gio (/bam-gio) ===== */
.bgio-doan { flex-wrap: wrap; height: auto; min-height: 36px; }
.bgio-doan button { height: 28px; }
.bgio-khoang { display: inline-flex; align-items: center; gap: 6px; }
.bgio-khoang input { width: 124px; height: 36px; padding: 0 10px; border: 1px solid var(--vien, #e5e7eb); border-radius: 8px; font: inherit; font-size: 13.5px; background: #fff; color: var(--chu); }
.bgio-so { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 700px) { .bgio-so { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bgio-doan { width: 100%; } .bgio-doan button { flex: 1 1 30%; padding: 0 6px; } }
.dg-ht { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.dg-ht-o { border: 1px solid var(--vien, #e5e7eb); border-radius: 8px; padding: 12px 14px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 14px; }
.dg-ht-dau { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.dg-ht-so { display: flex; flex-direction: column; }
.dg-ht-so span { font-size: 12px; color: var(--mo); }
.dg-ht-so b { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dg-ht-so small { font-size: 12px; color: var(--mo); }
.dg-ht-o .phu { grid-column: 1 / -1; margin: 0; }
@media (max-width: 760px) { .dg-ht { grid-template-columns: minmax(0, 1fr); } }

/* ===== dong gop cua toi ===== */
.dgt-dau { display: flex; flex-direction: column; gap: 8px; }
.dgt-dau > div > b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; margin-top: 4px; }
.dgt-dau .phu { margin: 0; }
.dgt-dg { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dgt-dg .nhan-tt { font-size: 14px; padding: 3px 12px; }
.dgt-moc { margin: 0; font-size: 15px; }
.dgt-hai { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
.dgt-the .kt-h { margin-bottom: 8px; }
.dgt-dong { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f3f4f6; font-size: 14px; }
.dgt-dong b { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dgt-cong { border-bottom: 0; border-top: 1px solid var(--vien, #e5e7eb); margin-top: 2px; }
.dgt-cong span, .dgt-cong b { font-weight: 700; }
.dgt-xu { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; align-items: end; height: 170px; margin: 8px 0 6px; }
.dgt-cot { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.dgt-cot span { font-size: 12px; color: var(--mo); }
.dgt-cap { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.dgt-cap i { display: block; width: 18px; border-radius: 3px 3px 0 0; min-height: 2px; }
.dgt-mv { background: #16a34a; }
.dgt-chi { background: #f59e0b; }
.dgt-chu { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 10px; vertical-align: -1px; }
@media (max-width: 760px) { .dgt-hai { grid-template-columns: minmax(0, 1fr); } .dgt-xu { gap: 6px; } .dgt-cap i { width: 12px; } }
.ch-bq { margin: 0; white-space: nowrap; font-weight: 400; }
