:root { color-scheme: light; /* 17/11/2026: chỉ giao diện sáng */
  --bg: #f4f6f8; --card: #fff; --text: #1f2933; --muted: #6b7280; --line: #e5e7eb;
  --primary: #0f766e; --primary-soft: #ccfbf1; --danger: #dc2626; --warn: #d97706; --ok: #16a34a;
  --rec: #dc2626; --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 "Segoe UI", system-ui, -apple-system, sans-serif; }
a { color: var(--primary); }
button, input, select, textarea { font: inherit; }
input, select, textarea { border: 1px solid #cbd5e1; border-radius: 8px; padding: 7px 10px; background: #fff; color: var(--text); min-width: 0; }
@media (max-width: 700px) { input, select, textarea { font-size: 16px; } }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.btn { border: 1px solid #cbd5e1; background: #fff; color: var(--text); border-radius: 8px; padding: 7px 14px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #f1f5f9; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { color: var(--danger); border-color: #fecaca; }
.btn.sm { padding: 3px 9px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }

/* Khung trang: thanh bên trái + thanh trên cùng, nội dung rộng hết màn hình */
.brand { font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand img { width: 26px; height: 26px; }
.layout { display: flex; min-height: 100vh; }
.side { width: 232px; flex: 0 0 232px; background: #0b3b37; color: #d7ebe8; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 30; transition: width .15s, flex-basis .15s; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px; font-weight: 800; font-size: 20px; color: #fff; }
.side-brand img { width: 30px; height: 30px; flex: 0 0 30px; }
.side-toggle { margin-left: auto; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #cfe; border-radius: 6px; width: 26px; height: 26px; cursor: pointer; font-size: 14px; line-height: 1; }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 8px; flex: 1; overflow-y: auto; }
.side-nav a { display: flex; align-items: center; gap: 12px; color: #cfe3e0; text-decoration: none; padding: 10px 12px; border-radius: 8px; white-space: nowrap; font-size: 15px; }
.side-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-nav a.on { background: rgba(255,255,255,.16); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 #5eead4; }
.side .ic { width: 22px; text-align: center; flex: 0 0 22px; font-size: 17px; }
.side-foot { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; color: #a7c7c2; white-space: nowrap; overflow: hidden; }
.side-foot .tx { overflow: hidden; text-overflow: ellipsis; }
.layout.side-min .side { width: 64px; flex-basis: 64px; }
.layout.side-min .side .tx { display: none; }
.layout.side-min .side-brand { flex-direction: column; gap: 8px; padding: 12px 0; }
.layout.side-min .side-toggle { margin: 0; transform: rotate(180deg); }
.layout.side-min .side-nav a { justify-content: center; padding: 10px 0; }
.layout.side-min .side-foot { justify-content: center; padding: 12px 0; }
.side-mask { display: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 22px; background: rgba(244,246,248,.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 20px; margin: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hamb { display: none; border: 1px solid #cbd5e1; background: #fff; border-radius: 8px; width: 38px; height: 38px; font-size: 18px; cursor: pointer; }
.top-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #cbd5e1; background: #fff; border-radius: 99px; padding: 6px 14px; color: var(--text); text-decoration: none; font-weight: 600; white-space: nowrap; }
.top-btn:hover { border-color: var(--primary); }
.top-btn .q { width: 20px; height: 20px; border-radius: 50%; background: #e11d48; color: #fff; font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.upill-wrap { position: relative; }
.upill { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--primary); background: #fff; border-radius: 99px; padding: 4px 14px 4px 4px; cursor: pointer; font-weight: 600; color: var(--text); }
.av { width: 30px; height: 30px; border-radius: 50%; background: var(--primary-soft); color: #115e59; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 30px; }
.av.lg { width: 46px; height: 46px; flex-basis: 46px; font-size: 20px; }
.umenu { position: absolute; right: 0; top: calc(100% + 8px); width: 300px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(15,23,42,.16); padding: 6px; z-index: 40; }
.umenu-head { display: flex; gap: 12px; align-items: center; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.umenu-head b { font-size: 16px; }
.umenu button, .umenu .umenu-a { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--text); }
.umenu button:hover, .umenu .umenu-a:hover { background: #f1f5f9; }
.page { padding: 18px 22px; width: 100%; }
@media (max-width: 900px) {
  .side { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; width: 250px; }
  .layout.side-min .side { width: 250px; } .layout.side-min .side .tx { display: inline; }
  .layout.side-open .side { transform: none; }
  .layout.side-open .side-mask { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 25; }
  .side-toggle { display: none; }
  .hamb { display: inline-block; }
  .topbar { padding: 8px 12px; } .topbar h1 { font-size: 17px; }
  .top-btn .tx, .upill .tx { display: none; } .top-btn { padding: 6px; } .upill { padding: 3px; }
  .page { padding: 12px; }
}
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.card h3 { margin: 0 0 12px; font-size: 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; background: #f1f5f9; }
.pill.ok { background: #dcfce7; color: #166534; } .pill.warn { background: #fef3c7; color: #92400e; } .pill.bad { background: #fee2e2; color: #991b1b; } .pill.info { background: #e0f2fe; color: #075985; }
.pill.ret { background: #ede9fe; color: #5b21b6; }

/* Bảng */
/* Bảng dài: khung tự cuộn trong chiều cao màn hình, dòng tiêu đề đứng yên */
.tbl-wrap { overflow: auto; max-height: calc(100vh - 150px); }
.tbl thead th { position: sticky; top: 0; z-index: 2; box-shadow: inset 0 -1px 0 var(--line); }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.tbl th { font-size: 12px; text-transform: uppercase; color: var(--muted); background: #f8fafc; white-space: nowrap; }
.tbl td.num, .tbl th.num { text-align: right; white-space: nowrap; }
.tbl tr:hover td { background: #f8fafc; }
.code { font-family: Consolas, monospace; font-weight: 600; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar .search { flex: 1; min-width: 220px; }
/* Ô tìm có nút ✕ xoá nhanh */
.sbox { position: relative; display: flex; flex: 1; min-width: 220px; }
.sbox.half { flex: 0 1 50%; }
.sbox.rrq { flex: 0 1 380px; min-width: 260px; }
.sbox > input { flex: 1; width: 100%; min-width: 0; padding-right: 34px; }
.sbox .sx { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: none; width: 24px; height: 24px; border: 0; border-radius: 50%; background: var(--line, #e5e7eb); color: var(--muted, #555); font-size: 12px; line-height: 24px; padding: 0; cursor: pointer; }
.sbox .sx:hover { background: #d1d5db; color: #111; }
.sbox.has .sx { display: block; }
@media (max-width: 700px) { .sbox.half { flex: 1 1 100%; } }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 10px; }

/* Đăng nhập */
.login { max-width: 380px; margin: 8vh auto; }
.login .card { padding: 26px; }
.login h2 { margin: 0 0 4px; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field label { font-size: 13px; color: var(--muted); }
.err { color: var(--danger); min-height: 20px; font-size: 13px; }

/* Màn hình quay */
.rec { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .rec { grid-template-columns: 1fr; } }
.stage { background: #000; border-radius: var(--radius); overflow: hidden; position: relative; }
.stage canvas { width: 100%; display: block; aspect-ratio: 16/9; max-height: calc(100vh - 150px); object-fit: contain; }
/* Chế độ điện thoại: 1 cột, nút to dễ bấm, khung video dọc */
.rec-phone { max-width: 560px; margin: 0 auto; }
.rec-phone .status { margin-bottom: 10px; padding: 12px 14px; } .rec-phone .status .big { font-size: 22px; }
.stage.portrait { display: flex; justify-content: center; }
/* Điện thoại: khung video 4:3 ngang (hình quay trái, ảnh bill phải) — 29/09 */
.stage.portrait canvas { aspect-ratio: 4/3; width: 100%; height: auto; max-height: 60vh; }
.pctl { margin: 12px 0; }
.pbtn { width: 100%; font-size: 18px; font-weight: 700; padding: 14px 16px; border-radius: 12px; }
.pbtn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.pctl .field input { font-size: 18px; font-family: Consolas, monospace; font-weight: 600; letter-spacing: .5px; }
.mode button:disabled { opacity: .5; cursor: default; }
.status { border-radius: var(--radius); padding: 16px; color: #fff; background: #334155; margin-bottom: 12px; }
.status.idle { background: #0f766e; }
.status.recording { background: var(--rec); }
.status.bad { background: #7f1d1d; }
.status .big { font-size: 26px; font-weight: 700; line-height: 1.2; word-break: break-all; }
.status .sub { opacity: .9; margin-top: 4px; }
.mode { display: flex; border: 1px solid #cbd5e1; border-radius: 8px; overflow: hidden; margin-bottom: 10px; }
.mode button { flex: 1; border: 0; background: #fff; padding: 8px; cursor: pointer; }
.mode button.on { background: var(--primary); color: #fff; font-weight: 600; }
.mode button.on.ret { background: #6d28d9; }
.mode button { font-size: 13px; }
.queue { max-height: 360px; overflow-y: auto; }
.qi { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.bar { height: 4px; background: #e2e8f0; border-radius: 2px; overflow: hidden; margin-top: 3px; }
.bar i { display: block; height: 100%; background: var(--primary); }
.banner { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }
.banner.warn { background: #fef3c7; color: #78350f; border: 1px solid #fde68a; }
.banner.bad { background: #fee2e2; color: #7f1d1d; border: 1px solid #fecaca; }
.kbd { font-family: Consolas, monospace; background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 4px; padding: 0 5px; }

/* Hộp thoại */
.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.55); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal { background: #fff; border-radius: 12px; width: min(760px, 100%); max-height: 92vh; overflow: hidden; display: flex; flex-direction: column; }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 600; }
.modal header, .modal footer { flex: none; }
.modal header > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 8px; }
.modal .body { padding: 16px; overflow: auto; flex: 1 1 auto; min-height: 0; }
.modal footer.auto { display: none; }
.modal footer.auto.show { display: flex; }
.modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.modal video { width: 100%; background: #000; border-radius: 8px; max-height: 60vh; }
.x { border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--muted); }

#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 99; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
#toast div { background: #1f2933; color: #fff; padding: 9px 16px; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.2); }
#toast div.bad { background: var(--danger); }

/* Biểu đồ cột đơn giản */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: 16px; }
.bars div { flex: 1; background: var(--primary); border-radius: 3px 3px 0 0; position: relative; min-width: 6px; }
.bars div span { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--muted); white-space: nowrap; }
.bars-x { display: flex; gap: 3px; font-size: 10px; color: var(--muted); }
.bars-x span { flex: 1; text-align: center; min-width: 6px; overflow: hidden; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.stat > b { display: block; font-size: 22px; }
/* chữ đậm trong dòng chú thích giữ cỡ chữ nhỏ (không phình như số chính) */
.stat span b { display: inline; font-size: inherit; }
/* Tên ô (dòng đầu) in đậm, phân biệt với chú thích bên dưới */
.stat > span:first-child { font-weight: 700; color: #1f2937; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid #cbd5e1; border-radius: 99px; padding: 2px 10px; font-size: 13px; background: #fff; cursor: pointer; }
.chip.off { opacity: .5; text-decoration: line-through; }

/* Nhóm trên thanh bên */
.side-group { padding: 14px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #7fa7a1; }
.side-group:first-child { padding-top: 4px; }
.layout.side-min .side-group { padding: 8px 0 2px; border-top: 1px solid rgba(255,255,255,.08); }
.side-nav a { padding: 8px 12px; font-size: 14.5px; }

/* Bảng điều khiển */
.dash-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dash-2 > .card { margin-bottom: 14px; }
@media (max-width: 1000px) { .dash-2 { grid-template-columns: 1fr; } }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat.warn { border-color: #fcd34d; background: #fffbeb; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.st-item { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.st-item .dot { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; flex: 0 0 10px; }
.st-item.on { border-color: #99f6e4; background: #f0fdfa; } .st-item.on .dot { background: #16a34a; box-shadow: 0 0 0 3px #dcfce7; }

/* Biểu đồ cột chồng theo ngày */
.chart .legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.chart .legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.sbars { display: flex; align-items: flex-end; gap: 3px; height: 180px; padding-top: 18px; border-bottom: 1px solid var(--line); }
.scol { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; min-width: 4px; cursor: default; }
.scol:hover { background: #f1f5f9; }
.sstack { display: flex; flex-direction: column-reverse; gap: 2px; min-height: 0; }
.sstack i { display: block; min-height: 2px; }
.sstack i:last-child { border-radius: 4px 4px 0 0; }
.scol .peak { position: absolute; top: -2px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.sx { display: flex; gap: 3px; font-size: 10.5px; color: var(--muted); margin: 4px 0 8px; }
.sx span { flex: 1; min-width: 4px; text-align: center; white-space: nowrap; overflow: visible; }
#tip { position: fixed; z-index: 100; background: #1f2933; color: #fff; font-size: 12.5px; padding: 7px 10px; border-radius: 8px; white-space: pre-line; pointer-events: none; box-shadow: 0 6px 18px rgba(0,0,0,.2); max-width: 260px; }
.chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Thanh "Có phiên bản mới": nhỏ, nằm giữa phía trên, không che nút nào */
#upd-bar { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 10px; background: #fef3c7; color: #78350f; border: 1px solid #fcd34d; border-radius: 99px; padding: 6px 8px 6px 16px; box-shadow: 0 6px 18px rgba(0,0,0,.12); font-size: 14px; font-weight: 600; white-space: nowrap; }
#upd-bar .x { font-size: 18px; color: #92400e; padding: 0 6px; }

/* Trang Kho & bàn: mỗi kho 1 thẻ, bàn là các ô đều nhau */
.sec-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-head h3 { margin: 0; font-size: 17px; } .sec-head p { margin: 3px 0 0; }
.wh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
@media (max-width: 600px) { .wh-grid { grid-template-columns: 1fr; } }
.wh-card { margin: 0; }
.wh-card.off { opacity: .6; }
.wh-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.wh-head b { font-size: 16px; }
.wh-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--primary-soft); display: flex; align-items: center; justify-content: center; font-size: 20px; flex: 0 0 40px; }
.icon-btn { border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 34px; height: 34px; cursor: pointer; font-size: 15px; flex: 0 0 34px; }
.icon-btn:hover { background: #f1f5f9; border-color: #cbd5e1; }
.st-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.st-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; border: 1px solid var(--line); background: #f8fafc; border-radius: 10px; padding: 10px 12px 10px 28px; cursor: pointer; min-height: 58px; font: inherit; color: var(--text); }
.st-tile:hover { border-color: var(--primary); background: #fff; }
.st-tile b { font-size: 14px; } .st-tile small { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.st-tile .dot { position: absolute; left: 11px; top: 15px; width: 9px; height: 9px; border-radius: 50%; background: #cbd5e1; }
.st-tile.on { background: #f0fdfa; border-color: #99f6e4; } .st-tile.on .dot { background: #16a34a; box-shadow: 0 0 0 3px #dcfce7; }
.st-tile.off { opacity: .55; } .st-tile.off b { text-decoration: line-through; }
.st-tile.add { align-items: center; justify-content: center; padding: 10px; border-style: dashed; background: #fff; color: var(--primary); }
.side-nav { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }

/* Bảng phân quyền */
.perm-tbl th.rc, .perm-tbl td.rc { text-align: center; min-width: 118px; }
.perm-tbl th.rc { text-transform: none; vertical-align: top; }
.perm-tbl .rname { font-size: 14px; font-weight: 700; color: var(--text); }
.perm-tbl .ricons { display: flex; gap: 4px; justify-content: center; margin-top: 6px; }
.perm-tbl .icon-btn.sm { width: 28px; height: 28px; flex-basis: 28px; font-size: 13px; }
.perm-tbl tr.pgroup td { background: #f1f5f9; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 10px; }
.perm-tbl input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
.perm-tbl input[type=checkbox]:disabled { cursor: not-allowed; opacity: .55; }
.no-export #xls, .no-export #csv, .no-export #xls-wh, .no-export #xls-cl { display: none; }

/* Thanh "Có thay đổi chưa lưu": dính dưới cùng vùng nội dung, không che nút trong bảng */
.save-bar { position: sticky; bottom: 12px; z-index: 15; display: flex; align-items: center; gap: 10px; justify-content: flex-end; margin-top: 12px; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 12px; padding: 10px 14px; box-shadow: 0 8px 24px rgba(15,23,42,.14); }
.save-bar span { margin-right: auto; color: #78350f; }
.perm-tbl td.changed { background: #fef3c7 !important; }
.save-bar[hidden] { display: none; }
/* 13/11/2026: chừa chỗ bên phải cho nút nổi "Trợ lý AI" (#troly, góc dưới phải) — trước đây nút này che mất "Lưu thay đổi" khi thanh lưu dán ở đáy màn hình */
.save-bar { padding-right: 190px; }
@media (max-width: 700px) { .save-bar { padding-right: 84px; flex-wrap: wrap; } }

/* Nhận diện Packvi: logo chữ P ống kính + chữ Packvi (Baloo 2) + slogan */
.wordmark { font-family: "Baloo 2", "Segoe UI", system-ui, sans-serif; font-weight: 800; letter-spacing: -.01em; line-height: 1; }
.wordmark span { color: #14b8a6; }
.slogan { font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.side-brand { align-items: center; }
.side-brand img { width: 36px; height: 36px; flex: 0 0 36px; }
.brand-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.brand-txt .wordmark { font-size: 25px; color: #fff; }
.brand-txt .wordmark span { color: #5eead4; }
.brand-txt .slogan { color: #9fd6cf; font-size: 11px; white-space: nowrap; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.login-brand img { width: 52px; height: 52px; flex: 0 0 52px; }
.login-brand .wordmark { font-size: 32px; color: #0b3b37; }
.login-brand .wordmark span { color: #0f766e; }
.login-brand .slogan { color: var(--muted); margin-top: 3px; }

/* Cảnh báo chế độ Riêng tư: nằm dưới cùng, không che nút */
#mem-bar { position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); z-index: 55; background: #fef3c7; color: #78350f; border: 1px solid #fcd34d; border-radius: 10px; padding: 8px 12px; font-size: 13px; box-shadow: 0 6px 18px rgba(0,0,0,.12); }

/* Chặn quay trùng đơn */
.status.blocked { background: #7f1d1d; box-shadow: 0 0 0 4px #fecaca; }
.status.blocked .big { text-decoration: line-through; text-decoration-thickness: 2px; }

/* Bấm cả dòng để mở video */
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover td { background: #eef7f5; }
.novideo { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 24px; text-align: center; }
.novideo p { margin: 8px 0 0; }
/* Cột theo ngày: mảnh, căn giữa ô ngày */
.scol { align-items: center; }
.sstack { width: 100%; max-width: 24px; }
.scol .peak { top: auto; }

/* Gói dịch vụ */
.lic-bar { margin: 12px 22px 0; padding: 10px 14px; border-radius: 10px; background: #fffbeb; border: 1px solid #fcd34d; color: #78350f; font-size: 14px; }
.lic-bar a { font-weight: 700; margin-left: 6px; }
.lic-card { border-color: #99f6e4; background: linear-gradient(#fff, #f5fffd); }
/* Hộp chọn lý do quay lại đơn đã đóng: nút to bấm nhanh */
.dup-pick { display: grid; gap: 8px; }
.dup-pick .dup-opt { width: 100%; justify-content: flex-start; text-align: left; font-size: 16px; padding: 12px 14px; font-weight: 600; }
.dup-pick .dup-opt .kbd { margin-right: 6px; }
.status .camwarn { display: inline-block; margin-top: 4px; background: #fff; color: #b91c1c; border-radius: 6px; padding: 2px 8px; animation: camblink 1s step-end infinite; }
@keyframes camblink { 50% { opacity: .45; } }
/* Quét mã để tìm (Tra cứu / Khiếu nại) */
.scan-btn { white-space: nowrap; }
.scan-view { position: relative; background: #000; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; max-height: 60vh; margin: 0 auto; }
.scan-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; left: 10%; right: 10%; top: 30%; bottom: 30%; border: 3px solid #facc15; border-radius: 8px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); pointer-events: none; }
/* Điện thoại: bảng nhiều cột → mỗi dòng một thẻ, ô có nhãn tên cột (khỏi kéo ngang không biết đang xem dòng nào) */
@media (max-width: 700px) {
  .tbl-wrap:has(> .tbl.cardify) { max-height: none; overflow: visible; }
  .tbl.cardify thead { display: none; }
  .tbl.cardify, .tbl.cardify tbody, .tbl.cardify tr, .tbl.cardify td { display: block; width: 100%; }
  .tbl.cardify tr { position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; background: #fff; }
  .tbl.cardify tr:hover td { background: transparent; }
  .tbl.cardify td { border: 0; padding: 2px 0; text-align: left !important; white-space: normal; }
  .tbl.cardify td[data-l]:not([data-l=""])::before { content: attr(data-l) ": "; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .02em; }
  .tbl.cardify td:first-child.num { position: absolute; top: 10px; right: 12px; width: auto; font-size: 12px; }
  .tbl.cardify td:first-child.num::before { content: "#"; text-transform: none; }
  .tbl.cardify td:has(.code), .tbl.cardify td.ttl { font-size: 16px; padding-right: 36px; }
  .tbl.cardify td:has(.code)::before, .tbl.cardify td.ttl::before { content: none !important; }
  /* Thẻ số liệu (Năng suất…): các ô số xếp 2 cột cho gọn */
  .tbl.cardify tr:has(td.ttl) { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
  .tbl.cardify tr:has(td.ttl) td.ttl { grid-column: 1 / -1; }
  .tbl.cardify td:last-child:has(.btn) { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }
  .tbl.cardify td:last-child:has(.btn)::before { content: none !important; }
}
/* Logo trên thanh bên = nút về trang chính */
.brand-home { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; flex: 1; cursor: pointer; }
.brand-home:hover .wordmark { opacity: .85; }
.layout.side-min .brand-home { flex-direction: column; gap: 8px; flex: none; }
button.pill.dup-btn { border: 0; cursor: pointer; font: inherit; }
button.pill.dup-btn:hover { filter: brightness(.93); text-decoration: underline; }
a.btn { text-decoration: none; }
/* Hiệu suất bàn: thanh ngang + bảng nhiệt theo ngày */
.stat.bad { border-color: #fecaca; background: #fef2f2; }
.stat.bad > b, .stat.bad span b { color: #b91c1c; }
.hbars { display: grid; gap: 6px; margin-bottom: 8px; }
.hbar { display: grid; grid-template-columns: minmax(140px, 260px) 1fr 90px; align-items: center; gap: 10px; font-size: 13px; }
.hbar .hb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .hb-t { background: var(--line); border-radius: 4px; height: 14px; overflow: hidden; }
.hbar .hb-t span { display: block; height: 100%; background: #0d9488; border-radius: 0 4px 4px 0; min-width: 2px; }
.hbar .hb-v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.hbar.idle .hb-l, .hbar.idle .hb-v { color: #b91c1c; }
.hbar.idle .hb-t span { width: 0 !important; min-width: 0; }
.heat-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table.heat { border-collapse: separate; border-spacing: 2px; font-size: 12px; min-width: 100%; }
table.heat th { font-weight: 600; color: var(--muted); padding: 4px 2px; white-space: nowrap; font-size: 11px; }
table.heat td { text-align: center; min-width: 30px; height: 26px; border-radius: 4px; background: #f8fafc; font-variant-numeric: tabular-nums; }
table.heat .hl { position: sticky; left: 0; background: var(--card, #fff); text-align: left; white-space: nowrap; padding: 0 10px 0 6px; font-weight: 600; z-index: 1; }
table.heat td.tot { background: transparent; font-weight: 700; padding: 0 6px; }
.heat-legend { display: flex; align-items: center; gap: 3px; margin: 6px 0 14px; }
.heat-legend i { display: inline-block; width: 22px; height: 12px; border-radius: 3px; }
@media (max-width: 700px) { .hbar { grid-template-columns: 1fr 70px; } .hbar .hb-l { grid-column: 1 / -1; } }

/* Kết nối sàn / đơn sàn */
.banner.ok { background: #dcfce7; color: #14532d; border: 1px solid #bbf7d0; }
.banner.info { background: #e0f2fe; color: #0c4a6e; border: 1px solid #bae6fd; }
.banner a { color: inherit; font-weight: 700; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.grid2 > * { min-width: 0; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
.ord-info { margin: 8px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--soft, #f1f5f9); font-size: 13px; }
.ord-info ul { margin: 4px 0 0; padding-left: 18px; }
.plat { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.plogo { width: 16px; height: 16px; flex: none; }
/* Ô số liệu bấm được để lọc danh sách (Chờ đóng hàng) */
.stat-btn { font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%; transition: border-color .15s, box-shadow .15s; }
.stat-btn:hover { border-color: var(--primary); }
.stat-btn.on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary) inset; }
.stat-btn.bad.on { border-color: #dc2626; box-shadow: 0 0 0 2px #dc2626 inset; }
/* Chi tiết đơn sàn */
.od-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 16px; }
.kv { width: 100%; border-collapse: collapse; font-size: 14px; }
.kv th { text-align: left; font-weight: 500; color: var(--muted); padding: 4px 12px 4px 0; width: 42%; vertical-align: top; }
.kv td { padding: 4px 0; overflow-wrap: anywhere; }
.od-pay { max-width: 560px; }
.od-item { display: flex; gap: 10px; align-items: flex-start; }
.od-item img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); flex: none; }
/* Khoảng ngày đang lọc ghi cạnh tiêu đề bảng (Phân tích đơn sàn) */
h3.h3-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 34px 0 10px; }
#out > h3.h3-row:first-of-type { margin-top: 22px; }
#out .grid2 { margin-top: 6px; }
.h3-per { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--primary); background: var(--primary-soft, #ccfbf1); border-radius: 99px; padding: 2px 10px; white-space: nowrap; }
/* Soát đơn lúc quay (Sản phẩm trong đơn) */
.ordp { padding: 12px; border-left: 5px solid var(--line); }
.ordp.ok { border-left-color: #16a34a; } .ordp.bad { border-left-color: #dc2626; background: #fef2f2; } .ordp.warn { border-left-color: #d97706; background: #fffbeb; }
.ordp-v { font-weight: 800; font-size: 16px; margin-bottom: 6px; }
.ordp.ok .ordp-v { color: #15803d; } .ordp.bad .ordp-v { color: #b91c1c; } .ordp.warn .ordp-v { color: #b45309; }
.ordp-h { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-bottom: 8px; }
.ordp-list { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; }
.ordp-it { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.ordp-it img, .ordp-noimg { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; cursor: zoom-in; display: flex; align-items: center; justify-content: center; background: #f1f5f9; font-size: 26px; }
.ordp-n { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ordp-var { font-size: 13px; font-weight: 600; margin-top: 2px; }
.ordp-sku { font-family: Consolas, monospace; font-size: 13px; color: var(--muted); margin-top: 2px; }
.ordp-q { font-size: 26px; font-weight: 800; color: #ea580c; padding: 0 6px; }
.ordp-f { margin-top: 8px; font-size: 13px; color: var(--muted); text-align: right; }
/* 28/10/2026: bỏ nền tối cho thẻ báo đỏ / vàng khi máy để chế độ tối — chữ trong thẻ vẫn màu tối nên NV kho không đọc được. Thẻ báo luôn nền sáng, chữ đậm */
/* Quét từng sản phẩm */
.ordp.done { border-left-color: #16a34a; background: #f0fdf4; }
.ordp-it.part { border-color: #f59e0b; } .ordp-it.ok { border-color: #16a34a; background: #f0fdf4; } .ordp-it.over { border-color: #dc2626; background: #fef2f2; }
.ordp-it.flash { animation: ordflash .6s ease; } @keyframes ordflash { from { box-shadow: 0 0 0 4px #86efac; } to { box-shadow: none; } }
.ordp-got { color: #16a34a; } .ordp-it.over .ordp-got { color: #dc2626; }
.ordp-act { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; } .ordp-act .btn.sm { padding: 2px 8px; font-size: 12px; }
.ordp-miss { margin: 0 0 8px; padding: 8px 10px; border-radius: 8px; background: #fef2f2; border: 1px solid #fecaca; color: #7f1d1d; font-size: 13px; }
.ordp.bad, .ordp.warn, .ordp.ok, .ordp.done { color: #111827; } .ordp.bad .code, .ordp.warn .code { color: #111827; font-size: 15px; } .ordp.bad .plat b, .ordp.warn .plat b { color: #111827; }
.ordp.bad ul li { color: #7f1d1d; font-size: 15px; line-height: 1.45; } .ordp.bad { box-shadow: 0 0 0 2px #fecaca inset; } .ordp.bad .muted, .ordp.warn .muted { color: #475569; }
/* Khiếu nại: ảnh khách gửi */
.rs-imgs { display: flex; flex-wrap: wrap; gap: 8px; } .rs-imgs img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
#rs-tabs .chip b { margin-left: 4px; }
#rs-out .pill { white-space: nowrap; }
/* Diễn tiến đơn (trang Khiếu nại) */
.tl { list-style: none; margin: 6px 0 14px; padding: 0 0 0 4px; border-left: 2px solid var(--line); }
.tl li { position: relative; display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 6px 0 6px 16px; font-size: 14px; }
.tl li::before { content: ''; position: absolute; left: -7px; top: 11px; width: 12px; height: 12px; border-radius: 50%; background: #94a3b8; border: 2px solid var(--card); }
.tl li.ok::before { background: #16a34a; } .tl li.bad::before { background: #dc2626; } .tl li.warn::before { background: #d97706; }
.tl li.future { opacity: .75; } .tl li.future::before { background: var(--card); border: 2px dashed #d97706; }
.tl time { color: var(--muted); font-size: 13px; white-space: nowrap; }
@media (max-width: 640px) { .tl li { grid-template-columns: 1fr; gap: 0; } }
/* Khiếu nại: tiền theo cách xử lý */
.rs-money { margin: 14px 0 0; } .rs-money summary { cursor: pointer; } .rs-money .tbl { margin-top: 8px; }
.rs-money tr.rs-bad td { color: #b91c1c; } .rs-money tr.rs-bad td b { color: #b91c1c; }
/* Phễu lọc cột (colTable) */
.fth { display: inline-flex; align-items: center; gap: 4px; }
.fbtn { border: 0; background: none; padding: 2px; border-radius: 4px; color: #94a3b8; cursor: pointer; display: inline-flex; align-items: center; }
.fbtn:hover { color: var(--primary); background: var(--primary-soft, #ccfbf1); } .fbtn.on { color: #fff; background: var(--primary); }
.fpop { position: absolute; z-index: 1200; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(15,23,42,.18); padding: 8px; min-width: 220px; max-width: 340px; font-size: 14px; }
.fpop .fsearch { width: 100%; margin-bottom: 6px; }
.fpop .flist { max-height: 280px; overflow-y: auto; }
.fpop .fopt { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; cursor: pointer; user-select: none; }
.fpop .fopt:hover { background: #f1f5f9; } .fpop .fopt span { flex: 1; } .fpop .fopt em { font-style: normal; color: var(--muted); font-size: 12px; }
.fpop .ffoot { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.fpop .fitem { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 6px; cursor: pointer; font: inherit; color: inherit; }
.fpop .fitem:hover { background: #f1f5f9; } .fpop .fitem.on { background: var(--primary); color: #fff; }
.fpop.fdate { display: grid; grid-template-columns: 130px 220px; max-width: 380px; gap: 8px; } .fpop.fdate .frange { display: flex; flex-direction: column; gap: 4px; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 8px; }
.fchip { display: inline-flex; align-items: center; gap: 4px; background: var(--primary-soft, #ccfbf1); color: var(--primary); border-radius: 99px; padding: 3px 4px 3px 10px; font-size: 13px; font-weight: 600; }
.fchip button { border: 0; background: rgba(15,118,110,.15); color: inherit; border-radius: 99px; width: 20px; height: 20px; cursor: pointer; line-height: 1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fpop .fopt:hover, :root:not([data-theme="light"]) .fpop .fitem:hover { background: #1f2937; } }
@media (max-width: 640px) { .fpop.fdate { grid-template-columns: 1fr; } }
.fmob { display: none; } @media (max-width: 640px) { .fmob { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; } }
/* Dashboard khiếu nại */
.dsh-filters { margin-bottom: 12px; }
.dsh-alerts { display: grid; gap: 8px; margin-bottom: 12px; } .dsh-alerts .banner { margin: 0; }
.clickable { cursor: pointer; } .stat.clickable:hover { border-color: var(--primary); }
.dsh-c { margin-top: 12px; } .dsh-c h3 { margin-top: 0; }
.dchart { width: 100%; height: auto; display: block; }
.dchart [data-pick]:hover rect { opacity: .85; }
.dleg-inline { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; margin: 0 0 6px; color: var(--muted); }
.dleg-inline i, .dleg i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: -1px; } .dleg-inline i { margin-right: 6px; }
.dnut { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.dnut svg { width: 200px; height: 200px; flex: none; } .dnut svg [data-go] { cursor: pointer; } .dnut svg [data-go]:hover { opacity: .85; }
.dleg { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 220px; font-size: 13px; }
.dleg li { display: grid; grid-template-columns: 12px 1fr auto 42px; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px; }
.dleg li.clickable:hover { background: #f1f5f9; } .dleg li span { display: flex; align-items: center; } .dleg li em { font-style: normal; color: var(--muted); text-align: right; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dleg li.clickable:hover { background: #1f2937; } }
/* Đang tải: vòng xoay xanh + thanh chạy trên đỉnh trang */
.loading { display: flex; align-items: center; gap: 10px; color: var(--primary); font-weight: 600; margin: 14px 0; }
.loading.small { font-size: 13px; margin: 6px 0; }
.spin { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(20,184,166,.25); border-top-color: #14b8a6; animation: spin .8s linear infinite; flex: none; }
.loading.small .spin { width: 16px; height: 16px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
#busybar { position: fixed; left: 0; top: 0; height: 4px; width: 100%; z-index: 3000; pointer-events: none; opacity: 0; transition: opacity .2s;
  background: linear-gradient(90deg, transparent 0%, #14b8a6 30%, #5eead4 50%, #14b8a6 70%, transparent 100%); background-size: 200% 100%; }
#busybar.on { opacity: 1; animation: busy 1s linear infinite; }
@keyframes busy { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .spin, #busybar.on { animation-duration: 2.5s; } }
/* Công tắc Danh sách | Dashboard trong trang phân hệ */
.vsw { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.vsw button { border: 0; background: none; padding: 8px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.vsw button + button { border-left: 1px solid var(--line); }
.vsw button.on { background: var(--primary); color: #fff; }
.vsw button:not(.on):hover { background: var(--primary-soft, #ccfbf1); color: var(--primary); }
/* Tên công ty trên thanh trên cùng + chữ ký "Một sản phẩm của QORAI" ở chân thanh bên */
.top-co { display: inline-flex; align-items: center; gap: 8px; max-width: 320px; padding: 6px 14px; border-radius: 99px; background: var(--primary-soft, #ccfbf1); color: var(--primary); font-weight: 700; white-space: nowrap; }
.top-co .tx { overflow: hidden; text-overflow: ellipsis; }
a.side-foot { text-decoration: none; color: #a7c7c2; } a.side-foot:hover { color: #fff; } a.side-foot b { color: #fff; letter-spacing: .04em; }
.side-foot .qmark { width: 22px; height: 22px; border-radius: 6px; background: #14b8a6; color: #fff; font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
@media (max-width: 760px) { .top-co { max-width: 46vw; padding: 5px 10px; font-size: 13px; } .top-co .ic { display: none; } }
.ord-time { margin: 6px 0 2px; font-size: 13px; } .ord-time .pill { margin-left: 2px; }
.kind-opts { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; } .kind-opts .btn { flex: 1; min-width: 150px; padding: 12px; font-size: 15px; }
/* Phóng to ảnh bill */
.bz-row { margin: 8px 0 0; gap: 10px; align-items: center; }
.bz-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; } .bz-pct { min-width: 52px; text-align: center; font-weight: 600; }
.bz-wrap { height: min(70vh, 720px); overflow: auto; background: #0f172a; border-radius: 8px; cursor: grab; display: grid; place-items: start center; }
.bz-wrap.drag { cursor: grabbing; } .bz-img { display: block; max-width: none; user-select: none; }

.tab-yield { max-width: 560px; margin: 40px auto; text-align: center; }
.tab-yield p { margin: 8px 0 14px; }

/* KPI VHS */
.kp-d { display: inline-block; min-width: 46px; padding: 2px 8px; border-radius: 999px; font-weight: 700; text-align: center; }
.kp-d.ok { background: #dcfce7; color: #166534; } .kp-d.warn { background: #fef3c7; color: #92400e; } .kp-d.bad { background: #fee2e2; color: #b91c1c; }
.kp-c-ok { color: #166534; } .kp-c-warn { color: #92400e; } .kp-c-bad { color: #b91c1c; font-weight: 600; }
.kp-tbl td { vertical-align: top; }

/* KPI VHS — tươi sáng */
.kp-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; margin: 12px 0 14px; padding: 20px 24px; border-radius: 16px; color: #fff;
  background: linear-gradient(120deg, #0f766e 0%, #0d9488 40%, #10b981 75%, #84cc16 120%); box-shadow: 0 10px 28px -12px rgba(13, 148, 136, .55); }
.kp-ring { width: 128px; height: 128px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), rgba(255,255,255,.22) 0); }
.kp-ring > div { width: 100px; height: 100px; border-radius: 50%; background: #fff; display: grid; place-items: center; align-content: center; color: #0f172a; }
.kp-ring b { font-size: 30px; line-height: 1; } .kp-ring small { font-size: 11px; color: #64748b; margin-top: 2px; }
.kp-hero-k { font-size: 18px; font-weight: 700; }
.kp-hero-r { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 8px; }
.kp-xl { padding: 4px 12px; border-radius: 999px; font-weight: 700; background: #fff; color: #0f766e; }
.kp-xl.warn { color: #b45309; } .kp-xl.bad { color: #b91c1c; }
.kp-diff { padding: 4px 12px; border-radius: 999px; font-weight: 600; background: rgba(255,255,255,.18); }
.kp-diff.up { background: rgba(220, 252, 231, .95); color: #166534; } .kp-diff.down { background: rgba(254, 226, 226, .95); color: #b91c1c; }
.kp-hero-n { font-size: 13px; opacity: .92; }
.kp-tiles { display: grid; gap: 8px; min-width: 210px; }
.kp-tile { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.95); color: #0f172a; }
.kp-tile span { font-size: 12px; color: #475569; } .kp-tile b { font-size: 18px; }
.kp-tile.t1 b { color: #16a34a; } .kp-tile.t2 b { color: #7c3aed; } .kp-tile.t3 b { color: #0284c7; }
.kp-card h3 { color: #0f766e; }
.kp-row td:first-child { border-left: 4px solid transparent; }
.kp-row-ok td:first-child { border-left-color: #22c55e; } .kp-row-warn td:first-child { border-left-color: #f59e0b; } .kp-row-bad td:first-child { border-left-color: #ef4444; }
.kp-row-ok { background: linear-gradient(90deg, #f0fdf4, transparent 40%); } .kp-row-warn { background: linear-gradient(90deg, #fffbeb, transparent 40%); } .kp-row-bad { background: linear-gradient(90deg, #fef2f2, transparent 40%); }
.kp-ic { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 8px; border-radius: 8px; background: #ecfeff; font-size: 15px; vertical-align: middle; }
.kp-bar { height: 6px; margin-top: 6px; border-radius: 999px; background: #e2e8f0; overflow: hidden; min-width: 60px; }
.kp-bar i { display: block; height: 100%; border-radius: 999px; }
.kp-bar i.ok { background: linear-gradient(90deg, #4ade80, #16a34a); } .kp-bar i.warn { background: linear-gradient(90deg, #fcd34d, #f59e0b); } .kp-bar i.bad { background: linear-gradient(90deg, #fca5a5, #ef4444); }
.kp-d { box-shadow: 0 1px 0 rgba(0,0,0,.04); }
@media (max-width: 900px) { .kp-hero { grid-template-columns: auto 1fr; } .kp-tiles { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); min-width: 0; } .kp-tile { flex-direction: column; align-items: flex-start; } }
@media (max-width: 560px) { .kp-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; } .kp-hero-r { justify-content: center; } .kp-tiles { grid-template-columns: 1fr; width: 100%; } .kp-tile { flex-direction: row; } }

.rs-hr { margin-top: 4px; padding: 3px 8px; border-radius: 6px; background: #f5f3ff; color: #5b21b6; max-width: 260px; }

.kp-tile span small { display: block; font-size: 11px; color: #0284c7; font-weight: 600; }

.kp-den { font-weight: 400; font-size: 10px; text-transform: none; letter-spacing: 0; color: #b45309; white-space: nowrap; }

/* Tiêu đề cột có ghi chú giải thích: gạch chân chấm + con trỏ "?" để biết rê chuột / bấm vào là có chú thích */
th[title] { text-decoration: underline dotted; text-decoration-color: #94a3b8; text-underline-offset: 4px; cursor: help; }

/* Dashboard các phân hệ */
.dsh-h { margin: 18px 0 8px; font-size: 16px; color: #0f766e; }
.dsh-alerts .banner.ok { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }

/* Biểu đồ tròn: nổi khối khi rê chuột + ô chú thích có mũi tên */
.dnut svg { overflow: visible; }
.dnut .dseg { transition: transform .15s, opacity .15s, filter .15s; transform-origin: 110px 110px; cursor: pointer; }
.dnut.hov .dseg { opacity: .45; }
.dnut.hov .dseg.hot { opacity: 1; transform: scale(1.07); filter: drop-shadow(0 3px 6px rgba(15, 23, 42, .35)); }
.dnut .dleg li { transition: background .15s; border-radius: 6px; cursor: default; }
.dnut .dleg li.hot { background: #ecfeff; box-shadow: inset 3px 0 0 #0d9488; font-weight: 600; }
.dtip { position: fixed; z-index: 90; display: none; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: #0f172a; color: #fff; font-size: 13px; pointer-events: none; box-shadow: 0 8px 22px rgba(15, 23, 42, .35); max-width: 280px; }
.dtip::before { content: ''; position: absolute; left: -7px; top: 50%; margin-top: -7px; border: 7px solid transparent; border-left: 0; border-right-color: #0f172a; }
.dtip.lft::before { left: auto; right: -7px; border: 7px solid transparent; border-right: 0; border-left-color: #0f172a; }
.dtip i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.dtip span { display: block; opacity: .85; font-size: 12px; } .dtip b { font-size: 16px; } .dtip em { font-style: normal; opacity: .85; margin-left: 4px; }

.dtip { align-items: flex-start; } .dtip i { margin-top: 3px; }
.dtip-l { margin: 6px 0 0; padding: 6px 0 0; list-style: none; border-top: 1px solid rgba(255,255,255,.25); font-size: 12px; line-height: 1.5; }

/* Loại yêu cầu trả hàng */
.solb { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.solb.rr { background: #ffedd5; color: #c2410c; border: 1px solid #fdba74; } .solb.ro { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.od-head .solb { margin-left: 8px; font-size: 13px; }

/* Ô kho ghi lý do tồn của đơn */
.onote { min-width: 190px; } .onote select, .onote input { display: block; width: 100%; font-size: 12px; padding: 4px 6px; margin-bottom: 3px; }
.onote .on-by { font-size: 11px; }
.onote select.co, .onote input.co { background: #fef3c7; border-color: #d97706; color: #78350f; font-weight: 600; }

.od-note { margin: 8px 0 10px; padding: 8px 12px; border-radius: 10px; background: #f8fafc; border: 1px solid var(--line); font-size: 13px; }
.od-note table { margin-top: 6px; } .od-note .onote { padding: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-width: 0; }
.od-note .onote select { width: 220px; margin: 0; } .od-note .onote input { width: 320px; max-width: 100%; margin: 0; }

/* Quản lý đơn sàn + In đơn */
.odi { display: flex; gap: 8px; align-items: flex-start; margin: 2px 0; max-width: 380px; } .odi img, .odi .odi-no { width: 40px; height: 40px; flex: none; border-radius: 6px; object-fit: cover; background: #f1f5f9; display: grid; place-items: center; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 12px; }
.pr-act { position: sticky; top: 0; z-index: 3; background: var(--card, #fff); padding: 8px 0; border-bottom: 1px solid var(--line); }

/* Hàng hoàn về kho */
.rr-ph { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .rr-ph img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; cursor: zoom-in; border: 1px solid var(--line); }

/* Nhặt hàng */
.pk-hero { padding: 22px 24px 18px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, #0b3b36 0%, #0f766e 62%, #14b8a6 130%); box-shadow: 0 8px 24px rgba(15, 118, 110, .22); margin-bottom: 14px; }
.pk-hero-top { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; margin-bottom: 14px; }
.pk-hero h2 { margin: 0; font-size: 22px; line-height: 1.25; color: #fff; } .pk-hero p { margin: 4px 0 0; font-size: 14px; color: rgba(255, 255, 255, .78); }
.pk-hero .vsw { border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .1); } .pk-hero .vsw button { color: rgba(255, 255, 255, .85); } .pk-hero .vsw button + button { border-left-color: rgba(255, 255, 255, .35); }
.pk-hero .vsw button.on { background: #fff; color: #0f766e; } .pk-hero .vsw button:not(.on):hover { background: rgba(255, 255, 255, .2); color: #fff; }
.pk-scan-row { display: flex; gap: 10px; align-items: stretch; position: relative; }
.pk-bar { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #0f766e; display: grid; pointer-events: none; }
.pk-scan-row input { flex: 1; min-width: 0; height: 58px; margin: 0; padding: 0 16px 0 54px; font-family: inherit; font-size: 20px; font-weight: 600; letter-spacing: .5px; color: #0f172a; background: #fff; border: 0; border-radius: 14px; box-shadow: inset 0 0 0 2px transparent; }
.pk-scan-row input::placeholder { font-weight: 400; letter-spacing: 0; color: #94a3b8; } .pk-scan-row input:focus { outline: 0; box-shadow: 0 0 0 4px rgba(94, 234, 212, .65); }
.pk-scan-row .btn { height: 58px; padding: 0 22px; border-radius: 14px; border: 0; font-weight: 700; background: #fbbf24; color: #422006; } .pk-scan-row .btn:hover { background: #f59e0b; }
.pk-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 14px 0 0; padding: 0; font-size: 13.5px; color: rgba(255, 255, 255, .88); }
.pk-steps li { display: flex; align-items: center; gap: 8px; } .pk-steps b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: rgba(255, 255, 255, .2); color: #fff; }
.pk-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.pk-st { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pk-st span { font-size: 13px; color: var(--muted); } .pk-st b { font-size: 28px; line-height: 1.1; color: var(--primary, #0f766e); } .pk-st b.pk-whn { font-size: 18px; color: var(--text); padding-top: 6px; } .pk-st select { margin: 2px 0 0; width: 100%; font-weight: 600; }
.pk-wait { margin: 0 0 14px; padding: 28px 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; background: var(--card); border: 1.5px dashed #99f6e4; border-radius: 16px; color: var(--muted); font-size: 13.5px; }
.pk-wait b { font-size: 17px; color: var(--text); } .pk-wait-ic { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: #ccfbf1; color: #0f766e; margin-bottom: 4px; animation: pkpulse 1.8s ease-in-out infinite; }
@keyframes pkpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(20, 184, 166, .35); } 50% { box-shadow: 0 0 0 12px rgba(20, 184, 166, 0); } }
@media (prefers-reduced-motion: reduce) { .pk-wait-ic { animation: none; } }
/* 15/11/2026 (chị My): màn Nhặt hàng gọn hơn trên máy tính — khối quét thấp, 3 ô số nằm ngang, ô chờ quét thành 1 dải mỏng */
@media (min-width: 641px) { .pk-hero { padding: 14px 20px 12px; margin-bottom: 10px; } .pk-hero-top { margin-bottom: 10px; } .pk-hero h2 { font-size: 19px; } .pk-hero p { font-size: 13px; margin-top: 2px; }
  .pk-scan-row input, .pk-scan-row .btn { height: 50px; } .pk-steps { margin-top: 10px; }
  .pk-stats { gap: 10px; margin-bottom: 10px; } .pk-st { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; } .pk-st b { font-size: 22px; } .pk-st b.pk-whn { padding-top: 0; font-size: 16px; } .pk-st select { width: auto; flex: 1; max-width: 280px; margin: 0; }
  .pk-wait { flex-direction: row; justify-content: center; padding: 10px 16px; gap: 10px; margin-bottom: 10px; } .pk-wait b { font-size: 15px; } .pk-wait-ic { width: 34px; height: 34px; margin: 0; } .pk-wait-ic svg { width: 18px; height: 18px; } }
@media (max-width: 640px) { .pk-hero { padding: 16px; border-radius: 14px; } .pk-hero h2 { font-size: 18px; } .pk-scan-row { flex-wrap: wrap; } .pk-scan-row input { flex: 1 1 100%; height: 54px; font-size: 18px; } .pk-scan-row .btn { flex: 1; height: 48px; } .pk-bar { top: 27px; }
  .pk-stats { grid-template-columns: 1fr 1fr; gap: 8px; } .pk-st:last-child { grid-column: 1 / -1; } .pk-st b { font-size: 24px; } .pk-steps { flex-direction: column; gap: 6px; } }

/* In đơn: bộ lọc theo hàng, nút có số đếm */
.pr-facets { border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px; margin-bottom: 12px; }
.pr-fr { display: grid; grid-template-columns: 96px 1fr; gap: 8px; align-items: start; padding: 8px 0; } .pr-fr + .pr-fr { border-top: 1px dashed var(--line); }
.pr-fl { color: var(--muted); font-size: 13px; padding-top: 5px; } .pr-fr .chips { display: flex; flex-wrap: wrap; gap: 6px; } .pr-fr .chip { border-radius: 8px; padding: 4px 10px; } .pr-fr .chip b { margin-left: 3px; color: var(--primary); } .pr-fr .chip.on b { color: #fff; }
.btn.dim { opacity: .55; }
@media (max-width: 640px) { .pr-fr { grid-template-columns: 1fr; gap: 4px; } .pr-fl { padding-top: 0; } .pr-fr .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; } .pr-fr .chip { white-space: nowrap; flex: none; } }

/* Chờ đóng hàng: tách bảng dịch vụ và danh sách đơn chờ */
.pd-sec { margin-top: 32px; padding-top: 22px; border-top: 2px solid var(--line); }

/* Hàng hoàn: ô bằng chứng có ảnh đại diện + xem nhanh */
.rr-ev { display: flex; gap: 8px; align-items: center; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: zoom-in; font: inherit; font-size: 12.5px; text-align: left; color: var(--text); line-height: 1.35; }
.rr-ev:hover { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft, #ccfbf1); }
.rr-ev img, .rr-ev-no { width: 52px; height: 52px; flex: none; border-radius: 7px; object-fit: cover; background: #f1f5f9; display: grid; place-items: center; font-size: 20px; }
.rr-gal { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; } .rr-gal figure { margin: 0; } .rr-gal img { width: 100%; max-height: 70vh; object-fit: contain; background: #0f172a; border-radius: 8px; } .rr-gal figcaption { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

/* Hai bảng đặt cạnh nhau: mỗi bảng một khung riêng, cách nhau rõ */
.split2 { gap: 22px 28px; } .split2 > div { border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px 14px; background: var(--card); box-shadow: 0 1px 3px rgba(15, 23, 42, .06); } .split2 > div > h3 { margin-top: 2px; }

/* Đóng gói: lô cần xuất theo FEFO */
.ordp-lot { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 3px 9px; border-radius: 8px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; font-size: 13px; }
.ordp-lot i { width: 14px; height: 14px; border-radius: 50%; flex: none; border: 1px solid rgba(0, 0, 0, .25); } .ordp-lot.soon { background: #fff7ed; border-color: #fdba74; color: #9a3412; }

/* Chỗ bấm để mở xem thêm (▸ Xem bảng số liệu…): chữ xanh, nền xanh nhạt nổi lên, rê chuột đậm hơn — nhìn là biết bấm được */
summary { cursor: pointer; color: var(--primary); font-weight: 600; }
summary.muted, details.small > summary { color: var(--primary) !important; display: inline-block; padding: 5px 14px; border-radius: 99px; background: var(--primary-soft, #ccfbf1); border: 1px solid #99f6e4; box-shadow: 0 1px 2px rgba(15, 118, 110, .15); font-size: 13.5px; transition: background .15s, box-shadow .15s; }
summary.muted:hover, details.small > summary:hover { background: #99f6e4; box-shadow: 0 2px 6px rgba(15, 118, 110, .25); }
details[open] > summary.muted, details.small[open] > summary { margin-bottom: 8px; }
details.card > summary { color: var(--text); border-radius: 8px; } details.card > summary::marker { color: var(--primary); } details.card > summary:hover { background: var(--primary-soft, #ccfbf1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) summary.muted, :root:not([data-theme="light"]) details.small > summary { background: #134e4a; border-color: #0f766e; color: #5eead4 !important; } }
:root[data-theme="dark"] summary.muted, :root[data-theme="dark"] details.small > summary { background: #134e4a; border-color: #0f766e; color: #5eead4 !important; }

/* Chờ đóng hàng: mỗi sản phẩm 1 dòng, SKU ngay dưới tên */
.pd-it + .pd-it { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); } .pd-sku { font-size: 12.5px; color: var(--muted); margin-top: 1px; } .pd-sku span { font-family: Consolas, monospace; font-weight: 600; color: var(--primary); user-select: all; } .pd-sku.none { font-style: italic; }

/* Nút Copy hiện khi rê chuột vào mã đơn / SKU */
.cpy-btn { position: fixed; z-index: 9999; display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid #99f6e4; background: #fff; color: var(--primary); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; box-shadow: 0 2px 8px rgba(15, 23, 42, .18); }
.cpy-btn:hover { background: var(--primary-soft, #ccfbf1); } .cpy-btn.ok { background: #16a34a; border-color: #16a34a; color: #fff; } .cpy-btn[hidden] { display: none; }

/* Nút kết nối theo màu sàn */
.btn.btn-sp { background: #ee4d2d; border-color: #ee4d2d; color: #fff; } .btn.btn-sp:hover:not(:disabled) { background: #d73211; border-color: #d73211; }
.btn.btn-tt { background: #111; border-color: #111; color: #fff; } .btn.btn-tt:hover:not(:disabled) { background: #000; box-shadow: -2px 0 0 #25f4ee, 2px 0 0 #fe2c55; } .btn.btn-sp:disabled, .btn.btn-tt:disabled { opacity: .5; }
.umenu .umenu-a { text-decoration: none; box-sizing: border-box; }

/* Tìm hàng loạt nhiều mã */
.sbox .sbulk { position: absolute; right: 34px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border: 0; border-radius: 6px; background: var(--primary-soft, #ccfbf1); color: var(--primary); font-size: 14px; font-weight: 700; cursor: pointer; display: grid; place-items: center; }
.sbox .sbulk:hover { background: #99f6e4; } .sbox.has-bulk > input { padding-right: 66px; } .sbox.has-bulk:not(.has) .sbulk { right: 8px; } .sbox.has-bulk:not(.has) > input { padding-right: 40px; }
.bulk-note { margin: 6px 0 8px; padding: 7px 12px; border-radius: 10px; background: #f0fdfa; border: 1px solid #99f6e4; font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* In đơn: bộ lọc dạng dày (16/10) — đỡ đẩy bảng xuống sâu */
.pr-facets { padding: 2px 12px; margin-bottom: 8px; }
.pr-fr { grid-template-columns: 112px 1fr; gap: 6px; padding: 3px 0; align-items: center; }
.pr-fr + .pr-fr { border-top: 1px dotted var(--line); }
.pr-fl { font-size: 12.5px; padding-top: 0; line-height: 1.2; white-space: nowrap; }
.pr-fr .chips { gap: 4px; }
.pr-fr .chip { padding: 1px 8px; font-size: 12.5px; line-height: 1.6; border-radius: 6px; }

.pr-tabs { margin: 0 0 8px; } .pr-tabs .chip { font-size: 14px; padding: 5px 14px; }

/* Phiếu hàng hoàn: 3 ô bằng chứng cố định vai trò + bước xử lý + bình luận */
.rr-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.rr-slot { border: 1px solid var(--line, #e5e7eb); border-radius: 10px; padding: 10px; background: var(--card, #fff); }
.rr-sh { font-weight: 700; margin-bottom: 6px; }
.rr-th { position: relative; display: inline-block; }
.rr-th img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; display: block; }
.rr-th .x { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: #b91c1c; color: #fff; font-size: 14px; line-height: 22px; padding: 0; cursor: pointer; }
.rr-th i { position: absolute; bottom: 2px; right: 4px; font-style: normal; background: #fff; border-radius: 6px; padding: 0 3px; color: #b91c1c; }
.rr-th i.ok { color: #047857; }
.rr-steps td:first-child { width: 190px; white-space: nowrap; }
.rr-cmt { max-height: 260px; overflow: auto; border: 1px solid var(--line, #e5e7eb); border-radius: 8px; padding: 6px 10px; }
.rr-cm { padding: 6px 0; border-bottom: 1px dashed var(--line, #e5e7eb); font-size: 14px; }
.rr-cm:last-child { border-bottom: 0; }
.rr-cm.sys > div { color: var(--muted, #6b7280); }
.rv-stage canvas { width: 100%; height: auto; max-height: 62vh; object-fit: contain; background: #000; border-radius: 8px; display: block; }
@media (max-width: 640px) { .rr-steps td:first-child { width: auto; white-space: normal; } }
.rr-steps select { max-width: 100%; min-width: 0; }
.rr-steps td { overflow-wrap: anywhere; }
@media (max-width: 640px) { .rr-steps tr, .rr-steps td { display: block; } .rr-steps td:first-child { border-bottom: 0; padding-bottom: 0; font-weight: 600; } .rr-steps select { width: 100%; } }

.nav-red { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; vertical-align: middle; }
.nav-red[hidden] { display: none; }

/* Bảng Hàng hoàn về kho (13 cột): vừa 1 màn hình máy tính, không phải kéo ngang — chữ gọn, tên SP 2 dòng, nhãn không gãy dòng */
@media (min-width: 900px) {
  :is(#rr-t, #rl-t) .ftbl { font-size: 13px; }
  :is(#rr-t, #rl-t) .ftbl th { font-size: 11px; padding: 8px 5px; white-space: nowrap; letter-spacing: 0; }
  :is(#rr-t, #rl-t) .ftbl td { padding: 7px 5px; vertical-align: middle; }
  :is(#rr-t, #rl-t) .ftbl .pill { font-size: 11.5px; padding: 2px 7px; white-space: nowrap; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(2) { white-space: nowrap; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(2) .code { font-size: 13px; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(3) { max-width: 120px; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(4) { min-width: 200px; max-width: 250px; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(4) .odi { max-width: 250px; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(4) .odi img, :is(#rr-t, #rl-t) .ftbl td:nth-child(4) .odi .odi-no { width: 34px; height: 34px; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(4) .odi > div > div:first-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(5) { max-width: 90px; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(6) .muted { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  :is(#rr-t, #rl-t) .rr-ev { gap: 5px; padding: 2px; font-size: 11.5px; line-height: 1.25; white-space: nowrap; }
  :is(#rr-t, #rl-t) .rr-ev img, :is(#rr-t, #rl-t) .rr-ev-no { width: 52px; height: 52px; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(12) { max-width: 90px; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(13) { white-space: nowrap; font-size: 12px; }
}
.w-s { display: none; }
/* Laptop nhỏ (≤ 1500px): gọn thêm để bảng Hàng hoàn vẫn không phải kéo ngang */
@media (min-width: 900px) and (max-width: 1500px) {
  :is(#rr-t, #rl-t) .w-l { display: none; } :is(#rr-t, #rl-t) .w-s { display: inline; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(4) { min-width: 160px; max-width: 180px; } :is(#rr-t, #rl-t) .ftbl td:nth-child(4) .odi { max-width: 180px; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(4) .odi img, :is(#rr-t, #rl-t) .ftbl td:nth-child(4) .odi .odi-no { display: none; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(3) { max-width: 95px; } :is(#rr-t, #rl-t) .ftbl td:nth-child(3) .plat { white-space: normal; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(2) .muted { font-size: 11px; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(6) .muted { max-width: 80px; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(9) { max-width: 80px; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(13) { white-space: normal; max-width: 85px; }
  :is(#rr-t, #rl-t) .rr-ev img, :is(#rr-t, #rl-t) .rr-ev-no { width: 46px; height: 46px; }
  :is(#rr-t, #rl-t) .ftbl th { font-size: 10.5px; padding: 8px 4px; } :is(#rr-t, #rl-t) .ftbl td { padding: 7px 4px; }
}
@media (min-width: 900px) and (max-width: 1500px) {
  :is(#rr-t, #rl-t) .ftbl th { white-space: normal; line-height: 1.2; }
  :is(#rr-t, #rl-t) .ftbl th .fth { flex-wrap: wrap; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(11) .pill { white-space: normal; }
}
@media (min-width: 900px) and (max-width: 1500px) {
  :is(#rr-t, #rl-t) .ftbl td:nth-child(4) { min-width: 150px; max-width: 165px; } :is(#rr-t, #rl-t) .ftbl td:nth-child(4) .odi { max-width: 165px; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(1), :is(#rr-t, #rl-t) .ftbl th:nth-child(1) { padding-left: 2px; padding-right: 2px; }
}
@media (min-width: 900px) and (max-width: 1500px) {
  :is(#rr-t, #rl-t) .rr-ev { font-size: 10.5px; gap: 4px; } :is(#rr-t, #rl-t) .rr-ev img, :is(#rr-t, #rl-t) .rr-ev-no { width: 46px; height: 46px; font-size: 15px; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(10) .pill { white-space: normal; }
}
/* Cột Phiếu không bị 1 mã kho quét quá dài kéo rộng → Gian hàng đứng sát bên */
@media (min-width: 900px) {
  :is(#rr-t, #rl-t) .ftbl td:nth-child(2) { width: 1%; max-width: 150px; }
  :is(#rr-t, #rl-t) .rr-scan { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(3) { width: 1%; }
}

/* App TikTok của công ty (trang Kết nối sàn) */
.tt-app summary { cursor: pointer; } .tt-app-b { margin-top: 10px; }
.tt-steps { margin: 0 0 10px; padding-left: 20px; } .tt-steps li { margin: 4px 0; } .tt-steps code { word-break: break-all; }
.tt-f label { display: flex; flex-direction: column; gap: 3px; min-width: 200px; flex: 1; } .tt-f input { font-size: 16px; }
/* Phiếu hàng hoàn: video khui xem ngay trong ô, nút chép link gửi sàn, ảnh đính kèm bình luận */
.rr-vplay { width: 100%; max-height: 220px; background: #000; border-radius: 8px; display: block; margin-bottom: 4px; }
.rr-share { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin: 10px 0 2px; }
.rr-cp { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.25; padding: 6px 14px; background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.rr-cp span { font-size: 12px; color: var(--muted, #6b7280); font-weight: 400; }
.rr-cmf { position: relative; display: inline-block; } .rr-cmf img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }
.rr-cmf button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: #b91c1c; color: #fff; font-size: 13px; line-height: 20px; padding: 0; cursor: pointer; }
.rr-cm .rr-ph img { width: 72px; height: 72px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rr-cp { background: #10233f; border-color: #1e3a5f; color: #93c5fd; } } :root[data-theme="dark"] .rr-cp { background: #10233f; border-color: #1e3a5f; color: #93c5fd; }
/* Bảng Hàng hoàn (từ 20261019d): cột rộng cố định theo % (đặt ở rrCols) → khoảng cách đều, không bị 1 ô dài kéo giãn, không kéo ngang */
@media (min-width: 900px) {
  :is(#rr-t, #rl-t) .ftbl { table-layout: fixed; width: 100%; }
  :is(#rr-t, #rl-t) .ftbl th { white-space: normal; line-height: 1.2; }
  :is(#rr-t, #rl-t) .ftbl th .fth { flex-wrap: wrap; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(n) { min-width: 0; max-width: none; width: auto; white-space: normal; overflow-wrap: anywhere; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(n) .pill { white-space: normal; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(n) .odi, :is(#rr-t, #rl-t) .ftbl td:nth-child(n) .muted { max-width: 100%; }
  :is(#rr-t, #rl-t) .rr-scan { max-width: 100%; }
  :is(#rr-t, #rl-t) .rr-ev { white-space: normal; max-width: 100%; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(n) { overflow: hidden; } :is(#rr-t, #rl-t) .ftbl td:nth-child(14) .muted { white-space: normal; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(n) .pill { border-radius: 8px; }
}
/* Cửa sổ danh sách phiếu (31/10/2026): màn hẹp thì kéo ngang, không ép 14 cột tới mức chữ dựng đứng */
@media (min-width: 900px) {
  #rl-t { overflow-x: auto; } #rl-t .ftbl { min-width: 1200px; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(n) .rr-ev, :is(#rr-t, #rl-t) .ftbl td:nth-child(n) .rr-ev * { overflow-wrap: normal; word-break: normal; }
  :is(#rr-t, #rl-t) .ftbl td:nth-child(n) .rr-xem { overflow-wrap: normal; word-break: normal; display: block; line-height: 1.3; }
}
/* Thanh chia trang dưới bảng */
.tpager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.tpager select { width: auto; padding: 4px 8px; font-size: 13px; }
/* Đang tải: chữ "Đang tải dữ liệu…" + vòng xoay hiện rõ giữa đầu trang khi chờ quá 0,6 giây */
#busytip { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 3001; display: none; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px;
  background: var(--card, #fff); color: var(--text); border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(0,0,0,.15); font-weight: 600; font-size: 14px; pointer-events: none; }
#busytip.on { display: inline-flex; }
.tbl-busy { position: relative; } .tbl-busy > * { opacity: .45; transition: opacity .15s; pointer-events: none; }
@media (min-width: 900px) { :is(#rr-t, #rl-t) .ftbl td:nth-child(8) .pill { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } }
/* Phiếu hàng hoàn: 3 ô bằng chứng cùng cỡ khung 4:3 */
.rr-sh { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; } .rr-sh .rr-add { margin-left: auto; padding: 2px 10px; }
.rr-frame { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #111; cursor: zoom-in; }
.rr-frame img { width: 100%; height: 100%; object-fit: cover; display: block; } .rr-frame video { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.rr-frame.empty { display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px; background: var(--bg); border-style: dashed; color: var(--muted); font-size: 13px; cursor: default; }
.rr-play { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; padding-left: 4px; }
.rr-more { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.7); color: #fff; border-radius: 6px; padding: 2px 8px; font-weight: 700; font-size: 12.5px; }
.rr-frame:hover { box-shadow: 0 0 0 2px var(--primary); }
/* Khung xem ảnh / video liền mạch (‹ ›) */
.mbx { position: relative; background: #000; border-radius: 10px; height: min(68vh, 640px); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.mbx img, .mbx video { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.mbx-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: #111; font-size: 28px; line-height: 1; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.35); z-index: 2; }
.mbx-nav.prev { left: 10px; } .mbx-nav.next { right: 10px; } .mbx-nav[disabled] { opacity: .25; cursor: default; }
.mbx-cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin: 8px 0; }
.mbx-th { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.mbx-th button { flex: none; width: 72px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: #111; color: #fff; font-size: 12px; cursor: pointer; }
.mbx-th button.on { border-color: var(--primary); } .mbx-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mbx-od { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--primary) 6%, var(--card)); }
@media (max-width: 640px) { .mbx { height: 55vh; } .mbx-nav { width: 40px; height: 40px; font-size: 24px; } }
/* Đối soát: cột Sản phẩm rộng hơn (giờ ngày tạo đã xuống dòng, bỏ cột Sàn) */ #rc-t [data-vhs] { max-width: 150px !important; } @media (min-width: 1700px) { #rc-t .ftbl td:nth-child(6) { min-width: 220px; } #rc-t .ftbl td:nth-child(6) .odi > div > div:first-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } }
/* Nút thu gọn / mở rộng thanh bên: nổi rõ (nền xanh ngọc, viền sáng) — trước bị chìm */
.side-toggle { background: #14b8a6; border: 1px solid #5eead4; color: #fff; width: 30px; height: 30px; font-size: 16px; font-weight: 700; box-shadow: 0 0 0 3px rgba(20,184,166,.25); }
.side-toggle:hover { background: #0d9488; box-shadow: 0 0 0 4px rgba(94,234,212,.4); }
/* Khiếu nại: mã đơn dài ngắt dòng, Loại yêu cầu & Trạng thái sàn ngắt dòng cho cột hẹp lại */
#rs-tbl .ftbl td:nth-child(5) { max-width: 190px; } #rs-tbl .ftbl td:nth-child(5) .code { word-break: break-all; }
#rs-tbl .rs-sol { min-width: 110px; max-width: 150px; } #rs-tbl .rs-sol .solb { white-space: normal; line-height: 1.3; }
#rs-tbl .ftbl td:nth-child(9) { min-width: 110px; max-width: 160px; }
/* Đối soát: mã đơn / mã vận đơn dài tự ngắt dòng (cột hẹp lại), cột Tình trạng & Đã về kho gọn, nhường chỗ cho Sản phẩm */
#rc-t .ftbl td:nth-child(4) { max-width: 165px; } #rc-t .ftbl td:nth-child(4) .code, #rc-t .ftbl td:nth-child(4) .muted { word-break: break-all; }
#rc-t .ftbl td:nth-child(9) { max-width: 125px; } #rc-t .ftbl td:nth-child(9) .pill { white-space: normal; }
#rc-t .ftbl td:nth-child(10) { width: 1%; max-width: 100px; } #rc-t .ftbl td:nth-child(10) .pill { white-space: normal; }
@media (min-width: 1700px) { #rc-t .ftbl td:nth-child(6) { min-width: 270px; } }
/* Khiếu nại: 3 cột TT trên sàn / KN của shop / KQ · Shop đã làm gì co hẹp, chữ tự xuống dòng */
#rs-tbl .ftbl td:nth-child(9) { min-width: 0; max-width: 120px; }
#rs-tbl .ftbl td:nth-child(10) { max-width: 125px; } #rs-tbl .ftbl td:nth-child(10) .rs-hr { white-space: normal; }
#rs-tbl .ftbl td:nth-child(11) { max-width: 165px; } #rs-tbl .ftbl td:nth-child(11) .pill { white-space: normal; }
#rs-tbl .ftbl th:nth-child(9), #rs-tbl .ftbl th:nth-child(10), #rs-tbl .ftbl th:nth-child(11) { white-space: normal; }
/* Link gửi khách (mã giới thiệu): nổi rõ + nút copy */
.rf-link { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #ecfdf5; border: 1px solid #6ee7b7; }
.rf-link-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 4px; } .rf-link-row b { color: #047857; font-size: 15px; word-break: break-all; flex: 1; min-width: 200px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rf-link { background: #052e22; border-color: #065f46; } :root:not([data-theme="light"]) .rf-link-row b { color: #6ee7b7; } }
:root[data-theme="dark"] .rf-link { background: #052e22; border-color: #065f46; } :root[data-theme="dark"] .rf-link-row b { color: #6ee7b7; }
.pauto { text-align: center; padding: 12px; border-radius: 12px; background: #ecfdf5; border: 1px dashed #34d399; color: #065f46; line-height: 1.5; } @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pauto { background: #052e22; border-color: #059669; color: #a7f3d0; } } :root[data-theme="dark"] .pauto { background: #052e22; border-color: #059669; color: #a7f3d0; }
/* Hàng hoàn (giống PM HR): cột Phiếu chỉ số phiếu, ngắt sau dấu "-"; cột Mã đơn = mã kiện + 🆔 mã đơn sàn + gian hàng */
:is(#rr-t, #rl-t) .rr-no .code { font-size: 13px; line-height: 1.3; }
:is(#rr-t, #rl-t) .rr-od .code { font-weight: 600; font-size: 13px; word-break: break-all; }
:is(#rr-t, #rl-t) .rr-od .rr-oid { color: #6d28d9; word-break: break-all; margin-top: 2px; }
:is(#rr-t, #rl-t) .rr-od .plat { white-space: normal; }
:is(#rr-t, #rl-t) .rr-spt { color: var(--muted); line-height: 1.5; }
.rr-pk a { word-break: break-all; font-weight: 600; }
/* Ảnh đại diện ô Ảnh hoàn: rê chuột hiện kính lúp — bấm là xem to đúng ảnh này */
.rr-th { position: relative; display: inline-flex; flex: none; border-radius: 7px; overflow: hidden; }
.rr-th .rr-zoom { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(15, 23, 42, .45); color: #fff; font-size: 18px; opacity: 0; transition: opacity .15s; }
.rr-ev:hover .rr-th .rr-zoom { opacity: 1; }
.rr-th:hover { outline: 2px solid var(--primary); outline-offset: -2px; }
/* 🤖 Gợi ý kết luận lỗi của máy */
.kla { display: inline-block; padding: 1px 7px; border: 1px dashed #8b5cf6; border-radius: 999px; color: #6d28d9; font-style: italic; font-weight: 600; white-space: nowrap; }
.kla-box { margin: 0 0 8px; padding: 8px 12px; border: 1px dashed #8b5cf6; border-radius: 10px; background: #f5f3ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kla-box { background: #241a3d; } :root:not([data-theme="light"]) .kla { color: #c4b5fd; } }
:root[data-theme="dark"] .kla-box { background: #241a3d; } :root[data-theme="dark"] .kla { color: #c4b5fd; }
/* Cửa sổ kéo rê được (máy có chuột): giữ thanh tiêu đề mà kéo để né chỗ cần xem phía sau */
.modal header .mdrag { display: none; margin-left: auto; margin-right: 10px; font-size: 12px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.modal header.can-drag { cursor: move; user-select: none; } .modal header.can-drag .mdrag { display: inline; }
.modal header.can-drag .x { cursor: pointer; }
/* Chờ đóng hàng: cột Mã vận đơn + Hạn giao co vừa nội dung, nhường chỗ cho Sản phẩm */
@media (min-width: 900px) { .pd-tbl td:nth-child(2), .pd-tbl th:nth-child(2), .pd-tbl td:nth-child(3), .pd-tbl th:nth-child(3) { width: 1%; white-space: nowrap; } .pd-tbl td:nth-child(3), .pd-tbl th:nth-child(3) { padding-left: 4px; }
  .pd-tbl.pd-ck-on td:nth-child(4), .pd-tbl.pd-ck-on th:nth-child(4) { width: 1%; white-space: nowrap; padding-left: 4px; } .pd-tbl.pd-ck-on td:nth-child(3), .pd-tbl.pd-ck-on th:nth-child(3) { padding-left: 12px; } }
@media (min-width: 900px) { #pr-t td.pr-sp { width: 100%; max-width: 0; min-width: 150px; } #pr-t th:nth-child(2), #pr-t td.pr-code { width: 1%; padding-right: 6px; } }
#pr-t td.pr-code { width: 1%; } #pr-t td.pr-code .muted { white-space: nowrap; }
.layout.side-min #pr-t td.pr-code .code { white-space: nowrap; } .layout.side-min #pr-t .pr-br { display: none; } /* 15/11/2026 (chị My): thanh bên thu gọn → bảng In đơn đủ chỗ, mã đơn TikTok 18 số không ngắt dòng (mở thanh bên vẫn ngắt 9 + 9) */
/* In đơn: tiêu đề cột được xuống dòng, cột Vận chuyển / Gian hàng gọn lại → đỡ phải kéo ngang */
@media (min-width: 900px) { #pr-t th { white-space: normal; } #pr-t th .fth { white-space: normal; } #pr-t td:nth-child(6) { max-width: 130px; } #pr-t td:nth-child(8) { max-width: 140px; } #pr-t td:nth-child(8) .plat { white-space: normal; } #pr-t td { padding-left: 6px; padding-right: 6px; } }
@media (min-width: 900px) { .layout.side-min #pr-t td:nth-child(6) { max-width: 200px; min-width: 175px; } } /* 15/11/2026 (chị My): thanh bên thu gọn → cột Vận chuyển rộng hơn, tối đa 2 dòng */
/* 🏷 Ký hiệu đơn hàng */
.otag { display: inline-block; margin: 0 4px 4px 0; padding: 1px 7px; border-radius: 6px; font-size: 11.5px; font-weight: 600; line-height: 1.5; color: #fff; background: var(--tc, #64748b); white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.tg-list { max-height: 50vh; overflow: auto; margin-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.tg-opt { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; background: none; font: inherit; text-align: left; cursor: pointer; }
.tg-opt:hover { background: var(--primary-soft, #ccfbf1); } .tg-opt.on { border-color: var(--primary); background: var(--primary-soft, #ccfbf1); font-weight: 600; }
.tg-opt i { width: 14px; height: 14px; border-radius: 3px; flex: none; }
.tg-wrap { position: relative; display: inline-block; }
.tg-menu { position: absolute; z-index: 50; top: calc(100% + 4px); left: 0; min-width: 200px; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.15); padding: 4px; display: flex; flex-direction: column; }
.tg-menu button { padding: 9px 12px; border: 0; background: none; font: inherit; text-align: left; border-radius: 6px; cursor: pointer; } .tg-menu button:hover { background: var(--primary-soft, #ccfbf1); }
.cx-btns { display: flex; flex-direction: column; gap: 4px; margin: 2px 0 6px; } .cx-btns .btn { white-space: nowrap; font-size: 12px; padding: 3px 8px; }
/* Ô màu ký hiệu: hiện thành ô vuông màu đậm (không còn vạch mảnh) */
.modal input[type="color"] { width: 38px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: none; cursor: pointer; }
.modal input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; } .modal input[type="color"]::-webkit-color-swatch { border: none; border-radius: 5px; } .modal input[type="color"]::-moz-color-swatch { border: none; border-radius: 5px; }
.tg-pal { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; } .tg-pal button { width: 24px; height: 24px; border-radius: 5px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.tg-opt i { width: 16px; height: 16px; }
.tg-mode { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; }
.tg-checks { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; padding: 8px 10px; background: var(--bg, #f8fafc); border-radius: 8px; }
.tg-ck { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; } .tg-ck i { width: 16px; height: 16px; border-radius: 3px; flex: none; } .tg-ck b { font-weight: 600; color: var(--muted); font-size: 12px; }
/* Icon 2D trong ô ký hiệu */
.tg-sq { display: inline-grid; place-items: center; border-radius: 5px; flex: none; font-style: normal; vertical-align: middle; }
.otag { display: inline-flex; align-items: center; gap: 4px; } .otag svg { flex: none; }
.tg-icb { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 7px; line-height: 0; } .tg-icb:hover { box-shadow: 0 0 0 2px var(--primary); }
td:has(> .tg-icb) { position: relative; }
.tg-icpop { position: absolute; z-index: 60; top: calc(100% - 4px); left: 0; width: 220px; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.tg-icpop button { padding: 2px; border: 2px solid transparent; border-radius: 7px; background: none; cursor: pointer; line-height: 0; } .tg-icpop button.on, .tg-icpop button:hover { border-color: var(--primary); }
/* Chọn kho đang làm (người được cấp kho làm thêm) */
.top-wh { display: inline-flex; align-items: center; gap: 6px; margin-right: 8px; padding: 4px 6px 4px 12px; border-radius: 999px; background: #fef3c7; border: 1px solid #fcd34d; }
.top-wh select { border: 0; background: transparent; font: inherit; font-weight: 600; color: #92400e; padding: 4px 2px; cursor: pointer; max-width: 200px; }
@media (max-width: 700px) { .top-wh .ic { display: none; } .top-wh select { max-width: 120px; } }
/* Đối soát (22/10): cột Sản phẩm giữ đủ rộng ở MỌI màn máy tính (trước chỉ từ 1700px → màn 1380px bị bóp còn 1 chữ/dòng); tên SP tối đa 2 dòng */
@media (min-width: 900px) {
  #rc-t .ftbl td:nth-child(6) { min-width: 240px; }
  #rc-t .ftbl td:nth-child(6) .odi > div > div:first-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  #rc-t .ftbl td:nth-child(6) .odi img, #rc-t .ftbl td:nth-child(6) .odi .odi-no { width: 34px; height: 34px; }
  #rc-t .ftbl td:nth-child(8) { max-width: 150px; }
  #rc-t .ftbl td:nth-child(5) { max-width: 110px; }
}
@media (min-width: 900px) {
  #rc-t .ftbl td, #rc-t .ftbl th { padding-left: 5px; padding-right: 5px; }
  #rc-t .ftbl th { white-space: normal; } #rc-t .ftbl th .fth { white-space: normal; }
  #rc-t .ftbl td:nth-child(6) { min-width: 220px; }
  #rc-t [data-vhs] { max-width: 128px !important; font-size: 13px; }
  #rc-t .ftbl td:nth-child(11) { max-width: 140px; } #rc-t .ftbl td:nth-child(8) { max-width: 125px; }
  #rc-t .ftbl td:nth-child(9), #rc-t .ftbl td:nth-child(10) { max-width: 100px; } #rc-t .ftbl td:nth-child(12) { max-width: 105px; } #rc-t .ftbl td:nth-child(12) .btn { white-space: normal; }
}

.btn.cp-ok{background:#dcfce7!important;border-color:#16a34a!important;color:#15803d!important;font-weight:600}

.up-vbtn{width:100%;margin:8px 0 10px;justify-content:center}
.uv-bar{height:10px;border-radius:6px;background:var(--line,#e5e7eb);overflow:hidden}.uv-bar i{display:block;height:100%;width:0;background:#0f766e;transition:width .3s}

.pr-fr .chips { flex-wrap: nowrap; align-items: flex-start; } .pr-fr .chips > .chip { flex: none; } .pr-fv { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
@media (max-width: 640px) { .pr-fv { flex-wrap: nowrap; } .pr-fv .chip { flex: none; } }

.pr-act[hidden], #pr-f[hidden] { display: none !important; }
/* 20/11/2026 (chị My): nút Xuất Excel + Làm mới lên góc trên phải, cùng hàng các tab */
.pr-top { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; } .pr-top .pr-tabs { min-width: 0; } .pr-top > .btn { flex: none; }
/* 20/11/2026 (chị My): 1 hàng — ô chọn tất cả · ô tìm ngắn · các nút thao tác */
.pr-bar { position: sticky; top: 0; z-index: 3; background: var(--card, #fff); padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; gap: 8px; align-items: center; }
.pr-bar .pr-act { position: static; padding: 0; border: 0; background: none; }
.pr-allbox { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 38px; cursor: pointer; flex: none; } .pr-allbox input { width: 18px; height: 18px; cursor: pointer; }
.sbox.pr-qw { flex: 0 1 340px; min-width: 220px; }
.pr-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; justify-content: flex-end; }
.pr-btns[hidden] { display: none !important; }
/* 20/11/2026 (chị My): bộ lọc In đơn chia 2 khối trái / phải */
#pr-f { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
#pr-f .pr-fcol { min-width: 0; } #pr-f .pr-fcol + .pr-fcol { border-left: 1px dashed var(--line); padding-left: 14px; }
#pr-f .pr-fr { grid-template-columns: 112px 1fr; }
#pr-f .pr-fl { font-weight: 700; color: var(--text, #0f172a); font-size: 13px; } /* 20/11 (chị My): tên mục lọc đậm, rõ */
@media (max-width: 900px) { #pr-f { grid-template-columns: 1fr; } #pr-f .pr-fcol + .pr-fcol { border-left: 0; padding-left: 0; border-top: 1px dotted var(--line); } }

.od-tl { border-left: 2px solid var(--line); margin: 6px 0 14px 6px; padding-left: 10px; max-height: 46vh; overflow: auto; }
.od-tl-r { display: grid; grid-template-columns: 118px 22px 1fr; gap: 6px; padding: 4px 0; font-size: 13.5px; align-items: start; }
.od-tl-t { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; } .od-tl-r.kho .od-tl-x { color: #0f766e; font-weight: 600; } .od-tl-r.vc .od-tl-x { color: #334155; }
.od-tl-k { display: inline-block; padding: 0 6px; border-radius: 6px; font-size: 11.5px; } .od-tl-k.kho { background: #ccfbf1; color: #0f766e; } .od-tl-k.san { background: #fef3c7; color: #92400e; } .od-tl-k.vc { background: #e2e8f0; color: #334155; }
.od-tl-r.san .od-tl-x { color: #92400e; }
.od-tl-g > summary { cursor: pointer; list-style: none; } .od-tl-g > summary::-webkit-details-marker { display: none; } .od-tl-g > summary:hover { background: #f1f5f9; } .od-tl-g[open] > summary { font-weight: 600; } .od-tl-g > div.od-tl-r { padding-left: 14px; }
@media (max-width: 640px) { .od-tl-r { grid-template-columns: 1fr; gap: 0; } .od-tl-i { display: none; } }

/* Danh sách đơn: mỗi sản phẩm tối đa 2 dòng — dòng 1 tên (dài thì …), dòng 2 phân loại + SKU × SL */
.odi .odi-t { min-width: 0; flex: 1; } .odi .odi-n, .odi .odi-v { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .odi .odi-n { line-height: 1.35; } .odi .odi-v { line-height: 1.3; }

.rr-xl { margin: 14px 0 6px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; } .rr-xl > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .rr-xl > summary::-webkit-details-marker { display: none; }
.rr-xl-ed { margin-left: auto; color: #0f766e; font-size: 13px; font-weight: 600; } .rr-xl[open] .rr-xl-ed { visibility: hidden; } .rr-xl[open] > summary { margin-bottom: 8px; }

/* 22/10: Đối soát — mã đơn dài (VD 261018V6WP0TUW) nằm 1 dòng; cột Sản phẩm hẹp lại một chút nhường chỗ */
#rc-t .ftbl td:nth-child(4) { max-width: none; } #rc-t .ftbl td:nth-child(4) > .code { white-space: nowrap; word-break: normal; }
#rc-t .ftbl td:nth-child(6) { min-width: 200px !important; } #rc-t .ftbl td:nth-child(6) .odi { max-width: 290px; }

/* Nút Xuất Excel: màu xanh lá Excel */
.btn.btn-xls { background: #107c41; border-color: #107c41; color: #fff; } .btn.btn-xls:hover { background: #0b5f31; border-color: #0b5f31; color: #fff; } .btn.btn-xls:disabled { opacity: .6; }

/* Báo cáo cuối ngày */
.dr-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.dr-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.dr-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: #fff; cursor: help; }
.dr-card.main { background: #ecfdf5; border-color: #99f6e4; } .dr-card.ok .dr-cv { color: #047857; } .dr-card.warn .dr-cv { color: #b45309; }
.dr-cl { font-size: 13px; color: var(--muted); font-weight: 600; } .dr-cv { font-size: 30px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; } .dr-cs { font-size: 12px; color: var(--muted); }
.dr-sec { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; } .dr-sec h4 { margin: 0 0 8px; font-size: 14.5px; }
.dr-dv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.dr-dvc { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; background: #f8fafc; font-size: 14px; } .dr-dvc b { font-size: 17px; font-variant-numeric: tabular-nums; } .dr-dvc.zero { opacity: .45; }
.dr-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .dr-grid2 .dr-sec { margin-bottom: 0; }
.dr-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 14px; } .dr-row:last-child { border-bottom: 0; } .dr-row b { font-variant-numeric: tabular-nums; white-space: nowrap; } .dr-row.strong { font-size: 15px; } .dr-row.strong b { color: #b45309; font-size: 17px; }
.dr-i { color: #0f766e; cursor: help; font-size: 12px; }
@media (max-width: 760px) { .dr-cards { grid-template-columns: 1fr 1fr; } .dr-grid2 { grid-template-columns: 1fr; } .dr-cv { font-size: 24px; } }

#dr-o { position: relative; transition: opacity .15s; } #dr-o.dr-busy { opacity: .45; pointer-events: none; } #dr-o.dr-busy::after { content: ''; position: absolute; top: 40px; left: 50%; width: 30px; height: 30px; margin-left: -15px; border: 3px solid #99f6e4; border-top-color: #0f766e; border-radius: 50%; animation: spin .8s linear infinite; }

.dr-dv7 { display: grid; grid-template-columns: repeat(var(--n, 7), minmax(0, 1fr)); gap: 8px; }
.dr-dvt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 10px 6px; border-radius: 10px; background: #f8fafc; border: 1px solid var(--line); text-align: center; }
.dr-dvt span { font-size: 13px; color: var(--muted); font-weight: 600; white-space: nowrap; } .dr-dvt b { font-size: 24px; line-height: 1.15; font-variant-numeric: tabular-nums; } .dr-dvt em { font-style: normal; font-size: 12px; color: var(--muted); } .dr-dvt.zero { opacity: .45; }
@media (max-width: 1100px) { .dr-dv7 { grid-template-columns: repeat(4, minmax(0, 1fr)); } } @media (max-width: 560px) { .dr-dv7 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.dr-svt td, .dr-svt th { padding: 6px 10px; font-size: 13.5px; } .dr-svt tr.g1 td { border-top: 2px solid var(--line); } .dr-svt .dr-svg { background: #f8fafc; vertical-align: top; min-width: 130px; } .dr-svt .dr-sub td { background: #f8fafc; font-size: 13px; } .dr-svt .dr-tot td { border-top: 2px solid #94a3b8; background: #ecfdf5; }

.dr-row.dr-click { cursor: pointer; border-radius: 6px; } .dr-row.dr-click:hover { background: #f0fdfa; } .dr-row.dr-click:hover span:first-child { color: #0f766e; } .dr-go { color: #0f766e; font-weight: 700; }

.dr-i { border: 0; background: none; padding: 0 2px; color: #0f766e; cursor: pointer; font-size: 14px; line-height: 1; vertical-align: baseline; } .dr-i:hover { color: #115e59; transform: scale(1.15); }
.dr-pop { position: fixed; z-index: 3000; max-width: 360px; background: #0f172a; color: #fff; font-size: 13.5px; line-height: 1.5; padding: 10px 12px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.dr-card { cursor: default; }

.dr-pop { pointer-events: none; } /* không che ⓘ bên cạnh */

#fbs-tbl .tbl-wrap { max-height: 56vh; overflow: auto; }
.fbs-grp { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 6px 0 4px; padding: 7px 10px; border-left: 4px solid #0f766e; border-radius: 6px; background: #f0fdfa; color: #115e59; font-weight: 700; font-size: 14px; }
.fbs-grp.huy { border-left-color: #b91c1c; background: #fef2f2; color: #991b1b; margin-top: 16px; } .fbs-grp b { font-variant-numeric: tabular-nums; }
.fbs-sub { padding-left: 14px; }
.dr-grid2 .tbl thead th { position: static; }
.dr-row.fbs-warn { background: #fef2f2; border: 1px solid #fca5a5; border-radius: 8px; padding: 7px 10px; margin: 3px 0; color: #991b1b; font-weight: 700; } .dr-row.fbs-warn b { color: #b91c1c; } .dr-row.fbs-warn:hover { background: #fee2e2; } .dr-row.fbs-warn:hover span:first-child { color: #7f1d1d; }
.fbs-warn-tag { font-style: normal; font-weight: 600; font-size: 12px; color: #fff; background: #dc2626; border-radius: 999px; padding: 1px 8px; margin-left: 6px; white-space: nowrap; }
.ftbl thead th.tgrp { text-align: center; border-bottom: 1px solid var(--line); background: #ecfdf5; color: #0f766e; }
.ftbl thead tr.th2 th { font-size: 12px; }
.ftbl th.kc, .ftbl td.kc { padding-left: 5px; padding-right: 5px; min-width: 0; width: 52px; }
.kho-tg { border: 1px solid #99f6e4; background: #f0fdfa; color: #0f766e; border-radius: 6px; padding: 2px 8px; font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; } .kho-tg:hover { background: #ccfbf1; }
#fbs-tbl th.c-sp, #fbs-tbl td.c-sp { background: #fff7ed; color: #9a3412; } #fbs-tbl th.c-nh, #fbs-tbl td.c-nh { background: #f5f3ff; color: #5b21b6; }
#fbs-tbl th small { font-weight: 600; font-size: 10.5px; opacity: .8; text-transform: none; }
.lg-sp { color: #fdba74; } .lg-nh { color: #c4b5fd; }
.modal.full { width: 100% !important; height: 100%; max-height: none; border-radius: 10px; }
.modal-bg:has(> .modal.full) { padding: 8px; }
#fbs-tbl .tbl-wrap { max-height: calc(100vh - 300px); }
.dr-card.dr-click { cursor: pointer; } .dr-card.dr-click:hover { border-color: #0f766e; box-shadow: 0 2px 10px rgba(15,118,110,.15); }
.dr-pop { white-space: pre-line; max-width: 440px; }
.rs-why { display: inline-block; margin-top: 4px; padding: 5px 10px; border-radius: 8px; background: #fef2f2; border: 1px solid #fca5a5; color: #b91c1c; font-size: 14px; font-weight: 700; }
.rs-why b { font-weight: 600; color: #7f1d1d; margin-right: 4px; }
.rs-why i { display: block; font-weight: 500; font-style: normal; color: #7f1d1d; margin-top: 2px; }
.dr-tagc { min-width: 150px; } .dr-tagc .otag { max-width: 260px; white-space: normal; text-overflow: clip; }
.r-us { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--brand, #0f766e); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.r-us:hover { color: #115e59; }
.hc-ico { color: #b91c1c; border-color: #fecaca; } .hc-ico:hover { background: #fef2f2; border-color: #f87171; }
#tipup::after { content: ''; position: absolute; top: 100%; left: var(--ax, 50%); transform: translateX(-50%); border: 6px solid transparent; border-top-color: #0f172a; } /* 13/11/2026: mũi tên chỉ đúng nút */
#tipup { position: fixed; z-index: 4000; pointer-events: none; background: #0f172a; color: #fff; font-size: 13px; padding: 5px 10px; border-radius: 7px; white-space: normal; max-width: 280px; width: max-content; line-height: 1.45; box-shadow: 0 4px 14px rgba(0,0,0,.2); } /* 14/11 chị My: chú thích dài tự xuống dòng, không kéo thành 1 dòng dài */
.xh-note { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 6px; background: #fef2f2; border: 1px solid #fca5a5; color: #b91c1c; font-size: 12px; font-weight: 600; white-space: normal; }
.cx-btns:first-child { margin-top: 0; }
.xh-note { white-space: nowrap; }
.ct-xbar { display: flex; justify-content: flex-end; margin: 0 0 6px; }
.dr-x { font-weight: 400; font-size: 12.5px; }
/* tab con (thuộc 1 tab mẹ): gạch chân, lùi vào, có đường nối — khác tab mẹ dạng viên */
.subtabs { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 18px; margin: -2px 0 12px 22px; padding: 6px 0 0 14px; border-left: 2px solid #99d5cd; border-bottom: 1px solid var(--line, #e5e7eb); position: relative; }
.subtabs::before { content: ''; position: absolute; left: -2px; top: -10px; height: 10px; border-left: 2px solid #99d5cd; }
.subtabs .st-of { font-size: 12px; color: #64748b; padding-bottom: 7px; }
.subtabs .stab { background: none; border: 0; border-bottom: 3px solid transparent; padding: 4px 2px 6px; margin-bottom: -1px; font: inherit; font-size: 13.5px; color: #475569; cursor: pointer; }
.subtabs .stab:hover { color: #0f766e; }
.subtabs .stab.on { color: #0f766e; font-weight: 700; border-bottom-color: #0f766e; }
.subtabs .stab b { font-weight: 600; margin-left: 2px; padding: 0 6px; border-radius: 9px; background: #f1f5f9; font-size: 12px; }
.subtabs .stab.on b { background: #ccfbf1; }
.ordp-need { margin: 6px 0 4px; padding: 7px 10px; border-radius: 8px; background: #fff7ed; border: 1px solid #fdba74; color: #9a3412; font-size: 14px; }
.ordp-need { display: flex; align-items: center; gap: 10px; } .ordp-need > span { flex: 1; } .ordp-need .btn { flex: none; }
/* Biên bản bàn giao: các ô số gọn trên 1 hàng (28/10/2026) */
.ho-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ho-stats .pk-st { flex: 1 1 170px; flex-direction: column; gap: 6px; padding: 14px 18px; border-radius: 14px; }
.ho-stats .pk-st span { font-size: 14px; } .ho-stats .pk-st b { font-size: 34px; line-height: 1.1; white-space: nowrap; }
@media (max-width: 640px) { .ho-stats .pk-st { flex-basis: calc(50% - 4px); padding: 10px 14px; } .ho-stats .pk-st b { font-size: 26px; } .ho-stats .pk-st:last-child { grid-column: auto; } }
.ho-cam { margin: 10px 0 12px; } .ho-cam .scan-view { max-width: 560px; } .ho-cam p { text-align: center; margin: 8px auto 0; max-width: 560px; }
.btn.ho-back { background: #ccfbf1; border: 2px solid #0f766e; color: #0f766e; font-weight: 700; } .btn.ho-back:hover { background: #99f6e4; color: #115e59; }
.ho-odi { max-width: 520px; align-items: center; } .ho-odi .ho-odi-p { flex: none; min-width: 70px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
/* 🔒 Phân hệ theo gói (28/10/2026) */
.side-nav a.nav-lock { opacity: .55; } .side-nav a.nav-lock .lock { font-size: 11px; margin-left: 4px; }
.upsell { max-width: 620px; margin: 40px auto; text-align: center; padding: 28px 24px; } .upsell .up-ic { font-size: 40px; } .upsell h2 { margin: 8px 0 6px; } .upsell p { color: var(--muted); margin: 0 0 16px; }
/* 🚫 Chờ đóng hàng: ĐVVC lấy hàng không thành công (28/10/2026) */
.pd-tbl tr.pd-pfail td { background: #fef2f2; } .pd-tbl tr.pd-pfail td:first-child { box-shadow: inset 4px 0 0 #dc2626; }
.pd-pf { margin-top: 4px; display: inline-block; padding: 2px 8px; border-radius: 6px; background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; font-size: 12.5px; font-weight: 700; }
.pd-pf { display: block; white-space: normal; max-width: 180px; line-height: 1.3; } .pd-pf span { display: block; font-weight: 500; font-size: 11.5px; color: #b91c1c; } /* gọn cột Mã vận đơn (29/10/2026) */
/* ⏰ Hạn xác nhận giao (29/10/2026) */
.side-nav a .nav-due { margin-left: auto; padding: 1px 7px; border-radius: 999px; background: #f59e0b; color: #1f1300; font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.side-nav a .nav-due.late { background: #dc2626; color: #fff; }
.layout.side-min .side-nav a { position: relative; } .layout.side-min .side-nav a .nav-due { position: absolute; top: 2px; right: 2px; margin: 0; padding: 0 5px; font-size: 10px; }
.aa-safe { margin: 2px 0 8px 22px; } .aa-svc-r { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; } .aa-svc-r select { max-width: 320px; }
.aa-due { border: 1px solid #fcd34d; background: #fffbeb; border-radius: 10px; padding: 10px 12px; margin: 8px 0 10px; color: #1f2937; }
/* 🔐 Phân quyền theo thanh bên (30/10/2026) */
.perm-tbl tr.pmenu > td:first-child { font-weight: 600; }
.perm-tbl tr.psub > td:first-child { padding-left: 34px; color: var(--muted, #475569); font-size: 13.5px; }
.perm-tbl .psub-i { margin-left: -18px; margin-right: 6px; color: #94a3b8; }
/* 🤖 Trợ lý AI (troly.js, 01/11/2026): nút góc dưới phải + khung chat. Dưới lớp cửa sổ (.modal-bg z 50) để mở đơn / phiếu đè lên khung */
#troly { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 45; }
#troly.tl-hide { display: none; }
.tl-fab { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px 0 8px; border-radius: 99px; border: 2px solid var(--primary); background: var(--card); color: var(--primary); font-weight: 700; font-size: 15px; cursor: pointer; box-shadow: 0 6px 20px rgba(15,118,110,.25); }
.tl-fab:hover { background: var(--primary-soft); }
.tl-ic { position: relative; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; }
.tl-ic i { position: absolute; top: -1px; right: -1px; width: 9px; height: 9px; border-radius: 50%; background: #22c55e; border: 2px solid var(--card); }
#troly.open .tl-fab { display: none; }
.tl-box { display: none; position: absolute; right: 0; bottom: 0; width: min(420px, calc(100vw - 24px)); height: min(640px, calc(100vh - 90px)); background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 48px rgba(15,23,42,.28); flex-direction: column; overflow: hidden; }
#troly.open .tl-box { display: flex; }
.tl-box header { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: var(--primary); color: #fff; }
.tl-box header b { flex: 1; font-size: 16px; }
.tl-av { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--primary); }
.tl-x { width: 34px; height: 34px; border-radius: 9px; border: 0; background: rgba(255,255,255,.18); color: #fff; cursor: pointer; font-size: 15px; }
.tl-x:hover { background: rgba(255,255,255,.3); }
.tl-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.tl-msg { max-width: 94%; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); line-height: 1.45; }
.tl-msg.me { align-self: flex-end; background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; }
.tl-h { font-weight: 600; margin-bottom: 4px; }
.tl-dots { color: var(--muted); }
.tl-card { border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; margin-top: 8px; background: var(--card); }
.tl-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tl-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--primary-soft); color: #115e59; }
.tl-tag svg, .tl-tag img, .tl-row svg, .tl-row img, .tl-tbl svg, .tl-tbl img { width: 14px; height: 14px; vertical-align: -2px; margin-right: 3px; }
.tl-code { font-family: ui-monospace, Consolas, monospace; font-size: 14px; }
.tl-mono { font-family: ui-monospace, Consolas, monospace; }
.tl-cp { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 2px; font-size: 14px; }
.tl-cp:hover { color: var(--primary); }
.tl-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.tl-it { color: var(--text); }
.tl-st { margin-top: 6px; font-weight: 600; font-size: 13.5px; padding: 4px 8px; border-radius: 8px; background: #f1f5f9; }
.tl-st.ok { background: #dcfce7; color: #166534; } .tl-st.warn { background: #fef3c7; color: #92400e; } .tl-st.bad { background: #fee2e2; color: #991b1b; }
.tl-trail { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; font-size: 12.5px; border-left: 2px solid var(--primary-soft); padding-left: 8px; }
.tl-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tl-btns .btn { text-decoration: none; }
.tl-red { color: #b91c1c; font-weight: 600; }
.tl-row { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); padding: 6px 2px; cursor: pointer; font-size: 13px; }
.tl-row:hover { background: var(--primary-soft); }
.tl-ul { margin: 4px 0; padding-left: 18px; }
.tl-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 6px 0; }
.tl-tbl th, .tl-tbl td { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: right; font-weight: 400; }
.tl-tbl th { color: var(--muted); } .tl-tbl th:first-child, .tl-tbl td:first-child { text-align: left; }
.tl-chips { display: flex; flex-wrap: nowrap; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; }
.tl-chips button { flex: 0 0 auto; }
.tl-chips:empty { display: none; }
.tl-chips button { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 99px; padding: 5px 11px; font-size: 12.5px; cursor: pointer; }
.tl-chips button:hover { border-color: var(--primary); color: var(--primary); }
.tl-in { position: relative; display: flex; gap: 8px; padding: 10px 12px 6px; }
.tl-in input { flex: 1; border: 1.5px solid var(--primary); border-radius: 12px; padding: 10px 12px; }
.tl-mic, .tl-go { flex: 0 0 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer; font-size: 17px; }
.tl-mic { background: #f1f5f9; } .tl-mic.on { background: #fee2e2; animation: tlPulse 1s infinite; }
.tl-go { background: var(--primary); color: #fff; }
@keyframes tlPulse { 50% { box-shadow: 0 0 0 6px rgba(220,38,38,.18); } }
.tl-recent { position: absolute; left: 12px; right: 12px; bottom: calc(100% - 4px); background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 -8px 24px rgba(15,23,42,.12); padding: 6px; max-height: 260px; overflow-y: auto; }
.tl-rh { font-size: 11.5px; font-weight: 700; color: var(--primary); padding: 4px 8px; }
.tl-recent button { display: flex; justify-content: space-between; gap: 8px; width: 100%; border: 0; background: none; color: var(--text); padding: 7px 8px; border-radius: 8px; cursor: pointer; text-align: left; }
.tl-recent button:hover { background: var(--primary-soft); }
.tl-foot { font-size: 11px; color: var(--muted); text-align: center; padding: 0 12px 10px; }
@media (max-width: 700px) {
  #troly { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .tl-fab { padding: 0 6px; height: 50px; } .tl-ft { display: none; } .tl-ic { width: 36px; height: 36px; }
  #troly.open { inset: 0; } .tl-box { position: fixed; inset: 0; width: 100%; height: 100%; border-radius: 0; }
}
@media print { #troly { display: none !important; } }
:root[data-theme="dark"] .tl-st { background: #1e293b; } :root[data-theme="dark"] .tl-tag { color: #5eead4; } :root[data-theme="dark"] .tl-mic { background: #1e293b; }
/* ✥ Kéo nút / thanh tiêu đề Trợ lý để dời chỗ (01/11/2026) */
.tl-fab, .tl-box header { touch-action: none; }
.tl-box header { cursor: grab; user-select: none; }
.tl-hint { font-weight: 400; font-size: 11.5px; opacity: .75; margin-left: 6px; }
#troly.tl-drag, #troly.tl-drag * { cursor: grabbing !important; user-select: none; }
#troly.tl-drag .tl-fab { box-shadow: 0 12px 30px rgba(15,118,110,.4); }
@media (max-width: 700px) { #troly.open { inset: 0 !important; } .tl-box { transform: none !important; } .tl-hint { display: none; } }
/* 07/11/2026 (chị My): Khiếu nại — cột "KQ · Shop đã làm gì" đủ rộng (trước bị ép còn ~1 chữ/dòng), Lý do khách & Shop gọn lại */
#rs-tbl .ftbl td:nth-child(11) > div { min-width: 180px; } #rs-tbl .ftbl td:nth-child(11) { max-width: 240px; }
#rs-tbl .ftbl th:nth-child(11) .fth { min-width: 150px; }
#rs-tbl .ftbl td:nth-child(6) { max-width: 200px; } #rs-tbl .ftbl td:nth-child(3) { max-width: 150px; }
#rs-tbl .ftbl td:nth-child(10) { min-width: 90px; } #rs-tbl .ftbl td:nth-child(9) { min-width: 95px; }
#rs-tbl .ftbl td:nth-child(13) { width: 1%; }
/* 08/11/2026: lời khách gõ chuỗi liền không dấu cách ("Kkkkk…") tràn đè sang các cột bên → tự ngắt dòng, tối đa 3 dòng (rê chuột xem đủ) */
#rs-tbl .ftbl td:nth-child(6) div { overflow-wrap: anywhere; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.kv td, .od-tl-x, .banner { overflow-wrap: anywhere; }
/* ⏰ 08/11/2026: dải báo động hạn trả lời khiếu nại — trên cùng mọi trang (ai có mục Khiếu nại) */
#kn-alarm:empty { display: none; }
.kn-alarm { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 10px 24px 0; padding: 10px 14px; border-radius: 10px; background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; text-decoration: none; font-size: 14px; animation: knp 2s ease-in-out infinite; }
.kn-alarm:hover { background: #fecaca; } .kn-alarm .kn-go { margin-left: auto; font-weight: 700; white-space: nowrap; }
@keyframes knp { 0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); } 50% { box-shadow: 0 0 0 4px rgba(220,38,38,.18); } }
@media (max-width: 640px) { .kn-alarm { margin: 8px 12px 0; font-size: 13px; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kn-alarm { background: #450a0a; border-color: #7f1d1d; color: #fecaca; } }
:root[data-theme="dark"] .kn-alarm { background: #450a0a; border-color: #7f1d1d; color: #fecaca; }
/* 📍 08/11/2026: chú thích cột kiểu QORAI — dòng số liệu có gạch chân + mũi tên chỉ xuống đỉnh cột đang rê chuột */
#ccall { --cc-ink: #1e4f63; position: fixed; inset: 0; pointer-events: none; z-index: 60; color: var(--cc-ink); }
#ccall[hidden] { display: none; }
#ccall .cc-svg { position: fixed; inset: 0; width: 100vw; height: 100vh; overflow: visible; }
#ccall .cc-lbl { position: fixed; white-space: nowrap; font-size: 14px; padding: 2px 4px; background: color-mix(in srgb, var(--card, #fff) 88%, transparent); border-radius: 4px; }
#ccall .cc-h { color: var(--cc-ink); } #ccall .cc-sep { color: #94a3b8; margin: 0 8px; font-weight: 400; }
.dchart.cc-hover g[data-cc]:not(.cc-on) rect:not(.cc-hit) { opacity: .45; }
.dchart g[data-cc] { cursor: default; } .dchart g.cc-on rect:not(.cc-hit) { filter: saturate(1.25) brightness(.92); }
.sbars.cc-hover .scol:not(.cc-on) .sstack { opacity: .45; } .sbars .scol.cc-on .sstack { filter: saturate(1.25) brightness(.92); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #ccall { --cc-ink: #7dd3fc; } }
:root[data-theme="dark"] #ccall { --cc-ink: #7dd3fc; }
/* 11/11/2026 (Kiệt): dải báo động ghi rõ từng đơn */
.kn-alarm .kn-don { display: inline-block; margin: 0 4px; padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,.65); border: 1px solid #fca5a5; white-space: nowrap; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kn-alarm .kn-don { background: rgba(0,0,0,.25); border-color: #7f1d1d; } }
:root[data-theme="dark"] .kn-alarm .kn-don { background: rgba(0,0,0,.25); border-color: #7f1d1d; }

/* 🛍️ Sản phẩm trên sàn (13/11/2026): hàng lọc kiểu BigSeller + phân loại xếp chồng thẳng hàng giữa các cột */
.spf { margin-top: 10px; border: 1px solid var(--line, #e5e7eb); border-radius: 12px; padding: 4px 14px; background: var(--card, #fff); }
.spf-r { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line, #e5e7eb); }
.spf-r:last-child { border-bottom: 0; }
.spf-l { flex: 0 0 92px; color: var(--muted, #64748b); font-size: 14px; }
.spf-c { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1; min-width: 0; }
.spf-tim { flex-wrap: nowrap; }
.sp-tbl td { vertical-align: top; }
.spv > div { min-height: 40px; display: flex; flex-direction: column; justify-content: center; border-bottom: 1px dotted var(--line, #e5e7eb); }
.spv > div:last-child { border-bottom: 0; }
.spv-n { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spv-k { font-weight: 500; font-size: 12px; }
.spv-more { margin-top: 4px; }
@media (max-width: 700px) { .spf-r { flex-direction: column; align-items: stretch; gap: 4px; } .spf-l { flex: none; } .spf-tim { flex-wrap: wrap; } }
#sp-mode a.chip { text-decoration: none; }
.sp-sel { position: sticky; top: 8px; z-index: 6; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; }
/* ⭐ Đánh giá sản phẩm (13/11/2026) */
.dg-row { display: grid; grid-template-columns: 26px minmax(220px, 300px) 1fr; gap: 12px; padding: 12px 8px; border-bottom: 1px solid var(--line, #e5e7eb); }
.dg-row.xau { background: #fff7f7; }
.dg-anh { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0; } .dg-anh img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line, #e5e7eb); }
.dg-tl { margin-top: 6px; padding: 8px 10px; background: #f0fdf4; border-left: 3px solid #10b981; border-radius: 6px; font-size: 14px; }
.dg-form textarea { width: 100%; }
@media (max-width: 700px) { .dg-row { grid-template-columns: 26px 1fr; } .dg-nd { grid-column: 1 / -1; } }
/* 🔀 Theo mã SKU (13/11/2026): mỗi SKU 1 khối như BigSeller */
.skb { border: 1px solid var(--line, #e5e7eb); border-radius: 12px; margin-bottom: 12px; overflow: hidden; background: var(--card, #fff); }
.skb-h { display: flex; gap: 12px; align-items: center; padding: 10px 12px; background: #f8fafc; border-bottom: 1px solid var(--line, #e5e7eb); }
.skb-h img, .skb-h .odi-no { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; flex: none; }
.skb-mis { display: inline-flex; align-items: center; gap: 3px; margin: 2px 8px 0 0; padding: 1px 8px; border-radius: 99px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: 12px; }
.skb-t { margin: 0; } .skb-t td { vertical-align: top; }
.skb-n { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ⚡ Nút thao tác từng dòng sản phẩm (13/11/2026) — icon nhỏ, rê chuột hiện chú thích */
.sp-act { display: grid; grid-template-columns: repeat(2, 30px); gap: 4px; } /* 13/11: 2 cột dọc */
.sp-ic { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--line, #e5e7eb); background: var(--card, #fff); font-size: 15px; cursor: pointer; text-decoration: none; padding: 0; }
.sp-ic:hover:not([disabled]) { background: #ecfdf5; border-color: #10b981; transform: translateY(-1px); }
.sp-ic[disabled] { opacity: .35; cursor: not-allowed; }
.spv-n { display: block; max-width: 260px; } .spv-id { font-size: 11px; line-height: 1.3; }

.dg-img { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 6px; } .dg-img:hover img { outline: 2px solid #10b981; }
.lk-ton { background: none; border: 0; padding: 0 2px; cursor: pointer; font: inherit; color: inherit; border-bottom: 1px dashed #94a3b8; } .lk-ton:hover { color: #0f766e; border-bottom-color: #0f766e; }
.chip-dis { opacity: .5; cursor: not-allowed; } .gc-mau { width: 28px; height: 28px; border-radius: 6px; border: 2px solid transparent; cursor: pointer; } .gc-mau.on { border-color: #0f172a; box-shadow: 0 0 0 2px #fff inset; } .sp-gc { margin-top: 1px; } .sp-more { padding: 4px; min-width: 200px; }
.sp-thumb { position: relative; padding: 0; border: 0; background: none; cursor: zoom-in; flex: none; border-radius: 8px; line-height: 0; }
.sp-thumb img { display: block; }
.sp-thumb i { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 18px; background: rgba(15,23,42,.35); border-radius: 8px; opacity: 0; transition: opacity .12s; }
.sp-thumb:hover i { opacity: 1; }
#sp-prev { position: fixed; z-index: 3900; width: 320px; background: #fff; border-radius: 12px; box-shadow: 0 12px 32px rgba(15,23,42,.25); padding: 8px; }
#sp-prev img { display: block; width: 100%; height: 304px; object-fit: contain; }
#sp-prev .sp-prev-bt { display: flex; gap: 6px; justify-content: center; margin-top: 6px; }
/* 13/11/2026 (chị My): bảng Sản phẩm trên sàn — ảnh đại diện to hơn (80px), tên sản phẩm xuống tối đa 3 dòng (chỉ tên phân loại mới 1 dòng ...) */
.sp-tbl .odi { max-width: 420px; gap: 10px; } .sp-tbl .odi .sp-thumb img, .sp-tbl .odi .odi-no { width: 80px; height: 80px; border-radius: 8px; } .sp-tbl .sp-thumb, .sp-tbl .sp-thumb i { border-radius: 8px; }
.sp-tbl .odi .odi-n { white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; margin-bottom: 2px; }
.tn-ban { color: #1d4ed8 !important; } /* 13/11: cột "Có thể bán" xanh dương cho nổi */
.spi { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 16px; align-items: start; }
.spi-main { max-height: 64vh; overflow: auto; padding-right: 6px; }
.spi-main section { border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; scroll-margin-top: 4px; }
.spi-main h3 { margin: 0 0 10px; font-size: 15px; }
.spi-main .spf { margin-top: 0; }
.spi-main .spf-c input:not([type]), .spi-main .spf-c select:not([style]) { min-width: 260px; max-width: 100%; }
#spi-ten { width: 100%; }
.spi-nav { position: sticky; top: 0; display: flex; flex-direction: column; border-left: 2px solid #e2e8f0; }
.spi-nav a { padding: 6px 10px; font-size: 13px; color: #475569; text-decoration: none; margin-left: -2px; border-left: 2px solid transparent; }
.spi-nav a:hover, .spi-nav a.on { color: #1d4ed8; border-left-color: #1d4ed8; }
.spi-imgs { display: flex; flex-wrap: wrap; gap: 10px; }
.spi-img { position: relative; width: 104px; height: 104px; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; background: #f8fafc; cursor: grab; }
.spi-img.keo { opacity: .4; }
.spi-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spi-bia { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(29,78,216,.85); color: #fff; font-size: 11px; text-align: center; padding: 2px 0; }
.spi-ic { position: absolute; left: 0; right: 0; bottom: 0; display: none; justify-content: center; gap: 4px; padding: 4px; background: rgba(15,23,42,.72); }
.spi-img:hover .spi-ic { display: flex; }
.spi-ic button { border: 0; background: transparent; color: #fff; border-radius: 6px; width: 28px; height: 24px; cursor: pointer; font-size: 14px; padding: 0; }
.spi-ic button:hover { background: rgba(255,255,255,.2); }
.spi-dang { display: flex; height: 100%; align-items: center; justify-content: center; font-size: 12px; color: #64748b; }
.spi-them { display: flex; flex-direction: column; align-items: center; justify-content: center; border-style: dashed; color: #1d4ed8; font-size: 22px; cursor: pointer; text-align: center; line-height: 1.2; }
.spi-multi { display: flex; flex-wrap: wrap; gap: 4px 14px; max-height: 140px; overflow: auto; border: 1px solid #e2e8f0; border-radius: 8px; padding: 6px 8px; }
.spi-multi label, .spi-lg label { font-size: 13px; white-space: nowrap; }
.spi-lg { display: flex; flex-wrap: wrap; gap: 6px 16px; }
@media (max-width: 760px) { .spi { grid-template-columns: 1fr; } .spi-nav { display: none; } .spi-main .spf-c input:not([type]), .spi-main .spf-c select:not([style]) { min-width: 0; width: 100%; } }
/* 🖼️ trình sửa ảnh (imgedit.js) */
.ie { position: fixed; inset: 0; z-index: 5000; background: #f1f5f9; display: flex; flex-direction: column; }
.ie-hd { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: #fff; border-bottom: 1px solid #e2e8f0; }
.ie-logo { font-size: 17px; margin-right: 10px; }
.ie-b { border: 1px solid #e2e8f0; background: #fff; border-radius: 8px; height: 32px; min-width: 34px; padding: 0 10px; cursor: pointer; font-size: 15px; user-select: none; }
.ie-b:hover { background: #f1f5f9; }
.ie-ten { color: #64748b; font-size: 13px; max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ie-sw { font-size: 13px; display: flex; align-items: center; gap: 4px; margin-right: 6px; }
.ie-bd { flex: 1; display: flex; min-height: 0; }
.ie-rail { width: 76px; background: #fff; border-right: 1px solid #e2e8f0; display: flex; flex-direction: column; padding: 8px 6px; gap: 4px; }
.ie-rail button { border: 0; background: none; border-radius: 10px; padding: 8px 2px; font-size: 11.5px; color: #334155; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ie-rail button span { font-size: 20px; }
.ie-rail button.on, .ie-rail button:hover { background: #e0f2fe; color: #0369a1; }
.ie-pn { width: 300px; background: #fff; border-right: 1px solid #e2e8f0; overflow: auto; padding: 4px 14px 20px; }
.ie-pn h4 { margin: 16px 0 8px; font-size: 14px; padding-left: 8px; border-left: 3px solid #2563eb; }
.ie-pn input:not([type]), .ie-pn textarea, .ie-pn select { width: 100%; margin-bottom: 6px; }
.ie-pn .ie-row input:not([type]) { width: 72px; margin: 0; }
.ie-pn .ie-row select { width: auto; margin: 0; }
.ie-pn input[type=color] { width: 34px; height: 28px; padding: 0 2px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; }
.ie-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.ie-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.ie-chips button { border: 1px solid #cbd5e1; background: #fff; border-radius: 999px; padding: 4px 10px; font-size: 12.5px; cursor: pointer; }
.ie-chips button.on, .ie-chips button:hover { border-color: #2563eb; color: #1d4ed8; background: #eff6ff; }
.ie-sl { display: block; font-size: 12.5px; margin: 6px 0; }
.ie-sl span { display: flex; justify-content: space-between; }
.ie-sl input { width: 100%; }
.ie-tpl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ie-tpl button { border: 1px solid #e2e8f0; background: #fff; border-radius: 10px; padding: 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; }
.ie-tpl button:hover { border-color: #2563eb; }
.ie-tpl canvas { width: 96px; height: 96px; border-radius: 6px; }
.ie-card { border: 1px solid #e2e8f0; border-radius: 10px; padding: 8px; margin-top: 8px; }
.ie-x { border: 0; background: none; cursor: pointer; }
.ie-st { flex: 1; position: relative; display: flex; overflow: auto; /* 19/11 (Phúc): không căn giữa bằng flex — ảnh to hơn khung bị cắt mất phần trên, cuộn không tới */ background: #e2e8f0 repeating-conic-gradient(#e5e7eb 0 25%, #f1f5f9 0 50%) 0 0 / 20px 20px; }
.ie-st canvas { box-shadow: 0 6px 24px rgba(15,23,42,.18); touch-action: none; flex: none; margin: auto; } /* margin auto: vừa khung thì ở giữa, to hơn khung thì cuộn xem đủ 4 phía */
.ie-load { color: #475569; }
.ie-zoom { position: absolute; right: 16px; bottom: 14px; display: flex; align-items: center; gap: 4px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 4px; }
.ie-zoom button { border: 0; background: none; width: 28px; height: 28px; font-size: 16px; cursor: pointer; border-radius: 6px; }
.ie-zoom button:hover { background: #f1f5f9; }
.ie-zoom span { min-width: 52px; text-align: center; font-size: 13px; }
.ie-info { position: absolute; left: 16px; bottom: 16px; background: rgba(255,255,255,.9); border-radius: 8px; padding: 4px 10px; }
@media (max-width: 900px) { .ie-pn { width: 220px; } .ie-ten { display: none; } }
.spv-ng { user-select: none; }
[data-chep] { cursor: copy; border-radius: 4px; }
[data-chep]:hover { background: #e0f2fe; color: #0369a1; }
[data-chep].chep-ok { background: #dcfce7; color: #15803d; }
.ie-tpl button.on { border-color: #2563eb; box-shadow: 0 0 0 2px #bfdbfe; }
/* hộp hỏi / thông báo / chú thích phải nổi TRÊN trình sửa ảnh (13/11: nút Đóng tưởng không phản ứng vì hộp hỏi bị che) */
.ie ~ .modal-bg { z-index: 5100; }
body:has(.ie) #toast { z-index: 5200; }
body:has(.ie) #tipup { z-index: 5300; }
a.chip { text-decoration: none; display: inline-flex; align-items: center; } /* tab là thẻ a (mở được tab mới) — không gạch chân */
.sel-tim .sel-op { padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel-tim .sel-op.hi { background: #e0f2fe; }
.sel-tim .sel-op.on { font-weight: 700; color: var(--brand, #0f766e); }
.sel-tim .sel-op.dis { color: #94a3b8; cursor: default; }
.sel-tim .flist { max-height: 320px; }
/* 🚀 bảng tổng Đẩy sản phẩm (kiểu BigSeller) */
.kd-tong td { vertical-align: middle; }
.kd-anh { display: flex; gap: 8px; flex-wrap: wrap; }
.kd-th { width: 72px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.kd-th img, .kd-th .kd-no { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid #e2e8f0; display: flex; align-items: center; justify-content: center; background: #f8fafc; font-size: 12px; color: #94a3b8; }
.kd-th > span:last-child { font-size: 11px; color: #64748b; text-align: center; line-height: 1.3; min-height: 2.6em; }
.kd-trong .kd-no { border-style: dashed; }
.km-sw { position: relative; display: inline-block; width: 42px; height: 24px; cursor: pointer; }
.km-sw input { opacity: 0; width: 0; height: 0; position: absolute; }
.km-sw span { position: absolute; inset: 0; background: #cbd5e1; border-radius: 99px; transition: background .15s; }
.km-sw span::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.km-sw input:checked + span { background: #0f766e; }
.km-sw input:checked + span::before { transform: translateX(18px); }
.km-sw input:disabled + span { opacity: .5; cursor: not-allowed; }
.dc-bar { height: 10px; background: #e2e8f0; border-radius: 99px; overflow: hidden; } .dc-bar i { display: block; height: 100%; background: #0f766e; transition: width .4s; }
.dc-2c { display: flex; gap: 0; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; margin-bottom: 12px; } .dc-2c > div { padding: 12px 14px; } .dc-c1 { min-width: 180px; background: #f8fafc; border-right: 1px solid #e2e8f0; } .dc-c2 { flex: 1; }
.dc-tc { border-top: 1px dashed #e2e8f0; padding-top: 8px; }

/* 📣 Quảng cáo — bảng chiến dịch kiểu BigSeller (13/11/2026) */
.qc-loc { border-bottom: 1px dashed var(--line); padding-bottom: 12px; margin-bottom: 10px; }
.qc-locr { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.qc-ll { font-size: 13px; color: var(--muted); font-weight: 600; }
.qc-shopb { min-width: 170px; text-align: left; }
.qc-tim { display: flex; flex: 0 1 420px; min-width: 240px; }
.qc-tim select { width: auto; border-radius: 8px 0 0 8px; border-right: 0; background: #f8fafc; }
.qc-tim input { flex: 1; border-radius: 0 8px 8px 0; }
.qc-thes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.qc-the { border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; cursor: pointer; background: var(--card); transition: border-color .15s, background .15s; }
.qc-the:hover { border-color: #94a3b8; }
.qc-the.on { border-color: var(--primary); background: var(--primary-soft); }
.qc-tl { font-size: 13px; font-weight: 600; }
.qc-tn { font-size: 20px; font-weight: 700; margin: 2px 0; font-variant-numeric: tabular-nums; }
.qc-ts { font-size: 12px; color: var(--muted); }
.qc-sua { border: 0; background: none; cursor: pointer; color: var(--primary); padding: 0 3px; font-size: 13px; }
.qc-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 8px; }
.qc-tab { border: 0; background: none; padding: 7px 12px; border-radius: 8px; cursor: pointer; color: var(--text); }
.qc-tab span { color: var(--primary); }
.qc-tab.on { background: #eef2f7; font-weight: 700; }
.qc-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.ic3 { padding: 5px 9px; }
.qc-wrap { max-height: calc(100vh - 210px); overflow: auto; }
.qc-t { border-collapse: separate; border-spacing: 0; }
.qc-t th { text-transform: none; font-size: 12.5px; color: var(--text); font-weight: 700; vertical-align: top; white-space: normal; min-width: 92px; }
.qc-t td { vertical-align: top; background: var(--card); }
.qc-t th.qc-sx { cursor: pointer; user-select: none; }
.qc-t tfoot td { position: sticky; bottom: 0; background: #f8fafc; border-top: 2px solid var(--line); z-index: 1; }
.qc-t .qc-c0, .qc-t .qc-c1, .qc-t .qc-c2, .qc-t .qc-c3 { position: sticky; z-index: 1; }
.qc-t thead .qc-c0, .qc-t thead .qc-c1, .qc-t thead .qc-c2, .qc-t thead .qc-c3, .qc-t thead .qc-cr { z-index: 3; }
.qc-t tfoot .qc-c0, .qc-t tfoot .qc-c1, .qc-t tfoot .qc-c2, .qc-t tfoot .qc-c3, .qc-t tfoot .qc-cr { z-index: 2; }
.qc-t .qc-c0 { left: 0; width: 36px; min-width: 36px; }
.qc-t .qc-c1 { left: 36px; width: 300px; min-width: 300px; max-width: 300px; }
.qc-t .qc-c2 { left: 336px; width: 140px; min-width: 140px; }
.qc-t .qc-c3 { left: 476px; width: 120px; min-width: 120px; box-shadow: 4px 0 6px -4px rgba(15, 23, 42, .18); }
.qc-t .qc-cr { position: sticky; right: 0; min-width: 70px; text-align: center; box-shadow: -4px 0 6px -4px rgba(15, 23, 42, .18); }
.qc-t td.qc-cr { background: var(--card); }
@media (max-width: 760px) { .qc-t .qc-c0, .qc-t .qc-c1, .qc-t .qc-c2, .qc-t .qc-c3, .qc-t .qc-cr { position: static; box-shadow: none; } .qc-t .qc-c1 { min-width: 230px; } }
.qc-hoi { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; border: 1px solid #94a3b8; color: #64748b; font-size: 10px; font-weight: 700; cursor: help; vertical-align: 1px; }
.qc-so0 { color: #cbd5e1; }
.qc-info { display: flex; gap: 10px; }
.qc-info img, .qc-noimg { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; flex: none; }
.qc-noimg { display: flex; align-items: center; justify-content: center; background: var(--bg); font-size: 22px; }
.qc-ten { display: flex; gap: 4px; align-items: flex-start; font-size: 13px; }
.qc-ten > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qc-sao { border: 0; background: none; cursor: pointer; color: #94a3b8; font-size: 15px; line-height: 1; padding: 0 2px; flex: none; }
.qc-sao.on { color: #f59e0b; }
.qc-gt { font-size: 12px; color: #16a34a; margin: 2px 0; }
.qc-id { font-variant-numeric: tabular-nums; cursor: copy; }
.qc-shopt { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 4px; background: #f1f5f9; color: #475569; font-size: 12px; }
.qc-spt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qc-rong { text-align: center; padding: 50px 0; color: var(--muted); font-size: 34px; } .qc-rong div { font-size: 14px; margin-top: 6px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .qc-tab.on, :root:not([data-theme="light"]) .qc-shopt, :root:not([data-theme="light"]) .qc-t tfoot td, :root:not([data-theme="light"]) .qc-tim select { background: #1f2937; color: inherit; } }
:root[data-theme="dark"] .qc-tab.on, :root[data-theme="dark"] .qc-shopt, :root[data-theme="dark"] .qc-t tfoot td, :root[data-theme="dark"] .qc-tim select { background: #1f2937; color: inherit; }

/* 🗂️ Bảng sổ ra các tab của phân hệ khi rê chuột vào thanh bên (kiểu MISA, 13/11/2026) */
.side-fly { position: fixed; z-index: 80; min-width: 240px; max-width: 340px; background: #1f2329; color: #e5e7eb; border-radius: 10px; padding: 10px 8px; box-shadow: 0 14px 34px rgba(0, 0, 0, .32); border-left: 4px solid transparent; background-clip: padding-box; }
.side-fly .sf-h { font-weight: 700; font-size: 14px; color: #fff; padding: 2px 12px 8px; border-bottom: 1px solid rgba(255, 255, 255, .1); margin-bottom: 4px; white-space: nowrap; }
.side-fly a { display: block; padding: 8px 12px; border-radius: 6px; color: #e5e7eb; text-decoration: none; font-size: 14px; white-space: nowrap; }
.side-fly a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.side-fly a.on { color: #5eead4; font-weight: 600; }
@media (max-width: 900px) { .side-fly { display: none; } }
.side-fly a.sf-h { display: block; color: #fff; font-weight: 700; padding: 4px 12px 9px; border-radius: 6px 6px 0 0; }
.side-fly a.sf-h:hover { background: none; color: #5eead4; }
.side-fly.mot { padding: 6px 4px; min-width: 0; }
.side-fly.mot a.sf-h { border-bottom: 0; margin: 0; padding: 6px 12px; }
.side-fly .sf-lk { display: block; font-weight: 400; font-size: 12px; color: #fbbf24; margin-top: 2px; }

/* 🗂️ Danh mục shop kiểu BigSeller (13/11/2026) */
.dm-chips { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.dm-chip { border: 0; background: none; padding: 3px 8px; border-radius: 4px; cursor: pointer; color: var(--text); font-size: 13.5px; }
.dm-chip:hover { color: var(--primary); }
.dm-chip.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.dm-t td { vertical-align: top; padding-top: 11px; padding-bottom: 11px; }
.dm-ten { font-weight: 600; margin-bottom: 2px; }
.dm-ic { border: 0; background: none; cursor: pointer; font-size: 15px; padding: 3px 6px; border-radius: 6px; }
.dm-ic:hover:not(:disabled) { background: #eef2f7; }
.dm-ic:disabled { opacity: .3; cursor: default; }
.dm-xt { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.dm-xt-o { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.dm-xt-o:last-child { border-bottom: 0; } .dm-xt-o b { color: var(--muted); font-weight: 400; font-size: 13px; }
.dm-tt { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow: auto; }
.dm-tt-o { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: var(--card); cursor: grab; }
.dm-keo { color: #94a3b8; letter-spacing: -2px; }

/* 💹 Phân tích kinh doanh (13/11/2026) */
.kd-nhom-the { margin-bottom: 10px; }
.kd-g { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.kd-thes { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 8px; }
.kd-the { border: 1px solid var(--line); border-top: 3px solid transparent; border-radius: 8px; padding: 9px 12px; cursor: pointer; background: var(--card); }
.kd-the:hover { border-color: #94a3b8; }
.kd-the.on { border-top-color: var(--m); box-shadow: 0 2px 10px rgba(15, 23, 42, .08); }
.kd-tl { font-size: 12.5px; color: var(--muted); }
.kd-tn { font-size: 20px; font-weight: 700; margin: 2px 0; font-variant-numeric: tabular-nums; }
.kd-ts { font-size: 12px; } .kd-tot { color: #15803d; } .kd-xau { color: #b91c1c; }
.kd-t .kd-nhom th { background: none; border-bottom: 0; padding-bottom: 0; }
.kd-nh { display: inline-block; color: #fff; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 3px; }
img.kd-anh { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }
.kd-bar { height: 6px; background: #eef2f7; border-radius: 3px; overflow: hidden; margin-bottom: 3px; min-width: 80px; } .kd-bar i { display: block; height: 100%; background: #6366f1; }

/* 🩺 Hiệu quả hoạt động shop (13/11/2026) */
.sk-tren { display: flex; gap: 12px; flex-wrap: wrap; }
.sk-the { margin: 0; flex: 1 1 520px; }
.sk-h { font-size: 13.5px; font-weight: 600; margin-bottom: 8px; }
.sk-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sk-o { border: 0; background: none; text-align: left; cursor: pointer; padding: 4px 6px; border-radius: 6px; } .sk-o:hover { background: var(--bg); }
.sk-o span { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); } .sk-o i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.sk-o b { font-size: 22px; font-variant-numeric: tabular-nums; }
.sk-big { font-size: 28px; font-weight: 700; color: #4f46e5; text-align: center; padding: 8px 0; }
.sk-phat { display: flex; gap: 16px; flex-wrap: wrap; } .sk-nut { flex: 0 0 340px; max-width: 100%; }
.sk-t th { text-align: center; } .sk-t th.num { text-align: right; }
.sk-t .sk-g { border-top: 3px solid var(--m); }
.sk-t .sk-c1 { left: 0; min-width: 170px; width: 170px; max-width: 170px; }
.sk-t .sk-c2 { position: sticky; left: 170px; z-index: 1; min-width: 120px; background: var(--card); box-shadow: 4px 0 6px -4px rgba(15, 23, 42, .18); }
.sk-t thead .sk-c2 { z-index: 3; background: #f8fafc; }
@media (max-width: 760px) { .sk-t .sk-c2 { position: static; box-shadow: none; } }

/* 13/11 chị My: bố cục ô chỉ số gọn — Hiệu suất 1 hàng, Huỷ đơn + Trả hàng cạnh nhau */
.kd-nhoms { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.kd-nhoms .kd-nhom-the:first-child { grid-column: 1 / -1; }
.kd-nhoms .kd-nhom-the:first-child .kd-thes { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.kd-nhoms .kd-nhom-the:not(:first-child) .kd-thes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kd-the .kd-tn { font-size: 19px; white-space: nowrap; }
@media (max-width: 1250px) { .kd-nhoms .kd-nhom-the:first-child .kd-thes { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) { .kd-nhoms { grid-template-columns: 1fr; } .kd-nhoms .kd-nhom-the:first-child .kd-thes, .kd-nhoms .kd-nhom-the:not(:first-child) .kd-thes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 🩺 13/11 chị My: tiêu đề 3 hàng không đè nhau khi cuộn (cả khối thead dính) + kẻ ô rõ, vạch đậm tách nhóm Kỳ này · Chỉ tiêu · Kỳ trước */
.sk-t thead { position: sticky; top: 0; z-index: 4; }
.sk-t thead th { position: static; top: auto; box-shadow: none; background: #f8fafc; vertical-align: middle; }
.sk-t thead th.sk-c1, .sk-t thead th.sk-c2 { position: sticky; z-index: 5; }
.sk-t thead th.sk-c1 { left: 0; } .sk-t thead th.sk-c2 { left: 170px; }
.sk-t th, .sk-t td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sk-t thead tr:first-child th { border-top: 1px solid var(--line); }
.sk-t .sk-b { border-left: 2px solid #cbd5e1; }
.sk-t .sk-g { border-top: 3px solid var(--m) !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sk-t thead th { background: #1f2937; } }
:root[data-theme="dark"] .sk-t thead th { background: #1f2937; }
/* 🩺 13/11 chị My: tầng 1 (tên nhóm) có nền nhạt theo màu nhóm để thấy rõ nhóm phủ từ cột nào tới cột nào */
.sk-t thead th.sk-g { background: color-mix(in srgb, var(--m) 14%, #fff); color: color-mix(in srgb, var(--m) 70%, #0f172a); border-right: 2px solid #cbd5e1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sk-t thead th.sk-g { background: color-mix(in srgb, var(--m) 22%, #1f2937); color: #e5e7eb; } }
:root[data-theme="dark"] .sk-t thead th.sk-g { background: color-mix(in srgb, var(--m) 22%, #1f2937); color: #e5e7eb; }

/* 💰 Lợi nhuận ước tính: nhóm thứ 2 cả hàng 5 ô (13/11/2026) */
.kd-nhoms .kd-nhom-the:nth-child(2) { grid-column: 1 / -1; }
.kd-nhoms .kd-nhom-the:nth-child(2) .kd-thes { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.gv-nhap { border: 1px dashed var(--line); border-radius: 8px; padding: 10px; background: var(--bg); }
@media (max-width: 900px) { .kd-nhoms .kd-nhom-the:nth-child(2) .kd-thes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 🩺 13/11 chị My: tầng 1 IN HOA, chữ to hơn tầng 2–3 · cột STT · cột dính trái không dùng rowspan (hết lộ chữ khi cuộn) */
.sk-t thead th.sk-g { text-transform: uppercase; font-size: 13.5px; letter-spacing: .3px; font-weight: 800; padding-top: 8px; padding-bottom: 8px; }
.sk-t .sk-c0 { position: sticky; left: 0; z-index: 1; width: 44px; min-width: 44px; max-width: 44px; background: var(--card); text-align: center; color: var(--muted); }
.sk-t thead th.sk-c0 { position: sticky; left: 0; z-index: 5; background: #f8fafc; }
.sk-t .sk-c1, .sk-t thead th.sk-c1 { left: 44px; }
.sk-t .sk-c2, .sk-t thead th.sk-c2 { left: 214px; }
.sk-t thead th.sk-tr { border-bottom: 0; }
.sk-t thead th.sk-c1, .sk-t thead th.sk-c2, .sk-t thead th.sk-c0 { background: #f8fafc; }
@media (max-width: 760px) { .sk-t .sk-c0 { position: static; } }

/* 🔀 Di chuyển dữ liệu: mỗi phân loại 1 dòng, các cột thẳng hàng (13/11/2026) */
#dc-tbl .dc-pl { height: 26px; line-height: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; border-bottom: 1px dashed var(--line); }
#dc-tbl .dc-pl:last-of-type { border-bottom: 0; }
#dc-tbl .dc-pln { margin-top: 2px; }
#dc-tbl .odi img { cursor: zoom-in; }

/* 🔀 Di chuyển dữ liệu: ⇅ sắp xếp + phễu lọc ở tiêu đề cột (13/11/2026) */
#dc-tbl .dc-th { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
#dc-tbl th.num .dc-th { justify-content: flex-end; }
.dc-so { border: 0; background: none; cursor: pointer; color: #94a3b8; font-size: 12px; padding: 0 2px; } .dc-so.on, .dc-so:hover { color: var(--primary); }

/* ⇅ chỉ hiện khi rê chuột vào tiêu đề cột; cột đang sắp xếp thì luôn hiện (quy tắc chị My 06/11, áp cho Packvi 13/11) */
.qc-so0, .dc-so:not(.on) { visibility: hidden; }
th:hover .qc-so0, th:hover .dc-so, th:focus-within .dc-so { visibility: visible; }

.fpop.dc-loc { padding: 12px; min-width: 0; }
/* 💹 13/11 chị My: mỗi khối chỉ số có nền nhạt theo màu nhóm cho dễ nhận diện */
.kd-nhoms .kd-nhom-the { background: color-mix(in srgb, var(--m) 7%, #fff); border: 1px solid color-mix(in srgb, var(--m) 18%, #fff); border-radius: 10px; padding: 8px 10px 10px; margin-bottom: 8px; }
.kd-nhoms .kd-nhom-the .kd-the { background: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kd-nhoms .kd-nhom-the { background: color-mix(in srgb, var(--m) 12%, #111827); border-color: color-mix(in srgb, var(--m) 30%, #111827); } :root:not([data-theme="light"]) .kd-nhoms .kd-nhom-the .kd-the { background: var(--card); } }
:root[data-theme="dark"] .kd-nhoms .kd-nhom-the { background: color-mix(in srgb, var(--m) 12%, #111827); border-color: color-mix(in srgb, var(--m) 30%, #111827); } :root[data-theme="dark"] .kd-nhoms .kd-nhom-the .kd-the { background: var(--card); }

/* 💹 13/11 chị My: bảng Phân tích kinh doanh — cột đầu dính trái, kẻ ô rõ, tầng 1 phủ nền nhạt màu nhóm, khối tiêu đề dính chung (không đè nhau) */
.kd-t { border-collapse: separate; border-spacing: 0; }
.kd-t thead { position: sticky; top: 0; z-index: 4; }
.kd-t thead th { position: static; top: auto; box-shadow: none; background: #f8fafc; vertical-align: middle; }
.kd-t th, .kd-t td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kd-t thead tr:first-child th { border-top: 1px solid var(--line); }
.kd-t .kd-b { border-left: 2px solid #cbd5e1; }
.kd-t .kd-c1 { position: sticky; left: 0; z-index: 1; background: var(--card); min-width: 120px; box-shadow: 4px 0 6px -4px rgba(15, 23, 42, .18); }
.kd-t thead th.kd-c1 { position: sticky; z-index: 5; background: #f8fafc; }
.kd-t tfoot td.kd-c1 { z-index: 2; background: #f8fafc; }
.kd-t thead tr.kd-nhom th { border-bottom: 1px solid var(--line); padding: 6px 8px; }
.kd-t thead th.kd-g { background: color-mix(in srgb, var(--m) 14%, #fff); color: color-mix(in srgb, var(--m) 72%, #0f172a); border-top: 3px solid var(--m) !important; text-transform: uppercase; font-size: 12.5px; font-weight: 800; letter-spacing: .3px; text-align: center; }
.kd-spr { display: flex; gap: 8px; align-items: flex-start; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kd-t thead th { background: #1f2937; } :root:not([data-theme="light"]) .kd-t thead th.kd-g { background: color-mix(in srgb, var(--m) 22%, #1f2937); color: #e5e7eb; } }
:root[data-theme="dark"] .kd-t thead th { background: #1f2937; } :root[data-theme="dark"] .kd-t thead th.kd-g { background: color-mix(in srgb, var(--m) 22%, #1f2937); color: #e5e7eb; }
@media (max-width: 760px) { .kd-t .kd-c1 { position: static; box-shadow: none; } }
.kd-t td.kd-c1 .kd-spr { min-width: 240px; }

/* 💹 cố định nhiều cột đầu: chỉ cột cố định CUỐI có bóng; cột chữ trong vùng cố định canh trái, xuống dòng */
.kd-t .kd-c1 { box-shadow: none; white-space: normal; }
.kd-t .kd-c1.kd-cl { box-shadow: 4px 0 6px -4px rgba(15, 23, 42, .18); }
.kd-t td.kd-c1 .kd-spr { min-width: 0; }

/* 💹 13/11: tiêu đề 2 tầng + cột cố định đo theo kích thước thật (kdDinh) — bỏ cách dính cả khối thead */
.kd-t thead { position: static; }
.kd-t thead th { background-clip: padding-box; }

/* 13/11 chị My: cột chỉ có 1 tầng tiêu đề → gộp ô, chữ giữa cả ngang lẫn dọc */
.kd-t thead th.kd-mot, .sk-t thead th.kd-mot { text-align: center !important; vertical-align: middle; }
.sk-t thead th.sk-c0, .sk-t thead th.sk-c1, .sk-t thead th.sk-c2 { background: #f8fafc; background-clip: padding-box; }

.sk-t thead { position: static; }

/* 💹 Doanh thu (tổng) đậm; Doanh thu Shopee / TikTok (tập con) chữ nhỏ hơn, nhạt hơn */
.kd-t td.kd-dam { font-weight: 700; }
.kd-t td.kd-con { font-size: 12.5px; color: #475569; }
.kd-t th.kd-con { font-size: 11.5px; font-weight: 600; color: #64748b; }
/* 13/11 chị My: đường kẻ chân dòng tiêu đề luôn thấy rõ, kể cả khi cuộn (đường kẻ vẽ bằng bóng trong ô — không trong suốt như viền) */
.kd-t thead th, .sk-t thead th { background-clip: border-box; box-shadow: inset 0 -1px 0 #94a3b8; }
.kd-t thead th.kd-c1.kd-cl { box-shadow: inset 0 -1px 0 #94a3b8, 4px 0 6px -4px rgba(15, 23, 42, .18); }
.sk-t thead th.sk-c2 { box-shadow: inset 0 -1px 0 #94a3b8, 4px 0 6px -4px rgba(15, 23, 42, .18); }
.kd-t thead tr.kd-nhom th:not(.kd-mot), .sk-t thead tr:not(:last-child) th:not(.kd-mot) { box-shadow: inset 0 -1px 0 var(--line); }

/* 💹 dòng Tổng luôn ở chân bảng khi cuộn (13/11 chị My) */
.kd-t tfoot td { position: sticky; bottom: 0; z-index: 2; background: #f8fafc; box-shadow: inset 0 1px 0 #94a3b8; font-weight: 700; }
.kd-t tfoot td.kd-c1 { z-index: 3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kd-t tfoot td { background: #1f2937; } }
:root[data-theme="dark"] .kd-t tfoot td { background: #1f2937; }
/* 13/11 chị My: ô tiêu đề gộp (cột 1 tầng) cùng đường kẻ chân với hàng tiêu đề dưới — kể cả ô thuộc vùng cột cố định */
.kd-t thead th.kd-mot, .kd-t thead tr:last-child th, .sk-t thead th.kd-mot, .sk-t thead tr:last-child th { box-shadow: inset 0 -1px 0 #94a3b8 !important; }
.kd-t thead th.kd-mot.kd-cl, .sk-t thead th.kd-mot.sk-c2 { box-shadow: inset 0 -1px 0 #94a3b8, 4px 0 6px -4px rgba(15, 23, 42, .18) !important; }
.kd-t thead th.kd-mot, .sk-t thead th.kd-mot { border-right: 1px solid var(--line); }
/* 13/11 chị My: mép trên tiêu đề luôn có đường kẻ (ô gộp 1 tầng), nhóm giữ vạch màu 3px */
.kd-t thead tr:first-child th.kd-mot, .sk-t thead tr:first-child th.kd-mot { border-top: 1px solid #94a3b8 !important; }
.kd-t thead tr:first-child th, .sk-t thead tr:first-child th { border-top-style: solid; }

/* 14/11 chị My: logo Shopee / TikTok ở đầu tên shop */
.chip.plat, .dm-chip { display: inline-flex; align-items: center; gap: 5px; } .dm-chip .plogo { width: 15px; height: 15px; }
.pill.plat .plogo, .chip.plat .plogo { width: 14px; height: 14px; }
.dc-shop { margin-top: 4px; }

/* 14/11 chị My: Di chuyển dữ liệu — nhãn "Nền tảng nguồn" 1 dòng, các dòng lọc cao bằng nhau */
.spf:has(#dc-nen) .spf-l { flex-basis: 128px; white-space: nowrap; }
@media (max-width: 700px) { .spf:has(#dc-nen) .spf-l { flex-basis: auto; } }

/* 14/11 Phúc VHS: lọc sản phẩm theo màu ghi chú */
.chip.sp-gcm { padding: 4px 7px; } .chip.sp-gcm i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: middle; } .chip.sp-gcm.on { box-shadow: 0 0 0 2px #0f766e inset; }

/* ✏️ Sửa phân loại / SKU (14/11) */
.pl-nhom { border: 1px solid var(--line, #e2e8f0); border-radius: 10px; padding: 10px; margin-bottom: 10px; }
.pl-nh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; } .pl-nh input { width: 200px; }
.pl-ops { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pl-op { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line, #e2e8f0); border-radius: 8px; padding: 4px; position: relative; } .pl-op input { width: 140px; }
.pl-img { width: 40px; height: 40px; border: 1px dashed #94a3b8; border-radius: 6px; display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; font-size: 16px; flex: none; } .pl-img img { width: 100%; height: 100%; object-fit: cover; }
.pl-xa { position: absolute; left: 34px; top: -6px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: #dc2626; color: #fff; font-size: 12px; line-height: 18px; padding: 0; cursor: pointer; }
.pl-t input { padding: 4px 6px; } .pl-t tr.pl-moi td { background: #f0fdf4; }

/* ➕ Đăng sản phẩm mới (14/11) */
.nm h4 { margin: 16px 0 6px; } .nm .spi-imgs { display: flex; flex-wrap: wrap; gap: 8px; }
.nm-ds { max-height: 220px; overflow: auto; border: 1px solid var(--line, #e2e8f0); border-radius: 8px; margin-top: 4px; } .nm-ds:empty { display: none; }
.nm-ds .fopt { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 6px 10px; cursor: pointer; } .nm-ds .fopt:hover { background: #f0fdfa; }

/* 📝 lọc theo nội dung ghi chú (14/11) */
.chip.sp-gcn { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .chip.sp-gcn i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }

/* 📝 bảng chọn nội dung ghi chú (sổ từ nút "Có ghi chú ▾") */
.sp-gcpop { min-width: 260px; max-width: 380px; } .sp-gcpop .flist { max-height: 300px; overflow: auto; }
.sp-gcpop button.fopt { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: none; text-align: left; cursor: pointer; padding: 6px 8px; border-radius: 6px; }
.sp-gcpop button.fopt:hover { background: #f0fdfa; } .sp-gcpop button.fopt.on { background: #ccfbf1; font-weight: 600; }
.sp-gcpop button.fopt span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sp-gcpop button.fopt em { font-style: normal; color: #64748b; margin-left: auto; }
.sp-gcpop button.fopt i { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* 🚚 bảng lưới vận chuyển hàng loạt (14/11) */
.vc-tb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.vc-wrap { max-height: 60vh; overflow: auto; } .vc-t th { position: sticky; top: 0; z-index: 2; background: #f8fafc; }
.vc-t .vc-sp { min-width: 260px; max-width: 360px; } .vc-t .vc-ten { font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.vc-t .vc-c { text-align: center; min-width: 92px; } .vc-t th.vc-c label { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font-size: 12px; text-transform: none; }
.vc-t td.vc-c input { width: 18px; height: 18px; cursor: pointer; } .vc-t tr.vc-doi td { background: #fefce8; }

/* 🚚 bảng lưới vận chuyển: cân nặng / kích thước + vượt giới hạn (14/11) */
.vc-t input.vc-kg { width: 72px; text-align: right; padding: 3px 6px; } .vc-t td.vc-kt { white-space: nowrap; } .vc-t td.vc-kt input { width: 46px; text-align: right; padding: 3px 4px; margin: 0 2px; }
.vc-t input.vc-sua { border-color: #d97706; background: #fffbeb; } .vc-t .vc-i { color: #94a3b8; font-size: 11px; }
.vc-t td.vc-vuot { background: #fee2e2 !important; } .vc-t .vc-w { color: #dc2626; font-size: 12px; margin-left: 3px; cursor: help; }

/* 14/11: danh mục đã chọn nổi bật · tồn nhập từng kho */
.nm .nm-cat0 { font-size: 13px; color: #64748b; } .nm .nm-cat1 { background: #ecfdf5; border: 1px solid #6ee7b7; color: #065f46; border-radius: 8px; padding: 6px 10px; font-size: 14px; }
.nm #nm-goiy .chip.on { background: #0f766e; color: #fff; border-color: #0f766e; }
.nm .nm-tk { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; } .nm .nm-tk label { display: inline-flex; align-items: center; gap: 6px; }
.pl-t .pl-tk { display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 12px; margin: 2px 0; white-space: nowrap; }

/* ✏️ Trang Chỉnh sửa hàng loạt (14/11 — như BigSeller) */
body.hl-mo { overflow: hidden; }
.hl-trang { position: fixed; inset: 0; z-index: 45; background: var(--bg, #f1f5f9); display: flex; flex-direction: column; }
.hl-dau { display: flex; align-items: center; gap: 10px; padding: 10px 18px; background: var(--card, #fff); border-bottom: 1px solid var(--line, #e2e8f0); box-shadow: 0 2px 6px rgba(15,23,42,.06); } .hl-dau b { font-size: 17px; }
.hl-than { flex: 1; overflow: auto; padding: 14px 18px; }
.hl-chon { display: flex; flex-wrap: wrap; gap: 10px 36px; background: var(--card, #fff); border: 1px solid var(--line, #e2e8f0); border-radius: 10px; padding: 12px 16px; margin-bottom: 12px; align-items: flex-start; }
.hl-chon .hl-nhom { display: flex; flex-direction: column; gap: 6px; } .hl-chon label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; }
.hl-tb { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; flex-wrap: wrap; }
.hl-wrap { max-height: calc(100vh - 260px); overflow: auto; background: var(--card, #fff); }
.hl-t thead th { position: sticky; top: 0; z-index: 3; background: #f8fafc; vertical-align: middle; } .hl-t thead tr.hl-but th { top: 38px; background: #fff; border-bottom: 1px solid #cbd5e1; }
.hl-t td { vertical-align: top; } .hl-t td.hl-sua { background: #fefce8 !important; }
.hl-bt { border: 0; background: none; cursor: pointer; font-size: 16px; color: #475569; padding: 2px 4px; border-radius: 4px; } .hl-bt:hover { background: #e2e8f0; }
.hl-t .hl-anh { width: 72px; text-align: center; } .hl-t td.hl-anh img { width: 60px; height: 60px; object-fit: cover; border-radius: 6px; } .hl-nanh { display: block; font-size: 11px; color: #64748b; }
.hl-t .hl-sp { min-width: 160px; max-width: 220px; } .hl-tensp { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.hl-t td.hl-ten textarea { width: 240px; font-size: 13px; resize: vertical; } .hl-t td.hl-sku input { width: 130px; }
.hl-t td.hl-mota { min-width: 140px; } .hl-mt { max-width: 180px; overflow: hidden; }
.hl-t .hl-pld { min-height: 34px; display: flex; flex-direction: column; justify-content: center; margin-bottom: 4px; } .hl-t td.hl-pl input { width: 110px; } .hl-t td.num.hl-pl input { text-align: right; }
.hl-t td.hl-kt { white-space: nowrap; } .hl-t td.hl-kt input { width: 50px; text-align: right; margin: 0 2px; } .hl-t td.hl-kg input { width: 76px; text-align: right; }
.hl-t td.hl-vc { min-width: 150px; } .hl-t td.hl-pre select { width: auto; } .hl-do { color: #dc2626; font-size: 12px; margin-top: 4px; max-width: 220px; }
.hl-vcd .vcd-ten { display: flex; align-items: center; gap: 6px; } .hl-vcd .vcd-con { margin-left: 24px; } .hl-vcd td { vertical-align: top; }
.sp-ttpop button.fopt { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 7px 10px; cursor: pointer; border-radius: 6px; } .sp-ttpop button.fopt:hover { background: #f0fdfa; }

/* ✏️ hộp ✎ trang Chỉnh sửa hàng loạt (như BigSeller) */
.hl-luoi { display: grid; grid-template-columns: 150px 1fr; gap: 10px 12px; align-items: center; } .hl-luoi > label { color: #334155; }
.hl-cap { display: flex; align-items: center; gap: 8px; margin: 6px 0; } .hl-cap > span { white-space: nowrap; color: #475569; font-size: 13px; } .hl-cap > span:first-child:empty { min-width: 70px; }
.hl-radio { display: flex; gap: 16px; align-items: center; margin: 4px 0 10px; } .hl-radio label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.hl-tabs { display: flex; gap: 18px; border-bottom: 1px solid #e2e8f0; margin-bottom: 12px; } .hl-tab { border: 0; background: none; padding: 6px 2px; cursor: pointer; color: #475569; border-bottom: 2px solid transparent; } .hl-tab.on { color: #0f766e; border-color: #0f766e; font-weight: 600; }
.hl-chip { background: #f1f5f9; border-radius: 4px; padding: 3px 8px; font-size: 13px; }
.hl-bt.hl-tron { font-size: 12px; color: #0f766e; }
.hl-anhbt { border: 0; background: none; padding: 0; cursor: pointer; position: relative; display: inline-block; } .hl-anhbt .hl-nanh { display: block; font-size: 11px; color: #0f766e; }
.hl-anhs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .hl-a1 { width: 74px; height: 74px; border: 1px solid #e2e8f0; border-radius: 6px; position: relative; display: flex; align-items: center; justify-content: center; cursor: grab; background: #fff; }
.hl-a1 img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; } .hl-a0 { border-style: dashed; color: #94a3b8; font-size: 22px; cursor: pointer; }
.hl-ax { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: #dc2626; color: #fff; font-size: 12px; line-height: 18px; padding: 0; cursor: pointer; }
.hl-bia { position: absolute; left: 0; bottom: 0; background: rgba(15,118,110,.85); color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 0 6px 0 6px; }

/* 📋 vùng dán ảnh Ctrl+V (14/11) */
[data-dan-anh]:focus { outline: 2px dashed #0f766e; outline-offset: 4px; border-radius: 8px; } [data-dan-anh]:focus-visible { outline: 2px dashed #0f766e; }

/* ✏️ Chỉnh sửa hàng loạt: kẻ ô, 2 cột đầu đứng yên khi kéo ngang (14/11 chị My) */
.hl-t { border-collapse: separate; border-spacing: 0; } .hl-t th, .hl-t td { border-right: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; padding: 8px 10px; } .hl-t tr > :first-child { border-left: 1px solid #e2e8f0; } .hl-t thead tr:first-child th { border-top: 1px solid #e2e8f0; }
.hl-t th { white-space: normal; line-height: 1.3; } .hl-t thead tr.hl-but th { top: 41px; }
.hl-t .hl-anh { position: sticky; left: 0; z-index: 2; background: #fff; width: 84px; min-width: 84px; max-width: 84px; }
.hl-t .hl-sp { position: sticky; left: 84px; z-index: 2; background: #fff; width: 210px; min-width: 210px; max-width: 210px; box-shadow: 3px 0 4px -2px rgba(15,23,42,.15); }
.hl-t thead .hl-anh, .hl-t thead .hl-sp { z-index: 5; background: #f8fafc; } .hl-t thead tr.hl-but .hl-anh, .hl-t thead tr.hl-but .hl-sp { background: #fff; }
.hl-t td.hl-sua.hl-anh, .hl-t td.hl-sua.hl-sp { background: #fefce8; }
.hl-t .hl-tensp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hl-t td.hl-ten textarea { width: 260px; } .hl-t td.hl-sku input { width: 170px; }
.hl-t td.hl-pl { min-width: 150px; } .hl-t td.hl-pl input { width: 100%; min-width: 150px; box-sizing: border-box; } .hl-t td.num.hl-pl input { min-width: 110px; }
.hl-t .hl-pld { min-height: 40px; justify-content: center; border-bottom: 1px dashed #eef2f7; padding: 3px 0; } .hl-t .hl-pld:last-child { border-bottom: 0; }
.hl-t td.hl-dm { min-width: 170px; max-width: 220px; } .hl-t td.hl-tt { min-width: 120px; } .hl-t td.hl-mota { min-width: 180px; } .hl-t td.hl-vc { min-width: 180px; }

.hl-t .hl-pld { min-height: 46px; }

/* 📋 khung dán ảnh rõ ràng (14/11 chị My): viền nét đứt + hướng dẫn ngay trong khung; bấm vào khung → viền xanh "Đã chọn khung" */
.spi-imgs[data-dan-anh], .hl-anhs[data-dan-anh] { border: 2px dashed #cbd5e1; border-radius: 10px; padding: 10px; background: #f8fafc; cursor: pointer; min-height: 96px; transition: border-color .15s, background .15s; }
.spi-imgs[data-dan-anh]:hover, .hl-anhs[data-dan-anh]:hover { border-color: #94a3b8; }
.spi-imgs[data-dan-anh]::after, .hl-anhs[data-dan-anh]::after { content: '📋 Bấm vào khung này rồi Ctrl+V để dán ảnh · hoặc kéo thả tệp ảnh vào'; flex-basis: 100%; width: 100%; font-size: 12.5px; color: #64748b; margin-top: 4px; }
.spi-imgs[data-dan-anh]:focus, .hl-anhs[data-dan-anh]:focus { outline: none; border-color: #0f766e; background: #f0fdfa; }
.spi-imgs[data-dan-anh]:focus::after, .hl-anhs[data-dan-anh]:focus::after { content: '✅ Đã chọn khung ảnh — bấm Ctrl+V để dán ảnh'; color: #0f766e; font-weight: 600; }
.spi-them .spi-ctrlv { display: block; font-size: 10.5px; color: #64748b; margin-top: 2px; }
.spi-img.spi-keo { opacity: .4; } .spi-img.spi-den { outline: 2px solid #0f766e; outline-offset: 2px; }

/* 14/11 chị My: tên phân loại nổi bật, mã SKU bên cạnh chìm xuống */
.spv-ten { font-weight: 700; color: #065f46; background: #ecfdf5; border-radius: 4px; padding: 0 5px; }
.spv-n .spv-ten ~ .spv-k, .spv-n .spv-ten ~ .spv-ng { color: #64748b; font-size: 11.5px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .spv-ten { color: #6ee7b7; background: rgba(16,185,129,.15); } }
:root[data-theme="dark"] .spv-ten { color: #6ee7b7; background: rgba(16,185,129,.15); }

/* 14/11 chị My: mã SKU trong ngoặc đen rõ (khác SKU ID xám bên dưới) */
.spv-n .spv-ten ~ .spv-k { color: #0f172a; font-size: 12.5px; font-weight: 600; } .spv-n .spv-ten ~ .spv-ng { color: #0f172a; font-size: 12.5px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .spv-n .spv-ten ~ .spv-k, :root:not([data-theme="light"]) .spv-n .spv-ten ~ .spv-ng { color: #e2e8f0; } }
:root[data-theme="dark"] .spv-n .spv-ten ~ .spv-k, :root[data-theme="dark"] .spv-n .spv-ten ~ .spv-ng { color: #e2e8f0; }

/* sửa tên phân loại ngay trong bảng (14/11) */
.pl-t td.pl-tenc { white-space: nowrap; } .pl-t td.pl-tenc input { width: 170px; font-weight: 600; } .pl-t td.pl-tenc span { margin: 0 4px; }

.nm .nm-kmo { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; margin-bottom: 6px; }

.ctsp { border: 1px solid var(--line, #e2e8f0); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.ctsp-h { display: flex; align-items: center; gap: 6px; } .ctsp-t { font-weight: 700; margin: 4px 0 2px; }
.ctsp-dang { background: #dcfce7; color: #15803d; } .ctsp-sap { background: #ffedd5; color: #c2410c; }

.sti-vcl { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 4px; } .sti-vco { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }

/* Đăng mới: Giá gốc | Khuyến mãi song song (chị My 14/11) */
.nm-2c { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; margin-bottom: 8px; }
.nm-2c.pl { grid-template-columns: minmax(0, 1fr); } .nm-2c.pl .nm-c-km .spf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.nm-2c .nm-c > div > .spf { border: 0; padding: 0; box-shadow: none; background: none; }
.nm-2c .nm-c { border: 1px solid var(--line, #e2e8f0); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.nm-2c .nm-c-km { background: #fff7ed; border-color: #fed7aa; }
.nm-2c .nm-ct { font-weight: 700; margin-bottom: 6px; } .nm-2c .spf { margin: 0; } .nm-2c .spf-l { flex-basis: 96px; }
@media (max-width: 760px) { .nm-2c, .nm-2c.pl { grid-template-columns: 1fr; } }

/* ô nổi chương trình KM có mũi tên (chị My 14/11) */
.ctsp-pop { position: absolute; z-index: 1200; width: min(460px, calc(100vw - 16px)); background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 23, 42, .18); display: flex; flex-direction: column; max-height: 70vh; }
.ctsp-pop::before { content: ''; position: absolute; top: -8px; left: calc(var(--mui, 50%) - 8px); width: 14px; height: 14px; background: #fff; border-left: 1px solid #e2e8f0; border-top: 1px solid #e2e8f0; transform: rotate(45deg); }
.ctsp-pop.tren::before { top: auto; bottom: -8px; transform: rotate(225deg); }
.ctsp-than { padding: 12px 14px; overflow: auto; } .ctsp-sp { margin-bottom: 8px; }
.ctsp-chan { display: flex; justify-content: space-between; gap: 8px; padding: 8px 14px; border-top: 1px solid #f1f5f9; } .ctsp-chan #ctsp-dong { margin-left: auto; }
.ctsp-g { width: 100%; border-collapse: collapse; margin-top: 6px; } .ctsp-g td { padding: 4px 6px; border-top: 1px dashed #e2e8f0; vertical-align: top; font-variant-numeric: tabular-nums; }
.ctsp-g .ctsp-pl { font-weight: 600; color: #0f766e; } .ctsp-g .ctsp-pl .code { color: #0f172a; font-weight: 500; }
.ctsp-goc { color: #94a3b8; white-space: nowrap; } .ctsp-km { color: #c2410c; font-weight: 700; white-space: nowrap; width: 1%; }
.ctsp-het { background: #f1f5f9; color: #64748b; } .ctsp-xong { background: #f8fafc; } .ctsp-tieu { font-weight: 700; margin: 10px 0 6px; color: #64748b; }
.ctsp-g td.num { text-align: right; } .ctsp-g .ctsp-goc { width: 99%; padding-right: 10px; } .ctsp-g .ctsp-pl + .ctsp-goc { width: auto; }

/* ô ảnh phân loại đang chọn → nhắc Ctrl+V */
label.pl-img[data-dan-anh] { position: relative; }
label.pl-img[data-dan-anh]:focus { outline: 2px solid #0f766e; outline-offset: 2px; }
label.pl-img[data-dan-anh]:focus::after { content: 'Ctrl+V'; position: absolute; left: 50%; bottom: -18px; transform: translateX(-50%); font-size: 10px; font-weight: 700; color: #fff; background: #0f766e; border-radius: 4px; padding: 0 4px; white-space: nowrap; z-index: 2; }

.ctsp-pop .ctsp-than { flex: 1 1 auto; min-height: 0; } .ctsp-pop .ctsp-chan { flex: 0 0 auto; }

/* ô nổi KM: tên sản phẩm ghim trên cùng, tên chương trình ghim khi cuộn (chị My 14/11) */
.ctsp-pop .ctsp-dau { flex: 0 0 auto; padding: 12px 14px 8px; border-bottom: 1px solid #f1f5f9; } .ctsp-pop .ctsp-dau .ctsp-sp { margin: 0; }
.ctsp-pop .ctsp-than { padding-top: 8px; }
.ctsp-pop .ctsp-top { position: sticky; top: -10px; z-index: 1; background: #fff; margin: -10px -12px 0; padding: 10px 12px 6px; border-radius: 8px 8px 0 0; }
.ctsp-pop .ctsp-xong .ctsp-top { background: #f8fafc; }

/* ô nổi KM đổ bóng đậm để nổi trên bảng trắng (chị My 14/11) */
.ctsp-pop { border-color: #cbd5e1; box-shadow: 0 2px 6px rgba(15, 23, 42, .12), 0 18px 48px rgba(15, 23, 42, .32); }
.ctsp-pop::before { border-color: #cbd5e1; box-shadow: -3px -3px 6px rgba(15, 23, 42, .06); }

/* Sản phẩm trên sàn: bộ lọc gọn (chị My 14/11) — Gian hàng · Ghi chú · Thời gian chung 1 hàng; Tìm kiếm, Sắp xếp mỗi mục 1 hàng */
.spf.sp-loc { display: flex; flex-wrap: wrap; column-gap: 28px; }
.spf.sp-loc > .spf-r { flex: 1 1 100%; border-bottom: 0; border-top: 1px dashed var(--line, #e5e7eb); }
.spf.sp-loc > .spf-r.ngan { flex: 0 1 auto; border-top: 0; }
.spf.sp-loc > .spf-r.ngan .spf-l { flex-basis: auto; }
.spf.sp-loc > .spf-r.ngan .spf-c { flex-wrap: wrap; }

/* chép giá KM: chọn chương trình từng shop đích (chị My 14/11) */
.km-ctb { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; max-height: 26vh; overflow: auto; }
.km-ctr { display: flex; align-items: center; gap: 8px; } .km-ctn { flex: 0 0 160px; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.km-ctr select { flex: 1 1 auto; min-width: 0; max-width: 520px; font-size: 13px; }
/* vạch ngăn giữa Gian hàng | Ghi chú | Thời gian (chị My 14/11) */
.spf.sp-loc > .spf-r.ngan[style*="order:2"]::before, .spf.sp-loc > .spf-r.ngan[style*="order:3"]::before { content: ""; flex: 0 0 2px; align-self: stretch; margin: 2px 2px 2px -16px; border-radius: 2px; background: #cbd5e1; }
.spf.sp-loc > .spf-r.ngan.dau-hang::before { display: none; }

/* ⚡ khiếu nại kèm video (14/11) */
.kn-nut { background: #fff7ed; border-color: #fdba74; color: #9a3412; font-weight: 600; }
.kn-anh { display: flex; gap: 10px; flex-wrap: wrap; } .kn-a { display: flex; flex-direction: column; gap: 4px; width: 150px; cursor: pointer; font-size: 12px; }
.kn-a img { width: 150px; height: 150px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line, #e2e8f0); background: #f8fafc; }
.kat-ld { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 12px; }

.kn-khoi { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 10px 12px; border: 1px dashed #fdba74; border-radius: 10px; background: #fffbf5; }
.kn-nut:disabled { background: #f1f5f9; border-color: #cbd5e1; color: #94a3b8; cursor: not-allowed; }
.kn-buoc { margin: 8px 0; padding-left: 20px; line-height: 1.9; }
.kn-ghep { margin: 0 0 8px; padding: 8px 12px; border-radius: 8px; background: #f0f9ff; border: 1px solid #bae6fd; font-size: 14px; line-height: 1.7; }
.kn-ma { cursor: pointer; color: #0f172a; font-weight: 600; border-bottom: 1px dashed #94a3b8; } .kn-ma:hover { color: #0f766e; border-bottom-color: #0f766e; }
.v-ghep { color: #b91c1c; font-weight: 600; }

/* 📚 video quấn sẵn kèm đơn (14/11) */
.vqs-khoi { margin-top: 10px; padding: 8px 12px; border: 1px solid var(--line, #e2e8f0); border-radius: 10px; background: #fafafa; }
.vqs-dong { margin: 4px 0; font-size: 14px; line-height: 1.8; }

/* 🔔 chuông Packvi (14/11) */
.tb-wrap { position: relative; } .tb-btn { position: relative; font-size: 17px; padding: 6px 12px; } .tb-btn.co { border-color: #f97316; }
.tb-n { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.tb-pop { position: absolute; right: 0; top: calc(100% + 8px); width: min(420px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; background: #fff; border: 1px solid #cbd5e1; border-radius: 12px; box-shadow: 0 2px 6px rgba(15,23,42,.12), 0 18px 48px rgba(15,23,42,.28); z-index: 1300; }
.tb-dau { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid #f1f5f9; position: sticky; top: 0; background: #fff; }
.tb-it { display: block; padding: 10px 14px; border-bottom: 1px solid #f1f5f9; color: inherit; text-decoration: none; } .tb-it:hover { background: #f8fafc; }
.tb-it.moi { background: #fff7ed; } .tb-it.moi .tb-t { font-weight: 700; } .tb-t { font-size: 14px; } .tb-nd { font-size: 12.5px; color: #475569; margin-top: 2px; } .tb-tg { font-size: 11.5px; color: #94a3b8; margin-top: 3px; }
.kn-ma-moi { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px dashed #0f766e; border-radius: 10px; background: #f0fdfa; }

.tb-n[hidden] { display: none; } /* 14/11: chuông không hiện số 0 */
/* ⚙️ cài đặt khiếu nại gộp 1 nút (14/11) */
.kn-cd-wrap { position: relative; display: inline-block; } .kn-cd { font-size: 17px; padding: 6px 12px; }
.kn-cd-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 1200; width: 340px; background: #fff; border: 1px solid #cbd5e1; border-radius: 12px; box-shadow: 0 2px 6px rgba(15,23,42,.12), 0 18px 48px rgba(15,23,42,.28); padding: 6px; }
.kn-cd-it { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; font: inherit; color: inherit; }
.kn-cd-it:hover { background: #f1f5f9; } .kn-cd-ic { font-size: 22px; line-height: 1; } .kn-cd-it b { display: block; font-size: 14px; } .kn-cd-it i { display: block; font-size: 12px; color: #64748b; margin-top: 2px; }

/* 🧩 sơ đồ cài tiện ích (14/11 — chị My: "toàn chữ, làm sơ đồ") */
.ext-so { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; counter-reset: b; }
.ext-b { position: relative; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px 12px 12px 46px; background: #fff; }
.ext-n { position: absolute; left: 12px; top: 11px; width: 24px; height: 24px; border-radius: 50%; background: #0f766e; color: #fff; font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.ext-b > b { display: block; margin-bottom: 8px; }
.ext-mh { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; }
.ext-mt { color: #0f766e; font-weight: 800; }
.ext-tep { background: #fef3c7; border: 1px solid #fde68a; border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.ext-nho { color: #475569; }
.ext-dc { display: inline-flex; align-items: center; gap: 6px; background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 99px; padding: 2px 4px 2px 10px; font-family: monospace; font-size: 12.5px; }
.ext-ct { display: inline-flex; align-items: center; gap: 6px; } .ext-bat { width: 30px; height: 16px; border-radius: 99px; background: #4f46e5; position: relative; display: inline-block; } .ext-bat i { position: absolute; right: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.ext-nut { border: 1px solid #94a3b8; border-radius: 99px; padding: 2px 10px; background: #fff; white-space: nowrap; } .ext-xanh { background: #0f766e; border-color: #0f766e; color: #fff; }
.ext-dd { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; padding: 2px 8px; } .ext-dd i { color: #94a3b8; font-style: normal; }
.ext-tb { display: inline-flex; align-items: center; gap: 8px; background: #312e81; color: #fff; border-radius: 99px; padding: 4px 10px; }
.ext-p { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 4px; background: #94a3b8; color: #fff; font-weight: 800; font-size: 12px; outline: 2px solid #fbbf24; }
.ext-av { font-size: 13px; }
.ext-pop { border: 1px solid #cbd5e1; border-radius: 8px; padding: 6px; background: #fff; box-shadow: 0 4px 12px rgba(15,23,42,.12); }
.ext-o { border: 1px solid #cbd5e1; border-radius: 6px; padding: 2px 6px; font-family: monospace; margin-bottom: 4px; color: #64748b; } .ext-ok { color: #15803d; font-weight: 700; margin-top: 4px; }
.ext-pv { background: #0f766e; color: #fff; border-radius: 99px; padding: 3px 10px; font-weight: 700; }
.ext-luu { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; } .ext-luu span { background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 99px; padding: 4px 12px; font-size: 12.5px; }

/* 🎛️ Dashboard bán hàng (14/11 — chị My, như QORAI / BigSeller) */
.side-group-a { color: inherit; text-decoration: none; } .side-group-a:hover { color: #fff; text-decoration: underline; }
.db-loc { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 10px 14px; position: sticky; top: 0; z-index: 5; }
.db-nhomloc { display: flex; align-items: center; gap: 6px; } .db-ln { font-size: 11.5px; font-weight: 700; color: #b45309; text-transform: uppercase; letter-spacing: .04em; }
.db-chips { gap: 0 !important; } .db-chips .chip { border-radius: 0; margin: 0 -1px 0 0; } .db-chips .chip:first-child { border-radius: 8px 0 0 8px; } .db-chips .chip:last-child { border-radius: 0 8px 8px 0; }
.db-thes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 10px 0; }
.db-the { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: 0 1px 3px rgba(15,23,42,.06); }
.db-tt { font-size: 13px; color: var(--muted); } .db-so { font-size: 26px; font-weight: 800; line-height: 1.25; margin: 4px 0 2px; font-variant-numeric: tabular-nums; } .db-so small { font-size: 13px; font-weight: 600; color: var(--muted); }
.db-phu { font-size: 12px; color: var(--muted); }
.db-tg { font-weight: 700; font-size: 12px; white-space: nowrap; } .db-tg.tot { color: #15803d; } .db-tg.xau { color: #dc2626; }
.db-hai { display: grid; grid-template-columns: repeat(auto-fit, minmax(460px, 1fr)); gap: 10px; margin-bottom: 10px; }
.db-k { margin: 0 0 10px; } .db-hai .db-k { margin: 0; } .db-kh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; } .db-kh > b { color: #1e3a8a; font-size: 15px; }
.db-xh { display: grid; grid-template-columns: 210px 1fr; gap: 14px; align-items: start; }
.db-vong .dnut { display: block; } .db-vong .dleg { display: none; } .db-vong svg { width: 200px; height: 200px; display: block; margin: 0 auto; }
.db-bh, .db-dong { display: grid; grid-template-columns: 1fr 120px 82px; gap: 6px; align-items: center; } .db-bh { font-size: 12px; color: var(--muted); padding: 0 0 4px; border-bottom: 1px solid var(--line); } .db-bh span:first-child { padding-left: 2px; }
.db-cuon { max-height: 300px; overflow: auto; }
.db-dong { position: relative; padding: 7px 0 9px; grid-template-columns: 46px 1fr 120px 82px; } .db-bh { grid-template-columns: 1fr 120px 82px; }
.db-no { font-size: 12px; font-weight: 700; color: var(--muted); } .db-no.top { color: #2563eb; border: 1px solid #93c5fd; border-radius: 4px; padding: 0 4px; background: #eff6ff; }
.db-ten { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; } .db-gt { font-weight: 700; font-variant-numeric: tabular-nums; }
.db-thanh { position: absolute; left: 46px; bottom: 2px; height: 3px; border-radius: 3px; max-width: calc(100% - 46px); }
.db-nen { display: inline-flex; width: 16px; height: 16px; border-radius: 4px; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; color: #fff; background: #ee4d2d; margin-right: 6px; vertical-align: -2px; } .db-nen.tiktok { background: #111827; }
.db-tong { border-top: 1px solid var(--line); margin-top: 4px; font-weight: 700; } .db-tong .db-ten { font-weight: 800; }
.db-tt-bang td, .db-tt-bang th { padding: 6px 8px; } .db-tt-nen { height: 10px; background: #f1f5f9; border-radius: 99px; overflow: hidden; } .db-tt-nen i { display: block; height: 100%; border-radius: 99px; }
.db-top td { vertical-align: middle; } .db-sp { display: flex; gap: 10px; align-items: center; min-width: 260px; } .db-sp img, .db-sp-0 { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; border: 1px solid var(--line); flex: none; display: inline-flex; align-items: center; justify-content: center; }
.db-top-tab { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 8px; } .db-top tfoot td { border-top: 2px solid var(--line, #e5e7eb); }
.db-sp-ten { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 520px; }
.db-nhoms { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .db-nhom-chip { display: inline-flex; gap: 4px; align-items: center; } .db-nhom-chip input { width: 170px; }
@media (max-width: 700px) { .db-xh { grid-template-columns: 1fr; } .db-hai { grid-template-columns: 1fr; } .db-dong { grid-template-columns: 40px 1fr 96px 70px; } .db-bh { grid-template-columns: 1fr 96px 70px; } }
/* 🎛️ Dashboard: chỉnh cột bảng xếp hạng (tên shop không bị cắt) + 7 thẻ 1 hàng */
.db-thes { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } .db-so { font-size: 24px; }
.db-xh { grid-template-columns: 176px 1fr; gap: 12px; } .db-vong svg { width: 172px; height: 172px; }
.db-bh, .db-dong { grid-template-columns: 42px minmax(0, 1fr) 108px 66px; gap: 6px; } .db-thanh { left: 48px; max-width: calc(100% - 48px); }
@media (max-width: 700px) { .db-bh, .db-dong { grid-template-columns: 38px minmax(0, 1fr) 96px 62px; } }
.db-bh .num, .db-dong .num { text-align: right; }

/* 🏷️ icon sàn + popup nhóm gian hàng kiểu QORAI (15/11) */
.ic-san { vertical-align: -3px; flex: none; }
.dbn-khung { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.dbn-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.dbn-chip { display: inline-flex; align-items: center; gap: 8px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 99px; padding: 4px 6px 4px 12px; } .dbn-chip b { color: #1e3a8a; }
.dbn-chip button { border: 0; background: none; cursor: pointer; color: #64748b; font-size: 15px; line-height: 1; padding: 0 4px; } .dbn-chip button:hover { color: #dc2626; }
#dbn-ten { width: 190px; } .dbn-them { border-style: dashed !important; color: #2563eb; }
.dbn-du { font-size: 12.5px; border-radius: 99px; padding: 4px 12px; background: #fef3c7; color: #92400e; border: 1px solid #fde68a; } .dbn-du.ok { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.dbn-t td, .dbn-t th { padding: 7px 10px; } .dbn-t select { width: 100%; }

/* 💰 bảng giá vốn & thuế suất (15/11) */
.gv-loc { flex-wrap: wrap; gap: 6px; } .gv-loc .chip b { margin-left: 4px; font-variant-numeric: tabular-nums; }
.gv-thieu { color: #b45309; font-weight: 600; } .gv-t td { vertical-align: top; }

/* 📂 thanh bên: nhóm sổ ra / thu gọn (15/11 — chị My) */
.side-sec { display: flex; flex-direction: column; gap: 2px; }
.side-tg { display: flex; align-items: center; width: 100%; background: none; border: 0; cursor: pointer; text-align: left; font-family: inherit; border-radius: 6px; }
.side-tg:hover { color: #fff; background: rgba(255,255,255,.05); }
.side-mui { margin-left: auto; font-size: 12px; transition: transform .15s; opacity: .8; }
.side-sec.dong .side-mui { transform: rotate(-90deg); }
.side-items { display: flex; flex-direction: column; gap: 2px; }
.side-sec.dong .side-items { display: none; }
.side-sec.dong:has(.nav-due) .side-tg .tx::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #f59e0b; margin-left: 6px; vertical-align: 1px; }
.side-sec.dong:has(.nav-due.late) .side-tg .tx::after { background: #ef4444; }
.layout.side-min .side-sec.dong .side-items { display: flex; } .layout.side-min .side-mui { display: none; } .layout.side-min .side-tg { pointer-events: none; }
.side-sec > .side-group { padding: 12px 12px 6px; } .side-sec:first-child > .side-group { padding-top: 4px; } .layout.side-min .side-sec > .side-group { padding: 8px 0 2px; }

/* 🚚 khiếu nại ĐVVC (15/11) */
.chip.chip-do:not(.on) b { color: #dc2626; }
.dv-t td { vertical-align: top; } .dv-anh { display: flex; gap: 10px; flex-wrap: wrap; } .dv-anh a { display: flex; flex-direction: column; gap: 4px; width: 150px; color: inherit; text-decoration: none; }
.dv-anh img { width: 150px; height: 110px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

/* Σ dòng Tổng cộng ghim đáy bảng (colTable tong: true) — 15/11 */
.ftbl tfoot tr.ct-tong td { position: sticky; bottom: 0; z-index: 3; background: #ecfdf5; border-top: 2px solid #0f766e; padding-top: 10px; padding-bottom: 10px; box-shadow: 0 -2px 6px rgba(15,23,42,.06); font-variant-numeric: tabular-nums; }
.ftbl tfoot tr.ct-tong td.ct-do b { color: #dc2626; }
@media (max-width: 700px) { .tbl.cardify tfoot tr.ct-tong td:empty { display: none; } }
@media (max-width: 700px) { /* dòng Tổng cộng trên điện thoại: 1 thẻ xanh, các số xếp hàng ngang có nhãn */
  .tbl.cardify tfoot { display: block; }
  .tbl.cardify tfoot tr.ct-tong { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; background: #ecfdf5; border: 2px solid #0f766e; border-radius: 12px; padding: 10px 12px; position: static; }
  .tbl.cardify tfoot tr.ct-tong td { position: static; display: inline-block; width: auto; background: none; border: 0; box-shadow: none; padding: 0; }
  .tbl.cardify tfoot tr.ct-tong td:first-child.num { position: static; }
  .tbl.cardify tfoot tr.ct-tong td:not([data-l]):not(:has(b)) { display: none; }
  .tbl.cardify tfoot tr.ct-tong td:has(b):not([data-l]) { flex-basis: 100%; font-size: 15px; }
}
/* hướng dẫn dài: mỗi câu / mỗi bước 1 dòng (15/11 — chị My) */
.hd-khoi { line-height: 1.6; } .hd-buoc { margin: 6px 0 6px; padding-left: 22px; } .hd-buoc li { margin: 2px 0; }

/* 🗂️ tab Tra cứu video / Video đã xoá (15/11) */
.vid-tabs { margin: 0 0 10px; } .vid-tabs a.chip { text-decoration: none; }

/* 💾 ô tự lưu ở Kết nối sàn (15/11) */
.ch-daluu { display: inline-block; margin-left: 6px; color: #15803d; font-size: 12px; font-weight: 700; white-space: nowrap; }
input.ch-luu-ok { border-color: #22c55e !important; } input.ch-luu-loi { border-color: #dc2626 !important; background: #fef2f2; }

/* 🟢 trạng thái shop ở Kết nối sàn (15/11) */
.ch-tt { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: #f1f5f9; color: #334155; }
.ch-tt-on { background: #dcfce7; color: #166534; } .ch-tt-it { background: #fef9c3; color: #854d0e; } .ch-tt-dung { background: #e2e8f0; color: #334155; }
.ch-tt-moi { background: #e0f2fe; color: #075985; } .ch-tt-tat { background: #f1f5f9; color: #64748b; } .ch-tt-loi { background: #fee2e2; color: #991b1b; }

/* 🗑 video đóng nhầm (15/11) */
.kn-ghep-nham { margin-top: 6px; padding: 6px 10px; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; color: #9a3412; }
.dg-od { background: none; border: 0; padding: 0; color: var(--teal, #0f766e); text-decoration: underline; cursor: pointer; font: inherit; font-weight: 600; } .dg-od:hover { color: #0b5e57; } .dg-kho { margin-top: 2px; }
.od-fbs { background: #fff7ed; border-color: #fdba74; color: #7c2d12; }
/* 15/11/2026 (chị My): bảng đơn đã nhặt — mã dài (VD mã vận đơn J&T 24 ký tự) tự ngắt dòng, cột Đơn không phình */
td.pk-od { max-width: 200px; } td.pk-od .code { overflow-wrap: anywhere; word-break: break-all; }
.tbl th.ctr, .tbl td.ctr { text-align: center; } /* 15/11/2026: cột canh giữa */

/* 16/11/2026: chương trình của sàn tô cam · sản phẩm 1 giá: giá cùng dòng tên chương trình */
.ctsp-san { border-color: #fdba74; background: #fff7ed; } .ctsp-pop .ctsp-san .ctsp-top { background: #fff7ed; }
.ctsp-loai-san { color: #c2410c; font-weight: 600; } .ctsp-san-ghi { color: #9a3412; text-align: right; margin-top: 6px; }
.ctsp-dong { display: flex; align-items: center; justify-content: space-between; gap: 10px; } .ctsp-dong .ctsp-t { flex: 1 1 auto; min-width: 0; }
.ctsp-gia1 { white-space: nowrap; font-variant-numeric: tabular-nums; } .ctsp-gia1 .ctsp-goc { margin-right: 6px; }

/* 16/11/2026: phân loại trong ô chương trình co sát; cửa sổ sửa giá — dòng tiêu đề sản phẩm + tên phân loại tô đậm */
.ctsp-g td { padding: 2px 6px; } .ctsp-g .ctsp-pl .code { color: #64748b; font-weight: 400; margin-left: 4px; }
tr.spg-nhom td { background: #f1f5f9; padding: 7px 10px; border-top: 2px solid #e2e8f0; } tr.spg-nhom .plat { color: #475569; } tr.spg-nhom td { vertical-align: middle; }
.spg-pl { display: inline-block; font-weight: 700; color: #0f766e; background: #ecfdf5; border-radius: 6px; padding: 1px 8px; margin-bottom: 2px; }
tr.spg-pl-dong td:first-child { padding-left: 22px; }

.spg-mn { color: #b91c1c; font-weight: 700; font-size: 12px; line-height: 1.3; text-align: right; margin-top: 3px; white-space: nowrap; } .spg-mn:empty { display: none; }

/* 16/11/2026 (chị My): khối bộ lọc gọn hơn — dòng sát lại, nhãn đậm rõ; thời gian gọn trong 1 ô chọn */
.spf { padding: 2px 14px; } .spf-r { padding: 5px 0; gap: 10px; }
.spf-l { color: #0f172a; font-weight: 700; font-size: 13.5px; }
.spf .chip { padding-top: 4px; padding-bottom: 4px; }
.spf select, .spf input.search { min-height: 34px; padding-top: 5px; padding-bottom: 5px; }
.ky-wrap { position: relative; display: inline-flex; align-items: center; }
.ky-sel { width: auto; min-width: 150px; font-weight: 600; } .ky-sel.on { border-color: #0f766e; color: #0f766e; background-color: #f0fdfa; }
.ky-an { position: absolute; inset: 0; overflow: hidden; visibility: hidden; pointer-events: none; } .ky-an > * { position: absolute; inset: 0; margin: 0; }

.gm-ten { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }

#gm-don .tbl-wrap { max-height: 68vh; overflow: auto; } #gm-don .tbl thead th { background: var(--card, #fff); } #gm-don tfoot tr.ct-tong td:first-child { white-space: nowrap; }

.gm-cd { border: 1px solid var(--line, #e2e8f0); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; background: #f8fafc; } .gm-cd[hidden] { display: none; }

.ic3d-btn { padding: 4px 7px; line-height: 0; background: #fff; border-color: #99f6e4; box-shadow: 0 2px 4px rgba(15, 118, 110, .18); } .ic3d-btn:hover { background: #f0fdfa; box-shadow: 0 3px 8px rgba(15, 118, 110, .28); }
.ic3d { filter: drop-shadow(0 1px 1px rgba(6, 78, 59, .35)); }

/* 16/11/2026: dải hạn khiếu nại nổi lên 3 giây khi mới vào (không chiếm chỗ trang) · số Khiếu nại rung 15 phút / lần */
#kn-alarm.kn-flash { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 1500; width: min(1100px, calc(100vw - 24px)); animation: knVao .35s ease-out; }
#kn-alarm.kn-flash .kn-alarm { margin: 0; box-shadow: 0 12px 32px rgba(127, 29, 29, .28); }
#kn-alarm.kn-flash-di { animation: knRa .6s ease-in forwards; }
@keyframes knVao { from { opacity: 0; transform: translate(-50%, -16px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes knRa { to { opacity: 0; transform: translate(-50%, -16px); } }
@keyframes knRung { 0%, 100% { transform: scale(1); } 10%, 30%, 50% { transform: scale(1.35) rotate(-14deg); } 20%, 40% { transform: scale(1.35) rotate(14deg); } 60% { transform: scale(1); } }
.nav-due.rung { animation: knRung 1.4s ease 2; display: inline-block; }

#kn-alarm.kn-flash .kn-alarm { padding-right: 52px; }
.kn-thu { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid #fca5a5; background: #fff; color: #b91c1c; font-size: 13px; line-height: 1; cursor: pointer; box-shadow: 0 2px 6px rgba(127, 29, 29, .2); }
.kn-thu:hover { background: #fee2e2; }
#kn-alarm.kn-flash-di { animation-duration: .4s; }

/* 17/11/2026: phóng to ảnh trong cửa sổ xem ảnh + ảnh trong trang báo bấm xem được */
.mbx > img.mbx-zoomable { cursor: zoom-in; transition: transform .18s ease; } .mbx > img.zoom { transform: scale(2.5); cursor: zoom-out; }
.mbx-kl { position: absolute; left: 10px; bottom: 10px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; padding: 3px 9px; border-radius: 999px; pointer-events: none; }
a[target="_blank"] > img { cursor: zoom-in; }

/* 17/11/2026: Phân tích kinh doanh › Xu hướng — bố cục mới */
.kd-bigs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.kd-big { position: relative; text-align: left; border: 1px solid var(--line); border-top: 4px solid var(--m); border-radius: 12px; background: var(--card, #fff); padding: 12px 14px 10px; cursor: pointer; font: inherit; color: inherit; display: flex; flex-direction: column; gap: 2px; }
.kd-big:hover { box-shadow: 0 4px 14px rgba(15, 23, 42, .08); } .kd-big.on { background: color-mix(in srgb, var(--m) 7%, var(--card, #fff)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--m) 35%, transparent); }
.kd-big-t { font-size: 13.5px; color: var(--muted); font-weight: 600; } .kd-big-n { font-size: 28px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; color: #0f172a; }
.kd-big-d { font-size: 12.5px; } .kd-big-p { font-size: 12.5px; color: var(--muted); margin-top: 2px; } .kd-big-p b { color: #0f172a; font-weight: 700; }
.kd-spark { width: 100%; height: 30px; margin: 4px 0 0; display: block; }
.kd-tot { color: #059669; font-weight: 700; } .kd-xau { color: #dc2626; font-weight: 700; } .kd-bang0 { color: var(--muted); }
.kd-nhan-vang { color: #b45309; background: #fef3c7; border-radius: 999px; padding: 0 7px; font-weight: 600; white-space: nowrap; }
.kd-mid { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr); gap: 12px; align-items: stretch; }
.kd-mid .card { margin: 0; padding: 12px 14px; } .kd-ben { display: grid; gap: 12px; align-content: start; }
.kd-stack { display: flex; height: 18px; border-radius: 999px; overflow: hidden; background: #f1f5f9; margin: 10px 0 8px; gap: 2px; } .kd-stack i { display: block; height: 100%; }
.kd-leg { display: grid; gap: 4px; font-size: 13px; } .kd-leg div { display: flex; align-items: center; gap: 8px; } .kd-leg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; } .kd-leg b { margin-left: auto; font-variant-numeric: tabular-nums; }
.kd-ct td, .kd-ct th { padding: 7px 10px; } .kd-ct-g td { font-weight: 700; color: var(--m); background: color-mix(in srgb, var(--m) 6%, var(--card, #fff)); border-left: 3px solid var(--m); }
.kd-ct-r { cursor: pointer; } .kd-ct-r:hover td { background: #f8fafc; } .kd-ct-r.on td { background: #eef2ff; }
.kd-ghichu { font-size: 12.5px; color: var(--muted); background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; }
@media (max-width: 1100px) { .kd-bigs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kd-mid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .kd-bigs { grid-template-columns: minmax(0, 1fr); } .kd-big-n { font-size: 24px; } }
/* 17/11/2026: Quảng cáo › Tổng quan theo shop — cố định tiêu đề + dòng Tổng cộng */
.qc-tq-wrap { max-height: calc(100vh - 260px); min-height: 240px; overflow: auto; }
#qc-tbl thead th { position: sticky; top: 0; z-index: 2; background: var(--card, #fff); }
#qc-tbl tfoot td { position: sticky; bottom: 0; z-index: 2; background: #f8fafc; box-shadow: inset 0 1px 0 #94a3b8; font-weight: 700; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #qc-tbl tfoot td, :root:not([data-theme="light"]) #qc-tbl thead th { background: #1f2937; } }
:root[data-theme="dark"] #qc-tbl tfoot td, :root[data-theme="dark"] #qc-tbl thead th { background: #1f2937; }

/* 17/11/2026: Quảng cáo — thẻ lọc nâng cao xếp theo 4 nhóm trên 1 hàng, gọn, cân đối */
.qc-thes { display: grid; grid-template-columns: var(--qc-cot, 2fr 3fr 3fr 1fr); gap: 12px; }
@media (max-width: 1100px) { .qc-thes { grid-template-columns: 1fr 1fr; } }
.qc-nh { min-width: 0; border-top: 3px solid var(--qn, #94a3b8); padding-top: 6px; }
.qc-nht { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--qn, #64748b); margin: 0 0 6px 2px; }
.qc-nhb { display: grid; gap: 8px; }
.qc-nh-tong { --qn: #64748b; } .qc-nh-tien { --qn: #dc2626; } .qc-nh-deY { --qn: #d97706; } .qc-nh-tot { --qn: #059669; }
.qc-nh .qc-the { padding: 8px 10px; min-height: 92px; display: flex; flex-direction: column; }
.qc-nh .qc-tl { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qc-nh .qc-tn { font-size: 22px; line-height: 1.15; color: var(--qn); }
.qc-nh-tong .qc-tn { color: inherit; }
.qc-nh .qc-the0 .qc-tn { color: #94a3b8; }
.qc-nh .qc-ts { font-size: 11.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qc-nh .qc-the.on { border-color: var(--qn); box-shadow: inset 0 0 0 1px var(--qn); background: var(--primary-soft); }

/* 17/11/2026 (chị My): Di chuyển dữ liệu — cột Sản phẩm & gian hàng rộng hơn, các cột khác vừa nội dung, cột Thao tác không bị cắt */
#dc-tbl.dc-tbl2 { width: 100%; table-layout: auto; }
#dc-tbl.dc-tbl2 th { white-space: normal; line-height: 1.25; }
#dc-tbl.dc-tbl2 th:nth-child(2), #dc-tbl.dc-tbl2 td:nth-child(2) { min-width: 340px; width: 60%; }
#dc-tbl.dc-tbl2 th:first-child, #dc-tbl.dc-tbl2 td:first-child { width: 1%; }
#dc-tbl.dc-tbl2 td:nth-child(10) { width: 1%; min-width: 120px; max-width: 160px; } #dc-tbl.dc-tbl2 td:nth-child(9) { width: 1%; min-width: 118px; }
#dc-tbl.dc-tbl2 .dc-th { white-space: normal; flex-wrap: wrap; } #dc-tbl.dc-tbl2 th.num { white-space: normal; }
#dc-tbl.dc-tbl2 td:nth-child(2) .odi-n { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#dc-tbl.dc-tbl2 td.num, #dc-tbl.dc-tbl2 th.num { width: 1%; white-space: nowrap; padding-left: 8px; padding-right: 8px; }
#dc-tbl.dc-tbl2 td:nth-child(3), #dc-tbl.dc-tbl2 td:nth-child(4) { width: 1%; white-space: nowrap; }
#dc-tbl.dc-tbl2 td:last-child { width: 1%; white-space: nowrap; }
#dc-tbl.dc-tbl2 th:nth-child(3) { min-width: 128px; } #dc-tbl.dc-tbl2 th:nth-child(4) { min-width: 150px; } #dc-tbl.dc-tbl2 th:nth-child(5) { min-width: 78px; } #dc-tbl.dc-tbl2 th:nth-child(6) { min-width: 92px; }
#dc-tbl.dc-tbl2 th:nth-child(7) { min-width: 96px; } #dc-tbl.dc-tbl2 th:nth-child(8) { min-width: 104px; } #dc-tbl.dc-tbl2 th:nth-child(9) { min-width: 118px; } #dc-tbl.dc-tbl2 th:nth-child(10) { min-width: 120px; }
#dc-tbl.dc-tbl2 .dc-th { flex-wrap: nowrap; }
@media (max-width: 1600px) { #dc-tbl.dc-tbl2 th:nth-child(2), #dc-tbl.dc-tbl2 td:nth-child(2) { min-width: 250px; } #dc-tbl.dc-tbl2 th:nth-child(3) { min-width: 108px; } #dc-tbl.dc-tbl2 th:nth-child(4) { min-width: 128px; } }
/* 17/11/2026 (chị My): thanh bên gọn hơn — chữ phân hệ nhỏ hơn, icon nhỏ theo, dòng sít hơn; TÊN MỤC (nhóm) đậm + sáng hơn, tên phân hệ không đậm */
.side-nav { gap: 1px; }
.side-nav a { padding: 6px 12px; font-size: 13.5px; gap: 10px; }
.side .side-nav a .ic { width: 19px; flex: 0 0 19px; font-size: 15px; }
.side-nav a.on { font-weight: 400; }
.side-items { gap: 1px; } .side-sec { gap: 1px; }
.side-group, .side-sec > .side-group { font-size: 11.5px; font-weight: 800; color: #e2f2ef; letter-spacing: .06em; }
.side-sec > .side-group { padding: 10px 12px 4px; }
.layout.side-min .side-nav a { padding: 8px 0; } .layout.side-min .side .side-nav a .ic, .layout.side-min .side-nav a .ic { font-size: 16px; }
/* bảng sổ ra khi rê chuột: chữ nhỏ hơn, dòng sít hơn */
.side-fly { padding: 8px 6px; }
.side-fly a { padding: 5px 10px; font-size: 13px; }
.side-fly .sf-h, .side-fly a.sf-h { font-size: 13.5px; padding: 3px 10px 7px; }
.side-fly.mot a.sf-h { padding: 5px 10px; }

/* 17/11/2026 (chị My): tên sản phẩm bấm mở trang trên sàn */
a.sp-ten-lk { color: inherit; text-decoration: none; } a.sp-ten-lk:hover { color: var(--primary); text-decoration: underline; }

/* 17/11/2026 (Hưng / chị My): hộp nháp — thông tin khác */
.nh-kt { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 14px; }
.nh-kt > label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #475569; }
.nh-kt-kt { display: flex; align-items: center; gap: 4px; } .nh-kt-kt input { width: 64px; text-align: right; } .nh-kt-kt select { width: auto; }
.nh-dm { display: flex; flex-direction: column; gap: 8px; } .nh-dm #nh-cat-tim input { width: 100%; }
.nh-cat-ds, .nh-cat-goiy > div { display: flex; flex-direction: column; max-height: 200px; overflow: auto; margin-top: 4px; } .nh-cat-ds .fopt, .nh-cat-goiy .fopt { text-align: left; }
#nh-vc { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.nh-cat-ds .fopt, .nh-cat-goiy .fopt { border: 0; background: none; padding: 6px 8px; border-radius: 6px; cursor: pointer; font: inherit; font-size: 13px; color: inherit; } .nh-cat-ds .fopt:hover, .nh-cat-goiy .fopt:hover { background: #f0fdfa; color: #0f766e; }
.nh-cat-ds, .nh-cat-goiy > div { border: 1px solid #e2e8f0; border-radius: 8px; } .nh-cat-ds:empty { display: none; }
.inl-o { display: inline-flex; gap: 3px; align-items: center; justify-content: flex-end; } .inl-o input { width: 92px; padding: 3px 6px; font: inherit; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; border: 1px solid #0f766e; border-radius: 6px; }
.inl-o .inl-ok, .inl-o .inl-x { border: 1px solid #cbd5e1; background: #fff; border-radius: 6px; width: 24px; height: 24px; padding: 0; cursor: pointer; font-weight: 700; line-height: 1; } .inl-o .inl-ok { color: #fff; background: #16a34a; border-color: #16a34a; } .inl-o .inl-x { color: #64748b; }
.inl-tt { font-size: 12px; white-space: normal; max-width: 220px; display: inline-block; text-align: left; } .inl-ct { border: 0; background: none; padding: 0 2px; cursor: pointer; font-size: 12px; opacity: .7; } .inl-ct:hover { opacity: 1; }
.inl-o + .inl-ct { display: none; }
/* ⏸ 18/11/2026: nút gạt tắt / bật KM từng phân loại */
.ctsp-tg { position: relative; display: inline-block; vertical-align: -3px; width: 28px; height: 16px; margin-right: 6px; padding: 0; border: 0; border-radius: 99px; background: #cbd5e1; cursor: pointer; transition: background .15s; flex: none; }
.ctsp-tg i { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s; }
.ctsp-tg.on { background: #16a34a; } .ctsp-tg.on i { left: 14px; } .ctsp-tg:hover { filter: brightness(.92); } .ctsp-tg.dang { opacity: .5; cursor: wait; }
.ctsp-tatk { border-color: #fcd34d !important; background: #fffbeb; } .ctsp-kmo { width: 86px; padding: 2px 6px; font: inherit; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; border: 1px solid #cbd5e1; border-radius: 6px; }
.inl-tat { border: 1px dashed #f59e0b; background: #fffbeb; color: #b45309; border-radius: 6px; padding: 1px 6px; font-size: 12px; cursor: pointer; white-space: nowrap; } .inl-tat:hover { background: #fef3c7; }
/* 🎬 18/11/2026: ô video sản phẩm Shopee */
.spv-box .spv-row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.spv-box .spv-cur video, .spv-box .spv-ph { width: 220px; max-width: 100%; aspect-ratio: 16 / 9; background: #0f172a; border-radius: 8px; display: block; object-fit: contain; }
.spv-box .spv-ph { display: flex; align-items: center; justify-content: center; font-size: 34px; }
.spv-box .spv-tt { flex: 1; min-width: 220px; } .spv-box .spv-luat { margin: 4px 0 0; padding-left: 18px; line-height: 1.7; }
.lk-bo { border: 1px solid #cbd5e1; background: #fff; border-radius: 6px; padding: 0 6px; cursor: pointer; color: #64748b; vertical-align: top; } .lk-bo:hover { color: #0f172a; }
.lk-tick { display: inline-flex; gap: 8px; align-items: flex-start; cursor: pointer; } .lk-tick input { width: 18px; height: 18px; margin: 2px 0 0; cursor: pointer; accent-color: #16a34a; }
.pl-kieu { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 0 0 10px; padding: 8px 10px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; } .pl-kieu label { display: inline-flex; gap: 5px; align-items: center; cursor: pointer; }
/* 19/11/2026 (chị My): Chờ đóng hàng — tên sản phẩm 1 dòng (rê chuột đọc đủ), đơn nhiều sản phẩm hiện 3 */
.pd-spc { max-width: 380px; } .pd-it .pd-ten { display: inline-block; max-width: calc(100% - 34px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; } .pd-it .pd-sl { vertical-align: bottom; }
.pd-it.pd-an { display: none; } .pd-spc.mo .pd-it.pd-an { display: block; } .pd-them { border: 0; background: none; color: var(--primary); cursor: pointer; padding: 4px 0 0; font: inherit; font-size: 12.5px; font-weight: 600; }
.pd-hd { margin: 0 0 10px; } .pd-hd ol { margin: 6px 0; padding-left: 20px; line-height: 1.6; }
/* 19/11/2026 (chị My): Chờ đóng hàng — bấm 1 ô thành trang riêng */
#out.pd-rieng > :not(.pd-sec):not(.stats-grid) { display: none !important; } /* giữ các ô số liệu (chị My 19/11) */ #out.pd-rieng .pd-sec { margin-top: 0; padding-top: 0; border-top: 0; } .pd-back { margin: 0 0 10px; }
/* 19/11/2026 (Hưng): ảnh phân loại to hơn + nút xem to / sửa ảnh */
.pl-op .pl-img { width: 64px; height: 64px; } .pl-op { position: relative; } .pl-anhc { display: inline-flex; flex-direction: column; gap: 2px; } .pl-anhc button { border: 1px solid #cbd5e1; background: #fff; border-radius: 6px; padding: 0 4px; font-size: 12px; cursor: pointer; line-height: 1.5; } .pl-anhc button:hover { background: #f0fdfa; }
.ie-st > .ie-load { margin: auto; }
.pl-tb { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; border: 1px solid #e2e8f0; vertical-align: middle; margin-right: 10px; cursor: zoom-in; } .pl-tb0 { display: inline-flex; align-items: center; justify-content: center; background: #f8fafc; border-style: dashed; color: #94a3b8; cursor: default; font-size: 14px; }
.pl-t .pl-tenc { white-space: nowrap; } .pl-rowanh { display: inline-flex; gap: 4px; align-items: center; vertical-align: middle; margin-right: 8px; } .pl-rowanh .pl-img { width: 52px; height: 52px; }
.pl-rowanh { position: relative; } .pl-rowanh .pl-xa { left: 42px; top: -6px; }
/* 19/11/2026 (chị My): ảnh phân loại đầu dòng — rê chuột hiện 🔍 giữa, ✏️ chân ảnh, × đỏ góc phải */
.pl-rowanh.pl-co { width: 56px; height: 56px; border-radius: 8px; border: 1px solid #e2e8f0; display: inline-block; overflow: visible; }
.pl-rowanh.pl-co img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; cursor: zoom-in; display: block; }
.pl-rowanh.pl-co .pl-kl { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 18px; background: rgba(15,23,42,.28); border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity .12s; }
.pl-rowanh.pl-co .pl-but { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); border: 1px solid #cbd5e1; background: #fff; border-radius: 6px; padding: 0 5px; font-size: 12px; line-height: 1.5; cursor: pointer; opacity: 0; transition: opacity .12s; }
.pl-rowanh.pl-co .pl-xa { left: auto; right: -7px; top: -7px; opacity: 0; transition: opacity .12s; }
.pl-rowanh.pl-co:hover .pl-kl, .pl-rowanh.pl-co:hover .pl-but, .pl-rowanh.pl-co:hover .pl-xa, .pl-rowanh.pl-co:focus-within .pl-but, .pl-rowanh.pl-co:focus-within .pl-xa { opacity: 1; }
/* 19/11/2026 (chị My): bảng Thông tin bán hàng — ảnh phân loại to hơn, các cột không thưa */
#spi-bh .tbl, #sti-bh .tbl { width: auto; max-width: 100%; } #spi-bh .tbl th, #spi-bh .tbl td, #sti-bh .tbl th, #sti-bh .tbl td { padding-left: 14px; padding-right: 22px; }
#spi-bh .pl-tb, #sti-bh .pl-tb { width: 56px; height: 56px; margin-right: 12px; }
/* 19/11/2026 (chị My): nút ⤢ phóng to / thu nhỏ cửa sổ */
.modal header .m-to { border: 1px solid #cbd5e1; background: #fff; border-radius: 6px; width: 28px; height: 28px; cursor: pointer; font-size: 15px; line-height: 1; margin-right: 6px; color: #475569; } .modal header .m-to:hover { background: #f1f5f9; color: #0f172a; }
.modal.m-full { width: min(1800px, calc(100vw - 24px)) !important; max-width: min(1800px, calc(100vw - 24px)) !important; }
/* bảng Thông tin bán hàng: không cuộn lồng trong cuộn, bảng rộng vừa nội dung */
#spi-bh .tbl-wrap, #sti-bh .tbl-wrap { max-height: none; overflow-x: auto; overflow-y: visible; }
/* Sửa phân loại: cột gọn, ô SKU vừa phải */
.pl-t { width: auto; max-width: 100%; } .pl-t th, .pl-t td { padding-left: 12px; padding-right: 18px; } .pl-t [data-sk], .pl-t [data-nsk] { width: 230px !important; } .pl-box .pl-t .pl-tenc input { width: 170px; }
.pl-box table.tbl.pl-t { width: auto; min-width: 0; }
#spi-vc .spf-c input:not([type=checkbox]), #sti-vc .spf-c input:not([type=checkbox]) { width: 120px !important; flex: none; }

/* ⚖️ 19/11/2026: cân nặng / kích thước từng phân loại ngay trong bảng Thông tin bán hàng */
#spi-bh .bh-kg { width: 64px; text-align: right; padding: 4px 6px; } #spi-bh .bh-kt { white-space: nowrap; color: #94a3b8; } #spi-bh .bh-kt input { width: 46px; text-align: right; padding: 4px 5px; margin: 0 2px; }
/* nút gạt kiểu sàn (19/11/2026) */
.pv-gat { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; margin: 0 0 10px; user-select: none; } .pv-gat input { position: absolute; opacity: 0; pointer-events: none; }
.pv-gat i { width: 40px; height: 22px; border-radius: 11px; background: #cbd5e1; position: relative; transition: background .15s; flex: none; } .pv-gat i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s; }
.pv-gat input:checked + i { background: #16a34a; } .pv-gat input:checked + i::after { left: 20px; } .pv-gat input:focus-visible + i { outline: 2px solid #0f766e; outline-offset: 2px; } .pv-gat input:disabled + i { opacity: .5; }
#spi-bht.kg-tat .kgc { display: none; } #spi-bh .pv-gat { margin: 0 0 8px; }
#spi-bh .tbl-wrap.bh-cuon { max-height: 430px; overflow: auto; } #spi-bh .tbl-wrap.bh-cuon thead th { position: sticky; top: 0; z-index: 2; background: #f8fafc; box-shadow: inset 0 -1px 0 #e2e8f0; } /* quá 5 phân loại: ghim dòng tiêu đề */
/* 19/11/2026 (chị My): ô cân nặng / kích thước mục Vận chuyển nhỏ vừa, 3 ô kích thước cùng 1 hàng */
#spi-vc .spf-c input:not([type]), #sti-vc .spf-c input:not([type]) { min-width: 0 !important; width: 84px !important; flex: none; }
#spi-pre-d { min-width: 0 !important; width: 70px !important; flex: none; }
.modal header > span.m-tieude { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* 19/11: tiêu đề có tên sản phẩm */
.spf-r[hidden] { display: none !important; }
/* 19/11/2026 (chị My): tiêu đề cửa sổ sửa sản phẩm — chữ to, IN HOA, tên shop nền màu sàn */
.modal header > span.m-tieude { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.m-tieude .mt-nhan { flex: none; font-size: 16px; letter-spacing: .2px; } .m-tieude .mt-ten { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.m-tieude .mt-shop { flex: none; padding: 3px 10px; border-radius: 6px; font-weight: 700; font-size: 14px; } .m-tieude .mt-shopee { background: #ee4d2d; color: #fff; } .m-tieude .mt-tiktok { background: #000; color: #fff; } .m-tieude .mt-khac { background: #e2e8f0; color: #0f172a; }
/* 20/11/2026 (chị My): nút Xuất Excel — icon 3D xanh lá */
.nut-xls { width: 36px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; flex: none; border: 0; border-radius: 9px; cursor: pointer; vertical-align: middle;
  background: linear-gradient(180deg, #47d58a 0%, #1fae5c 55%, #179a50 100%); box-shadow: 0 3px 0 #0f7a3c, 0 5px 10px rgba(23, 154, 80, .32), inset 0 1px 0 rgba(255, 255, 255, .45); transition: transform .08s, box-shadow .08s, filter .12s; }
.nut-xls:hover { filter: brightness(1.06); transform: translateY(-1px); }
.nut-xls:active { transform: translateY(2px); box-shadow: 0 1px 0 #0f7a3c, 0 2px 4px rgba(23, 154, 80, .3), inset 0 1px 0 rgba(255, 255, 255, .4); }
.nut-xls:disabled { filter: grayscale(.6); opacity: .6; cursor: not-allowed; }

/* 21/11/2026 (chị My): gói Miễn phí / Cơ bản — trang "Mở thêm tính năng" + dòng cuối menu */
.side-mothem { margin-top: 6px; border-top: 1px dashed var(--line); padding-top: 6px; }
.side-mothem a .tx { font-weight: 700; color: #b45309; }
.mt-nhom { margin-top: 12px; } .mt-goi { font-size: 13px; color: var(--muted, #64748b); margin-bottom: 6px; }
.mt-ds { display: flex; flex-wrap: wrap; gap: 8px; } .mt-it { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: inherit; background: var(--card, #fff); }
.mt-it:hover { border-color: #b45309; }

/* 23/11/2026 (chị My): danh sách kiện ở Dashboard bàn giao — bảng vừa khung cửa sổ, chỉ khung bảng cuộn, tiêu đề cột cố định */
.modal .hdl-body #hdl-t .tbl-wrap { max-height: calc(100vh - 330px); overflow: auto; }
.modal .hdl-body #hdl-t .tbl thead th { position: sticky; top: 0; z-index: 3; background: var(--card, #fff); }
.modal .hdl-body #hdl-t .tbl td, .modal .hdl-body #hdl-t .tbl th { padding-left: 8px; padding-right: 8px; }

/* ⚠ 25/11/2026: Đơn giao khác đơn + icon ⓘ hướng dẫn */
.gl-i { border: 0; background: none; padding: 0 3px; color: #0f766e; cursor: pointer; font-size: 14px; line-height: 1; vertical-align: baseline; font-weight: 700; } .gl-i:hover { color: #115e59; }
.gl-pop { white-space: pre-line; max-width: 380px; }
.gl-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gl-loai { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.gl-lc { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.gl-lc:has(input:checked) { border-color: #0f766e; background: #f0fdfa; } .gl-lc span { display: flex; flex-direction: column; gap: 2px; } .gl-lc i { font-size: 12px; color: var(--muted, #64748b); font-style: normal; }
.gl-it { line-height: 1.5; } tr.gl-mo td { background: #fef9c3 !important; }
.ordp-glr { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.gl-tt { display: flex; flex-direction: column; gap: 4px; align-items: stretch; min-width: 120px; } .gl-tt .btn { white-space: nowrap; } #gl-t select[data-giao] { max-width: 160px; }
/* 25/11 tối: khối Giao thiếu / đổi mã trong Báo cáo cuối ngày */
.dr-gth { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .dr-gth h4 { margin: 0; }
.dr-gtg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.dr-gto { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; } .dr-gto span { font-size: 12.5px; color: var(--muted, #64748b); } .dr-gto b { font-size: 22px; line-height: 1.2; } .dr-gto i { font-size: 12px; font-style: normal; color: var(--muted, #64748b); }
.dr-gto.warn b { color: #b45309; } .dr-gto.ok b { color: #15803d; }
.dr-gtl { display: flex; flex-direction: column; gap: 4px; } .dr-gtr { display: grid; grid-template-columns: 60px 150px 1fr auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; } .dr-gtr:hover { background: #f1f5f9; }
.dr-gtt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) { .dr-gtg { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dr-gtr { grid-template-columns: 50px 1fr; } .dr-gtr .dr-gtt, .dr-gtr .muted { grid-column: 1 / -1; } }
.dr-gt { grid-column: 1 / -1; } /* khối Giao thiếu / đổi mã: luôn hết bề ngang báo cáo */
.gtq-l { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; max-height: 220px; overflow: auto; } .gtq-it { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; cursor: pointer; font-size: 13px; } .gtq-it.on { border-color: #0f766e; background: #f0fdfa; font-weight: 600; }

/* 🎬 26/11/2026 (Thuý VJ): sản phẩm thiếu video — hiện ngay ngoài danh sách */
.sp-thieu-vd { display: block; margin-top: 5px; padding: 0; border: 0; background: none; color: #c2410c; font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; }
button.sp-thieu-vd { cursor: pointer; text-decoration: underline dotted; }
button.sp-thieu-vd:hover { color: #9a3412; }

/* 📊 26/11/2026: cột Chất lượng nội dung (như BigSeller) */
.sp-cl { text-align: center; min-width: 150px; max-width: 190px; font-size: 13px; }
.sp-cl-ok { color: #047857; font-weight: 600; }
.sp-cl-vd { display: inline-block; margin-top: 3px; color: #ea8a00; cursor: default; line-height: 1.35; }
.sp-cl-vd:hover, .sp-cl-vd:focus { color: #c2410c; outline: none; }
#sp-clpop { position: fixed; z-index: 3000; width: 300px; background: #fff; border-radius: 10px; box-shadow: 0 10px 30px rgba(15, 23, 42, .18); padding: 14px 16px; font-size: 14px; color: #1e293b; }
#sp-clpop .sp-clpop-h { font-weight: 700; font-size: 16px; padding-bottom: 8px; border-bottom: 1px solid #e2e8f0; }
#sp-clpop ul { margin: 0; padding-left: 18px; }
#sp-clpop li { margin: 6px 0; }
#sp-clpop li::marker { color: #f59e0b; }
.sp-cl-ok.xs { color: #b45309; }
.sp-cl .sp-cl-can { color: #b91c1c; font-weight: 600; }

/* 27/11/2026 Lịch sử di chuyển: thoáng mắt, có ảnh bìa */
.tbl.dcl td { padding: 12px 10px; vertical-align: middle; font-size: 14px; }
.dcl-sp { display: flex; gap: 12px; align-items: center; }
.dcl-sp img, .dcl-no { width: 64px; height: 64px; flex: none; border-radius: 8px; object-fit: cover; border: 1px solid var(--line, #e5e7eb); background: #f8fafc; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.dcl-ten { font-weight: 500; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink, #1f2937); }
.dcl-ten a { color: inherit; }
.dcl-id { font-size: 12px; color: #6b7280; margin-top: 3px; }
.dcl-shop { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.dcl-mui { color: #9ca3af; font-size: 12px; padding-left: 6px; line-height: 1; }
.dcl-nh { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.dcl-nh.ok { background: #dcfce7; color: #15803d; } .dcl-nh.loi { background: #fee2e2; color: #b91c1c; } .dcl-nh.bo { background: #fef3c7; color: #b45309; } .dcl-nh.cho { background: #e0f2fe; color: #0369a1; }
.dcl-ly, .dcl-ghi { font-size: 13px; color: #4b5563; margin-top: 5px; line-height: 1.45; }
.dcl-ghi { color: #92400e; }
.dcl-ai { font-size: 13px; color: #6b7280; white-space: nowrap; }
