:root {
  --bg: #f5f6f8; --panel: #fff; --line: #e3e6ea; --text: #1d2329; --muted: #6b7580;
  --accent: #e8590c; --accent-2: #fff1e8; --ok: #2b8a3e; --ok-bg: #ebfbee; --warn-bg: #fff9db; --warn: #8a6d00; --err: #c92a2a; --err-bg: #fff5f5;
  --shop: #e7f0ff;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 system-ui, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); height: 100vh; display: flex; flex-direction: column; }
header { display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
h1 { font-size: 17px; margin: 0; white-space: nowrap; }
.badge { background: var(--warn-bg); color: var(--warn); border-radius: 99px; padding: 2px 10px; font-size: 12px; }
.tabs-nav { margin-left: auto; display: flex; gap: 4px; }
.tab-btn { border: none; background: transparent; padding: 8px 14px; border-radius: 6px; color: var(--muted); font-weight: 500; }
.tab-btn:hover { background: #f1f3f5; }
.tab-btn.active { background: var(--accent-2); color: var(--accent); }
main.tab { flex: 1; min-height: 0; }
main.tab[hidden] { display: none; }
#tab-cskh { display: flex; }
#tab-cskh[hidden] { display: none; }
#cskh-frame { flex: 1; width: 100%; min-height: 80vh; border: 0; }
.grid3 { display: grid; grid-template-columns: 280px 1fr 420px; }
.col { background: var(--panel); border-right: 1px solid var(--line); overflow: auto; min-height: 0; }
.col-title { position: sticky; top: 0; z-index: 1; background: var(--panel); padding: 10px 14px; font-weight: 600; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pad { padding: 14px; }
.muted { color: var(--muted); }
.small, button.small { font-size: 12px; }
button.small { padding: 3px 8px; }
button.danger { color: var(--err); border-color: var(--err-bg); }
.ok-text { color: var(--ok); font-weight: 600; }
.bad-text { color: var(--err); }

/* ---- Thanh công cụ (hàng loạt, dashboard) ---- */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.toolbar label { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; }
.toolbar input[type=number] { width: 70px; margin: 0; }
.toolbar input[type=date] { width: auto; margin: 0; }
.small-note { margin: 8px 16px; font-size: 12px; }
.range-picker { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.range-picker input[type=date] { width: auto; margin: 0; padding: 4px 6px; }
.range-picker .seg button { padding: 4px 10px; font-size: 13px; }
.pad-x { padding: 8px 14px; border-bottom: 1px solid var(--line); }
label.exclude-done { margin-bottom: 6px; font-size: 13px; align-items: flex-start; }
label.exclude-done input { margin-top: 3px; }
/* Ước tính tiền AI */
.ai-est { padding: 0 16px 12px; }
.ai-est-main { background: var(--panel); border: 1px solid var(--accent); border-radius: 10px; padding: 12px 16px; }
.ai-est-nums { display: flex; gap: 28px; flex-wrap: wrap; margin: 6px 0; }
.ai-est-nums > div { display: flex; flex-direction: column; }
.ai-est-nums b { font-size: 24px; font-variant-numeric: tabular-nums; }
.ai-est-nums small { color: var(--muted); font-size: 12px; }
.ai-card h4 { margin: 14px 0 6px; font-size: 13px; }
.ai-card .tbl tr.cur { background: var(--accent-2); }
label.ai-mode { align-items: flex-start; margin-bottom: 8px; }
label.ai-mode input { margin-top: 3px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Hộp cấu hình quét */
dialog.modal { border: none; border-radius: 12px; padding: 18px 20px; width: min(520px, calc(100vw - 32px)); max-height: 85vh; overflow: auto; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
dialog.modal::backdrop { background: rgba(0,0,0,.35); }
dialog.modal h3 { margin: 0 0 6px; }
dialog.modal .sc-rows { margin: 8px 0; }
dialog.modal .sc-rows select { width: auto; margin: 0; padding: 3px 6px; }
dialog.modal .sc-sum { background: var(--accent-2); border-radius: 6px; padding: 8px 10px; margin-bottom: 10px; }

/* Bộ lọc thẻ dạng thả xuống */
.tag-filter { display: flex; flex-direction: column; gap: 4px; }
.toolbar.sub { flex-direction: row; align-items: center; padding-top: 6px; padding-bottom: 6px; }
.toolbar.sub label.exclude-done { margin: 0; }
.tf-drop { position: relative; }
.tf-drop > summary { list-style: none; display: inline-flex; gap: 4px; align-items: center; border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; background: #fff; color: var(--text); font-size: 13px; max-width: 100%; }
.tf-drop > summary::-webkit-details-marker { display: none; }
.tf-drop > summary::after { content: "▾"; color: var(--muted); margin-left: 4px; }
.tf-drop[open] > summary { border-color: var(--accent); }
.tf-sum { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.tf-panel { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; width: 280px; max-height: 340px; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.12); padding: 6px; }
.tf-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 3px 4px; margin: 0; font-weight: 400; }
.tf-row select { width: 110px; margin: 0; padding: 3px 6px; }
.tf-foot { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 6px; text-align: right; }
.tf-has { color: var(--ok); font-weight: 600; } .tf-not { color: var(--err); font-weight: 600; }
.conv-tags { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.tag-chip.mini { font-size: 11px; padding: 0 6px; }
.bl-list { list-style: none; margin: 0; padding: 0; }
.bl-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.bl-item:hover { background: #fafbfc; }
.bl-item.active { background: var(--accent-2); }
.bl-item input.pick { width: auto; margin-top: 3px; }
.bl-item .reasons { margin: 4px 0 0; padding-left: 18px; color: var(--warn); font-size: 12px; }
#bl-other .bl-item { cursor: default; }
.bl-item input.ppick { width: auto; margin-top: 3px; }
.snip1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details summary { cursor: pointer; color: var(--muted); }
.msgs { display: flex; flex-direction: column; gap: 6px; }

/* ---- Dashboard ---- */
.dash { overflow: auto; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; padding: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.kpi-label { color: var(--muted); font-size: 12px; }
.kpi-value { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 2px 0; }
.kpi-sub { color: var(--muted); font-size: 12px; }
.kpi.good .kpi-value { color: var(--ok); }
.kpi.warn .kpi-value { color: var(--warn); }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; padding: 0 16px 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; min-width: 0; }
.card h3 { margin: 0 0 10px; font-size: 14px; }
.section-title { font-size: 15px; margin: 8px 16px 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg button { border: none; border-radius: 0; padding: 6px 12px; }
.seg button.active { background: var(--accent-2); color: var(--accent); font-weight: 600; }
/* Thanh tab con trong 1 tab (Vận Hành FB, Vận Hành Sàn, Đối soát) */
.seg.subtabs { margin: 0 0 10px; background: #fff; }
.seg.subtabs button { padding: 7px 16px; font-size: 14px; }
.seg.subtabs button[hidden] { display: none; }
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 5px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.tbl th { color: var(--muted); font-weight: 500; font-size: 12px; }
.tbl .num { text-align: right; }
.tbl tfoot td { font-weight: 600; border-bottom: none; }
.tbl tbody tr:hover { background: #fafbfc; }
.bar-col { width: 30%; }
.bar { display: block; height: 10px; background: var(--ok); border-radius: 0 4px 4px 0; min-width: 0; }
.cfg-pages { list-style: none; margin: 0 0 10px; padding: 0; }
.cfg-pages li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cfg-pages li .actions { flex-wrap: nowrap; }
.tag-box { margin: 10px 0; }
.tbl.tags td input { width: auto; margin: 0; }
.tag-chip { display: inline-block; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--c); color: var(--text); font-size: 12px; }
.tag-chip::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 5px; }

.conv .top { display: flex; gap: 6px; align-items: baseline; }
.conv .name { font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv .time { color: var(--muted); font-size: 12px; }
.conv .snip { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv.unread .name::before { content: "● "; color: var(--accent); }
.tag-done { background: var(--ok-bg); color: var(--ok); font-size: 11px; border-radius: 4px; padding: 0 6px; }

#msgs.msgs { display: flex; flex-direction: column; gap: 6px; }
.msg { max-width: 80%; padding: 7px 11px; border-radius: 12px; background: #f1f3f5; white-space: pre-wrap; word-break: break-word; }
.msg.shop { align-self: flex-end; background: var(--shop); }
.msg .at { display: block; font-size: 11px; color: var(--muted); }

form label { display: block; margin-bottom: 10px; font-weight: 500; }
form label small { display: block; font-weight: 400; color: var(--muted); }
input, textarea, select { width: 100%; font: inherit; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; margin-top: 3px; background: #fff; color: inherit; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent-2); border-color: var(--accent); }
.row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }
label.check { display: flex; align-items: center; gap: 6px; font-weight: 400; }
label.check input { width: auto; margin: 0; }
.summary { margin: 0 0 10px; font-style: italic; color: var(--muted); }
.warn { background: var(--warn-bg); color: var(--warn); border-radius: 6px; padding: 8px 12px; margin-bottom: 12px; }
.warn ul { margin: 4px 0 0; padding-left: 18px; }
.prev { background: var(--ok-bg); color: var(--ok); border-radius: 6px; padding: 8px 12px; margin-bottom: 12px; }
fieldset.mode { border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px 0; margin: 0 0 8px; }
fieldset.mode label.check { margin-bottom: 8px; }
.warn-box { background: var(--warn-bg); color: var(--warn); border-radius: 8px; padding: 10px 14px; }
.prev ul { margin: 4px 0 0; padding-left: 18px; }
.prev small { color: var(--muted); }
.items-head { display: flex; justify-content: space-between; align-items: center; font-weight: 500; margin-bottom: 4px; }
.item { display: grid; grid-template-columns: 1fr 64px 84px 28px; gap: 6px; align-items: center; margin-bottom: 8px; }
.item input { margin: 0; }
.item .line { text-align: right; font-variant-numeric: tabular-nums; }
.item .hint { grid-column: 1 / -1; color: var(--muted); margin-top: -4px; }
.item.bad .prod { border-color: var(--err); background: var(--err-bg); }
.item.bad .hint { color: var(--err); }
.total { text-align: right; margin: 8px 0 12px; font-size: 15px; }
.err { background: var(--err-bg); color: var(--err); border-radius: 6px; padding: 8px 12px; margin-bottom: 10px; }
.ok-box { background: var(--ok-bg); color: var(--ok); border-radius: 8px; padding: 14px; margin-bottom: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
button { font: inherit; border-radius: 6px; padding: 7px 14px; cursor: pointer; border: 1px solid var(--line); background: #fff; color: inherit; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button.primary:disabled { opacity: .6; cursor: wait; }
button.ghost { background: transparent; }
button.ghost.del { padding: 4px; border: none; color: var(--muted); }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================================
   Giao diện v3 (Neon của Gemini, 24/11/2026): mặc định Cam Tiến Bộ (#e8590c),
   cho chọn màu trên menu (Cam / Xanh Mầm Cây / Xanh Ngọc / Xanh Dương),
   Sidebar 5 nhóm có thu gọn, tìm nhanh Ctrl+K, bảng & thẻ thoáng rõ
   ===================================================================== */
:root {
  --bg: #f4f6f9; --panel: #fff; --line: #e4e8ef; --line-2: #f0f2f6; --text: #18202c; --muted: #647084;
  --accent: #e8590c; --accent-hover: #d44f08; --accent-2: #fff3eb; --accent-3: #ffd8c2; --accent-rgb: 232, 89, 12; --brand: #e8590c;
  --ok: #15803d; --ok-bg: #ecfdf3; --warn: #a16207; --warn-bg: #fefce8; --err: #b91c1c; --err-bg: #fef2f2;
  --lane-pending: #64748b; --lane-ok: #15803d; --lane-manual: #d97706; --lane-edit: #e8590c;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 12px rgba(15, 23, 42, .04);
  --radius: 12px;
}
html[data-theme="green"] {
  --accent: #15803d; --accent-hover: #166534; --accent-2: #ecfdf3; --accent-3: #bbf7d0; --accent-rgb: 21, 128, 61; --brand: #15803d; --lane-edit: #15803d;
}
html[data-theme="teal"] {
  --accent: #0f766e; --accent-hover: #115e59; --accent-2: #f0fdfa; --accent-3: #99f6e4; --accent-rgb: 15, 118, 110; --brand: #0f766e; --lane-edit: #0f766e;
}
html[data-theme="blue"] {
  --accent: #1d4ed8; --accent-hover: #1e40af; --accent-2: #eff6ff; --accent-3: #bfdbfe; --accent-rgb: 29, 78, 216; --brand: #1d4ed8; --lane-edit: #1d4ed8;
}
body { font-family: "Be Vietnam Pro", system-ui, "Segoe UI", Roboto, sans-serif; font-size: 14px; }
header { padding: 10px 18px; border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(0,0,0,.02); gap: 14px; }
h1 { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.tabs-nav { background: #f1f2f5; padding: 3px; border-radius: 10px; }
.tab-btn { padding: 7px 16px; border-radius: 8px; font-weight: 600; }
.tab-btn.active { background: #fff; color: var(--accent); box-shadow: var(--shadow); }
.tab-btn:hover:not(.active) { background: rgba(255,255,255,.6); }

input, textarea, select { border-radius: 8px; border-color: var(--line); transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-2); }
button { border-radius: 8px; transition: background .15s, box-shadow .15s, transform .05s; font-weight: 500; }
button:active:not(:disabled) { transform: translateY(1px); }
button.primary { box-shadow: 0 1px 2px rgba(var(--accent-rgb), .25), 0 3px 10px rgba(var(--accent-rgb), .16); }
button.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
button.primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
button.ghost { border-color: var(--line); background: #fff; }
button.ghost:hover { background: #f6f8fa; }

/* Bước (số tròn) */
.step { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; flex: none; }
.scanbar { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.scanbar-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.scanbar-row.sub { font-size: 13px; padding-left: 32px; gap: 16px; }
.scanbar .cond { background: var(--line-2); border-radius: 8px; padding: 3px 10px; }
.lane { border: none; border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; border-top: 3px solid var(--lane-color, var(--line)); }
.lane > .bl-list, .lane > .edit-split { flex: 1; overflow: auto; min-height: 0; }
.lane .col-title { position: static; font-size: 13.5px; }
.count { display: inline-block; min-width: 22px; padding: 0 7px; margin-left: 4px; border-radius: 99px; background: var(--line-2); color: var(--text); font-size: 12px; text-align: center; }
/* Lệnh tiện ích: tiến độ + Huỷ dùng chung (public/lenh.js, 24/11/2026) */
.lenh-p { display: flex; align-items: center; gap: 8px; margin: 3px 0 2px; flex-wrap: wrap; }
.lenh-bar { position: relative; width: 120px; height: 6px; border-radius: 99px; background: var(--line-2, #eceef2); overflow: hidden; flex: none; }
.lenh-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 99px; transition: width .4s; }
.lenh-bar.indet i { animation: lenh-run 1.4s ease-in-out infinite; }
.lenh-bar.idle i { width: 100%; background: transparent; }
@keyframes lenh-run { 0% { left: -35%; } 100% { left: 100%; } }
.lenh-warn { color: var(--err); }
.lenh-huy { padding: 1px 8px !important; }
/* Giao diện riêng module len-don — server chèn vào app.css tại dấu @mod len-don/tab.css (giữ thứ tự cũ) */
.ai-tag { font-size: 11px; color: var(--muted); }
/* ---- Lên hàng loạt ---- */
#tab-hang-loat:not([hidden]) { display: flex; flex-direction: column; }
.grid-bulk { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(220px, 1fr) 420px; border-top: 1px solid var(--line); }
.bl-main { flex: 1; min-width: 0; }
.bl-actions { position: sticky; bottom: 0; background: var(--panel); border-top: 1px solid var(--line); }
#bl-chat { border-top: 1px dashed var(--line); max-height: 45vh; overflow: auto; }
.step.sm { width: 18px; height: 18px; font-size: 11px; margin-right: 6px; vertical-align: 1px; }
/* ---- Lên hàng loạt ---- */
#tab-hang-loat:not([hidden]) { display: flex; flex-direction: column; padding: 12px; gap: 12px; }
.grid-bulk { border-top: none; gap: 12px; grid-template-columns: 230px minmax(230px, 1fr) minmax(230px, 1fr) minmax(600px, 2fr); }
.lane-pending { --lane-color: var(--lane-pending); }
.lane-ok { --lane-color: var(--lane-ok); }
.lane-manual { --lane-color: var(--lane-manual); }
.lane-edit { --lane-color: var(--lane-edit); }
.lane-pending .step { background: var(--lane-pending); }
.lane-ok .step { background: var(--lane-ok); }
.lane-ok .count { background: var(--ok-bg); color: var(--ok); }
.lane-manual .count { background: var(--warn-bg); color: var(--warn); }
.bl-actions { position: static; border-top: 1px solid var(--line-2); background: #fcfcfd; }
.bl-actions button { width: 100%; padding: 9px 12px; }
.ai-tag { display: inline-block; margin-top: 3px; padding: 0 6px; border-radius: 6px; background: var(--line-2); }
.edit-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 38%); }
.edit-split > #bl-edit { overflow: auto; min-height: 0; }
.chat-side { border-left: 1px solid var(--line-2); background: #fafbfc; overflow: auto; min-height: 0; display: flex; flex-direction: column; }
.chat-head { position: sticky; top: 0; background: #fafbfc; padding: 8px 12px; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line-2); z-index: 1; }
#bl-chat { border-top: none; max-height: none; }
.badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.badges span { font-size: 11px; padding: 1px 7px; border-radius: 99px; }
.badge-ok { background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.badge-muted { background: var(--line-2); color: var(--muted); }
.badge-heavy { background: #fff1e0; color: #b35400; font-weight: 600; }
.weight-warn { margin: 2px 0; padding: 2px 8px; border-radius: 6px; background: #fff4e0; color: #b45309; font-weight: 700; font-size: 12.5px; }
/* Màn hình hẹp: xếp dọc */
@media (max-width: 1400px) {
  .grid-bulk { grid-template-columns: 220px minmax(220px, 1fr) minmax(220px, 1fr) minmax(480px, 1.6fr); }
  .edit-split { grid-template-columns: 1fr; }
  .chat-side { border-left: none; border-top: 1px solid var(--line-2); max-height: 320px; }
}
/* ---- Thiết kế lại 22/11/2026: chọn page, nhóm Cần xem, câu chat bằng chứng ---- */
.bl-pages { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.bl-pages .chip-check.err { border-color: #e5484d; color: #b42318; background: #fff1f0; }
.bl-page-err { margin-top: 6px; padding: 6px 10px; border-radius: 6px; background: #fff1f0; color: #b42318; font-size: 12.5px; }
.bl-sec { padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--line-2); border-top: 1px solid var(--line-2); }
.bl-sec.warn { color: #b45309; background: #fff4e0; }
.bl-sec.bad { color: #b42318; background: #fff1f0; }
.bl-ev { margin-top: 4px; padding: 4px 8px; border-radius: 7px; background: #f8fafc; border: 1px solid var(--line-2); font-size: 12px; font-style: italic; color: var(--text, #333); overflow-wrap: anywhere; }
.bl-btns { display: flex; flex-direction: column; gap: 4px; }
/* Chọn thẻ quét / loại trừ */
.bl-tags { position: relative; }
.bl-tags > summary { list-style: none; cursor: pointer; padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; font-size: 13px; background: #fff; white-space: nowrap; max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
.bl-tags > summary::-webkit-details-marker { display: none; }
.bl-tags > summary.on { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.bl-tags-pop { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: 420px; max-width: 90vw; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.bl-tag-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 260px; overflow: auto; }
.bl-tag-list .tg { padding: 3px 10px; border-radius: 99px; border: 1px solid var(--c, #888); background: #fff; color: var(--c, #555); font-size: 12.5px; cursor: pointer; }
.bl-tag-list .tg.any { background: #e7f6ec; border-color: #1a7f37; color: #1a7f37; font-weight: 600; }
.bl-tag-list .tg.none { background: #fff1f0; border-color: #b42318; color: #b42318; font-weight: 600; text-decoration: line-through; }
.tg-mode.any { color: #1a7f37; font-weight: 600; }
.tg-mode.none { color: #b42318; font-weight: 600; }
/* Cột Cần lên đơn rộng hơn (thẻ có câu chat + tên page); co giãn hợp lý khi có Sidebar 220px (Neon của Gemini, 24/11/2026) */
.grid-bulk { grid-template-columns: minmax(240px, 1.15fr) minmax(210px, 1fr) minmax(230px, 1.1fr) minmax(460px, 1.7fr); }
@media (max-width: 1600px) {
  .grid-bulk { grid-template-columns: minmax(210px, 1.1fr) minmax(190px, 1fr) minmax(210px, 1.05fr) minmax(360px, 1.5fr); }
  .edit-split { grid-template-columns: 1fr; }
  .chat-side { border-left: none; border-top: 1px solid var(--line-2); max-height: 300px; }
}
.bl-item { border-bottom: 1px solid var(--line-2); border-left: 3px solid transparent; padding: 10px 12px; transition: background .12s; }
.bl-item:hover { background: #fafbfc; }
.bl-item.active { background: var(--accent-2); border-left-color: var(--accent); }
.bl-item.compact { padding: 7px 10px; gap: 8px; }
.bl-item.compact .line1 { display: flex; justify-content: space-between; gap: 6px; }
.bl-item.compact .line1 b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-item .reasons { color: var(--warn); }
details.other summary { font-size: 13px; }
.msg { border-radius: 14px; font-size: 13.5px; box-shadow: 0 1px 1px rgba(0,0,0,.03); }
.msg.shop { background: #e9f1ff; }

/* Form đơn trong cột Sửa đơn */
.order-form label { font-size: 13px; }
.order-form .total { background: var(--line-2); border-radius: 8px; padding: 8px 12px; }
.order-form .actions button[type=submit] { flex: 1; padding: 9px 14px; }
.ok-box { border: 1px solid #cfe9d6; }
.warn, .warn-box { border: 1px solid #f3e2a6; }
.prev { border: 1px solid #cfe9d6; }

/* ---- Dashboard ---- */
.kpi, .card { border: none; box-shadow: var(--shadow); border-radius: var(--radius); }
.kpi-value { font-size: 28px; }
.ai-est-main { border: none; box-shadow: var(--shadow); border-left: 4px solid var(--accent); }
.scanbar .seg, .toolbar .seg { background: #fff; }
.seg { border-radius: 8px; }
.seg button.active { background: var(--accent); color: #fff; }

/* Hộp cấu hình quét */
dialog.modal .sc-h { margin: 14px 0 6px; font-size: 13px; color: var(--accent); text-transform: uppercase; letter-spacing: .03em; }
.sc-pos { display: flex; flex-wrap: wrap; gap: 6px; }
label.chip-check { margin: 0; padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; font-size: 13px; cursor: pointer; background: #fff; }
label.chip-check:has(input:checked) { border-color: var(--accent); background: var(--accent-2); color: var(--accent); font-weight: 600; }

/* Kho: nút to hiện số kg */
.wh-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 10px; transition: border-color .15s, background .15s; }
.wh-box.heavy { border-color: var(--lane-manual); background: var(--warn-bg); }
.wh-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; font-size: 13px; }
.wh-note { color: var(--warn); font-weight: 600; font-size: 12.5px; }
.wh-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
label.wh { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0; padding: 10px 6px 8px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; text-align: center; font-weight: 400; transition: border-color .12s, box-shadow .12s; }
label.wh input { position: absolute; opacity: 0; pointer-events: none; }
label.wh .wh-kg { font-size: 22px; font-weight: 700; line-height: 1.1; }
label.wh .wh-kg small { font-size: 12px; font-weight: 600; margin-left: 1px; color: var(--muted); }
label.wh .wh-name { font-size: 11.5px; color: var(--muted); line-height: 1.25; }
label.wh:hover { border-color: var(--accent-3); }
label.wh:has(input:checked) { border-color: var(--accent); background: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-2); }
label.wh:has(input:checked) .wh-kg { color: var(--accent); }
label.discount input { max-width: 200px; }

/* Lọc nội bộ cột Đủ điều kiện + nhãn trên đơn */
.lane-filter { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line-2); background: #fcfcfd; }
.lane-filter label.chip-check { font-size: 12.5px; padding: 3px 10px; }
.lane-filter label.chip-check input { width: auto; margin: 0 4px 0 0; }

/* ---- Xử lý đơn (giao hàng) ---- */
#tab-xu-ly:not([hidden]) { display: flex; flex-direction: column; padding: 12px; gap: 12px; }
#tab-xu-ly .scanbar-row.sub { padding-left: 0; }
.grid-ship > .lane[hidden] { display: none; }
/* Giao diện riêng module xu-ly — server chèn vào app.css tại dấu @mod xu-ly/tab.css (giữ thứ tự cũ) */
#xl-q { width: 290px; max-width: 100%; margin-left: auto; }
#xl-kinds[hidden] { display: none; }
#xl-kinds .chip-toggle { padding: 2px 10px; font-size: 12px; }
.sh-hint { font-size: 12px; color: var(--err); font-weight: 600; margin-top: 2px; }
/* ---- Xử lý đơn: đơn đã xử lý (cuối tab) ---- */
#tab-xu-ly { overflow-y: auto; }
#tab-xu-ly .grid-ship { flex: 0 0 auto; height: max(520px, calc(100vh - 175px)); }
.xl-log { flex: none; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); border-top: 3px solid var(--ok); padding: 12px 14px; }
.xl-log-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 8px; }
.xl-log-head h3 { margin: 0; font-size: 15px; }
.xl-log-head .count { background: var(--ok-bg); color: var(--ok); }
.xl-log-head .seg button b { margin-left: 3px; }
.xl-log-scroll { max-height: 420px; overflow: auto; }
.xl-log-tbl td { vertical-align: top; }
.xl-log-tbl tr.new td { background-color: #fffbea; }
.xl-log-tbl tr.xl-warn td { background-color: #fff1f0; }
.xl-log-tbl tr.xl-warn td:first-child { box-shadow: inset 4px 0 0 var(--err); }
.xl-log-tbl tr.xl-big td { background-color: #ffe4e0; }
.xl-log-tbl tr.xl-big td:first-child { box-shadow: inset 6px 0 0 #d92d20; }
.xl-log-tbl tr.xl-prog td { opacity: .7; }
.badge-big { background: #d92d20; color: #fff; font-weight: 700; font-size: 11.5px; padding: 1px 8px; }
.xl-warn-msg { color: var(--err); font-weight: 600; font-size: 12.5px; margin: 2px 0; }
.xl-warnbar { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 6px 10px; margin-bottom: 6px; border-radius: 8px; background: #fff1f0; color: var(--err); font-size: 13px; }
.xl-log-tbl .sh-notes { margin-top: 6px; }
.xl-notes { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.xl-notes li { padding: 1px 0; }
.xl-notes time { color: var(--muted); margin-right: 6px; font-variant-numeric: tabular-nums; }
.xl-out { font-weight: 600; font-size: 13px; }
.grid-ship.cols-2 { grid-template-columns: 1fr 1fr; }
.grid-ship.cols-3 { grid-template-columns: 1.1fr 1.1fr 1fr; }
.grid-ship.cols-5 { grid-template-columns: repeat(5, minmax(200px, 1fr)); }
.lane-nopickup { --lane-color: var(--err); }
.lane-nopickup .count { background: #fff1f0; color: var(--err); }
.xl-lanes { display: inline-flex; gap: 6px; }
.chip-toggle { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 4px 12px; font-size: 13px; color: var(--muted); }
.chip-toggle b { font-weight: 600; margin-left: 2px; }
.chip-toggle.on { background: var(--accent-2); border-color: var(--accent-3); color: var(--accent); }
.chip-toggle.on::before { content: '✓ '; }
.xl-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.xl-tag select { width: auto; min-width: 140px; }
.badge-tag { background: #e8f0fc; color: #2f6fd0; font-size: 11px; padding: 1px 7px; }
.badge-overdue { background: var(--err); color: #fff; font-size: 11.5px; font-weight: 700; }
.sh-item.overdue { background: var(--err-bg); border-left-color: var(--err); }
.lane-arrived .sh-item.overdue .sh-label { color: var(--err); }
.sh-notes { margin-top: 6px; }
.sh-notes ul { list-style: none; margin: 0 0 4px; padding: 0; font-size: 12px; }
.sh-notes li { padding: 2px 0; }
.sh-notes li time { color: var(--muted); margin-right: 6px; font-variant-numeric: tabular-nums; }
.sh-notes li:first-child { font-weight: 600; color: var(--ok); }
.sh-note-form { display: flex; gap: 6px; }
.sh-note-form input { flex: 1; min-width: 0; padding: 4px 8px; font-size: 12.5px; }
.sh-note-form button { padding: 3px 10px; font-size: 12px; }
.sh-quick { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.sh-quick .chip { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 1px 9px; font-size: 11.5px; color: var(--muted); }
.sh-quick .chip-fail { color: var(--err); border-color: #f3b5ae; }
.sh-quick .chip:hover { border-color: var(--accent); color: var(--accent); }
.grid-ship { flex: 1; min-height: 0; display: grid; gap: 12px; grid-template-columns: minmax(280px, 1.3fr) minmax(240px, 1fr) minmax(240px, 1fr) minmax(220px, .9fr); }
.lane-issue { --lane-color: var(--err); }
.lane-issue .count { background: var(--err-bg); color: var(--err); }
.lane-out { --lane-color: var(--accent); }
.lane-out .count { background: var(--accent-2); color: var(--accent); }
.lane-arrived { --lane-color: #2f6fd0; }
.lane-arrived .count { background: #e8f0fc; color: #2f6fd0; }
.lane-rest { --lane-color: var(--lane-pending); }
.sh-item { display: block; cursor: default; content-visibility: auto; contain-intrinsic-size: auto 220px; contain: layout style paint; transition: none; }
#tab-xu-ly .sh-item:hover { background: transparent; }
#tab-xu-ly .sh-item.new:hover { background: #fffbea; }
#tab-xu-ly .sh-item.overdue:hover { background: var(--err-bg); }
#tab-xu-ly .sh-item input, #tab-xu-ly .sh-item button { transition: none; }
.xl-log-tbl tbody tr { content-visibility: auto; contain-intrinsic-size: auto 96px; }
.xl-more-wrap { list-style: none; padding: 8px 12px; text-align: center; }
.xl-more { width: 100%; }
.sh-item.new { background: #fffbea; border-left-color: var(--lane-manual); }
.sh-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.sh-cust { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 4px; min-width: 0; font-size: 13px; }
.sh-cust b { word-break: break-word; }
.sh-badges { margin-left: auto; white-space: nowrap; }
.xl-cphone { font-weight: 700; color: #1971c2; background: #e7f5ff; padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }
.xl-cphone.copied { background: var(--ok-bg); color: var(--ok); }
.sh-label { font-weight: 600; font-size: 13px; margin-top: 3px; }
/* Đã giục giao quá 5 giờ mà bưu cục chưa phát lại */
.sh-nudge { margin-top: 3px; padding: 3px 8px; border-radius: 6px; background: #fff4e0; color: #b45309; font-size: 13px; font-weight: 700; }
.lane-issue .sh-label { color: var(--err); }
.lane-out .sh-label { color: var(--accent); }
.lane-arrived .sh-label { color: #2f6fd0; }
.sh-reason { font-size: 12.5px; color: var(--text); }
.xl-of:empty { display: none; }
.xl-ophone { font-weight: 600; color: var(--muted); }
.xl-ophone.copied { color: var(--ok); }
.xl-wb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 3px; font-size: 12.5px; }
.xl-wb { font-weight: 700; color: #343a40; background: #f1f3f5; padding: 1px 6px; border-radius: 5px; font-variant-numeric: tabular-nums; }
.xl-wb.copied { background: var(--ok-bg); color: var(--ok); }
/* Lý do (J&T báo): xanh nước biển, in đậm cho dễ đọc */
.sh-why { color: #0a47a8; font-weight: 800; font-size: 14px; margin-top: 3px; }
 /* xanh Facebook (#1877f2) đậm hơn nhiều */
@media (prefers-color-scheme: dark) { .sh-why { color: #4c9bff; } }
.sh-meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; }
.sh-meta a { color: inherit; }
.sh-items { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-item details { margin-top: 4px; font-size: 12px; }
.sh-item details summary { cursor: pointer; color: var(--muted); }
.sh-ev { list-style: none; margin: 4px 0 0; padding: 0 0 0 10px; border-left: 2px solid var(--line); }
.sh-ev li { margin: 0 0 4px; }
.sh-ev time { color: var(--muted); margin-right: 6px; font-variant-numeric: tabular-nums; }
.badge-warn { background: #b45309; color: #fff; font-weight: 700; font-size: 11px; padding: 1px 7px; }
.badge-new { background: var(--lane-manual); color: #fff; font-weight: 700; font-size: 11px; padding: 1px 7px; }
.badge-fail { background: var(--err-bg); color: var(--err); font-weight: 600; font-size: 11px; padding: 1px 7px; }
.xl-back { margin-top: 4px; }
/* Mốc J&T làm đơn bật lại, hiện ngay dưới ghi chú */
.sh-notes li.sh-pop { color: var(--err); font-weight: 400; padding-left: 16px; }
.sh-notes li.sh-pop time { color: var(--err); }
/* Duyệt chuyển hoàn / Giao lại J&T trên đơn Đăng ký chuyển hoàn (26/11/2026) */
.xl-jt { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.xl-jt .xl-hoan, .xl-jt .xl-glbtn { border-radius: 8px; padding: 5px 10px; font-weight: 600; cursor: pointer; background: #fff; }
.xl-jt .xl-hoan { border: 1px solid #c92a2a; color: #c92a2a; }
.xl-jt .xl-hoan.arm { background: #c92a2a; color: #fff; }
.xl-jt .xl-glbtn { border: 1px solid #2b8a3e; color: #2b8a3e; }
.xl-jt button:disabled { opacity: .6; cursor: default; }
.xl-gl { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1px solid #b2f2bb; background: #ebfbee; border-radius: 8px; }
.xl-gl .xl-glr { flex: 1 1 100%; }
.xl-gl input.xl-gld, .xl-gl input.xl-glt { width: auto; flex: 0 0 auto; }
/* SĐT shipper + ô sửa COD lấy từ Sửa COD J&T ngay trên thẻ Xử lý đơn (27/11/2026) */
.xl-ship { margin-top: 4px; font-size: 12.5px; line-height: 1.4; color: var(--text); }
.xl-ship-sp { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.xl-ship-of { font-size: 12px; color: var(--muted); }
.xl-phone { font-weight: 700; color: #0b7285; background: #e3fafc; padding: 1px 6px; border-radius: 5px; }
.xl-phone.copied { background: var(--ok-bg); color: var(--ok); }
.xl-ship-miss { font-size: 12px; color: #c92a2a; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.xl-jtlogin { border: 1px solid #c92a2a; background: #fff; color: #c92a2a; border-radius: 6px; padding: 1px 8px; font-size: 11.5px; font-weight: 600; cursor: pointer; }
.xl-jtlogin:hover { background: #fff5f5; }
.xl-cod { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
.xl-cod.busy { opacity: .75; border-color: #f59f00; background: #fff9db; }
.xl-cod.done { border-color: var(--ok); background: #ebfbee; }
.xl-cod-head { display: flex; justify-content: flex-start; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.xl-cod-lb { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.xl-cod-old { font-size: 12.5px; color: var(--text); font-variant-numeric: tabular-nums; }
.xl-cod-old b { font-size: 13.5px; color: #c92a2a; }
.xl-cod-row { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.xl-cod-in { width: 102px; min-width: 84px; flex: 1 1 90px; margin: 0; padding: 3px 7px; font-size: 12.5px; font-variant-numeric: tabular-nums; background: #fff; }
.xl-cod-pin { width: 66px; margin: 0; padding: 3px 6px; font-size: 12px; background: #fff; -webkit-text-security: disc; }
.xl-cod-zero { padding: 3px 7px; font-size: 11.5px; font-weight: 600; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--muted); white-space: nowrap; cursor: pointer; }
.xl-cod-zero:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.xl-cod-go { padding: 3px 9px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.xl-cod-delta { flex-basis: 100%; font-size: 11.5px; color: var(--muted); }
.xl-cod-delta:empty { display: none; }
.xl-cod-delta.down { color: var(--ok); font-weight: 600; }
.xl-cod-delta.up { color: #d9480f; font-weight: 600; }
.xl-cod-ed { color: #c92a2a; font-weight: 700; }
/* Tab Kiểm Soát Hàng Hoàn (tách từ Xử lý đơn 23/11/2026) */
#tab-hang-hoan:not([hidden]) { display: block; padding: 12px; }
#tab-hang-hoan .xl-ret { margin: 0; }
#hh-q { width: 290px; max-width: 100%; flex: 0 1 290px; }
#tab-hang-hoan .xl-ret-who[hidden] { display: none; }
.xl-ret { margin: 0 16px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius, 12px); box-shadow: var(--shadow); padding: 14px 16px; }
.xl-ret-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.xl-ret-head h3 { margin: 0; }
.xl-ret-sum { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 8px; }
.xl-ret-sum span b { font-variant-numeric: tabular-nums; }
.xl-ret-scroll { overflow-x: auto; }
.xl-ret-tbl td { vertical-align: top; font-size: 13px; }
.xl-ret-tbl td .small { color: var(--muted); }
.xl-ret-tbl tr.st-back td { background: rgba(239, 68, 68, .07); }
.xl-ret-tbl tr.st-recv td { opacity: .75; }
.xl-ret-tbl .bad-text { color: #b42318; font-weight: 600; }
.xl-ret-tbl .ok-text { color: #1a7f37; font-weight: 600; }
.xl-ret-sum { display: block; }
.xl-dg-title { margin-bottom: 6px; }
.xl-dg { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); gap: 6px 10px; max-height: 320px; overflow-y: auto; overflow-x: hidden; }
.xl-dc { box-sizing: border-box; min-width: 0; display: grid; grid-template-columns: 70px minmax(84px, 1fr) 64px 112px; min-height: 42px; align-items: center; gap: 8px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card, #fff); font-size: 13px; }
.xl-dc.ok { border-color: #a6d8b4; background: rgba(26, 127, 55, .06); }
.xl-dc.short { border-color: #f1a7a0; background: rgba(239, 68, 68, .06); }
.xl-dc input.xl-dayn { width: 64px; padding: 4px 6px; font-size: 14px; text-align: right; }
.xl-dc.short input.xl-dayn { border-color: #b42318; color: #b42318; }
.xl-dc .xl-dfull { padding: 3px 8px; font-size: 12px; white-space: nowrap; border: 1px solid #1a7f37; color: #1a7f37; background: transparent; border-radius: 6px; cursor: pointer; }
.xl-dc .xl-dfull:hover { background: #1a7f37; color: #fff; }
.xl-dc .xl-dok { color: #1a7f37; font-weight: 600; white-space: nowrap; }
.xl-dc .xl-dmiss { color: #b42318; font-size: 11px; font-weight: 600; white-space: nowrap; }
.xl-dc .xl-dfull, .xl-dc .xl-dok { justify-self: start; }
.xl-dc b { font-variant-numeric: tabular-nums; }
.xl-ret-who { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 6px 0; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
/* Tab Sửa COD J&T (modules/sua-cod — nâng cấp v3 & bể phiên chung, Neon của Gemini 25/11/2026) */
.sc-wrap { padding: 14px 16px; max-width: 1380px; display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.sc-main { min-width: 0; }
.sc-side { position: sticky; top: 8px; }
.sc-side-head { margin: 2px 0 8px; }
.sc-side-t { font-size: 13px; font-weight: 700; color: var(--text); }
.sc-side-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
@media (max-width: 960px) { .sc-wrap { grid-template-columns: 1fr; } .sc-side { position: static; order: -1; } }

/* Thanh tra cứu nổi bật */
.sc-head { display: flex; flex-direction: column; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.sc-head-t { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sc-head h3 { margin: 0; font-size: 16px; }
.sc-sub { font-size: 12.5px; color: var(--muted); }
.sc-search { display: flex; gap: 8px; }
.sc-search input { flex: 1; min-width: 0; padding: 9px 12px; font-size: 15px; border-radius: 9px; margin: 0; }
.sc-search button { padding: 8px 18px; font-size: 14px; font-weight: 600; border-radius: 9px; white-space: nowrap; }

.sc-empty { text-align: center; padding: 36px 20px; background: var(--panel); border: 1px dashed var(--line); border-radius: 12px; color: var(--text); display: grid; gap: 6px; justify-items: center; }
.sc-empty-ico { font-size: 28px; line-height: 1; }
.sc-msg { padding: 10px 14px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); margin-bottom: 10px; border: 1px solid #ffe066; }

/* Cột phải: Bể phiên J&T chung */
.sc-acc { display: flex; flex-direction: column; gap: 10px; }
.sc-acc .sc-a { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 10px 12px; font-size: 13px; box-shadow: var(--shadow); }
.sc-acc .sc-a.ok { border-color: #cde8d5; }
.sc-acc .sc-a.empty { border-color: #ffc9c9; background: #fffafb; }
.sc-a-head { display: flex; align-items: center; gap: 8px; }
.sc-a .sc-dot { width: 9px; height: 9px; border-radius: 50%; background: #e03131; flex: none; box-shadow: 0 0 0 3px rgba(224, 49, 49, .14); }
.sc-a.ok .sc-dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(43, 138, 62, .15); }
.sc-a-t { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 2px; }
.sc-a-t b { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-pool-pill { display: inline-flex; align-items: center; gap: 4px; width: fit-content; padding: 1px 7px; border-radius: 99px; font-size: 11.5px; font-weight: 600; }
.sc-pool-pill.ok { background: var(--ok-bg); color: var(--ok); }
.sc-pool-pill.empty { background: var(--err-bg); color: var(--err); }
.sc-a-head .sc-in { flex: none; white-space: nowrap; }
.sc-a.empty .sc-in { border-color: var(--err); color: var(--err); background: #fff; font-weight: 600; }

/* Danh sách phiên đang sống trong bể */
.sc-pool { display: flex; flex-direction: column; gap: 4px; padding-top: 6px; border-top: 1px solid var(--line-2); }
.sc-pi { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 4px 7px; border-radius: 7px; background: #f8fafc; font-size: 12px; }
.sc-pi-l { display: flex; align-items: center; gap: 5px; min-width: 0; }
.sc-pi-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); flex: none; }
.sc-pi.soon .sc-pi-dot { background: #f59f00; }
.sc-pi.busy .sc-pi-dot { background: var(--accent); }
.sc-pi-name { font-weight: 600; color: var(--text); white-space: nowrap; }
.sc-pi-me { padding: 0 5px; border-radius: 4px; background: var(--accent-2); color: var(--accent); font-size: 10.5px; font-weight: 700; }
.sc-pi-login { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-pi-exp { color: var(--muted); font-size: 11.5px; white-space: nowrap; flex: none; font-variant-numeric: tabular-nums; }
.sc-pi.soon .sc-pi-exp { color: #d9480f; font-weight: 600; }

/* Tài khoản J&T để sẵn của chính mình */
.sc-cred2 { display: grid; gap: 4px; padding-top: 7px; border-top: 1px dashed var(--line); font-size: 12px; }
.sc-cred2-t { font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 1px; }
.sc-cr { display: flex; align-items: center; gap: 6px; }
.sc-cr .k { width: 58px; flex: none; color: var(--muted); }
.sc-cr .sc-copy { font-size: 12px; word-break: break-all; text-align: left; }

/* Thẻ đơn hàng */
.sc-card { border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.sc-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.sc-code-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sc-top .sc-code { font-size: 18px; font-weight: 800; letter-spacing: .2px; font-variant-numeric: tabular-nums; }
.sc-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.sc-top-r { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.sc-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--accent-2); color: var(--accent); border: 1px solid var(--accent-3); }
.sc-badge.gray { background: #f1f5f9; color: var(--muted); border-color: var(--line); }

.sc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 6px 18px; margin-top: 10px; font-size: 13.5px; }
.sc-grid .k, .sc-ship .k { color: var(--muted); }
.sc-ship { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; padding: 7px 10px; border-radius: 8px; background: #f8fafc; font-size: 13px; }
.sc-ship:empty { display: none; }

/* Thanh trạng thái bể trên thẻ đơn */
.sc-jt { margin-top: 10px; padding: 8px 11px; border-radius: 9px; background: #f4fbf6; border: 1px solid #d3f2dd; color: #1f5132; display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: 13px; }
.sc-jt-l { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sc-jt.sc-jt-gray { background: #f8f9fa; border-color: var(--line); color: var(--muted); }
.sc-jt.sc-need { background: var(--err-bg, #fff5f5); color: var(--err, #c92a2a); border: 1px solid #ffc9c9; font-weight: 600; }
.sc-jt.sc-need .sc-in { border-color: var(--err, #c92a2a); color: var(--err, #c92a2a); background: #fff; font-weight: 600; }
.sc-needtxt { color: var(--err, #c92a2a); font-weight: 600; }

/* Khung sửa COD & Cân */
.sc-edit { margin-top: 10px; display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfd; color: var(--text); font-size: 13.5px; }
.sc-er { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sc-lb { width: 72px; color: var(--muted); font-weight: 600; font-size: 13px; }
.sc-old { min-width: 105px; font-weight: 800; font-size: 15.5px; font-variant-numeric: tabular-nums; }
.sc-arr { color: var(--muted); font-weight: 600; }
.sc-er input { width: 145px; font-size: 15px; font-weight: 600; padding: 6px 10px; border-radius: 8px; margin: 0; background: var(--panel); font-variant-numeric: tabular-nums; }
.sc-unit { color: var(--muted); font-weight: 500; }
.sc-qzero { padding: 3px 8px; font-size: 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-weight: 600; }
.sc-qzero:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: var(--accent-2); }
.sc-fee { margin-left: 4px; padding: 3px 9px; border-radius: 99px; background: #eef2f7; font-size: 12.5px; color: var(--muted); }
.sc-fee b { color: var(--text); font-variant-numeric: tabular-nums; }
.sc-jtline { font-size: 13px; color: var(--muted); padding-bottom: 6px; border-bottom: 1px dashed var(--line); }
.sc-jtline b { color: var(--text); }
.sc-diff { color: var(--warn); font-weight: 600; }
.sc-delta { font-size: 13px; font-weight: 700; color: var(--accent); }
.sc-delta.down { color: var(--ok); }
.sc-delta.up { color: #d9480f; }
.sc-er-act { margin-top: 2px; padding-top: 4px; }
.sc-go { padding: 7px 18px; font-size: 14px; font-weight: 700; border-radius: 8px; }
.sc-edit [data-login] { cursor: pointer; }

/* Đang đọc J&T / đang sửa */
.sc-load { display: inline-block; width: 90px; height: 14px; border-radius: 4px; vertical-align: middle; background: linear-gradient(90deg, #eceff3 25%, #f8f9fb 50%, #eceff3 75%); background-size: 200% 100%; animation: sc-shim 1.1s linear infinite; }
@keyframes sc-shim { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.sc-spin { display: inline-block; width: 13px; height: 13px; border: 2px solid rgba(var(--accent-rgb, 232, 89, 12), .25); border-top-color: var(--accent); border-radius: 50%; vertical-align: -2px; animation: sc-rot .7s linear infinite; }
@keyframes sc-rot { to { transform: rotate(360deg); } }
.sc-edit.busy { position: relative; overflow: hidden; border-color: var(--accent-3); }
.sc-edit.busy::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 35%; background: var(--accent); border-radius: 3px; animation: sc-bar 1.2s ease-in-out infinite; }
@keyframes sc-bar { from { left: -35%; } to { left: 100%; } }
.sc-edit.busy .sc-note { color: var(--accent); font-weight: 600; }

/* Hành trình dạng timeline dọc */
.sc-tt { margin-top: 12px; font-weight: 700; font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.sc-ev { margin: 8px 0 0; padding: 0; list-style: none; max-height: 320px; overflow: auto; }
.sc-ev li { position: relative; display: grid; grid-template-columns: 112px 1fr; gap: 10px; padding: 6px 0 6px 22px; border-bottom: 1px dashed var(--line-2); font-size: 13px; }
.sc-ev li::after { content: ""; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.sc-ev li:first-child::after { top: 14px; }
.sc-ev li:last-child::after { bottom: calc(100% - 14px); }
.sc-ev li::before { content: ""; position: absolute; left: 2px; top: 10px; z-index: 1; width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; border: 2px solid var(--panel); }
.sc-ev li:first-child { font-weight: 600; color: var(--text); }
.sc-ev li:first-child::before { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-2); }
.sc-ev .t { color: var(--muted); font-variant-numeric: tabular-nums; }
.sc-ev .n { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
@media (max-width: 700px) { .sc-ev li { grid-template-columns: 1fr; gap: 2px; } }

/* Lịch sử sửa trên thẻ đơn */
.sc-log { margin-top: 10px; font-size: 12.5px; }
.sc-li { padding: 5px 8px; margin-top: 4px; background: #f8fafc; border-radius: 7px; border: 1px solid var(--line-2); }
.sc-li.bad { color: var(--err); border-color: #ffc9c9; background: #fff5f5; }

/* Nút chép */
.sc-copy { border: 1px solid var(--line); background: var(--panel); border-radius: 6px; padding: 1px 7px; font: inherit; font-weight: 600; cursor: pointer; color: var(--text); transition: border-color .12s, color .12s; }
.sc-copy:hover { border-color: var(--accent); color: var(--accent); }
.sc-copy span { font-weight: 400; color: var(--muted); font-size: 11.5px; }

/* Khung đăng nhập từ xa */
.sc-login { width: min(1140px, 96vw); max-width: none; padding: 14px; border: 0; border-radius: 12px; box-shadow: 0 18px 50px rgba(15, 23, 42, .28); }
.sc-login-head { display: flex; align-items: center; gap: 12px; }
.sc-login-head #sc-login-x { margin-left: auto; }
.sc-login-st { font-size: 13px; color: var(--muted); }
.sc-login-st.err { color: var(--err); font-weight: 600; cursor: pointer; }
.sc-login-tip { font-size: 12.5px; color: var(--muted); margin: 6px 0 8px; }
.sc-cred { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; padding: 7px 10px; margin-bottom: 8px; background: var(--accent-2); border: 1px solid var(--accent-3); border-radius: 8px; }
.sc-screen { position: relative; outline: none; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; cursor: default; touch-action: none; }
.sc-screen:focus-within { border-color: var(--accent); }
.sc-kb { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; border: 0; padding: 0; resize: none; pointer-events: none; }
.sc-screen img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }

/* Dashboard → Nhân viên: tài khoản J&T */
.scod-ct td { vertical-align: top; }
.scod-cc { display: grid; gap: 4px; min-width: 190px; }
.scod-cc input { width: 100%; }
.scod-creds { overflow-x: auto; }

/* Lịch sử sửa (cột phải) */
.sc-hist { margin-top: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); }
.sc-hist-h { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.sc-hist-h .seg button { font-size: 12px; padding: 3px 8px; }
.sc-hlist { display: grid; gap: 5px; max-height: calc(100vh - 410px); min-height: 120px; overflow: auto; font-size: 12.5px; }
.sc-hday { font-weight: 700; font-size: 12px; color: var(--muted); margin-top: 6px; padding-bottom: 3px; border-bottom: 1px solid var(--line-2); }
.sc-hday:first-child { margin-top: 0; }
.sc-hi { padding: 6px 8px; background: #f8fafc; border: 1px solid var(--line-2); border-radius: 8px; }
.sc-hi.bad { border-color: #ffc9c9; background: #fff5f5; }
.sc-hvia { font-size: 11px; color: var(--muted); font-weight: 500; }
.sc-hsub { color: var(--muted); margin-top: 2px; font-size: 12px; }
.sc-hgo { color: var(--accent); font-weight: 700; text-decoration: none; }
.sc-hgo:hover { text-decoration: underline; }
/* Sửa xong: nháy xanh dòng COD/cân vừa đổi */
.sc-edit.sc-done .sc-old { color: var(--ok, #2b8a3e); transition: color .3s; }
.sc-edit.sc-done { border-color: var(--ok, #2b8a3e); }
/* Duyệt chuyển hoàn (J&T 206) — bấm 2 lần */
.sc-hoan { margin-left: 8px; border: 1px solid #c92a2a; color: #c92a2a; background: #fff; border-radius: 8px; padding: 6px 12px; font-weight: 600; cursor: pointer; }
.sc-hoan.arm { background: #c92a2a; color: #fff; }
.sc-hoan:disabled { opacity: .6; cursor: default; }
.sc-er input.sc-nph { width: 160px; }
/* Địa chỉ người nhận (25/11/2026): số cũ dài → xuống dòng, ô mới rộng hết dòng */
.sc-er .sc-oaddr { flex: 1; min-width: 0; font-size: 14px; line-height: 1.35; }
.sc-er input.sc-naddr { flex: 1; min-width: 200px; width: auto; font-variant-numeric: normal; }
/* Trường vừa sửa: bôi đỏ tới lần tra mới (chủ shop 25/11/2026) */
.sc-red, .sc-edit.sc-done .sc-old.sc-red { color: #e03131 !important; font-weight: 800; }
.sc-red .sc-copy { color: #e03131; border-color: #f5a3a3; }
.sc-fee.sc-red { background: #fff0f0; }
/* Ô SĐT mới: báo sai/đúng ngay cạnh ô (25/11/2026) */
.sc-er input.sc-nph.ph-bad { border-color: #e03131; box-shadow: 0 0 0 3px rgba(224, 49, 49, .12); }
.sc-er .ph-err { font-size: 13px; font-weight: 700; color: #e03131; }
.sc-er .ph-err.ok { color: var(--ok, #2b8a3e); }
/* Giao lại (26/11/2026) */
.sc-glbtn { margin-left: 8px; border: 1px solid #2b8a3e; color: #2b8a3e; background: #fff; border-radius: 8px; padding: 6px 12px; font-weight: 600; cursor: pointer; }
.sc-glbtn:disabled { opacity: .6; cursor: default; }
.sc-gl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; padding: 10px; border: 1px solid #b2f2bb; background: #ebfbee; border-radius: 8px; }
.sc-gl label { display: inline-flex; align-items: center; gap: 4px; }
.sc-gl .sc-glr { flex: 1 1 220px; min-width: 180px; }
/* ---- Đăng nhập / nhân viên ---- */
.me-box { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: 13px; }
.me-box[hidden] { display: none; }
.login-wrap { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: grid; place-items: center; padding: 16px; }
.login-wrap[hidden] { display: none; }
.login-card { width: 100%; max-width: 380px; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.login-card h2 { margin: 0; font-size: 20px; }
.login-card label { display: flex; flex-direction: column; gap: 4px; }
.login-card label[hidden] { display: none; }
.login-card button { padding: 10px; margin-top: 4px; }
body.locked > header, body.locked > main { visibility: hidden; }
.tab-btn[hidden] { display: none; }
.tabs-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; margin: 8px 0 12px; }
#tabs-dlg { width: min(460px, calc(100vw - 32px)); }
.tabs-list label { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; font-weight: 400; margin: 0; text-align: left; white-space: nowrap; cursor: pointer; }
.tabs-list input[type=checkbox] { width: auto; flex: none; margin: 0; padding: 0; height: auto; }
/* Giao diện riêng module he-thong — server chèn vào app.css tại dấu @mod he-thong/tab.css (giữ thứ tự cũ) */
.staff-tbl td { vertical-align: top; }
.staff-perm-row { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.staff-perm-row .check, .staff-perms .check { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-size: 13px; }
.staff-perm-row input, .staff-perms input { width: auto; margin: 0; }
.staff-acts { white-space: nowrap; }
.staff-acts button { padding: 3px 8px; font-size: 12px; }
.audit-tbl { font-size: 12.5px; }
.audit-tbl td { vertical-align: top; }
.audit-detail { max-width: 560px; word-break: break-word; color: var(--muted); }
/* Sao lưu dữ liệu (Dashboard) */
.sl-card { margin: 0 0 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.sl-card h3 { margin: 0; }
.sl-card #sl-info { flex: 1; min-width: 260px; line-height: 1.6; }
/* Việc chạy nền (Dashboard) */
.ht-card { margin: 0 0 12px; }
.ht-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 6px; }
.ht-head h3 { margin: 0; }
.ht-head #ht-sum { flex: 1; min-width: 200px; }
.ht-card .tbl { width: 100%; }
.ht-card .tbl td { vertical-align: top; }
.ht-card .ht-sub { margin: 10px 0 4px; font-weight: 600; color: var(--text); }
.ht-card .ht-res { max-width: 340px; overflow-wrap: anywhere; }
.ht-wrap { overflow-x: auto; }
/* Dashboard: tab con */
.db-sub { margin: 0 0 12px; flex-wrap: wrap; }
.db-sub button { position: relative; }
.db-pane > .card, .db-pane > section.card { margin-bottom: 12px; }
.kn-badge { display: inline-block; min-width: 16px; padding: 0 5px; margin-left: 4px; border-radius: 8px; background: #b26a00; color: #fff; font-size: 11px; line-height: 16px; text-align: center; }
.kn-badge.bad { background: #c62828; }
/* Trung tâm kết nối */
.kn-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.kn-head h3 { margin: 0; }
.kn-head #kn-sum { flex: 1; min-width: 200px; }
.kn-ext { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 10px 0; background: var(--panel); }
.kn-ext-head { font-size: 14px; margin-bottom: 2px; }
.kn-dir code { word-break: break-all; }
.kn-tbl { width: 100%; margin: 6px 0; font-size: 13px; }
.kn-tbl td { vertical-align: top; padding: 4px 6px; }
.kn-tbl td:first-child { white-space: nowrap; font-weight: 600; }
.kn-x { color: var(--muted); max-width: 380px; overflow-wrap: anywhere; }
.kn-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; background: #9aa3ad; vertical-align: 1px; }
.kn-dot { flex: none; padding: 0; border: 0; } .kn-dot.kn-ok { background: #1a7f37; } .kn-dot.kn-warn { background: #d68a00; } .kn-dot.kn-bad { background: #c62828; } .kn-dot.kn-off { background: #c9ced4; }
.kn-key { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.kn-key code { background: var(--bg); padding: 2px 6px; border-radius: 4px; word-break: break-all; }
.kn-guide { margin-bottom: 12px; }
.kn-guide summary { cursor: pointer; }
@media (max-width: 700px) { .kn-tbl td:first-child { white-space: normal; } .kn-tbl tr { display: block; padding: 4px 0; border-bottom: 1px solid var(--line); } .kn-tbl td { display: block; padding: 1px 0; } }
/* Đồng bộ sàn tự động (20/11/2026) */
.kn-sync .kns-grid { display: grid; gap: 6px; margin: 8px 0; }
.kn-sync .kns-sub { padding-left: 24px; color: var(--muted); }
.kn-sync input[type=number] { width: 64px; padding: 2px 6px; }
.kn-sync .kns-foot { margin-top: 6px; }
.staff-perms { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 6px 0; }
.staff-form { border-top: 1px solid var(--line-2); margin-top: 12px; padding-top: 8px; }
.audit-card { grid-column: 1 / -1; }
.audit-filter { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 8px; }
.audit-filter label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; }
.audit-filter input[type=date], .audit-filter select { width: auto; margin: 0; }
.audit-filter input[type=search] { width: 260px; margin: 0; }
.audit-scroll { max-height: 480px; overflow: auto; }
.audit-tbl .nowrap { white-space: nowrap; }
.audit-tbl tr.audit-bad td { background-color: var(--err-bg); }
.xl-out-success { color: var(--ok); }
.xl-out-fail { color: var(--err); }
.xl-out-pending { color: var(--warn); }
.sh-logged { font-size: 12px; color: var(--ok); }
.sh-actions { align-items: center; }
.qc-tbl td { vertical-align: top; }
.qc-tbl tr.qc-day td { border-top: 2px solid var(--line); }
.qc-tbl tr.qc-done { color: var(--muted); }
/* Giao diện riêng module quang-cao — server chèn vào app.css tại dấu @mod quang-cao/tab.css (giữ thứ tự cũ) */
/* ---- Thêm tiền quảng cáo ---- */
.qc-card { margin: 12px 16px 16px; }
.qc-tbl input[type=checkbox] { width: auto; margin: 0; }
.qc-tbl .qc-cost { width: 120px; text-align: right; margin: 0; padding: 3px 6px; }
.qc-tbl .qc-cost.qc-manual { border-color: var(--lane-manual); background: var(--warn-bg); }
.qc-actions { margin-top: 12px; align-items: center; }
.qc-res { padding-left: 18px; }
.qc-auto { margin: 6px 0 10px; padding: 8px 12px; border-radius: 8px; background: var(--accent-2); font-size: 13px; }
.qc-auto .qc-res { margin: 4px 0 0; padding-left: 18px; }
.qc-auto-on { display: flex; align-items: center; gap: 8px; margin: 10px 0; }
.qc-auto-on input { width: auto; margin: 0; }
/* ---- Webcake / TikTok Ads ---- */
.qc-tk h3 { margin: 0 0 6px; }
.qc-tk-add { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; margin-top: 10px; }
.qc-tk-add label { margin: 0; }
.qc-tk-add input, .qc-tk-add select { margin: 2px 0 0; width: auto; min-width: 220px; }
#qc-tk-list .tbl { margin-top: 8px; }
.ok-text { color: var(--ok); }
/* Giao diện riêng module thong-ke — server chèn vào app.css tại dấu @mod thong-ke/tab.css (giữ thứ tự cũ) */
/* ---- Thống kê ---- */
.pf-card { margin: 12px 16px 0; }
.pf-kpis { padding: 4px 0 12px; }
.pf-scroll { overflow-x: auto; }
.pf-tbl { min-width: 720px; font-size: 13.5px; }
.pf-tbl th { white-space: nowrap; position: sticky; top: 0; background: var(--panel); }
.pf-tbl td:first-child, .pf-tbl th:first-child { position: sticky; left: 0; background: var(--panel); z-index: 1; min-width: 200px; }
.pf-tbl tr.pf-page { cursor: pointer; font-weight: 600; }
.pf-tbl tr.pf-page:hover td { background-color: #fafbfc; }
.pf-tbl tr.pf-page td:first-child::before { content: '▸ '; color: var(--muted); }
.pf-tbl tr.pf-page.open td:first-child::before { content: '▾ '; }
.pf-tbl tr.pf-prod td { color: var(--text); font-weight: 400; background-color: #fcfcfd; }
.pf-tbl tr.pf-prod td:first-child { padding-left: 24px; background-color: #fcfcfd; }
.pf-tbl tfoot td { font-weight: 700; }
.pf-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pf-head h3 { margin: 0; }
.pf-filter { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; margin: 0; }
.pf-filter select { width: auto; min-width: 220px; margin: 0; font-weight: 500; }
.pf-tbl tr.pf-total td { background-color: #f6f7f9; border-top: 2px solid var(--line); font-weight: 700; font-size: 14px; }
.pf-tbl tr.pf-day td:first-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pf-sp-btn { margin-top: 12px; }
/* Thanh màu trong ô (giống màn Thống kê POS): --w độ dài, --c màu cột */
.pf-tbl td.pf-bar { background-image: linear-gradient(90deg, var(--c) 0 var(--w), transparent var(--w)); background-repeat: no-repeat; background-size: calc(100% - 8px) 70%; background-position: 4px center; }
.pf-tbl td.neg { color: var(--err); font-weight: 600; }
.pf-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: 0; }
.pf-tbl tr.pf-shop td { font-weight: 700; border-bottom: 2px solid var(--line); }
.pf-tbl .pf-sp { padding: 1px 8px; font-size: 11.5px; margin-left: 6px; font-weight: 500; }
.pf-tbl tr.pf-sprow td { background-color: #f7f9fc; }
.pf-tbl tr.pf-sprow td:first-child { background-color: #f7f9fc; }
.pf-tbl .neg { color: var(--err); }
.pf-tbl .pos { color: var(--ok); }
.pf-tbl th.fx { color: var(--accent); }
.tk-sub { margin: 16px 16px 0; font-size: 15px; }
.tk-grid { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
.bar.bar-bad { background: var(--err); opacity: .75; }
@media (max-width: 700px) { .tk-grid { grid-template-columns: 1fr; } .tk-grid .tbl { font-size: 12.5px; } }
.pf-tbl td.pf-live { font-style: italic; }
.pf-tbl td.pf-live small { display: block; font-size: 10px; color: var(--accent); font-style: normal; white-space: nowrap; }
.kpi.live { border-color: var(--accent); background: var(--accent-2); }
.tk-load { display: flex; align-items: center; gap: 10px; margin: 6px 16px 10px; }
.tk-load[hidden] { display: none; }
.tk-load-bar { position: relative; flex: 0 0 260px; height: 10px; border-radius: 6px; background: #e9ecef; overflow: hidden; }
.tk-load-bar i { position: absolute; inset: 0 auto 0 0; width: 3%; background: var(--accent); border-radius: 6px; transition: width .4s; }
.tk-stale { opacity: .45; pointer-events: none; transition: opacity .2s; }

/* ---- Phát trong ngày (phat.js) ---- */
#tk-pane-phat .toolbar { margin: 12px 16px 0; }
.ph-card { margin: 12px 16px 0; }
.ph-card h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ph-card h3 select { width: auto; margin: 0; font-weight: 500; }
.ph-tbl { font-size: 13.5px; min-width: 760px; }
.ph-tbl th { white-space: nowrap; }
.ph-tbl td.ph-ok { color: #16a34a; font-weight: 700; }
.ph-k-ok { color: #16a34a; } .ph-k-refuse { color: #dc2626; } .ph-k-appoint { color: #d97706; } .ph-k-contact { color: #7c3aed; } .ph-k-other { color: #64748b; } .ph-k-none { color: #94a3b8; }
.ph-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: #eef1f5; min-width: 120px; }
.ph-bar i { display: block; height: 100%; }
.ph-more { margin-top: 8px; }
.tk-note { margin: 10px 16px 0; }
.copy { cursor: pointer; border-bottom: 1px dashed var(--line); }
.copy:hover { color: var(--accent); border-bottom-color: var(--accent); }
.copy.copied { color: var(--ok); border-bottom-color: var(--ok); }
#xl-notify.on { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.sh-actions { display: flex; gap: 6px; margin-top: 6px; }
.sh-actions button { padding: 3px 10px; font-size: 12px; }
/* Đối soát J&T */
.ds-pick { display: inline-block; cursor: pointer; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; background: #fff; font-weight: 600; }
.ds-drop { margin: 8px 0; padding: 14px; border: 2px dashed var(--line); border-radius: 10px; text-align: center; color: var(--muted); font-size: 13px; }
.ds-drop.over { border-color: var(--accent); background: var(--accent-2); color: var(--accent); }
/* Giao diện riêng module doi-soat — server chèn vào app.css tại dấu @mod doi-soat/tab.css (giữ thứ tự cũ) */
.ds-gaps { margin: 6px 0; padding: 6px 10px; border-radius: 8px; background: #fff4e0; color: #b45309; font-size: 13px; }
.ds-files { padding: 0; overflow: hidden; }
.ds-month { padding: 7px 12px; background: var(--line-2); font-weight: 700; font-size: 12.5px; color: var(--muted); }
.ds-file { border-bottom: 1px solid var(--line-2); }
.ds-file:last-child { border-bottom: 0; }
.ds-file.on { background: var(--accent-2); }
.ds-file-main { display: grid; grid-template-columns: 120px 1fr auto auto; gap: 4px 16px; align-items: center; padding: 9px 12px; }
.ds-file-act { white-space: nowrap; text-align: right; }
.ds-panel { padding: 2px 12px 12px; }
.ds-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 2px 0 8px; font-size: 13px; }
.ds-pushrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 8px 10px; border: 1px solid #d93025; border-radius: 8px; background: #fff; font-size: 13px; }
.ds-pushrow input[type=number] { width: 5em; }
.ds-job { margin: 8px 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 13px; }
.ds-scroll { max-height: 320px; overflow: auto; margin-top: 8px; background: #fff; border-radius: 8px; }
.ds-tbl td, .ds-tbl th { white-space: nowrap; }
.ds-rules { margin-top: 8px; color: var(--muted); }
/* Đối soát tất cả */
.ds-all { margin: 8px 0; padding: 10px 12px; }
.ds-all[hidden] { display: none; }
.ds-all-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 6px; }
.ds-all-head #ds-all-go { margin-left: auto; }
/* Tự lấy bảng kê J&T (dùng chung bể phiên J&T trong app, Neon của Gemini 25/11/2026) */
.jt-box { margin: 8px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.jt-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.jt-head #jt-run { margin-left: auto; }
.jt-accs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.jt-acc { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 10px; border-radius: 9px; border: 1px solid var(--line); background: #f8fafc; font-size: 13px; }
.jt-acc.ok { border-color: #cde8d5; background: #f4fbf6; }
.jt-acc.off { border-color: #ffc9c9; background: #fff5f5; }
.jt-acc.off .jt-login { border-color: var(--err); color: var(--err); background: #fff; font-weight: 600; }
.jt-dot { width: 8px; height: 8px; border-radius: 50%; background: #e03131; flex: none; }
.jt-acc.ok .jt-dot { background: var(--ok); }
.jt-more { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line-2); }
.jt-more p { margin: 4px 0; }
.jt-more code { background: var(--line-2); padding: 1px 6px; border-radius: 4px; }
/* Dòng tiền & Đối soát J&T (27/11/2026 — thay việc vào shop.jtexpress.vn/cashFlow) */
.jt-cf { margin: 8px 0 10px; padding: 12px; }
.jt-cf-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.jt-cf-meta { margin-left: 6px; }
.jt-cf-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.jt-cf-tools select { width: auto; padding: 4px 8px; font-size: 12.5px; }
.jt-cf-pills { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.jt-cf-pill { border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 99px; padding: 4px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.jt-cf-pill:hover { background: var(--bg); }
.jt-cf-pill.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.jt-cf-pill.has-wait:not(.on) { border-color: #eab308; background: var(--warn-bg); color: var(--warn); }
.jt-cf-warn { margin-top: 8px; padding: 6px 10px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); }
.jt-cf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.jt-cf-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fafbfd; display: flex; flex-direction: column; gap: 6px; }
.jt-cf-card.main { border-color: var(--accent); background: var(--accent-2); }
.jt-cf-ctitle { font-size: 12.5px; font-weight: 700; color: var(--text); }
.jt-cf-big { font-size: 24px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.jt-cf-sub { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 6px; }
.jt-cf-rows { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.jt-cf-rows > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.jt-cf-footline { margin-top: auto; padding-top: 6px; border-top: 1px dashed var(--line); }
.jt-cf-link { border: 0; background: rgba(var(--accent-rgb), .12); color: var(--accent); border-radius: 99px; padding: 1px 7px; font-size: 11.5px; font-weight: 700; cursor: pointer; margin-left: 4px; }
.jt-cf-link:hover { background: var(--accent); color: #fff; }
.jt-cf-chip { border: 1px solid #eab308; background: var(--warn-bg); color: var(--warn); border-radius: 8px; padding: 4px 9px; font-size: 12px; font-weight: 600; cursor: pointer; }
.jt-cf-chip:hover { filter: brightness(.97); }
.jt-cf-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; border-bottom: 1px solid var(--line-2); padding-bottom: 6px; }
.jt-cf-tab { border: 1px solid transparent; background: transparent; color: var(--muted); border-radius: 8px; padding: 5px 11px; font-size: 13px; font-weight: 600; cursor: pointer; }
.jt-cf-tab:hover { background: var(--bg); color: var(--text); }
.jt-cf-tab.on { background: var(--accent-2); color: var(--accent); border-color: rgba(var(--accent-rgb), .25); }
.jt-cf-badge { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 99px; background: var(--warn-bg); color: var(--warn); font-size: 11px; }
.jt-cf-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0 6px; }
.jt-cf-q { width: 220px; max-width: 100%; padding: 5px 9px; font-size: 12.5px; }
.jt-cf-scroll { max-height: 310px; overflow: auto; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; }
.jt-cf-tbl th { position: sticky; top: 0; z-index: 1; }
.jt-cf-tbl tr.jt-cf-unpaid td { background: #fffbeb; }
.jt-cf-foot td { background: #f8fafc; border-top: 1px solid var(--line); }
.jt-cf-ky-main { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.jt-cf-acc-tag { display: inline-block; padding: 1px 6px; border-radius: 6px; background: var(--line-2); font-size: 11.5px; font-weight: 700; color: var(--text); }
.jt-cf-st { display: inline-block; padding: 1px 7px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.jt-cf-st.paid { background: #dcfce7; color: #166534; }
.jt-cf-st.unpaid { background: #fef3c7; color: #92400e; }
.jt-cf-st.part { background: #ffedd5; color: #9a3412; }
.jt-cf-st.fail { background: #fee2e2; color: #991b1b; }
.jt-cf-imp { font-size: 11px; color: var(--ok); font-weight: 600; }
.jt-cf-empty { margin: 10px 4px; }
.jt-cf-dlg { width: min(980px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 14px; }
.jt-cf-dlg[open] { display: flex; flex-direction: column; gap: 8px; }
.jt-cf-dlg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.jt-cf-dlg-head h3 { margin: 0 0 2px; font-size: 16px; }
.jt-cf-dlg-search { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.jt-cf-dlg-search input { flex: 1 1 240px; min-width: 180px; }
.jt-cf-dlg-body { flex: 1; min-height: 120px; overflow: auto; border: 1px solid var(--line-2); border-radius: 8px; }
.jt-cf-dlg-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.jt-cf-cp { font-family: ui-monospace, Consolas, monospace; font-weight: 600; }
@media (max-width: 960px) { .jt-cf-grid { grid-template-columns: 1fr; } }
/* Khung Điều chỉnh hoá đơn sai sót */
.dc-box { margin-top: 14px; padding: 0; overflow: hidden; }
.dc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.dc-box .pad { padding: 8px 12px; margin: 0; }
.dc-act { margin: 0 12px 4px; }
.dc-scroll { max-height: 460px; margin: 8px 12px; border: 1px solid var(--line-2); }
.dc-why { white-space: normal !important; min-width: 260px; }
.dc-gate { color: var(--muted); line-height: 1.6; }
.dc-gate input { width: 3.6em; padding: 1px 4px; }
.dc-lines { white-space: normal !important; min-width: 240px; font-size: 13px; }
.dc-fold { margin: 6px 12px; font-size: 13px; }
.dc-fold > summary { cursor: pointer; padding: 6px 0; }
.dc-fold .dc-scroll { margin: 4px 0 8px; max-height: 300px; }
.dc-bar { height: 6px; margin: 6px 0; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.dc-bar i { display: block; height: 100%; background: #4934b2; transition: width .3s; }
#dc-job { margin: 0 12px; }
.ds-rules ul { margin: 4px 0 0 18px; padding: 0; }
@media (max-width: 760px) { .ds-file-main { grid-template-columns: 1fr auto; } .ds-file-num, .ds-file-st { grid-column: 1 / -1; } .ds-file-act { grid-row: 1; grid-column: 2; } }
/* Đối soát sàn: danh sách kiểm (mỗi dòng 1 khối chữ, bấm mở bảng đơn) */
.sp-checks { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.sp-checks > li { padding: 8px 12px; border-radius: 8px; background: var(--kt-2, #e3fafc); font-size: 13px; }
.sp-checks > li.bad { background: var(--err-bg); }
.sp-checks summary { cursor: pointer; }
.sp-checks .tbl { margin-top: 6px; background: #fff; }
/* Đối soát sàn: tiến độ lấy dữ liệu Shopee từng shop */
.sp-prog { display: grid; gap: 8px; margin: 4px 0 12px; }
.sp-prog-row { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(140px, 1fr) minmax(220px, 2fr) minmax(180px, 1.6fr); gap: 4px 12px; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.sp-bar { position: relative; height: 16px; background: #eef1f4; border-radius: 8px; overflow: hidden; }
.sp-bar i { position: absolute; inset: 0 auto 0 0; background: var(--ok); border-radius: 8px; }
.sp-bar span { position: relative; display: block; text-align: center; font-size: 11px; line-height: 16px; font-weight: 600; }
@media (max-width: 900px) { .sp-prog-row { grid-template-columns: 1fr; } }
/* Lãi lỗ sàn */
.ls-tools { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ls-tools select, .ls-tools input:not([type=checkbox]), .ls-cfg input { width: auto; display: inline-block; }
.ls-tools label, .ls-cfg label { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.ls-cfg { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin: 0 0 10px; }
.ls-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.ls-kpis > div { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; display: grid; gap: 2px; }
.ls-kpis span { font-size: 12px; color: var(--muted); }
.ls-kpis b { font-size: 18px; }
.ls-kpis small { font-size: 11px; color: var(--muted); }
.ls-tbl tr.ls-nocost td { background: var(--warn-bg); }
.ls-cost.saved { border-color: var(--ok); }
.ok-t { color: var(--ok); }
/* Lãi lỗ sàn — bảng từng đơn + chi tiết 1 đơn (14/11/2026) */
.ls-otbl .ls-orow { cursor: pointer; }
.ls-otbl .ls-orow:hover, .ls-otbl .ls-orow.on { background: var(--hover, #fff4e6); }
.ls-det > td { background: var(--card, #fff); padding: 6px 12px 12px 24px; }
.ls-lines { border-collapse: collapse; min-width: 420px; max-width: 640px; }
.ls-lines td { padding: 2px 10px; border-bottom: 1px dashed var(--line, #e5e5e5); }
.ls-lines td.n { text-align: right; white-space: nowrap; }
.ls-lines .ls-tot td { font-weight: 700; border-bottom: 1px solid var(--line, #ccc); }
button.link { border: 0; background: none; color: var(--err); cursor: pointer; padding: 0 2px; font-size: 12px; text-decoration: underline; }
.badge-page { background: var(--accent-2); color: var(--accent); font-weight: 600; font-size: 11px; padding: 1px 7px; }
.tab-badge[hidden] { display: none; }
.tab-badge { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 4px; border-radius: 99px; background: var(--err); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
@media (max-width: 1100px) {
  body { height: auto; }
  #tab-hang-loat:not([hidden]) { padding: 8px; }
  .grid-bulk, .grid-ship, .grid-ship.cols-2, .grid-ship.cols-3 { grid-template-columns: 1fr; }
  #tab-xu-ly:not([hidden]) { padding: 8px; }
  #tab-xu-ly .grid-ship { height: auto; }
  #xl-q { width: 100%; margin-left: 0; }
  .lane { max-height: none; }
  .lane > .bl-list { max-height: 50vh; }
  .tabs-nav { margin-left: 0; width: 100%; overflow-x: auto; }
}
.warn-text { color: var(--warn); font-weight: 600; }

/* ===== Điện thoại: chỉ Thống kê + Dashboard ===== */
.mobile-note { margin: 24px 16px; padding: 16px; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); line-height: 1.5; }
.mobile-note[hidden] { display: none; }
@media (max-width: 760px) {
  body { height: auto; font-size: 14px; }
  header { padding: 8px 12px; gap: 8px; position: sticky; top: 0; z-index: 20; }
  h1 { font-size: 15px; }
  /* Hàng 1: tên app + đăng xuất; hàng 2: chọn page; hàng 3: tab */
  h1 { order: 1; }
  .me-box { order: 2; margin-left: auto; gap: 4px; font-size: 12px; }
  .me-box #me-name, .me-box #me-pass { display: none; }
  .me-box button { padding: 4px 10px; font-size: 12px; }
  /* 6 tab: vuốt ngang, không bóp chữ */
  .tabs-nav { order: 4; width: 100%; margin-left: 0; display: flex; gap: 2px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tab-btn { flex: 0 0 auto; padding: 7px 12px; font-size: 14px; text-align: center; white-space: nowrap; }
  #mode { display: none; }

  /* Thanh chọn ngày: nút ngày chia đều 1 hàng, ô ngày 2 cột */
  .toolbar { padding: 10px 12px; gap: 8px; }
  .toolbar .seg { width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
  .toolbar .seg button { padding: 7px 2px; font-size: 12.5px; }
  .toolbar label { flex: 1 1 calc(50% - 4px); min-width: 0; font-size: 13px; gap: 4px; }
  .toolbar input[type=date] { flex: 1; min-width: 0; width: 100%; padding: 6px 4px; font-size: 13px; }
  #tk-load { flex: 1 1 100%; }
  #tk-status { flex: 1 1 100%; font-size: 12px; }
  .tk-note, .tk-sub { margin-left: 12px; margin-right: 12px; }

  /* Ô số: 2 cột, chữ nhỏ lại */
  .kpis, .pf-kpis { grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 12px; }
  .pf-kpis { padding: 4px 0 10px; }
  .kpi { padding: 10px; }
  .kpi-value { font-size: 19px; word-break: break-word; }
  .kpi-sub { font-size: 11px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

  /* Thẻ và lưới: 1 cột, không tràn ngang */
  .dash-grid, .dash-grid.cfg, .tk-grid { grid-template-columns: minmax(0, 1fr); padding: 0 12px 12px; gap: 10px; }
  .card { padding: 12px; }
  .pf-card { margin: 10px 12px 0; }
  .pf-head { gap: 8px; }
  .pf-filter { width: 100%; }
  .pf-filter select { flex: 1; min-width: 0; }

  /* Bảng: vuốt ngang, cột đầu đứng yên */
  .pf-scroll, .card > div:has(> .tbl) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .pf-tbl { min-width: 620px; font-size: 12.5px; }
  .pf-tbl td:first-child, .pf-tbl th:first-child { min-width: 92px; }
  .card .tbl { font-size: 12.5px; }
  .tk-grid .card > div { overflow-x: auto; }
  .tbl th, .tbl td { padding: 6px 5px; }

  /* Dashboard: form và lịch sử */
  .audit-filter input[type=search] { width: 100%; }
  .audit-filter label { flex: 1 1 45%; }
  .audit-scroll { max-height: 60vh; }
  .row2 { grid-template-columns: 1fr !important; }
  .staff-acts { white-space: normal; }
  .ai-est-nums { flex-wrap: wrap; }
  dialog.modal { width: calc(100vw - 24px); max-width: none; }
}
.xl-log-tbl .nowrap { white-space: nowrap; }


@media (max-width: 760px) { #tk-range { display: flex !important; flex-wrap: wrap; gap: 4px; } #tk-range button { flex: 1 1 28%; white-space: nowrap; } .tabs-nav::-webkit-scrollbar { display: none; } }
/* Giao diện riêng module in-don — server chèn vào app.css tại dấu @mod in-don/tab.css (giữ thứ tự cũ) */
/* ---- Tab In đơn (bộ lọc C1 gọn 3 dòng nhãn trái cho Sàn & 2 dòng cho FB, Neon của Gemini 24/11/2026) ---- */
#tab-in-don:not([hidden]), #tab-in-fb:not([hidden]) { display: flex; flex-direction: column; padding: 10px 14px; gap: 7px; overflow: hidden; }
.id-demo { background: var(--warn-bg); color: var(--warn); padding: 6px 12px; border-radius: 8px; }
/* Hàng 1: Tab trạng thái gạch chân + nút việc + Tải lại */
.id-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 0 12px; box-shadow: var(--shadow); }
.id-groups { display: flex; gap: 2px; flex-wrap: wrap; align-items: stretch; }
.id-groups button { display: inline-flex; gap: 6px; align-items: center; padding: 9px 11px; background: transparent; border: none; border-bottom: 2px solid transparent; border-radius: 0; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.id-groups button:hover:not(.on) { background: transparent; color: var(--text); }
.id-groups button.on { border-bottom-color: var(--accent); background: transparent; color: var(--accent); font-weight: 700; }
.id-groups button .id-n { padding: 1px 6px; border-radius: 99px; background: #eef1f6; color: #475569; font-size: 11.5px; font-weight: 700; }
.id-groups button.on .id-n { background: var(--accent-2); color: var(--accent); }
.id-actions { display: flex; gap: 6px; margin: 5px 0 5px auto; flex-wrap: wrap; }
#id-reload { margin: 5px 0; }
/* Hàng 2: 1 thẻ trắng chia dòng có nhãn cột trái (C1) */
.id-filters { background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 3px 12px; box-shadow: var(--shadow); }
.id-frow { display: grid; grid-template-columns: 82px minmax(0, 1fr); align-items: center; gap: 8px; padding: 5px 0; }
.id-frow:not([hidden]) ~ .id-frow:not([hidden]) { border-top: 1px solid var(--line-2); }
.id-flbl { font-size: 11.5px; font-weight: 600; color: #7c8aa0; white-space: nowrap; }
.id-chips { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.id-chips button { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; font-size: 12.5px; font-weight: 500; border-radius: 7px; background: #f3f5f8; border: 1px solid transparent; color: #334155; white-space: nowrap; transition: background .1s, border-color .1s, color .1s; }
.id-chips button:hover:not(.on) { background: #e8ecf2; color: #0f172a; }
.id-chips button:focus:not(:focus-visible), .id-groups button:focus:not(:focus-visible) { outline: none; }
.id-chips button.on { border-color: var(--accent-3); background: var(--accent-2); color: var(--accent); font-weight: 700; }
.id-chips button.on .id-n { color: inherit; }
.id-pdot { width: 7px; height: 7px; border-radius: 99px; display: inline-block; flex: none; }
.id-pdot.pd-tiktok { background: #111827; }
.id-pdot.pd-shopee { background: #ee4d2d; }
.id-pdot.pd-lazada { background: #2563eb; }
.id-clear { padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; white-space: nowrap; }
.id-clear:hover { background: #fee2e2; color: #991b1b; }
.id-searchbox { position: relative; display: flex; flex-direction: column; gap: 2px; }
#id-search { width: 320px; margin: 0; height: 34px; max-height: 120px; resize: none; overflow-y: auto; font: inherit; line-height: 1.4; padding: 6px 10px; white-space: pre-wrap; background: var(--panel); }
.id-search-hint { max-width: 420px; color: var(--muted); }
.id-search-hint .bad-text { word-break: break-all; }
.id-table { flex: 1; min-height: 0; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.id-table table { width: 100%; border-collapse: collapse; }
.id-table th { position: sticky; top: 0; z-index: 2; background: #f8fafc; color: var(--muted); font-weight: 600; text-align: left; padding: 8px 10px; font-size: 12px; border-bottom: 1px solid var(--line); }
.id-table td { padding: 8px 10px; border-top: 1px solid var(--line-2); vertical-align: top; }
.id-table tbody tr:hover td { background: #f8fafc; }
.id-num { white-space: nowrap; }
.id-printed { color: var(--ok); white-space: nowrap; }
.id-status { display: inline-block; padding: 1px 8px; border-radius: 10px; background: var(--line); font-size: 12px; font-weight: 600; white-space: nowrap; }
.id-copy { cursor: pointer; }
.id-copy:hover { color: var(--accent); text-decoration: underline; }
.id-kho { color: #1971c2; font-size: 13px; font-weight: 700; }
.id-status.packing { background: var(--accent-2); color: var(--accent); }
.id-dlg { border: none; border-radius: 10px; padding: 20px; min-width: 340px; }
.id-dlg h3 { margin: 0 0 8px; }
.id-dlg-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.id-confirm { width: min(780px, 94vw); padding: 24px 32px; }
.id-confirm h3 { font-size: 18px; font-weight: 500; margin: 0 0 22px; }
.id-pz-warn { background: var(--warn-bg); border-left: 3px solid #f59f00; border-radius: 4px; padding: 13px 22px; margin: 0; }
#id-pz-note { min-height: 18px; margin: 8px 0; font-size: 13px; }
.id-pz-row { display: flex; align-items: center; gap: 16px; }
.id-pz-row b { color: var(--accent); }
#id-pz-a { width: 220px; margin: 0; }
.id-pz-btns { justify-content: center; margin-top: 20px; }
.id-pz-btns button { min-width: 96px; }
.id-preview .tem { border: 1px solid var(--line); }
.id-print-frame { position: absolute; width: 0; height: 0; border: 0; }
.id-tag24 { background: var(--err); color: #fff; font-size: 11px; font-weight: 700; border-radius: 4px; padding: 0 5px; }
.id-tag-aff { display: inline-block; background: #7c3aed; color: #fff; font-size: 11px; font-weight: 700; border-radius: 4px; padding: 1px 6px; margin-left: 4px; vertical-align: middle; white-space: nowrap; }
#id-24h.id-urg { background: #fef2f2; color: #b91c1c; font-weight: 600; }
#id-24h.id-urg:hover:not(.on) { background: #fee2e2; color: #991b1b; }
#id-24h.id-urg .id-n { color: #dc2626; }
#id-24h.on { border-color: #dc2626; background: #dc2626; color: #fff; font-weight: 700; }
#id-24h.on .id-n { color: #fff; }
#id-aff.id-aff { background: #f5f3ff; color: #6d28d9; font-weight: 600; }
#id-aff.id-aff:hover:not(.on) { background: #ede9fe; color: #5b21b6; }
#id-aff.id-aff .id-n { color: #7c3aed; }
#id-aff.on { border-color: #7c3aed; background: #7c3aed; color: #fff; font-weight: 700; }
#id-aff.on .id-n { color: #fff; }
.id-cutoffs { display: contents; }
.id-sep { align-self: center; color: #cbd5e1; font-weight: 400; padding: 0 4px; user-select: none; }
.id-cutoffs button.on { border-color: #dc2626; background: #dc2626; color: #fff; font-weight: 700; }
.id-cutoffs button.on .id-n { color: #fff; }
@media (max-width: 760px) {
  .id-frow { grid-template-columns: 1fr; gap: 4px; }
}
.id-prog-track { height: 12px; background: var(--line); border-radius: 6px; overflow: hidden; }
.id-prog-bar { height: 100%; width: 0; background: var(--accent); transition: width .25s; }
.id-shipbar { min-height: 34px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#id-ship-btn[hidden], #id-print-btn[hidden] { display: none; }
/* Hai nút trên đầu bảng In đơn */
#id-ship-btn, #id-print-btn { border: none; color: #fff; box-shadow: none; }
#id-ship-btn { background: #00b88d; }
#id-print-btn { background: #4934b2; }
#id-ship-btn:hover { background: #00a57e; }
#id-print-btn:hover { background: #3f2c9c; }
/* Vòng quay khi đang tải đơn */
.id-table-wrap { position: relative; flex: 1; min-height: 0; display: flex; }
.id-table-wrap .id-table { flex: 1; min-width: 0; }
.id-loading { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; gap: 12px; background: rgba(255, 255, 255, .78); border-radius: 6px; font-size: 15px; color: var(--muted); }
.id-loading[hidden] { display: none; }
.id-spinner { width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: #4934b2; border-radius: 50%; animation: id-spin .8s linear infinite; }
/* Cột Thời gian (đơn sàn): Tạo đơn / Hết hạn / Đóng gói, đếm ngược tới hạn */
.id-times { white-space: nowrap; font-size: 13px; line-height: 1.35; }
.id-tlabel { color: var(--muted); font-size: 12px; margin-top: 4px; }
.id-tlabel:first-child { margin-top: 0; }
.id-left { color: var(--muted); font-weight: 600; }
.id-left.soon { color: #e8590c; }
.id-left.late { color: #e03131; font-weight: 700; }
/* Bấm bộ lọc: đọc lại đơn ở nền — thanh chạy trên đầu bảng, bảng mờ đi, nhãn nhỏ ở giữa (vẫn bấm được bảng) */
.id-table-wrap .id-table { transition: opacity .2s; }
.id-table-wrap::before { content: ''; position: absolute; top: 0; left: 0; height: 3px; width: 35%; z-index: 4; background: #4934b2; border-radius: 3px; opacity: 0; pointer-events: none; }
.id-sync { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 8px; padding: 6px 14px; background: #fff; border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); font-size: 14px; font-weight: 600; color: #4934b2; opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; pointer-events: none; }
.id-sync .id-spinner { width: 14px; height: 14px; border-width: 2px; }
.id-syncing .id-table-wrap::before { opacity: 1; animation: id-sync-bar 1s ease-in-out infinite; }
.id-syncing .id-table-wrap .id-table { opacity: .5; }
.id-syncing .id-sync { opacity: 1; visibility: visible; }
/* Phân trang góc phải */
.id-pager { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 13px; }
.id-pager-range { margin-right: 6px; }
.id-pager button { padding: 3px 10px; font-size: 15px; line-height: 1.2; }
.id-pager button:disabled { color: var(--line); cursor: not-allowed; }
.id-pager-now { border: 1px solid var(--line); border-radius: 6px; padding: 4px 12px; background: var(--panel); }
.id-pager select { width: auto; margin: 0; padding: 4px 6px; font-size: 13px; }
/* Cài đặt tự động chuẩn bị đơn */
.id-auto-on { display: flex; align-items: center; gap: 8px; font-weight: 500; margin-bottom: 12px; }
.id-auto-on input { width: auto; margin: 0; }
.id-auto-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.id-auto-loghead { font-weight: 500; margin: 16px 0 6px; }
.id-auto-log { max-height: 150px; overflow: auto; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; }
/* Hộp nhập số xác nhận (in lại, giao hàng đơn chưa in): đặt cao, không che danh sách đơn */
#id-puzzle { margin: 48px auto auto; }
/* Số trên thanh lọc tô màu (14/11/2026) + nút có đơn khớp ô tìm tô đỏ */
.tab .id-n { color: #1877f2; font-weight: 700; } /* xanh Facebook (chủ shop 14/11/2026) */
.tab button.id-hit { border-color: #e53935 !important; background: #fdecea !important; color: #c62828 !important; font-weight: 700; box-shadow: 0 0 0 1px #e53935 inset; }
.id-groups button.id-hit { border-radius: 7px; border-bottom-color: #e53935 !important; }
.tab button.id-hit .id-n, .tab button.id-hit b { background: transparent !important; color: #c62828 !important; }

/* Lịch sử đơn đã hủy (15/11/2026) */
.id-huylog { width: min(1100px, 96vw); }
.id-huylog-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.id-huylog-bar label { display: flex; flex-direction: column; font-size: 13px; gap: 2px; }
.id-huylog-bar input, .id-huylog-bar select { margin: 0; width: auto; }
.id-huylog-sum { margin: 12px 0 8px; }
.id-huylog-table { max-height: 60vh; overflow: auto; border: 1px solid var(--line); border-radius: 6px; }
.id-huylog-table table { width: 100%; font-size: 13px; }
.id-huylog-table td { vertical-align: top; }
.id-msg { min-height: 18px; font-size: 13px; }
.id-empty { text-align: center; padding: 32px; }
.id-toasts { position: fixed; inset: 14px auto auto 50%; transform: translateX(-50%); margin: 0; padding: 0; border: 0; background: transparent; overflow: visible; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.id-toasts:popover-open { display: flex; }
.id-toast { display: flex; align-items: center; gap: 10px; background: #fff; color: var(--text); padding: 11px 20px; border-radius: 8px; box-shadow: 0 6px 22px rgba(20, 30, 50, .16); font-size: 15px; max-width: min(640px, 92vw); white-space: pre-line; animation: id-toast-in .32s ease-out; transition: opacity .2s, transform .2s; }
.id-toast.leaving { opacity: 0; transform: translateY(-10px); }
.id-toast-icon { flex: none; width: 18px; height: 18px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.id-toast-icon.bad { background: #f04e4e; }
.id-toast-icon.good { background: var(--ok); }
@keyframes id-toast-in { 0% { opacity: 0; transform: translateY(-18px); } 65% { opacity: 1; transform: translateY(3px); } 100% { transform: translateY(0); } }
@keyframes id-spin { to { transform: rotate(360deg); } }
@keyframes id-sync-bar { from { left: -35%; } to { left: 100%; } }

/* Nút Tải lại khi đang đọc đơn */
#id-reload.is-loading { cursor: wait; opacity: .8; }
#id-reload.is-loading::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -2px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: id-spin .7s linear infinite; }

/* Thống Kê Sàn */
#ts-reload.is-loading { cursor: wait; opacity: .8; }
#ts-reload.is-loading::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -2px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: id-spin .7s linear infinite; }
/* Giao diện riêng module thong-ke-san — server chèn vào app.css tại dấu @mod thong-ke-san/tab.css (giữ thứ tự cũ) */
.ts-card { margin: 0 16px 16px; }
.ts-scroll { overflow-x: auto; }
.ts-matrix, .ts-products { border-collapse: collapse; font-size: 13px; width: 100%; }
.ts-matrix th, .ts-matrix td, .ts-products th, .ts-products td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.ts-products td:first-child { white-space: normal; min-width: 240px; }
.ts-matrix th, .ts-products th { color: var(--muted); font-weight: 500; font-size: 12px; }
.ts-num { text-align: right !important; font-variant-numeric: tabular-nums; }
.ts-shop { position: sticky; left: 0; background: var(--panel); font-weight: 500; max-width: 200px; overflow: hidden; text-overflow: ellipsis; z-index: 1; }
.ts-rate { font-weight: 700; }
.ts-total td { font-weight: 700; }
.ts-row { cursor: pointer; }
.ts-row:hover td { background: rgba(73, 52, 178, .05); }
.ts-row.on td { background: rgba(73, 52, 178, .10); }
.ts-mid { background: rgba(245, 158, 11, .18); }
.ts-hi { background: rgba(239, 68, 68, .2); color: #b42318; }
/* Nguồn sàn (18/11/2026): tiến độ đọc đơn từng shop */
.ts-san-jobs { margin: 0 16px 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.ts-san-jobs .err { color: #b42318; }
.ts-dl { padding: 2px 8px; font-size: 12px; }
/* Giao diện riêng module van-hanh-shopee — server chèn vào app.css tại dấu @mod van-hanh-shopee/tab.css */
.vhs { --vhs: #7048e8; --vhs-2: #f3f0ff; --vhs-3: #e5dbff; --vhs-org: #f76707; }
.vhs-head { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; margin: 14px 16px 0; padding: 16px 20px; border-radius: var(--radius, 12px); color: #fff; background: linear-gradient(120deg, #5f3dc4, #845ef7); box-shadow: var(--shadow); }
.vhs-head h2 { margin: 0 0 2px; font-size: 20px; }
.vhs-head .muted { color: #e5dbff; }
.vhs-warn { background: rgba(255, 255, 255, .16); border-radius: 8px; padding: 6px 12px; font-size: 13px; }
.vhs-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; padding: 14px 16px 4px; }
.vhs-kpi { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--vhs); border-radius: 10px; padding: 10px 14px; }
.vhs-kpi.org { border-left-color: var(--vhs-org); }
.vhs-kpi .l { color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.vhs-kpi .v { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 2px 0 4px; }
.vhs-chip { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 99px; background: var(--line-2, #f0f1f4); color: var(--muted); }
.vhs-chip.up { background: var(--ok-bg); color: var(--ok); }
.vhs-chip.down { background: var(--err-bg); color: var(--err); }
.vhs-card { margin: 12px 16px 0; }
.vhs-card:last-of-type { margin-bottom: 16px; }
.vhs-card-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.vhs-card-head h3 { margin: 0; }
.vhs-card-head h3::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--vhs); vertical-align: 1px; }
.vhs-scroll { overflow-x: auto; }
.vhs .tbl th { background: var(--vhs-2); text-transform: uppercase; font-size: 11px; letter-spacing: .03em; }
.vhs .tbl td.miss { color: var(--muted); font-style: italic; }
.vhs-roas { display: inline-block; min-width: 34px; text-align: center; padding: 1px 6px; border-radius: 6px; background: var(--ok-bg); color: var(--ok); font-weight: 600; font-size: 12px; }
.vhs-roas.low { background: var(--err-bg); color: var(--err); }
.vhs-grid3 { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(320px, 1.4fr) minmax(260px, 1.2fr); gap: 0 0; }
.vhs-grid3 .vhs-card { margin-right: 0; }
.vhs-grid3 .vhs-card:last-child { margin-right: 16px; }
.vhs-fn { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.vhs-fn-step { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: #fff; font-weight: 600; font-size: 13px; padding: 9px 14px; border-radius: 9px; background: var(--vhs); }
.vhs-fn-step b { font-size: 16px; font-variant-numeric: tabular-nums; }
.vhs-fn-step.last { background: var(--vhs-org); }
.vhs-fn-rate { font-size: 11px; font-weight: 600; color: var(--vhs); background: var(--vhs-2); border-radius: 99px; padding: 0 8px; }
.vhs-fn-sum { margin-top: 12px; font-size: 13px; }
.vhs-fn-sum div { display: flex; justify-content: space-between; padding: 3px 0; }
.vhs-kol { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 10px; }
.vhs-kol .n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--vhs); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.vhs-kol .who { flex: 1; min-width: 0; }
.vhs-kol .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vhs-kol .amt { text-align: right; }
.vhs-kol .amt b { color: var(--vhs); }
.vhs-notes { margin: 0; padding: 14px 18px 14px 32px; border-radius: 10px; background: #1e1b2e; color: #e9e7f5; font-size: 13px; line-height: 1.7; }
.vhs-notes li.good::marker { color: #69db7c; }
.vhs-notes li.bad::marker { color: #ff8787; }
.vhs-notes li.info::marker { color: #b197fc; }
.vhs .toolbar select { margin: 0; width: auto; max-width: 260px; }
.vhs-conn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--err-bg); color: var(--err); cursor: pointer; }
.vhs-conn::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.vhs-conn.on { background: var(--ok-bg); color: var(--ok); }
.vhs-conn.part { background: var(--warn-bg); color: var(--warn); }
.vhs .tbl td .shop-tag { display: block; color: var(--muted); font-size: 11px; }
@media (max-width: 1100px) { .vhs-grid3 { grid-template-columns: minmax(0, 1fr); } .vhs-grid3 .vhs-card { margin-right: 16px; } }
@media (max-width: 760px) { .vhs-head, .vhs-card, .vhs-grid3 .vhs-card { margin-left: 10px; margin-right: 10px; } .vhs-kpis { padding: 10px; grid-template-columns: 1fr 1fr; gap: 8px; } .vhs-kpi .v { font-size: 19px; } }

/* Flash Sale của Shop */
.fs-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.fs-row select { max-width: 100%; }
.fs-targets { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; max-height: 360px; overflow: auto; }
.fs-day { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line, #eee); }
.fs-all { min-width: 90px; font-weight: 600; }
.fs-slot { font-size: 13px; white-space: nowrap; }
.fs-job { padding: 6px 0; border-bottom: 1px solid var(--line, #eee); }
.fs-st.done { color: #1a7f37; } .fs-st.error { color: #c62828; } .fs-st.wait, .fs-st.run { color: #b26a00; }
.fs-res { margin: 4px 0 0 18px; padding: 0; }
.fs-slot.fs-empty { color: #b26a00; }
.fs-auto { border: 1px solid var(--line, #e3e6ea); border-radius: 8px; padding: 6px 10px; margin: 8px 0; }
.fs-auto .fs-row { margin: 2px 0; }
.fs-auto-st { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 10px; background: #eceff1; color: #555; }
.fs-auto-st.on { background: #e6f4ea; color: #1a7f37; }
.fs-auto-log { margin: 4px 0 0 18px; padding: 0; }
/* Tab con Thông tin / Flash Sale */
.vhs-tabs { margin: 0 16px 8px; }
.vhs.fs-mode .vhs-rep-only { display: none !important; }
/* Ô tích khung giờ: không để kiểu ô nhập chung (rộng 100%, khối riêng) đè làm lệch chữ */
.fs-targets label { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-weight: normal; }
.fs-targets input[type=checkbox] { width: auto; height: auto; margin: 0; padding: 0; flex: none; display: inline-block; }
.fs-day { gap: 4px 14px; }
/* Tiến trình sao chép flash sale */
.fs-prog { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0; }
.fs-bar { flex: 0 0 240px; max-width: 100%; height: 8px; border-radius: 4px; background: var(--line, #e3e6ea); overflow: hidden; }
.fs-bar span { display: block; height: 100%; background: #1a7f37; transition: width .4s; }
/* Phí ship (#vss-pane, ship.js) — bảng dùng lại .vht-table/.vht-tag của van-hanh-tiktok */
#vss-pane .vht-table td { vertical-align: top; }
#vss-pane .vss-items { font-size: 12px; color: var(--muted); max-width: 380px; }
#vss-pane .vss-up, #vss-pane .vss-pay { color: var(--err); font-weight: 600; }
#vss-pane .vht-bar input[type=date] { width: auto; }
#vss-pane .vts-prog { margin: 4px 0 8px; display: flex; align-items: center; gap: 10px; }
#vss-pane .vts-bar { flex: 0 0 240px; max-width: 40%; height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
#vss-pane .vts-bar i { display: block; height: 100%; width: 0; background: var(--ok, #16a34a); border-radius: 99px; transition: width .6s; }
#vss-pane .vts-prog.wait .vts-bar i { width: 30%; animation: vts-slide 1.4s ease-in-out infinite; }
/* Lãi lỗ Shopee (chép từ van-hanh-tiktok) (#vsl-pane) */
#vsl-pane .vsl-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 0; }
@media (max-width: 1000px) { #vsl-pane .vsl-grid { grid-template-columns: 1fr; } }
#vsl-pane h3 { margin: 0 0 6px; font-size: 15px; }
#vsl-pane .vsl-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 10px; }
#vsl-pane .vsl-form label { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); gap: 2px; }
#vsl-pane .vsl-form label.wide { grid-column: 1 / -1; }
#vsl-pane .vsl-form input { width: 100%; }
#vsl-pane .vsl-form input.auto { background: var(--line-2, #f0f1f4); }
#vsl-pane .vsl-btns { display: flex; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
#vsl-pane .vsl-verdict { font-size: 20px; font-weight: 700; margin: 8px 0 4px; }
#vsl-pane .vsl-verdict.lo, #vsl-pane .neg { color: var(--err); }
#vsl-pane .vsl-verdict.lai, #vsl-pane .pos { color: var(--ok, #16a34a); }
#vsl-pane table.vsl-t { width: 100%; border-collapse: collapse; font-size: 13px; }
#vsl-pane table.vsl-t td { padding: 3px 6px; border-bottom: 1px solid var(--line); }
#vsl-pane table.vsl-t td.num { text-align: right; white-space: nowrap; }
#vsl-pane table.vsl-t tr.sum td { font-weight: 700; border-top: 2px solid var(--line); }
#vsl-pane table.vsl-t tr.sub td:first-child { padding-left: 18px; color: var(--muted); }
#vsl-pane .vsl-sug { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-top: 10px; }
#vsl-pane .vsl-sug div { background: var(--line-2, #f0f1f4); border-radius: 8px; padding: 8px 10px; font-size: 12px; }
#vsl-pane .vsl-sug b { display: block; font-size: 17px; color: var(--text); }
#vsl-pane .vsl-name { cursor: pointer; color: var(--brand, #ea580c); }
#vsl-pane input.vsl-c { width: 90px; text-align: right; padding: 3px 6px; }
#vsl-pane input.vsl-u { width: 60px; text-align: right; padding: 2px 4px; }
#vsl-pane input.vsl-u.auto { background: var(--line-2, #f0f1f4); }
#vsl-pane #vsl-var { margin-top: 12px; }
#vsl-pane #vsl-var h4 { margin: 0 0 4px; font-size: 14px; }
/* Giao diện riêng module van-hanh-tiktok — server chèn vào app.css tại dấu @mod van-hanh-tiktok/tab.css. Dùng lại .vhs-card, .vhs-conn, .fs-* của van-hanh-shopee */
.vht { --vhs: #0f766e; }
.vht .toolbar { margin: 12px 16px 0; }
.vht-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0; }
.vht-bar input[type=search] { width: 220px; }
.vht-bar input[type=checkbox], .vht-table input[type=checkbox] { width: auto; }
.vht-camps { width: 100%; border-collapse: collapse; font-size: 13px; }
.vht-camps td, .vht-camps th { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.vht-camps tr.sel td { background: #e6fffa; }
.vht-camps td.vht-act { white-space: nowrap; }
.vht-camps .vht-del:hover { color: var(--err); }
.vht-hid { margin-top: 8px; }
.vht-hid .vht-camps { margin-top: 6px; opacity: .75; }
.vht-camps .pn { color: var(--muted); font-size: 11px; }
.vht-tag { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 99px; background: var(--line-2, #f0f1f4); color: var(--muted); white-space: nowrap; }
.vht-tag.ok { background: var(--ok-bg); color: var(--ok); }
.vht-tag.warn { background: #fff4e5; color: #b26a00; }
.vht-tag.bad { background: var(--err-bg); color: var(--err); }
.vht-wrap { max-height: 62vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.vht-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.vht-table thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; }
.vht-table td, .vht-table th { padding: 5px 8px; border-bottom: 1px solid var(--line); }
.vht-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vht-table tr.p td { background: #f7f8fa; font-weight: 600; }
.vht-table tr.p img { width: 28px; height: 28px; border-radius: 4px; object-fit: cover; vertical-align: middle; margin-right: 6px; }
.vht-table tr.k td:nth-child(2) { padding-left: 42px; color: var(--muted); }
.vht-table td.vht-tt small { font-size: 11px; }
.vht-table .vht-use { padding: 1px 8px; font-size: 11px; margin-left: 4px; }
.vht-table input.vht-price { width: 100px; text-align: right; padding: 3px 6px; }
.vht-table input.vht-price.bad { border-color: var(--err); background: var(--err-bg); }
.vht-table tr.reg td { opacity: .6; }
#vht-plan ul { margin: 4px 0 8px 18px; }
@media (max-width: 700px) { .vht-bar input[type=search] { width: 100%; } }
.vht-ctkm { color: var(--warn, #b45309); font-size: 12px; font-weight: 600; white-space: nowrap; }
.vht-raw { white-space: pre-wrap; word-break: break-all; font-size: 11px; max-height: 200px; overflow: auto; background: var(--line-2, #f0f1f4); padding: 4px 6px; border-radius: 4px; }
/* Phí ship TikTok (#vht-ship) */
#vht-ship .vht-table td { vertical-align: top; }
#vht-ship .vts-items { font-size: 12px; color: var(--muted); max-width: 380px; }
#vht-ship .vts-up { color: var(--err); font-weight: 600; }
#vht-ship .vts-pay { color: var(--err); font-weight: 600; }
#vht-ship .vht-bar input[type=date] { width: auto; }
/* Tab con trong Vận hành TikTok: Chiến dịch / Phí ship (tks-sub.js dựng #vht-sub) */
.seg.subtabs.vht-sub { margin: 4px 16px 0; }
.seg.subtabs.vht-sub button { padding: 5px 14px; font-size: 13px; }
#vht-ship .vts-prog { margin: 8px 16px 0; display: flex; align-items: center; gap: 10px; }
#vht-ship .vts-bar { flex: 0 0 280px; max-width: 45%; height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
#vht-ship .vts-bar i { display: block; height: 100%; width: 0; background: var(--ok, #16a34a); border-radius: 99px; transition: width .6s; }
#vht-ship .vts-prog.wait .vts-bar i { width: 30%; animation: vts-slide 1.4s ease-in-out infinite; }
@keyframes vts-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(330%); } }
#vht-ship .vts-all { margin: 6px 16px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
#vht-ship .vts-chip { padding: 2px 10px; font-size: 12px; border-radius: 99px; }
#vht-ship .vts-chip.on { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
#vht-ship .vts-prog.err span { color: var(--err); }
/* Tiêu đề bấm để sắp xếp (Phí ship TikTok + Shopee dùng chung) */
.vht-table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.vht-table th.sortable:hover { color: var(--brand, #ea580c); }
.vht-table th.sortable::after { content: attr(data-arrow); font-size: 11px; color: var(--muted); }

/* Lãi lỗ TikTok (#vht-lai) */
#vht-lai .vtl-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 0; }
@media (max-width: 1000px) { #vht-lai .vtl-grid { grid-template-columns: 1fr; } }
#vht-lai h3 { margin: 0 0 6px; font-size: 15px; }
#vht-lai .vtl-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 10px; }
#vht-lai .vtl-form label { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); gap: 2px; }
#vht-lai .vtl-form label.wide { grid-column: 1 / -1; }
#vht-lai .vtl-form input { width: 100%; }
#vht-lai .vtl-form input.auto { background: var(--line-2, #f0f1f4); }
#vht-lai .vtl-btns { display: flex; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
#vht-lai .vtl-verdict { font-size: 20px; font-weight: 700; margin: 8px 0 4px; }
#vht-lai .vtl-verdict.lo, #vht-lai .neg { color: var(--err); }
#vht-lai .vtl-verdict.lai, #vht-lai .pos { color: var(--ok, #16a34a); }
#vht-lai table.vtl-t { width: 100%; border-collapse: collapse; font-size: 13px; }
#vht-lai table.vtl-t td { padding: 3px 6px; border-bottom: 1px solid var(--line); }
#vht-lai table.vtl-t td.num { text-align: right; white-space: nowrap; }
#vht-lai table.vtl-t tr.sum td { font-weight: 700; border-top: 2px solid var(--line); }
#vht-lai table.vtl-t tr.sub td:first-child { padding-left: 18px; color: var(--muted); }
#vht-lai .vtl-sug { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-top: 10px; }
#vht-lai .vtl-sug div { background: var(--line-2, #f0f1f4); border-radius: 8px; padding: 8px 10px; font-size: 12px; }
#vht-lai .vtl-sug b { display: block; font-size: 17px; color: var(--text); }
#vht-lai .vtl-name { cursor: pointer; color: var(--brand, #ea580c); }
#vht-lai input.vtl-c { width: 90px; text-align: right; padding: 3px 6px; }
#vht-lai input.vtl-u { width: 60px; text-align: right; padding: 2px 4px; }
#vht-lai input.vtl-u.auto { background: var(--line-2, #f0f1f4); }
#vht-lai #vtl-var { margin-top: 12px; }
#vht-lai #vtl-var h4 { margin: 0 0 4px; font-size: 14px; }
/* Chuẩn hoá sản phẩm (#vht-ch) */
.vch-grid { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 12px; margin: 12px 16px 0; align-items: start; }
.vch-grid > .card { margin: 0; }
.vch-list { max-height: 70vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.vch-row { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.vch-row:hover { background: #f7f8fa; }
.vch-row.sel { background: #e6fffa; }
.vch-row img { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; flex: none; background: #eee; }
.vch-row .nm { flex: 1; min-width: 0; }
.vch-row .nm .t { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } /* chỉ cắt tên, nhãn bên dưới luôn hiện */
.vch-row .sub { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; margin-top: 2px; }
.vch-row .sub { color: var(--muted); font-size: 11px; }
.vch-cmp { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 10px 0; }
.vch-pic { border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: var(--panel); }
.vch-pic img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; display: block; cursor: zoom-in; }
.vch-pic .cap { font-size: 12px; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.vch-pic.cur { border-color: var(--vhs); }
.vch-form { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.vch-form label { display: flex; flex-direction: column; font-size: 12px; gap: 2px; }
.vch-form .wide { grid-column: 1 / -1; }
.vch-btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.vch-strip { display: flex; flex-wrap: wrap; gap: 6px; }
.vch-strip img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); cursor: zoom-in; }
.vch-sku { width: 100%; border-collapse: collapse; font-size: 13px; }
.vch-sku th, .vch-sku td { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.vch-sku .num { text-align: right; white-space: nowrap; }
.vch-vimg { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; cursor: zoom-in; display: block; }
.vch-desc { white-space: pre-wrap; max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; padding: 8px; margin-top: 4px; background: var(--panel); }
.vch-src { position: relative; width: 84px; height: 84px; border: 2px solid transparent; border-radius: 8px; cursor: pointer; display: block; }
.vch-src.on { border-color: var(--vhs, #0d9488); }
.vch-src img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.vch-src input { position: absolute; top: 4px; left: 4px; margin: 0; }
.vch-sw { display: flex; gap: 6px; margin-top: 4px; }
.vch-swatch { width: 22px; height: 22px; border-radius: 50%; cursor: pointer; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.vch-swatch.on { box-shadow: 0 0 0 2px #111; }
.vch-vrows { display: grid; gap: 10px; margin-top: 8px; }
.vch-vrow { border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.vch-vrow label { display: flex; flex-direction: column; font-size: 12px; gap: 2px; }
.vch-vhead { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
/* ảnh nền riêng từng phân loại (23/11/2026) */
.vch-rsrc { grid-column: 1 / -1; }
.vch-rsrc .vch-btns { margin: 4px 0 0; }
.vch-vrow label.vch-src { display: block; width: 64px; height: 64px; flex: none; }
.vch-vrow .vch-src img { cursor: pointer; width: 100%; height: 100%; }
.vch-src .vch-x { position: absolute; top: 2px; right: 2px; padding: 0 5px; min-height: 0; line-height: 18px; font-size: 11px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; border: 0; cursor: pointer; }
.vch-vrow label.vch-upl { display: flex; align-items: center; justify-content: center; text-align: center; font-size: 11px; line-height: 1.2; border: 2px dashed var(--line); color: var(--muted, #666); }
.vch-upl:hover { border-color: var(--vhs, #0d9488); color: var(--vhs, #0d9488); }
.vch-upl.dis { opacity: .6; pointer-events: none; }
.vch-vpics { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.vch-vpics canvas { width: 180px; height: 180px; border: 1px dashed var(--line); border-radius: 6px; }
.vch-vdraft { width: 180px; display: flex; flex-direction: column; gap: 2px; }
.vch-vsaved { width: 180px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; border: 2px solid transparent; border-radius: 8px; }
.vch-vsaved label { display: flex; flex-direction: row; align-items: center; gap: 4px; }
.vch-vsaved input[type=radio] { width: auto; margin: 0; }
.vch-vsaved button { width: auto; }
.vch-vsaved.cur { border-color: var(--vhs, #0d9488); }
.vch-vsaved img { width: 180px; height: 180px; object-fit: cover; border-radius: 6px; cursor: zoom-in; }
.vch-zoom { position: fixed; inset: 0; background: rgba(0,0,0,.8); display: flex; align-items: center; justify-content: center; z-index: 999; cursor: zoom-out; }
.vch-zoom img { max-width: 94vw; max-height: 94vh; border-radius: 8px; }
@media (max-width: 800px) { .vch-grid { grid-template-columns: 1fr; margin: 8px; } .vch-form { grid-template-columns: 1fr; } }
/* phân loại "Bỏ" — không đăng ký vào chiến dịch này (18/11/2026) */
.vht-table tr.k.off td { opacity: .45; }
.vht-table tr.k.off td:first-child { opacity: 1; }
.vht-table tr.k.off td:nth-child(2) { text-decoration: line-through; }
.vht-table tr.k.off td:nth-child(2) .vht-tag { text-decoration: none; display: inline-block; }
.vht-off { white-space: nowrap; }
.vht-err { color: var(--bad, #c0392b); white-space: nowrap; margin-top: 2px; }
.vht-err:empty { display: none; }
/* Tối ưu sản phẩm (#vht-opt) */
.vop-grid { display: grid; grid-template-columns: minmax(320px, 430px) 1fr; gap: 12px; margin: 12px 16px 0; align-items: start; }
.vop-grid > .card { margin: 0; }
.vop-list { max-height: 70vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.vop-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; align-items: center; padding: 8px; border-bottom: 1px solid var(--line); cursor: pointer; }
.vop-row:hover { background: #f7f8fa; }
.vop-row.sel { background: #e6fffa; box-shadow: inset 3px 0 var(--vhs); }
.vop-row img { width: 52px; height: 52px; object-fit: cover; border-radius: 6px; background: #eee; }
.vop-row-main { min-width: 0; }
.vop-name { font-size: 13px; font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.vop-meta { color: var(--muted); font-size: 11px; margin-top: 2px; }
.vop-tags { display: flex; gap: 4px; flex-wrap: wrap; margin: 5px 0; }
.vop-tip, .vop-warn { border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
.vop-tip { background: #e8f6f3; color: #0f5f56; }
.vop-warn { background: #fff4e5; color: #9a5c00; }
.vop-form { display: grid; gap: 10px; margin-top: 10px; }
.vop-form label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.vop-form input, .vop-form textarea { width: 100%; color: var(--text); }
.vop-form textarea { min-height: 220px; resize: vertical; line-height: 1.55; }
.vop-change { margin: 8px 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; }
.vop-change summary { cursor: pointer; font-weight: 600; }
.vop-change ul { margin: 5px 0 0 18px; }
.vop-job { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); font-size: 12px; }
/* làm lại 22/11/2026: yêu cầu TikTok + kiểm số ký tự */
.vop-sum { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 10px 16px 0; font-size: 13px; }
.vop-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 2px 10px; font-size: 12px; cursor: pointer; }
.vop-chip:hover { border-color: var(--vhs); }
.vop-bulk { display: flex; gap: 8px; align-items: center; margin: 6px 0; flex-wrap: wrap; }
.vop-reqs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.vop-req { border: 1px solid var(--line); border-left: 3px solid #e0a100; border-radius: 6px; padding: 6px 10px; font-size: 12px; min-width: 200px; flex: 1; }
.vop-req.t2, .vop-req.t3 { border-left-color: #c0392b; }
.vop-req ul { margin: 3px 0 0 16px; padding: 0; }
.vop-part { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 10px 0; display: grid; gap: 6px; }
.vop-ph { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.vop-cur { color: var(--text); }
.vop-cur pre, .vop-prev > div { white-space: pre-wrap; font: inherit; font-size: 12px; background: #f7f8fa; border-radius: 6px; padding: 6px 8px; margin: 4px 0 0; max-height: 260px; overflow: auto; }
.vop-prev > div { white-space: normal; }
.vop-part input, .vop-part textarea { width: 100%; }
.vop-part textarea { min-height: 240px; resize: vertical; line-height: 1.5; }
.vop-cks { display: flex; gap: 6px; flex-wrap: wrap; }
.vop-ck { font-size: 11px; border-radius: 4px; padding: 1px 6px; }
.vop-ck.ok { background: #e7f6ec; color: #1a7f37; }
.vop-ck.bad { background: #fdecea; color: #b42318; font-weight: 600; }
/* GĐ2 ảnh + thuộc tính */
.vop-imgs { display: flex; flex-wrap: wrap; gap: 8px; }
.vop-imgs.dim .vop-img { opacity: .7; }
.vop-img { width: 132px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.vop-img.main { border: 2px solid var(--vhs, #12a594); }
.vop-img.bad { border-color: #e5484d; }
.vop-img img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #eee; display: block; }
.vop-img-t { font-size: 11px; padding: 3px 5px; line-height: 1.3; min-height: 28px; }
.vop-img.bad .vop-img-t { color: #b42318; }
.vop-img-b { display: flex; gap: 2px; padding: 0 4px 4px; flex-wrap: wrap; }
.vop-img-b button { font-size: 11px; padding: 1px 6px; border: 1px solid var(--line); background: #fff; border-radius: 4px; cursor: pointer; }
.vop-done { flex-basis: 100%; font-size: 13px; }
.vop-done summary { cursor: pointer; }
.vop-done-r { display: grid; grid-template-columns: 32px 1fr auto; gap: 8px; align-items: center; padding: 3px 0; border-bottom: 1px solid var(--line); }
.vop-done-r img { width: 32px; height: 32px; object-fit: cover; border-radius: 4px; background: #eee; }
.vop-attr { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 12px; margin-bottom: 8px; }
.vop-attr label { display: flex; flex-direction: column; gap: 3px; color: var(--muted); }
.vop-attr select, .vop-attr input { color: var(--text); }
@media (max-width: 900px) { .vop-grid { grid-template-columns: 1fr; margin: 8px; } .vop-list { max-height: 45vh; } }
.vop-job .lenh-p { flex-basis: 100%; }
/* Chấm công (Dashboard → Chấm công) — server chèn vào app.css tại dấu @mod cham-cong/tab.css */
.cc-admin .cc-bar { flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.cc-admin .cc-bar input[type=month] { width: auto; }
.cc-admin .cc-bar select { width: auto; }
.cc-admin .cc-bar .cc-cut { width: 64px; text-align: center; }
.cc-admin .cc-sep { flex: 0 0 12px; }
.cc-help { margin: 6px 16px 10px; }
.cc-feat { margin-top: 6px; }
.cc-fl { display: inline-flex; align-items: center; gap: 4px; margin-right: 12px; font-size: 13px; white-space: nowrap; }
.cc-fl input { width: auto; }
.cc-tcard, .cc-people-card { margin: 0 16px 14px; }
.cc-tcard h3 { margin: 0 0 8px; color: #c62828; }
.cc-tbl { border-collapse: collapse; font-size: 12px; white-space: nowrap; }
.cc-tbl th, .cc-tbl td { border: 1px solid #b7c3d6; padding: 4px 5px; text-align: center; min-width: 34px; }
.cc-tbl thead th { background: #dce6f2; font-weight: 600; }
.cc-tbl th.today { background: #e53935; color: #fff; }
.cc-tbl .nm { text-align: left; min-width: 150px; position: sticky; left: 0; background: var(--panel); z-index: 1; font-weight: 600; }
.cc-tbl thead .nm { background: #dce6f2; }
.cc-tbl td.c { cursor: pointer; color: #1f2937; }
.cc-tbl td.c:hover { outline: 2px solid var(--accent, #ea580c); outline-offset: -2px; }
.cc-tbl td.c:not(:empty) { background: #e3f4ea; color: #14532d; font-weight: 600; }
.cc-tbl tr.sub td.c:not(:empty) { background: #fff1e0; color: #9a3412; } /* Giờ live / GMV / Tăng ca: cam nhạt */
.cc-tbl td.c.open { background: #9be0b8; color: #0b6b3a; font-weight: 700; }
.cc-tbl td.c.forgot { background: #fdd; box-shadow: inset 0 0 0 2px #e53935; }
.cc-tbl tr.sub .nm { font-weight: 400; color: var(--muted); padding-left: 16px; }
.cc-tbl tr.sum td { font-weight: 700; background: #dce6f2; }
.cc-tbl .tot { font-weight: 700; min-width: 70px; text-align: right; background: #eef3f9; }
.cc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cc-head h3 { margin: 0; }
.cc-ptbl input[type=checkbox] { width: auto; }
.cc-ptbl .cc-in-pin { width: 130px; }
.cc-dlg { min-width: min(720px, 96vw); border: 0; border-radius: 12px; padding: 16px 18px; }
.cc-dlg h3 { margin: 0 0 8px; }
.cc-dlg:focus { outline: none; } /* hộp tự focus chính nó (autofocus) để bảng chọn giờ không tự bật */
.cc-loading { padding: 18px 0; }
.cc-ltbl input[type=datetime-local] { width: auto; }
.cc-adj { margin-top: 12px; }
.cc-adj input { width: 140px; }
.cc-adj input.cc-sm { width: 70px; }
.cc-adj select { width: auto; }
.cc-dlg-btns { margin-top: 12px; text-align: right; }
#cc-feats { display: inline-flex; flex-wrap: wrap; gap: 6px 14px; }
#cc-feats .cc-fl { display: inline-flex !important; margin: 0; }
/* người được xem & sửa cả bảng (tab Chấm công): ẩn cài đặt + danh sách người */
.cc-admin.cc-limited .cc-people-card, .cc-admin.cc-limited .cc-feat, .cc-admin.cc-limited .cc-help,
.cc-admin.cc-limited #cc-cutoff, .cc-admin.cc-limited #cc-round, .cc-admin.cc-limited #cc-save-set, .cc-admin.cc-limited .cc-bar label, .cc-admin.cc-limited .cc-sep { display: none; }
#cc-full { margin-top: 18px; }
#cc-full .cc-tcard, #cc-full .cc-bar { margin-left: 0; margin-right: 0; }
/* Chấm công cho người chấm: web máy tính tab Chấm công (app.css ghép qua @mod), full màn hình. Bản điện thoại /m đã bỏ (14/11/2026) */
.cc-card .cc-name { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.cc-state { margin: 4px 0 12px; font-size: 14px; }
.cc-on { color: var(--up, #2f8a46); font-weight: 700; }
.cc-off { color: var(--muted); }
.cc-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.cc-btn { border: 0; border-radius: 14px; padding: 18px 8px; font-size: 18px; font-weight: 800; color: #fff; }
.cc-btn.in { background: var(--up, #2f8a46); }
.cc-btn.out { background: var(--accent); }
.cc-btn.live { font-size: 15px; padding: 12px 8px; opacity: .92; }
.cc-btn:disabled { background: var(--line); color: var(--muted); }
.cc-h { font-weight: 700; margin: 6px 0 8px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cc-cut { color: var(--muted); font-size: 12px; font-weight: 400; }
.cc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.cc-grid > div { background: var(--bg, #f4f5f7); border-radius: 10px; padding: 8px 10px; }
.cc-num { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cc-num.sm { font-size: 20px; }
.cc-num small { font-size: 13px; font-weight: 400; color: var(--muted); }
.cc-logs { margin-top: 8px; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.cc-month { margin-top: 12px; }
.cc-week { margin-top: 12px; font-size: 13px; }
.cc-week summary { color: var(--muted); }
.cc-week div { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.cc-week b { font-weight: 600; text-align: right; }
.cc-people { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cc-person { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 12px; font-size: 16px; font-weight: 700; text-align: left; position: relative; }
.cc-person small { color: var(--muted); font-size: 12px; font-weight: 400; }
.cc-person .dot { position: absolute; top: 10px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.cc-person .dot.on { background: var(--up, #2f8a46); }
.cc-msg { position: sticky; top: 0; z-index: 5; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; font-weight: 700; }
.cc-msg.cc-ok { background: #e6f6ee; color: var(--up, #2f8a46); }
.cc-msg.cc-bad { background: #fdeaea; color: var(--down, #c62828); }
.cc-bad { color: var(--down, #c62828); }
#cc-pin { border: 0; border-radius: 16px; padding: 16px; width: min(420px, 94vw); max-height: 92vh; overflow-y: auto; }
#cc-pin::backdrop { background: rgba(0, 0, 0, .45); }
.cc-pin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cc-pin-head b { font-size: 20px; }
.cc-pin-head button { border: 0; background: var(--bg, #f4f5f7); border-radius: 10px; padding: 8px 14px; font-size: 15px; }
#cc-pin-dots { display: flex; justify-content: center; gap: 14px; margin: 8px 0 14px; }
#cc-pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--muted); }
#cc-pin-dots i.on { background: var(--text); border-color: var(--text); }
#cc-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
#cc-pad button { border: 0; background: var(--bg, #f4f5f7); border-radius: 12px; padding: 16px 0; font-size: 24px; font-weight: 700; }
#cc-pin-err { color: var(--down, #c62828); text-align: center; min-height: 20px; font-weight: 600; }
.cc-lbl { color: var(--muted); font-size: 13px; }
.cc-live { margin: 4px 0 12px; padding: 10px 12px; border-radius: 12px; background: #fff4ec; }
.cc-live-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.cc-live-row label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }
.cc-live-row input, .cc-live-row select { border: 1px solid var(--line); border-radius: 8px; padding: 8px; font-size: 15px; width: 130px; background: var(--panel); color: var(--text); }
.cc-live-save { border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 700; background: var(--accent); color: #fff; }
/* web máy tính */
#tab-cham-cong .cc-wrap { margin: 16px 0; padding: 0 16px; }
#tab-cham-cong .cc-section { font-size: 16px; margin: 16px 0 10px; }
.cc-live-row select { width: 160px; }
.cc-man { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: #f1f5ff; }
.cc-man summary { font-weight: 700; cursor: pointer; }
.cc-man > * + * { margin-top: 8px; }
.cc-man-mode { display: flex; gap: 16px; font-size: 14px; }
.cc-man-mode input { width: auto; margin-right: 4px; }
.cc-man-calc { font-size: 15px; min-height: 20px; }
.cc-man-del { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: var(--panel); color: var(--text); }
.cc-strike { text-decoration: line-through; opacity: .6; }
.cc-man [hidden] { display: none !important; }
.cc-pv { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 99px; background: #e6f6ee; color: var(--up, #2f8a46); font-size: 14px; }
.cc-pv.ot { background: #fff0e6; color: var(--accent); }
.cc-mt { margin-top: 14px; }
.cc-mt-nav button { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 2px 12px; font-size: 16px; margin-left: 4px; }
.cc-mt-nav button:disabled { opacity: .35; }
.cc-mt-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #b7c3d6; border-radius: 8px; }
.cc-mt table { border-collapse: collapse; font-size: 12px; white-space: nowrap; }
.cc-mt th, .cc-mt td { border: 1px solid #c9d3e2; padding: 4px 5px; text-align: center; min-width: 30px; font-variant-numeric: tabular-nums; }
.cc-mt thead th { background: #dce6f2; font-weight: 600; }
.cc-mt th.td { background: #e53935; color: #fff; }
.cc-mt .nm { position: sticky; left: 0; background: var(--panel); text-align: left; font-weight: 600; min-width: 74px; z-index: 1; }
.cc-mt thead .nm { background: #dce6f2; }
.cc-mt td.on { background: #e3f4ea; color: #14532d; font-weight: 600; }
.cc-mt td.mn { box-shadow: inset 0 0 0 2px #4c8bf5; }
.cc-mt td.fg { background: #fdd; box-shadow: inset 0 0 0 2px #e53935; }
.cc-mt .tot { font-weight: 700; background: #eef3f9; min-width: 44px; }
.cc-acts { max-width: 720px; }
.cc-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.cc-people { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.cc-mt table { width: 100%; }
.cc-mt th, .cc-mt td { font-size: 13px; padding: 6px 4px; }
.cc-live-row input.cc-time { width: 120px; }
/* bảng chọn giờ gọn */
.cc-tp { position: fixed; z-index: 1000; width: 248px; padding: 10px; background: var(--panel, #fff); border: 1px solid var(--line, #e3e6ea); border-radius: 12px; box-shadow: 0 8px 28px rgba(20, 30, 50, .18); }
.cc-tp[hidden] { display: none; }
.cc-tp-h { font-size: 11px; color: var(--muted); margin: 0 0 4px 2px; text-transform: uppercase; letter-spacing: .04em; }
.cc-tp-hours { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-bottom: 8px; }
.cc-tp-mins { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.cc-tp button { border: 0; border-radius: 7px; background: var(--bg, #f4f5f7); padding: 6px 0; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; font-variant-numeric: tabular-nums; }
.cc-tp button:hover { background: #ffe3d2; }
.cc-tp button.on { background: var(--accent, #e8590c); color: #fff; }
#cc-day { border: 0; border-radius: 14px; padding: 16px 18px; width: min(760px, 96vw); }
#cc-day::backdrop { background: rgba(0, 0, 0, .4); }
.cc-mt td.cc-c { cursor: pointer; }
.cc-mt td.cc-c:hover { outline: 2px solid var(--accent, #e8590c); outline-offset: -2px; }
/* Lịch sử chỉnh sửa trong hộp nhập giờ (14/11/2026) */
.cc-hist { margin-top: 14px; border-top: 1px solid var(--line, #e3e6ea); padding-top: 10px; font-size: 13px; }
.cc-hist table { width: 100%; border-collapse: collapse; }
.cc-hist td { padding: 4px 6px; border-bottom: 1px solid var(--line, #eef0f3); vertical-align: top; }
.cc-hist td.t { white-space: nowrap; color: var(--muted, #667); }
.cc-hist td.b { white-space: nowrap; font-weight: 600; }
.cc-hist s { color: var(--muted, #889); }
/* Sinh ảnh: khung nhúng /sinh-anh/ (tab chính) + /sinh-anh/?p=cai-dat (Dashboard → Sinh ảnh) */
#tab-sinh-anh { display: flex; }
#tab-sinh-anh[hidden] { display: none; }
#sa-frame { flex: 1; width: 100%; min-height: calc(100vh - 54px); height: 100%; border: 0; }
#sa-cfg-frame { width: 100%; min-height: calc(100vh - 120px); border: 0; display: block; }
/* Tab Auto Up Video (modules/auto-up-video) */
#tab-auto-up-video { padding: 12px 16px; }
.auv-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.auv-head h3 { margin: 0 6px 0 0; }
.auv-head label { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.auv-sp { flex: 1; }
.auv-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--line-2, #f0f1f4); font-size: 12px; color: var(--muted); }
.auv-pill.ok { background: var(--ok-bg); color: var(--ok); }
.auv-pill.bad { background: var(--err-bg); color: var(--err); }
.auv-warn { background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; font-size: 13px; }
.auv-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius, 12px); padding: 12px; margin-bottom: 12px; box-shadow: var(--shadow, none); }
.auv-card > summary { cursor: pointer; font-weight: 600; }
.auv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 10px 0; }
.auv-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.auv-grid em { color: var(--muted); font-style: normal; font-size: 12px; }
.auv-row2 { display: flex; align-items: center; gap: 6px; }
.auv-row2 input { width: 80px; }
.auv-checks { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 13px; margin-top: 8px; }
.auv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0; }
.auv-bar label, .auv-checks label { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.auv-bulk { margin: 8px 0; font-size: 13px; }
.auv-bulk > summary { cursor: pointer; color: var(--accent); }
.auv-paste { background: var(--accent-2); border-radius: 10px; padding: 8px 12px; margin: 8px 0; font-size: 13px; }
.auv-paste textarea { width: 100%; box-sizing: border-box; }
.auv-upl { font-size: 13px; color: var(--accent); margin: 6px 0; }
.auv-wrap { overflow-x: auto; }
.auv-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.auv-table th, .auv-table td { border-bottom: 1px solid var(--line); padding: 6px 5px; vertical-align: top; text-align: left; }
.auv-table th { font-weight: 600; white-space: nowrap; background: var(--line-2, #f6f7f9); }
.auv-table th em { color: var(--muted); font-style: normal; font-weight: 400; }
.auv-table textarea { width: 100%; min-width: 150px; min-height: 54px; box-sizing: border-box; font: inherit; resize: vertical; }
.auv-table .w-desc { min-width: 220px; }
.auv-table .w-prod { min-width: 200px; }
.auv-table input:not([type=checkbox]), .auv-table select { width: 100%; box-sizing: border-box; min-width: 110px; }
.auv-table .need { border-color: var(--err) !important; background: var(--err-bg); }
.auv-table tr.off td { opacity: .55; }
.auv-table tr.posted td { background: var(--ok-bg); }
.auv-table .vname { font-weight: 600; word-break: break-all; max-width: 200px; }
.auv-table .vsize, .auv-table .counter, .auv-table .pname { color: var(--muted); font-size: 12px; }
.auv-table .pname.bad, .auv-table .missing { color: var(--err); font-size: 12px; }
.auv-table select.isdef { color: var(--muted); }
.auv-st { min-width: 160px; max-width: 260px; font-size: 12px; }
.auv-st.ok { color: var(--ok); } .auv-st.err { color: var(--err); } .auv-st.run { color: var(--accent); }
.auv-st a { cursor: pointer; text-decoration: underline; }
.auv-table .auv-ai { margin-top: 4px; padding: 2px 8px; font-size: 12px; }
.auv-acts { white-space: nowrap; }
.auv-done { margin-top: 10px; background: var(--ok-bg); border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.auv-done > summary { cursor: pointer; color: var(--ok); font-weight: 600; }
.auv-done > summary button { margin-left: 8px; font-weight: 400; }
.auv-done table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.auv-done td { border-top: 1px solid var(--line); padding: 4px 5px; vertical-align: top; }
.auv-done td.d { color: var(--muted); max-width: 420px; }
.auv-acts button { padding: 2px 7px; }
.auv-empty { padding: 18px; text-align: center; color: var(--muted); }
.auv-err { background: var(--err-bg); color: var(--err); border-radius: 10px; padding: 8px 12px; margin-top: 8px; font-size: 13px; }
.auv-err ul { margin: 4px 0; padding-left: 20px; }
.auv-job { border-top: 1px solid var(--line); padding: 6px 0; font-size: 13px; }
.auv-job pre { white-space: pre-wrap; font-size: 12px; background: var(--line-2, #f6f7f9); padding: 6px 8px; border-radius: 8px; max-height: 220px; overflow: auto; margin: 4px 0 0; }
.auv-tiles { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.auv-tiles div { background: var(--accent-2); border-radius: 10px; padding: 8px 14px; min-width: 110px; }
.auv-tiles b { display: block; font-size: 20px; }
.auv-tiles span { font-size: 12px; color: var(--muted); }
.auv-stgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.auv-stgrid h4 { margin: 6px 0; }
.auv-stgrid table { width: 100%; border-collapse: collapse; font-size: 12px; }
.auv-stgrid td { border-bottom: 1px solid var(--line); padding: 3px 4px; }
.auv-stgrid td:last-child { text-align: right; font-weight: 600; }
.auv-pick { position: fixed; z-index: 50; width: 420px; max-height: 320px; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .15); font-size: 13px; }
.auv-pick .o { padding: 6px 10px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.auv-pick .o small { color: var(--muted); }
.auv-pick .o.on, .auv-pick .o:hover { background: var(--accent-2); }
.auv-pick .e { padding: 10px; color: var(--muted); }
.auv-shotdlg { max-width: 92vw; border: 0; border-radius: 12px; padding: 10px; }
.auv-shotdlg img { max-width: 88vw; max-height: 80vh; display: block; margin-bottom: 8px; }
/* Thông báo góc phải dưới (thong-bao/tb.js) — server chèn vào app.css tại dấu @mod thong-bao/tab.css */
.tb-wrap { position: fixed; inset: auto 16px 16px auto; width: 340px; max-height: calc(100vh - 32px); overflow: auto; margin: 0; padding: 0; border: 0; background: transparent; flex-direction: column; gap: 8px; }
.tb-wrap:popover-open { display: flex; }
.tb-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted, #667); background: var(--panel, #fff); border: 1px solid var(--line, #e3e6ea); border-radius: 8px; padding: 4px 10px; }
.tb-head .tb-all { border: 0; background: none; color: var(--accent, #e8590c); font-size: 12px; cursor: pointer; text-decoration: underline; padding: 2px 0; }
.tb-card { background: var(--panel, #fff); border: 1px solid var(--line, #e3e6ea); border-left: 4px solid #e53935; border-radius: 0 8px 8px 0; padding: 10px 12px; box-shadow: 0 6px 20px rgba(20, 30, 50, .16); font-size: 12.5px; color: var(--text, #1f2937); }
.tb-t { display: flex; align-items: center; gap: 4px; font-weight: 700; color: #c62828; font-size: 13px; }
.tb-t .tb-off { color: #d9d9d9; margin-right: 4px; }
.tb-ago { margin-left: auto; font-weight: 400; font-size: 11px; color: var(--muted, #889); }
.tb-l { margin-top: 4px; font-weight: 600; }
.tb-p { margin-top: 2px; color: var(--muted, #667); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-c { margin-top: 4px; }
.tb-b { color: var(--muted, #889); }
.tb-btns { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }
.tb-btns .tb-ok, .tb-btns .tb-go { font-size: 12px; padding: 5px 12px; border-radius: 7px; cursor: pointer; text-decoration: none; }
.tb-btns .tb-ok { border: 1px solid var(--line, #d0d5dd); background: var(--panel, #fff); color: var(--text, #1f2937); }
.tb-btns .tb-go { border: 0; background: var(--accent, #e8590c); color: #fff; }
.tb-more { text-align: center; font-size: 12px; color: var(--muted, #667); background: var(--panel, #fff); border: 1px solid var(--line, #e3e6ea); border-radius: 8px; padding: 4px; }
/* Thẻ trả hàng / hoàn tiền (14/11/2026) */
.tb-card.tb-ret { border-left-color: #ef6c00; }
/* Captcha trên sàn (18/11/2026): viền tím + ảnh chụp tab */
.tb-card.tb-cap { border-left-color: #7c3aed; }
.tb-img { display: block; max-width: 100%; max-height: 180px; margin-top: 6px; border-radius: 6px; border: 1px solid var(--line); }
.tb-card.tb-hoan { border-left-color: #0e7490; }
.tb-card.tb-jt { border-left-color: #b91c1c; }
/* Giao diện riêng module ke-toan — server chèn vào app.css tại dấu @mod ke-toan/tab.css */
.kt { --kt: #0b7285; --kt-2: #e3fafc; }
.kt-head { margin: 14px 16px 0; padding: 16px 20px; border-radius: var(--radius, 12px); color: #fff; background: linear-gradient(120deg, #0b7285, #1098ad); box-shadow: var(--shadow); }
.kt-head h2 { margin: 0 0 2px; font-size: 20px; }
.kt-head .muted { color: #c5f6fa; }
html[data-theme="green"] .kt { --kt: #15803d; --kt-2: #ecfdf3; }
html[data-theme="green"] .kt-head { background: linear-gradient(120deg, #14532d, #15803d); }
html[data-theme="green"] .kt-head .muted { color: #dcfce7; }
.kt-conn { font-size: 12px; padding: 2px 10px; border-radius: 99px; background: var(--err-bg); color: var(--err); cursor: default; }
.kt-conn.on { background: var(--ok-bg); color: var(--ok); }
.kt .btn-link { text-decoration: none; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); color: inherit; font-size: 13px; }
.kt-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; padding: 14px 16px 4px; }
.kt-kpi { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--kt); border-radius: 10px; padding: 10px 14px; }
.kt-kpi.tax { border-left-color: #e8590c; }
.kt-kpi .l { color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.kt-kpi .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 2px 0; }
.kt-kpi .s { color: var(--muted); font-size: 12px; }
.kt-card { margin: 12px 16px 0; }
.kt > .kt-card:last-child { margin-bottom: 16px; }
.kt-card-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.kt-card-head h3 { margin: 0; }
.kt-grid { display: grid; grid-template-columns: 1fr 1fr; }
.kt-grid .kt-card + .kt-card { margin-left: 0; }
.kt-scroll { overflow-x: auto; }
.kt .tbl th { background: var(--kt-2); font-size: 12px; }
.kt .tbl td.n, .kt .tbl th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kt .tbl tr.sum td { font-weight: 700; border-top: 2px solid var(--line); }
.kt .tbl tr.sub td:first-child { padding-left: 22px; color: var(--muted); }
.kt .tbl td.gap { color: var(--err); font-weight: 600; }
.kt-ins { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.kt-ins li { padding: 8px 12px; border-radius: 8px; background: var(--kt-2); font-size: 13px; line-height: 1.5; }
.kt-ins li.warn { background: var(--err-bg); }
.kt-ins li.ok { background: var(--ok-bg); }
.kt-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; font-size: 13px; }
.kt-split h4 { margin: 0 0 4px; }
.kt-split ul { margin: 0; padding-left: 18px; }
@media (max-width: 900px) { .kt-grid, .kt-split { grid-template-columns: 1fr; } .kt-grid .kt-card + .kt-card { margin-left: 16px; } }
.kt-inv-sum { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 14px; margin-bottom: 4px; }
.kt .ok-t { color: var(--ok); } .kt .bad-t { color: var(--err); }
.kt-grid2 { display: grid; grid-template-columns: minmax(260px, 1fr) 2fr; gap: 12px; align-items: start; margin: 8px 0; }
.kt-tall { max-height: 360px; overflow-y: auto; }
.kt-san-form { display: grid; gap: 6px; margin-top: 8px; font-size: 13px; }
.kt-san-form input { width: 120px; }
@media (max-width: 900px) { .kt-grid2 { grid-template-columns: 1fr; } }
.kt h4 { margin: 12px 0 6px; }
.kt-kho-eff { margin: 8px 0; padding: 8px 12px; border-radius: 8px; background: var(--kt-2); font-size: 13px; display: grid; gap: 3px; }
#kt-kho-tabs { margin: 6px 0; }
.kt-bkm { width: 100%; height: calc(100vh - 120px); min-height: 560px; display: block; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.kt-close { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.kt-close li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: start; padding: 8px 10px; border-radius: 8px; background: var(--kt-2); font-size: 13px; }
.kt-close li.bad { background: var(--err-bg); cursor: pointer; }
.kt-close li.warn { background: var(--warn-bg); cursor: pointer; }
.kt-close li.na { opacity: .65; }
.kt-go { color: var(--accent); font-weight: 600; white-space: nowrap; }
.kt-close-ok { font-weight: 600; color: var(--ok); }
.kt-tax-late td { background: var(--err-bg); }
.kt-tax-soon td { background: var(--warn-bg); }
.kt-tax-done td { opacity: .7; }
.kt-hd-top td:first-child { font-weight: 700; color: var(--accent); }
.kt-hd-lines { margin: 4px 0 0; padding-left: 18px; }

/* Tiền chuyển / bill iPhone trong Dashboard */
.tien-grid { display: grid; grid-template-columns: minmax(420px, 1.25fr) minmax(360px, .75fr); gap: 12px; margin-bottom: 12px; }
.tien-grid > .card { margin: 0; }
.tien-account-list { display: grid; gap: 8px; }
.tien-staff { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.tien-account { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr auto auto auto; gap: 6px; align-items: end; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.tien-account label { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 11px; color: var(--muted); }
.tien-account input { min-width: 0; width: 100%; }
.tien-account label.check { flex-direction: row; align-items: center; white-space: nowrap; }
.tien-balance { white-space: nowrap; font-size: 12px; }
.tien-balance b { display: block; font-size: 16px; color: var(--ok, #16845b); }
.tien-balance-edit { display: flex; align-items: center; gap: 4px; margin-top: 3px; }
.tien-balance-edit input { width: 112px; padding: 5px 7px; text-align: right; font-weight: 700; color: var(--ok, #16845b); }
.tien-url { flex: 1; min-width: 0; overflow-wrap: anywhere; background: var(--line-2, #f2f3f5); padding: 6px 8px; border-radius: 6px; font-size: 11px; }
.tien-steps { margin-bottom: 0; padding-left: 20px; }
.tien-bill { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.tien-bill:first-child { border-top: 0; }
.tien-img { display: block; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #111; min-height: 160px; }
.tien-img img { display: block; width: 100%; height: 100%; max-height: 340px; object-fit: contain; }
.tien-history-money { font-size: 22px; font-weight: 700; margin: 8px 0; color: var(--ok, #16845b); }
.tien-bill-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.tien-form { display: grid; grid-template-columns: repeat(5, minmax(110px, 1fr)); gap: 8px; margin: 8px 0; }
.tien-form label { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--muted); min-width: 0; }
.tien-form label.wide { grid-column: span 2; }
.tien-form input, .tien-form select { width: 100%; min-width: 0; }
.tien-ocr pre { max-height: 180px; overflow: auto; white-space: pre-wrap; word-break: break-word; padding: 8px; border-radius: 6px; background: var(--line-2, #f2f3f5); }
.tien-warn { margin: 6px 0; padding: 6px 8px; border-radius: 6px; background: #fff4e5; color: #9a5c00; font-size: 12px; }
.tien-activity-card { margin-bottom: 12px; }
.tien-activity-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tien-activity-tools select, .tien-activity-tools input { margin: 0; }
.tien-activity-wrap { max-height: 420px; overflow: auto; }
.tien-activity-table { min-width: 720px; }
.tien-correct { margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--line); }
.tien-correct .tien-form { margin-top: 8px; }
@media (max-width: 1100px) { .tien-grid { grid-template-columns: 1fr; } .tien-account { grid-template-columns: 1fr 1fr; } .tien-form { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 650px) { .tien-bill { grid-template-columns: 1fr; } .tien-img { min-height: 220px; } }

/* =====================================================================
   Khung điều hướng v3 — Sidebar 5 nhóm + Topbar 1 dòng + Ctrl+K + Độ thoáng
   (Neon của Gemini, 24/11/2026)
   ===================================================================== */
body { height: 100vh; overflow: hidden; }
body.locked .app-shell { visibility: hidden; }
.app-shell { display: flex; flex: 1; min-height: 0; height: 100vh; width: 100%; overflow: hidden; }

/* Thanh bên trái */
.app-sidebar { width: 220px; flex: none; height: 100%; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; transition: width .18s ease; z-index: 25; }
.sb-top { min-height: 50px; flex: none; padding: 8px 10px 8px 12px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.sb-brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.sb-logo { width: 28px; height: 28px; border-radius: 8px; flex: none; object-fit: contain; background: var(--accent-2); padding: 2px; border: 1px solid var(--accent-3); }
.sb-brand-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sb-top h1 { font-size: 15px; line-height: 1.15; margin: 0; letter-spacing: -.01em; color: var(--text); }
.sb-top #mode { font-size: 10.5px; padding: 1px 7px; align-self: flex-start; }
.sb-toggle { flex: none; width: 30px; height: 30px; padding: 0; display: inline-grid; place-items: center; border: 1px solid transparent; background: transparent; color: var(--muted); border-radius: 8px; }
.sb-toggle:hover { background: var(--line-2); color: var(--text); }

/* Danh sách 5 nhóm tab */
.app-sidebar .tabs-nav { flex: 1; min-height: 0; overflow-y: auto; margin: 0; padding: 6px 8px 10px; background: transparent; border-radius: 0; display: flex; flex-direction: column; gap: 11px; scrollbar-width: thin; }
.sb-group { display: flex; flex-direction: column; gap: 2px; }
.sb-group[hidden] { display: none; }
.sb-group-title { padding: 2px 10px 3px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #8c96a7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-sidebar .tab-btn { position: relative; display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 7px 10px; border: 0; border-radius: 9px; background: transparent; color: #394456; font-size: 13.5px; font-weight: 500; box-shadow: none; }
.app-sidebar .tab-btn:hover:not(.active) { background: #f1f5f9; color: var(--text); }
.app-sidebar .tab-btn.active { background: var(--accent-2); color: var(--accent); font-weight: 700; box-shadow: none; }
.app-sidebar .tab-btn.active::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 99px; background: var(--accent); }
.tab-ico { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; flex: none; opacity: .82; }
.app-sidebar .tab-btn.active .tab-ico { opacity: 1; }
.tab-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-sidebar .tab-badge { margin-left: auto; flex: none; }
/* Menu con CSKH trên sidebar (27/11/2026): Đánh giá xấu / Trả hàng / Đơn to / Huỷ đơn */
.tab-chev { margin-left: auto; flex: none; font-size: 11px; color: var(--muted); padding: 2px 5px; border-radius: 5px; line-height: 1; transition: transform .15s ease; }
.tab-chev:hover { background: rgba(15, 23, 42, .08); color: var(--text); }
.app-sidebar .tab-btn.sub-open .tab-chev { transform: rotate(90deg); }
.sb-sub { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 4px 18px; padding-left: 10px; border-left: 2px solid var(--line-2); }
.sb-sub-btn { display: flex; align-items: center; gap: 7px; width: 100%; text-align: left; padding: 5px 9px; border: 0; border-radius: 7px; background: transparent; color: #526075; font-size: 13px; font-weight: 500; box-shadow: none; cursor: pointer; }
.sb-sub-btn::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #cbd5e1; flex: none; }
.sb-sub-btn:hover:not(.active) { background: #f1f5f9; color: var(--text); }
.sb-sub-btn.active { background: var(--accent-2); color: var(--accent); font-weight: 700; }
.sb-sub-btn.active::before { background: var(--accent); }

/* Chân sidebar: tài khoản */
.sb-foot { flex: none; padding: 8px 10px; border-top: 1px solid var(--line-2); background: #fafbfd; }
.sb-foot .me-box { margin: 0; display: flex; flex-direction: column; align-items: stretch; gap: 6px; font-size: 12.5px; }
.sb-foot .me-box[hidden] { display: none; }
.sb-foot .me-name { font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
.sb-foot .me-acts { display: flex; flex-wrap: wrap; gap: 4px; }
.sb-foot .me-acts button { flex: 1 1 auto; padding: 4px 6px; font-size: 11.5px; text-align: center; }

/* Sidebar chế độ thu gọn (icon 64px) */
body.sb-col .app-sidebar { width: 64px; }
body.sb-col .sb-top { padding: 0; justify-content: center; }
body.sb-col .sb-brand { display: none; }
body.sb-col .sb-group-title, body.sb-col .tab-label, body.sb-col .sb-sub, body.sb-col .tab-chev { display: none; }
body.sb-col .app-sidebar .tab-btn { justify-content: center; padding: 9px 0; }
body.sb-col .app-sidebar .tab-badge { position: absolute; top: 3px; right: 6px; margin: 0; min-width: 15px; padding: 0 4px; font-size: 10px; line-height: 15px; }
body.sb-col .sb-foot { padding: 6px; }
body.sb-col .sb-foot .me-name, body.sb-col #me-tabs, body.sb-col #me-pass { display: none; }
body.sb-col #me-logout { font-size: 11px; padding: 5px 2px; }

/* Vùng nội dung chính bên phải */
.app-main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }
.app-topbar { height: 48px; flex: none; padding: 0 16px; background: var(--panel); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; box-shadow: none; }
.tb-title { margin: 0; font-size: 15.5px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
/* Bộ chọn màu giao diện trên thanh menu */
.tb-theme { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 99px; border: 1px solid var(--line); background: var(--bg); }
.th-dot { width: 17px; height: 17px; padding: 0; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(15, 23, 42, .18); cursor: pointer; flex: none; }
.th-dot:hover { transform: scale(1.12); }
.th-dot.on { box-shadow: 0 0 0 2px var(--text); transform: scale(1.08); }
.th-orange { background: #e8590c; }
.th-green { background: #15803d; }
.th-teal { background: #0f766e; }
.th-blue { background: #1d4ed8; }
.sb-mob-open { display: none; }
.app-main > main.tab { flex: 1; min-height: 0; overflow: auto; }
#tab-cskh:not([hidden]), #tab-sinh-anh:not([hidden]) { overflow: hidden; }
#tab-cskh #cskh-frame { min-height: 0; height: 100%; }
#tab-dashboard .db-pane[data-p="ket-noi"], #tab-dashboard .db-pane[data-p="he-thong"], #ds-pane-jt { padding: 0 16px 16px; }

/* Làm thoáng & sắc nét thẻ, bảng, thanh tab con, tiến độ lệnh */
.kpi, .card { border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--radius); }
.tbl th { background: #f8fafc; font-weight: 600; color: var(--muted); padding: 7px 9px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 7px 9px; border-bottom: 1px solid var(--line-2); }
.tbl tbody tr:hover { background: #f8fafc; }
.seg { border-color: var(--line); background: var(--panel); }
.seg.subtabs, .seg.db-sub { margin: 12px 16px 6px; background: var(--panel); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); padding: 3px; gap: 3px; border-radius: 10px; }
.seg.subtabs button, .seg.db-sub button { border-radius: 7px; padding: 6px 14px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.seg.subtabs button:hover:not(.active), .seg.db-sub button:hover:not(.active) { background: var(--bg); color: var(--text); }
.seg.subtabs button.active, .seg.db-sub button.active { background: var(--accent); color: #fff; }
.lenh-bar { height: 7px; }
.lenh-huy { border-color: #fecaca !important; background: #fef2f2 !important; color: var(--err) !important; font-weight: 600; }
.lenh-huy:hover { background: #fee2e2 !important; }

/* Nền tối khi mở drawer trên màn hình hẹp */
.sb-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(15, 23, 42, .4); }
.sb-backdrop[hidden] { display: none; }

/* Màn hình <= 1100px: Sidebar thành ngăn kéo trượt từ trái */
@media (max-width: 1100px) {
  body, .app-shell { height: auto; min-height: 100vh; overflow: visible; }
  .app-main { overflow: visible; }
  .app-main > main.tab, #tab-in-don:not([hidden]), #tab-in-fb:not([hidden]) { overflow: visible; }
  #tab-cskh #cskh-frame { min-height: calc(100vh - 50px); }
  .app-topbar { position: sticky; top: 0; z-index: 20; }
  .sb-mob-open { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
  .app-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 45; width: 262px !important; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 0 12px 36px rgba(15, 23, 42, .22); }
  body.sb-open .app-sidebar { transform: translateX(0); }
  #sb-toggle { display: none; }
  body.sb-col .sb-brand, body.sb-col .sb-group-title, body.sb-col .tab-label, body.sb-col .sb-foot .me-name, body.sb-col #me-tabs, body.sb-col #me-pass, body.sb-col .tab-chev { display: revert; }
  body.sb-col .sb-sub { display: flex; }
  body.sb-col .sb-top { padding: 0 12px; justify-content: flex-start; }
  body.sb-col .app-sidebar .tab-btn { justify-content: flex-start; padding: 8px 10px; }
  body.sb-col .app-sidebar .tab-badge { position: static; margin-left: auto; }
  .app-sidebar .tabs-nav { width: auto; overflow-x: visible; overflow-y: auto; }
}
@media (max-width: 760px) {
  .app-topbar { padding: 0 12px; height: 46px; }
  .seg.subtabs, .seg.db-sub { margin: 8px 10px 4px; overflow-x: auto; max-width: calc(100vw - 20px); }
  .tbl th, .tbl td { padding: 5px 6px; }
  #tab-dashboard .db-pane[data-p="ket-noi"], #tab-dashboard .db-pane[data-p="he-thong"], #ds-pane-jt { padding: 0 10px 12px; }
  .sb-foot .me-box { order: 0; margin-left: 0; flex-direction: column; gap: 6px; }
  .sb-foot .me-box #me-name, .sb-foot .me-box #me-pass { display: block; }
}
/* Thanh báo có bản mới web máy tính (27/11/2026): góc dưới giữa, theo màu --accent (hoặc vàng khi đang gõ/mở khung) */
.app-upd { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 10px; width: max-content; max-width: calc(100vw - 24px); padding: 9px 14px; border-radius: 12px; background: var(--accent); color: #fff; font-size: 13.5px; line-height: 1.35; box-shadow: 0 10px 28px rgba(15, 23, 42, .22); }
.app-upd-msg { font-weight: 500; }
.app-upd-acts { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.app-upd-go { border: 0; border-radius: 8px; padding: 5px 11px; font-size: 12.5px; font-weight: 700; background: #fff; color: var(--accent); cursor: pointer; }
.app-upd-go:hover { filter: brightness(.96); }
.app-upd-later { border: 1px solid rgba(255, 255, 255, .42); border-radius: 8px; padding: 5px 10px; font-size: 12.5px; font-weight: 600; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; }
.app-upd-later:hover { background: rgba(255, 255, 255, .24); }
.app-upd.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid #eab308; box-shadow: 0 10px 28px rgba(15, 23, 42, .16); }
.app-upd.warn .app-upd-go { background: var(--accent); color: #fff; }
.app-upd.warn .app-upd-later { background: #fff; color: var(--text); border-color: var(--line); }
@media (max-width: 760px) {
  .app-upd { bottom: 10px; padding: 8px 12px; font-size: 13px; max-width: calc(100vw - 20px); }
}
/* Ưu tiên tuyệt đối thuộc tính [hidden]: chống mọi quy tắc display:flex/block làm lộ tab nhân viên không có quyền (Neon của Gemini, 24/11/2026) */
[hidden], .app-sidebar .tab-btn[hidden], .sb-group[hidden], .sb-sub[hidden], .app-sidebar .tab-badge[hidden], .sb-foot .me-box[hidden], .app-main > main.tab[hidden] { display: none !important; }
body:not(.auth-ready) .app-sidebar .tabs-nav { visibility: hidden; }
