:root {
  /* Màu: nền giấy ấm, một màu xanh lá ruộng làm chủ đạo, vàng rơm dùng rất ít */
  --brand: #1f6b43; --brand-600: #17573a; --brand-50: #eef5f0; --brand-100: #dcebe1;
  --accent: #a8641a; --accent-50: #fbf3e6;
  --bg: #f5f4f0; --surface: #ffffff; --surface-2: #faf9f6; --line: #e2e0d9; --line-2: #eeece6;
  --text: #1d201b; --muted: #676b62; --faint: #9a9d94;
  --red: #b4372c; --red-50: #fbeeec; --blue: #2c5d8f; --blue-50: #edf3f9; --orange: #c0611e; --pink: #a8456d;
  --ink: #23271f;              /* nền tối dùng cho thanh chọn hàng loạt, thông báo */
  --radius: 8px; --radius-sm: 6px;
  --shadow: none;
  --shadow-lg: 0 12px 32px rgba(29, 32, 27, .16);
  --side: 216px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 14px; line-height: 1.45; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); text-decoration: none; } a:hover { text-decoration: underline; }
svg.i { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::selection { background: var(--brand-100); }

/* ---------- khung ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; height: 100vh; }
.side { background: var(--surface-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 10px 12px; gap: 2px; overflow-y: auto; }
.logo { display: flex; align-items: center; gap: 10px; padding: 2px 8px 14px; }
.logo-mark { width: 32px; height: 32px; border-radius: 7px; background: var(--brand); color: #fff; display: grid; place-items: center; }
.logo-mark svg.i { width: 18px; height: 18px; }
.logo b { font-size: 15px; font-weight: 700; display: block; letter-spacing: -.1px; }
.logo small { color: var(--muted); font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-g { font-size: 11px; font-weight: 600; color: var(--faint); padding: 14px 10px 5px; letter-spacing: .3px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; color: #3b3f37; font-weight: 500; position: relative; }
.nav a:hover { background: var(--line-2); text-decoration: none; }
.nav a.on { background: var(--brand-50); color: var(--brand-600); font-weight: 600; }
.nav a.on svg.i { color: var(--brand); }
.nav a svg.i { color: var(--muted); }
.nav .badge { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 600; border-radius: 4px; padding: 0 6px; line-height: 18px; }
.side-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; font-size: 13px; }
.side-foot .who { flex: 1; min-width: 0; } .side-foot .who b { display: block; font-weight: 600; } .side-foot .who span { color: var(--muted); font-size: 12px; }
.side-foot button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 6px; }
.side-foot button:hover { background: var(--line-2); color: var(--text); }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); padding: 0 10px 6px; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: #3f9b62; }
.live.off i { background: var(--red); } .live.off span::after { content: ' — mất kết nối'; color: var(--red); }

.main { min-width: 0; height: 100vh; overflow: auto; }
.page { padding: 20px 28px 40px; max-width: 1440px; }
.page-h { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; min-height: 36px; }
.page-h h1 { font-size: 20px; font-weight: 700; margin: 0; letter-spacing: -.2px; }
.page-h .sub { color: var(--muted); font-size: 13px; }
.grow { flex: 1; }

/* ---------- nút, ô nhập ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); font-weight: 500; cursor: pointer; white-space: nowrap; transition: background .1s, border-color .1s; }
.btn:hover { border-color: #cfccc3; background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn.accent { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.btn.accent:hover { background: #000; }
.btn.danger { color: var(--red); }
.btn.danger.solid { background: var(--red); color: #fff; border-color: var(--red); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--line-2); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.xs { height: 25px; padding: 0 8px; font-size: 12px; border-radius: 5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.icon { width: 34px; padding: 0; }
.btn.sm.icon { width: 30px; }
.inp, select.inp, textarea.inp { height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); width: 100%; outline: none; transition: border-color .1s; }
textarea.inp { height: auto; padding: 8px 10px; resize: vertical; line-height: 1.5; }
.inp::placeholder { color: var(--faint); }
.inp:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.inp:focus { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-100); }
.inp.sm { height: 30px; font-size: 13px; }
label.f { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); margin: 0 0 4px; }
.field { margin-bottom: 12px; }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.search { position: relative; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 15px; height: 15px; }
.search .inp { padding-left: 31px; }
.switch { position: relative; width: 34px; height: 20px; flex: none; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cfccc3; border-radius: 99px; transition: .12s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .12s; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(14px); }
.chk { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }

/* ---------- thẻ, nhãn ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-h { padding: 12px 16px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; min-height: 48px; }
.card-h h3 { margin: 0; font-size: 14px; font-weight: 600; }
.card-b { padding: 16px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; white-space: nowrap; line-height: 1.6; }
.pill.dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag { display: inline-flex; align-items: center; padding: 0 6px; border-radius: 4px; font-size: 11.5px; font-weight: 500; line-height: 19px; background: var(--line-2); color: var(--muted); white-space: nowrap; }
.tag.green { background: var(--brand-100); color: var(--brand-600); }
.tag.red { background: var(--red-50); color: var(--red); }
.tag.amber { background: var(--accent-50); color: var(--accent); }
.tag.blue { background: var(--blue-50); color: var(--blue); }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12.5px; } .b { font-weight: 700; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12.5px; letter-spacing: -.2px; }
.alert { padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13px; display: flex; gap: 9px; align-items: flex-start; line-height: 1.45; }
.alert.red { background: var(--red-50); color: #8a2a21; border: 1px solid #efcfca; }
.alert.amber { background: var(--accent-50); color: #7a4812; border: 1px solid #eedcbe; }
.alert.green { background: var(--brand-50); color: var(--brand-600); border: 1px solid var(--brand-100); }
.alert.blue { background: var(--blue-50); color: #22496f; border: 1px solid #d3e1ee; }
.empty { text-align: center; color: var(--muted); padding: 44px 20px; font-size: 13.5px; }
.empty svg { width: 28px; height: 28px; stroke-width: 1.5; margin-bottom: 6px; color: var(--faint); }

/* ---------- HỘI THOẠI ---------- */
.inbox { display: grid; grid-template-columns: 330px minmax(0, 1fr) 370px; height: 100vh; }
.ib-list { border-right: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; min-height: 0; }
.ib-list-h { padding: 14px 14px 10px; display: flex; flex-direction: column; gap: 9px; border-bottom: 1px solid var(--line-2); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 5px; padding: 3px 9px; font-size: 12.5px; font-weight: 500; cursor: pointer; color: var(--muted); display: inline-flex; gap: 5px; align-items: center; }
.chip:hover { border-color: #c9d3c4; }
.chip.on { background: var(--brand-50); color: var(--brand-600); border-color: var(--brand); font-weight: 600; }
.chip .n { font-size: 11px; opacity: .8; }
.conv-items { overflow-y: auto; flex: 1; }
.conv { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line-2); cursor: pointer; position: relative; }
.conv:hover { background: var(--surface-2); }
.conv.on { background: var(--brand-50); }
.conv.on::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); }
.av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; color: #fff; flex: none; font-size: 14px; position: relative; overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av .pg { position: absolute; right: -1px; bottom: -1px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; }
.conv-m { flex: 1; min-width: 0; }
.conv-t { display: flex; align-items: center; gap: 6px; }
.conv-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.conv.unread .conv-t b { font-weight: 700; }
.conv-t time { margin-left: auto; font-size: 11.5px; color: var(--faint); flex: none; }
.conv-p { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 2px 0 4px; }
.conv.unread .conv-p { color: var(--text); font-weight: 600; }
.conv-tags { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.unread-n { background: var(--red); color: #fff; border-radius: 4px; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 5px; }

.ib-chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--bg); }
.chat-h { height: 58px; padding: 0 16px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); background: var(--surface); flex: none; }
.chat-h .t { flex: 1; min-width: 0; } .chat-h .t b { display: block; font-size: 15px; }
.msgs { flex: 1; overflow-y: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 4px; }
.day-sep { align-self: center; font-size: 11.5px; color: var(--muted); padding: 2px 10px; margin: 10px 0; }
.bub-row { display: flex; flex-direction: column; max-width: 72%; }
.bub-row.in { align-self: flex-start; } .bub-row.out { align-self: flex-end; align-items: flex-end; }
.bub { padding: 7px 11px; border-radius: 12px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; font-size: 14px; }
.in .bub { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.out .bub { background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.out.bot .bub { background: #3b4237; }
.out.system .bub { background: var(--accent-50); color: #6e4313; border: 1px solid #eedcbe; font-size: 13px; }
.bub-meta { font-size: 11px; color: var(--faint); margin: 2px 6px 6px; display: flex; gap: 6px; align-items: center; }
.bub img { max-width: 220px; border-radius: 10px; display: block; }
.suggest { margin: 0 16px 10px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: var(--radius-sm); overflow: hidden; }
.suggest-h { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-bottom: 1px solid var(--line-2); font-size: 12.5px; font-weight: 600; color: var(--muted); }
.suggest-b { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.suggest-b textarea { min-height: 44px; }
.composer { background: var(--surface); border-top: 1px solid var(--line); padding: 10px 14px 12px; flex: none; position: relative; }
.qr-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.qr-row button { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 5px; padding: 2px 8px; font-size: 12px; cursor: pointer; color: var(--muted); font-weight: 500; font-family: ui-monospace, monospace; }
.qr-row button:hover { border-color: var(--brand); color: var(--brand); }
.compose-box { display: flex; gap: 8px; align-items: flex-end; }
.compose-box textarea { flex: 1; min-height: 42px; max-height: 160px; resize: none; }
.qr-pop { position: absolute; left: 14px; right: 14px; bottom: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); max-height: 300px; overflow-y: auto; z-index: 20; }
.qr-pop div { padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--line-2); }
.qr-pop div.on, .qr-pop div:hover { background: var(--brand-50); }
.qr-pop b { color: var(--brand); margin-right: 6px; font-family: ui-monospace, monospace; font-size: 12.5px; }
.qr-pop span { color: var(--muted); font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ib-side { border-left: 1px solid var(--line); background: var(--surface); overflow-y: auto; min-height: 0; }
.side-sec { padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.side-sec h4 { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 8px; }
.cust-top { display: flex; gap: 12px; align-items: center; }
.ratio { height: 7px; border-radius: 99px; background: var(--line-2); overflow: hidden; display: flex; margin: 8px 0 4px; }
.ratio i { display: block; height: 100%; }
.item-line { display: grid; grid-template-columns: 1fr 56px 86px 26px; gap: 6px; align-items: center; margin-bottom: 6px; }
.totals { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 10px 12px; margin: 10px 0; font-size: 13px; }
.totals div { display: flex; justify-content: space-between; padding: 2px 0; }
.totals .grand { font-size: 15px; font-weight: 700; color: var(--brand-600); border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 6px; }
.mini-order { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px; cursor: pointer; }
.mini-order:hover { border-color: var(--brand); }
.no-conv { display: grid; place-items: center; height: 100%; color: var(--faint); text-align: center; }

/* ---------- BẢNG ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 9px 12px; font-weight: 500; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: flex; gap: 7px; align-items: center; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--text); font-weight: 600; border-bottom-color: var(--brand); }
.tabs .n { color: var(--faint); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.tabs button.on .n { color: var(--brand); }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.bulk { display: flex; gap: 8px; align-items: center; background: var(--ink); color: #fff; padding: 7px 10px 7px 14px; border-radius: var(--radius-sm); margin-bottom: 12px; flex-wrap: wrap; }
.bulk .btn { height: 31px; font-size: 13px; }
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--surface-2); }
.tbl tr.sel td { background: var(--brand-50); }
.tbl .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 12px; color: var(--muted); font-size: 13px; }

/* ---------- ngăn kéo / hộp thoại ---------- */
.drawer-bg, .modal-bg { position: fixed; inset: 0; background: rgba(29, 32, 27, .32); z-index: 50; animation: fade .15s; }
.drawer { position: fixed; right: 0; top: 0; bottom: 0; width: min(620px, 100vw); background: var(--surface); z-index: 51; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .18s ease-out; }
.drawer-h { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.drawer-h h2 { margin: 0; font-size: 16px; font-weight: 600; }
.drawer-b { flex: 1; overflow-y: auto; padding: 18px 20px; }
.drawer-f { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; }
.modal-bg { display: grid; place-items: center; padding: 20px; }
.modal { background: var(--surface); border-radius: 10px; box-shadow: var(--shadow-lg); width: min(560px, 100%); max-height: 90vh; display: flex; flex-direction: column; animation: pop .16s ease-out; }
.modal.wide { width: min(820px, 100%); }
.modal-h { padding: 16px 20px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; } .modal-h h3 { margin: 0; flex: 1; font-size: 15px; font-weight: 600; }
.modal-b { padding: 18px 20px; overflow-y: auto; }
.modal-f { padding: 12px 20px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 8px; }
@keyframes fade { from { opacity: 0 } } @keyframes slide { from { transform: translateX(24px); opacity: 0 } } @keyframes pop { from { transform: translateY(4px); opacity: 0 } }
.timeline { border-left: 2px solid var(--line); margin-left: 6px; padding-left: 16px; }
.timeline div { position: relative; padding-bottom: 12px; font-size: 13px; }
.timeline div::before { content: ''; position: absolute; left: -21px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--surface); border: 2px solid var(--faint); }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; font-size: 13.5px; } .kv dt { color: var(--muted); } .kv dd { margin: 0; }

#toasts { position: fixed; bottom: 18px; right: 18px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); font-weight: 500; max-width: 380px; animation: pop .16s; display: flex; gap: 9px; align-items: flex-start; }
.toast.err { background: #8a2a21; }

/* ---------- BÁO CÁO ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { padding: 16px; } .kpi .l { color: var(--muted); font-size: 12.5px; font-weight: 500; display: flex; gap: 6px; align-items: center; }
.kpi .v { font-size: 24px; font-weight: 700; letter-spacing: -.4px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.rep-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-bottom: 14px; }
.hbar { display: grid; grid-template-columns: 150px 1fr 90px; gap: 10px; align-items: center; font-size: 13px; padding: 5px 0; }
.hbar .track { height: 8px; background: var(--line-2); border-radius: 2px; overflow: hidden; } .hbar .track i { display: block; height: 100%; background: var(--brand); border-radius: 2px; }
.chart svg { width: 100%; height: 240px; display: block; }
.chart .tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; padding: 6px 10px; border-radius: 8px; font-size: 12px; white-space: nowrap; transform: translate(-50%, -110%); }

/* ---------- CHẠY THỬ ---------- */
.sim { display: grid; grid-template-columns: 400px 1fr; gap: 16px; align-items: start; }
.phone { background: #111; border-radius: 36px; padding: 12px; box-shadow: var(--shadow-lg); }
.phone-in { background: #fff; border-radius: 26px; height: 640px; display: flex; flex-direction: column; overflow: hidden; }
.phone-h { padding: 14px 16px; border-bottom: 1px solid #eee; display: flex; gap: 10px; align-items: center; }
.phone .msgs { background: #fff; padding: 14px; }
.phone .in .bub { background: #f0f0f0; border: 0; } .phone .out .bub { background: #0084ff; }
.phone .bub-row.out { align-self: flex-end; } .phone .bub-row.in { align-self: flex-start; }
.samples { display: flex; flex-wrap: wrap; gap: 6px; }
.samples button { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); padding: 5px 9px; font-size: 12.5px; cursor: pointer; text-align: left; }
.samples button:hover { border-color: var(--brand); background: var(--brand-50); }
.typing { align-self: flex-start; background: #f0f0f0; border-radius: 16px; padding: 10px 14px; display: flex; gap: 4px; }
.typing i { width: 6px; height: 6px; background: #999; border-radius: 50%; animation: blink 1.2s infinite; } .typing i:nth-child(2) { animation-delay: .2s } .typing i:nth-child(3) { animation-delay: .4s }
@keyframes blink { 50% { opacity: .2 } }

/* ---------- ĐĂNG NHẬP ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); }
.login-art { background: var(--brand-600); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; }
.login-art .logo b { color: #fff; } .login-art .logo small { color: #cfe2d5; max-width: none; }
.login-art .logo-mark { background: #fff; color: var(--brand); }
.login-art h2 { font-size: 28px; font-weight: 700; line-height: 1.25; letter-spacing: -.4px; margin: 0 0 12px; max-width: 460px; }
.login-art p { color: #d3e5d9; max-width: 440px; line-height: 1.6; margin: 0; }
.login-feat { display: grid; gap: 10px; margin-top: 24px; border-top: 1px solid rgba(255,255,255,.18); padding-top: 20px; }
.login-feat div { display: flex; gap: 10px; align-items: center; color: #e8f1eb; font-size: 13.5px; }
.login-feat svg { color: #b9d8c4; }
.login-form { display: grid; place-items: center; padding: 30px; }
.login-form form { width: min(340px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; }
.login-form h1 { font-size: 20px; font-weight: 700; margin: 0 0 4px; }

/* ---------- CÀI ĐẶT ---------- */
.set { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; align-items: start; }
#set-body { min-width: 0; }
.card-h { flex-wrap: wrap; }
.set-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; }
.set-nav button { text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 6px; font-weight: 500; color: var(--muted); cursor: pointer; display: flex; gap: 9px; align-items: center; }
.set-nav button:hover { background: var(--line-2); color: var(--text); }
.set-nav button.on { background: var(--surface); color: var(--brand-600); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.set-row { display: grid; grid-template-columns: 240px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-2); align-items: start; }
.set-row:last-child { border-bottom: 0; }
.set-row .lbl b { display: block; font-size: 13.5px; } .set-row .lbl span { color: var(--muted); font-size: 12.5px; line-height: 1.45; display: block; margin-top: 2px; }
.carrier-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; background: var(--surface); }
.carrier-card.on { border-color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
.code-box { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); padding: 8px 10px; border-radius: var(--radius-sm); font-family: ui-monospace, monospace; font-size: 12.5px; word-break: break-all; display: flex; gap: 8px; align-items: center; }
.code-box span { flex: 1; }

@media (max-width: 1280px) { .inbox { grid-template-columns: 300px minmax(0,1fr) 340px; } }
@media (max-width: 1080px) {
  :root { --side: 64px; }
  .side .logo div, .nav a span, .side-foot .who, .live span, .nav-g { display: none; }
  .nav a { justify-content: center; } .nav .badge { position: absolute; top: 2px; right: 2px; padding: 0 5px; }
  .inbox { grid-template-columns: 280px minmax(0,1fr); } .ib-side { display: none; } .inbox.show-side .ib-side { display: block; position: fixed; right: 0; top: 0; bottom: 0; width: 360px; z-index: 30; box-shadow: var(--shadow-lg); }
  .rep-grid, .sim, .set { grid-template-columns: 1fr; }
  .set-nav { position: static; flex-direction: row; overflow-x: auto; } .set-nav button { white-space: nowrap; } .login { grid-template-columns: 1fr; } .login-art { display: none; }
}
@media (max-width: 720px) {
  .shell { grid-template-columns: 1fr; } .side { position: fixed; bottom: 0; left: 0; right: 0; height: 58px; flex-direction: row; padding: 6px; z-index: 40; }
  .side .logo, .side-foot, .live, .nav-g { display: none; } .side { border-right: 0; border-top: 1px solid var(--line); background: var(--surface); } .nav { flex-direction: row; width: 100%; justify-content: space-around; overflow-x: auto; }
  .main { height: calc(100vh - 58px); } .page { padding: 16px; }
  .inbox { grid-template-columns: minmax(0, 1fr); height: calc(100vh - 58px); } .ib-list, .ib-chat { min-width: 0; }
  .nav a { padding: 8px 9px; flex: none; } .page-h h1 { font-size: 18px; } .inbox.has-conv .ib-list { display: none; } .inbox:not(.has-conv) .ib-chat { display: none; }
  .set-row, .grid3 { grid-template-columns: 1fr; }
}

/* ===================== GIAO DIỆN GỌN (kiểu Em Lo Hết / Bot Lên Đơn) — 30/11 =====================
   Menu ngang trên cùng, khung trắng bo góc, mỗi luật một dòng, nhãn trạng thái màu. */
:root { --top: 54px; --dg-bg: #f4f6fb; --dg-line: #dfe4ef; --dg-x: #2f6bff; --dg-x-50: #e9f0ff; --dg-ink: #16203a; --dg-mo: #5d6884; }
.shell.gon { display: flex; flex-direction: column; height: 100vh; background: var(--dg-bg); }
.shell.gon .main { height: auto; flex: 1; min-height: 0; overflow: auto; background: var(--dg-bg); }
.shell.gon .inbox { height: calc(100vh - var(--top)); background: var(--surface); }
.top { background: #fff; border-bottom: 1px solid var(--dg-line); flex: none; z-index: 30; }
.top-in { display: flex; align-items: center; gap: 2px; padding: 8px 16px; min-height: var(--top); flex-wrap: wrap; }
.top-logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; color: var(--dg-ink); margin-right: 14px; }
.top-logo .logo-mark { width: 28px; height: 28px; }
.top a.tab, .top button.tab { position: relative; padding: 7px 11px; border-radius: 8px; color: var(--dg-ink); font-weight: 500; font-size: 14.5px; background: none; border: 0; cursor: pointer; font-family: inherit; text-decoration: none; }
.top a.tab:hover, .top button.tab:hover { background: #f0f3fa; }
.top a.tab.on { background: var(--dg-x-50); color: #1f4fd6; font-weight: 600; }
.top .badge { position: absolute; top: 0; right: -2px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; border-radius: 9px; padding: 0 5px; line-height: 16px; }
.top .live { margin: 0 6px; }
.top-phai { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--dg-mo); font-size: 13px; }
.top-phai button { background: none; border: 0; color: var(--dg-mo); cursor: pointer; padding: 6px; border-radius: 6px; font-family: inherit; }
.top-phai button:hover { background: #f0f3fa; color: var(--dg-ink); }
.nc { position: relative; }
.nc-menu { display: none; position: absolute; top: calc(100% + 6px); left: 0; background: #fff; border: 1px solid var(--dg-line); border-radius: 10px; box-shadow: 0 12px 28px rgba(22,32,58,.14); padding: 6px; min-width: 210px; z-index: 50; }
.nc.mo .nc-menu { display: block; }
.nc-menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; color: var(--dg-ink); text-decoration: none; font-size: 14px; }
.nc-menu a:hover, .nc-menu a.on { background: var(--dg-x-50); color: #1f4fd6; }
.nc-menu svg.i { color: var(--dg-mo); }

.dg { max-width: 1180px; margin: 0 auto; padding: 18px 16px 48px; color: var(--dg-ink); font-size: 14.5px; }
.dg h1 { font-size: 24px; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dg h2 { font-size: 16px; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.dg a { color: #1f4fd6; }
.dg .the { background: #fff; border: 1px solid var(--dg-line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.dg .mo { color: var(--dg-mo); font-size: 13px; line-height: 1.5; }
.dg p.mo { margin: 0 0 10px; }
.dg .luoi { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.dg .luoi .the { margin: 0; }
.dg .so { font-size: 28px; font-weight: 700; margin-top: 2px; }
.dg .hang { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dg .tt { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; margin: 2px 2px 2px 0; }
.dg .tt.ok { background: #e1f6ec; color: #0f9d6a; } .dg .tt.canh { background: #fff0e6; color: #c2410c; }
.dg .tt.loi { background: #fde8e6; color: #c0392b; } .dg .tt.xanh { background: var(--dg-x-50); color: #1f4fd6; }
.dg .nut { display: inline-flex; align-items: center; gap: 6px; background: var(--dg-x); color: #fff; border: 1px solid var(--dg-x); border-radius: 8px; padding: 8px 14px; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; font-family: inherit; }
.dg .nut:hover { filter: brightness(.95); text-decoration: none; }
.dg .nut.phu { background: #fff; color: var(--dg-x); } .dg .nut.lon { padding: 10px 20px; font-size: 15px; }
.dg .nut:disabled { opacity: .55; cursor: default; }
.dg .dg-inp { border: 1px solid var(--dg-line); border-radius: 8px; padding: 7px 9px; font: inherit; background: #fff; color: var(--dg-ink); max-width: 100%; }
.dg .dg-inp:focus { outline: 2px solid var(--dg-x-50); border-color: var(--dg-x); }
.dg .dg-luat { display: grid; grid-template-columns: minmax(240px, 2fr) 3fr; gap: 6px 16px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--dg-line); }
.dg .dg-luat:last-child { border-bottom: 0; }
.dg .dg-sw { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; margin-right: 10px; }
.dg .dg-sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.dg .dg-sw i { width: 36px; height: 20px; border-radius: 99px; background: #c9cfdd; position: relative; transition: .2s; flex: none; }
.dg .dg-sw i:after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .2s; }
.dg .dg-sw input:checked + i { background: #22c55e; } .dg .dg-sw input:checked + i:after { left: 18px; }
.dg .dg-sw input:focus-visible + i { outline: 2px solid var(--dg-x); }
.dg .dg-chon { gap: 4px; border: 1px solid var(--dg-line); border-radius: 9px; padding: 3px; width: fit-content; }
.dg .dg-chon label { cursor: pointer; } .dg .dg-chon input { display: none; }
.dg .dg-chon span { display: inline-block; padding: 5px 11px; border-radius: 7px; font-size: 13.5px; }
.dg .dg-chon input:checked + span { background: var(--dg-x); color: #fff; font-weight: 600; }
.dg .dg-o { display: inline-flex; gap: 6px; align-items: center; margin-right: 12px; cursor: pointer; }
.dg .dg-ds { margin: 0; padding-left: 20px; line-height: 1.8; }
.dg .dg-code { background: #f3f5fa; border: 1px solid var(--dg-line); border-radius: 6px; padding: 1px 7px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.dg details.dg-them { margin-top: 6px; } .dg details.dg-them summary { cursor: pointer; color: var(--dg-mo); font-size: 13px; padding: 4px 0; }
@media (max-width: 760px) {
  .dg .dg-luat { grid-template-columns: 1fr; }
  .top-in { gap: 0; } .top a.tab, .top button.tab { padding: 6px 8px; font-size: 13.5px; } .top-logo span { display: none; }
  .shell.gon .inbox { height: calc(100vh - 96px); }
}
.top button.tab.on { background: var(--dg-x-50); color: #1f4fd6; font-weight: 600; }
/* Ảnh sản phẩm / ảnh trong mẫu câu (1/12 — học từ Pancake) */
.sp-anh { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--dg-line); display: block; background: #f3f5fa; }
.sp-anh.lon { width: 84px; height: 84px; display: inline-block; margin: 0 6px 6px 0; }
.qr-anh { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--dg-line); vertical-align: middle; margin: 3px 4px 3px 0; background: #f3f5fa; }
.qr-tach { display: inline-block; font-size: 11px; color: var(--dg-mo); background: #f0f3fa; border-radius: 4px; padding: 0 5px; margin: 0 4px; }
/* Cột trái "Nâng cao" (1/12) — luôn hiện, thay cho menu thả xuống */
.shell.gon .than { flex: 1; min-height: 0; display: flex; }
.shell.gon .than .main { flex: 1; min-width: 0; }
.cot-trai { flex: none; width: 196px; background: #fff; border-right: 1px solid var(--dg-line); padding: 12px 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.cot-tieu-de { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--dg-mo); padding: 4px 10px 8px; }
.cot-trai a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--dg-ink); text-decoration: none; font-size: 14px; white-space: nowrap; }
.cot-trai a:hover { background: #f0f3fa; }
.cot-trai a.on { background: var(--dg-x-50); color: #1f4fd6; font-weight: 600; }
.cot-trai a svg.i { color: var(--dg-mo); flex: none; }
.cot-trai a.on svg.i { color: #1f4fd6; }
.shell.gon .than .inbox { height: 100%; }
@media (max-width: 760px) {
  .shell.gon .than { flex-direction: column; }
  .cot-trai { width: auto; flex-direction: row; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--dg-line); padding: 6px 8px; }
  .cot-tieu-de { display: none; }
  .cot-trai a { padding: 6px 10px; font-size: 13px; }
}

/* 1/12: thẻ Pancake trong hội thoại — giống Pancake: hàng nút màu ngang đều ngay trên ô nhập tin */
.pk-tags { display: flex; gap: 2px; margin: 0 -14px 8px; padding: 0; }
.pk-tags:empty { display: none; }
.the-bar { flex: 1 1 0; min-width: 0; border: 0; padding: 0 6px; height: 24px; font: 600 12px/24px inherit; color: #fff; cursor: pointer;
  background: var(--c); opacity: .62; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
.the-bar:hover { opacity: .85; }
.the-bar.on { opacity: 1; box-shadow: inset 0 -3px 0 rgba(0,0,0,.28); }
.the-bar.on::before { content: ''; position: absolute; left: 5px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.the-bar.moi { flex: 0 0 28px; background: var(--line-2); color: var(--muted); opacity: 1; }
.the-bar:disabled { cursor: wait; opacity: .4; }
.conv-tags .tag[style] { font-size: 11px; }

/* 1/12: ảnh + lời bài quảng cáo khách bấm, ngay trên khung chat */
.qc-strip { display: flex; gap: 10px; align-items: flex-start; padding: 8px 14px; background: var(--accent-50); border-bottom: 1px solid var(--line-2); flex: none; }
.qc-strip img { width: 54px; height: 72px; object-fit: cover; border-radius: 6px; display: block; background: var(--line-2); }
.qc-strip .qc-txt { min-width: 0; font-size: 12.5px; line-height: 1.4; }
.qc-strip .qc-mt { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.qc-strip .qc-sp { color: var(--brand-600); }
.dg-bang img.qc-anh { width: 40px; height: 54px; object-fit: cover; border-radius: 4px; vertical-align: middle; margin-right: 6px; }

/* 1/12: khung bên phải kiểu Pancake — thẻ Thông tin | Tạo đơn, các khối Khách hàng / Sản phẩm / Thanh toán / Thông tin khác */
.po-tabs { display: flex; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.po-tabs button { flex: 1; border: 0; background: none; padding: 11px 0; font: 500 14px inherit; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.po-tabs button.on { color: #2f6fd6; border-bottom-color: #2f6fd6; }
.po { background: var(--line-2); display: flex; flex-direction: column; gap: 8px; padding-bottom: 0; min-height: calc(100% - 44px); }
.po-sec { background: var(--surface); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.po-h { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; margin-bottom: 2px; }
.po-h .i { width: 16px; height: 16px; }
.po-shop { color: #2f6fd6; font-weight: 500; font-size: 13px; }
.po-inp { width: 100%; box-sizing: border-box; border: 1px solid transparent; background: #f1f3f6; border-radius: 6px; padding: 7px 9px; font: 13px inherit; color: var(--text); }
.po-inp:focus { outline: none; border-color: #2f6fd6; background: #fff; }
.po-inp.num { text-align: right; }
.po-inp.sm { width: 52px; padding: 5px 6px; }
.po-inp:disabled { opacity: .55; }
.po-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.po-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.po-alert { margin: 2px 0 0 !important; font-size: 12.5px; }
.po-cust { display: flex; gap: 10px; align-items: center; background: #eef4fd; border-radius: 8px; padding: 8px 10px; margin-top: 2px; }
.po-phone { color: #2f6fd6; font-weight: 500; }
.po-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; }
.po-tbl th { background: #eceff4; font-weight: 600; text-align: right; padding: 6px; white-space: nowrap; }
.po-tbl th:first-child { text-align: left; }
.po-tbl td { padding: 6px; border-top: 1px solid var(--line-2); vertical-align: middle; text-align: right; }
.po-tbl td:first-child { text-align: left; }
.po-tbl td .po-inp.num:not(.sm) { width: 78px; padding: 5px 6px; }
.po-tt { font-weight: 600; white-space: nowrap; }
.po-empty { text-align: center !important; color: var(--muted); padding: 18px 0 !important; }
.po-empty .i { width: 34px; height: 34px; opacity: .45; display: block; margin: 0 auto 4px; }
.po-search { display: flex; gap: 6px; margin-top: 4px; }
.po-plus { flex: none; width: 34px; border: 0; border-radius: 6px; background: #2f6fd6; color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.po-checks { display: flex; gap: 22px; font-size: 13px; }
.po-checks label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.po-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.po-line .po-inp { width: 130px; }
.po-foot { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.po-total { display: flex; justify-content: space-between; align-items: baseline; }
.po-total b { color: #e02424; font-size: 16px; }
.po-btns { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.po-btns .btn { justify-content: center; height: 36px; }
.po-btns .btn.primary { background: #2f6fd6; border-color: #2f6fd6; }
.po-xn { display: flex; align-items: center; gap: 6px; }
/* khung tạo đơn rộng hơn như Pancake; cột tên SP rộng, ô số gọn */
.inbox { grid-template-columns: 300px minmax(0, 1fr) 410px; }
.po-tbl td:first-child { min-width: 120px; }
.po-tbl td .po-inp.sm { width: 40px; }
.po-tbl td .po-inp.num:not(.sm) { width: 70px; }
.po-tbl td:last-child, .po-tbl th:last-child { width: 22px; padding-left: 0; }
.po-tbl td .po-inp.num:not(.sm) { width: 80px; }

/* 1/12: gợi ý địa chỉ cũ ↔ mới */
.dc-goi-y { font-size: 12px; line-height: 1.45; background: #f6f8fb; border-radius: 6px; padding: 0 8px; }
.dc-goi-y:not(:empty) { padding: 6px 8px; }
.dc-goi-y .btn { margin-top: 4px; }

/* 2/12: 3 nút chế độ bot — sếp: "thiết kế gọn hơn": 1 nhóm nút viên thuốc, mô tả để ở tooltip */
.dg .dg-chedo { display: inline-flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--dg-line, #dfe3ec); border-radius: 999px; padding: 3px; background: #f4f6fa; margin: 6px 0 2px; }
.dg .dg-chedo button { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; border: 0; background: transparent;
  color: #4b5563; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: .15s; }
.dg .dg-chedo button .ic { font-size: 14px; line-height: 1; }
.dg .dg-chedo button:hover:not(.on):not(:disabled) { background: #e7ebf2; color: #111827; }
.dg .dg-chedo button:disabled { opacity: .6; cursor: wait; }
.dg .dg-chedo button.on { cursor: default; color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.dg .dg-chedo .cd-len_don.on { background: #16a34a; }
.dg .dg-chedo .cd-tra_loi.on { background: #2563eb; }
.dg .dg-chedo .cd-tat.on { background: #6b7280; }
/* mỗi trang 1 dòng: tên bên trái, nút bên phải */
.dg .dg-hang-bot { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.dg .dg-hang-bot .ten { min-width: 0; }
.dg .dg-hang-bot .ten b { font-size: 15px; }
.dg .dg-hang-bot .ten .mo { font-size: 12.5px; margin-top: 1px; }
.dg .dg-hang-bot .dg-chedo { margin: 0; }
.dg .dg-ds-bot { padding-top: 4px; padding-bottom: 4px; }
.dg .dg-ds-bot .dg-hang-bot { padding: 10px 0; border-bottom: 1px solid var(--dg-line, #eef0f5); }
.dg .dg-ds-bot .dg-hang-bot:last-child { border-bottom: 0; }
.dg .dg-tatca { border: 1px dashed #c7d2fe; background: #f8faff; padding-top: 12px; padding-bottom: 12px; }
.dg .dg-chu-giai { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: -6px 0 12px; font-size: 12.5px; color: #6b7280; }
.dg .dg-chu-giai b { color: #374151; font-weight: 600; }
@media (max-width: 640px) { .dg .dg-chedo { flex-wrap: nowrap; } .dg .dg-hang-bot .dg-chedo { width: 100%; }
  .dg .dg-chedo button { flex: 1 1 auto; justify-content: center; padding: 6px 6px; font-size: 12.5px; gap: 3px; } .dg .dg-chedo button .ic { font-size: 12px; } }

/* 2/12: Nhân viên & quyền */
.dg .nv-luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.dg .nv-q { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--dg-line); border-radius: 10px; padding: 8px 10px; cursor: pointer; background: #fff; }
.dg .nv-q:has(input:checked) { border-color: #16a34a; background: #effaf3; }
.dg .nv-q input { margin-top: 3px; width: 17px; height: 17px; flex: none; }
.dg .nv-q span { display: flex; flex-direction: column; gap: 2px; }
.dg .nv-q small { color: var(--muted); font-size: 12px; line-height: 1.35; }

.cot-trai[hidden] { display: none; }   /* 2/12: nhân viên không có mục Nâng cao nào */

/* 2/12: doanh thu dưới mỗi ô số ở Đơn POS / Tổng quan */
.dg .dp-dt { margin-top: 4px; font-size: 13.5px; color: #374151; }
.dg .dp-dt b { font-size: 16px; color: #15803d; }
