/* Comfyso Pixel mock v2 — y chang Elevar từng nút/trạng thái. Token: apps/comfyso-pixel/spec/elevar-ui-tokens.md + đo từ ảnh
   reports/rea-elevar-ui-states-2026-10-27/<route>/_page.full.png (1440×900). gridBase 8px, fontBase 16px (body 14/24). */
:root{
  --grey1:#212B36;--grey2:#454F5A;--grey3:#647380;--grey4:#929EAA;--grey5:#C4CDD5;--grey6:#DFE3E8;--grey7:#EFF2F5;--grey8:#F4F6F8;--white:#fff;
  --purple1:#5036DD;--purple2:#5F5CE7;--purple-soft:#EBEBFD;--purple-soft2:#DCDCFB;--blue1:#4B82FB;--blue2:#3CB1FC;--blue3:#43CDE9;--blue4:#C0D3FE;
  --green:#56D138;--green-dark:#45B12B;--yellow:#FDC62E;--orange:#FC9526;--orange-soft:#FFF3E5;--red1:#E54E33;--red2:#F6C1B8;--red3:#FBE6E3;--red4:#FDF2F0;--pink:#E75CAF;
  --g:8px;--shadow-card:0 2px 6px rgba(33,43,54,.02);--shadow-dd:2px 2px 8px rgba(33,43,54,.16);--focus-ring:0 0 0 4px var(--blue4);--t:.15s ease;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:Inter,"Elevar_Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:14px;line-height:24px;color:var(--grey1);background:var(--grey7);-webkit-font-smoothing:antialiased;letter-spacing:.005em}
a{color:var(--purple2);font-weight:500;text-decoration:none;transition:color var(--t)}
a:hover{color:var(--purple1)}
button,input,textarea,select{font:inherit;color:inherit;letter-spacing:inherit}
button{cursor:pointer}
svg{flex:none}
/* ====== focus (Elevar = vòng focus mặc định của Chrome: viền xanh đậm bo góc) ====== */
[data-el]:focus,.fx:focus{outline:2px solid #1D5FD1;outline-offset:1px}
input[data-el]:focus,textarea[data-el]:focus,.input:focus{outline:none;box-shadow:0 0 0 1px var(--blue1),var(--focus-ring);background:#fff}
/* ====== typography ====== */
.h1{font-weight:600;font-size:20px;line-height:32px;color:var(--grey1)}
.h2{font-weight:600;font-size:18px;line-height:28px}
.h{font-weight:600;font-size:16px;line-height:24px;color:var(--grey1)}
.hs{font-weight:600;font-size:14px;line-height:24px}
.body{color:var(--grey2)}.muted{color:var(--grey3)}.faint{color:var(--grey4)}.small{font-size:12px;line-height:20px}.xs{font-size:11px;line-height:16px}
.caps{font-size:12px;line-height:16px;letter-spacing:.12em;text-transform:uppercase;font-weight:600;color:var(--grey3)}
.b{font-weight:600}.m{font-weight:500}.center{text-align:center}.nowrap{white-space:nowrap}
.row{display:flex;align-items:center;gap:12px}.row.g4{gap:4px}.row.g8{gap:8px}.row.g16{gap:16px}.row.g24{gap:24px}
.spread{display:flex;align-items:center;justify-content:space-between;gap:12px}
.col{display:flex;flex-direction:column}
.grow{flex:1;min-width:0}
.divider{height:1px;background:var(--grey6);margin:24px 0}
.mt8{margin-top:8px}.mt16{margin-top:16px}.mt24{margin-top:24px}.mt32{margin-top:32px}.mb8{margin-bottom:8px}.mb16{margin-bottom:16px}.mb24{margin-bottom:24px}
/* ====== layout ====== */
.layout{display:grid;grid-template-columns:280px minmax(0,1fr);min-height:100vh}
.side{background:var(--white);border-right:1px solid var(--grey6);display:flex;flex-direction:column;position:sticky;top:0;height:100vh;z-index:5}
.side-head{display:flex;align-items:center;gap:16px;height:80px;padding:0 24px;border-bottom:1px solid var(--grey6);color:inherit;font-weight:400}
.side-head:hover{background:var(--grey8);color:inherit}
.sq{width:32px;height:32px;border-radius:2px;background:var(--grey6);display:grid;place-items:center;color:var(--grey3);flex:none}
.side-head .co{font-size:12px;line-height:16px;color:var(--grey3)}.side-head .site{font-weight:500;line-height:20px;color:var(--grey1)}
.nav{padding:16px 16px 0;flex:1;overflow:auto}
.nav-group{margin-bottom:20px}
.nav-label{font-size:12px;letter-spacing:.1em;text-transform:uppercase;color:var(--grey4);font-weight:600;padding:12px 16px 8px;line-height:16px}
.nav-item{display:flex;align-items:center;gap:8px;height:36px;margin-bottom:4px;padding:0 16px;border-radius:4px;color:var(--grey1);font-weight:400;cursor:pointer;background:none;border:0;width:100%;text-align:left;transition:background var(--t),color var(--t)}
.nav-item:hover{background:var(--grey8);color:var(--grey1)}
.nav-item.active{background:var(--grey8);color:var(--blue1)}
.nav-item.active:hover{background:var(--grey7);color:var(--blue1)}
.nav-item svg{width:24px;height:24px;color:var(--grey2)}.nav-item.active svg{color:var(--blue1)}
.nav-item .chev{margin-left:auto;width:16px;height:16px}
.nav-item.sub{padding-left:16px;height:36px}
.nav-back{display:flex;align-items:center;gap:8px;height:40px;padding:0 16px;width:100%;border:0;background:none;border-radius:4px;color:var(--grey2);text-align:left}
.nav-back:hover{background:var(--grey8)}
.nav-back .bk{width:24px;height:24px;border-radius:2px;background:var(--grey7);display:grid;place-items:center}
.nav-title{font-weight:600;font-size:16px;padding:16px 16px 12px}
.side-foot{border-top:1px solid var(--grey6);height:80px;padding:0 24px;display:flex;align-items:center;position:relative}
.user-btn{display:flex;align-items:center;gap:12px;border:0;background:none;padding:0 6px 0 0;border-radius:4px;color:var(--grey2);height:36px}
.user-btn:hover{color:var(--grey1);background:var(--grey8)}
.avatar{width:32px;height:32px;border-radius:2px;background:var(--grey6);display:grid;place-items:center;color:var(--grey3);flex:none}
.content{min-height:100vh;padding:24px 32px 48px;min-width:0}
.page-head{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:44px;margin-bottom:20px}
.page-head .h1 svg{color:var(--grey4)}
.banner{background:#D7E0FB;border:1px solid var(--blue4);border-radius:4px;padding:6px 20px;margin-bottom:24px;color:var(--grey1)}
.banner b{font-weight:500;margin-right:12px}
.card{background:var(--white);border-radius:4px;box-shadow:var(--shadow-card);padding:24px}
.card.p0{padding:0}
.card+.card{margin-top:16px}
.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
/* ====== buttons ====== */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;padding:0 16px;border-radius:4px;border:0;font-weight:500;line-height:24px;white-space:nowrap;transition:background var(--t),color var(--t),box-shadow var(--t),border-color var(--t)}
.btn.sm{height:32px;padding:0 12px}
.btn.primary{background:var(--purple2);color:#fff}.btn.primary:hover{background:var(--purple1)}
.btn.soft{background:var(--purple-soft);color:var(--purple2)}.btn.soft:hover{background:var(--purple-soft2);color:var(--purple1)}
.btn.white{background:var(--white);color:var(--purple2)}.btn.white:hover{background:var(--grey8);color:var(--purple1)}
.btn.danger{background:var(--red1);color:#fff}.btn.danger:hover{background:#C9402A}
.btn.blue{background:var(--blue1);color:#fff}.btn.blue:hover{background:#3570EE}
.btn.link{background:none;color:var(--purple2);padding:0;height:auto}.btn.link:hover{color:var(--purple1);text-decoration:underline}
.btn.ghost{background:none;color:var(--grey2);padding:0 8px}.btn.ghost:hover{background:var(--grey8);color:var(--grey1)}
.btn:disabled,.btn.primary:disabled,.btn.soft:disabled{background:var(--grey5);color:#fff;cursor:not-allowed}
.btn.danger:disabled{background:#EEA597;color:#fff}
.btn:disabled:hover{background:#B5BFC9}.btn.danger:disabled:hover{background:#E8968A}
.btn .cnt{width:20px;height:20px;border-radius:50%;border:1.5px solid rgba(255,255,255,.85);display:grid;place-items:center;font-size:12px;line-height:1}
.icon-btn{width:32px;height:32px;border-radius:4px;border:0;background:var(--white);display:grid;place-items:center;color:var(--grey3);transition:background var(--t),color var(--t)}
.icon-btn:hover{background:var(--grey6);color:var(--grey1)}
.icon-btn.bordered{border:1px solid var(--grey6)}
.icon-btn.plain{background:none}.icon-btn.plain:hover{background:var(--grey7)}
.lnk{display:inline-flex;align-items:center;gap:8px;color:var(--purple2);font-weight:500;background:none;border:0;padding:0;cursor:pointer;border-radius:2px;transition:color var(--t)}
.lnk:hover{color:var(--purple1);text-decoration:underline}
.lnk.grey{color:var(--grey2);font-weight:400}.lnk.grey:hover{color:var(--grey1)}
.lnk.red{color:var(--red1)}
.back{display:inline-flex;align-items:center;gap:8px;color:var(--grey2);font-weight:400;border-radius:4px;padding-right:8px}
.back .bk{width:24px;height:24px;border-radius:2px;background:#fff;display:grid;place-items:center;transition:background var(--t)}
.back:hover{color:var(--grey1)}.back:hover .bk{background:var(--grey6)}
/* ====== tags ====== */
.tag{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border-radius:4px;font-size:14px;font-weight:500;line-height:20px;white-space:nowrap;border:0}
.tag.green{background:var(--green);color:#fff}.tag.orange{background:var(--orange);color:#fff}.tag.grey{background:var(--grey5);color:#fff}.tag.red{background:var(--red1);color:#fff}
.tag.beta{height:28px;background:var(--grey5);color:#fff;font-size:13px;padding:0 8px}
.tag.sm{height:20px;font-size:12px;padding:0 6px}
.tag.soft-orange{background:var(--orange-soft);color:var(--orange);font-size:12px;height:24px}
.tag.soft-green{background:#EAF8E6;color:var(--green-dark);font-size:12px;letter-spacing:.08em;height:24px}
.tag.soft-purple{background:var(--purple-soft);color:var(--purple2);font-size:12px;letter-spacing:.08em;height:24px}
button.tag{cursor:pointer;transition:filter var(--t),box-shadow var(--t)}button.tag:hover{filter:brightness(.94)}
.pill{display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:11px;font-size:12px;font-weight:500}
.pill.sent{background:#EAF8E6;color:var(--green-dark)}.pill.queued{background:#E8F0FE;color:var(--blue1)}.pill.ignored{background:var(--grey7);color:var(--grey3)}.pill.error{background:var(--red3);color:var(--red1)}
/* ====== inputs ====== */
.input{width:100%;height:40px;border:0;border-radius:4px;background:var(--grey8);padding:0 12px;color:var(--grey1);transition:box-shadow var(--t),background var(--t)}
.input::placeholder{color:var(--grey4)}
.input:hover{background:var(--grey7)}
.input.invalid{box-shadow:0 0 0 1px var(--red1)}
.input.ring{background:#fff;box-shadow:0 0 0 1px var(--blue1),var(--focus-ring)}.input.ring:hover{background:var(--grey8)}
.input.bare{background:none;padding:0 4px;height:32px}.input.bare:hover{background:var(--grey8)}
.sel .x:hover{background:var(--grey6)!important;color:var(--grey1)!important}
.alert-red a:hover{color:#B53A24!important;text-decoration:underline}
textarea.input{height:auto;min-height:64px;padding:8px 12px;resize:vertical}
.field{margin-top:16px}.field>label,.lbl{display:block;color:var(--grey2);margin-bottom:8px}
.field-err{color:var(--red1);font-size:12px;line-height:20px;margin-top:4px}
.sel{position:relative}.sel .input{padding-right:36px}.sel>svg{position:absolute;right:12px;top:12px;color:var(--grey3);pointer-events:none}
.srch{height:24px;font-size:12px;padding:0 8px;background:var(--grey8);border:0;border-radius:2px;width:100%;transition:background var(--t),box-shadow var(--t)}
.srch:hover{background:var(--grey7)}
.srch-wrap{position:relative}.srch-wrap .x{position:absolute;right:4px;top:2px;width:20px;height:20px;border:0;background:none;display:grid;place-items:center;color:var(--grey1);border-radius:2px}
.srch-wrap .x:hover{background:var(--grey6)}
.radio{display:flex;align-items:center;gap:12px;cursor:pointer;color:var(--grey1);padding:8px 12px;border-radius:4px}
.radio:hover{background:var(--grey8)}
.radio i{width:16px;height:16px;border-radius:50%;border:1px solid var(--grey5);background:#fff;flex:none}
.radio.on i{border:4px solid var(--blue1)}
.radio.dis{color:var(--grey4);cursor:not-allowed}.radio.dis i{opacity:.6}
.chk{display:flex;align-items:center;gap:12px;cursor:pointer;padding:6px 8px;border-radius:4px;color:var(--grey1)}
.chk:hover{background:var(--grey8)}
.chk i{width:16px;height:16px;border-radius:3px;border:1px solid var(--grey5);background:#fff;display:grid;place-items:center;flex:none;color:#fff}
.chk.on i{background:var(--blue1);border-color:var(--blue1)}
.toggle{width:36px;height:20px;border-radius:10px;background:var(--grey5);position:relative;border:0;flex:none;transition:background var(--t)}
.toggle::after{content:"";position:absolute;left:2px;top:2px;width:16px;height:16px;border-radius:50%;background:#fff;transition:left var(--t)}
.toggle.on{background:var(--purple2)}.toggle.on::after{left:18px}
.toggle:hover{box-shadow:0 0 0 3px var(--purple-soft)}
.seg{display:flex;border-radius:4px;background:var(--grey8)}
.seg button{flex:1;height:40px;border:1px solid transparent;background:none;color:var(--grey3);border-radius:4px;transition:color var(--t),border-color var(--t),background var(--t)}
.seg button:hover{color:var(--grey1);background:var(--grey7)}
.seg button.on{border-color:var(--blue1);color:var(--blue1);background:#fff}
.seg button.on:hover{color:#2F66E0;border-color:#2F66E0;background:#F7F9FF}
/* ====== dropdown select (Last 24 Hours / All / By Category) ====== */
.dd{display:inline-flex;align-items:center;justify-content:space-between;gap:12px;height:40px;min-width:160px;padding:0 12px;border-radius:4px;border:0;background:#fff;color:var(--grey1);transition:box-shadow var(--t),background var(--t)}
.dd:hover{box-shadow:0 0 0 1px var(--grey5)}
.dd.grey{background:var(--grey8)}.dd.grey:hover{background:var(--grey7)}
.dd svg{color:var(--grey3)}
.pop{position:absolute;z-index:40;background:#fff;border-radius:4px;box-shadow:var(--shadow-dd);border:1px solid var(--grey6);padding:4px 0;min-width:160px}
.pop .opt{display:flex;align-items:center;gap:10px;width:100%;padding:8px 16px;border:0;background:none;text-align:left;color:var(--grey1);list-style:none;cursor:pointer;transition:background var(--t)}
.pop .opt:hover{background:var(--grey8)}
.pop .opt.sel-on{color:var(--blue1)}
.pop .opt.dis{color:var(--grey4)}
.pop .sep{height:1px;background:var(--grey6);margin:6px 8px}
.pop .cap{padding:8px 12px 4px}
.anchor{position:relative;display:inline-block}
/* ====== tabs ====== */
.tabs{display:flex;gap:32px;border-bottom:1px solid var(--grey6);margin-bottom:24px}
.tabs .tab{padding:0 0 6px;border:0;background:none;color:var(--grey4);font-weight:500;border-bottom:1px solid transparent;margin-bottom:-1px;transition:color var(--t),border-color var(--t)}
.tabs .tab:hover{color:var(--grey2)}
.tabs .tab.active{color:var(--blue1);border-bottom-color:var(--blue1)}
.tabs .tab.active:hover{color:#2F66E0;border-bottom-color:#2F66E0}
/* ====== tables ====== */
.tbl-card{background:#fff;border-radius:4px;overflow:hidden}
.tbl-bar{display:flex;align-items:center;justify-content:space-between;height:56px;padding:0 24px;border-bottom:1px solid var(--grey6)}
.filt{display:inline-flex;align-items:center;gap:8px;color:var(--grey2);background:none;border:0;padding:4px 6px 4px 0;border-radius:4px;transition:color var(--t),background var(--t)}
.filt:hover{color:var(--grey1);background:var(--grey8)}
.reset{border:0;background:none;color:var(--grey4);font-size:12px;font-weight:600;letter-spacing:.1em;margin-left:24px;padding:2px 6px;border-radius:2px;transition:color var(--t),background var(--t)}
.reset:hover{color:var(--grey2);background:var(--grey8)}
.scroll-x{overflow-x:auto}
table.t{border-collapse:collapse;width:100%;min-width:max-content}
table.t th{text-align:left;font-weight:500;color:var(--grey1);padding:20px 12px 4px;white-space:nowrap;vertical-align:bottom}
table.t th:first-child,table.t td:first-child{padding-left:24px}
table.t .srow td{padding:4px 12px 12px;border-bottom:1px solid var(--grey6)}
table.t .srow td:first-child{padding-left:24px}
table.t td{padding:12px;border-bottom:1px solid var(--grey6);vertical-align:top;white-space:nowrap}
table.t td.wrap{white-space:normal;min-width:220px;max-width:240px}
table.t td.num,table.t th.num{text-align:right}
.th-btn{border:0;background:none;padding:2px 4px;margin-left:-4px;font-weight:500;color:var(--grey1);display:inline-flex;align-items:center;gap:6px;border-radius:2px;transition:background var(--t),color var(--t)}
.th-btn:hover{background:var(--grey8);color:var(--purple2)}
.th-btn .arr{color:var(--grey4);font-size:10px}
.cell{border:1px solid transparent;background:none;padding:6px 11px;margin:-6px 0;border-radius:4px;text-align:left;color:var(--grey1);min-height:36px;min-width:24px;position:relative;white-space:inherit;line-height:20px;transition:background var(--t),border-color var(--t)}
.cell:hover{background:#fff;border-color:var(--grey6);box-shadow:0 1px 3px rgba(33,43,54,.06)}
.cell.empty{display:block;width:100%}
tr.hl td{background:var(--grey8)}
.tfoot{text-align:center;color:var(--grey3);padding:16px}
.cmt{width:100%;min-width:200px;height:62px;margin:-8px 0;border:0;border-radius:4px;background:var(--grey8);resize:none;padding:8px;transition:background var(--t),box-shadow var(--t)}
.cmt:hover{background:var(--grey7)}
/* ====== tooltip (data-tip) ====== */
[data-tip]{position:relative}
.tipbox{position:fixed;z-index:200;background:var(--grey1);color:#fff;font-size:12px;line-height:18px;padding:4px 8px;border-radius:4px;max-width:280px;pointer-events:none;white-space:normal}
/* ====== overlay / drawer / modal ====== */
.overlay{position:fixed;inset:0;background:rgba(69,79,90,.4);z-index:50}
.overlay.content-only{left:280px}
.drawer{position:fixed;top:0;right:0;bottom:0;width:400px;background:#fff;z-index:60;padding:24px 32px;overflow:auto;box-shadow:-2px 0 8px rgba(33,43,54,.08)}
.drawer.wide{width:440px}
.drawer .close{margin-bottom:24px}
.modal{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:384px;background:#fff;border-radius:4px;z-index:60;padding:32px;box-shadow:0 8px 24px rgba(33,43,54,.12)}
.modal.wide{width:500px}
.modal .mbtns{display:flex;gap:8px;margin-top:24px}.modal .mbtns>*{flex:1}
.toasts{position:fixed;top:24px;left:50%;transform:translateX(-50%);z-index:300;display:flex;flex-direction:column;gap:8px;align-items:center}
.toast{display:flex;align-items:center;gap:10px;background:var(--grey1);color:#fff;padding:10px 16px;border-radius:4px;box-shadow:var(--shadow-dd);font-weight:500}
.toast.ok svg{color:var(--green)}.toast.err{background:var(--red1)}
.alert{display:flex;align-items:flex-start;gap:12px;background:var(--red4);color:var(--red1);border-radius:4px;padding:12px 16px}
.alert.warn{background:var(--orange-soft);color:var(--orange)}
.alert-red{background:#EFE0E0;color:var(--red1);border-radius:4px;padding:12px 16px}
/* ====== spinner / empty / error ====== */
.cp-spinner{width:20px;height:20px;border:1.5px solid var(--grey5);border-top-color:transparent;border-radius:50%;animation:spin .8s linear infinite;display:inline-block}
.cp-spinner.lg{width:40px;height:40px;border-width:3px}
@keyframes spin{to{transform:rotate(360deg)}}
.page-loading{position:fixed;inset:0;background:#fff;display:grid;place-items:center;z-index:20}
.state-box{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:96px 24px;color:var(--grey1)}
.state-box .small{color:var(--grey1)}
.state-box svg{color:var(--grey2)}
.empty-ill{width:280px;height:200px;margin-bottom:24px}
/* ====== My Tracking hub ====== */
.hub{display:grid;grid-template-columns:436px 1fr 436px;align-items:start}
.hub .colh{display:flex;align-items:center;gap:8px;height:40px;margin-bottom:14px}
.hub .colh .caps{color:var(--grey1);letter-spacing:.14em}
.src-card{display:flex;align-items:center;justify-content:space-between;height:76px;padding:0 24px;background:#fff;border-radius:4px;margin-bottom:16px;color:var(--grey1);font-weight:600;font-size:16px;transition:box-shadow var(--t)}
.src-card:hover{box-shadow:0 0 0 1px var(--grey5);color:var(--grey1)}
.dst-card{display:block;background:#fff;border-radius:4px;padding:24px;margin-bottom:16px;color:var(--grey1);font-weight:400;transition:box-shadow var(--t)}
.dst-card:hover{box-shadow:0 0 0 1px var(--grey5);color:var(--grey1)}
.dst-card .nm{font-weight:600;font-size:16px}
.hub-mid{position:relative;height:240px}
.hub-logo{position:absolute;left:50%;top:-10px;transform:translateX(-50%);width:96px;height:96px;border-radius:50%;background:#E0DFFA;display:grid;place-items:center}
.hub-logo b{width:72px;height:72px;border-radius:50%;background:var(--purple2);color:#fff;display:grid;place-items:center;font-size:24px;font-weight:700;letter-spacing:.02em}
.ln{position:absolute;background:var(--green)}
.cat-item{display:flex;align-items:flex-start;gap:12px;padding:8px 12px;margin:0 -12px;border-radius:4px;color:var(--grey1);font-weight:400;transition:background var(--t)}
.cat-item:hover{background:var(--grey8);color:var(--grey1)}
.cat-item.off{color:var(--grey4)}.cat-item.off .ic{opacity:.45}
.cat-item .small{color:var(--grey2)}.cat-item.off .small{color:var(--grey4)}
.ic{width:24px;height:24px;display:grid;place-items:center;flex:none}
.ic svg{width:24px;height:24px}
/* ====== destination wizard ====== */
.wz{display:grid;grid-template-columns:400px 1fr;gap:32px;align-items:start}
.steps .st{display:flex;align-items:center;gap:12px;height:44px;padding:0 12px;margin:0 -12px 8px;border-radius:4px;position:relative;cursor:pointer;color:var(--grey1);font-weight:500;width:calc(100% + 24px);border:0;background:none;text-align:left;transition:background var(--t)}
.steps .st:hover{background:var(--grey8)}
.steps .st.active{background:var(--grey7)}
.steps .dot{width:20px;height:20px;border-radius:50%;background:var(--purple2);color:#fff;display:grid;place-items:center;position:relative;z-index:1}
.steps .dot.todo{background:#fff;border:2px solid var(--grey5)}
.steps .dot.cur{background:#fff;border:6px solid var(--purple2)}
.steps .st:not(:last-child) .dot::after{content:"";position:absolute;left:8px;top:20px;width:2px;height:32px;background:var(--purple2)}
.steps .st:not(:last-child) .dot.todo::after{background:var(--grey5);left:7px;top:18px}
.need-help{display:flex;align-items:center;gap:12px;border-top:1px solid var(--grey6);margin-top:16px;padding-top:16px}
.faces{display:flex}.faces i{width:32px;height:32px;border-radius:50%;border:2px solid #fff;background:linear-gradient(135deg,#C98B6B,#6B4A3A);display:block}.faces i+i{margin-left:-8px;background:linear-gradient(135deg,#E3C3A5,#5B5B5B)}
.cfg-line{display:flex;align-items:center;gap:16px;margin-top:16px;color:var(--grey3)}
.cfg-line b{color:var(--grey1);font-weight:600}
.cfg-line svg{color:var(--green)}
.wz-head{margin:9px 0 19px;min-height:40px}
.kv{display:grid;grid-template-columns:auto 1fr;gap:4px 8px;font-size:12px;line-height:20px;color:var(--grey3)}.kv dd{margin:0;color:var(--grey1)}.kv dt{white-space:nowrap}
.accordion-h{display:inline-flex;align-items:center;gap:8px;border:0;background:none;padding:2px 4px;margin-left:-4px;color:var(--grey1);border-radius:2px;transition:background var(--t),color var(--t)}
.accordion-h:hover{background:var(--grey8);color:var(--purple2)}
.adv{display:block;border:0;background:none;padding:2px 4px;margin-left:-4px;text-align:left;border-radius:2px;transition:background var(--t)}
.adv:hover{background:var(--grey8)}
.adv .t{display:flex;align-items:center;gap:8px;color:var(--grey1)}
.evt{display:flex;align-items:center;justify-content:space-between;padding:12px 0;border-bottom:1px solid var(--grey7)}
/* ====== hover helpers for block links ====== */
.card-link{display:block;color:inherit;font-weight:400;transition:box-shadow var(--t),background var(--t)}
.card-link:hover{color:inherit;box-shadow:0 0 0 1px var(--grey5)}
.card-link.row{display:flex}
.tile{display:block;background:#fff;border-radius:4px;padding:24px;min-height:156px}
.upd{padding:24px;border-bottom:1px solid var(--grey6)}.upd:last-child{border-bottom:0}
.new{color:var(--green);font-size:12px;font-weight:600;letter-spacing:.1em}
/* ====== charts ====== */
.chart svg{display:block;width:100%}
.ring{width:160px;height:160px;border-radius:50%;display:grid;place-items:center}
.ring .in{width:136px;height:136px;border-radius:50%;background:#fff;display:grid;place-items:center;text-align:center}
.bar{height:4px;background:var(--grey7);border-radius:2px;margin-top:12px;overflow:hidden}.bar>div{height:100%;background:var(--purple2);border-radius:2px}
/* ====== real-time ====== */
.flow{display:flex;align-items:center;padding:0 28px;margin-bottom:48px}
.store{width:234px;height:188px;border-radius:12px;background:#E9ECF0;padding:12px}
.store .win{background:#fff;border-radius:6px;height:100%;padding:12px;position:relative}
.dots{display:flex;gap:6px;margin:-4px 0 8px}.dots i{width:8px;height:8px;border-radius:50%;background:#F26B5B}.dots i:nth-child(2){background:#F6C344}.dots i:nth-child(3){background:#5BC468}
.acc-row{cursor:pointer}
.acc-btn{border:0;background:none;display:flex;align-items:center;gap:16px;width:100%;text-align:left;padding:0;color:var(--grey1);border-radius:2px;transition:background var(--t)}
.acc-btn:hover{background:var(--grey8)}
.acc-btn .chevd{color:var(--purple2);transition:transform var(--t)}
.acc-btn.open .chevd{transform:rotate(180deg)}
.detail{background:#F8F9FB;padding:12px 24px 24px 56px}
.detail .dl{display:flex;gap:8px;line-height:32px}.detail .dh{margin:16px 0 4px;color:var(--grey3)}
/* ====== company settings ====== */
.cmp{width:500px;margin:0 auto;padding:40px 0 64px}
.cmp .head{display:flex;justify-content:space-between;align-items:flex-start}
/* ====== pre-built tags ====== */
.ptag{display:flex;flex-direction:column;background:#fff;border-radius:4px;color:var(--grey1);font-weight:400;transition:box-shadow var(--t)}
.ptag:hover{box-shadow:0 0 0 1px var(--grey5);color:var(--grey1)}
.ptag .bd{padding:24px;flex:1}.ptag .ft{border-top:1px solid var(--grey6);padding:14px 24px;color:var(--grey2)}
.ptag .cat{font-size:12px;letter-spacing:.1em;color:var(--grey4);font-weight:600}
/* ====== support ====== */
.sup{display:block;text-align:center;padding:40px 48px;background:#fff;border-radius:4px;color:var(--grey1);font-weight:400;transition:box-shadow var(--t)}
.sup:hover{box-shadow:0 0 0 1px var(--grey5);color:var(--grey1)}
.art{display:flex;align-items:center;justify-content:space-between;padding:12px 0;border-bottom:1px solid var(--grey7);color:var(--grey1);font-weight:400}
.art:hover{color:var(--purple2)}
/* ====== feature tips popover ====== */
.tips{position:absolute;right:0;top:52px;width:400px;background:#fff;border-radius:4px;box-shadow:var(--shadow-dd);z-index:45;padding:24px}
.tips .shot{height:240px;border-radius:4px;background:linear-gradient(180deg,#F7F8FA,#EEF1F5);border:1px solid var(--grey6);margin:16px 0 24px;display:grid;place-items:center;color:var(--grey4)}
/* ====== debug bar (không thuộc UI Elevar) ====== */
#cp-debug{position:fixed;left:292px;bottom:12px;z-index:1000;background:#111827;color:#E5E7EB;border-radius:8px;padding:8px 10px;font:12px/16px ui-monospace,Menlo,monospace;box-shadow:0 4px 16px rgba(0,0,0,.25);display:flex;align-items:center;gap:6px;flex-wrap:wrap;max-width:560px}
#cp-debug .dbg-b{background:#374151;color:#E5E7EB;border:0;border-radius:4px;padding:3px 7px;font:inherit;cursor:pointer}
#cp-debug .dbg-b.on{background:#5F5CE7;color:#fff}
#cp-debug .dbg-l{color:#9CA3AF}
#cp-debug.min{padding:4px 8px}
#cp-debug .dbg-br{flex-basis:100%;height:0}
/* ====== lượt 2: wizard theo ảnh thật ====== */
.wz-right>.card+.card{margin-top:4px}
.wz-next{margin-top:4px}
.wz-title{border:0;background:none;padding:0 4px;border-radius:4px;color:var(--grey1);gap:12px}
.wz-title:hover{background:var(--grey6)}
.wzs .st{margin-bottom:8px}
.wzs .st.locked{color:var(--grey4);cursor:default}.wzs .st.locked:hover{background:none}
.wzs .ic.home{color:var(--grey3)}
.wzs .dot.next{background:#fff;border:0}.wzs .dot.next b{width:8px;height:8px;border-radius:50%;background:var(--purple2);display:block}
.wzs .dot.lock{background:var(--grey7);border:0}
.wzs .st:not(:last-child) .dot::after{background:var(--grey6);left:9px;top:20px;width:2px}
.wzs .st:not(:last-child) .dot.ln-on::after{background:var(--purple2)}
.wzs .st:not(:last-child) .dot.next::after,.wzs .st:not(:last-child) .dot.lock::after{left:9px;top:20px}
.opt-row{margin:0}.opt-row .radio{padding:8px 12px}.opt-row .radio.on{background:var(--grey8)}
.tag.rec{background:#EAF8E6;color:var(--green);height:24px;font-size:14px;font-weight:500;padding:0 8px}
.adv-body{max-width:560px}
.cs{display:flex;align-items:center;height:40px;background:var(--grey8);border-radius:4px;transition:background var(--t),box-shadow var(--t)}
.cs:hover{background:var(--grey7)}.cs.dis,.cs.dis:hover{background:var(--grey8)}
.cs-btn{flex:1;height:100%;border:0;background:none;text-align:left;padding:0 12px;color:var(--grey1);border-radius:4px}
.cs-btn:focus{outline:none;box-shadow:0 0 0 1px var(--blue1),var(--focus-ring);background:#fff}
.cs-btn:disabled{color:var(--grey4);cursor:not-allowed}
.cs-sep{width:1px;align-self:stretch;margin:8px 0}
.cs-ind{width:36px;display:grid;place-items:center;color:var(--grey3)}.cs-ind svg{width:16px;height:16px}
.cs.dis .cs-ind{color:var(--grey5)}
.cbx-row{display:flex;align-items:center;gap:12px;padding:8px 12px;margin:0 -12px;border-radius:4px;cursor:pointer;color:var(--grey1)}
.cbx-row:hover{background:var(--grey8)}.cbx-row.dis{cursor:default}.cbx-row.dis:hover{background:none}
.cbx{width:16px;height:16px;border-radius:3px;border:1px solid var(--grey5);background:#fff;display:grid;place-items:center;flex:none;color:#fff;transition:background var(--t),border-color var(--t)}
.cbx.on{background:var(--blue1);border-color:var(--blue1)}.cbx.on.dis{background:#A9C2FD;border-color:#A9C2FD}.cbx.dis{background:#fff}
.cbx:focus{outline:none;box-shadow:var(--focus-ring)}
.cust-col{display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.cnt-b{background:var(--purple2);color:#fff;border-radius:10px;font-size:11px;padding:0 6px;line-height:18px}
.btn.conn{padding:0 20px 0 4px;gap:16px}.btn.conn .gbox{width:32px;height:32px;background:#fff;border-radius:2px;display:grid;place-items:center}.btn.conn .gbox svg{width:20px;height:20px}
.bul{margin:8px 0 0;padding-left:16px}.bul li{line-height:26px}
table.evt-tbl{width:100%;border-collapse:collapse}
.evt-tbl th{text-align:left;font-weight:600;padding:8px 16px;border-bottom:1px solid var(--grey6);vertical-align:bottom;line-height:16px}
.evt-tbl th.c-ck,.evt-tbl td.c-ck{text-align:center;width:72px}
.evt-tbl th.c-in{width:198px}.evt-tbl.cols-name th.c-in{width:254px}.evt-tbl.cols-name th.c-ck{width:88px}
.evt-tbl th.c-ck{white-space:nowrap}
.evt-tbl td{padding:8px 16px;border-bottom:1px solid var(--grey6);height:56px}
.evt-tbl td.ev-l{color:var(--grey2)}
.evt-tbl td.c-ck .cbx-row{justify-content:center;margin:0;padding:4px}
.evt-tbl .input{height:40px}
.evt-tbl .input.ghost{opacity:0}.evt-tbl .input.ghost:focus{opacity:1}
.ftabs{max-width:544px}
.frows{max-width:560px}
.frow{display:grid;grid-template-columns:31px 1fr 32px;align-items:end;gap:0;margin-bottom:12px}
.frow .or{color:var(--grey3);font-size:11px;padding-bottom:10px}
.fgrp{display:grid;grid-template-columns:1fr 140px;gap:8px}
.fgrp .lbl{margin-bottom:8px}.fgrp .lbl.dim{color:var(--grey3)}
.fsel-w{display:block}.fsel-w .input{padding-right:36px}
.fsel-btn{position:absolute;right:4px;top:8px;width:28px;height:24px;border:0;background:none;color:var(--grey3);display:grid;place-items:center;border-radius:2px}
.fsel-btn:hover{background:var(--grey6);color:var(--grey1)}.fsel-btn svg{width:14px;height:14px}
.frm{margin-bottom:4px}.frm:disabled{color:var(--grey4);cursor:default;background:none}
.input:disabled{color:var(--grey3);cursor:default}.input:disabled:hover{background:var(--grey8)}
/* ====== lượt 2: onboarding My Tracking ====== */
.ob-links .vsep{width:1px;height:24px;background:var(--grey6)}
.ob-steps{display:flex;margin:24px 0 8px}
.ob-st{width:124px;position:relative}
.ob-st:not(:last-child)::after{content:"";position:absolute;left:40px;top:20px;width:84px;height:1px;background:var(--grey5)}
.ob-st.ln-on::after{background:var(--purple2)}
.ob-dot{width:40px;height:40px;border-radius:50%;border:1px solid var(--purple2);background:#fff;color:var(--purple2);font-weight:600;display:grid;place-items:center;transition:box-shadow var(--t)}
.ob-dot:disabled{cursor:default}
.ob-dot:not(:disabled):hover{box-shadow:0 0 0 4px var(--purple-soft)}
.ob-st.done .ob-dot,.ob-st.cur .ob-dot{background:var(--purple2);color:#fff}
.ob-st.cur .ob-dot{box-shadow:0 0 0 6px var(--purple-soft2)}
.ob-lbl{font-size:12px;line-height:16px;color:var(--grey3);margin-top:12px}.ob-st.cur .ob-lbl{color:var(--grey1);font-weight:500}
.ob-lock{opacity:.6}
.ob-tips{margin-top:64px;gap:64px}
.ob-q{max-width:480px}
.ob-opt{display:block;width:100%;text-align:left;height:54px;padding:0 24px;margin-top:16px;border:1px solid var(--grey6);border-radius:2px;background:#fff;font-weight:500;color:var(--grey1);transition:border-color var(--t),background var(--t)}
.ob-opt:hover{border-color:var(--grey5);background:var(--grey8)}.ob-opt.on{border-color:var(--purple2)}
.modal.center{text-align:center}
[data-hidden-route]{color:var(--grey2)}
/* Highlight live (thanh debug): viền xanh phần tử thuộc feature đang nối API thật */
body.cp-hl [data-live]{outline:2px solid #22C55E!important;outline-offset:1px}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

/* F-ACC-06 Data Quality */
.dq-bar{height:8px;background:var(--grey7);border-radius:4px;overflow:hidden;min-width:120px}.dq-bar i{display:block;height:100%;border-radius:4px}
.sent-json{font:12px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace;background:var(--grey7);border-radius:4px;padding:12px;white-space:pre-wrap;word-break:break-all;max-height:50vh;overflow:auto;margin:8px 0 0}
/* History: Description is the flexible column, Comment keeps room for its textarea; search columns stop hogging width */
[data-ft=hist] table.t{width:100%;table-layout:fixed}[data-ft=hist] th:nth-child(1),[data-ft=hist] td:nth-child(1){width:180px}[data-ft=hist] th:nth-child(2),[data-ft=hist] td:nth-child(2){width:200px}[data-ft=hist] th:nth-child(3),[data-ft=hist] td:nth-child(3){width:170px}[data-ft=hist] th:nth-child(5),[data-ft=hist] td:nth-child(5){width:230px}[data-ft=hist] td{white-space:normal;word-break:break-word}[data-ft=hist] .cmt{width:100%}

/* ====== Email Popup (F-RPT-03) ====== */
.pp-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.pp-kpi{min-height:0;box-shadow:var(--shadow-card);display:flex;flex-direction:column;gap:6px}
.pp-num{font-size:32px;line-height:40px;font-weight:600;color:var(--grey1)}
.pp-main{background:var(--purple-soft);box-shadow:0 0 0 1px var(--purple-soft2)}
.pp-main .pp-num{color:var(--purple1);font-size:40px;line-height:48px}
.pp-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
table.pp-t th:last-child,table.pp-t td:last-child{padding-right:24px}
table.pp-t thead th{border-bottom:1px solid var(--grey6);padding-bottom:8px}
.pp-grid .card+.card{margin-top:0}
.pp-step+.pp-step{margin-top:16px}
.pp-bar{height:10px;background:var(--grey7);border-radius:5px;margin-top:8px;overflow:hidden}.pp-bar>div{height:100%;background:var(--purple2);border-radius:5px;min-width:2px}
@media (max-width:1360px){.pp-grid{grid-template-columns:minmax(0,1fr)}}
@media (max-width:1180px){.pp-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
