:root{color-scheme:only light;
  --bg:#fdf3e4; --ink:#3a2317; --soft:#7a5a48; --panel:#fffaf2; --line:#ead7bd;
  --counter:#8a5a3b; --counter-top:#a8714c; --pink:#ef6f8e; --pink-d:#c24c69; --mint:#4fa883; --warn:#e2574c; --gold:#f0b43c;
  --chalk:#2f4a3a; --chalk-ink:#f4efe2;
  box-sizing:border-box;
  padding-bottom:env(safe-area-inset-bottom,0px);
}
/* Game luôn dùng nền kem sáng cho hợp tranh vẽ (không đổi theo chế độ tối) */


html{scroll-padding-top:env(safe-area-inset-top,0px)}
[hidden]{display:none!important}
*,*::before,*::after{
  box-sizing:inherit;
  -webkit-user-select:none;
  -moz-user-select:none;
  -ms-user-select:none;
  user-select:none;
  -webkit-touch-callout:none;
}
input,textarea{
  -webkit-user-select:text!important;
  -moz-user-select:text!important;
  -ms-user-select:text!important;
  user-select:text!important;
}
html{height:100%}html,body{margin:0;min-height:100%}
html:has(body.selling){overflow:hidden;height:100%}body.selling{height:100%;overflow:hidden;position:fixed;inset:0;width:100%}body.selling .app{height:100%;min-height:0}body.selling .awning{height:10px}
body{background:var(--bg);color:var(--ink);font-family:"Baloo 2",system-ui,-apple-system,"Segoe UI",sans-serif;-webkit-tap-highlight-color:transparent}
button{font:inherit;color:inherit}
button:focus-visible,input:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--pink);outline-offset:2px}
.app{max-width:560px;margin:0 auto;min-height:100vh;display:flex;flex-direction:column}

