/* ===== App layout ===== */
#app { position: fixed; inset: 0; display: flex; flex-direction: column; transition: right .2s; }
#main { position: absolute; top: var(--header-h); left: var(--sidebar-w); right: 0; bottom: 0; display: flex; flex-direction: column; min-width: 0; background: var(--bg-body); }
body.sidebar-collapsed #main { left: 64px; }
body.side-chat-open #app { right: 0; }

/* ===== Header (48px, white) — measured on actapp.misa.vn ===== */
.header-style { position: absolute; top: 0; left: 0; right: 0; height: var(--header-h); background: #fff; display: flex; z-index: 50; }
.logo-container { width: 190px; flex: 0 0 190px; height: 48px; padding: 10px 16px; display: flex; align-items: center; }
.logo-container .apps-icon { width: 24px; height: 24px; margin-right: 8px; color: var(--muted); display: inline-flex; cursor: pointer; }
.logo-container .logo { display: flex; align-items: center; gap: 12px; height: 32px; }
.logo-container .main-logo { width: 32px; height: 32px; flex: 0 0 32px; background: var(--sprite1) -404px -176px / 982px 479px no-repeat; }
.logo-container .logo-text { font-size: 20px; font-weight: 600; color: var(--text); line-height: 30px; white-space: nowrap; }
.the-navbar { flex: 1; display: flex; align-items: center; height: 48px; min-width: 0; }
.header-branch { display: flex; align-items: center; height: 21px; }
.header-branch-name { font-size: 14px; font-weight: 600; padding-left: 8px; white-space: nowrap; line-height: 21px; }
.header-branch .chev { width: 20px; height: 16px; padding-left: 4px; display: inline-flex; align-items: center; color: var(--muted); cursor: pointer; }
.header-current-db { margin: 0 10px 0 14px; height: 30px; padding: 0 12px; display: flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; background: rgba(255,255,255,.2); cursor: pointer; color: var(--text); }
.header-current-db .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); border: 1px solid #fff; }
.header-current-db .db-name { padding-left: 7px; font-weight: 420; white-space: nowrap; line-height: 20px; }
.ms-space { flex: 1; }
.header-quick-search { width: 242px; height: 28px; position: relative; margin-right: 10px; flex: 0 0 242px; border-radius: 6px; border: 1px solid var(--border); background: #fff; cursor: text; }
.header-quick-search input { position: absolute; inset: 0; width: 100%; height: 26px; border: 0; border-radius: 6px; padding: 0 10px 0 28px; outline: none; font-size: 13px; font-weight: 400; background: transparent; }
.header-quick-search:focus-within { border-color: #1570ef; box-shadow: 0 0 0 1px #1570ef; }
.header-quick-search .s-ico { position: absolute; left: 8px; top: 5px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.header-quick-search .s-ph { position: absolute; left: 28px; top: 3px; line-height: 20px; font-weight: 400; pointer-events: none; color: var(--muted); white-space: nowrap; }
.header-quick-search.has-val .s-ph { display: none; }
.header-icons { display: flex; align-items: center; height: 48px; }
.header-menu-icon { position: relative; width: 24px; height: 48px; display: flex; align-items: center; justify-content: center; margin: 0 8px; color: var(--muted); cursor: pointer; flex: 0 0 auto; }
.shell-icon-button, button.header-menu-icon, button.header-user { border: 0; padding: 0; background: transparent; font: inherit; }
.header-menu-icon:hover { color: var(--text); }
.header-menu-icon:focus-visible, .header-user:focus-visible, .shell-icon-button:focus-visible { outline: 2px solid #1570ef; outline-offset: 2px; border-radius: 6px; }
.header-menu-icon.w20 { width: 20px; }
.header-menu-icon.green { color: var(--brand); }
.header-menu-icon.blue { color: var(--link); }
.header-menu-icon .i24 { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
.agent-area { display: flex; gap: 10px; margin: 0 8px; }
.agent-area .header-menu-icon { margin: 0; }
.agent-area .header-menu-icon.ava { width: 28px; }
.agent-area .header-menu-icon.chat { width: 31px; justify-content: flex-start; }
.ava-header { width: 28px; height: 28px; display: inline-block; background: var(--sprite1) -40px -8.5px / 982px 479px no-repeat; }
.header-menu-icon.more { border-radius: 16px; }
.header-user { position: relative; width: 32px; height: 32px; margin: 0 12px 0 9px; cursor: pointer; flex: 0 0 32px; }
.header-user .ring, .us-ring { display: block; width: 32px; height: 32px; padding: 3px; border-radius: 50%; background: conic-gradient(#4192ff 60%, #f5222d 60%); }
.header-user .inner, .us-ring .inner { display: block; width: 26px; height: 26px; border-radius: 50%; background: #fff; padding: 1px; }
.header-user .av, .us-ring .av { display: flex; width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, #ff8a3d, #f04438); color: #fff; font-size: 10px; font-weight: 700; align-items: center; justify-content: center; letter-spacing: 0; }

/* ===== Sidebar (219px dark) ===== */
.menu-bar { position: absolute; top: var(--header-h); left: 0; bottom: 0; width: 219px; background: var(--side-bg); color: var(--text); display: flex; flex-direction: column; z-index: 40; }
.quick-add-voucher { padding: 16px; display: flex; justify-content: center; flex: 0 0 60px; }
.quick-add-btn { width: 100%; height: 28px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--side-btn-border); background: var(--side-btn); display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; color: var(--brand); }
.quick-add-btn:hover { background: #3a414e; }
.quick-add-label { color: var(--side-text); font-weight: 500; white-space: nowrap; }
.menu-item-list { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0 6px 0 16px; scrollbar-width: thin; scrollbar-color: transparent transparent; display: flex; flex-direction: column; }
.menu-item-list:hover { scrollbar-color: #3a404b transparent; }
.parent-item-menu { display: flex; align-items: center; padding: 4px 0 12px; flex: 0 0 auto; cursor: pointer; }
.parent-item-menu.second { padding-top: 20px; }
.parent-item-menu .line { display: none; }
.menu-item-group { flex: 1; display: flex; align-items: center; height: 20px; color: var(--side-group); font-weight: 600; font-size: 13px; text-transform: uppercase; border-radius: 6px; }
.menu-item-group .chev { color: #5d5d5d; margin-left: 6.5px; transition: transform .15s; }
.parent-item-menu.closed .chev { transform: rotate(180deg); }
.parent-item-menu.closed + .menu-group-content { display: none; }
.menu-group-content { display: flex; flex-direction: column; gap: 8px; flex: 0 0 auto; }
.menu-item { position: relative; display: flex; align-items: center; gap: 8px; height: 36px; padding: 8px 12px; border-radius: 6px; color: var(--side-text); font-weight: 400; cursor: pointer; text-decoration: none; flex: 0 0 36px; }
.menu-item:hover { background: #22272f; }
.menu-item.active { background: var(--brand); color: #fff; font-weight: 700; }
.menu-item__icon { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; color: var(--side-icon); flex: 0 0 20px; }
.menu-item__icon.ava { width: 24px; height: 24px; flex-basis: 24px; }
.ava-side { width: 24px; height: 24px; display: block; background: url("https://actapp.misacdn.net/dn/g2/assets/images/sprites_more2.svg") -183px -16px no-repeat; }
.menu-item.active .menu-item__icon { color: #fff; }
.menu-item__icon.orange { color: var(--orange); }
.menu-item__title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 20px; }
.menu-item .notice { position: absolute; left: 148px; top: 8px; width: 24px; height: 20px; padding: 2px 4px; border-radius: 50%; background: var(--red); border: 1px solid #fff; color: #fff; font-size: 11px; font-weight: 500; line-height: 14px; text-align: center; }
.menu-item.bookmark { padding: 0 0 0 12px; }
.menu-item.bookmark .bm-icon { width: 20px; height: 20px; flex: 0 0 20px; border-radius: 50%; background: var(--brand-light); border: 1px solid var(--brand); color: var(--side-icon); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.menu-item.bookmark .menu-item__title { flex: 1; }
.menu-item.bookmark .close { width: 20px; height: 20px; color: var(--muted); visibility: hidden; display: flex; }
.menu-item.bookmark:hover .close { visibility: visible; }
.menu-item.use-this-page { height: 28px; flex-basis: 28px; justify-content: center; padding: 0; background: var(--side-btn); border: 1px solid var(--side-btn-border); font-weight: 500; }
.menu-item.use-this-page .star { display: none; color: var(--muted); }
.menu-item.use-this-page:hover { background: #3a414e; }
.ava-face { width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #8fd3ff, #2b7de9 55%, #0b3d91); position: relative; }
.ava-face::before { content: ""; position: absolute; left: 6px; top: 8px; width: 12px; height: 6px; border-radius: 6px; background: #fff; }
.collapse-option-v2 { height: 40px; flex: 0 0 40px; display: flex; align-items: center; justify-content: flex-end; }
.collapse-option-v2__toggle { width: 40px; height: 40px; border-radius: 6px 0 0 0; background: var(--side-btn); border-top: 1px solid #484e59; border-left: 1px solid #484e59; display: flex; align-items: center; justify-content: center; color: var(--side-icon); cursor: pointer; }
.collapse-option-v2__toggle:hover { color: #fff; }

/* collapsed sidebar (63px) */
body.sidebar-collapsed .menu-bar { width: 63px; }
body.sidebar-collapsed .quick-add-btn { width: 32px; padding: 0; flex: 0 0 32px; }
body.sidebar-collapsed .quick-add-voucher { justify-content: flex-start; }
body.sidebar-collapsed .menu-item__title, body.sidebar-collapsed .quick-add-label, body.sidebar-collapsed .menu-item-group, body.sidebar-collapsed .menu-item.bookmark .close, body.sidebar-collapsed .menu-item .notice { display: none; }
body.sidebar-collapsed .parent-item-menu { padding: 4px 0 12px; pointer-events: none; }
body.sidebar-collapsed .parent-item-menu.second { padding-top: 20px; }
body.sidebar-collapsed .parent-item-menu .line { display: block; width: 32px; height: 1px; background: #e6e6e6; }
body.sidebar-collapsed .parent-item-menu.closed + .menu-group-content { display: flex; }
body.sidebar-collapsed .menu-item { width: 32px; padding: 8px 6px; justify-content: center; }
body.sidebar-collapsed .menu-item.bookmark { padding: 0; border-radius: 50%; }
body.sidebar-collapsed .menu-item.use-this-page { width: 32px; }
body.sidebar-collapsed .menu-item.use-this-page .star { display: flex; }
body.sidebar-collapsed .collapse-option-v2__toggle { width: 63px; border-left: 0; border-radius: 0; }
body.sidebar-collapsed .collapse-option-v2__toggle .msk { transform: scaleX(-1); }
.tip-r { position: fixed; z-index: 1001; background: #181d27; color: #fff; font-size: 13px; padding: 4px 8px; border-radius: 3px; white-space: nowrap; pointer-events: none; display: none; line-height: 20px; }
.tip-r.on { display: block; }

/* Sidebar hover popover (sub menu) — dark card, measured: bg #1c1e26 p16 r8 */
.menu-popover { position: fixed; left: 220px; background: #1c1e26; color: var(--side-text); border-radius: 8px; padding: 16px; display: none; z-index: 60; box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.menu-popover.open { display: block; }
.menu-popover .pm-content { display: flex; align-items: flex-start; gap: 16px; }
.menu-popover .pm-group { min-width: 160px; }
.menu-popover .pm-title { height: 36px; padding: 8px 8px 0; font-weight: 600; color: var(--side-text); display: flex; align-items: center; }
.menu-popover .pm-item { height: 36px; padding: 8px 12px; border-radius: 8px; display: flex; align-items: center; color: var(--side-text); font-weight: 400; white-space: nowrap; }
.menu-popover .pm-item:hover { background: #303642; color: #fff; }
.menu-popover .pm-t { flex: 1; line-height: 20px; display: flex; align-items: center; }
.menu-popover .pm-star { margin-left: 13px; color: var(--muted); display: flex; width: 16px; height: 16px; }
.menu-popover .pm-star:hover { color: #fdb022; }
.ui-new { display: inline-block; margin-left: 5px; padding: 0 5px; border-radius: 5px; background: var(--orange); color: #fff; font-size: 10px; font-weight: 420; line-height: 15px; }
.circle-new { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 18px; margin: 0 6px 0 12px; border-radius: 3px; background: var(--orange); color: #fff; font-size: 10px; font-weight: 400; }

/* Right edge green tab (collapse right panel) */
.right-edge-tab { position: absolute; right: 0; top: 282px; width: 10px; height: 28px; background: var(--brand); border-radius: 6px 0 0 6px; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 10px; z-index: 30; cursor: pointer; }

/* ===== Floating panels opened from header / sidebar ===== */
.shell-pop { position: fixed; z-index: 900; }
.pop-arrow { position: absolute; top: -7px; width: 14px; height: 14px; background: #fff; transform: rotate(45deg); box-shadow: -2px -2px 3px rgba(0,0,0,.06); }
/* Thêm nhanh */
.qa-pop { width: 676px; }
.qa-pop .qa-arrow { position: absolute; top: 0; width: 0; height: 0; border: 5px solid transparent; border-top: 0; border-bottom-color: #fff; }
.qa-pop .qa-inner { margin-top: 5px; background: #fff; border-radius: 12px; box-shadow: 0 6px 10px rgba(15,24,57,.3); overflow: hidden; }
.qa-pop .qa-content { display: grid; grid-template-columns: repeat(3, 196px); column-gap: 24px; row-gap: 16px; padding: 24px 20px 8px; align-items: start; }
.qa-pop .qa-title { height: 28px; padding-left: 10px; margin-bottom: 8px; border-radius: 6px; background: #f5f5f5; color: #000; font-weight: 600; display: flex; align-items: center; }
.qa-pop .qa-item { display: block; height: 28px; padding: 4px 12px 4px 16px; color: var(--link); cursor: pointer; line-height: 20px; border-radius: 6px; }
.qa-pop .qa-item:hover { background: #eef4fe; }
.qa-pop .qa-setting { display: flex; justify-content: flex-end; padding: 9px 20px; border-top: 1px solid #e5e7ea; }
.qa-pop .qa-set { display: flex; align-items: center; gap: 5px; color: var(--link); cursor: pointer; }
.qa-pop .qa-set .msk { color: var(--muted); }
/* Chế độ làm việc */
.branch-pop { width: 400px; background: #fff; border: 1px solid #babec5; border-radius: 12px; padding: 12px 20px 10px; color: #212111; box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.branch-pop .bw-title { font-weight: 700; color: var(--text); padding-bottom: 4px; line-height: 20px; }
.branch-pop .bw-radios { display: flex; gap: 24px; height: 28px; align-items: center; margin-bottom: 8px; }
.branch-pop .bw-radio { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; color: #101828; }
.branch-pop button.bw-radio { border: 0; padding: 0; background: transparent; font: inherit; }
.branch-pop .bw-radio .r { width: 16px; height: 16px; border-radius: 50%; border: 1px solid #d5d7da; background: #fff; position: relative; }
.branch-pop .bw-radio.on .r { border-color: var(--brand); }
.branch-pop .bw-radio.on .r::after { content: ""; position: absolute; left: 3px; top: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.branch-pop .bw-line { height: 1px; background: #d4d7dc; margin-top: 12px; }
.branch-pop .bw-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.branch-pop .ms-button { min-width: 80px; }
/* Tìm kiếm */
body.shell-search-open .header-quick-search { box-shadow: 0 0 0 1px #b78cff; }
.search-pop { width: 700px; border-radius: 12px; border: 1px solid transparent; background: linear-gradient(#fff, #fff) padding-box, linear-gradient(97.76deg, #88d6ff 8.87%, #f499ff) border-box; box-shadow: 0 3px 12px rgba(0,0,0,.25); overflow: hidden; }
.search-pop .sp-content { padding: 16px; max-height: 520px; overflow: auto; }
.search-pop .sp-sec { padding: 4px 0; margin-bottom: 6.5px; }
.search-pop .sp-title { display: flex; align-items: center; gap: 4px; font-weight: 700; height: 18px; margin-bottom: 6.5px; }
.search-pop .sp-title .msk.orange { color: var(--orange); width: 18px; height: 18px; }
.search-pop .sp-title .msk { color: var(--muted); }
.search-pop .sp-top, .search-pop .sp-recent { display: table; height: 25px; padding: 0 12px; margin-bottom: 8px; border-radius: 8px; background: #f2f2f4; cursor: pointer; line-height: 25px; min-width: 155px; text-align: center; }
.search-pop .sp-recent { min-width: 0; height: 23px; line-height: 23px; padding: 0 16px 0 22px; }
.search-pop button.sp-recent { border: 0; font: inherit; }
.search-pop .sp-top:hover, .search-pop .sp-recent:hover { background: #e6e8ec; }
.search-pop .sp-hit { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; border-radius: 6px; cursor: pointer; }
.search-pop button.sp-hit { width: 100%; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; }
.search-pop .sp-hit:hover { background: #f2f2f4; }
.search-pop .sp-hit .m { margin-left: auto; color: var(--muted); font-size: 12px; }
.search-pop .sp-empty { color: var(--muted); padding: 6px 8px; }
.search-pop .sp-foot { height: 36px; background: #f7f7f8; border-top: 1px solid #e9eaeb; display: flex; align-items: center; justify-content: flex-end; padding-right: 16px; }
.search-pop .adv { display: flex; align-items: center; gap: 8px; color: var(--link); cursor: pointer; }
.search-pop button.adv { border: 0; background: transparent; font: inherit; }
/* Tải xuống */
.dl-pop { width: 376px; background: #fff; border-radius: 12px; box-shadow: 0 2px 6px 2px rgba(0,0,0,.3); }
.dl-pop .dl-head { display: flex; align-items: center; padding: 15px 7px 0 16px; height: 36px; }
.dl-pop .dl-head .t { flex: 1; font-weight: 700; }
.dl-pop .dl-head .x { width: 24px; height: 24px; display: flex; color: var(--muted); cursor: pointer; }
.dl-pop .dl-sub { padding: 8px 16px 10px; color: #757575; font-size: 12px; margin-bottom: 28px; }
/* Thông báo */
.nt-pop { width: 378px; height: 720px; max-height: calc(100vh - 64px); background: #fff; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,.12); display: flex; flex-direction: column; }
.nt-pop .nt-head { flex: 0 0 65px; height: 65px; padding: 21px 24px; display: flex; align-items: center; }
.nt-pop .nt-title { flex: 1; font-size: 20px; font-weight: 700; }
.nt-pop .nt-filter { display: flex; align-items: center; gap: 3px; padding: 5px 12px; border-radius: 14px; cursor: pointer; }
.nt-pop .nt-filter:hover, .nt-pop .nt-more:hover { background: #f2f2f4; }
.nt-pop .nt-more { margin-left: 17px; width: 25px; height: 25px; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 2px; cursor: pointer; }
.nt-pop .nt-more i { width: 4px; height: 4px; border-radius: 50%; background: #666; }
.nt-pop .nt-tabs { display: flex; justify-content: space-between; gap: 12px; padding: 0 24px; flex: 0 0 32px; height: 32px; border-bottom: 1px solid var(--border); }
.nt-pop .nt-tab { white-space: nowrap; flex: 0 0 auto; font-weight: 500; cursor: pointer; border-bottom: 2px solid transparent; height: 32px; }
.nt-pop button.nt-tab { border-top: 0; border-left: 0; border-right: 0; padding: 0; background: transparent; color: inherit; font: inherit; }
.nt-pop .nt-tab.on { color: var(--brand); font-weight: 700; border-bottom-color: var(--brand); }
.nt-pop .nt-list { flex: 1; overflow: auto; margin-bottom: 12px; }
.nt-pop .nt-item { display: flex; align-items: flex-start; padding: 12px 24px; cursor: pointer; }
.nt-pop .nt-item.unread { background: #e9f2fd; }
.nt-pop .nt-item:hover { background: #f2f4f7; }
.nt-pop .nt-ico { width: 38px; height: 38px; flex: 0 0 38px; margin-right: 12px; background: url("https://actapp.misacdn.net/dn/g2/assets/images/Sprites.svg") -3463px -1050px no-repeat; }
.nt-pop .nt-c { flex: 1; min-width: 0; }
.nt-pop .nt-t { line-height: 18px; }
.nt-pop .nt-time { margin-top: 8px; color: #666; }
.nt-pop .nt-empty { padding: 40px; text-align: center; color: var(--muted); }
/* Trợ giúp */
.hp-pop { width: 420px; background: #fff; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,.12); padding-bottom: 0; }
.hp-pop .hp-sec { padding-bottom: 24px; }
.hp-pop .hp-h { font-size: 18px; margin: 20px 0 16px 40px; line-height: 27px; }
.hp-pop .hp-row { display: flex; align-items: center; height: 32px; padding-left: 25px; cursor: pointer; margin-right: 6px; color: var(--text); }
.hp-pop button.hp-row { width: calc(100% - 6px); border: 0; background: transparent; font: inherit; text-align: left; }
.hp-pop .hp-row:hover { background: #f2f2f4; }
.hp-pop .hp-row > .msk, .hp-pop .hp-img { margin-right: 10px; color: var(--muted); width: 24px; height: 24px; flex: 0 0 24px; background-repeat: no-repeat; }
.hp-pop .lk { color: var(--link); padding: 0 8px; }
.hp-pop .sep { width: 1px; height: 14px; border-left: 1px solid var(--text); }
/* Khác */
.more-pop { width: 367px; background: #fff; border-radius: 12px; padding: 12px 0; color: #1e2538; font-size: 14px; box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.more-pop .mr-item { height: 40px; padding: 0 24px; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.more-pop button.mr-item { width: 100%; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; }
.more-pop .mr-item:hover { background: #f2f2f4; }
.more-pop .mr-item .mi { color: #666; }
.more-pop .mr-line { height: 1px; background: #e0e0e0; margin: 8px 24px; }
.more-pop .mr-mobile { display: flex; padding: 0 24px; margin-top: 16px; }
.more-pop .mr-qr { width: 88px; height: 88px; }
.more-pop .mr-info { padding-left: 12px; }
.more-pop .mr-info .h { font-weight: 700; margin-bottom: 8px; }
.more-pop .mr-info .links { display: flex; gap: 12px; margin-top: 8px; color: #1e2538; }
/* Thiết lập */
.st-pop { width: 1231px; max-width: calc(100vw - 24px); max-height: calc(100vh - 64px); overflow: auto; background: #fff; border-radius: 12px; padding: 12px 0; display: flex; box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.st-pop .st-left { width: 886px; padding: 0 8px; }
.st-pop .st-h { font-size: 18px; padding: 18px 16px; line-height: 27px; }
.st-pop .st-cols { display: flex; }
.st-pop .st-col.c1 { width: 200px; padding: 0 30px 0 5px; }
.st-pop .st-col.c2 { width: 310px; padding-right: 30px; }
.st-pop .st-col.c3 { width: 360px; padding-right: 5px; }
.st-pop .st-ch { font-weight: 700; padding: 7px 16px; height: 32px; }
.st-pop .st-it { min-width: 0; padding: 7px 16px; height: 32px; display: flex; align-items: center; cursor: pointer; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-pop button.st-it { width: 100%; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; }
.st-pop .st-it:hover { background: #f2f2f4; color: var(--brand); }
.st-pop .st-right { width: 333px; margin-right: 12px; background: #eceef1; border-radius: 6px; padding: 45px 20px 30px; }
.st-pop .st-rg + .st-rg { padding-top: 20px; }
.st-pop .st-right .st-it:hover { background: #e2e5ea; }
@media (max-width: 1100px) {
  .st-pop .st-left { width: auto; flex: 1 1 auto; min-width: 0; }
  .st-pop .st-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-pop .st-col.c1, .st-pop .st-col.c2, .st-pop .st-col.c3 { width: auto; padding: 0 8px; }
  .st-pop .st-right { width: 300px; flex: 0 0 300px; }
}
/* Tài khoản */
.us-pop { width: 302px; background: #fff; border-radius: 12px; color: #1f1f1f; font-size: 14px; box-shadow: 0 3px 16px rgba(0,0,0,.16); padding-top: 24px; }
.us-pop .us-top { position: relative; width: 64px; height: 64px; margin: 0 auto; }
.us-pop .us-ring { width: 64px; height: 64px; }
.us-pop .us-ring .inner { width: 58px; height: 58px; padding: 2px; }
.us-pop .us-ring .av { width: 54px; height: 54px; font-size: 18px; }
.us-pop .us-name { margin-top: 16px; font-size: 20px; font-weight: 700; text-align: center; padding: 0 24px; }
.us-pop .us-mail { text-align: center; color: #666; font-size: 13px; margin-bottom: 16px; }
.us-pop .us-upd { background: #fff5f6; border-radius: 6px; padding: 12px 16px; margin-bottom: 16px; }
.us-pop .us-upd .rate { color: #2ca01c; margin-bottom: 10px; }
.us-pop .us-upd .bars { display: flex; gap: 2px; margin-bottom: 16px; }
.us-pop .us-upd .bars .b { flex: 1; height: 8px; background: #fa858a; }
.us-pop .us-upd .bars .b.on { background: #2ca01c; }
.us-pop .us-upd .note { display: flex; gap: 4px; margin-bottom: 16px; color: #f04438; }
.us-pop .us-upd .note i { color: #1f1f1f; }
.us-pop .us-upd .btn { height: 36px; border-radius: 6px; background: #0065ff; color: #fff; text-align: center; line-height: 20px; padding: 8px 16px; cursor: pointer; }
.us-pop .us-ws { margin: 0 16px 8px; border: 1px solid #e0e0e0; border-radius: 4px; padding: 0 8px; }
.us-pop .us-ws .w { display: flex; align-items: center; gap: 6px; padding: 8px 12px 8px 4px; }
.us-pop .us-ws .w.t { min-height: 58px; }
.us-pop .us-ws .w.d { border-top: 1px solid #e5e5e5; cursor: pointer; }
.us-pop .us-ws button.w.d { width: 100%; border-right: 0; border-bottom: 0; border-left: 0; background: transparent; color: inherit; font: inherit; text-align: left; }
.us-pop .us-it { height: 40px; margin: 0 16px; display: flex; align-items: center; gap: 8px; padding-left: 8px; border-radius: 3px; cursor: pointer; }
.us-pop button.us-it { width: calc(100% - 32px); border: 0; background: transparent; color: inherit; font: inherit; text-align: left; }
.us-pop .us-it:hover { background: #f2f2f4; }
.us-pop .us-it .mi { color: #686c7b; }
.us-pop .us-it.lang .flag { width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(#da251d, #da251d); position: relative; margin: 0 4px; }
.us-pop .us-it.lang .flag::after { content: "★"; position: absolute; inset: 0; color: #ffcd00; font-size: 9px; line-height: 16px; text-align: center; }
.us-pop .us-it.lang .mi:last-child { margin-left: auto; margin-right: 8px; }
.us-pop .us-out { margin-top: 16px; border-top: 1px solid #e0e0e0; height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.us-pop button.us-out { width: 100%; border-right: 0; border-bottom: 0; border-left: 0; background: transparent; color: inherit; font: inherit; gap: 8px; }
.us-pop .us-out label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
/* Thiết lập hiển thị tab */
.tc-pop { width: 324px; background: #fff; border-radius: 8px; padding: 12px 0; box-shadow: 0 3px 6px rgba(0,0,0,.16); }
.tc-pop .tc-title { margin: 12px; font-size: 16px; font-weight: 500; line-height: 24px; }
.tc-pop .tc-item { display: flex; align-items: center; margin: 0 12px; padding: 16px 0; border-bottom: 1px solid #e9eaeb; height: 61px; }
.tc-pop .tc-item:last-child { border-bottom: 0; }
.tc-pop .tc-drag { width: 16px; margin-right: 13px; color: #9da2ac; cursor: grab; display: flex; }
.tc-pop label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.tc-pop .checkbox_x { width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; background: #fff; color: #fff; }
.tc-pop .checkbox_x.checked { background: var(--brand); border-color: var(--brand); }
.tc-pop .tc-adv { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 12px 14px; color: var(--link); cursor: pointer; }
/* Full screen popups (đồng bộ) */
.full-pop { inset: 0; background: #fff; display: flex; flex-direction: column; z-index: 950; }
.full-pop .fp-head { height: 54px; display: flex; align-items: center; padding: 12px 16px 12px 20px; }
.full-pop .fp-title { font-size: 20px; font-weight: 600; flex: 1; }
.full-pop .fp-x { width: 24px; height: 24px; display: flex; color: var(--muted); cursor: pointer; margin-left: 12px; }
.full-pop .fp-body { flex: 1; background: #ecedef; padding: 16px; min-height: 0; display: flex; }
.sync-pop .sy-wrap { flex: 1; display: flex; min-height: 0; }
.sync-pop .sy-left { width: 220px; padding-top: 16px; }
.sync-pop .sy-title { font-size: 24px; font-weight: 700; line-height: 36px; }
.sync-pop .sy-left .sy-title { margin: 0 0 32px 32px; }
.sync-pop .sy-app { height: 42px; line-height: 42px; padding-left: 32px; cursor: pointer; }
.sync-pop button.sy-app { width: 100%; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; }
.sync-pop .sy-app.on { background: #ebedf0; color: #2ca01c; }
.sync-pop .sy-right { flex: 1; background: #f4f5f8; padding: 16px 16px 12px; display: flex; flex-direction: column; min-width: 0; }
.sync-pop .sy-head { display: flex; align-items: flex-start; gap: 0; height: 36px; }
.sync-pop .sy-sub { flex: 1; }
.sync-pop .sy-ico { width: 24px; height: 24px; display: flex; cursor: pointer; color: var(--text); margin-left: 12px; }
.sync-pop .sy-main { flex: 1; margin-top: 11px; background: #fff; display: flex; flex-direction: column; min-height: 0; }
.sync-pop .sy-tool { display: flex; align-items: center; gap: 16px; padding: 16px; }
.sync-pop .sy-tool .ms-searchbox { width: 200px; }
.sync-pop .sy-combo { width: 200px; height: 28px; border: 1px solid var(--border); border-radius: 6px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 12px; }
.sync-pop button.sy-combo { background: #fff; color: inherit; font: inherit; }
.sync-pop .sy-auto { display: flex; align-items: center; gap: 4px; color: var(--link); cursor: pointer; }
.sync-pop button.sy-auto { border: 0; background: transparent; font: inherit; }
.sync-pop .sy-grid { margin: 0 26px 0 16px; border-collapse: collapse; table-layout: fixed; }
.sync-pop .sy-grid th { height: 32px; background: var(--grid-head); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font-weight: 700; text-align: center; padding: 0 16px; }
.sync-pop .sy-grid th.l { text-align: left; }
.sync-pop .sy-empty { flex: 1; display: flex; flex-direction: column; align-items: center; padding-top: 50px; gap: 12px; }
.sync-pop .sy-empty .img { width: 132px; height: 74px; background: url("https://actapp.misacdn.net/dn/g2/assets/images/nodata/bg_TienMat_KiemKe_green.svg") center / contain no-repeat; opacity: .7; }
.sync-pop .sy-foot { display: flex; justify-content: space-between; padding: 10px 16px 12px; }
/* Mời người dùng */
.inv-mask { inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; z-index: 950; }
.inv-dlg { width: 880px; background: #fff; border-radius: 12px; box-shadow: 0 5px 20px rgba(0,0,0,.2); overflow: hidden; }
.inv-head { display: flex; align-items: center; gap: 12px; padding: 20px 24px 0; }
.inv-logo { width: 36px; height: 36px; background: var(--sprite1) -404px -176px / 982px 479px no-repeat; transform: scale(1.12); }
.inv-title { flex: 1; font-size: 24px; font-weight: 700; color: #1570ef; }
.inv-x { color: var(--muted); cursor: pointer; display: flex; }
.inv-sub { display: flex; align-items: center; justify-content: space-between; padding: 6px 24px 16px 72px; font-size: 14px; }
.inv-imp { height: 32px; padding: 0 12px; border-radius: 6px; border: 1px solid #a684ff; color: #1570ef; display: flex; align-items: center; gap: 6px; background: #fff; }
.inv-grid { padding: 0 24px; }
.inv-gh { display: grid; grid-template-columns: 1fr 1fr 52px; background: #dde8f8; border-radius: 6px 6px 0 0; height: 36px; align-items: center; font-weight: 600; padding: 0 12px; gap: 8px; }
.inv-gh b { color: #f04438; font-weight: 600; }
.inv-row { display: grid; grid-template-columns: 1fr 1fr 52px; gap: 8px; padding: 8px 4px; border-bottom: 1px solid #e9eaeb; align-items: center; }
.inv-row input { height: 32px; border: 1px solid var(--border); border-radius: 6px; padding: 0 10px; outline: none; }
.inv-row input:focus { border-color: #1570ef; }
.inv-row .del { width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #f04438; cursor: pointer; margin-left: 12px; }
.inv-row button.del { background: #fff; }
.inv-add { display: inline-flex; align-items: center; gap: 6px; color: #1570ef; padding: 12px 0; cursor: pointer; }
.inv-add { border: 0; background: transparent; font: inherit; }
.inv-msg { padding: 0 24px 16px; }
.inv-msg .l { margin-bottom: 8px; }
.inv-msg textarea { width: 100%; height: 90px; border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; font: inherit; outline: none; resize: vertical; }
.inv-msg textarea:focus { border-color: #1570ef; box-shadow: 0 0 0 1px #1570ef; }
.inv-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; background: #f5f5f7; }
.inv-foot > span { display: flex; align-items: center; gap: 6px; }
.inv-send { height: 32px; padding: 0 16px; border-radius: 6px; background: #1570ef; color: #fff; display: flex; align-items: center; gap: 6px; font-weight: 500; }
/* Chat side panel overlays the app so opening it does not resize page content. */
.side-chat { position: fixed; top: 0; right: 0; bottom: 0; width: 500px; background: #fff; box-shadow: 0 0 4px rgba(0,0,0,.2); z-index: 800; display: flex; flex-direction: column; }
.side-chat .sc-top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; height: 52px; }
.side-chat .sc-search { flex: 1; height: 30px; border-radius: 8px; background: #f2f2f4; display: flex; align-items: center; gap: 6px; padding: 0 10px; color: #9da2ac; }
.side-chat .sc-search input { flex: 1; border: 0; background: transparent; outline: none; }
.side-chat .sc-ic { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; color: var(--muted); cursor: pointer; }
.side-chat button.sc-ic, .side-chat button.sc-tab, .side-chat button.send { border: 0; padding: 0; font: inherit; }
.side-chat button.sc-ic, .side-chat button.sc-tab { background: transparent; }
.side-chat .sc-tabs { display: flex; padding: 0 12px; gap: 4px; }
.side-chat .sc-tab { flex: 1; height: 44px; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); cursor: pointer; }
.side-chat .sc-tab.on { background: #e8f1fd; color: #1570ef; }
.side-chat .sc-list { flex: 1; overflow: auto; padding: 8px 0; }
.side-chat .sc-empty { height: 100%; min-height: 160px; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.side-chat .sc-item { display: flex; gap: 10px; padding: 8px 16px; cursor: pointer; }
.side-chat .sc-item:hover { background: #f5f7fa; }
.side-chat .sc-av { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 40px; background: #e9eaeb; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; }
.side-chat .sc-av.MT { background: #a855f7; }
.side-chat .sc-av.misa { background: #fff; border: 1px solid #e9eaeb; }
.side-chat .sc-txt { min-width: 0; flex: 1; }
.side-chat .sc-txt .n { font-weight: 600; font-size: 14px; }
.side-chat .sc-txt .m { display: flex; gap: 4px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.side-chat .sc-txt .m span:first-child { overflow: hidden; text-overflow: ellipsis; }
.side-chat .sc-bottom { padding: 8px 12px 12px; }
.side-chat .sc-input { height: 40px; border: 1px solid #b2ccff; border-radius: 10px; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 12px; color: var(--muted); }
.side-chat .sc-search:focus-within, .side-chat .sc-input:focus-within { outline: 2px solid #1570ef; outline-offset: 1px; }
.side-chat .sc-input input { flex: 1; border: 0; outline: none; }
.side-chat .sc-input .send { width: 28px; height: 28px; border-radius: 50%; background: #1570ef; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.side-chat .sc-input input:disabled { color: var(--muted); cursor: not-allowed; }
.side-chat .sc-input .send:disabled { background: #b6c5dd; cursor: not-allowed; }
.shell-pop button:focus-visible, .side-chat button:focus-visible { outline: 2px solid #1570ef; outline-offset: 1px; }

/* toast */
.ms-toast { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 2000; min-width: 280px; max-width: 640px; padding: 10px 16px; border-radius: 8px; background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.16); display: flex; align-items: center; gap: 8px; border-left: 4px solid var(--brand); transition: opacity .3s; }
.ms-toast .ms-toast__ico { color: var(--brand); display: flex; }
.ms-toast.info { border-left-color: #1570ef; } .ms-toast.info .ms-toast__ico { color: #1570ef; }
.ms-toast.warn { border-left-color: #f79009; } .ms-toast.warn .ms-toast__ico { color: #f79009; }
.ms-toast.out { opacity: 0; }

/* generic dropdown menu (MisaShell.menu) */
.ms-menu.shell-menu { position: fixed; z-index: 1500; padding: 8px 0; border-radius: 8px; box-shadow: 0 3px 6px rgba(0,0,0,.16); min-width: 105px; }
.ms-menu.shell-menu a { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 16px; line-height: 20px; color: var(--text); cursor: pointer; }
.ms-menu.shell-menu a:hover { background: #f2f2f4; }
.ms-menu.shell-menu a.on { color: var(--brand); font-weight: 600; }
.ms-menu.shell-menu a .chk { margin-left: auto; color: var(--brand); }
.ms-menu.shell-menu a.danger { color: #f04438; }
.ms-menu.shell-menu a.disabled { color: #9da2ac; cursor: default; }
.ms-menu.shell-menu a .mi { color: var(--muted); }
.ms-menu.shell-menu .sm-sep { height: 1px; background: #e9eaeb; margin: 4px 0; }

/* small modal dialog (MisaShell.dialog) */
.sh-dlg-mask { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1200; display: flex; align-items: center; justify-content: center; }
.sh-dlg { background: #fff; border-radius: 12px; box-shadow: 0 5px 20px rgba(0,0,0,.1); }
.sh-dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px 16px; font-size: 20px; font-weight: 600; line-height: 30px; }
.sh-dlg-x { color: var(--muted); cursor: pointer; display: flex; }
.sh-dlg-body { padding: 4px 16px 8px; }
.sh-dlg-body .row { display: flex; gap: 16px; margin-bottom: 8px; }
.sh-dlg-body .fld { display: flex; flex-direction: column; }
.sh-dlg-body .fld > label { font-weight: 500; line-height: 24px; }
.sh-dlg-body .ctl { height: 28px; border: 1px solid var(--border); border-radius: 6px; display: flex; align-items: center; background: #fff; }
.sh-dlg-body .ctl:focus-within { border-color: var(--brand); }
.sh-dlg-body .ctl input, .sh-dlg-body .ctl select { flex: 1; min-width: 0; border: 0; outline: none; height: 26px; padding: 0 12px; background: transparent; font-size: 13px; }
.sh-dlg-body .ctl .mi { color: var(--muted-2); margin-right: 6px; }
.sh-dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px 16px; }
.sh-dlg-foot .ms-button { min-width: 80px; }
/* Right edge expander (Misa .expand-btn: arrow_right.svg 17x66, bg -39px -1px / 56x80; vertically ~ at 50vh-127px of the window) */
.right-edge-tab { top: calc(50vh - 175px); width: 17px; height: 66px; background: url("https://actapp.misacdn.net/dn/g2/assets/images/arrow_right.svg?v=96.1.3.14") no-repeat -39px -1px / 56px 80px; border-radius: 0; }
.right-edge-tab > * { display: none; }
