/* Meta Express – web khách hàng. Bộ nhận diện: xanh ngọc + cam nhấn, bố cục kiểu HostVN (thanh bên trắng, thẻ trắng bo tròn trên nền xám nhạt). */
:root {
  --p: #0A7C72; --p-d: #075E57; --p-l: #E6F7F5; --brand: #0FA697; --brand-soft: #2CC9B7;
  --acc: #F97316; --acc-d: #EA580C; --acc-ink: #C2410C;
  --ink: #0F2A3D; --mut: #4B6070; --line: #E2E8EE; --bg: #F4F7F9; --card: #fff;
  --ok: #15803D; --ok-l: #E7F6EC; --warn: #B45309; --warn-l: #FDF3DC; --err: #B91C1C; --err-l: #FDECEC; --info: #1D4ED8; --info-l: #E7EFFD;
  --side: 264px; --r: 16px; --shadow: 0 1px 2px rgba(15,42,61,.06), 0 4px 16px rgba(15,42,61,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.5 "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); -webkit-text-size-adjust: 100%; }
a { color: var(--p); }
h1, h2, h3 { margin: 0; font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- Form ---------- */
/* Nhãn nổi trên viền ô nhập (kiểu Material) */
label.f { display: block; position: relative; margin-top: 7px; }
label.f > span { position: absolute; top: -9px; left: 9px; z-index: 1; padding: 0 5px; background: #fff; border-radius: 4px; font-size: 12px; line-height: 18px; color: var(--mut); max-width: calc(100% - 18px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
label.f:focus-within > span { color: var(--p); }
label.f > span.red { color: var(--err); }
label.f input, label.f select, label.f textarea { padding-top: 12px; padding-bottom: 10px; min-height: 46px; }
label.f > span b { color: var(--err); font-weight: 600; }
input, select, textarea { width: 100%; padding: 9px 11px; border: 1px solid #CBD5DE; border-radius: 10px; background: #fff; min-height: 40px; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--p-l); border-color: var(--brand); }
input[type=file] { padding: 7px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.grid.g3 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 18px; min-height: 42px; border: 1px solid var(--p); border-radius: 10px; background: var(--p); color: #fff; cursor: pointer; font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--p-d); }
.btn.o { background: #fff; color: var(--p); } .btn.o:hover { background: var(--p-l); }
.btn.d { background: #fff; color: var(--err); border-color: var(--err); } .btn.d:hover { background: var(--err-l); }
.btn.s { padding: 5px 10px; min-height: 32px; font-size: 13.5px; }
.btn:disabled { opacity: .55; cursor: wait; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row > .grow { flex: 1; min-width: 220px; }
.mt { margin-top: 14px; } .mut { color: var(--mut); font-size: 13.5px; }

/* ---------- Login ---------- */
#root { min-height: 100vh; }
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--bg); }
.login .hero { background: var(--brand); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login .hero img.logo { height: 64px; align-self: flex-start; }
.login .hero h2 { font-size: 40px; line-height: 1.1; font-weight: 800; max-width: 460px; }
.login .hero p { font-size: 16px; opacity: .92; max-width: 440px; margin: 14px 0 0; }
.login .hero ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; font-size: 15px; }
.login .hero li { display: flex; gap: 10px; align-items: center; } .login .hero li:before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--acc); flex: none; }
.login .hero .cubes { position: absolute; right: -40px; bottom: -40px; width: 300px; opacity: .14; }
.login .side-form { display: grid; place-items: center; padding: 24px; }
.login .box { width: 100%; max-width: 420px; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.login .head { padding: 28px 28px 6px; }
.login .head .mark { display: none; }
.login .head h1 { font-size: 24px; font-weight: 700; } .login .head p { margin: 6px 0 0; color: var(--mut); font-size: 14px; }
.login .head p b { color: var(--acc-ink); }
.login form { padding: 18px 28px 28px; display: grid; gap: 14px; }
.login form .btn { min-height: 46px; font-size: 15.5px; }
.pw { position: relative; } .pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--mut); cursor: pointer; padding: 6px 8px; font-size: 13px; }
@media (max-width: 900px) { .login { grid-template-columns: 1fr; } .login .hero { padding: 28px 22px; } .login .hero h2 { font-size: 26px; margin-top: 18px; } .login .hero ul, .login .hero .cubes { display: none; } .login .hero img.logo { height: 44px; } }
.mark { display: inline-grid; place-items: center; }

/* ---------- Shell (kiểu HostVN) ---------- */
.shell { min-height: 100%; }
.side { position: fixed; top: 12px; bottom: 12px; left: 12px; width: var(--side); background: #fff; color: var(--ink); display: flex; flex-direction: column; z-index: 30; border-radius: var(--r); box-shadow: var(--shadow); }
.side .brand { height: 72px; display: flex; align-items: center; padding: 0 20px; border-bottom: 1px solid var(--line); }
.side .brand img { height: 34px; }
.side .qs { margin: 14px 14px 4px; position: relative; }
.side .qs input { padding-left: 36px; border-radius: 10px; background: var(--bg); border-color: var(--line); min-height: 42px; }
.side .qs span { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); display: flex; color: var(--mut); }
.side .qs svg { width: 17px; height: 17px; }
.side .qs kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font: 600 11px/1 inherit; color: var(--mut); border: 1px solid var(--line); border-radius: 6px; padding: 3px 5px; background: #fff; }
.side .grp { padding: 14px 24px 4px; font-size: 12px; font-weight: 600; color: var(--mut); text-transform: uppercase; letter-spacing: .4px; }
.side nav { padding: 6px 12px; overflow-y: auto; flex: 1; }
.side nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; margin-bottom: 2px; cursor: pointer; font-weight: 500; }
.side nav a:hover { background: var(--bg); }
.side nav a.on { color: var(--p); background: var(--p-l); font-weight: 600; }
.side nav svg, .tabbar svg { width: 20px; height: 20px; flex: none; }
.side .foot svg { width: 20px; height: 20px; flex: none; }
.side .foot { margin: 12px; padding: 12px 14px; font-size: 13px; border-radius: 12px; background: var(--p-l); color: var(--p); font-weight: 600; display: flex; gap: 8px; align-items: center; }
.side .foot small { display: block; color: var(--mut); font-weight: 400; }
.top { position: sticky; top: 0; z-index: 20; height: 76px; margin-left: calc(var(--side) + 24px); background: var(--bg); display: flex; align-items: center; gap: 14px; padding: 0 24px 0 0; }
.top .crumb { flex: 1; min-width: 0; font-size: 18px; display: flex; gap: 8px; align-items: center; white-space: nowrap; overflow: hidden; }
.top .crumb span { color: var(--mut); font-weight: 400; } .top .crumb i { color: var(--line); font-style: normal; }
.top h1 { font-size: 18px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.top .newbtn { background: var(--acc); border-color: var(--acc); color: var(--ink); font-weight: 700; border-radius: 10px; min-height: 44px; padding: 0 18px; }
.top .newbtn:hover { background: var(--acc-d); border-color: var(--acc-d); }
.top .icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; color: var(--ink); cursor: pointer; }
.top .icon-btn svg { width: 20px; height: 20px; }
.top .user { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.top .ava { width: 44px; height: 44px; border-radius: 50%; background: var(--p); color: #fff; display: grid; place-items: center; font-weight: 700; }
.top .burger { display: none; border: 0; background: none; padding: 6px; cursor: pointer; }
main { margin-left: calc(var(--side) + 24px); padding: 4px 24px 40px 0; max-width: 1320px; }
.card { background: var(--card); border: 0; border-radius: var(--r); padding: 24px; margin-bottom: 18px; box-shadow: var(--shadow); }
.card > h2 { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.tabbar { display: none; }
.scrim { display: none; }

/* ---------- Stats ---------- */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 16px; }
.stat { background: #fff; border: 0; border-radius: var(--r); padding: 18px 20px; cursor: pointer; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat:before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--brand); }
.stat:hover { box-shadow: 0 4px 14px rgba(60, 70, 140, .1); }
.stat .n { font-size: 26px; font-weight: 700; line-height: 1.2; } .stat .l { color: var(--mut); font-size: 13.5px; }
.stat.ok:before { background: var(--ok); } .stat.warn:before { background: #D97706; } .stat.err:before { background: var(--err); } .stat.info:before { background: var(--info); }
.money { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.money div { background: var(--p-l); border-radius: 12px; padding: 14px 16px; color: var(--mut); font-size: 13.5px; } .money b { display: block; font-size: 22px; color: var(--ink); font-weight: 700; }

/* ---------- Table / list ---------- */
.tw { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg); color: var(--mut); font-weight: 600; font-size: 13px; white-space: nowrap; }
tbody tr.click { cursor: pointer; } tbody tr.click:hover { background: #F7FBFA; }
td.r, th.r { text-align: right; white-space: nowrap; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 500; background: var(--p-l); color: var(--p); white-space: nowrap; }
.badge.ok { background: var(--ok-l); color: var(--ok); } .badge.warn { background: var(--warn-l); color: var(--warn); } .badge.err { background: var(--err-l); color: var(--err); } .badge.info { background: var(--info-l); color: var(--info); } .badge.gray { background: #eef0f4; color: #666; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; -webkit-overflow-scrolling: touch; }
.chips button { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 7px 14px; font-weight: 500; cursor: pointer; font-size: 13.5px; }
.chips button.on { background: var(--p); color: #fff; border-color: var(--p); }
.pager { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }
.empty { text-align: center; color: var(--mut); padding: 28px 10px; }
.alert { padding: 10px 12px; border-radius: 8px; margin-top: 12px; white-space: pre-wrap; word-break: break-word; font-size: 14px; }
.alert.ok { background: var(--ok-l); color: #17724e; } .alert.err { background: var(--err-l); color: #a83232; } .alert.warn { background: var(--warn-l); color: #8a5a12; }
.ocards { display: none; }
.ocard { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; background: #fff; cursor: pointer; }
.ocard .h { display: flex; justify-content: space-between; gap: 8px; align-items: start; margin-bottom: 4px; }
.ocard .h b { word-break: break-all; }

/* ---------- Modal / toast ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(15, 42, 61, .5); display: grid; place-items: center; padding: 14px; }
.modal .dlg { background: #fff; border-radius: var(--r); width: 100%; max-width: 620px; max-height: 92vh; overflow-y: auto; }
.modal .dh { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; }
.modal .dh h2 { flex: 1; font-size: 16px; } .modal .dh button { border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--mut); padding: 4px 8px; }
.modal .db { padding: 16px 18px; } .modal .df { padding: 12px 18px 16px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
dl.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 0; } dl.kv dt { color: var(--mut); } dl.kv dd { margin: 0; word-break: break-word; }
#toasts { position: fixed; z-index: 80; right: 16px; top: 16px; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { padding: 11px 15px; border-radius: 10px; color: #fff; background: var(--ink); box-shadow: 0 6px 20px rgba(0, 0, 0, .18); font-size: 14px; white-space: pre-wrap; }
.toast.ok { background: var(--ok); } .toast.err { background: var(--err); }

/* ---------- Điện thoại / máy tính bảng ---------- */
@media (max-width: 900px) {
  .side { transform: translateX(-110%); transition: transform .2s; width: 272px; top: 0; bottom: 0; left: 0; border-radius: 0 var(--r) var(--r) 0; }
  .shell.open .side { transform: none; }
  .shell.open .scrim { display: block; position: fixed; inset: 0; background: rgba(30, 34, 50, .45); z-index: 25; }
  .top, main { margin-left: 0; }
  .top { padding: 0 12px; height: 60px; background: #fff; border-bottom: 1px solid var(--line); } .top .crumb { font-size: 16.5px; } .top .crumb span, .top .crumb i { display: none; } .top .burger { display: block; } .top .user span, .top .newbtn, .top .icon-btn { display: none; } .top .ava { width: 36px; height: 36px; }
  main { padding: 14px 12px calc(84px + env(safe-area-inset-bottom)); }
  .card { padding: 16px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 22; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 8px 2px 7px; font-size: 11.5px; color: var(--mut); text-decoration: none; cursor: pointer; }
  .tabbar a.on { color: var(--p); }
  .tabbar a.plus span { background: var(--acc); color: var(--ink); width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; margin-top: -20px; box-shadow: 0 4px 12px rgba(249, 115, 22, .45); }
  .tabbar a.plus svg { width: 22px; height: 22px; }
  .otable { display: none; } .ocards { display: block; }
  dl.kv { grid-template-columns: 112px 1fr; }
  input, select, textarea { font-size: 16px; } /* tránh iOS tự phóng to khi gõ */
  #toasts { left: 12px; right: 12px; top: 10px; max-width: none; }
  .modal { padding: 0; align-items: end; } .modal .dlg { border-radius: 14px 14px 0 0; max-height: 94vh; }
}

/* ---------- Tạo đơn dạng tấm trượt ---------- */
.sheet { animation: sheetIn .22s ease-out; }
@keyframes sheetIn { from { transform: translateX(48px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheetbar { position: sticky; top: 62px; z-index: 15; display: flex; align-items: center; gap: 12px; margin: -4px 0 14px; padding: 10px 14px; background: var(--p); color: #fff; border-radius: 12px; box-shadow: 0 4px 14px rgba(10, 124, 114, .25); }
.sheetbar h2 { flex: 1; font-size: 17px; }
.sheetbar .x { border: 0; background: none; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; padding: 0 6px; }
.sheetbar .btn { background: #fff; color: var(--p); border-color: #fff; font-weight: 600; }
.pbadge { position: absolute; right: 8px; top: 9px; padding: 3px 10px; border-radius: 14px; font-size: 11.5px; font-weight: 700; letter-spacing: .3px; color: #fff; background: #9aa0b4; }
.pbadge.safe { background: #2fa565; } .pbadge.warn { background: #d99114; } .pbadge.danger { background: #d64545; }
.feebox { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 14px; padding: 14px; background: var(--p-l); border-radius: 12px; }
.feebox div { font-size: 13px; color: var(--mut); } .feebox b { display: block; font-size: 17px; color: var(--ink); }
.track { list-style: none; margin: 10px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.track li { position: relative; padding: 0 0 12px 10px; font-size: 13.5px; }
.track li:before { content: ""; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.track li:first-child:before { background: var(--p); }
.sheetbar { top: 76px; }
@media (max-width: 900px) { .sheetbar { top: 60px; } }
label.chk { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--mut); cursor: pointer; }
label.chk input { width: 18px; height: 18px; min-height: 0; padding: 0; }
.tkt { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 10px; }
.tmsg { margin: 6px 0; padding: 6px 10px; border-radius: 8px; background: #f3f4f8; font-size: 13.5px; }
.tmsg.employee { background: var(--p-l); }
.top .icon-btn.hide-m { }

/* ---------- Tab trạng thái kiểu J&T + thanh tác vụ dính khi cuộn ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 12px; border-bottom: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
.tabs button { flex: none; border: 0; background: var(--bg); border-radius: 10px; padding: 9px 14px; font: inherit; font-weight: 500; font-size: 14px; cursor: pointer; color: var(--ink); }
.tabs button .cnt { display: inline-block; min-width: 22px; padding: 1px 7px; margin-left: 4px; border-radius: 99px; background: #fff; font-size: 12.5px; font-weight: 600; color: var(--mut); }
.tabs button.on { background: var(--p-l); color: var(--p); font-weight: 700; box-shadow: inset 0 -3px 0 var(--p); }
.tabs button.on .cnt { background: var(--p); color: #fff; }
.sticky-bar { position: sticky; top: 76px; z-index: 15; background: var(--card); margin: -24px -24px 0; padding: 18px 24px 12px; border-radius: var(--r) var(--r) 0 0; box-shadow: 0 6px 10px -10px rgba(15, 42, 61, .35); }
.mut.sm { font-size: 12px; margin-top: 3px; }
@media (max-width: 900px) { .sticky-bar { top: 60px; } }
.btn.o.danger { color: var(--err); border-color: #f2c4c4; } .nowrap { white-space: nowrap; }
/* Lên đơn Excel – xem trước */
table.imp tr.bad td { background: #FFF7E0; }
table.imp .err-t { color: var(--err); font-size: 13px; }
.imp-sum label.chk { display: inline-flex; margin: 0 4px; gap: 4px; align-items: center; }
.imp-sum label.chk.ok { color: var(--info); } .imp-sum label.chk.err { color: var(--err); }
select.s { min-height: 34px; padding: 4px 8px; font-size: 13px; width: auto; display: inline-block; }
table.imp td.bad-cell { background: #FDE2E1 !important; box-shadow: inset 0 0 0 1px #F5A3A0; }
table.imp td .err-t { display: block; margin-top: 3px; }
label.f.bad input, label.f.bad select { border-color: var(--err) !important; background: #FFF5F5; }
label.f.bad > span { color: var(--err); }
.modal .err-t { color: var(--err); font-size: 12.5px; margin: 4px 2px 0; }
.modal .dlg.wide { max-width: 860px; }
.modal h3.mh { font-size: 15px; font-weight: 700; margin: 18px 0 10px; color: var(--p); }
.modal h3.mh:first-of-type { margin-top: 4px; }

/* ---------- Tổng quan kiểu GHN ---------- */
.ops-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.ops-head h1 { font-size: 22px; margin: 0; }
.ops-head .mut a { text-decoration: none; margin-left: 4px; }
.ops-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.ops-card { border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.ops-card .ic { width: 46px; height: 46px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-size: 22px; }
.ops-card .l { font-weight: 600; margin-top: 12px; }
.ops-card .n { font-size: 30px; font-weight: 700; margin-top: 6px; color: var(--ink); }
.ops-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rb-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rb-head .ic { width: 42px; height: 42px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-size: 20px; flex: none; }
.rb-head b { font-size: 16px; flex: 1; } .rb-head .n { font-size: 20px; font-weight: 700; color: var(--ink); }
.rb-row { display: flex; justify-content: space-between; padding: 9px 0 9px 16px; border-bottom: 1px solid var(--line); position: relative; font-size: 14px; }
.rb-row::before { content: ''; position: absolute; left: 2px; top: 15px; width: 7px; height: 7px; border-radius: 50%; background: #F4B8A0; }
.rb-row.mut::before { background: var(--line); }
.seg { display: inline-flex; gap: 8px; } .seg button { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 7px 14px; font: inherit; cursor: pointer; }
.seg button.on { border-color: var(--accent, #F97316); color: var(--accent-strong, #C2410C); font-weight: 600; }
.seg.sm { background: var(--bg); padding: 3px; border-radius: 10px; gap: 2px; } .seg.sm button { border: 0; background: transparent; padding: 6px 12px; }
.seg.sm button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.chart-wrap { overflow-x: auto; } .chart-wrap svg text { font-family: inherit; } .chart-wrap .bv { font-size: 11px; font-weight: 600; fill: var(--ink, #1f2937); } .chart-wrap .bx { font-size: 11px; fill: var(--mut); } .chart-wrap .gl { stroke: var(--line, #e5e7eb); stroke-width: 1; shape-rendering: crispEdges; } .chart-wrap rect { shape-rendering: crispEdges; } .chart-wrap .trend { stroke: #e8772e; stroke-width: 2; stroke-dasharray: 6 4; } .legend i.tl { background: none !important; border-top: 2px dashed #e8772e; height: 0 !important; width: 16px; align-self: center; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--mut); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.dn-row { display: flex; gap: 20px; align-items: center; } .dn { position: relative; width: 150px; flex: none; }
.donut { width: 150px; height: 150px; transform: rotate(-90deg); } .donut circle { fill: none; stroke-width: 14; } .donut .bg { stroke: var(--bg); }
.donut .fg { stroke-linecap: round; transition: stroke-dashoffset .6s; }
.dl { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; } .dl b { font-size: 24px; } .dl span { font-size: 12px; color: var(--mut); }
/* ---------- Dòng tiền ---------- */
.live { font-size: 13px; color: var(--accent-strong, #C2410C); border: 1px solid #F8B48A; border-radius: 99px; padding: 2px 10px; vertical-align: middle; font-weight: 600; }
.cf-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; }
.cf-main { background: linear-gradient(135deg, #FFF4E8, #fff); } .cf-big { display: inline-block; font-size: 30px; font-weight: 800; background: #F5B83D; color: #fff; border-radius: 10px; padding: 4px 14px; margin: 10px 0 14px; }
.cf-lines div { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); }
.cf-side { display: grid; gap: 16px; } .cf-blue { background: #EEF4FB; } .cf-green { background: #EAF6F1; }
.cf-mid { font-size: 24px; font-weight: 700; margin-top: 8px; } .cf-green .cf-mid { color: var(--ok); }
@media (max-width: 900px) { .ops-cards { grid-template-columns: repeat(2, 1fr); } .ops-two, .cf-grid { grid-template-columns: 1fr; } .dn-row { flex-direction: column; align-items: stretch; } .dn { margin: 0 auto; } }
/* Đăng nhập lần đầu + tài khoản ngân hàng */
.ob-wrap { min-height: 100vh; display: grid; place-items: start center; padding: 40px 16px; background: var(--bg); }
.ob-wrap .card { width: 100%; max-width: 820px; } .ob-logo { height: 34px; margin-bottom: 10px; }
.ob-qr { display: flex; gap: 16px; align-items: center; background: var(--p-l); border-radius: 12px; padding: 12px; }
.ob-qr img { width: 130px; height: 130px; background: #fff; border-radius: 8px; flex: none; }
div.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; } div.kv > div { display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 700px) { div.kv { grid-template-columns: 1fr; } .ob-qr { flex-direction: column; align-items: flex-start; } }

/* Bảng cuộn có tiêu đề dính (Dòng tiền, phiên đối soát) */
.tw.scr { max-height: 62vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.tw.scr thead th { position: sticky; top: 0; z-index: 2; background: #f4f7f9; box-shadow: 0 1px 0 var(--line); }
.cf-sum { margin: 4px 0 8px; } .cf-sum .warn { color: #b26a00; font-weight: 600; }
.badge.wait { background: #fff4e0; color: #b26a00; }

/* ================= Responsive (23/11/2026) ================= */
td, th { overflow-wrap: anywhere; }
th { overflow-wrap: normal; }
@media (min-width: 1600px) { main { max-width: 1560px; } }
@media (max-width: 1440px) and (min-width: 901px) {
  :root { --side: 232px; }
  .side nav a { padding: 10px 10px; gap: 10px; font-size: 14px; }
  .side .grp { padding: 12px 20px 4px; }
  .top { padding-right: 16px; } main { padding-right: 16px; }
  .card { padding: 20px; }
}
@media (max-width: 1280px) and (min-width: 901px) {
  .ops-cards { grid-template-columns: repeat(3, 1fr); }
  .ops-card .n { font-size: 26px; }
  .cf-grid { grid-template-columns: 1fr; }
  table { font-size: 13.5px; } th, td { padding: 8px 8px; }
}
@media (max-width: 900px) {
  .ops-card { padding: 12px; } .ops-card .n { font-size: 24px; } .ops-card .ic { width: 38px; height: 38px; font-size: 18px; }
  .ops-head h1 { font-size: 19px; }
  .cf-big { font-size: 24px; }
  .sticky-bar { margin: -16px -16px 0; padding: 12px 16px 10px; }
  .tw.scr { max-height: none; }
  .pager { justify-content: center; }
  .modal .dlg.wide { max-width: 100%; }
  .grid, .grid.g3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .grid, .grid.g3 { grid-template-columns: 1fr; }
  .ops-cards { gap: 10px; }
  .stat .n { font-size: 22px; }
  .money b { font-size: 19px; }
  .card > h2 { font-size: 16.5px; }
}

/* Chuyển trang mượt: trang mới dựng ẩn, trang cũ giữ nguyên tới khi xong */
main { position: relative; }
main .pg-next { position: absolute; left: 0; right: 0; top: 0; visibility: hidden; pointer-events: none; }
main .pg.pg-in { animation: pgIn .16s ease-out; }
main.loading > .pg:not(.pg-next) { opacity: .55; transition: opacity .2s ease .25s; pointer-events: none; }
main.loading::before { content: ''; position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 999; background: linear-gradient(90deg, transparent, var(--acc, #e8772e), transparent); background-size: 40% 100%; background-repeat: no-repeat; animation: pgBar 1s linear infinite; }
@keyframes pgIn { from { opacity: .4; } to { opacity: 1; } }
@keyframes pgBar { from { background-position: -40% 0; } to { background-position: 140% 0; } }
@media (prefers-reduced-motion: reduce) { main .pg.pg-in, main.loading::before { animation: none; } }

/* ===== Hiện đại hoá 24/11: menu thu gọn, số đếm, thẻ số liệu, gợi ý, OTP 6 ô, skeleton ===== */
.side .brand { position: relative; gap: 8px; }
.side .brand .mk { display: none; height: 30px; }
.mini-btn { margin-left: auto; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--mut); display: grid; place-items: center; cursor: pointer; transition: transform .2s, background .15s; }
.mini-btn:hover { background: var(--bg); color: var(--ink); } .mini-btn svg { width: 16px; height: 16px; }
.side, .top, main { transition: width .22s ease, margin-left .22s ease; }
.side nav a { position: relative; transition: background .15s, color .15s; }
.side nav a.on::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--p); }
.nb { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--p); color: #fff; font: 700 11px/20px inherit; text-align: center; }
.nb:empty { display: none; } .nb.w { background: var(--err); }
.sm-money { display: block; margin: 8px 12px 0; padding: 12px 14px; border-radius: 12px; background: linear-gradient(135deg, var(--p), var(--brand)); color: #fff !important; text-decoration: none; cursor: pointer; box-shadow: 0 6px 18px rgba(10,124,114,.25); transition: transform .15s; }
.sm-money:hover { transform: translateY(-2px); } .sm-money span { font-size: 12px; opacity: .85; } .sm-money b { display: block; font-size: 18px; } .sm-money small { font-size: 12px; opacity: .85; }
.side .me { margin: 10px 12px 12px; padding: 10px; border-radius: 12px; background: var(--bg); display: flex; align-items: center; gap: 10px; }
.side .me .ava { width: 36px; height: 36px; border-radius: 50%; background: var(--p); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.side .me .t { min-width: 0; flex: 1; } .side .me .t b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .side .me .t small { color: var(--mut); font-size: 12px; }
.side .me button { border: 0; background: none; color: var(--mut); cursor: pointer; padding: 6px; border-radius: 8px; } .side .me button:hover { background: #fff; color: var(--err); } .side .me svg { width: 18px; height: 18px; }
@media (min-width: 901px) {
  .shell.mini { --side: 76px; }
  .shell.mini .side .brand { padding: 0; justify-content: center; } .shell.mini .side .brand img:not(.mk) { display: none; } .shell.mini .side .brand .mk { display: block; }
  .shell.mini .mini-btn { position: absolute; right: -14px; top: 22px; transform: rotate(180deg); box-shadow: var(--shadow); }
  .shell.mini .side .qs, .shell.mini .side .grp, .shell.mini .side nav a span, .shell.mini #sideMoney, .shell.mini .side .me .t { display: none; }
  .shell.mini .side nav a { justify-content: center; padding: 12px 0; }
  .shell.mini .nb { position: absolute; top: 4px; right: 6px; min-width: 16px; height: 16px; font-size: 10px; line-height: 16px; padding: 0 4px; }
  .shell.mini .side .me { flex-direction: column; padding: 8px 0; }
}
/* Lời chào + thẻ số liệu */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 0 16px; }
.hello small { color: var(--mut); font-size: 13px; } .hello h1 { font-size: 26px; font-weight: 800; margin-top: 2px; }
.hello .btn svg { width: 18px; height: 18px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.kpi { position: relative; display: block; background: #fff; border-radius: var(--r); padding: 18px 18px 46px; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; cursor: pointer; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; min-height: 128px; }
.kpi:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(15,42,61,.06), 0 12px 28px rgba(15,42,61,.10); }
.kpi .l { font-size: 13px; color: var(--mut); font-weight: 600; } .kpi .v { font-size: 26px; font-weight: 800; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.kpi .dl { display: inline-flex; align-items: center; gap: 2px; font-size: 12.5px; font-weight: 700; padding: 2px 6px; border-radius: 6px; }
.kpi .dl svg { width: 13px; height: 13px; } .kpi .dl.up { color: #1c7a43; background: #e6f6ec; } .kpi .dl.dn { color: #b42323; background: #fdecec; }
.kpi .spk { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 38px; }
/* Gợi ý việc cần làm */
.insights { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 20px; }
.ins-t { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 700; color: var(--p); margin-right: 4px; } .ins-t svg { width: 16px; height: 16px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); font-size: 13.5px; color: var(--ink); text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.chip:hover { transform: translateY(-2px); } .chip i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--p-l); color: var(--p); font-size: 12px; }
.chip.w i { background: #fdecec; color: #b42323; } .chip.ok { cursor: default; } .chip.ok i { background: #e6f6ec; color: #1c7a43; }
/* Skeleton: khung chờ thay cho vùng trống */
.sk, #rgBody:empty, #opCards:empty, .pg:empty { background: linear-gradient(90deg, #eef1f4 25%, #f7f9fa 37%, #eef1f4 63%) !important; background-size: 400% 100% !important; animation: skel 1.3s ease infinite; border-radius: var(--r); min-height: 120px; box-shadow: none !important; }
#rgBody:empty { min-height: 240px; } #opCards:empty { min-height: 110px; } .pg:empty { min-height: 60vh; }
@keyframes skel { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
/* OTP 6 ô */
.otp-card { text-align: center; padding: 6px 4px; }
.otp-ic { width: 54px; height: 54px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; color: var(--p); background: var(--p-l); box-shadow: 0 0 0 6px rgba(10,124,114,.06); }
.otp-card h3 { font-size: 19px; font-weight: 800; margin: 4px 0; } .otp-to { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 6px; background: var(--bg); font-weight: 600; color: var(--ink); }
.otp-boxes { display: flex; justify-content: center; gap: 8px; margin: 18px 0 8px; }
.otp-boxes input { width: 48px; height: 58px; padding: 0; text-align: center; font-size: 24px; font-weight: 700; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; transition: border-color .15s, box-shadow .15s, transform .15s; }
.otp-boxes input:focus { outline: 0; border-color: var(--p); box-shadow: 0 0 0 4px rgba(10,124,114,.15); transform: translateY(-1px); }
.otp-boxes.bad input { border-color: var(--err); animation: shake .38s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.otp-err { color: var(--err); font-size: 13.5px; min-height: 20px; }
.otp-go { width: 100%; max-width: 360px; justify-content: center; margin-top: 6px; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.lnk { border: 0; background: none; color: var(--p); font-weight: 600; cursor: pointer; padding: 0; } .lnk:disabled { color: var(--mut); cursor: default; }
.otp-re { margin-top: 12px; }
@media (max-width: 1280px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .mini-btn { display: none; } .hello h1 { font-size: 21px; } .hello .btn { display: none; }
  .kpi { padding: 14px 14px 40px; min-height: 112px; } .kpi .v { font-size: 21px; } .kpi .row2 .sm { display: none; }
  .insights { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; } .chip { flex: none; }
  .otp-boxes input { width: 42px; height: 52px; font-size: 22px; } .otp-boxes { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { .kpi, .chip, .sm-money, .side, .top, main { transition: none; } .sk, #rgBody:empty, #opCards:empty, .pg:empty, .otp-boxes.bad input { animation: none; } }

/* Khai STK: ô tìm ngân hàng + vùng dán ảnh QR */
.ob-drop { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; margin: 4px 0 14px; border: 1.5px dashed var(--line); border-radius: 12px; background: var(--bg); transition: border-color .15s, background .15s; outline: 0; }
.ob-drop:focus, .ob-drop.over { border-color: var(--p); background: var(--p-l); } .ob-drop.busy { opacity: .6; pointer-events: none; }
.cbx { position: relative; } .cbx-l { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 280px; overflow-y: auto; background: #fff; border-radius: 10px; box-shadow: 0 12px 30px rgba(15,42,61,.16); padding: 4px; }
.cbx-i { display: flex; gap: 8px; align-items: baseline; padding: 8px 10px; border-radius: 8px; cursor: pointer; } .cbx-i span { color: var(--mut); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbx-i:hover, .cbx-i.on { background: var(--p-l); } .cbx-e { padding: 10px; color: var(--mut); }
.ob-qr svg { flex: none; border-radius: 8px; border: 1px solid var(--line); }
/* Form sửa đơn: trường J&T không cho sửa theo trạng thái đơn */
.f.off span { color: var(--mut); } .f.off input, .f.off select { background: #f3f5f7; color: var(--mut); cursor: not-allowed; }
.f small.mut { display: block; margin-top: 4px; font-size: 12px; }
.modal .alert.sm { margin-top: 0; font-size: 13px; }
/* Màn hình đồng ý điều khoản */
.card.consent { max-width: 460px; }
.card.consent h2 { font-size: 22px; line-height: 1.25; margin: 14px 0 6px; }
.csAgree { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink); line-height: 1.5; cursor: pointer; }
.csAgree input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--brand, #ff6a00); }
.csAgree a { color: var(--brand, #2f6df6); font-weight: 600; }