header{position:sticky;top:0;z-index:10;background:var(--bg);display:grid;grid-template-columns:1fr auto 1fr;align-items:center;padding:calc(env(safe-area-inset-top,0px) + 14px) 14px 6px;gap:8px}
.h-l{font-weight:700;line-height:1.1;display:flex;align-items:center;gap:8px}
.h-btns-grid{display:inline-grid;grid-template-columns:repeat(2, 28px);grid-auto-rows:28px;gap:3px 4px;align-items:center;justify-content:center;flex:none}
.h-btns-grid .pbtn{width:28px!important;height:28px!important;min-width:28px!important;border-radius:50%!important;padding:0!important;margin:0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important}
body:not(.selling) .h-btns-grid #pauseBtn{display:none!important}
.h-btns-grid .pbtn .ico,.h-btns-grid .pbtn img{width:18px!important;height:18px!important;object-fit:contain}
.pbtn{display:none;flex:none;width:36px;height:36px;border-radius:50%;border:2px solid var(--line);background:var(--panel);font-size:.95rem;cursor:pointer;padding:0;line-height:1}
body.selling .pbtn{display:inline-flex;align-items:center;justify-content:center}
.pbig{font-size:3rem;line-height:1}.h-l small{display:block;color:var(--soft);font-weight:500;font-size:.78rem}
.h-m{font-size:1.3rem;font-weight:800;text-align:center;line-height:1.1;min-width:0}
.h-m small{display:block;font-size:.68rem;font-weight:700;color:var(--pink-d);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:46vw;margin:0 auto}
.sign{margin:18px 12px -10px;position:relative;z-index:1;display:flex;justify-content:center}
.sign button{border:3px solid #8a5a3b;background:#fff7e8;color:#8a3a50;border-radius:14px;padding:6px 16px;font-size:1.3rem;font-weight:800;cursor:pointer;box-shadow:0 3px 0 rgba(0,0,0,.12);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sign button small{font-size:.8rem;margin-left:6px;opacity:.6}
.pinbox.nm{letter-spacing:0;font-size:1.05rem;font-weight:700}
.h-r{text-align:right;font-weight:700;line-height:1.1;display:flex;flex-direction:column;align-items:flex-end;justify-content:center}
.h-r small{display:block;color:var(--soft);font-weight:500;font-size:.78rem}
.front-btn-megah{background:linear-gradient(135deg,#f97316,#ea580c);border:1.5px solid #ffedd5;border-radius:12px;padding:3px 8px;margin-top:3px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:5px;box-shadow:0 2px 8px rgba(234,88,12,0.35);transition:transform .18s cubic-bezier(0.34,1.56,0.64,1);line-height:1}
.front-btn-megah .front-mega-img{width:20px;height:20px;object-fit:contain;filter:drop-shadow(0 1px 3px rgba(0,0,0,.25));display:block}
.front-btn-megah .front-btn-text{font-size:.72rem;font-weight:800;color:#fff;white-space:nowrap;letter-spacing:.3px}
.front-btn-megah:hover{transform:scale(1.08)}
.front-btn-megah:active{transform:scale(0.94)}
.stars{color:var(--gold);letter-spacing:1px}
.awning{height:26px;background:repeating-linear-gradient(90deg,var(--pink) 0 30px,#fff 30px 60px);position:relative}
.awning::after{content:"";position:absolute;left:0;right:0;bottom:-10px;height:10px;background:radial-gradient(circle at 15px 0,var(--pink) 10px,transparent 11px) 0 0/60px 10px repeat-x,radial-gradient(circle at 45px 0,#fff 10px,transparent 11px) 0 0/60px 10px repeat-x}

#view{flex:1;display:flex;flex-direction:column}
/* PREP */
.board{margin:0 12px 10px;padding-top:18px!important;background:var(--chalk);color:var(--chalk-ink);border-radius:10px;border:8px solid #8a5a3b;padding:12px 14px 10px;box-shadow:0 4px 0 rgba(0,0,0,.12)}
.board h2{margin:0 0 6px;font-size:1.35rem;text-align:center;font-weight:800;letter-spacing:.5px}
.board .items{display:grid;grid-template-columns:1fr 1fr;gap:2px 16px;font-size:.92rem}
.board .it{display:flex;justify-content:space-between;border-bottom:1px dashed rgba(244,239,226,.25)}
.board .btop{margin-top:8px;font-weight:800;font-size:.85rem;opacity:.9}
.board .extra{margin-top:6px;font-size:.8rem;opacity:.85;text-align:center}
.tabs{display:flex;gap:4px;margin:0 12px;padding:5px 5px 0;overflow-x:auto;background:color-mix(in srgb,var(--line) 70%,var(--panel));border-radius:16px 16px 0 0}
.tab{flex:1;border:0;background:transparent;padding:8px 4px;font-size:.9rem;border-radius:12px 12px 0 0;font-weight:700;color:var(--soft);cursor:pointer;white-space:nowrap}
.tab.on{background:var(--panel);color:var(--ink)}
.tab{color:var(--ink)!important;opacity:.72}.tab.on{opacity:1}
.pane{background:var(--panel);margin:0 12px;border-radius:0 0 16px 16px;padding:12px;flex:1;margin-bottom:90px}
.sec{font-weight:800;margin:10px 2px 6px;font-size:1rem}.sec:first-child{margin-top:0}
.note{color:var(--soft);font-size:.82rem;margin:0 2px 8px;line-height:1.35}
.rowi{display:grid;grid-template-columns:30px 1fr auto;gap:10px;align-items:center;padding:8px 0;border-bottom:1px solid var(--line)}
.rowi:last-child{border-bottom:0}
.rowi .nm{font-weight:700;line-height:1.15}.rowi .sub{font-size:.78rem;color:var(--soft);font-weight:500}
.rowi .sub.low{color:var(--warn);font-weight:700}
.btns{display:flex;gap:4px}
.sbtn{border:2px solid var(--line);background:var(--bg);border-radius:10px;padding:4px 8px;font-size:.78rem;font-weight:700;cursor:pointer;line-height:1.1;text-align:center}
.sbtn b{display:block;font-size:.9rem}
.sbtn.pri{background:var(--pink);border-color:var(--pink);color:#fff}
.sbtn:disabled{opacity:.4;cursor:not-allowed}
.sw{width:26px;height:26px;border-radius:50%;border:2px solid rgba(0,0,0,.12);display:block}
.icon{font-size:1.4rem;text-align:center}
.pin{display:flex;align-items:center;gap:4px}
.pin input{width:88px;border:2px solid var(--line);background:var(--bg);color:var(--ink);border-radius:10px;padding:5px 8px;font:inherit;font-weight:700;text-align:center;box-sizing:border-box}
.pin span{font-size:.8rem;color:var(--soft)}
.warnline{color:var(--warn)}
.okline{color:var(--mint)}
.danger{margin-top:14px;border:2px solid var(--warn);color:var(--warn);background:transparent;border-radius:12px;padding:8px 14px;font-weight:700;cursor:pointer}
.pager{display:flex;justify-content:center;align-items:center;gap:6px;margin:10px 0;flex-wrap:wrap}
.pager button{min-width:38px;height:38px;border-radius:12px;border:2px solid var(--line);background:var(--panel);font-weight:800;font-size:1rem;color:var(--ink)}
.pager button.on{background:var(--pink);border-color:var(--pink);color:#fff}
.pager button:disabled{opacity:.35}
.pager span{color:var(--soft);font-weight:800}
.revsum{display:grid;grid-template-columns:auto 1fr;gap:16px;align-items:center;margin-bottom:10px}
.revbig{text-align:center}.revbig b{font-size:2.4rem;display:block;line-height:1}
.dist div{display:grid;grid-template-columns:22px 1fr 28px;gap:6px;align-items:center;font-size:.8rem}
.dist .dstr{display:grid;grid-template-columns:22px 1fr 28px;gap:6px;align-items:center;font-size:.8rem;width:100%;border:0;background:none;padding:3px 4px;border-radius:8px;cursor:pointer;font:inherit;color:inherit;text-align:left}.dist .dstr.on{background:var(--line)}.dist .dstr span{font-size:.8rem}
.revflt{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0 10px}
.dist i{display:block;height:8px;border-radius:4px;background:var(--gold)}
.dist .bar{background:var(--line);border-radius:4px;height:8px}
.rev{padding:8px 0;border-bottom:1px solid var(--line)}
.rev .top{display:flex;justify-content:space-between;font-size:.8rem;color:var(--soft)}
.rev p{margin:2px 0 0;line-height:1.35}
.tag{font-size:.7rem;background:var(--pink);color:#fff;border-radius:6px;padding:0 5px;margin-left:4px}
body.vpfix .modal,body.vpfix .splash{bottom:auto;height:var(--vpfix)}body.vpfix .openbar{bottom:auto;top:var(--vpfix);transform:translateY(-100%)}
body.kbopen .openbar{display:none}
.openbar{position:fixed;left:0;right:0;bottom:0;padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px));background:linear-gradient(transparent,var(--bg) 30%);display:flex;justify-content:center;z-index:15}
.big{background:var(--pink);color:#fff;border:0;border-radius:16px;padding:12px 26px;font-size:1.1rem;font-weight:800;cursor:pointer;box-shadow:0 4px 0 var(--pink-d);width:100%;max-width:420px}
.big:active{transform:translateY(3px);box-shadow:0 1px 0 var(--pink-d)}

.goalc{margin:0 12px 12px;background:var(--panel);border:2px solid var(--line);border-radius:14px;padding:10px 12px}
.goalc.done{border-color:var(--mint);color:var(--mint);font-weight:800;text-align:center}
.gh{font-weight:800;display:flex;justify-content:space-between;align-items:baseline;margin-bottom:4px}.gh span{font-size:.72rem;color:var(--soft);font-weight:600}
.gr{margin-top:6px}.gt{display:flex;justify-content:space-between;font-size:.8rem;font-weight:600}.gt span:last-child{color:var(--soft)}
.gb{height:6px;background:var(--line);border-radius:3px;overflow:hidden;margin-top:2px}.gb i{display:block;height:100%;background:var(--gold)}
.gr.ok .gt span:first-child{color:var(--mint)}.gr.ok .gb i{background:var(--mint)}
.life{font-size:.66rem;font-weight:700;border-radius:6px;padding:0 5px;white-space:nowrap;vertical-align:middle}
.life.l1{background:#fde2e2;color:#b83a3a}.life.l3{background:#fdf0cf;color:#8a6412}.life.l0{background:var(--line);color:var(--soft)}
.rowi.kho .btns{flex-direction:column;gap:3px}.rowi.kho .btns{display:grid;grid-template-columns:repeat(3,auto);gap:3px}
.rowi.kho .sbtn{padding:3px 5px;font-size:.66rem}.rowi.kho .sbtn b{font-size:.8rem}
.wl{color:var(--soft);font-size:.72rem}
.fore{background:var(--bg);border-radius:10px;padding:8px 10px;font-size:.85rem;margin:0 0 8px;line-height:1.35}
.step5{display:flex;align-items:center;gap:3px}
.step5 .sbtn{width:30px;height:32px;padding:0;font-size:1.1rem;display:grid;place-items:center;line-height:1}
.step5 input::-webkit-inner-spin-button,.step5 input::-webkit-outer-spin-button,.pin input::-webkit-inner-spin-button,.pin input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.step5 input,.pin input{-moz-appearance:textfield;appearance:textfield}
.step5 input{box-sizing:border-box;line-height:28px;width:46px;height:32px;border:2px solid var(--line);background:var(--bg);color:var(--ink);border-radius:8px;text-align:center;font:inherit;font-weight:800;padding:0}
.big:disabled{opacity:.6;cursor:not-allowed}
.sold{background:var(--warn);color:#fff;font-size:.58rem;border-radius:5px;padding:0 4px;margin-left:auto;margin-right:14px}
.revc{color:#2b78c5}
.segtabs{display:flex;gap:4px;margin-bottom:8px}.segtabs .chip{flex:1;padding:7px 2px}
.pnav{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;text-align:center;font-size:.92rem}
.pnav .sbtn{width:34px;height:32px;font-size:1.2rem;padding:0}
.kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-bottom:8px}
.kpis div{background:var(--bg);border-radius:10px;padding:6px;text-align:center;font-size:.72rem;color:var(--soft)}
.kpis b{display:block;font-size:1.1rem;color:var(--ink)}
.rh{font-weight:800;font-size:1.1rem;margin:14px 0 4px;border-bottom:2px solid currentColor;padding-bottom:2px}
.thead,.trow{display:grid;grid-template-columns:minmax(0,1fr) 62px 76px;gap:6px;align-items:start;font-size:.8rem}
.thead{color:var(--soft);font-weight:700;font-size:.7rem;padding:2px 0}
.thead div:not(:first-child),.trow>div:not(:first-child){text-align:right;font-variant-numeric:tabular-nums}
.trow{padding:4px 0;border-bottom:1px dashed var(--line)}
.trow.zero{opacity:.55}
.trow.sub{font-size:.76rem;color:var(--soft);border-bottom:0;padding:1px 0 1px 8px}
.tbar{height:4px;background:var(--line);border-radius:2px;margin-top:3px;overflow:hidden}.tbar i{display:block;height:100%;background:#2b78c5}
.tgrp{font-size:.72rem;font-weight:800;color:var(--soft);margin-top:6px}
.ttot{display:flex;justify-content:space-between;font-weight:800;padding:6px 0 0;font-size:.95rem}
.crow{display:flex;justify-content:space-between;gap:8px;font-size:.84rem;padding:4px 0;border-bottom:1px dashed var(--line)}
.crow span:last-child{font-variant-numeric:tabular-nums;white-space:nowrap}
.crow.sub{font-size:.76rem;color:var(--soft);border-bottom:0;padding:1px 0 1px 8px}
.wbox{font-size:.75rem;background:color-mix(in srgb,var(--warn) 10%,transparent);border-radius:8px;padding:5px 8px;margin:4px 0}
.final{display:flex;justify-content:space-between;align-items:center;margin-top:12px;padding:10px 12px;border-radius:12px;background:var(--bg);font-weight:800;font-size:1.1rem}
.final small{display:block;font-size:.7rem;color:var(--soft);font-weight:600}
.askbtns{display:flex;flex-direction:column;gap:8px;margin-top:12px}.sbtn.ghost{padding:10px;font-size:.95rem}
.pinbox{width:100%;margin-top:8px;border:2px solid var(--line);background:var(--bg);color:var(--ink);border-radius:12px;padding:10px;font:inherit;font-size:1.2rem;text-align:center;letter-spacing:4px}
.lvl{margin:0 12px 10px;background:var(--panel);border:2px solid var(--gold);border-radius:14px;padding:8px 12px;font-size:.85rem;line-height:1.35}
.lvl small{display:block;color:var(--soft);font-size:.75rem}
.goalc.warnc{border-color:var(--warn);color:var(--warn);font-weight:700;font-size:.85rem}
.lvup{background:color-mix(in srgb,var(--gold) 20%,transparent);border-radius:10px;padding:6px 10px;color:var(--ink)!important;font-weight:700}
.lane .cust.wide{width:200px}
.multi{font-size:.66rem;font-weight:800;display:flex;flex-wrap:wrap;gap:3px;align-items:center;color:var(--soft)}
.multi span{border:1.5px solid var(--line);border-radius:6px;padding:1px 6px;cursor:pointer}
.multi span.cur{border-color:var(--pink);color:var(--pink-d)}
.multi span.dn{border-color:var(--mint);color:var(--mint)}
.cupno{font-weight:800;color:var(--pink-d)}
.verl{margin:-4px 12px 10px;text-align:right}
.verl button{border:0;background:none;color:var(--soft);font-size:.75rem;font-weight:700;text-decoration:underline;cursor:pointer;padding:4px}
.news{text-align:left;max-height:55vh;overflow-y:auto;margin-top:8px}
.nv{border-top:1px solid var(--line);padding:8px 0}.nv:first-child{border-top:0}
.nh{display:flex;align-items:baseline;gap:6px}.nh small{margin-left:auto;color:var(--soft);font-size:.72rem}
.nv ul{margin:4px 0 0;padding-left:18px;font-size:.85rem;line-height:1.4}.nv:not(.cur){opacity:.75}
.tab{display:flex;flex-direction:column;align-items:center;gap:1px;font-size:.7rem!important;line-height:1.1;padding:6px 2px!important}
.tab .ti{font-size:1.2rem;line-height:1}
.ico{width:1.25em;height:1.25em;vertical-align:-.28em;object-fit:contain;display:inline-block}
.pbtn .ico{width:26px;height:26px;vertical-align:0}.tab .ti .ico{width:30px;height:30px}.setb span .ico{width:30px;height:30px;vertical-align:middle}.pbig .ico{width:64px;height:64px}
#rename small .ico{width:18px;height:18px}
.lvl{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.lvl .lvi{font-size:1.15rem;letter-spacing:1px}
.lvl small{margin-left:auto;display:inline!important;font-weight:700}
.gr2{display:grid;grid-template-columns:22px 1fr auto;gap:8px;align-items:center;margin-top:6px;font-size:.8rem;font-weight:700}
.gr2 .gv{color:var(--soft);font-variant-numeric:tabular-nums}
.gr2.ok .gb i{background:var(--mint)}
.fore.big2{font-size:1.1rem;font-weight:800;text-align:center}
.legend{font-size:.7rem;color:var(--soft);text-align:center;margin-top:10px}
.rev{display:grid;grid-template-columns:40px minmax(0,1fr) auto;gap:10px;align-items:start}
.rface{width:40px;height:40px;border-radius:50%;background:var(--bg);border:2px solid var(--line);display:flex;align-items:center;justify-content:center;font-size:1.5rem}
.rtop{display:flex;align-items:center;gap:6px;font-size:.85rem}
.rday{margin-left:auto;color:var(--soft);font-size:.72rem}
.rev.bad p{color:var(--warn)}
.rpbtn{margin-top:4px;border:2px solid var(--line);background:var(--bg);color:var(--soft);border-radius:10px;padding:2px 12px;font-weight:800;font-size:.78rem;cursor:pointer}
.rrep{margin-top:6px;background:var(--bg);border-left:3px solid var(--pink);border-radius:4px 10px 10px 4px;padding:5px 8px;font-size:.82rem;line-height:1.35;display:flex;flex-direction:column;gap:1px}
.rrep b{font-size:.72rem;color:var(--pink-d)}.rrep span{color:var(--ink)}
.rcust-rep{margin-top:6px;background:color-mix(in srgb,var(--panel) 88%,#3b82f6);border-left:3px solid #2563eb;border-radius:4px 10px 10px 4px;padding:6px 9px;font-size:.82rem;line-height:1.35;display:flex;flex-direction:column;gap:2px}
.rcust-head{display:flex;align-items:center;gap:6px;font-size:.72rem;color:#1d4ed8;font-weight:800}
.rcust-rep span{color:var(--ink)}
.star-delta{font-size:.68rem;font-weight:800;padding:1px 6px;border-radius:6px;margin-left:auto}
.star-delta.up{background:#dcfce7;color:#15803d;border:1px solid #86efac}
.star-delta.down{background:#fee2e2;color:#b91c1c;border:1px solid #fca5a5}
body.dark .rcust-rep{background:rgba(37,99,235,.15);border-left-color:#60a5fa}
body.dark .rcust-head{color:#93c5fd}
.rcust-tip-badge{display:inline-flex;align-items:center;gap:5px;align-self:flex-start;background:#ecfdf5;border:1px solid #10b981;color:#047857;font-size:.74rem;font-weight:800;padding:3px 9px;border-radius:999px;margin-top:5px;box-shadow:0 1px 3px rgba(16,185,129,.15)}
.rcust-tip-badge.delivered{background:#eff6ff;border-color:#60a5fa;color:#1d4ed8;box-shadow:0 1px 3px rgba(37,99,235,.15)}
body.dark .rcust-tip-badge{background:rgba(16,185,129,.2);border-color:#34d399;color:#6ee7b7}
body.dark .rcust-tip-badge.delivered{background:rgba(59,130,246,.2);border-color:#60a5fa;color:#93c5fd}
.rplink{align-self:flex-start;border:0;background:none;color:var(--soft);font-weight:800;font-size:.72rem;text-decoration:underline;padding:0;cursor:pointer}
.rpq{background:var(--bg);border-radius:12px;padding:8px 10px;text-align:left;font-size:.85rem;line-height:1.35;color:var(--soft);margin-top:6px}
.rpin{width:100%;min-height:96px;margin-top:10px;border:2px solid var(--line);background:var(--bg);color:var(--ink);border-radius:12px;padding:10px;font:inherit;resize:none;box-sizing:border-box}
.rcup{padding-top:6px}
.cupsleft{font-size:1.3rem;display:flex;align-items:center;gap:4px}.cupsleft b{font-size:1rem}
.trash{font-size:1.3rem!important;padding:6px 12px!important}
.plab span{font-size:1.1rem}
.prow{grid-template-columns:52px minmax(0,1fr)!important}
.pctl .cup.mini{width:16px;height:22px}
.ic .cup.mini{width:14px;height:20px}
.chip.ic2{display:flex;align-items:center;justify-content:center;gap:5px;min-height:34px}
.chip.ic2 b{font-size:.78rem}
.chip.ic2 .mcup{background:currentColor;opacity:.75}
.flow{display:flex;justify-content:center;align-items:center;gap:6px;margin:10px 0 4px;font-size:1.7rem}
.flow span{display:flex;flex-direction:column;align-items:center;line-height:1}
.flow small{font-size:.7rem;color:var(--soft);font-weight:700;margin-top:3px}
.flow em{font-style:normal;font-size:.9rem;color:var(--soft)}
.stabs{display:flex;gap:6px;margin-bottom:12px;width:100%}
.stab{flex:1;border:1.5px solid var(--line);background:var(--card);border-radius:999px;padding:7px 6px;font-weight:800;font-size:.8rem;white-space:nowrap;cursor:pointer;min-width:0;text-align:center;overflow:hidden;text-overflow:ellipsis;box-shadow:0 1px 3px rgba(0,0,0,0.04);transition:all .15s ease}
.stabs.w3{flex-wrap:wrap}.stabs.w3 .stab{flex:1 0 30%}
.stab.on{background:var(--pink);border-color:var(--pink);color:#fff;box-shadow:0 3px 8px rgba(244,114,182,0.35)}
.swipe{display:flex;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;scrollbar-width:none;align-items:flex-start;transition:height .2s}
.swipe::-webkit-scrollbar{display:none}
.spage{flex:0 0 100%;scroll-snap-align:start;min-width:0}
.spage .goalc{margin:0}
.ti2{display:inline-flex;gap:2px;align-items:center;height:16px}
.ti2 i{display:block;width:8px;height:8px;box-shadow:0 0 0 1px rgba(128,110,90,.55)}
.ti2.g-tc i{border-radius:50%}.ti2.g-thach i{border-radius:2px;height:7px}.ti2.g-pm i{border-radius:1px;transform:rotate(14deg);width:7px;height:7px}
.ti2.g-foam i{width:20px;height:7px;border-radius:4px}
.ti2.lg{height:20px}.ti2.lg i{width:11px;height:11px}.ti2.lg.g-thach i{height:10px}.ti2.lg.g-foam i{width:26px;height:9px}
.tps{display:flex;flex-wrap:wrap;gap:1.5px;justify-content:center;max-width:44px;max-height:36px;overflow:hidden;align-content:center}
.tps .ti2{height:10px;gap:1px}
.tps .ti2 i{width:5px;height:5px}
.tps .ti2.g-foam svg{width:14px;height:10px}
.tp.g-thach{border-radius:2px}.tp.g-pm{border-radius:1px;transform:rotate(15deg)}
.flavband{position:absolute;left:0;right:0;bottom:44%;height:30%;opacity:.85}
.board .chips2{display:flex;flex-wrap:wrap;gap:2px 12px;font-size:.85rem}.board .chips2 b{opacity:.8;font-weight:600}
.tgl{font-size:.72rem;font-weight:800;color:var(--soft);margin:4px 2px 2px}
.sbar2{display:grid;gap:4px}
.stp{border:2px solid var(--line);background:transparent;color:var(--soft);border-radius:999px;font-weight:800;cursor:pointer;min-height:34px;display:flex;flex-direction:row;gap:3px;align-items:center;justify-content:center;font-size:.64rem;line-height:1.1;padding:2px;min-width:0;overflow:hidden;white-space:nowrap}
.stp span{font-size:.9rem;line-height:1}
.stp.on{border-color:var(--pink);background:color-mix(in srgb,var(--pink) 18%,transparent);color:var(--ink)}
.stp.done{color:var(--mint)}
.pbody{display:flex;flex-direction:column;gap:5px;max-height:44vh;overflow-y:auto;min-height:0}
.pg4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
.pg3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.pg2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.pbody .ing{min-height:50px;font-size:.64rem}
.pbody .ing.lg{min-height:58px}
.pbody .cup.mini{width:18px;height:26px}
.pbody .dot{width:20px;height:20px}
.bigsz{border:2px solid var(--line);background:transparent;border-radius:12px;font-weight:800;font-size:1.2rem;min-height:52px;display:flex;align-items:center;justify-content:center;gap:10px;cursor:pointer}
.bigsz.on{border-color:var(--pink);background:color-mix(in srgb,var(--pink) 18%,transparent)}
.bigsz .mcup{background:currentColor;opacity:.75;width:15px;height:19px}.bigsz .mcup.L{width:17px;height:27px}
.chip.lg{min-height:52px;font-size:.9rem}
.lock{border:2px dashed var(--line);border-radius:10px;min-height:50px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--soft);font-weight:800;font-size:.8rem;opacity:.75}
.tophd{display:flex;justify-content:space-between;font-size:.72rem;color:var(--soft);font-weight:700;padding:0 2px}
.nextb{min-height:44px;border:0;border-radius:12px;background:var(--pink);color:#fff;font-weight:800;font-size:1rem;cursor:pointer;margin-top:2px}
.stab{font-size:.68rem!important;padding:6px 2px!important}
.splash{position:fixed;inset:0;z-index:60;background:var(--bg);display:flex;flex-direction:column;overflow:hidden;padding-top:env(safe-area-inset-top,0px)}
.splash[hidden]{display:none}
.sp-body{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:24px 20px calc(24px + env(safe-area-inset-bottom,0px));text-align:center}
.sp-cup{height:230px;display:flex;align-items:flex-end;justify-content:center}
.sp-cup .cup{width:128px;height:196px}
.sp-cup .liquid.full{animation:fillup 1.1s .2s ease-out both}
.sp-cup .straw{animation:strawin .5s 1.2s ease-out both}
.sp-cup .tp{animation:drop .45s 1.35s ease-in backwards}
@keyframes fillup{from{height:0}}
@keyframes strawin{from{transform:translateY(-70px) rotate(12deg);opacity:0}}
.sp-body h1{font-size:2.1rem;margin:4px 0 0;font-weight:800;line-height:1.05}
.sp-sub{color:var(--soft);font-weight:700;margin:0;font-size:.95rem}
.sp-body .big{max-width:320px;margin-top:10px}
.sp-link{background:none;border:0;color:var(--soft);font-weight:800;text-decoration:underline;cursor:pointer;font-size:.9rem;padding:8px 10px}
.sp-ver{color:var(--soft);font-size:.72rem;opacity:.7}
.tour{flex:1;display:flex;flex-direction:column;min-height:0;padding:14px 0 calc(16px + env(safe-area-inset-bottom,0px))}
.tour .skip{align-self:flex-end;margin-right:10px;text-decoration:none}
.tourw{flex:1;display:flex;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.tourw::-webkit-scrollbar{display:none}
.tpage{flex:0 0 100%;scroll-snap-align:start;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:0 24px;box-sizing:border-box;text-align:center}
.tpage h2{margin:6px 0 0;font-size:1.55rem;font-weight:800}
.tpage p{margin:0;color:var(--soft);font-weight:600;max-width:300px}
.till{width:100%;max-width:330px;background:var(--panel);border:2px solid var(--line);border-radius:20px;padding:14px;display:flex;flex-direction:column;gap:10px;text-align:left;box-sizing:border-box}
.trw{display:flex;align-items:center;gap:10px;background:var(--bg);border-radius:12px;padding:8px 10px;font-weight:800;font-size:.9rem}
.trw .chip2{margin-left:auto;background:var(--pink);color:#fff;border-radius:8px;padding:1px 8px;font-size:.85rem}
.tnote{text-align:center;color:var(--warn);font-weight:800;font-size:.85rem}
.till .stp{min-height:48px;font-size:.75rem;cursor:default}
.tcup{display:flex;align-items:flex-end;justify-content:center;gap:14px}
.warnc2{border:2px solid var(--warn);color:var(--warn);font-weight:700}
.evc.loan{background:color-mix(in srgb,var(--mint) 14%,var(--panel));border-color:var(--mint)}.evc .sbtn{margin-left:auto;flex:none}
.evc{margin:0 0 8px;display:flex;gap:10px;align-items:center;background:color-mix(in srgb,var(--gold) 22%,var(--panel));border:2px solid var(--gold);border-radius:12px;padding:8px 10px;text-align:left}.evc>span .ico{width:30px;height:30px}.evc b{display:block;font-size:.95rem}.evc small{color:var(--soft);font-weight:600;font-size:.8rem;line-height:1.3;display:block}
.sndrow{display:flex;gap:8px;margin-top:10px}.sndrow .sbtn{flex:1;padding:8px}
.crop{margin:0 auto;border-radius:12px;box-shadow:0 0 0 2px var(--line);flex:none}
.lvs{display:flex;flex-direction:column;gap:6px;text-align:left;margin-top:10px;font-size:.88rem;line-height:1.35}.lvs div{background:var(--bg);border-radius:10px;padding:6px 10px}.lvs b{color:var(--pink-d);display:block}
.cstep{font-size:.85rem;text-align:left;color:var(--ink);line-height:1.4;font-weight:600}.cstep b{color:var(--pink-d)}
.tarrow{display:flex;align-items:center;gap:4px;margin-bottom:20px;color:var(--soft)}
.tfc{display:inline-block;flex:none;width:40px;height:39px;background-repeat:no-repeat}.tfc.big{width:60px;height:59px}.tfc.rf{width:44px;height:43px}
.tsay{display:flex;align-items:center;gap:8px}
.trev{display:flex;gap:10px;align-items:center}.trev .say{margin-top:2px}
.lock.unl{opacity:1;min-height:72px;gap:5px;font-size:.72rem;color:var(--ink);border-style:solid}
.lock.unl .cup.mini{width:18px;height:26px}
.dots{display:flex;gap:6px;justify-content:center;margin:12px 0}
.dots i{width:8px;height:8px;border-radius:4px;background:var(--line);transition:width .2s}
.dots i.on{background:var(--pink);width:22px}
.tour .big{margin:0 auto;width:calc(100% - 40px);max-width:420px;align-self:center;display:flex;align-items:center;justify-content:center;gap:6px}
.verl{display:flex;justify-content:space-between}
html,body,button,input,.swipe,.tourw,.lane{touch-action:manipulation}
input,select,textarea{font-size:16px!important}
.board .items.top{margin-top:2px}
.board .tgb{grid-column:1/-1;font-size:.75rem;opacity:.75;margin-top:4px}
.gear{font-size:1.05rem}
.dice{font-size:1.15rem;background:#fff8eb;border-color:#e8a86a}
.dice:hover{background:#ffecc7}
.pbtn.dice{display:inline-flex!important;align-items:center;justify-content:center}
.gear{display:inline-flex!important;align-items:center;justify-content:center}
.kpi-cycle-banner{background:var(--bg);border:1.5px solid var(--line);border-radius:14px;padding:12px 14px;margin-bottom:10px}
.kpi-progress-bar{height:8px;background:var(--line);border-radius:4px;overflow:hidden;margin:6px 0}
.kpi-progress-fill{height:100%;background:linear-gradient(90deg,#f59e0b,#10b981);border-radius:4px;transition:width .3s ease}
.staff-kho-row{background:var(--bg);border-radius:14px;padding:10px 12px;margin-bottom:8px;display:flex;align-items:center;gap:12px}
.kpi-eval-card{background:var(--bg);border:1.5px solid var(--line);border-radius:12px;padding:12px;margin-bottom:10px;text-align:left}
.kpi-opt-group{display:flex;gap:6px;margin-top:8px;flex-wrap:wrap}
.kpi-opt-btn{flex:1;min-width:96px;padding:8px 6px;border:1.5px solid var(--line);background:var(--panel);border-radius:10px;font-size:0.8rem;font-weight:700;color:var(--ink);cursor:pointer;text-align:center;transition:all .15s ease}
.kpi-opt-btn.active{border-color:#10b981;background:#ecfdf5;color:#047857}
.kpi-opt-btn.active-bad{border-color:#ef4444;background:#fef2f2;color:#b91c1c}
.setl{display:flex;flex-direction:column;gap:5px;margin-top:6px;max-height:58vh;overflow-y:auto;padding-right:4px}
.setb{min-height:38px;padding:5px 10px;font-size:0.86rem;border-radius:12px}
.setb{display:flex;align-items:center;gap:12px;border:2px solid var(--line);background:var(--bg);color:var(--ink);border-radius:14px;padding:12px 14px;font-weight:800;font-size:1rem;cursor:pointer;min-height:52px;text-align:left}
.setb span{font-size:1.3rem}.setb small{margin-left:auto;color:var(--soft);font-weight:700}
.setb.warnb{color:var(--warn);border-color:color-mix(in srgb,var(--warn) 40%,var(--line))}
.big.blocked{background:var(--warn);box-shadow:0 4px 0 #a83a31}
.lowstar{margin:0 12px 10px;border:2px solid var(--warn);background:color-mix(in srgb,var(--warn) 14%,var(--panel));color:var(--warn);border-radius:14px;padding:9px 12px;font-weight:800;text-align:center}
.ti2.soi{gap:3px}.ti2.soi i{width:4px;height:15px;border-radius:3px;transform:rotate(18deg)}.ti2.soi i+i{transform:rotate(-12deg)}
.ti2.soi.lg i{width:5px;height:19px}
.tp.k-tcsoi{width:5%;height:20%;aspect-ratio:auto;border-radius:3px;transform:rotate(28deg)}
.tp.k-thachtc{border-radius:2px}
.bcup{display:flex;justify-content:center;width:30px}.bcup .cup.mini{width:22px;height:30px}
.fic{display:inline-flex;align-items:center;justify-content:center;line-height:1;flex:none}
.rowi>.fic{width:30px;height:30px;justify-self:center}
.ti2.g-foam svg{display:block}
.owner{text-align:left}.owner .rowi{grid-template-columns:1fr auto}.owner .pin input{width:112px}
/* SELL */
.lane{display:flex;gap:8px;overflow-x:auto;overflow-y:hidden;padding:22px 10px 8px;flex:none;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
.lane .cust{flex:none;width:172px;scroll-snap-align:start}
.lane .cust.empty{width:100%;height:128px}
.cust.onlc{border-color:var(--pink)}
.cust.onlc .who{color:var(--pink-d)}
.onlc .otx{padding-right:0}
.cups{font-size:.72rem;opacity:.8;margin-top:4px}
.prow{display:grid;grid-template-columns:64px minmax(0,1fr);align-items:center;gap:6px}
.plab{display:flex;align-items:center;gap:4px;font-size:.72rem;font-weight:800;color:var(--soft);line-height:1.05}
.plab i{flex:none;font-style:normal;width:18px;height:18px;border-radius:50%;background:var(--pink);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:.68rem}
.plab.done i{background:var(--mint)}
.pctl{display:flex;gap:4px;min-width:0}
.pctl>button{flex:1 1 0;min-width:0}
.pctl .sw{width:20px;height:20px}.pctl .pearls{height:20px}
.street{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 8px;padding:24px 10px 8px}
.cust{position:relative;background:var(--panel);border:2px solid var(--line);border-radius:14px;padding:6px;display:flex;flex-direction:column;gap:5px;cursor:pointer;min-height:84px}
.cust:active{transform:scale(.97)}
.cust.empty{border-style:dashed;background:transparent;cursor:default;display:flex;justify-content:center;color:var(--soft);font-size:.8rem}
.who{display:flex;align-items:center;gap:5px;font-size:.78rem;font-weight:800;margin-top:-18px}
.who .face{font-size:1.7rem;line-height:1;background:var(--bg);border-radius:50%;width:36px;height:36px;display:flex;align-items:center;justify-content:center;border:2px solid var(--line)}
.say{background:var(--bg);border-radius:4px 12px 12px 12px;padding:5px 7px;font-size:.74rem;line-height:1.3}
.say b{color:var(--pink-d)}
.icons{display:flex;gap:3px}
.ic{flex:1;min-width:0;height:40px;border:2px solid var(--line);border-radius:8px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;position:relative;background:var(--panel)}
.ic small{font-size:.52rem;line-height:1;color:var(--soft);font-weight:700;white-space:nowrap;overflow:hidden;max-width:100%}
.ic.ok{border-color:var(--mint);background:color-mix(in srgb,var(--mint) 14%,var(--panel))}
.ic.ok::after{content:"✓";position:absolute;top:-7px;right:-5px;background:var(--mint);color:#fff;border-radius:50%;width:14px;height:14px;font-size:.55rem;display:flex;align-items:center;justify-content:center;font-weight:800}
.mcup{display:block;width:12px;height:13px;background:var(--soft);clip-path:polygon(0 0,100% 0,82% 100%,18% 100%)}
.mcup.L{height:19px;width:13px}
.dot{width:20px;height:20px;border-radius:50%;border:1px solid rgba(0,0,0,.15)}
.pearls.sm{height:16px;gap:1px;flex-wrap:wrap;justify-content:center;max-width:30px}
.pearls.sm b{width:6px;height:6px}
.pearls.sm em{width:12px;height:4px;background:#fffdf5;border:1px solid #d9cfb5;border-radius:2px}
.sbar{width:9px;height:17px;border:1.5px solid var(--soft);border-radius:2px;display:flex;align-items:flex-end;overflow:hidden}
.sbar i{display:block;width:100%;background:#f2e6c9;border-top:1px solid var(--soft)}
.cubes{display:flex;gap:2px}.cubes i{width:8px;height:8px;background:#cfe8f5;border:1px solid #7fb4cf;border-radius:2px;transform:rotate(12deg)}
.none{color:var(--soft);font-size:.8rem;line-height:1}
.otx{font-size:.72rem;line-height:1.2;padding-right:14px}
.otx b{font-size:.8rem}
.otx .ol{display:flex;gap:4px;align-items:baseline;line-height:1.25}
.otx .n{flex:none;width:13px;height:13px;border-radius:50%;background:var(--line);color:var(--soft);font-size:.58rem;display:inline-flex;align-items:center;justify-content:center;font-weight:800}
.otx .oi.ok{color:var(--mint);font-weight:700}
.otx .oi.ok::after{content:" ✓"}
.step{display:flex;align-items:center;gap:6px;font-size:.8rem;color:var(--soft);font-weight:800;margin:2px 2px -2px}
.step i{font-style:normal;width:18px;height:18px;border-radius:50%;background:var(--pink);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:.7rem}
.step.done i{background:var(--mint)}
.step span{margin-left:auto;font-weight:600;font-size:.72rem}
.pat{height:5px;background:var(--line);border-radius:3px;overflow:hidden;margin-top:4px;grid-column:1/-1}
.pat i{display:block;height:100%;background:var(--mint);width:100%}
.decl{position:absolute;right:2px;top:2px;border:0;background:none;color:var(--soft);font-size:.8rem;cursor:pointer;padding:2px 4px}
.cust.angry{animation:shake .3s}
@keyframes shake{25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}
.online{padding:0 10px 8px;display:flex;flex-direction:column;gap:6px}
.onl{background:var(--panel);border:2px solid var(--pink);border-radius:14px;padding:6px 8px;display:grid;grid-template-columns:32px 1fr;gap:6px;align-items:center;cursor:pointer}
.onl .ol{display:inline-flex;margin-right:8px}.onl .hd{font-weight:800;font-size:.75rem;color:var(--pink)}

.counter{background:var(--counter);border-top:8px solid var(--counter-top);padding:6px 10px 8px;display:flex;flex-direction:column;gap:6px;flex:1;min-height:0}
.work{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px;flex:1;min-height:96px;color:#f6e3cf}
.work .cup{width:62px;height:88px}.work .cup.L{width:68px;height:104px}
.work .spec{font-size:.72rem;line-height:1.25}.work .spec b{font-size:.85rem}
.work .spec{font-size:.8rem;line-height:1.3}
.work .spec b{font-size:.95rem;display:block}
.trash{justify-self:end;background:none;border:2px dashed #e9cdb4;color:#f6e3cf;border-radius:12px;padding:6px 10px;font-size:.85rem;cursor:pointer}
.panel{background:var(--panel);border-radius:16px;padding:8px;display:flex;flex-direction:column;gap:6px;flex:none}
.lab{font-size:.75rem;color:var(--soft);font-weight:700;margin:0 2px -3px}
.seg{display:flex;gap:4px}.seg .chip{flex:1;padding:6px 4px}
.segg{display:grid;grid-template-columns:auto 1fr;gap:6px 8px;align-items:center}
.segg .lab{margin:0}
.chip{border:2px solid var(--line);background:transparent;border-radius:10px;padding:7px 2px;font-size:.78rem;white-space:nowrap;font-weight:700;cursor:pointer}
.chip.on{border-color:var(--pink);background:color-mix(in srgb,var(--pink) 16%,transparent)}
.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.grid4{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.ing{position:relative;border:2px solid var(--line);background:transparent;border-radius:10px;padding:4px 1px 3px;font-size:.6rem;font-weight:700;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:3px;line-height:1.1}
.ing:active{transform:scale(.95)}
.ing.on{border-color:var(--pink);background:color-mix(in srgb,var(--pink) 14%,transparent)}
.ing:disabled{opacity:.4}
.ing .cnt{position:absolute;top:0;right:3px;font-size:.55rem;color:var(--soft)}
.ing .cnt.z{color:var(--warn)}
.pearls{display:flex;gap:2px;height:22px;align-items:center}
.pearls b{width:8px;height:8px;border-radius:50%;display:block}

/* cup */
.cup{position:relative;width:80px;height:112px;flex:none}
.cup.L{width:90px;height:138px}
.cup.mini{width:28px;height:40px}
.cup.mini.L{width:30px;height:46px}
.straw{position:absolute;left:56%;top:-14%;width:9%;height:40%;background:var(--pink);border-radius:4px;transform:rotate(12deg)}
.lid{position:absolute;left:-4%;right:-4%;top:6%;height:7%;background:rgba(255,255,255,.8);border-radius:6px;z-index:3;border:1px solid rgba(0,0,0,.08)}
.glass{position:absolute;left:0;right:0;top:12%;bottom:0;clip-path:polygon(0 0,100% 0,86% 100%,14% 100%);background:rgba(255,255,255,.55);z-index:1;overflow:hidden}
.cup.mini .straw,.cup.mini .lid{display:none}.cup.mini .glass{top:0}
.liquid{position:absolute;left:0;right:0;bottom:0;height:0;transition:height .45s ease-out}
.liquid.full{height:86%}
.ice{position:absolute;width:20%;aspect-ratio:1;background:rgba(255,255,255,.55);border:1px solid rgba(255,255,255,.9);border-radius:3px;transform:rotate(18deg)}
.foam{position:absolute;left:0;right:0;top:12%;height:0;background:#fffdf5;transition:height .35s;box-shadow:inset 0 -3px 0 #f1e6c8}
.foam.on{height:17%}
.tp{position:absolute;width:12%;aspect-ratio:1;border-radius:50%;animation:drop .4s ease-in backwards}
@keyframes drop{from{transform:translateY(-500%);opacity:0}}
.t-tcden{background:radial-gradient(circle at 35% 35%,#6b4a38,#1e120b)}
.t-tctrang{background:radial-gradient(circle at 35% 35%,#fff,#d9d1bf);box-shadow:0 0 0 1px rgba(0,0,0,.1)}
.t-thach{background:rgba(255,248,210,.95);border-radius:2px;box-shadow:0 0 0 1px rgba(0,0,0,.1)}
.t-pudding{background:#f4c141;border-radius:3px 3px 1px 1px}
.t-kemtrung{background:#f7d98b;border-radius:40%}
.cup.mini .tp{animation:none}
/* Tem thương hiệu */
.tem{display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;text-align:center;line-height:1.2;font-weight:800;padding:6% 6%;border:2px solid var(--tf);box-shadow:0 1px 3px rgba(0,0,0,.18);flex:none;align-self:center;overflow:hidden}
.tem .tem-ic{display:flex;align-items:center;justify-content:center;margin-bottom:3%;flex:none}
.tem .tem-ic img{display:block;width:100%;height:100%;object-fit:contain}
.tem .tem-nm{letter-spacing:.2px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.3;padding-top:1px;flex:none}
.tem .tem-sl{font-weight:600;opacity:.85;margin-top:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.3;flex:none}
.tem-round{border-radius:50%}.tem .tem-nm.two{white-space:normal;text-overflow:clip;line-height:1.1;overflow:visible;text-wrap:balance}.tem-arc{position:relative;padding:0}.tem-svg{position:absolute;left:0;top:0;pointer-events:none;overflow:visible}
.tem-rounded{border-radius:16%}
.tem-ribbon{border-radius:12%;position:relative}
.tem-ribbon .tem-nm{background:var(--tf);color:#fff;border-radius:20px;padding:2px 12px;margin-top:2px;box-shadow:0 1px 2px rgba(0,0,0,.2)}
.cuptem{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:2}
.work .tem{border-width:1.5px}
.brandprevrow{display:flex;justify-content:center;align-items:flex-start;margin:8px 0 2px}
.bprev{display:flex;justify-content:center;align-items:flex-start;margin:8px 0 2px}
.bprev .tem{box-shadow:0 2px 8px rgba(0,0,0,.16)}
.bsec{font-weight:800;margin:12px 0 6px;color:var(--soft);font-size:.9rem}
.bframes,.bslos{display:flex;flex-wrap:wrap;gap:6px}
.bfr,.bslo{border:2px solid var(--line);background:var(--panel);border-radius:20px;padding:5px 12px;font-weight:700;cursor:pointer;font-size:.82rem}
.bfr.on{border-color:var(--pink);background:var(--pink);color:#fff}
.bslo{font-weight:600;font-size:.78rem;color:var(--soft)}
.bcolors{display:flex;flex-wrap:wrap;gap:8px}
.bcol{width:34px;height:34px;border-radius:50%;border:3px solid transparent;cursor:pointer;padding:0;box-shadow:0 0 0 1px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.15)}
.bcol.on{border-color:var(--ink);transform:scale(1.08)}
.bgrid{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;max-height:210px;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;touch-action:pan-y;overscroll-behavior:contain;padding:3px;width:100%;box-sizing:border-box}
.bico{width:52px;height:52px;flex:none;border-radius:12px;border:2px solid var(--line);background:#fff;cursor:pointer;padding:4px;display:flex;align-items:center;justify-content:center;box-sizing:border-box}
.bico img{display:block;width:40px;height:40px;object-fit:contain}
.bico.on{border-color:var(--pink);box-shadow:0 0 0 2px var(--pink)}


.float{position:fixed;font-weight:800;color:var(--mint);font-size:1.15rem;pointer-events:none;animation:up 1.1s forwards;z-index:20;text-shadow:0 1px 0 var(--panel);white-space:nowrap}
.float.bad{color:var(--warn)}
@keyframes up{to{transform:translateY(-50px);opacity:0}}
.toast{position:fixed;left:50%;bottom:calc(85px + env(safe-area-inset-bottom,0px));top:auto!important;transform:translateX(-50%)!important;background:var(--ink);color:var(--bg);padding:10px 22px;border-radius:24px;font-weight:800;opacity:0;transition:opacity .25s ease!important;pointer-events:none;z-index:100000;max-width:min(560px,94vw);text-align:center;box-shadow:0 6px 22px rgba(0,0,0,0.35);border:1.5px solid rgba(255,255,255,0.25)}
.toast.show{opacity:1!important;transform:translateX(-50%)!important}
.toast.pri{background:#b8433a!important;color:#fff!important;box-shadow:0 3px 10px rgba(0,0,0,.25)}
.toast.sell,
.toast.sell.pri,
.toast.pri {
  top: auto !important;
  bottom: calc(85px + env(safe-area-inset-bottom, 0px)) !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  max-width: min(560px, 94vw) !important;
  font-size: 0.88rem !important;
  padding: 9px 18px !important;
  border-radius: 18px !important;
  text-align: center !important;
  background: rgba(184, 67, 58, 0.96) !important;
  color: #fff !important;
  border: 1.5px solid #fecaca !important;
  box-shadow: 0 6px 22px rgba(0,0,0,0.4) !important;
  line-height: 1.35 !important;
  z-index: 100000 !important;
}
.toast.sell.show,
.toast.sell.pri.show,
.toast.pri.show {
  opacity: 1 !important;
  transform: translateX(-50%) !important;
}
.modal{position:fixed;inset:0;background:rgba(40,20,10,.65);display:flex;align-items:center;justify-content:center;padding:12px;z-index:100050;overflow-y:auto;box-sizing:border-box}
.modal[hidden]{display:none}
.card{background:var(--panel);border-radius:20px;padding:16px 16px 14px;max-width:400px;width:100%;max-height:88vh;overflow-y:auto;text-align:center;margin:auto;box-sizing:border-box;box-shadow:0 16px 40px rgba(0,0,0,0.35)}
.card h1{font-size:2rem;line-height:1.05;margin:4px 0 8px;font-weight:800}
.card h2{font-size:1.45rem;margin:0 0 6px}
.card p{margin:6px 0;color:var(--soft);line-height:1.4}
.ledger{text-align:left;margin:10px 0;font-size:.92rem}
.ledger div{display:flex;justify-content:space-between;padding:4px 0;border-bottom:1px dashed var(--line)}
.ledger .tot{font-weight:800;border-bottom:0;font-size:1.05rem}
.neg{color:var(--warn)}.pos{color:var(--mint)}
@media (max-height:680px){
 .work{min-height:0}.work .cup{width:46px;height:64px}.work .cup.L{width:50px;height:76px}.work .spec{font-size:.66rem;line-height:1.15}
 .lane{padding:20px 10px 6px}.say{font-size:.7rem;padding:4px 6px}.ic{height:34px}
 .chip{padding:5px 2px}.panel{gap:4px;padding:6px}.ing{padding:3px 1px 2px}
 header{padding:calc(env(safe-area-inset-top,0px) + 4px) 14px 4px}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
.sp3{position:relative;flex:1;display:flex;flex-direction:column;align-items:center;padding:12px 24px calc(34px + env(safe-area-inset-bottom,0px));text-align:center;min-height:0}
.sp3-mid{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px}
.sp3-art{position:relative;width:130px;height:184px;animation:spfloat 3s ease-in-out infinite;margin-bottom:6px}
@keyframes spfloat{50%{transform:translateY(-8px) rotate(-2deg)}}
.sp3-t{font-size:2.7rem;font-weight:800;margin:0;line-height:1;letter-spacing:.01em}
.sp3-rule{width:230px;max-width:70vw;height:9px;background:linear-gradient(90deg,#8fcf8f 0 50%,var(--pink) 50% 100%);transform:skewX(-30deg);border-radius:2px}
.sp3-tag{color:var(--soft);font-weight:700;margin:4px 0 0;max-width:290px;line-height:1.35}
.sp3-me{font-weight:800;color:var(--pink-d);margin:0}
.sp3-foot{width:100%;max-width:320px;display:flex;flex-direction:column;align-items:center;gap:8px;min-height:92px;justify-content:flex-end}
.sp3-msg{font-weight:800;color:var(--soft);font-size:.95rem}
.sp3-bar{position:relative;width:100%;height:30px;border-radius:15px;background:#d8c6ae;overflow:hidden}
.sp3-bar i{position:absolute;left:0;top:0;bottom:0;width:0;border-radius:15px;background:#4a3526}
.sp3-bar span{position:absolute;inset:0;display:grid;place-items:center;font-weight:800;font-size:.95rem;color:#fff}
.sp3-foot [hidden]{display:none!important}
.sp3-ver{position:absolute;left:18px;bottom:calc(14px + env(safe-area-inset-bottom,0px));font-weight:800;font-size:.85rem;color:var(--soft);opacity:.8}
.splash:has(.sp4){padding-top:0;background:#f4e2cc}
.sp4{position:absolute;inset:0;overflow:hidden;background:#f4e2cc}
.sp4-st{position:absolute;top:0;width:768px;height:1376px;overflow:hidden;transform-origin:0 0;background:url(../img/splash2.jpg) 0 0/768px 1376px no-repeat;font-family:"Baloo 2",system-ui,sans-serif}
.sp4-st [hidden]{display:none!important}
.sp4-lan{position:absolute;width:80px;height:144px;transform-origin:39px 2px;animation:spswing 3.4s ease-in-out infinite alternate}
.sp4-lan.b{animation-duration:3s;animation-delay:-1.4s}
@keyframes spswing{from{transform:rotate(-6deg)}to{transform:rotate(6deg)}}
.sp4-f{position:absolute;height:auto;animation:spfloat2 4s ease-in-out infinite;filter:drop-shadow(0 4px 4px rgba(90,60,30,.18))}
@keyframes spfloat2{0%,100%{transform:translateY(0) rotate(-6deg)}50%{transform:translateY(-16px) rotate(6deg)}}
.sp4-cloud{position:absolute;top:150px;width:150px;opacity:.85;animation:spcloud 38s linear infinite}
@keyframes spcloud{from{transform:translateX(-200px)}to{transform:translateX(900px)}}
.sp4-z{position:absolute;left:470px;top:690px;font-weight:800;font-size:30px;color:#8a6f58;opacity:0;animation:spz 3s ease-out infinite}
@keyframes spz{0%{opacity:0;transform:translate(0,0) scale(.6)}20%{opacity:1}100%{opacity:0;transform:translate(46px,-80px) scale(1.2)}}
.sp4-t{position:absolute;left:0;right:0;top:548px;margin:0;text-align:center;font-size:72px;font-weight:800;line-height:1;color:#4a3526;white-space:nowrap;letter-spacing:.01em;
  text-shadow:0 4px 0 #fff8ee,4px 0 0 #fff8ee,-4px 0 0 #fff8ee,0 -4px 0 #fff8ee,3px 3px 0 #fff8ee,-3px 3px 0 #fff8ee,3px -3px 0 #fff8ee,-3px -3px 0 #fff8ee,0 8px 12px rgba(90,60,30,.25)}
.sp4-head{position:absolute;left:446px;top:684px;width:83px;height:77px;transform-origin:41px 68px;animation:sphead 4.2s ease-in-out infinite}
@keyframes sphead{0%,40%,100%{transform:rotate(0)}48%{transform:rotate(-5deg)}56%{transform:rotate(3deg)}63%{transform:rotate(-3deg)}70%{transform:rotate(2deg)}78%{transform:rotate(0) translateY(1px)}}
.sp4-tail{position:absolute;left:508px;top:744px;width:80px;height:38px;transform-origin:72px 12px;animation:sptail 3.2s ease-in-out infinite}
@keyframes sptail{0%,55%,100%{transform:rotate(0)}65%{transform:rotate(6deg)}75%{transform:rotate(-1deg)}85%{transform:rotate(5deg)}}
.sp4-rule{display:none;position:absolute;left:224px;top:634px;width:320px;height:12px;background:linear-gradient(90deg,#8fcf8f 0 50%,#ef7f98 50% 100%);transform:skewX(-30deg);border-radius:2px;box-shadow:0 0 0 3px #fff8ee}
.sp4-tag{position:absolute;left:74px;right:74px;overflow:hidden;top:1046px;margin:0;text-align:center;font-size:26px;white-space:nowrap;font-weight:700;color:#6b4e38;line-height:1.3}
.sp4-me{position:absolute;left:90px;right:90px;top:1122px;margin:0;text-align:center;font-size:28px;font-weight:800;color:#c2506c}
.sp4-foot{position:absolute;left:154px;width:460px;top:1170px;height:120px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:10px}
.sp4-msg{font-weight:800;color:#6b4e38;font-size:26px}
.sp4-bar{position:relative;width:100%;height:48px;border-radius:24px;background:#d8c6ae;overflow:hidden;box-shadow:inset 0 0 0 3px rgba(74,53,38,.15)}
.sp4-bar i{position:absolute;left:0;top:0;bottom:0;width:0;border-radius:24px;background:#4a3526}
.sp4-bar span{position:absolute;inset:0;display:grid;place-items:center;font-weight:800;font-size:26px;color:#fff}
.sp4-go{width:100%;height:78px;border:0;border-radius:26px;background:#ef7f98;color:#fff;font-family:inherit;font-weight:800;font-size:36px;box-shadow:0 7px 0 #c95c76;cursor:pointer}
.sp4-go:active{transform:translateY(5px);box-shadow:0 2px 0 #c95c76}
.sp4-help{background:none;border:0;font-family:inherit;font-weight:800;font-size:26px;color:#6b4e38;text-decoration:underline;cursor:pointer;padding:4px 12px}
.sp4-ver{position:absolute;left:84px;top:1318px;font-weight:800;font-size:26px;color:#6b4e38;opacity:.85}
body:not(.selling){background:#f6ecd6}
#q3stage img,.q3spr,.q3pop,.q3fc,.q3face{filter:none!important}
#q3tint,.q3spr::after,.q3pop::after{content:'';position:absolute;inset:0;background:var(--tint,transparent);opacity:var(--tinta,0);mix-blend-mode:multiply;pointer-events:none}
body:not(.selling)::after{content:'';position:fixed;inset:0;z-index:-1;background:var(--tint,transparent);opacity:var(--tinta,0);mix-blend-mode:multiply;pointer-events:none}
#q3{background:var(--bg)!important}
.thg{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:10px}.thb{border:2px solid var(--line);background:var(--bg);border-radius:14px;padding:8px 4px;font-weight:800;font-size:.78rem;color:var(--ink);display:flex;flex-direction:column;align-items:center;gap:5px;cursor:pointer}.thb i{width:34px;height:34px;border-radius:50%;box-shadow:0 0 0 2px rgba(0,0,0,.12)}.thb.on{border-color:var(--pink);box-shadow:0 0 0 2px var(--pink)}
body.dark .board{filter:none}
body:not(.selling)::before{content:'';position:fixed;inset:0;z-index:-1;background:#f6ecd6 url(../img/kho.jpg) center top/cover no-repeat;pointer-events:none}
#q3rain{position:absolute;left:0;top:70px;width:768px;height:290px;overflow:hidden;pointer-events:none;-webkit-mask-image:linear-gradient(#000 55%,transparent);mask-image:linear-gradient(#000 55%,transparent)}
#q3rain i{position:absolute;left:0;right:0;will-change:transform}
#q3rain .r1{top:-140px;height:430px;background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22140%22%20height%3D%22140%22%3E%3Cg%20stroke%3D%22rgb%28150%2C190%2C225%29%22%20stroke-opacity%3D%220.75%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%3E%3Cline%20x1%3D%2235.4%22%20y1%3D%2268.6%22%20x2%3D%2232.4%22%20y2%3D%2282.6%22/%3E%3Cline%20x1%3D%2252.8%22%20y1%3D%2276.1%22%20x2%3D%2249.8%22%20y2%3D%2290.1%22/%3E%3Cline%20x1%3D%2286.6%22%20y1%3D%228.3%22%20x2%3D%2283.6%22%20y2%3D%2222.3%22/%3E%3Cline%20x1%3D%225.7%22%20y1%3D%22105.5%22%20x2%3D%222.7%22%20y2%3D%22119.5%22/%3E%3Cline%20x1%3D%2238.2%22%20y1%3D%2229.5%22%20x2%3D%2235.2%22%20y2%3D%2243.5%22/%3E%3Cline%20x1%3D%22135.4%22%20y1%3D%2259.3%22%20x2%3D%22132.4%22%20y2%3D%2273.3%22/%3E%3Cline%20x1%3D%22114.4%22%20y1%3D%2260.0%22%20x2%3D%22111.4%22%20y2%3D%2274.0%22/%3E%3Cline%20x1%3D%2288.4%22%20y1%3D%2219.0%22%20x2%3D%2285.4%22%20y2%3D%2233.0%22/%3E%3Cline%20x1%3D%2287.8%22%20y1%3D%22109.4%22%20x2%3D%2284.8%22%20y2%3D%22123.4%22/%3E%3C/g%3E%3C/svg%3E");background-size:140px 140px;animation:q3rain1 .55s linear infinite}
#q3rain .r2{top:-200px;height:490px;background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22200%22%20height%3D%22200%22%3E%3Cg%20stroke%3D%22rgb%28150%2C190%2C225%29%22%20stroke-opacity%3D%220.5%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%3E%3Cline%20x1%3D%22104.5%22%20y1%3D%22137.9%22%20x2%3D%22101.5%22%20y2%3D%22151.9%22/%3E%3Cline%20x1%3D%22132.9%22%20y1%3D%2211.9%22%20x2%3D%22129.9%22%20y2%3D%2225.9%22/%3E%3Cline%20x1%3D%22149.6%22%20y1%3D%22109.9%22%20x2%3D%22146.6%22%20y2%3D%22123.9%22/%3E%3Cline%20x1%3D%2261.8%22%20y1%3D%225.8%22%20x2%3D%2258.8%22%20y2%3D%2219.8%22/%3E%3Cline%20x1%3D%22170.2%22%20y1%3D%2287.9%22%20x2%3D%22167.2%22%20y2%3D%22101.9%22/%3E%3Cline%20x1%3D%22142.0%22%20y1%3D%22163.5%22%20x2%3D%22139.0%22%20y2%3D%22177.5%22/%3E%3C/g%3E%3C/svg%3E");background-size:200px 200px;animation:q3rain2 .9s linear infinite;opacity:.8}
@keyframes q3rain1{from{transform:translate(0,0)}to{transform:translate(-30px,140px)}}
@keyframes q3rain2{from{transform:translate(0,0)}to{transform:translate(-43px,200px)}}
.q3burst{position:absolute;width:44px;pointer-events:none;z-index:6}
/* ---------- QUẦY PHA 3.0 ---------- */
#q3{position:fixed;left:0;right:0;bottom:0;top:0;overflow:hidden;overflow:clip;overscroll-behavior:none;touch-action:manipulation;background:#f6e3c3;z-index:5}
#q3stage{position:absolute;width:768px;height:1376px;transform-origin:0 0;background-color:#f6e3c3;background-image:url(../img/bg2.jpg);background-size:768px 1376px;background-repeat:no-repeat;font-family:"Baloo 2",system-ui,sans-serif;color:#3b2a20;-webkit-user-select:none;user-select:none}
#q3stage button{font-family:inherit;color:inherit;background:none;border:0;padding:0;margin:0;cursor:pointer;-webkit-tap-highlight-color:transparent}
#q3stage [hidden]{display:none!important}
.q3lane{position:absolute;left:18px;top:78px;width:736px;height:105px;padding-top:4px;padding-bottom:4px;box-sizing:border-box;display:flex;gap:4px;align-items:center;overflow-x:auto;overflow-y:visible;-webkit-overflow-scrolling:touch;scrollbar-width:none;}
.rowi .icon{position:relative}.gtab{width:100%;border-collapse:collapse;font-size:.9rem;margin:4px 0}.gtab td,.gtab th{border-bottom:1px dashed var(--line);padding:4px 6px;text-align:left}.gtab th{color:var(--soft);font-weight:700}
.appdot{position:absolute;right:-2px;bottom:-2px;width:12px;height:12px;border-radius:50%;border:2px solid #fff}.icon .tfc{display:inline-block;width:40px;height:39px}
.q3nat{font-style:italic;opacity:.85}.q3tr{font-size:.7em;color:#8a6aa8;font-weight:700}.rfimg{display:block;width:40px;height:39px}.rstar{border-color:#b98be0!important;background:#f5ecfb!important;overflow:hidden}
.c8{font-size:2.4rem;font-weight:800;letter-spacing:4px;text-align:center;background:var(--bg);border:2px dashed var(--pink);border-radius:14px;padding:8px;margin:6px 0;user-select:all;font-variant-numeric:tabular-nums}.c8more{margin:6px 0}.c8more summary{cursor:pointer;color:var(--soft);font-weight:700;font-size:.9rem;padding:4px 0}
.q3app{position:absolute;left:-6px;bottom:-4px;width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;border:2px solid #fff}.q3app img{width:14px;height:14px;filter:brightness(0) invert(1)}
.q3chip{overflow:visible !important;position:relative;width:70px;height:70px;border-radius:50%;flex:none;background:conic-gradient(var(--c) calc(var(--p)*360deg),#eadcc4 0)!important;padding:6px!important;box-sizing:border-box;box-shadow:0 3px 0 rgba(90,64,48,.3)}
.q3chip.q3on{outline:4px solid #ef7f98;outline-offset:2px}
.q3fc{display:block;width:56px;height:55px;border-radius:50%;background-color:#fffaf0;background-repeat:no-repeat;font-style:normal}
.q3fc.q3ph{display:grid;place-items:center;font-size:30px}
.q3n{position:absolute;right:-6px;bottom:-4px;background:#ef7f98;color:#fff;border-radius:10px;font-size:15px;padding:0 5px;border:2px solid #fff;line-height:1.3}
.rowi.offm>.ico,.rowi.offm>span:first-child,.rowi.offm .nm{opacity:.5}
.q3stc .q3fc{opacity:.55;filter:grayscale(.3)}
.q3st{position:absolute;right:-8px;top:-8px;background:#4a90c8;border:2px solid #fff;border-radius:50%;width:32px;height:32px;display:grid;place-items:center;animation:q3pulse2 1s ease-in-out infinite}.q3st .ico{width:22px;height:22px;vertical-align:0}
@keyframes q3pulse2{50%{transform:scale(1.12)}}
.q3vip{position:absolute;left:-8px;bottom:-6px;background:#f0b43c;border:2px solid #fff;border-radius:50%;width:30px;height:30px;display:grid;place-items:center}.q3vip .ico{width:20px;height:20px;vertical-align:0}
.q3vipT{background:#f0b43c;color:#fff;border-radius:8px;padding:0 6px;font-weight:800;font-size:.85em}
.q3x{position:absolute;right:-14px;top:-12px;width:46px;height:46px;border-radius:50%;background:#e2574c;color:#fff;border:3px solid #fff;display:grid;place-items:center;font-size:36px;font-weight:800;line-height:1;box-shadow:0 2px 0 rgba(0,0,0,.2)}
.q3so{position:absolute;left:-8px;top:-6px;background:#e2574c;color:#fff;font-size:12px;border-radius:8px;padding:0 4px;line-height:1.4}
.q3chip.q3in{animation:q3in .6s ease-out}
@keyframes q3in{from{transform:translateX(120px);opacity:0}to{transform:none;opacity:1}}
.q3chip.angry{animation:q3shake .3s}
.q3wait{font-weight:800;font-size:20px;color:#8a6f58;background:rgba(255,250,240,.85);border-radius:12px;padding:4px 12px}
.q3face{will-change:transform;position:absolute;left:44px;top:181px;width:144px;height:141px;background-repeat:no-repeat;animation:q3bob 2.2s ease-in-out infinite;transform-origin:50% 100%}
.q3face.q3ph{display:grid;place-items:center;font-size:80px}
.q3bub{position:absolute;left:228px;top:183px;width:464px;height:108px;display:grid;grid-template-columns:50px 1fr;grid-template-rows:1fr auto;gap:4px 10px;padding:4px 8px 2px 4px;box-sizing:border-box}
#q3want{grid-row:span 2;width:50px;height:70px;align-self:end;position:relative;margin-bottom:4px}
#q3say{font-weight:600;font-size:24px;line-height:1.18;overflow:hidden}
#q3say b{color:#c2506c;font-weight:800}
.q3tabs span{display:inline-block;border-radius:8px;padding:0 6px;margin-right:3px;background:#f3e2c6;font-weight:800;font-size:.85em;cursor:pointer}
.q3tabs .q3cur{background:#ef7f98;color:#fff}.q3tabs .q3dn{background:#cfe9c9;color:#2f7a4f}
#q3stage .q3decl{background:#e2574c;color:#fff;border-radius:10px;padding:0 8px;font-weight:800;font-size:.8em}
.q3idle{color:#8a6f58;font-weight:800;display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;text-align:center;line-height:1.2}.q3idle small{font-size:.8em;font-weight:700;opacity:.8;margin-top:4px}
.q3bub.q3idleB .q3pat,.q3bub.q3idleB #q3want{display:none}.q3bub.q3idleB #q3say{grid-column:1/-1;grid-row:1/-1;font-size:26px!important}
.q3pat{display:flex;align-items:center;gap:8px;font-weight:800;font-size:17px;letter-spacing:.03em}
.q3bar{flex:1;height:20px;border-radius:10px;border:3px solid #4a3120;background:#fffaf0;overflow:hidden;box-sizing:border-box}
.q3bar i{display:block;height:100%;width:100%;background:#8fcf8f;border-radius:6px;transition:width .25s linear}
.q3tag{position:absolute;display:grid;place-items:center;font-weight:800;font-size:19px;letter-spacing:.02em;white-space:nowrap;color:#4a3120;line-height:1}
.q3jarT{position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:center;font-weight:800;font-size:16px;line-height:1.02;text-align:center;pointer-events:none}
.q3lbT{position:absolute;display:grid;place-items:center;font-weight:800;font-size:16px;line-height:1.02;text-align:center;pointer-events:none}
.q3z{position:absolute;border-radius:14px;transition:background .1s}
.q3z:active,.q3z.q3on{background:rgba(255,255,255,.28)!important}
.q3z.q3want{z-index:1;box-shadow:0 0 0 3px #fff,0 0 0 6px #ff6a00;animation:q3wantP 1.4s ease-in-out infinite;will-change:transform}
@keyframes q3wantP{0%,100%{transform:scale(1)}50%{transform:scale(1.04)}}
@media (prefers-reduced-motion:reduce){.q3z.q3want{animation:none}}
.q3z.q3empty::after,.q3z.q3lock::after{content:"Hết";position:absolute;inset:6px;border-radius:10px;background:rgba(255,250,240,.75);display:grid;place-items:center;font-weight:800;font-size:22px;color:#8a6f58}
.q3z.q3lock::after{content:"🔒";font-size:26px;background:rgba(240,230,215,.85)}
.q3z.q3pick{box-shadow:0 0 0 4px #5aae86}
.q3z.q3coachT{z-index:2;box-shadow:0 0 0 4px #4a90c8;animation:none}
.q3z.q3coachT::before{content:'';position:absolute;inset:-10px;border:5px solid #4a90c8;border-radius:18px;animation:q3ring 1.1s ease-out infinite;will-change:transform,opacity;pointer-events:none}
@keyframes q3ring{from{transform:scale(.96);opacity:1}to{transform:scale(1.08);opacity:0}}
@keyframes q3pulse{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(1.03);opacity:0.92}}
#q3coach{position:absolute;left:210px;top:296px;width:420px;min-height:40px;box-sizing:border-box;background:#4a90c8;color:#fff;border-radius:14px;padding:6px 12px;font-weight:800;font-size:19px;line-height:1.15;display:flex;align-items:center;justify-content:center;text-align:center;box-shadow:0 4px 0 #2f6c9c;pointer-events:none;z-index:4}
.q3jar{touch-action:none}
.q3badge{position:absolute;min-width:28px;height:28px;border-radius:14px;background:#f3d6b0;border:2.5px solid #5a4030;display:grid;place-items:center;font-weight:800;font-size:16px;line-height:1;padding:0 4px;box-sizing:border-box;pointer-events:none;font-variant-numeric:tabular-nums}
.q3badge.q3sm{min-width:24px;height:24px;font-size:13px;border-width:2px}
.q3g{position:absolute;left:0;top:0;width:100%;height:100%}
.q3g>svg,.q3g>img{position:absolute;left:0;top:0;width:100%;height:100%;overflow:visible;pointer-events:none;max-width:none}
.q3g>img.q3lid{left:-.5%;top:-20.4%;height:48.6%}
#q3cup{position:absolute;will-change:transform}
.q3patch{position:absolute;background:#faefd4;pointer-events:none}/* che vệt kệ dư; nằm dưới lớp phủ màu chung của quầy */
.q3tem{position:absolute;left:50%;top:55%;transform:translate(-50%,-50%);z-index:4;pointer-events:none}
#q3noCup{position:absolute;left:40px;top:760px;width:186px;text-align:center;font-weight:800;font-size:22px;color:#7a5530;line-height:1.15;pointer-events:none}
.q3spr{position:absolute;background-image:url(../img/bg.jpg);background-repeat:no-repeat;background-size:768px 1376px;pointer-events:none}
.q3pop{position:absolute;background-image:url(../img/bg.jpg);background-repeat:no-repeat;background-size:768px 1376px;transform-origin:50% 100%;pointer-events:none}
.q3pop.wob{animation:q3wob .28s ease-in-out infinite alternate}
.q3gauge{position:absolute;left:48px;top:878px;width:170px;height:18px;border-radius:9px;background:#5b3f25;padding:3px;box-sizing:border-box}
.q3lv{height:100%;border-radius:6px;background:linear-gradient(90deg,#e2574c,#f4b73a 60%,#5aae86 80%);width:0}
.q3ok{position:absolute;top:-4px;bottom:-4px;left:74%;width:12%;border:3px solid #fff;border-radius:5px}
/* ===== HINT TEXT BÊN DƯỚI LY PHA CHẾ ===== */
#q3hint{
  position:absolute;
  left:10px;
  top:904px;
  width:246px;
  min-height:36px;
  max-height:48px;
  box-sizing:border-box;
  text-align:center;
  font-weight:700;
  font-size:12.5px;
  color:#4a2f1b;
  line-height:1.3;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:10;
  pointer-events:none;
}
.q3hint-box,
.q3cup-opt-box {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.q3hint-box.q3hint-done,
.q3cup-opt-box.done {
  background: transparent !important;
  border: none !important;
}
.q3cup-opt-txt,
.q3hint-miss,
.q3hint-title,
.q3hint-need {
  font-family: "Baloo 2", system-ui, -apple-system, sans-serif;
  font-size: 16.5px;
  font-weight: 800;
  color: #3b2010;
  letter-spacing: 0.3px;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.95), 0 0 8px rgba(255, 255, 255, 0.8);
}
.q3cup-opt-box.done .q3cup-opt-txt,
.q3hint-box.q3hint-done {
  color: #15803d !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.95), 0 0 8px rgba(220, 252, 231, 0.85);
}
body.dark .q3cup-opt-txt,
body.dark #q3hint .q3hint-miss {
  color: #fed7aa !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}
body.dark .q3cup-opt-box.done .q3cup-opt-txt,
body.dark #q3hint .q3hint-box.q3hint-done {
  color: #86efac !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}
.q3fly{position:fixed;left:0;top:0;pointer-events:none;z-index:25}
.q3flyT{position:fixed;pointer-events:none;z-index:25;font-weight:800;font-size:13px;color:#fff;background:rgba(59,42,32,.85);border-radius:8px;padding:0 6px;white-space:nowrap;font-family:"Baloo 2",system-ui,sans-serif}
@keyframes q3bob{50%{transform:translateY(-3px)}}
@keyframes q3wob{from{transform:scale(1.02,1.02)}to{transform:scale(1.06,1.04)}}
@keyframes q3shake{25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}

/* ===== NHÂN VIÊN GEN Z WIDGET HIỆN ĐẠI & SANG TRỌNG ===== */
.gz-widget{
  position:relative!important;
  left:auto!important;
  bottom:auto!important;
  transform:none!important;
  width:100%!important;
  height:64px!important;
  min-height:64px!important;
  max-height:64px!important;
  border-radius:20px;
  background:linear-gradient(135deg, #ffffff, #fef7f0);
  box-shadow:0 8px 30px rgba(78,48,25,0.16), 0 2px 8px rgba(0,0,0,0.04);
  border:1.5px solid rgba(230,185,145,0.5);
  display:flex;
  align-items:center;
  padding:5px 14px;
  box-sizing:border-box!important;
  gap:12px;
  z-index:99990;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  user-select:none;
  transition:none!important;
  animation:none!important;
}
.gz-widget:hover{box-shadow:0 12px 34px rgba(78,48,25,0.22), 0 3px 10px rgba(0,0,0,0.06);}
.gz-widget:active{transform:none;}
body.dark .gz-widget{
  background:linear-gradient(135deg, rgba(38,30,24,0.96), rgba(48,38,30,0.94));
  border-color:rgba(140,100,70,0.4);
  box-shadow:0 8px 30px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
}
.gz-avatar{
  position:relative;
  width:44px;
  height:44px;
  border-radius:50%;
  background:radial-gradient(circle at 35% 35%, #fff3ea, #ffd8c2);
  border:2px solid #ffbe98;
  display:grid;
  place-items:center;
  font-size:24px;
  flex:none;
  box-shadow:0 3px 10px rgba(238,125,66,0.25);
  transition:transform 0.2s ease;
}
body.dark .gz-avatar{
  background:radial-gradient(circle at 35% 35%, #4a3628, #35251a);
  border-color:#8c5a3a;
}
.gz-hp{display:none !important}
.gz-body{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:3px}
.gz-head-row{display:flex;align-items:center;gap:8px;flex-wrap:nowrap}
.gz-name{font-weight:800;font-size:15px;color:#2e1d13;letter-spacing:-0.2px;white-space:nowrap}
body.dark .gz-name{color:#fed7aa}
.gz-pill{font-size:11px;font-weight:800;padding:2px 8px;border-radius:12px;line-height:1.3;white-space:nowrap;letter-spacing:0.1px}
.gz-pill-work{
  background:linear-gradient(135deg, #ecfdf5, #d1fae5);
  color:#047857;
  border:1px solid #a7f3d0;
  box-shadow:0 1px 4px rgba(16,185,129,0.15);
}
body.dark .gz-pill-work{
  background:rgba(16,185,129,0.2);
  color:#6ee7b7;
  border-color:rgba(16,185,129,0.4);
}
.gz-pill-sulk{
  background:linear-gradient(135deg, #fef2f2, #fee2e2);
  color:#b91c1c;
  border:1px solid #fca5a5;
  animation:gzBlink 1s infinite alternate;
}
body.dark .gz-pill-sulk{
  background:rgba(239,68,68,0.25);
  color:#fca5a5;
  border-color:rgba(239,68,68,0.5);
}
.gz-pill-stole{
  background:linear-gradient(135deg, #fef2f2, #fed7aa);
  color:#c2410c;
  border:1px solid #f97316;
  font-weight:900;
  animation:gzBlink 0.5s infinite alternate;
}
.gz-msg{font-size:12.5px;color:#6b4c35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600}
body.dark .gz-msg{color:#d6bda8}

/* NÚT BẮT QUẢ TANG THAY CHO NÚT GIÁM SÁT */
.gz-poke-chip{
  background:linear-gradient(135deg, #fff7ed, #ffedd5);
  color:#c2410c;
  font-weight:800;
  font-size:13px;
  padding:7px 14px;
  border-radius:14px;
  border:1.5px solid #fed7aa;
  flex:none;
  box-shadow:0 2px 8px rgba(194,65,12,0.14);
  display:flex;
  align-items:center;
  gap:5px;
  cursor:pointer;
  transition:all 0.2s ease;
}
.gz-poke-chip:hover{
  transform:scale(1.04);
  box-shadow:0 4px 12px rgba(194,65,12,0.24);
}
.gz-poke-chip:active{transform:scale(0.96)}
body.dark .gz-poke-chip{
  background:linear-gradient(135deg, #422006, #7c2d12);
  color:#ffedd5;
  border-color:#9a3412;
}

/* KHI ĐANG ĐÁ BILL - NHẤP NHÁY NỔI BẬT */
.gz-widget.gz-stealing{
  background:linear-gradient(135deg, #fff1f2, #ffe4e6);
  border:2px solid #f43f5e;
  box-shadow:0 8px 32px rgba(244,63,94,0.45);
  animation:none!important;
  transform:none!important;
}
body.dark .gz-widget.gz-stealing{
  background:linear-gradient(135deg, #4c0519, #881337);
  border-color:#fb7185;
}
.gz-poke-chip.catch-active{
  background:linear-gradient(135deg, #ef4444, #dc2626);
  color:#fff;
  border:2px solid #fee2e2;
  box-shadow:0 4px 20px rgba(220,38,38,0.6);
  font-weight:900;
  animation:gzCatchPulse 0.5s infinite alternate;
}

@keyframes gzCatchPulse{
  0%{transform:scale(0.97);box-shadow:0 2px 8px rgba(220,38,38,0.4)}
  100%{transform:scale(1.06);box-shadow:0 6px 24px rgba(220,38,38,0.85)}
}
@keyframes gzStealVibrate{0%,100%{transform:none}}

/* KHI ĐÌNH CÔNG DỖ DÀNH */
.gz-widget.gz-sulking{
  background:linear-gradient(135deg, #fff2f2, #ffe8ec);
  border-color:#ff9eaf;
  box-shadow:0 6px 24px rgba(235,87,87,0.35);
  animation:none!important;
  transform:none!important;
}
body.dark .gz-widget.gz-sulking{
  background:linear-gradient(135deg, #3f1d24, #2a1519);
  border-color:#f43f5e;
}
.gz-poke-chip.cheer-btn{
  background:linear-gradient(135deg, #fdf2f8, #fce7f3);
  color:#db2777;
  border-color:#fbcfe8;
  box-shadow:0 2px 8px rgba(219,39,119,0.2);
}
.gz-cheer-row{display:flex;align-items:center;gap:8px;margin-top:1px}
.gz-cheer-hint{font-size:12px;font-weight:800;color:#e2574c}
.gz-hearts-bar{font-size:14px;letter-spacing:1px}
.gz-cheer-num{font-size:13px;color:#d32f2f;font-weight:900}
.gz-fly-heart{position:absolute;pointer-events:none;font-size:24px;z-index:99;animation:gzFlyUp .9s cubic-bezier(.2,.8,.3,1) forwards}
@keyframes gzFlyUp{0%{transform:translate(-50%,-50%) scale(.6);opacity:1}100%{transform:translate(-50%,-100px) scale(1.4);opacity:0}}
@keyframes gzBlink{0%{opacity:1}100%{opacity:.5}}
@keyframes gzShakeSulk{0%,100%{transform:none}}

/* ===== GEN Z GỢI Ý NHẬP KHO ===== */
.gz-suggest-card{
  background:linear-gradient(135deg,#fcf8ff,#f6effd);
  border:2px solid #e2ccf7;
  border-radius:18px;
  padding:12px 14px;
  margin-bottom:12px;
  box-shadow:0 4px 14px rgba(138,90,195,.12);
}
.gz-sugg-head{display:flex;align-items:center;gap:12px;margin-bottom:8px}
.gz-sugg-title-box{flex:1;min-width:0}
.gz-sugg-title{font-size:16px;font-weight:800;color:#5a2c85}
.gz-sugg-sub{font-size:13px;color:#8562a6;font-weight:600}
.gz-sugg-desc{font-size:14px;color:#4a325e;line-height:1.45;margin-bottom:10px}
.gz-apply-btn{
  width:100%;
  padding:10px 14px;
  font-size:15px;
  font-weight:800;
  border-radius:14px;
  background:linear-gradient(135deg,#9b5de5,#7b2cbf)!important;
  color:#fff!important;
  border:none!important;
  box-shadow:0 4px 12px rgba(123,44,191,.35);
}
.gz-apply-btn:active{transform:scale(0.98)}

/* ===== NHÂN VIÊN ĐI CHỢ WIDGET ===== */
.buyer-widget{
  position:fixed;
  top:calc(70px + env(safe-area-inset-top, 0px));
  right:12px;
  left:auto;
  z-index:99992;
  display:flex;
  align-items:center;
  gap:7px;
  padding:4px 10px;
  border-radius:24px;
  background:linear-gradient(135deg, #ffffff, #f0fdf4);
  box-shadow:0 4px 14px rgba(5,150,105,0.22), 0 2px 5px rgba(0,0,0,0.06);
  border:1.5px solid #10b981;
  color:#065f46;
  font-family:inherit;
  user-select:none;
  pointer-events:auto;
  cursor:pointer;
  transition:all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@media (min-width: 768px){
  .buyer-widget{
    right:calc(50% - 270px);
    left:auto;
  }
}
body.dark .buyer-widget{
  background:linear-gradient(135deg, rgba(20,35,30,0.96), rgba(15,28,24,0.94));
  border-color:#059669;
  color:#6ee7b7;
  box-shadow:0 4px 16px rgba(0,0,0,0.4);
}
.buyer-widget.on-trip{
  background:linear-gradient(135deg, #fffbeb, #ecfdf5);
  border-color:#f59e0b;
  box-shadow:0 4px 16px rgba(245,158,11,0.35);
  animation:buyerWobble 1.2s infinite ease-in-out;
}
@keyframes buyerWobble{
  0%, 100%{ transform:translateY(0); }
  50%{ transform:translateY(-3px); }
}

/* ===== NHÂN VIÊN SINH VIÊN CUỐI THÁNG WIDGET ===== */
.sv-widget{
  border-color: rgba(99, 102, 241, 0.45);
  background: linear-gradient(135deg, rgba(245, 247, 255, 0.96), rgba(238, 242, 255, 0.94));
}
body.dark .sv-widget{
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.95), rgba(49, 46, 129, 0.92));
  border-color: rgba(129, 140, 248, 0.4);
}
.sv-widget.sv-stealing{
  border: 2px solid #ef4444;
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.98), rgba(254, 226, 226, 0.96));
  animation:none!important;
  transform:none!important;
}
body.dark .sv-widget.sv-stealing{
  background: linear-gradient(135deg, rgba(69, 10, 10, 0.96), rgba(127, 29, 29, 0.92));
  border-color: #f87171;
}
@keyframes svPulseAlert{
  0%, 100%{ box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  50%{ box-shadow: 0 0 16px 4px rgba(239, 68, 68, 0.35); }
}
.sv-pill-steal{
  background: #dc2626 !important;
  color: #fff !important;
  font-weight: 700;
  animation: svShake 0.4s infinite alternate;
}
@keyframes svShake{
  0%{ transform: scale(1); }
  100%{ transform: scale(1.04); }
}
.sv-cheer-btn{
  background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
  font-weight: 700;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 12px;
}

/* ===== BANNER THÔNG BÁO & QR ZALO ===== */
.sp-banner-overlay{
  position:fixed;
  inset:0;
  z-index:999999;
  background:rgba(20,14,10,.86);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:14px;
  animation:spbFadeIn .3s ease-out;
}
@keyframes spbFadeIn{from{opacity:0}to{opacity:1}}
.sp-banner-card{
  position:relative;
  background:#fffdfa;
  border-radius:20px;
  padding:16px 14px 14px;
  max-width:360px;
  width:100%;
  max-height:88vh;
  overflow-y:auto;
  text-align:center;
  box-shadow:0 16px 40px rgba(0,0,0,.35),0 0 0 1px rgba(255,255,255,.4);
  border:2px solid #ecd8c5;
  box-sizing:border-box;
  animation:spbPop .35s cubic-bezier(.18,.89,.32,1.2);
}
@keyframes spbPop{from{transform:scale(.85);opacity:0}to{transform:scale(1);opacity:1}}
.sp-banner-close{
  position:absolute;
  top:12px;
  right:12px;
  width:32px;
  height:32px;
  border-radius:50%;
  border:none;
  background:#f0e4d6;
  color:#6b4e38;
  font-size:16px;
  font-weight:900;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:transform .15s;
}
.sp-banner-close:active{transform:scale(.9)}
.sp-banner-badge{
  display:inline-block;
  background:#ffe7ed;
  color:#d33a61;
  font-weight:800;
  font-size:13px;
  padding:4px 14px;
  border-radius:20px;
  margin-bottom:8px;
  border:1px solid #f8c2ce;
}
.sp-banner-title{
  font-size:24px;
  font-weight:800;
  color:#4a3526;
  margin:0 0 10px;
  font-family:"Baloo 2",system-ui,sans-serif;
  line-height:1.2;
}
.sp-banner-text{
  font-size:13.5px;
  line-height:1.55;
  color:#5a4232;
  margin:0 0 14px;
  text-align:left;
  font-weight:500;
  background:#faf4eb;
  padding:12px 14px;
  border-radius:14px;
  border-left:4px solid #ef7f98;
}
.sp-banner-qr-wrap{
  background:#f4ece0;
  border-radius:14px;
  padding:8px;
  margin-bottom:8px;
  display:flex;
  flex-direction:column;
  align-items:center;
  border:1.5px dashed #cfb9a0;
}
.sp-banner-qr{
  width:140px;
  max-width:100%;
  height:140px;
  object-fit:contain;
  border-radius:10px;
  box-shadow:0 4px 12px rgba(0,0,0,.12);
  display:block;
}
.sp-banner-qr-caption{
  font-size:12px;
  font-weight:700;
  color:#7e5a40;
  margin-top:8px;
}
.sp-banner-btn{
  width:100%;
  height:40px;
  font-size:15px !important;
  border:none;
  border-radius:16px;
  background:linear-gradient(135deg,#ef7f98,#e05e7e);
  color:#fff;
  font-size:17px;
  font-weight:800;
  font-family:inherit;
  cursor:pointer;
  box-shadow:0 6px 16px rgba(224,94,126,.35);
  transition:transform .15s,box-shadow .15s;
}
.sp-banner-btn:active{transform:translateY(2px);box-shadow:0 2px 6px rgba(224,94,126,.3)}

/* BEST SELLER GỢI Ý MENU */
.menu-bestseller-card {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1.5px solid #fcd34d;
  border-radius: 12px;
  padding: 8px 12px;
  margin: 6px 0 10px 0;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.12);
}
.mbs-head {
  font-size: 0.82rem;
  font-weight: 800;
  color: #92400e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.mbs-sub-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: #b45309;
  background: rgba(251, 191, 36, 0.3);
  padding: 1px 6px;
  border-radius: 6px;
}
.mbs-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.mbs-item {
  flex: 1;
  min-width: 100px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.82rem;
  border: 1px solid #fed7aa;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.mbs-rank {
  font-size: 0.95rem;
}
.mbs-name {
  font-weight: 700;
  color: #451a03;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mbs-qty {
  font-weight: 800;
  color: #ea580c;
  font-size: 0.76rem;
}
.it.it-bestseller {
  background: transparent !important;
}

/* NÚT THANH LÝ NGUYÊN LIỆU KHO (30%) */
.sell-mat-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 2px 7px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  margin-left: 6px;
  vertical-align: middle;
  transition: all 0.15s;
}
.sell-mat-btn:hover {
  background: #fef3c7;
  color: #92400e;
  border-color: #f59e0b;
  transform: translateY(-1px);
}
.sell-mat-btn:active {
  transform: translateY(1px);
}

/* NÚT BÁO CÔNG AN TIỀN GIẢ - NẰM GÓC TRÊN BÊN PHẢI NỔI BẬT DỄ THẤY */
.fake-police-bottom-btn {
  position: fixed;
  top: calc(72px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  right: auto !important;
  bottom: auto !important;
  z-index: 100001;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  border: 1.5px solid #fecaca;
  border-radius: 14px;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.45);
  animation: policeBlink 0.7s infinite alternate;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 3px;
}
.fake-police-bottom-btn:hover {
  transform: translateX(-50%) scale(1.05);
}
.fake-police-bottom-btn:active {
  transform: translateX(-50%) scale(0.95);
}
.fake-police-header-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  border: 2px solid #fecaca;
  border-radius: 18px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.4);
  animation: policeBlink 0.8s infinite alternate;
  white-space: nowrap;
}
@keyframes policeBlink {
  0% { transform: scale(0.96); box-shadow: 0 2px 6px rgba(220, 38, 38, 0.4); }
  100% { transform: scale(1.05); box-shadow: 0 4px 14px rgba(239, 68, 68, 0.7); background: linear-gradient(135deg, #dc2626, #b91c1c); }
}

/* MODAL HỒ SƠ ĐIỀU TRA TIỀN GIẢ CÔNG AN PHƯỜNG */
.police-report-wrap {
  text-align: left;
}
.police-report-badge {
  display: inline-block;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}
.police-report-title {
  margin: 4px 0 8px;
  font-size: 1.25rem;
  color: #dc2626;
  font-weight: 800;
}
body.dark .police-report-title {
  color: #f87171;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.police-report-desc {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 8px;
}
.police-legal-warning {
  background: #fffbeb;
  border: 1.5px dashed #f59e0b;
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: 0.84rem;
  line-height: 1.55;
  color: #78350f;
}

/* PHÁN QUYẾT ĐIỀU TRA TIỀN GIẢ (TỐ CÁO OAN / PHÁ ÁN) */
.verdict-title {
  margin: 4px 0 6px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.3px;
}
.verdict-title.fail {
  color: #dc2626;
}
body.dark .verdict-title.fail {
  color: #f87171;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.verdict-title.success {
  color: #059669;
}
body.dark .verdict-title.success {
  color: #34d399;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.verdict-desc {
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.55;
  margin: 6px 0 12px;
}
.verdict-desc .highlight-fail {
  color: #dc2626;
  font-weight: 800;
}
body.dark .verdict-desc .highlight-fail {
  color: #fca5a5;
}
.verdict-desc .highlight-success {
  color: #059669;
  font-weight: 800;
}
body.dark .verdict-desc .highlight-success {
  color: #6ee7b7;
}

.verdict-box {
  border-radius: 14px;
  padding: 12px 14px;
  margin: 10px 0;
  line-height: 1.6;
  font-size: 0.92rem;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.verdict-box.fail {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  color: #991b1b;
}
.verdict-box.fail .act-name {
  color: #991b1b;
}
.verdict-box.fail .amt-penalty {
  color: #dc2626;
  font-size: 1.12rem;
}
.verdict-box.fail .star-penalty {
  color: #dc2626;
  font-size: 1rem;
}
.verdict-box.fail .verdict-box-note {
  font-size: 0.82rem;
  color: #7f1d1d;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #fca5a5;
}

.verdict-box.success {
  background: #ecfdf5;
  border: 1.5px solid #a7f3d0;
  color: #065f46;
}
.verdict-box.success .amt-gain {
  color: #059669;
  font-size: 1.05rem;
}
.verdict-box.success .verdict-box-footer {
  border-top: 1px dashed #6ee7b7;
  margin-top: 6px;
  padding-top: 6px;
}
.verdict-box.success .amt-total {
  color: #047857;
  font-size: 1.15rem;
}
/* ===== HỒ SƠ ĐIỀU TRA: LƯỚI 2 Ô 2 HÀNG VỪA KHÍT MÀN HÌNH ===== */
.police-report-wrap {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}
.police-report-badge {
  display: inline-block;
  background: #fee2e2;
  color: #dc2626;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 3px;
}
.police-report-title {
  color: #b91c1c;
  font-size: 1.22rem;
  margin: 0 0 3px;
}
.police-report-desc {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.35;
  margin: 0 0 5px;
}
.police-legal-warning {
  background: #fffbeb;
  border: 1px dashed #f59e0b;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.73rem;
  line-height: 1.32;
  color: #92400e;
  margin-bottom: 6px;
  text-align: left;
}
.suspect-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 6px;
}
.suspect-card {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 7px 8px;
  transition: all 0.15s;
  text-align: left;
  min-height: 130px;
}
.suspect-card:hover {
  background: #f1f5f9;
  border-color: #ef4444;
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.12);
}
.suspect-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.suspect-avatar {
  font-size: 1.5rem;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.06);
  flex-shrink: 0;
}
.suspect-name {
  font-size: 0.82rem;
  color: #1e293b;
  font-weight: 700;
  line-height: 1.25;
  word-break: break-word;
}
.suspect-desc {
  font-size: 0.73rem;
  color: #64748b;
  line-height: 1.3;
  margin-bottom: 6px;
  flex: 1;
}
.suspect-choose-btn {
  width: 100%;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  padding: 5px 6px !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #fff !important;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25) !important;
  cursor: pointer;
  border: none;
  text-align: center;
  margin-top: auto;
}
.suspect-choose-btn:hover {
  filter: brightness(1.08);
}
.suspect-choose-btn:active {
  transform: scale(0.97);
}

/* ===== ĐOÀN KIỂM TRA ATTP & THỬ THÁCH TOÁN HỌC DỌN QUẦY NÉ PHẠT ===== */
.police-raid-overlay {
  position: absolute;
  inset: 0;
  background: rgba(18, 12, 10, 0.95);
  border-radius: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  box-sizing: border-box;
  text-align: center;
  animation: xdRaidFlash 0.6s infinite alternate;
}
@keyframes xdRaidFlash {
  0% { box-shadow: inset 0 0 30px rgba(239, 68, 68, 0.6); }
  100% { box-shadow: inset 0 0 70px rgba(239, 68, 68, 0.95); }
}
.police-badge-icon {
  font-size: 2.8rem;
  margin-bottom: 6px;
  animation: policePulse 0.5s infinite alternate;
}
@keyframes policePulse {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}
.police-title {
  color: #ff5252 !important;
  font-size: 1.25rem !important;
  font-weight: 900 !important;
  margin: 0 0 6px !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  line-height: 1.25;
}
.police-sub {
  color: #fef08a !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  margin-bottom: 10px !important;
  line-height: 1.35;
  max-width: 420px;
}
.police-timer-bar-wrap {
  width: 100%;
  max-width: 320px;
  height: 14px;
  background: rgba(255,255,255,0.2);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 6px;
  border: 1px solid rgba(255,255,255,0.4);
}
.police-timer-bar {
  height: 100%;
  background: linear-gradient(90deg, #ef4444, #f59e0b);
  border-radius: 8px;
  transition: width 0.1s linear;
}
.police-countdown-txt {
  font-weight: 900;
  color: #fef08a;
  margin-bottom: 8px;
  font-size: 1rem;
}
.police-math-box {
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid #f59e0b;
  border-radius: 16px;
  padding: 12px 10px;
  margin: 6px 0 10px;
  width: 100%;
  max-width: 340px;
  box-sizing: border-box;
}
.police-math-q {
  font-size: 1.75rem;
  font-weight: 900;
  color: #fef08a;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  margin-bottom: 10px;
  letter-spacing: 2px;
}
.police-math-opts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.police-math-btn {
  background: linear-gradient(135deg, #ffffff, #f1f5f9) !important;
  color: #0f172a !important;
  border: 2px solid #cbd5e1 !important;
  border-radius: 12px !important;
  padding: 10px 4px !important;
  font-size: 1.25rem !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  box-shadow: 0 3px 0 #94a3b8 !important;
  transition: all 0.1s !important;
}
.police-math-btn:hover {
  background: #fef08a !important;
  border-color: #f59e0b !important;
  transform: translateY(-2px);
}
.police-math-btn:active {
  transform: translateY(2px) !important;
  box-shadow: none !important;
}
.police-fine-card {
  background: #ffffff !important;
  color: #1e293b !important;
  border: 3px solid #ef4444 !important;
  border-radius: 20px !important;
  padding: 18px 16px !important;
  box-shadow: 0 14px 40px rgba(0,0,0,0.6) !important;
  max-width: 440px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  text-align: center !important;
}
.police-fine-header {
  font-size: 1.15rem !important;
  font-weight: 900 !important;
  color: #dc2626 !important;
  border-bottom: 2px dashed #fca5a5 !important;
  padding-bottom: 8px !important;
  margin-bottom: 12px !important;
}
.police-fine-body {
  font-size: 0.9rem !important;
  line-height: 1.5 !important;
  text-align: left;
}
.police-fine-amt {
  font-size: 1.35rem !important;
  font-weight: 900 !important;
  color: #dc2626 !important;
  margin: 10px 0 !important;
  text-align: center !important;
}
.police-fine-confirm-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 1rem !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 12px 20px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 10px rgba(220,38,38,0.3) !important;
  display: inline-block !important;
  margin-top: 8px !important;
  width: 100% !important;
}
.police-fine-confirm-btn:hover {
  background: #b91c1c !important;
}

/* ===== BANNER NÂNG CẤP CẤP ĐỘ (LEVEL UPGRADES) ===== */
.upg-lv-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #fffcf6, #fff7eb);
  border: 1.5px solid #fed7aa;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.08);
}
.ulv-info {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.ulv-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  color: #7c2d12;
  background: #ffedd5;
  border-radius: 999px;
  padding: 2px 8px;
  margin-bottom: 4px;
  letter-spacing: 0.3px;
}
.ulv-title {
  font-size: 1rem;
  font-weight: 800;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ulv-desc {
  font-size: 0.8rem;
  color: #475569;
  margin-top: 2px;
  line-height: 1.35;
}
.ulv-current {
  font-size: 0.78rem;
  color: #15803d;
  margin-top: 3px;
  font-weight: 600;
}
.ulv-current b {
  color: #166534;
  font-weight: 800;
}
.ulv-btn {
  flex-shrink: 0;
  min-width: 96px;
  padding: 6px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--pink) !important;
  border: 2px solid var(--pink-d) !important;
  border-radius: 12px !important;
  color: #1c1917 !important;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(239, 111, 142, 0.25) !important;
  transition: all 0.15s ease;
}
.ulv-btn:hover:not(:disabled) {
  filter: brightness(0.96);
  transform: translateY(-1px);
}
.ulv-btn:active:not(:disabled) {
  transform: translateY(1px);
}
.ulv-btn .ulv-next {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: #1c1917 !important; /* Khi nền sáng, chữ màu tối rõ nét */
  line-height: 1.15;
}
.ulv-btn .ulv-cost {
  display: block;
  font-size: 0.95rem;
  font-weight: 900;
  color: #1c1917 !important; /* Khi nền sáng, chữ màu tối rõ nét */
  line-height: 1.15;
  margin-top: 1px;
}
.ulv-btn:disabled {
  background: #f5f5f4 !important;
  border-color: #d6d3d1 !important;
  opacity: 0.6 !important;
  cursor: not-allowed;
}
.ulv-btn:disabled .ulv-next,
.ulv-btn:disabled .ulv-cost {
  color: #78716c !important;
}


/* ========================================================
   HỆ THỐNG XÉT KPI & ĐỀ MỤC NHÂN VIÊN TRONG KHO (CHU KỲ 7 NGÀY)
   ======================================================== */
.kpi-cycle-banner {
  background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 100%);
  border: 1.5px solid #fed7aa;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.06);
}
.kpi-cycle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.kpi-cycle-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: #78350f;
  display: flex;
  align-items: center;
  gap: 6px;
}
.kpi-cycle-badge {
  font-size: 0.76rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  background: #ffedd5;
  color: #c2410c;
}
.kpi-cycle-badge.ready {
  background: #fef08a;
  color: #854d0e;
  animation: pulse 1.2s infinite;
}
.kpi-progress-bar {
  height: 8px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
  margin: 6px 0;
  border: 1px solid #fed7aa;
}
.kpi-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #10b981);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.kpi-cycle-desc {
  font-size: 0.8rem;
  color: #475569;
  line-height: 1.35;
}
.kpi-total-buffs {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.kpi-buff-pill {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #fed7aa;
  color: #78350f;
  display: flex;
  align-items: center;
  gap: 4px;
}
.kpi-buff-pill.speed {
  border-color: #fde047;
  background: #fefce8;
  color: #854d0e;
}
.kpi-buff-pill.traffic {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.staff-kho-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1.5px solid #fed7aa;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.staff-kho-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.staff-kho-avatar {
  width: 48px;
  height: 48px;
  background: #fff7ed;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.staff-avt-sprite {
  border-radius: 50%;
  display: block;
}
.staff-kho-details {
  flex: 1;
}
.staff-kho-name {
  font-weight: 800;
  font-size: 0.92rem;
  color: #3b2e2a;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.staff-kho-sub {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 2px;
}
.staff-kho-kpi {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0284c7;
  margin-top: 3px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.kpi-status-working {
  font-size: 0.72rem;
  font-weight: 800;
  color: #15803d;
  background: #dcfce7;
  padding: 1px 6px;
  border-radius: 6px;
}
.kpi-status-off {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 6px;
}

/* Modal KPI Eval */
.kpi-eval-card {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
  text-align: left;
}
.kpi-eval-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.kpi-eval-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}
.kpi-eval-stats {
  font-size: 0.8rem;
  color: #334155;
  background: #ffffff;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  margin-bottom: 8px;
  line-height: 1.4;
}
.kpi-opt-group {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}
.kpi-opt-btn {
  padding: 7px 4px;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
  line-height: 1.25;
}
.kpi-opt-btn:hover {
  border-color: #94a3b8;
}
.kpi-opt-btn.active {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
  font-weight: 800;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
.kpi-opt-btn.active-bad {
  background: #fef2f2;
  border-color: #ef4444;
  color: #b91c1c;
  font-weight: 800;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

/* ===== ĐÓNG THUẾ TRỰC TUYẾN 12H ===== */
.tax-pane-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tax-status-box {
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}
.tax-status-box.active {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1.5px solid #86efac;
  color: #14532d;
}
.tax-status-box.overdue {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 1.5px solid #fca5a5;
  color: #7f1d1d;
  animation: borderPulse 2s infinite ease-in-out;
}
.tax-status-box.grace {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1.5px solid #fde68a;
  color: #78350f;
}
@keyframes borderPulse {
  0%, 100% { border-color: #fca5a5; }
  50% { border-color: #dc2626; }
}
.tax-timer-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.5px;
  margin-top: 6px;
}
.tax-timer-badge.active {
  background: #15803d;
  color: #fff;
  box-shadow: 0 2px 6px rgba(21,128,61,0.3);
}
.tax-timer-badge.overdue {
  background: #dc2626;
  color: #fff;
  box-shadow: 0 2px 6px rgba(220,38,38,0.3);
  animation: pulseOverdue 1.2s infinite;
}
.tax-timer-badge.grace {
  background: #d97706;
  color: #fff;
}
@keyframes pulseOverdue {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
.tax-buff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.tax-buff-item {
  background: rgba(255,255,255,0.88);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.82rem;
  line-height: 1.35;
  border: 1px solid rgba(0,0,0,0.06);
}
.tax-slider-card {
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.tax-pills {
  display: flex;
  gap: 6px;
  margin: 10px 0;
  flex-wrap: wrap;
}
.tax-pct-pill {
  flex: 1;
  min-width: 60px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  border-radius: 10px;
  padding: 6px 4px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  color: var(--ink);
  transition: all 0.15s;
}
.tax-pct-pill.on {
  background: var(--pink);
  border-color: var(--pink);
  color: #fff;
  box-shadow: 0 2px 8px rgba(224,90,119,0.35);
}
.tax-range-input {
  width: 100%;
  accent-color: var(--pink);
  height: 6px;
  border-radius: 3px;
  cursor: pointer;
  margin: 8px 0;
}
.tax-overdue-dot {
  display: inline-block;
  font-size: 11px;
  vertical-align: middle;
  animation: pulseTax 1.2s infinite;
}
@keyframes pulseTax {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

/* Review Click and Tab Improvements */
.tab * { pointer-events: none; }
#hStars, #hRate, .h-r .stars { cursor: pointer; }
#hStars:hover, #hRate:hover { filter: brightness(1.15); text-decoration: underline; }
#hStars:active, #hRate:active { transform: scale(0.96); }
body.selling #hStars,
body.selling #hRate {
  cursor: pointer !important;
  pointer-events: auto !important;
}

/* ========================================================
   🎟️ VÉ TRÀ SỮA LÓT (MEGA 6/45 - BAO 5 SỐ) - GIAO DIỆN & MODAL
   ======================================================== */
#tslotBtn, .pbtn.tslot-head-btn,
#matchGameBtn, .pbtn.match-head-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: transform 0.15s ease;
  z-index: 10;
  padding: 0 2px !important;
  width: auto !important;
  height: 36px !important;
  line-height: 1;
}
#tslotBtn:hover, .pbtn.tslot-head-btn:hover,
#matchGameBtn:hover, .pbtn.match-head-btn:hover {
  transform: scale(1.22);
}
#tslotBtn:active, .pbtn.tslot-head-btn:active,
#matchGameBtn:active, .pbtn.match-head-btn:active {
  transform: scale(0.92);
}

.tslot-modal-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.90);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-sizing: border-box;
  animation: tslotIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes tslotIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.tslot-card {
  background: #ffffff;
  color: #1e293b;
  border-radius: 22px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0,0,0,0.06);
  width: min(94vw, 420px);
  min-height: min(88vh, 620px);
  max-height: 94vh;
  overflow-y: auto;
  padding: 14px 16px;
  box-sizing: border-box;
  position: relative;
  border: 2px solid #fde68a;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}
.tslot-card::-webkit-scrollbar {
  width: 4px;
}
.tslot-card::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

@media (max-height: 540px) {
  .tslot-card {
    overflow-y: auto;
  }
}

.tslot-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tslot-title-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tslot-badge {
  background: #fef3c7;
  color: #b45309;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 8px;
  border: 1px solid #fde68a;
}
.tslot-title {
  font-size: 0.95rem;
  font-weight: 900;
  color: #9a3412;
}
.tslot-close-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s;
}
.tslot-close-btn:hover {
  background: #fee2e2;
  color: #ef4444;
  border-color: #fca5a5;
}

/* Jackpot box compact */
.tslot-jackpot-box {
  background: linear-gradient(135deg, #78350f 0%, #b45309 50%, #f59e0b 100%);
  color: #ffffff;
  border-radius: 12px;
  padding: 6px 10px;
  text-align: center;
  box-shadow: 0 3px 12px rgba(217, 119, 6, 0.35);
  border: 1.5px solid #fef08a;
  position: relative;
  overflow: hidden;
}
.tjp-label {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #fef08a;
}
.tjp-amount {
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  line-height: 1.15;
  margin: 1px 0;
}
.tjp-foot {
  font-size: 0.62rem;
  color: #fef3c7;
  opacity: 0.9;
}
.tjp-winner-box {
  background: rgba(0, 0, 0, 0.24);
  border-radius: 8px;
  padding: 4px 8px;
  margin-top: 5px;
  border: 1px dashed rgba(254, 240, 138, 0.4);
  line-height: 1.25;
}
.tjp-winner-tag {
  font-size: 0.72rem;
  color: #fef08a;
}
.tjp-winner-name {
  color: #ffffff;
  font-weight: 900;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
.tjp-winner-sub {
  font-size: 0.65rem;
  color: #fde68a;
  margin-top: 1px;
}

/* Stats bar */
.tslot-stats-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.ts-stat-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 4px 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.tss-label {
  font-size: 0.62rem;
  color: #64748b;
  font-weight: 700;
}
.tss-val {
  font-size: 0.78rem;
  color: #0f172a;
  font-weight: 800;
  line-height: 1.1;
}
.ts-stat-item small {
  font-size: 0.6rem;
  font-weight: 700;
}

/* Active Ticket bar */
.tslot-active-bar {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 10px;
  padding: 5px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tab-balls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.tab-tag {
  font-size: 0.68rem;
  font-weight: 800;
  color: #92400e;
}
.tab-ball {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #ffffff;
  font-weight: 900;
  font-size: 0.65rem;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 3px rgba(234,88,12,0.4);
}
.tab-hint {
  font-size: 0.63rem;
  color: #475569;
  font-weight: 700;
  text-align: center;
}
.tab-hint.win {
  color: #15803d;
  font-weight: 800;
}

/* Selected numbers picker row */
.tslot-selected-bar {
  background: #f8fafc;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 5px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tsb-left {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tsb-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: #334155;
  white-space: nowrap;
}
.tsb-balls {
  display: flex;
  gap: 4px;
}
.tsb-slot {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 0.72rem;
  transition: all 0.12s;
}
.tsb-slot.empty {
  border: 1.5px dashed #cbd5e1;
  color: #94a3b8;
  background: #ffffff;
}
.tsb-slot.filled {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #ffffff;
  box-shadow: 0 2px 5px rgba(234, 88, 12, 0.4);
}
.tsb-actions {
  display: flex;
  gap: 4px;
}
.tsb-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 0.66rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
}
.tsb-btn:hover {
  background: #f1f5f9;
}
.tsb-btn.reset:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

/* 45 Numbers Grid (9x5) */
.tslot-grid-wrap {
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  padding: 5px;
}
.tslot-grid-45 {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 3px;
}
.tslot-num-btn {
  height: 29px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.12s;
  padding: 0;
}
.tslot-num-btn:hover {
  background: #fed7aa;
  border-color: #f97316;
}
.tslot-num-btn.selected {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #ffffff;
  border-color: #ea580c;
  box-shadow: 0 1px 4px rgba(234, 88, 12, 0.5);
  font-weight: 900;
}

/* CTA Buy Button */
.tslot-cta-wrap {
  text-align: center;
}
.tslot-buy-btn {
  width: 100%;
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 0.88rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(234, 88, 12, 0.4);
  transition: all 0.15s;
}
.tslot-buy-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.tslot-cta-note {
  font-size: 0.63rem;
  color: #64748b;
  margin-top: 3px;
  line-height: 1.25;
}

/* History line (single line ticker) */
.tslot-hist-line {
  font-size: 0.64rem;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 3px 6px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ========================================================
   🧋 XẾP LY TRÀ SỮA (XÂY THÁP) - GIAO DIỆN & MODAL
   ======================================================== */
.tower-modal-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.92);
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-sizing: border-box;
  animation: tslotIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.tower-card {
  background: #ffffff;
  color: #1e293b;
  border-radius: 22px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0,0,0,0.06);
  width: min(94vw, 380px);
  max-height: 96vh;
  overflow: hidden;
  padding: 10px 12px 14px;
  box-sizing: border-box;
  position: relative;
  border: 2.5px solid #fed7aa;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tower-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tower-title-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tower-badge {
  background: #fef3c7;
  color: #b45309;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 8px;
  border: 1px solid #fde68a;
}

.tower-title {
  font-size: 0.98rem;
  font-weight: 900;
  color: #9a3412;
}

.tower-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 1rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s;
}

.tower-close-btn:hover {
  background: #fee2e2;
  color: #ef4444;
  border-color: #fca5a5;
}

.tower-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.tstat-pill {
  background: #f8fafc;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 4px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.tstat-pill small {
  font-size: 0.65rem;
  color: #64748b;
  font-weight: 600;
}

.tower-canvas-container {
  position: relative;
  width: 100%;
  aspect-ratio: 360 / 460;
  max-height: 52vh;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid #fdba74;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.06);
  background: #fef3c7;
}

#towerCanvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: pointer;
}

.tower-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
  animation: tslotIn 0.2s ease-out;
  z-index: 20;
}

.tgo-box {
  background: #ffffff;
  border-radius: 18px;
  padding: 14px 16px;
  text-align: center;
  width: 100%;
  max-width: 290px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  border: 2px solid #fecaca;
}

.tgo-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}

.tgo-stat-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
}

.tgo-stat-card span {
  font-size: 0.66rem;
  color: #64748b;
}

.tgo-stat-card b {
  font-size: 1rem;
  color: #1e293b;
}

.tgo-reward-box {
  background: #fffbeb;
  border: 1px dashed #f59e0b;
  border-radius: 10px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.tgo-btn-row {
  display: flex;
  gap: 6px;
}

.tgo-btn {
  flex: 1;
  padding: 8px 4px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  border: none;
  transition: transform 0.15s;
}

.tgo-btn.primary {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.4);
}

.tgo-btn.secondary {
  background: #f1f5f9;
  color: #475569;
}

.tgo-btn:active {
  transform: scale(0.96);
}

.tower-drop-btn {
  width: 100%;
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 0.92rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.4);
  transition: all 0.15s;
  letter-spacing: 0.3px;
}

.tower-drop-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.tower-drop-btn:active {
  transform: scale(0.97);
}

.tjp-winner-nums {
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
}
.tjp-wn-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: #fef08a;
}
.tjp-wn-balls {
  display: inline-flex;
  gap: 4px;
}
.tjp-wn-ball {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  color: #ea580c;
  font-size: 0.65rem;
  font-weight: 900;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}


/* ========================================================
   🎴 MINI-GAME: TÌM CẶP HÌNH NHÂN VIÊN (4x4 ĐẾN 15x15)
   ======================================================== */
.match-modal-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.92);
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-sizing: border-box;
  animation: tslotIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.match-card {
  background: #ffffff;
  color: #1e293b;
  border-radius: 22px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0,0,0,0.06);
  width: min(96vw, 540px);
  max-height: 96vh;
  overflow: hidden;
  padding: 10px 12px 14px;
  box-sizing: border-box;
  position: relative;
  border: 2.5px solid #fed7aa;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.match-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.match-title-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.match-badge {
  background: #fef3c7;
  color: #b45309;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 8px;
  border: 1px solid #fde68a;
}

.match-title {
  font-size: 0.98rem;
  font-weight: 900;
  color: #9a3412;
}

.match-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 1rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s;
}

.match-close-btn:hover {
  background: #fee2e2;
  color: #ef4444;
  border-color: #fca5a5;
}

/* Mode selector tabs */
.match-mode-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.match-mode-tabs::-webkit-scrollbar { display: none; }

.match-tab-btn {
  flex: none;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1.15;
}
.match-tab-btn b {
  font-size: 0.78rem;
  color: #334155;
}
.match-tab-btn small {
  font-size: 0.6rem;
  color: #64748b;
}
.match-tab-btn.active {
  background: linear-gradient(135deg, #f97316, #ea580c);
  border-color: #ea580c;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.35);
}
.match-tab-btn.active b,
.match-tab-btn.active small {
  color: #ffffff;
}

/* Info Bar */
.match-info-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
}
.minfo-item {
  background: #fffbeb;
  border: 1px solid #fef08a;
  border-radius: 8px;
  padding: 3px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.minfo-item span {
  font-size: 0.64rem;
  color: #78350f;
}
.minfo-item b {
  font-size: 0.88rem;
}

/* Time bar */
.match-time-bar-bg {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}
.match-time-bar-fill {
  height: 100%;
  background: #10b981;
  transition: width 0.3s linear, background 0.3s;
}

/* Board Game Area */
.match-board-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 60vh;
  margin: 0 auto;
  border-radius: 16px;
  background: #fdf3e4;
  border: 2px solid #fdba74;
  padding: 6px;
  box-sizing: border-box;
  overflow: auto;
}

.match-board {
  display: grid;
  gap: 4px;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.match-board.size-4 { grid-template-columns: repeat(4, 1fr); gap: 6px; }
.match-board.size-6 { grid-template-columns: repeat(6, 1fr); gap: 4px; }
.match-board.size-8 { grid-template-columns: repeat(8, 1fr); gap: 3px; }
.match-board.size-10 { grid-template-columns: repeat(10, 1fr); gap: 2.5px; }
.match-board.size-12 { grid-template-columns: repeat(12, 1fr); gap: 2px; }
.match-board.size-14 { grid-template-columns: repeat(14, 1fr); gap: 1.5px; }
.match-board.size-15 { grid-template-columns: repeat(15, 1fr); gap: 1.5px; }

/* Match Card Tile */
.mcard {
  perspective: 600px;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.mcard.flipped .mcard-inner,
.mcard.matched .mcard-inner {
  transform: rotateY(180deg);
}

.mcard-front, .mcard-back {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
}

.mcard-front {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: 1.5px solid #fed7aa;
  color: #ffffff;
}

.mcard-back {
  background: #ffffff;
  border: 1.5px solid #fdba74;
  transform: rotateY(180deg);
  padding: 2px;
}

.mcard-back img {
  width: 88%;
  height: 88%;
  object-fit: contain;
  display: block;
}

.mcard.matched .mcard-back {
  background: #ecfdf5;
  border-color: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
  animation: matchPop 0.3s ease-out;
}

.mcard.is-joker .mcard-back {
  background: #fef3c7;
  border-color: #f59e0b;
}

@keyframes matchPop {
  0% { transform: rotateY(180deg) scale(0.9); }
  50% { transform: rotateY(180deg) scale(1.15); }
  100% { transform: rotateY(180deg) scale(1); }
}

/* Overlay Screen */
.match-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
  z-index: 20;
  animation: tslotIn 0.2s ease-out;
}

.moverlay-box {
  background: #ffffff;
  border-radius: 18px;
  padding: 16px 18px;
  text-align: center;
  width: 100%;
  max-width: 320px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  border: 2px solid #fed7aa;
}

.moverlay-bet-info {
  background: #fffbeb;
  border: 1px dashed #f59e0b;
  border-radius: 10px;
  padding: 6px 10px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
}

.match-start-btn {
  width: 100%;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.92rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.4);
  transition: all 0.15s;
}
.match-start-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.match-start-btn:active {
  transform: scale(0.97);
}

/* ===== HỢP ĐỒNG ĐẶT TIỆC & ĐƠN LỚN ===== */
.party-contract-card {
  margin: 0 0 10px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 50%, #fde68a 100%);
  border: 2px solid #f59e0b;
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
  position: relative;
  overflow: hidden;
  animation: partyCardGlow 2.5s infinite alternate ease-in-out;
}
@keyframes partyCardGlow {
  0% { box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2); border-color: #f59e0b; }
  100% { box-shadow: 0 6px 18px rgba(245, 158, 11, 0.4); border-color: #d97706; }
}
.party-contract-card.accepted {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: #22c55e;
  animation: none;
  box-shadow: 0 3px 10px rgba(34, 197, 94, 0.15);
}
.party-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.party-badge {
  font-weight: 800;
  font-size: 0.8rem;
  background: #ea580c;
  color: #fff;
  padding: 3px 8px;
  border-radius: 8px;
  letter-spacing: 0.3px;
}
.party-contract-card.accepted .party-badge {
  background: #16a34a;
}
.party-status {
  font-weight: 800;
  font-size: 0.78rem;
  color: #15803d;
}
.party-deadline {
  font-weight: 700;
  font-size: 0.75rem;
  color: #b45309;
}
.party-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: #78350f;
  margin: 2px 0 4px;
  line-height: 1.25;
}
.party-contract-card.accepted .party-title {
  color: #14532d;
}
.party-client {
  font-size: 0.84rem;
  color: #92400e;
  margin-bottom: 8px;
}
.party-contract-card.accepted .party-client {
  color: #166534;
}
.party-finance {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 6px 0 8px;
}
.p-fin-box {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  padding: 6px 4px;
  text-align: center;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.p-fin-box small {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: #854d0e;
}
.p-fin-box b {
  font-size: 0.92rem;
  color: #ea580c;
}
.p-fin-box.deposit b { color: #2563eb; }
.p-fin-box.payout b { color: #16a34a; }
.p-fin-box.bonus b { color: #d97706; }
.party-desc {
  font-size: 0.78rem;
  color: #78350f;
  line-height: 1.35;
  margin-bottom: 8px;
}
.party-tip {
  font-size: 0.8rem;
  color: #166534;
  line-height: 1.35;
}
.party-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.party-accept-btn {
  flex: 1;
  background: linear-gradient(135deg, #f97316, #ea580c) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 800 !important;
  padding: 8px 12px !important;
  border-radius: 12px !important;
  box-shadow: 0 3px 0 #9a3412 !important;
  font-size: 0.86rem !important;
  cursor: pointer;
}
.party-accept-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #9a3412 !important;
}
.party-reject-btn {
  border: 1.5px solid #d1d5db !important;
  background: #fff !important;
  color: #6b7280 !important;
  font-size: 0.8rem !important;
  padding: 8px 12px !important;
  border-radius: 12px !important;
}

/* In-shift Party Widget */
.q3-party-wrap {
  position: absolute;
  top: 6px;
  left: 12px;
  right: 12px;
  z-index: 12;
  pointer-events: auto;
}
.q3-party-inner {
  background: rgba(255, 255, 255, 0.98);
  border: 2px solid #f59e0b;
  border-radius: 14px;
  padding: 5px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}
.q3-party-title {
  font-weight: 800;
  font-size: 0.78rem;
  color: #78350f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}
.q3-party-progress-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.q3-party-bar {
  height: 8px;
  background: #fde68a;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #f59e0b;
}
.q3-party-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f97316, #eab308);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.q3-party-count {
  font-size: 0.7rem;
  font-weight: 800;
  color: #92400e;
  line-height: 1;
}
.q3-party-pack-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 5px 9px;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 0 #047857;
  white-space: nowrap;
  flex: none;
}
.q3-party-pack-btn:active {
  transform: translateY(1px);
  box-shadow: none;
}


/* ===== GEN Z HEAD CUP & CHIDE BUBBLE ===== */
.gz-head-cup {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  z-index: 1000;
  /* animation gzHeadFloat removed for static clean view */
}
@keyframes gzHeadFloat {
  0% { transform: translateX(-50%) translateY(0); }
  100% { transform: translateX(-50%) translateY(-6px); }
}
.gz-cup-bob {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.gz-cup-glass {
  position: relative;
  width: 38px;
  height: 52px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.55));
  border: 2.5px solid #3b2314;
  border-top: 1.5px dashed rgba(59, 35, 20, 0.35);
  border-radius: 3px 3px 10px 10px;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.35), inset 0 0 6px rgba(255, 255, 255, 0.9);
  overflow: hidden;
}
.gz-cup-glass.size-L {
  width: 44px;
  height: 60px;
}
.gz-cup-liquid {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  transition: height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease;
  border-radius: 0 0 7px 7px;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.4);
}
.gz-cup-wave {
  position: absolute;
  top: -3px;
  left: -50%;
  width: 200%;
  height: 6px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  animation: gzWave 1.6s ease-in-out infinite alternate;
}
@keyframes gzWave {
  0% { transform: translateX(0); }
  100% { transform: translateX(20px); }
}
.gz-cup-stream {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 100%;
  border-radius: 2.5px;
  z-index: 5;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.35);
  animation: gzStreamPulse 0.22s ease-in-out infinite alternate;
}
@keyframes gzStreamPulse {
  0% { transform: translateX(-50%) scaleX(0.8); opacity: 0.88; }
  100% { transform: translateX(-50%) scaleX(1.2); opacity: 1; }
}
.gz-cup-lid {
  position: absolute;
  top: 0;
  left: -3px;
  right: -3px;
  height: 5px;
  background: #f43f5e;
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  z-index: 5;
}
.gz-cup-straw {
  position: absolute;
  top: -12px;
  right: 7px;
  width: 4px;
  height: 22px;
  background: repeating-linear-gradient(45deg, #f97316 0 4px, #fff 4px 7px);
  border-radius: 2px;
  transform: rotate(14deg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  z-index: 4;
}
.gz-cup-dots {
  position: absolute;
  bottom: 3px;
  left: 2px;
  right: 2px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  justify-content: center;
  z-index: 3;
}
.gz-cup-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #4a2810, #150a04);
  box-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.gz-cup-ice {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.25));
  z-index: 3;
}
.gz-cup-badge {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 12px;
  border: 1.5px solid #fff;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(124, 58, 237, 0.45);
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1.2;
}
.sv-cup-badge {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 12px;
  border: 1.5px solid #fff;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.45);
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1.2;
}
.gz-headphone {
  font-size: 12px;
  animation: q3pulse2 0.8s ease-in-out infinite;
}
.gz-chide-bubble {
  position: absolute;
  top: calc(100% + 88px);
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f43f5e, #be123c);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 14px;
  border: 2px solid #fff;
  box-shadow: 0 4px 16px rgba(190, 18, 60, 0.55);
  white-space: nowrap;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.25s ease;
}
.gz-chide-bubble::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent #be123c transparent;
}
.staff-bar-wrap {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  top: auto !important;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  transform: translateX(-50%) !important;
  width: min(720px, calc(100vw - 20px)) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  z-index: 99990 !important;
  pointer-events: none !important;
  transition: none !important;
  animation: none !important;
}
.staff-bar-wrap > * {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: 100% !important;
  height: 64px !important;
  min-height: 64px !important;
  max-height: 64px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  pointer-events: auto !important;
  transition: none !important;
  animation: none !important;
}
.buyer-widget{order:1 !important;}
.sv-widget{order:5 !important;}
.gz-widget{order:10 !important;}
.sv-widget {
  background: linear-gradient(135deg, rgba(245, 247, 255, 0.98), rgba(238, 242, 255, 0.95)) !important;
  border: 1.5px solid rgba(99, 102, 241, 0.5) !important;
  box-shadow: 0 8px 30px rgba(67, 56, 202, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}
body.dark .sv-widget {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.98), rgba(49, 46, 129, 0.95)) !important;
  border-color: rgba(129, 140, 248, 0.4) !important;
}
@keyframes gzPopBubble {
  0% { transform: translateX(-50%) scale(0.6); opacity: 0; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

/* NÚT BÁO CÔNG AN TIỀN GIẢ - NẰM GÓC PHẢI DƯỚI HEADER NỔI BẬT KHÔNG BỊ CHE KHUẤT */
.fake-police-bottom-btn {
  position: fixed;
  top: calc(76px + env(safe-area-inset-top, 0px));
  right: 12px;
  left: auto !important;
  transform: none !important;
  bottom: auto !important;
  z-index: 100001;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  border: 2px solid #fee2e2;
  border-radius: 18px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.55), 0 0 12px rgba(239, 68, 68, 0.4);
  animation: policeBlink 0.7s infinite alternate;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  user-select: none;
}


/* ============================================================
   PHONE ICON (NẰM NGANG DƯỚI CHỮ PHA LY) & SHIPPER MAP SYSTEM
   ============================================================ */

/* Biểu tượng điện thoại nằm ngang bên dưới chữ PHA LY */
.q3-phone-btn {
  position: absolute;
  left: 63px;
  top: 637px;
  width: 82px;
  height: 55px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 15;
  padding: 0;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  -webkit-tap-highlight-color: transparent;
}
.q3-phone-btn:hover {
  transform: scale(1.12);
}
.q3-phone-btn:active {
  transform: scale(0.92);
}
.q3-phone-img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  transform: rotate(90deg); /* Điện thoại nằm ngang phóng to thêm 25% */
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
  transition: filter 0.2s ease;
}
.q3-phone-btn:hover .q3-phone-img {
  filter: drop-shadow(0 5px 12px rgba(245, 158, 11, 0.7));
}
.q3-phone-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  border: 1.5px solid #fff;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 800;
  min-width: 22px;
  height: 22px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.6);
  animation: phonePulse 1.2s infinite;
  pointer-events: none;
}
.q3-phone-btn.has-orders {
  animation: phoneJiggle 2s infinite ease-in-out;
}
@keyframes phonePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.18); }
  100% { transform: scale(1); }
}
@keyframes phoneJiggle {
  0%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(-5deg) scale(1.05); }
  20%, 40% { transform: rotate(5deg) scale(1.05); }
  50% { transform: rotate(0deg); }
}

/* Shipper Map Modal */
.shippermap-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(10, 8, 6, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
.shippermap-modal[hidden] {
  display: none !important;
}

.shippermap-card {
  position: relative;
  width: 100vw;
  height: 100vh;
  max-width: 572px;
  max-height: 100vh;
  background: #181512;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 50px rgba(0,0,0,0.85);
}

/* Header bản đồ */
.shippermap-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(20, 15, 10, 0.92) 0%, rgba(20, 15, 10, 0.6) 75%, transparent 100%);
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  pointer-events: auto;
}
.shippermap-back-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border: 1.5px solid #fef3c7;
  border-radius: 12px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.45);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: transform 0.15s ease;
}
.shippermap-back-btn:hover {
  transform: scale(1.05);
}
.shippermap-back-btn:active {
  transform: scale(0.95);
}
.shippermap-title-box {
  text-align: center;
}
.shippermap-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fef3c7;
  text-shadow: 0 2px 5px rgba(0,0,0,0.8);
  line-height: 1.15;
}
.shippermap-subtitle {
  font-size: 0.72rem;
  color: #cbd5e1;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
.shippermap-status-badge {
  background: rgba(30, 27, 24, 0.75);
  border: 1.5px solid #f59e0b;
  border-radius: 10px;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fbbf24;
  white-space: nowrap;
}

/* Viewport cuộn bản đồ */
.shippermap-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #d8cbbb;
}
.shippermap-canvas {
  position: relative;
  width: 572px;
  height: 1024px;
  margin: 0 auto;
}
.shippermap-bg {
  width: 572px;
  height: 1024px;
  display: block;
  user-select: none;
  pointer-events: none;
}

/* BIỂN HIỆU TIỆM Ở TRUNG TÂM MAP */
.center-shop-signboard {
  position: absolute;
  left: 285px;
  top: 405px;
  transform: translate(-50%, -50%) rotate(-12deg);
  width: 86px;
  height: 48px;
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 60%, #fde68a 100%);
  border: 2.5px solid #78350f;
  border-radius: 12px 12px 5px 5px;
  box-shadow: 0 4px 12px rgba(69, 26, 3, 0.55), inset 0 1px 0 #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2px 4px;
  cursor: pointer;
  z-index: 25;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}
.center-shop-signboard:hover {
  transform: translate(-50%, -50%) rotate(-12deg) scale(1.08);
  box-shadow: 0 6px 16px rgba(69, 26, 3, 0.7);
}
.center-shop-signboard:active {
  transform: translate(-50%, -50%) rotate(-12deg) scale(0.95);
}
.center-shop-sign-icon {
  font-size: 13px;
  line-height: 1;
}
.center-shop-sign-name {
  font-size: 8.5px;
  font-weight: 800;
  line-height: 1.1;
  color: #78350f;
  text-transform: uppercase;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

/* NHÂN VIÊN SHIPPER CHẠY TRÊN ĐƯỜNG (VỪA VỚI ĐƯỜNG 6.PNG) */
.shipper-unit {
  position: absolute;
  width: 38px;
  height: 38px;
  transform: translate(-50%, -80%);
  z-index: 30;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.08s linear;
}
.shipper-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.45));
  transition: transform 0.2s ease;
}
.shipper-bubble {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 2px 6px;
  font-size: 8px;
  font-weight: 800;
  color: #92400e;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  pointer-events: none;
  margin-bottom: 2px;
}
.shipper-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 3px;
  border-style: solid;
  border-color: #f59e0b transparent transparent transparent;
}

/* POPUP TIỀN/ĐÁNH GIÁ KHI GIAO XONG */
.delivery-float-pop {
  position: absolute;
  transform: translate(-50%, -100%);
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 9px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.45);
  animation: floatUpFade 1.6s forwards;
  pointer-events: none;
  z-index: 40;
  white-space: nowrap;
}
@keyframes floatUpFade {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  20% { opacity: 1; transform: translate(-50%, -80%) scale(1.05); }
  80% { opacity: 1; transform: translate(-50%, -120%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -150%) scale(0.9); }
}

/* ===== SỰ KIỆN HÀNG NGÀY (DAILY SPECIAL EVENTS) ===== */
.daily-event-banner {
  margin: 6px 12px;
  padding: 10px 14px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  animation: slideDown 0.3s ease;
}
.daily-event-banner.pos {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1.5px solid #10b981;
}
.daily-event-banner.neg {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 1.5px solid #ef4444;
}
.daily-event-banner.mixed {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 1.5px solid #0284c7;
}

/* ===== CHI NHÁNH TRỰC THUỘC & NHƯỢNG QUYỀN (BRANCH & FRANCHISE) ===== */
.branch-hero {
  background: linear-gradient(135deg, var(--card), var(--panel));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  text-align: left;
}
.branch-hero-title {
  font-size: 1.12rem;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 4px;
}
.branch-hero-sub {
  font-size: 0.82rem;
  color: var(--soft);
  line-height: 1.45;
}
.branch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.branch-card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}
.branch-card.active {
  border-color: #10b981;
  background: linear-gradient(180deg, #f0fdf4 0%, var(--card) 100%);
  box-shadow: 0 4px 14px rgba(16,185,129,0.12);
}
.branch-card-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.branch-icon {
  font-size: 28px;
  padding: 6px;
  background: var(--panel);
  border-radius: 12px;
}
.branch-name {
  font-size: 0.98rem;
  font-weight: 900;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.branch-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 10px;
  background: #cbd5e1;
  color: #334155;
  font-weight: 800;
}
.branch-badge.ok {
  background: #d1fae5;
  color: #065f46;
}
.branch-loc-sub {
  font-size: 0.78rem;
  color: var(--soft);
  line-height: 1.35;
  margin-top: 3px;
}
.branch-stats {
  background: var(--bg);
  border-radius: 10px;
  padding: 8px 10px;
  margin: 8px 0;
  font-size: 0.8rem;
  line-height: 1.55;
}
.branch-stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.branch-stat-item .val.pos {
  color: #059669;
  font-weight: 800;
}
.branch-stat-item .val.neg {
  color: #dc2626;
  font-weight: 800;
}
.branch-actions {
  margin-top: 6px;
}
.branch-btn {
  width: 100%;
  padding: 8px;
  border-radius: 10px;
  font-size: 0.86rem;
}

/* NHƯỢNG QUYỀN (FRANCHISING) */
.franchise-hero {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.franchise-hero.eligible {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border-color: #10b981;
}
.franchise-hero-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--ink);
}
.franchise-hero-sub {
  font-size: 0.82rem;
  color: var(--soft);
  line-height: 1.45;
  margin-top: 2px;
}
.franchise-status-pill {
  font-size: 0.76rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.franchise-status-pill.ok {
  background: #059669;
  color: #fff;
}
.franchise-status-pill.lock {
  background: #64748b;
  color: #fff;
}
.franchise-req-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.franchise-req-item {
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
}
.franchise-req-item.done {
  border-color: #10b981;
  background: #fff;
}
.req-title {
  font-size: 0.76rem;
  color: var(--soft);
}
.req-val {
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--ink);
  margin: 2px 0 4px;
}
.req-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}
.req-fill {
  height: 100%;
  background: #10b981;
  border-radius: 4px;
  transition: width 0.3s ease;
}
.candidate-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 8px;
}
.partner-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.partner-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}
.royalty-badge {
  font-size: 0.76rem;
  font-weight: 800;
  color: #059669;
  background: #d1fae5;
  padding: 4px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

/* ANALYTICS & THỐNG KÊ */
.analytics-wrap {
  padding: 4px 0;
}
.analytics-hero {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.analytics-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}
.analytics-card.highlight {
  border-color: #10b981;
  background: #f0fdf4;
}
.ana-title {
  font-size: 0.78rem;
  color: var(--soft);
  font-weight: 700;
}
.ana-val {
  font-size: 1.25rem;
  font-weight: 900;
  margin: 4px 0 2px;
}
.ana-val.pos {
  color: #059669;
}
.ana-sub {
  font-size: 0.72rem;
  color: var(--soft);
}
.analytics-bar-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}
.bar-chart-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.bar-chart-track {
  flex: 1;
  height: 12px;
  background: var(--bg);
  border-radius: 6px;
  overflow: hidden;
}
.bar-chart-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.4s ease;
}

/* ===== MẠNG XÃ HỘI & ADS (MXH FEED) ===== */
.mxh-pane-wrap {
  padding: 4px 0;
}
.mxh-profile-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.mxh-avatar-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  background: var(--panel);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.mxh-verify-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background: #0284c7;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
}
.mxh-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
  text-align: center;
}
.mxh-stat-box {
  background: var(--bg);
  border-radius: 10px;
  padding: 8px;
}
.mxh-stat-num {
  font-size: 1.1rem;
  font-weight: 900;
}
.mxh-stat-lbl {
  font-size: 0.72rem;
  color: var(--soft);
  margin-top: 2px;
}
.ads-section-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
}
.active-ads-banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 10px;
}
.active-ad-pill {
  font-size: 0.76rem;
  background: #fff;
  border: 1px solid #93c5fd;
  color: #1e40af;
  padding: 3px 8px;
  border-radius: 8px;
}
.ads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.ads-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.ads-card.running {
  border-color: #10b981;
  background: #f0fdf4;
}

/* FEED POSTS */
.feed-section {
  margin-top: 12px;
}
.feed-posts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feed-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}
.feed-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.feed-avt {
  font-size: 24px;
}
.feed-badge {
  font-size: 0.7rem;
  font-weight: 800;
  background: #fef08a;
  color: #854d0e;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 4px;
}
.feed-content {
  font-size: 0.88rem;
  color: var(--ink);
  line-height: 1.48;
  margin-bottom: 8px;
}
.feed-actions {
  display: flex;
  gap: 8px;
  border-top: 1px dashed var(--line);
  padding-top: 6px;
}
.feed-like-btn, .feed-reply-btn {
  background: transparent;
  border: none;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--soft);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.feed-like-btn.liked {
  color: #ef4444;
}
.feed-replies-box {
  background: var(--bg);
  border-radius: 8px;
  padding: 6px 10px;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--ink);
}
.feed-reply-item {
  margin: 3px 0;
}