/* egx-demo-mobile.css — chỉ mobile cho trang template (port từ mau.html nhưng mobile-only) */
@media (max-width: 768px) {
    .egx-page .demo-sec { padding: 12px; margin-bottom: 10px; }
    .egx-page .demo-sec > h2 { font-size: 12px; }
    .egx-page .demo-sec > p { font-size: 11px; }
    .egx-page .demo-sec .demo-grid2 { grid-template-columns: 1fr !important; }
    .egx-page .demo-sec .demo-row { gap: 8px; }
    .egx-page .egx-pagetop { gap: 8px; }
    .egx-page .egx-pagetop .egl-search { max-width: none; }
    .egx-page .egx-field .egx-fbox { min-height: 44px; }
    .egx-page .egx-field .egx-flabel { font-size: 11px; }
    .egx-page .egx-pipe { padding: 10px; }
    .egx-page .egx-pipe-head { flex-wrap: wrap; gap: 8px; }
    .egx-page .egx-pipe-title { font-size: 12px; }
    .egx-page .egx-pipe-sub { font-size: 11px; }
    .egx-page .egx-pipe-pct { font-size: 12px; padding: 3px 8px; }
    .egx-page .egl-pager { flex-direction: column; align-items: stretch; gap: 8px; }
    .egx-page .egl-pager .egl-pages { justify-content: center; }
    .egx-page .egl-pager .egl-perpage { justify-content: center; }
    .egx-page .egx-fbadge { width: 34px; font-size: 12px; }
    .egx-page .egx-fbox input, .egx-page .egx-fbox textarea { font-size: 14px; }
    .egx-page .egx-fdrop { max-width: calc(100vw - 24px); }
    .egx-page .egx-fdrop.egx-ddrop { width: calc(100vw - 24px); left: 50% !important; right: auto !important; transform: translateX(-50%); }
    .egx-page .egx-tcols { gap: 6px; }
    .egx-page .egx-udrop { padding: 14px 10px; font-size: 12px; }
    .egx-page .demo-fsub, .egx-page .demo-msub { padding: 8px; }
    /* Chieu cao that cua control_footer tren mobile: 62px (padding day 6)
       va 76px tren iOS (padding day 20). Panel submenu neo theo bien nay
       de KHONG de len footer. */
    html { --egl-foot-h: 62px; }
    /* control_footer > submenu (.egl-fsub): them 10px padding day (10 -> 20px). */
    .egl-fsub {
        padding-bottom: 20px;
        bottom: calc(var(--egl-foot-h) + 8px);
        max-height: calc(100vh - var(--egl-foot-h) - 24px);
    }
    /* Panel con (nhom menu cap 2 / cap 3 trong footer): them 10px nua
       (20 -> 30px) de muc cuoi khong sat vien panel. */
    .egl-fsub.footer-group-submenu { padding-bottom: 30px; }
    /* Badge trong submenu footer (cap 2/3, mobile-only): neo .nic lam moc
       nhu sidebar (.egl-fly a .nic) + offset giong sidebar, neu khong badge
       absolute bat moc sai (panel) -> hien lech/tran. */
    .egl-fsubitem .nic { position: relative; display: inline-flex; }
    .egl-fsubitem .nic .notification-badge { top: -13px; right: -14px; }
    /* .egx-page chi can chut dem: khoang ho doi footer do .container lo
       (62px = dung cao footer) — truoc day 90px + padding o .egl-main lam
       du ~160px trong duoi noi dung (nhin nhu footer bi "day len"). */
    .egx-page { padding-bottom: 10px; }
    /* Footer dinh sat vien duoi (moi mobile — Android von da dung, iPhone
       truoc day lech vi phu thuoc html.is-ios ma iPadOS bao UA "Macintosh"
       nen rule khong chay):
       1) Ghim position:fixed + bottom:0 (khong the roi ve luong thuong).
       2) Bo padding du phong o .egl-main, chuyen vao .container (vung
          cuon) -> khong con khoang ho duoi footer.
       3) html + dai nen :after phu vung duoi footer bang --card -> vung
          duoi footer LUON cung mau theme (dark/light), khong con dai mau
          --bg tach khoi footer. */
    .egl-main { padding-bottom: 0; }
    /* Dung bang chieu cao footer (62px, da bo safe-area) — khong con khoang
       trong du phia tren footer khi cuon het trang. */
    .egl-main .container { padding-bottom: 62px; }
    /* padding-day CO DINH 6px, KHONG cong env(safe-area-inset-bottom):
       iOS luon tra ~34px -> footer bi day len khoi vien duoi. Android Chrome
       tra 0px cho bien nay nen khong doi gi. Home indicator ve trong suot
       de len nen footer. */
    .egl-foot {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
        padding: 6px;
        background: var(--card); border-top-color: var(--line);
    }
    html.app-home { background: var(--card); }
    /* Dai nen duoi footer: body::after bi login.css an (!important) nen
       dung html::after — luon cung mau --card voi footer. */
    /* Chi phu dung phan padding day footer (6px + safe-area). Truoc day 76px
       nen dai nay tran len tren dinh footer ~14px, nhin nhu footer bi day
       len / thua dam phia tren. */
    html.app-home::after {
        content: ""; position: fixed; left: 0; right: 0; bottom: 0;
        height: 6px;
        background: var(--card); z-index: 34; pointer-events: none;
    }
    /* iOS: KHONG giu padding safe-area o day footer (nguoi dung yeu cau sat
       vien); home indicator trong suot ve de len nen footer. */
    @supports (-webkit-touch-callout: none) {
        /* iOS: day footer xuong 20px (yeu cau) — nut cach vien duoi 20px,
           nen footer van phu kin. Chieu cao footer = 62 - 6 + 20 = 76px. */
        .egl-foot { padding: 6px 6px 20px; }
        html.app-home { --egl-foot-h: 76px; }
        html.app-home .egl-main .container { padding-bottom: 76px; }
        html.app-home::after { height: 20px; }
        /* BO che do cuon ca trang: html/body khoa cung 100%, chi .container
           cuon -> control_footer dung yen (khong bi keo/nhay khi vuot tren
           iOS), het rubber-band lam footer nhac len khoi vien duoi. */
        html.app-home,
        html.app-home body.home {
            height: 100%; overflow: hidden;
            overscroll-behavior: none; -webkit-overflow-scrolling: auto;
        }
        /* Dong bo mau: body = mau footer; .apphome giu --bg cho noi dung. */
        html.app-home body.home { background: var(--card); }
        html.app-home body.home .apphome { background: var(--bg); }
        /* control_header: padding-top 0 (iOS da bo viewport-fit=cover nen
           trang bat dau duoi status bar — khong can dem tren). */
        html.app-home .egl-header {
            height: auto;
            min-height: 60px;
            padding-top: 0;
        }
        html.app-home .egl-side {
            padding-top: env(safe-area-inset-top, 0px);
        }
    }
    /* DU PHONG (khong dung @supports): app.js gan html.is-ios (da nhan ca
       iPadOS bao UA Macintosh). Mot so WebView khong khop @supports nen
       footer bi giu padding safe-area -> cach xa vien duoi; khoi nay bao
       dam luon ap dung. Cuong do bang class rieng, khong anh huong Android. */
    html.is-ios.app-home,
    html.is-ios.app-home body.home {
        height: 100%; overflow: hidden;
        overscroll-behavior: none; -webkit-overflow-scrolling: auto;
    }
    html.is-ios.app-home body.home { background: var(--card); }
    html.is-ios.app-home body.home .apphome {
        /* 100vh (kieu admincp) de vo app phu toi day man hinh ke ca khi
           thanh cong cu trinh duyet dang hien. */
        height: 100vh; background: var(--bg);
    }
    html.is-ios .egl-foot { padding: 6px 6px 20px; }
    html.is-ios.app-home { --egl-foot-h: 76px; }
    html.is-ios.app-home .egl-main .container { padding-bottom: 76px; }
    html.is-ios.app-home::after { height: 20px; }
    html.is-ios.app-home .egl-header {
        height: auto;
        min-height: 60px;
        padding-top: 0;
    }
}
@media (max-width: 640px) {
    .egx-page .demo-row .egl-chipbtn { padding: 6px 10px; font-size: 11px; }
    .egx-page .demo-row .egl-goldbtn { padding: 10px 16px; font-size: 12px; }
    .egx-page .demo-row .egl-mbtn { padding: 6px 10px; font-size: 10px; }
    .egx-page .demo-row .egl-view { width: 28px; height: 28px; }
    .egx-page .demo-row .egl-x { width: 28px; height: 28px; }
    /* '4 · The & so lieu' tren mobile: the kieu fieldset — vien net dut,
       tieu de (kem icon) nam de len vien tren goc trai, gia tri can giua.
       Chi mobile: desktop giu nguyen the thuong (egx-legend). */
    .egx-page .elb-vcard.egx-legend-m {
        position: relative; display: flex; align-items: center; justify-content: center;
        text-align: center; border: 1px dashed var(--line); border-radius: 6px;
        background: var(--card); padding: 14px 10px 12px; margin: 0;
    }
    .egx-page .elb-vcard.egx-legend-m .egx-vlegend {
        position: absolute; top: -7px; left: 10px; display: inline-flex; align-items: center; gap: 6px;
        font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase;
        letter-spacing: .02em; background: var(--card); padding: 0 6px; white-space: nowrap;
        max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; border-radius: 6px;
    }
    .egx-page .elb-vcard.egx-legend-m .egx-vlegend i { font-size: 11px; flex: none; }
    .egx-page .elb-vcard.egx-legend-m .elb-vval { flex: 1 1 auto; width: 100%; text-align: center; }
    /* '5 · Bang' mobile: nhan cot co icon truoc tieu de (thay ::before chu
       tran). Desktop an .c-lbl va van dung thead nhu cu. */
    #table .egl-table td::before { content: none; }
    #table .egl-table td .c-lbl {
        display: flex; align-items: center; gap: 6px; width: 100%;
        font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase;
        letter-spacing: .03em; margin-bottom: 4px; text-align: left; line-height: 1.4;
    }
    #table .egl-table td .c-lbl i { font-size: 10px; color: var(--acc); flex: none; }
    /* '7 · Popup & Toast' mobile: card noi dung trong popup mau GIU NGUYEN
       khung lab nhu desktop (vien net dut + nen + bo goc, tieu de kem icon
       o tren, gia tri o duoi, can trai). Khong ap kieu hang tran (mat vien /
       nen, an icon, gia tri can phai) cua rule .elb-vcard toan cuc trong
       employee-green.css — rule do danh cho luoi chi tiet (elb-vgrid). */
    [data-demomodalbox] .elb-vcard {
        display: block; border: 1px dashed var(--line); border-radius: 6px;
        background: var(--card); padding: 10px; min-width: 0;
    }
    [data-demomodalbox] .elb-vkey {
        display: flex; align-items: center; gap: 6px; max-width: none;
        margin: 0 0 4px; font-size: 10px; white-space: normal;
    }
    [data-demomodalbox] .elb-vkey i { display: inline-block; font-size: 11px; }
    [data-demomodalbox] .elb-vval { display: block; font-size: 13px; text-align: left; }
    /* Bảng card giữ nguyên @media 768 (1fr 1fr, Họ tên full-width order:1) — scoped .egx-page để không vỡ khi demo-grid2 đã 1fr */
    .egx-page .demo-sec .demo-grid2 { grid-template-columns: 1fr !important; }
    .egx-page .egl-table tr { grid-template-columns: 1fr 1fr; }
}
/* Company tablet (641..1024, dung breakpoint lab 1024): giu table + an 2 cot phu
   (Viet tat col 4 + Ten EN col 6) + pager wrap + an label ::before cua card
   (ke thua tu rule generic <768 trong employee-green.css) de bang sach.
   Dat TRUOC block mobile <=640 de mobile ghi de lai (hien du cot + card). */
@media (max-width: 1024px) {
    [data-company-root] .egl-card { overflow-x: auto; }
    [data-company-root] .egl-table col:nth-child(4),
    [data-company-root] .egl-table col:nth-child(6) { display: none; }
    [data-company-root] .egl-table th:nth-child(4),
    [data-company-root] .egl-table td:nth-child(4),
    [data-company-root] .egl-table th:nth-child(6),
    [data-company-root] .egl-table td:nth-child(6) { display: none; }
    [data-company-root] .egl-table td::before { content: none; display: none; }
    [data-company-root] .egl-table tr { border: 0; margin: 0; }
    [data-company-root] .egl-table td { text-align: left; border-bottom: 1px solid var(--line); }
    [data-company-root] .egl-table td.c-act { text-align: center; }
    [data-company-root] .egl-pager { flex-wrap: wrap; }
    [data-company-root] .egl-pages { flex-wrap: wrap; }
}
/* Company mobile card (<=640px, gom ca 375px): thead an + row grid 2 cot,
   card radius 6px + cuon ngang, cell hien label data-l, cot Thao tac full-width hang nut,
   pager xep doc can giua, nut bam >=44px. Scope [data-company-root]. */
@media (max-width: 640px) {
    [data-company-root] { min-width: 0; }
    /* Mobile company: bo vien + nen + padding ngoai .egl-card (giu radius +
       cuon ngang). Ngoai le rieng company — khong sua global lab .egl-card. */
    [data-company-root] .egl-card { border: 0; background: none; padding: 0; border-radius: 6px; min-width: 0; max-width: 100%; overflow-x: auto; }
    [data-company-root] .egl-table { display: block; width: 100%; padding: 0; }
    [data-company-root] .egl-table thead { display: none; }
    [data-company-root] .egl-table tbody { display: block; width: 100%; }
    /* Mobile company: margin doc 6px giua cac dong (lab 10px 4 huong thua,
       margin 0 thi sat qua). List van sat mep ngang. Table goc khong co
       padding. Ngoai le rieng company — giu lab + trang khac. */
    [data-company-root] .egl-table tr { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 6px; margin: 6px 0; width: auto; background: var(--card); }
    [data-company-root] .egl-table td { overflow-wrap: break-word; word-break: normal; border-bottom: 1px dashed var(--line); text-align: center; }
    /* Mau template §5 mobile (#table): tat ::before chu tran, dung .c-lbl
       co icon (rowHtml) — desktop .c-lbl display:none nen khong anh huong. */
    [data-company-root] .egl-table td::before { content: none; }
    [data-company-root] .egl-table td .c-lbl {
        display: flex; align-items: center; gap: 6px; width: 100%;
        font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase;
        letter-spacing: .03em; margin-bottom: 4px; text-align: left; line-height: 1.4;
    }
    [data-company-root] .egl-table td .c-lbl i { font-size: 10px; color: var(--acc); flex: none; }
    /* Line net dut doc giua 2 cot (mau lab employee-green.css:249-260):
       cot phai (even) co border-left dashed; c-act full-width loai tru. */
    [data-company-root] .egl-table td:nth-child(even):not(.c-act) { border-left: 1px dashed var(--line); }
    /* Empty state (td colspan) phai full-width trong grid 2-col: de nguyen
       thi o chi chiem nua trai (184px/370px) -> thong bao bi lech trai. */
    [data-company-root] .egl-table td[colspan] { grid-column: 1 / -1; border-left: 0; border-bottom: 0; }
    /* Cot Thao tac full-width: neo theo class lab .c-act (rowHtml dat
       class="c-act", thead + tbody) thay vi gia tri data-l theo ngon ngu
       (vi "Thao tác" / en "Actions") de EN khong vo layout. */
    [data-company-root] .egl-table td.c-act { grid-column: 1 / -1; min-width: 0; border-bottom: 0; }
    /* Mobile hien DU cot (ghi de tablet an 4/6): card 2-col du cho de doc,
       theo mau lab employee .c-phone/.c-birth display block (employee-green.css). */
    [data-company-root] .egl-table col:nth-child(4),
    [data-company-root] .egl-table col:nth-child(6) { display: table-column; }
    [data-company-root] .egl-table td:nth-child(4),
    [data-company-root] .egl-table td:nth-child(6) { display: block; }
    [data-company-root] .egl-pager { flex-direction: column; align-items: center; gap: 8px; }
    [data-company-root] .egl-pager .egl-pages { justify-content: center; }
    [data-company-root] .egl-pager .egl-perpage { justify-content: center; }
    [data-company-root] .egl-page { min-width: 44px; min-height: 44px; }
    [data-company-root] .egl-pptrig { min-height: 44px; }
    [data-company-root] .egl-view { width: 44px; height: 44px; }
    /* Company toolbar mobile (<=640px): header wrap + search full-width +
       nut Them full 1 hang >=44px. Tai dung mau category
       ([data-category-root] + lab .egx-pagetop flex-wrap). */
    [data-company-root] .egx-pagetop { gap: 8px; }
    [data-company-root] .egx-pagetop .egl-search { flex-basis: 100%; max-width: none; min-height: 44px; }
    [data-company-root] .egl-goldbtn { min-height: 44px; width: 100%; justify-content: center; }
    /* Employee list mobile (<=640px): bang card 2-col + hien .c-lbl co icon
       + cot Thao tac full-width + pager doc can giua + nut >=44px (tai dung
       CSS company nhu category/shift: flat outer card + dong co nen).
       Scope [data-employee-root]. */
    [data-employee-root] { min-width: 0; }
    [data-employee-root] .egl-card { border: 0; background: none; padding: 0; border-radius: 6px; min-width: 0; max-width: 100%; overflow-x: auto; }
    [data-employee-root] .egl-table { display: block; width: 100%; padding: 0; }
    [data-employee-root] .egl-table thead { display: none; }
    [data-employee-root] .egl-table tbody { display: block; width: 100%; }
    [data-employee-root] .egl-table tr { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 6px; margin: 6px 0; width: auto; background: var(--card); }
    [data-employee-root] .egl-table td { overflow-wrap: break-word; word-break: normal; border-bottom: 1px dashed var(--line); text-align: center; order: initial; grid-column: auto; }
    [data-employee-root] .egl-table td::before { content: none; }
    [data-employee-root] .egl-table td .c-lbl { display: flex; align-items: center; gap: 6px; width: 100%; font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px; text-align: left; line-height: 1.4; }
    [data-employee-root] .egl-table td .c-lbl i { font-size: 10px; color: var(--acc); flex: none; }
    [data-employee-root] .egl-table td:nth-child(even):not(.c-act) { border-left: 1px dashed var(--line); }
    /* Empty state (td colspan) phai full-width trong grid 2-col (y company):
       de nguyen thi o chi chiem nua trai -> thong bao bi lech trai. */
    [data-employee-root] .egl-table td[colspan] { grid-column: 1 / -1; border-left: 0; border-bottom: 0; }
    [data-employee-root] .egl-table td.c-act { grid-column: 1 / -1; min-width: 0; border-bottom: 0; }
    [data-employee-root] .egl-pager { flex-direction: column; align-items: center; gap: 8px; }
    [data-employee-root] .egl-pager .egl-pages { justify-content: center; }
    [data-employee-root] .egl-pager .egl-perpage { justify-content: center; }
    [data-employee-root] .egl-page { min-width: 44px; min-height: 44px; }
    [data-employee-root] .egl-pptrig { min-height: 44px; }
    [data-employee-root] .egl-view { width: 44px; height: 44px; }
    [data-employee-root] .egx-pagetop { gap: 8px; }
    [data-employee-root] .egx-pagetop .egl-search { flex-basis: 100%; max-width: none; min-height: 44px; }
    [data-employee-root] .egl-goldbtn { min-height: 44px; width: 100%; justify-content: center; }
    /* Dispatch_out/dispatch_in list mobile (<=640px): bang card 2-col +
       hien .c-lbl co icon + cot Thao tac full-width + pager doc can giua
       + nut >=44px (tai dung CSS company nhu category/employee/shift).
       Scope [data-dispatchout-root]/[data-dispatchin-root] (ca 2 bang 6 cot
       nhu nhau: id/symbol/title/date/issuer/actions). Flat outer card
       nhu company de dong co nen rieng. */
    [data-dispatchout-root], [data-dispatchin-root] { min-width: 0; }
    [data-dispatchout-root] .egl-card, [data-dispatchin-root] .egl-card { border: 0; background: none; padding: 0; border-radius: 6px; min-width: 0; max-width: 100%; overflow-x: auto; }
    [data-dispatchout-root] .egl-table, [data-dispatchin-root] .egl-table { display: block; width: 100%; padding: 0; }
    [data-dispatchout-root] .egl-table thead, [data-dispatchin-root] .egl-table thead { display: none; }
    [data-dispatchout-root] .egl-table tbody, [data-dispatchin-root] .egl-table tbody { display: block; width: 100%; }
    [data-dispatchout-root] .egl-table tr, [data-dispatchin-root] .egl-table tr { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 6px; margin: 6px 0; width: auto; background: var(--card); }
    [data-dispatchout-root] .egl-table td, [data-dispatchin-root] .egl-table td { overflow-wrap: break-word; word-break: normal; border-bottom: 1px dashed var(--line); text-align: center; }
    [data-dispatchout-root] .egl-table td::before, [data-dispatchin-root] .egl-table td::before { content: none; }
    [data-dispatchout-root] .egl-table td .c-lbl, [data-dispatchin-root] .egl-table td .c-lbl { display: flex; align-items: center; gap: 6px; width: 100%; font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px; text-align: left; line-height: 1.4; }
    [data-dispatchout-root] .egl-table td .c-lbl i, [data-dispatchin-root] .egl-table td .c-lbl i { font-size: 10px; color: var(--acc); flex: none; }
    [data-dispatchout-root] .egl-table td:nth-child(even):not(.c-act), [data-dispatchin-root] .egl-table td:nth-child(even):not(.c-act) { border-left: 1px dashed var(--line); }
    /* Empty state (td colspan) phai full-width trong grid 2-col (y company):
       de nguyen thi o chi chiem nua trai -> thong bao bi lech trai. */
    [data-dispatchout-root] .egl-table td[colspan], [data-dispatchin-root] .egl-table td[colspan] { grid-column: 1 / -1; border-left: 0; border-bottom: 0; }
    /* O thu 5 (Co quan nhan) full-width: grid 2-col co 6 o — de nguyen thi
       o 5 lot nua hang trai, vien chi ke nua hang (giong case category
       td:nth-child(3)). */
    [data-dispatchout-root] .egl-table td:nth-child(5), [data-dispatchin-root] .egl-table td:nth-child(5) { grid-column: 1 / -1; }
    [data-dispatchout-root] .egl-table td.c-act, [data-dispatchin-root] .egl-table td.c-act { grid-column: 1 / -1; min-width: 0; border-bottom: 0; }
    [data-dispatchout-root] .egl-pager, [data-dispatchin-root] .egl-pager { flex-direction: column; align-items: center; gap: 8px; }
    [data-dispatchout-root] .egl-pager .egl-pages, [data-dispatchin-root] .egl-pager .egl-pages { justify-content: center; }
    [data-dispatchout-root] .egl-pager .egl-perpage, [data-dispatchin-root] .egl-pager .egl-perpage { justify-content: center; }
    [data-dispatchout-root] .egl-page, [data-dispatchin-root] .egl-page { min-width: 44px; min-height: 44px; }
    [data-dispatchout-root] .egl-pptrig, [data-dispatchin-root] .egl-pptrig { min-height: 44px; }
    [data-dispatchout-root] .egl-view, [data-dispatchin-root] .egl-view { width: 44px; height: 44px; }
    [data-dispatchout-root] .egx-pagetop, [data-dispatchin-root] .egx-pagetop { gap: 8px; }
    [data-dispatchout-root] .egx-pagetop .egl-search, [data-dispatchin-root] .egx-pagetop .egl-search { flex-basis: 100%; max-width: none; min-height: 44px; }
    [data-dispatchout-root] .egl-goldbtn, [data-dispatchin-root] .egl-goldbtn { min-height: 44px; width: 100%; justify-content: center; }
/* Shift list mobile (<=640px): bang 9 cot -> card 2-col + hien .c-lbl
   co icon + cot Thao tac full-width + pager doc can giua + nut >=44px
   (mau company/dispatch: ui-layout pageTopHtml/tableCardHtml/pagerHtml
   + rowHtml .c-lbl/.egl-id/.egl-user/.egl-act/.egl-view). Scope
   [data-shift-root]. */
    [data-shift-root] { min-width: 0; }
    /* Mobile shift: tai dung CSS company (flat card + dong co nen, cach 6px doc
       — giong category). Scope [data-shift-root]; giu pager/nut rieng. */
    [data-shift-root] .egl-card { border: 0; background: none; padding: 0; border-radius: 6px; min-width: 0; max-width: 100%; overflow-x: auto; }
    [data-shift-root] .egl-table { display: block; width: 100%; padding: 0; }
    [data-shift-root] .egl-table thead { display: none; }
    [data-shift-root] .egl-table tbody { display: block; width: 100%; }
    [data-shift-root] .egl-table tr { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 6px; margin: 6px 0; width: auto; background: var(--card); }
    [data-shift-root] .egl-table td { overflow-wrap: break-word; word-break: normal; border-bottom: 1px dashed var(--line); text-align: center; }
    [data-shift-root] .egl-table td::before { content: none; }
    [data-shift-root] .egl-table td .c-lbl { display: flex; align-items: center; gap: 6px; width: 100%; font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px; text-align: left; line-height: 1.4; }
    [data-shift-root] .egl-table td .c-lbl i { font-size: 10px; color: var(--acc); flex: none; }
    [data-shift-root] .egl-table td:nth-child(even):not(.c-act) { border-left: 1px dashed var(--line); }
    /* Empty state (td colspan) phai full-width trong grid 2-col (y company):
       de nguyen thi o chi chiem nua trai -> thong bao bi lech trai. */
    [data-shift-root] .egl-table td[colspan] { grid-column: 1 / -1; border-left: 0; border-bottom: 0; }
    [data-shift-root] .egl-table td.c-act { grid-column: 1 / -1; min-width: 0; border-bottom: 0; }
    [data-shift-root] .egl-pager { flex-direction: column; align-items: center; gap: 8px; }
    [data-shift-root] .egl-pager .egl-pages { justify-content: center; }
    [data-shift-root] .egl-pager .egl-perpage { justify-content: center; }
    [data-shift-root] .egl-page { min-width: 44px; min-height: 44px; }
    [data-shift-root] .egl-pptrig { min-height: 44px; }
    [data-shift-root] .egl-view { width: 44px; height: 44px; }
    [data-shift-root] .egx-pagetop { gap: 8px; }
    [data-shift-root] .egx-pagetop .egl-search { flex-basis: 100%; max-width: 100%; min-height: 44px; }
    [data-shift-root] .egl-goldbtn { min-height: 44px; width: 100%; justify-content: center; }
/* Dept_position list mobile (<=640px): TAI DUNG CSS company (flat card +
   dong co nen, cach 6px doc) nhu shift/category/employee/dispatch.
   Scope [data-dept-root]; giu pager/header stack rieng. */
    [data-dept-root] { min-width: 0; }
    /* Cay mobile: gon hon (le trai/đuong dashed hep), giu card lab nhu mau
       tree; nut mo/dong tang vung cham 20px. */
    [data-dept-root] .dp-tree { padding: 10px; font-size: 12px; }
    [data-dept-root] .dp-tree-sub { margin-left: 12px; padding-left: 10px; }
    [data-dept-root] .dp-tree-sub > .dp-tree-node::before { left: -10px; width: 8px; top: 16px; }
    [data-dept-root] .dp-tree-row { padding: 8px 6px; gap: 6px; }
    [data-dept-root] .dp-tree-exp { width: 20px; height: 20px; }
    [data-dept-root] .dp-tree-code { font-size: 10px; padding-left: 6px; }
    [data-dept-root] .egl-pptrig { min-height: 44px; }
    [data-dept-root] .egx-pagetop { gap: 8px; }
    [data-dept-root] .egx-pagetop .egl-search { flex-basis: 100%; max-width: 100%; min-height: 44px; }
    [data-dept-root] .egx-pagetop .egl-goldbtn { min-height: 44px; width: 100%; justify-content: center; }
    [data-dept-root] .egx-pagetop .egl-chipbtn { min-height: 44px; width: 100%; justify-content: center; }
    [data-dept-root] .egx-pagetop .egl-ppsel { flex-basis: 100%; max-width: 100%; }
    [data-dept-root] .egx-pagetop .egl-pptrig { min-height: 44px; width: 100%; }
/* Shift popup form mobile (<=640px): grid 1-col + control/nut >=44px.
   Modal dock ra body khi mo nen scope [data-sh-modal] truc tiep. */
    [data-sh-modal] .egl-pbody { padding: 12px; gap: 8px; }
    [data-sh-modal] .elb-vgrid { grid-template-columns: 1fr; gap: 8px; }
    [data-sh-modal] .egx-fbox { min-height: 44px; }
    [data-sh-modal] .egx-ftrigger { min-height: 44px; }
    [data-sh-modal] .egl-goldbtn, [data-sh-modal] .egl-page, [data-sh-modal] .egl-chipbtn { min-height: 44px; }
    [data-sh-modal] [data-sh-pipe] { padding: 12px; }
/* Dept_position popup form mobile (<=640px): grid 1-col + control/nut >=44px.
   Modal dock ra body khi mo nen scope [data-dp-modal] truc tiep. */
    [data-dp-modal] .egl-pbody { padding: 12px; gap: 8px; }
    [data-dp-modal] .elb-vgrid { grid-template-columns: 1fr; gap: 8px; }
    [data-dp-modal] .egx-fbox { min-height: 44px; }
    [data-dp-modal] .egx-ftrigger { min-height: 44px; }
    [data-dp-modal] .egl-goldbtn, [data-dp-modal] .egl-chipbtn { min-height: 44px; }
    [data-dp-modal] [data-dp-pipe] { padding: 12px; }
    [data-dp-modal] > .egl-panel { top: 50%; bottom: auto; transform: translate(-50%, -50%); height: auto; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
/* Shift popup chi tiet mobile (<=640px): side tren + main duoi 1-col
   cuon doc theo lab. Scope [data-sh-view] vi modal dock ra body. */
    [data-sh-view] .elb-view-detail { flex-direction: column; }
    [data-sh-view] .elb-view-side { flex: none; max-width: none; }
    [data-sh-view] .elb-vgrid { grid-template-columns: 1fr; }
    [data-sh-view] .egl-pfoot .egl-chipbtn,
    [data-sh-view] .egl-pfoot .egl-goldbtn { min-height: 44px; }
    [data-sh-view] [data-sh-pills] { flex-direction: row; flex-wrap: nowrap; justify-content: flex-start; align-items: center; }
    [data-sh-view] [data-sh-pills] .elb-vpill { flex: none; }
    [data-sh-view] .elb-vid { position: relative; }
    [data-sh-view] .elb-vhero { padding-right: 64px; }
    [data-sh-view] .elb-vcode { position: absolute; top: 0; right: 0; font-size: 11px; white-space: nowrap; }
    [data-sh-view] .elb-vgrid .elb-vcard:last-child { border-bottom: 1px solid var(--line); }
    [data-sh-view] .elb-view-main .elb-vval { text-align: right; }
    [data-sh-view] > .egl-panel { top: 50%; bottom: auto; transform: translate(-50%, -50%); height: auto; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
    [data-sh-view] .egl-pbody { overflow-y: auto; -webkit-overflow-scrolling: touch; }
    [data-sh-view] [data-sh-viewbody] { flex: 1; min-height: 0; display: flex; flex-direction: column; }
/* Dept_position popup chi tiet mobile (<=640px): side tren + main duoi 1-col
   cuon doc theo lab; pill 1 hang (S15.10), ma goc phai ten (S15.10),
   gia tri CAN PHAI (S15.9), panel hug + can giua doc (S15.7),
   viewbody flex chain de cuon (S15.13). Scope [data-dp-view]. */
    [data-dp-view] .elb-view-detail { flex-direction: column; }
    [data-dp-view] .elb-view-side { flex: none; max-width: none; }
    [data-dp-view] .elb-vgrid { grid-template-columns: 1fr; }
    [data-dp-view] .egl-pfoot .egl-chipbtn,
    [data-dp-view] .egl-pfoot .egl-goldbtn { min-height: 44px; }
    [data-dp-view] [data-dp-pills] { flex-direction: row; flex-wrap: nowrap; justify-content: flex-start; align-items: center; }
    [data-dp-view] [data-dp-pills] .elb-vpill { flex: none; }
    [data-dp-view] .elb-vid { position: relative; }
    [data-dp-view] .elb-vhero { padding-right: 64px; }
    [data-dp-view] .elb-vcode { position: absolute; top: 0; right: 0; font-size: 11px; white-space: nowrap; }
    [data-dp-view] .elb-vgrid .elb-vcard:last-child { border-bottom: 1px solid var(--line); }
    [data-dp-view] .elb-view-main .elb-vval { text-align: right; }
    [data-dp-view] > .egl-panel { top: 50%; bottom: auto; transform: translate(-50%, -50%); height: auto; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
    [data-dp-view] .egl-pbody { overflow-y: auto; -webkit-overflow-scrolling: touch; }
    [data-dp-view] [data-dp-viewbody] { flex: 1; min-height: 0; display: flex; flex-direction: column; }
/* Category mobile card (<=640px): thead an + row grid 2 cot, card radius 6px
   + cuon ngang, cell hien .c-lbl co icon (rowHtml, khop mau template §5),
   cot Thao tac full-width, pager doc can giua, nut >=44px.
   Scope [data-category-root]. Ghi de tablet an cot 3 (EN): mobile hien DU
   4 cot vi card 2-col du cho. */
    [data-category-root] { min-width: 0; }
    /* Mobile category list card: TAI DUNG CSS company (flat card + dong co
       nen, cach 6px doc). Scope [data-category-root]; giu logic cot rieng
       (hien DU 4 cot) + pager/nut nhu cu. */
    [data-category-root] .egl-card { border: 0; background: none; padding: 0; border-radius: 6px; min-width: 0; max-width: 100%; overflow-x: auto; }
    [data-category-root] .egl-table { display: block; width: 100%; padding: 0; }
    [data-category-root] .egl-table thead { display: none; }
    [data-category-root] .egl-table tbody { display: block; width: 100%; }
    [data-category-root] .egl-table tr { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 6px; margin: 6px 0; width: auto; background: var(--card); }
    [data-category-root] .egl-table td { overflow-wrap: break-word; word-break: normal; border-bottom: 1px dashed var(--line); text-align: center; }
    [data-category-root] .egl-table td::before { content: none; }
    [data-category-root] .egl-table td .c-lbl {
        display: flex; align-items: center; gap: 6px; width: 100%;
        font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase;
        letter-spacing: .03em; margin-bottom: 4px; text-align: left; line-height: 1.4;
    }
    [data-category-root] .egl-table td .c-lbl i { font-size: 10px; color: var(--acc); flex: none; }
    [data-category-root] .egl-table td:nth-child(even):not(.c-act) { border-left: 1px dashed var(--line); }
    /* Empty state (td colspan) phai full-width trong grid 2-col (y company):
       de nguyen thi o chi chiem nua trai -> thong bao bi lech trai. */
    [data-category-root] .egl-table td[colspan] { grid-column: 1 / -1; border-left: 0; border-bottom: 0; }
    /* Cot Thao tac full-width + CAN GIUA nhu company: grid-column de full
       hang; text-align center truc tiep vi block tablet dat td.c-act right
       (0,3,1) de thang rule mobile td center (0,2,1) — company khong bi vi
       tablet da center. Giu border-bottom:0 (chan chan nhu cu). */
    [data-category-root] .egl-table td.c-act { grid-column: 1 / -1; min-width: 0; border-bottom: 0; text-align: center; }
    /* Cot Ten tieng Anh (td thu 3) full-width nhu hang Thao tac: grid 2-col
       chi co 4 o nen de nguyen thi o nay lot nua hang trai, vien duoi chi
       ke nua hang -> khong dong nhat (lab employee: td[data-l="Ho ten"]
       grid-column 1/-1). Ghi de tablet an cot 3 (display) bang block. */
    [data-category-root] .egl-table col:nth-child(3) { display: table-column; }
    [data-category-root] .egl-table td:nth-child(3) { display: block; grid-column: 1 / -1; }
    [data-category-root] .egl-pager { flex-direction: column; align-items: center; gap: 8px; }
    [data-category-root] .egl-pager .egl-pages { justify-content: center; }
    [data-category-root] .egl-pager .egl-perpage { justify-content: center; }
    [data-category-root] .egl-page { min-width: 44px; min-height: 44px; }
    [data-category-root] .egl-pptrig { min-height: 44px; }
    [data-category-root] .egl-view { width: 44px; height: 44px; }
    /* Category toolbar mobile (<=640px): header stack + search full-width +
       nut Them full-width >=44px, card giu cuon ngang. Tai dung mau
       [data-company-root] mobile + lab .egx-pagetop (egx-demo.css:653-656). */
    [data-category-root] .egx-pagetop { gap: 8px; }
    [data-category-root] .egx-pagetop .egl-search { flex-basis: 100%; max-width: none; min-height: 44px; }
    [data-category-root] .egl-goldbtn { min-height: 44px; width: 100%; justify-content: center; }
    [data-category-root] .egx-fbox { min-height: 44px; }
    /* Company popup form mobile (<=640px, task_4): grid 1-col + control
       min-height 44px + nut footer egl-goldbtn/egl-page >=44px. Modal dock
       ra body khi mo nen scope [data-co-modal] truc tiep (khong qua
       [data-company-root]/.egx-page nhu bang list). Gap 8px thay vi 0 cua
       rule .elb-vgrid toan cuc de field form thoang. */
    [data-co-modal] .egl-pbody { padding: 12px; gap: 8px; }
    [data-co-modal] .elb-vgrid { grid-template-columns: 1fr; gap: 8px; }
    [data-co-modal] .egx-fbox { min-height: 44px; }
    [data-co-modal] .egx-ftrigger { min-height: 44px; }
    [data-co-modal] .egl-goldbtn, [data-co-modal] .egl-page, [data-co-modal] .egl-chipbtn { min-height: 44px; }
    [data-co-modal] [data-co-pipe] { padding: 12px; }
    /* Dispatch_out/dispatch_in form + nhap/xuat mobile: giong company
       (grid 1-col, control/nut >=44px, pipe padding 12). Modal dock ra body
       nen scope truc tiep [data-do-*]/[data-di-*]. */
    [data-do-modal] .egl-pbody,
    [data-do-import] .egl-pbody,
    [data-do-exportov] .egl-pbody,
    [data-di-modal] .egl-pbody,
    [data-di-import] .egl-pbody,
    [data-di-exportov] .egl-pbody { padding: 12px; gap: 8px; }
    [data-do-modal] .elb-vgrid,
    [data-do-import] .elb-vgrid,
    [data-do-exportov] .elb-vgrid,
    [data-di-modal] .elb-vgrid,
    [data-di-import] .elb-vgrid,
    [data-di-exportov] .elb-vgrid { grid-template-columns: 1fr; gap: 8px; }
    [data-do-modal] .egx-fbox,
    [data-do-import] .egx-fbox,
    [data-do-exportov] .egx-fbox,
    [data-di-modal] .egx-fbox,
    [data-di-import] .egx-fbox,
    [data-di-exportov] .egx-fbox { min-height: 44px; }
    [data-do-modal] .egx-ftrigger,
    [data-do-import] .egx-ftrigger,
    [data-do-exportov] .egx-ftrigger,
    [data-di-modal] .egx-ftrigger,
    [data-di-import] .egx-ftrigger,
    [data-di-exportov] .egx-ftrigger { min-height: 44px; }
    [data-do-modal] .egl-goldbtn, [data-do-modal] .egl-page, [data-do-modal] .egl-chipbtn,
    [data-do-import] .egl-goldbtn, [data-do-import] .egl-chipbtn,
    [data-do-exportov] .egl-goldbtn, [data-do-exportov] .egl-chipbtn,
    [data-di-modal] .egl-goldbtn, [data-di-modal] .egl-page, [data-di-modal] .egl-chipbtn,
    [data-di-import] .egl-goldbtn, [data-di-import] .egl-chipbtn,
    [data-di-exportov] .egl-goldbtn, [data-di-exportov] .egl-chipbtn { min-height: 44px; }
    /* Mobile footer form Them/Sua: nut phu "Tu dong" + "AI doc" gon thanh
       icon button (an chu, giu icon, vuong 44px) de footer gon tren man
       hep; nut Luu/Huy giu chu nhu cu. Desktop/tablet giu icon + chu.
       aria-label da co san tren nut (cho screen reader khi an chu).
       (DesignUI §15.15). */
    [data-do-modal] [data-do-auto] span,
    [data-do-modal] [data-do-airead] span,
    [data-di-modal] [data-di-auto] span,
    [data-di-modal] [data-di-airead] span { display: none; }
    [data-do-modal] [data-do-auto],
    [data-do-modal] [data-do-airead],
    [data-di-modal] [data-di-auto],
    [data-di-modal] [data-di-airead] { min-width: 44px; padding-left: 0; padding-right: 0; justify-content: center; }
    [data-do-modal] [data-do-pipe], [data-do-modal] [data-do-aipipe],
    [data-do-import] [data-do-impipe],
    [data-do-exportov] [data-do-expipe],
    [data-di-modal] [data-di-pipe], [data-di-modal] [data-di-aipipe],
    [data-di-import] [data-di-impipe],
    [data-di-exportov] [data-di-expipe] { padding: 12px; }
    /* Mobile dispatch_out/dispatch_in Form Them/Sua + Nhap + Xuat: popup
       bam sat noi dung + can giua doc nhu company [data-co-modal]
       (DesignUI §15.7) — ngoai le dang sheet full-height
       (top:12px/bottom:12px) cua egx-demo.css: top:50% + bottom:auto +
       translate(-50%,-50%), height auto, max-height giu le 12px moi dau
       (100dvh-24px, fallback 100vh). Form dai thi pbody cuon (overflow-y
       auto san co). Desktop/tablet khong doi. Bat buoc cho MOI modal moi
       (xem DesignUI §15.7). */
    [data-do-modal] > .egl-panel,
    [data-do-import] > .egl-panel,
    [data-do-exportov] > .egl-panel,
    [data-di-modal] > .egl-panel,
    [data-di-import] > .egl-panel,
    [data-di-exportov] > .egl-panel { top: 50%; bottom: auto; transform: translate(-50%, -50%); height: auto; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
    /* Hang nut cuoi lich custom (Hom nay / Xoa): 2 nut canh deu full hang.
       Lab chua co row rieng cho footer lich (DesignUI §14) nen them scoped
       toi thieu, khai bao o UI-Components §5. */
    [data-do-modal] .egx-cal-foot, [data-di-modal] .egx-cal-foot { display: flex; gap: 8px; }
    [data-do-modal] .egx-cal-foot .egl-chipbtn, [data-di-modal] .egx-cal-foot .egl-chipbtn { flex: 1; justify-content: center; }
    /* O tick "Gop file" trong form: mat card rieng nhu chip .egx-ufile
       de tach khoi nen soft cua dropzone o ca 2 theme (unchecked o dark
       khong chim); focus theo cong thuc .egx-fbox:focus-within cua lab.
       Lab chua co checkbox tuy bien (DesignUI §14) nen them scoped toi
       thieu, khai bao o UI-Components §5. */
    [data-do-modal] .egx-check, [data-di-modal] .egx-check, [data-em-modal] .egx-check { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; cursor: pointer; white-space: nowrap; max-width: 100%; }
    [data-do-modal] .egx-check input, [data-di-modal] .egx-check input, [data-em-modal] .egx-check input { width: 16px; height: 16px; accent-color: var(--acc); margin: 0; flex: none; cursor: pointer; }
    [data-do-modal] .egx-check:focus-within, [data-di-modal] .egx-check:focus-within, [data-em-modal] .egx-check:focus-within { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(16, 185, 129, .15); }
    /* Chip ten file trong o scan mobile (<=640px): ten dai cat "…" TRONG
       chip, KHONG de chip doi tran vien dropzone (loi that: ten
       10735.SNV.LDVL… doi ra ngoai vien dashed). Lab .egx-ufile khong co
       ellipsis san (DesignUI §14) nen them scoped toi thieu: chip
       min-width 0 (grid-item .egx-ulist) + ten flex:1 ellipsis + icon/
       size/nut giu nguyen (flex none). Chi mobile theo yeu cau. Ap dung
       ca employee (ten file dai tieng Viet tran vien y nhu do/di). */
    [data-do-modal] .egx-ufile, [data-di-modal] .egx-ufile, [data-em-modal] .egx-ufile { min-width: 0; max-width: 100%; }
    [data-do-modal] .egx-ufile > [data-do-scanname], [data-di-modal] .egx-ufile > [data-di-scanname], [data-em-modal] .egx-ufile > [data-em-filetext] { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    [data-do-modal] .egx-ufile > i, [data-do-modal] .egx-ufile > small, [data-do-modal] .egx-ufile > button,
    [data-di-modal] .egx-ufile > i, [data-di-modal] .egx-ufile > small, [data-di-modal] .egx-ufile > button,
    [data-em-modal] .egx-ufile > i, [data-em-modal] .egx-ufile > small, [data-em-modal] .egx-ufile > button { flex: none; }
    /* Nhat ky AI doc PDF: khung cuon gon trong pipeline. */
    [data-do-modal] .egx-pipe-log, [data-di-modal] .egx-pipe-log { display: grid; gap: 4px; max-height: 120px; overflow-y: auto; font-size: 12px; color: var(--muted); }
    /* Employee form Them/Sua + Chi tiet + In tai lieu + PDF/Anh/Word mobile
       (<=640px): grid 1-col, control/nut >=44px, pipe padding 12, popup bam
       sat noi dung + can giua doc nhu dispatch_out (DesignUI §15.7);
       nut phu "Tu dong dien" gon thanh icon button 44px o footer. */
    [data-em-modal] .egl-pbody,
    [data-em-doc] .egl-pbody { padding: 12px; gap: 8px; }
    /* Mobile employee Form Them/Sua: pbody cuon duoc (noi dung dai). */
    [data-em-modal] .egl-pbody { overflow-y: auto; -webkit-overflow-scrolling: touch; }
    [data-em-modal] .elb-vgrid,
    [data-em-doc] .elb-vgrid { grid-template-columns: 1fr; gap: 8px; }
    [data-em-modal] .egx-fbox,
    [data-em-doc] .egx-fbox { min-height: 44px; }
    [data-em-modal] .egx-ftrigger { min-height: 44px; }
    [data-em-modal] .egl-goldbtn, [data-em-modal] .egl-page, [data-em-modal] .egl-chipbtn,
    [data-em-doc] .egl-goldbtn, [data-em-doc] .egl-chipbtn { min-height: 44px; }
    [data-em-modal] [data-em-autofill] span { display: none; }
    [data-em-modal] [data-em-autofill] { min-width: 44px; padding-left: 0; padding-right: 0; justify-content: center; }
    [data-em-modal] [data-em-pipe] { padding: 12px; }
    [data-em-modal] > .egl-panel,
    [data-em-view] > .egl-panel,
    [data-em-doc] > .egl-panel,
    [data-em-pdfmodal] > .egl-panel,
    [data-em-imgmodal] > .egl-panel,
    [data-em-wordov] > .egl-panel { top: 50%; bottom: auto; transform: translate(-50%, -50%); height: auto; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
    [data-em-modal] .egx-cal-foot { display: flex; gap: 8px; }
    [data-em-modal] .egx-cal-foot .egl-chipbtn { flex: 1; justify-content: center; }
    [data-em-modal] .egx-pipe-log { display: grid; gap: 4px; max-height: 120px; overflow-y: auto; font-size: 12px; color: var(--muted); }
    /* Employee popup chi tiet mobile (<=640px): giong dispatch_out/company. */
    [data-em-view] .elb-view-detail { flex-direction: column; }
    [data-em-view] .elb-view-side { flex: none; max-width: none; }
    [data-em-view] .elb-vgrid { grid-template-columns: 1fr; }
    [data-em-view] [data-em-pills] { flex-direction: row; flex-wrap: nowrap; justify-content: flex-start; align-items: center; }
    [data-em-view] [data-em-pills] .elb-vpill { flex: none; }
    [data-em-view] .elb-vid { position: relative; }
    [data-em-view] .elb-vhero { padding-right: 64px; }
    [data-em-view] .elb-vcode { position: absolute; top: 0; right: 0; font-size: 11px; white-space: nowrap; }
    [data-em-view] .elb-vgrid .elb-vcard:last-child { border-bottom: 1px solid var(--line); }
    [data-em-view] .elb-view-main .elb-vval { text-align: right; }
    [data-em-view] [data-em-docpills] { justify-content: flex-end; }
    [data-em-view] .egl-pfoot .egl-page,
    [data-em-view] .egl-pfoot .egl-goldbtn { min-height: 44px; }
    /* Mobile employee Chi tiet: pbody cuon duoc (chuoi flex pbody -> viewbody
       -> detail -> split/main), tranh ket cuon khi noi dung dai. */
    [data-em-view] .egl-pbody { overflow-y: auto; -webkit-overflow-scrolling: touch; }
    [data-em-view] [data-em-viewbody] { flex: 1; min-height: 0; display: flex; flex-direction: column; }
    /* Mobile company Form Them/Sua: popup bam sat noi dung + can giua doc
       nhu PC va nhu popup Chi tiet (DesignUI §15.7 — ngoai le mobile cua
       company). Ghi de dang sheet full-height (top:12px/bottom:12px) cua
       lab + egx-demo.css: top:50% + bottom:auto +
       translate(-50%,-50%), height auto, max-height giu le 12px moi dau
       (100dvh-24px, fallback 100vh). Form dai thi pbody cuon
       (overflow-y auto san co). Desktop/tablet khong doi. */
    [data-co-modal] > .egl-panel { top: 50%; bottom: auto; transform: translate(-50%, -50%); height: auto; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
    /* Company popup chi tiet mobile (<=640px, task detail): detail xep doc
       (side tren + main duoi), side full-width, main 1-col cuon doc theo lab
       (split cuon, addr full-width duoi grid). Scope [data-co-view] vi modal
       dock ra body. Nut footer >=44px. */
    [data-co-view] .elb-view-detail { flex-direction: column; }
    /* Mobile side full-width doc thi flex phai la none nhu lab: rule ghim
       PC khong dieu kien ([data-co-view] .elb-view-side flex 0 0 22%) va
       block tablet (flex 0 0 160px) co specificity cao hon lab mobile
       (flex:none) nen de lai flex cu -> side bi ep chieu cao o mobile.
       Ghi ro flex:none o day de mobile giong lab (DesignUI §15.13). */
    [data-co-view] .elb-view-side { flex: none; max-width: none; }
    [data-co-view] .elb-vgrid { grid-template-columns: 1fr; }
    /* Mobile company Chi tiet: giu vien duoi card cuoi grid (DesignUI
       §15.11). Lab bo vien card cuoi grid (employee-green.css:341) vi
       tuong no la cuoi — nhung company con card dia chi full-width dung
       sau grid nen khe giua 2 card mat vien. Scope [data-co-view]. */
    [data-co-view] .elb-vgrid .elb-vcard:last-child { border-bottom: 1px solid var(--line); }
    /* Mobile company Chi tiet: 2 pill (Hoat dong + Da xac thuc) cung 1 hang
       thay vi xep doc (DesignUI §15.10); giu khe 8px. KHOA nowrap +
       pill flex:none: wrap de xuong hang khi hep chinh la loi "khong
       cung 1 hang" tai dien (giong category). Scope [data-co-view] +
       mobile <=640px — desktop/tablet giu doc. */
    [data-co-view] [data-co-pills] { flex-direction: row; flex-wrap: nowrap; justify-content: flex-start; align-items: center; }
    [data-co-view] [data-co-pills] .elb-vpill { flex: none; }
    /* Mobile company Chi tiet: ma (#id) goc phai tren cua ten, chu nho
       (DesignUI §15.10). .elb-vid lam moc; hero chua padding-phai tranh
       de len ma. Desktop/tablet giu ma duoi ten nhu lab. */
    [data-co-view] .elb-vid { position: relative; }
    [data-co-view] .elb-vhero { padding-right: 64px; }
    [data-co-view] .elb-vcode { position: absolute; top: 0; right: 0; font-size: 11px; white-space: nowrap; }
    /* Mobile company Chi tiet: popup bam sat noi dung + can giua doc nhu
       PC (DesignUI §15.7 — ngoai le mobile cua company). Ghi de dang sheet
       full-height (top:12px/bottom:12px) cua lab + egx-demo.css: top:50% +
       translate(-50%,-50%), height auto, max-height giu le 12px moi dau
       (100dvh-24px, fallback 100vh). Noi dung dai thi pbody cuon
       (overflow-y auto san co). Desktop/tablet khong doi. */
    [data-co-view] > .egl-panel { top: 50%; bottom: auto; transform: translate(-50%, -50%); height: auto; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
    /* Mobile company Chi tiet: gia tri (.elb-vval) trong main CAN PHAI
       (DesignUI §15.9 — ngoai le mobile cua company), tieu de
       (.elb-vkey) giu trai. Trung voi lab mobile (employee-green.css:344)
       nen ghi ro de khoa, tranh sua nham ve giua. */
    [data-co-view] .elb-view-main .elb-vval { text-align: right; }
    /* Chi tiet template mobile (<=640px): gia tri can giua nhu company,
       giu tieu de trai (DesignUI §15.9). */
    [data-tabledetail] .elb-view-main .elb-vval { text-align: center; }
    [data-co-view] .egl-pfoot .egl-page,
    [data-co-view] .egl-pfoot .egl-goldbtn { min-height: 44px; }
    /* Category popup form mobile (<=640px): grid 1-col + control
       min-height 44px + nut footer egl-goldbtn/egl-chipbtn >=44px.
       Modal dock ra body khi mo nen scope [data-ca-modal] truc tiep. */
    [data-ca-modal] .egl-pbody { padding: 12px; gap: 8px; }
    [data-ca-modal] .egx-fbox { min-height: 44px; }
    [data-ca-modal] .egl-goldbtn, [data-ca-modal] .egl-page, [data-ca-modal] .egl-chipbtn { min-height: 44px; }
    [data-ca-modal] [data-ca-pipe] { padding: 12px; }
    /* Mobile category Form Them/Sua: popup bam sat noi dung + can giua doc
       nhu PC (DesignUI §15.7 — giong company [data-co-modal], chong tai loi
       sheet lech). Ghi de dang sheet full-height cua lab + egx-demo.css:
       top:50% + bottom:auto + translate(-50%,-50%), height auto,
       max-height giu le 12px moi dau (100dvh-24px, fallback 100vh).
       Form dai thi pbody cuon (overflow-y auto san co). */
    [data-ca-modal] > .egl-panel { top: 50%; bottom: auto; transform: translate(-50%, -50%); height: auto; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
    /* Category popup chi tiet mobile (<=640px): detail xep doc
       (side tren + main duoi), side full-width, main 1-col cuon doc theo lab.
       Scope [data-ca-view] vi modal dock ra body. Nut footer >=44px. */
    [data-ca-view] .elb-view-detail { flex-direction: column; }
    /* Mobile side full-width doc thi flex phai la none nhu lab: rule ghim
       PC khong dieu kien ([data-ca-view] .elb-view-side flex 0 0 22%) va
       block tablet (flex 0 0 160px) co specificity cao hon lab mobile
       (flex:none) nen de lai flex cu -> side bi ep chieu cao o mobile.
       Ghi ro flex:none o day de mobile giong lab (DesignUI §15.13). */
    [data-ca-view] .elb-view-side { flex: none; max-width: none; }
    [data-ca-view] .elb-vgrid { grid-template-columns: 1fr; }
    /* Mobile category Chi tiet: 2 pill cung 1 hang thay vi xep doc
       (DesignUI §15.10 — giong company); giu khe 8px. KHOA nowrap +
       pill flex:none: wrap de xuong hang khi hep chinh la loi "khong
       cung 1 hang" tai dien (do that: can vua khit 208/208px). Scope
       [data-ca-view] + mobile <=640px. */
    [data-ca-view] [data-ca-pills] { flex-direction: row; flex-wrap: nowrap; justify-content: flex-start; align-items: center; }
    [data-ca-view] [data-ca-pills] .elb-vpill { flex: none; }
    /* Mobile category Chi tiet: ma (#id) goc phai tren cua ten, chu nho
       (DesignUI §15.10 — giong company). .elb-vid lam moc; hero chua
       padding-phai tranh de len ma. Desktop/tablet giu ma duoi ten nhu lab. */
    [data-ca-view] .elb-vid { position: relative; }
    [data-ca-view] .elb-vhero { padding-right: 64px; }
    [data-ca-view] .elb-vcode { position: absolute; top: 0; right: 0; font-size: 11px; white-space: nowrap; }
    /* Mobile category Chi tiet: giu vien duoi card cuoi grid vi con card
       ten full-width dung sau grid (DesignUI §15.11 — giong company). */
    [data-ca-view] .elb-vgrid .elb-vcard:last-child { border-bottom: 1px solid var(--line); }
    /* Mobile category Chi tiet: gia tri (.elb-vval) trong main CAN PHAI
       nhu company (DesignUI §15.9), tieu de (.elb-vkey) giu trai. Trung
       voi lab mobile (employee-green.css:344) nen ghi ro de khoa, tranh
       sua nham ve giua. */
    [data-ca-view] .elb-view-main .elb-vval { text-align: right; }
    /* Mobile category Chi tiet: popup bam sat noi dung + can giua doc nhu
       PC (DesignUI §15.7 — giong company, khong de tai loi sheet lech).
       Ghi de dang sheet full-height cua lab + egx-demo.css. */
    [data-ca-view] > .egl-panel { top: 50%; bottom: auto; transform: translate(-50%, -50%); height: auto; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
    [data-ca-view] .egl-pfoot .egl-page,
    [data-ca-view] .egl-pfoot .egl-goldbtn { min-height: 44px; }
    /* Dispatch_out/dispatch_in popup chi tiet mobile (<=640px): giong yen
       company/category (detail xep doc, side full-width, main 1-col, pill
       1 hang, ma goc phai tren, vien card cuoi grid, gia tri CAN PHAI,
       panel hug + can giua). Scope [data-do-view]/[data-di-view] —
       DesignUI §15.7/§15.9-§15.11. */
    [data-do-view] .elb-view-detail, [data-di-view] .elb-view-detail { flex-direction: column; }
    [data-do-view] .elb-view-side, [data-di-view] .elb-view-side { flex: none; max-width: none; }
    [data-do-view] .elb-vgrid, [data-di-view] .elb-vgrid { grid-template-columns: 1fr; }
    [data-do-view] [data-do-pills], [data-di-view] [data-di-pills] { flex-direction: row; flex-wrap: nowrap; justify-content: flex-start; align-items: center; }
    [data-do-view] [data-do-pills] .elb-vpill, [data-di-view] [data-di-pills] .elb-vpill { flex: none; }
    [data-do-view] .elb-vid, [data-di-view] .elb-vid { position: relative; }
    [data-do-view] .elb-vhero, [data-di-view] .elb-vhero { padding-right: 64px; }
    [data-do-view] .elb-vcode, [data-di-view] .elb-vcode { position: absolute; top: 0; right: 0; font-size: 11px; white-space: nowrap; }
    [data-do-view] .elb-vgrid .elb-vcard:last-child, [data-di-view] .elb-vgrid .elb-vcard:last-child { border-bottom: 1px solid var(--line); }
    [data-do-view] .elb-view-main .elb-vval, [data-di-view] .elb-view-main .elb-vval { text-align: right; }
    [data-do-view] > .egl-panel, [data-di-view] > .egl-panel { top: 50%; bottom: auto; transform: translate(-50%, -50%); height: auto; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
    [data-do-view] .egl-pfoot .egl-page,
    [data-do-view] .egl-pfoot .egl-goldbtn,
    [data-di-view] .egl-pfoot .egl-page,
    [data-di-view] .egl-pfoot .egl-goldbtn { min-height: 44px; }
/* Holiday popup form mobile (<=640px): grid 1-col + control/nut >=44px.
   Modal dock ra body nen scope [data-ho-modal] truc tiep. */
    [data-ho-modal] .egl-pbody { padding: 12px; gap: 8px; }
    [data-ho-modal] .elb-vgrid { grid-template-columns: 1fr; gap: 8px; }
    [data-ho-modal] .egx-fbox { min-height: 44px; }
    [data-ho-modal] .egx-ftrigger { min-height: 44px; }
    [data-ho-modal] .egl-goldbtn, [data-ho-modal] .egl-page, [data-ho-modal] .egl-chipbtn { min-height: 44px; }
    [data-ho-modal] [data-ho-pipe] { padding: 12px; }
/* Holiday popup chi tiet mobile (<=640px): side tren + main duoi 1-col,
   pill 1 hang + ma goc phai (S15.10), vien card cuoi grid (S15.11),
   gia tri CAN PHAI (S15.9), panel hug + can giua doc (S15.7),
   viewbody flex chain de cuon (S15.13). Scope [data-ho-view]. */
    [data-ho-view] .elb-view-detail { flex-direction: column; }
    [data-ho-view] .elb-view-side { flex: none; max-width: none; }
    [data-ho-view] .elb-vgrid { grid-template-columns: 1fr; }
    [data-ho-view] [data-ho-pills] { flex-direction: row; flex-wrap: nowrap; justify-content: flex-start; align-items: center; }
    [data-ho-view] [data-ho-pills] .elb-vpill { flex: none; }
    [data-ho-view] .elb-vid { position: relative; }
    [data-ho-view] .elb-vhero { padding-right: 64px; }
    [data-ho-view] .elb-vcode { position: absolute; top: 0; right: 0; font-size: 11px; white-space: nowrap; }
    [data-ho-view] .elb-vgrid .elb-vcard:last-child { border-bottom: 1px solid var(--line); }
    [data-ho-view] .elb-view-main .elb-vval { text-align: right; }
    [data-ho-view] > .egl-panel { top: 50%; bottom: auto; transform: translate(-50%, -50%); height: auto; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
    [data-ho-modal] > .egl-panel { top: 50%; bottom: auto; transform: translate(-50%, -50%); height: auto; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
    [data-ho-view] .egl-pfoot .egl-chipbtn,
    [data-ho-view] .egl-pfoot .egl-goldbtn,
    [data-ho-modal] .egl-pfoot .egl-goldbtn,
    [data-ho-modal] .egl-pfoot .egl-chipbtn { min-height: 44px; }
    [data-ho-view] .egl-pbody { overflow-y: auto; -webkit-overflow-scrolling: touch; }
    [data-ho-view] [data-ho-viewbody] { flex: 1; min-height: 0; display: flex; flex-direction: column; }
/* Holiday list mobile (<=640px): lich + timeline xep doc full-width, nut
   >=44px, pager doc can giua nhu company/shift. Scope [data-holiday-root]. */
    [data-holiday-root] .ho-layout { grid-template-columns: minmax(0, 1fr); }
/* Holiday mobile: layout 1 cot; lich/policy/timeline card giu card lab
   nhu desktop (khong flat vi khong con section ngoai). */
    [data-holiday-root] .ho-layout { gap: 10px; }
    [data-holiday-root] .ho-cal-card, [data-holiday-root] .ho-policy-card { padding: 12px; }
    [data-holiday-root] .ho-card-actions .egl-page { width: 44px; height: 44px; }
    [data-holiday-root] .egx-pagetop { gap: 8px; }
    [data-holiday-root] .egx-pagetop .egl-search { flex-basis: 100%; max-width: 100%; min-height: 44px; }
    [data-holiday-root] .egx-pagetop .egl-goldbtn { min-height: 44px; width: 100%; justify-content: center; }
    [data-holiday-root] .egl-pager { flex-direction: column; align-items: center; gap: 8px; }
    [data-holiday-root] .egl-pager .egl-pages { justify-content: center; }
    [data-holiday-root] .egl-pager .egl-perpage { justify-content: center; }
    [data-holiday-root] .egl-page { min-width: 44px; min-height: 44px; }
    [data-holiday-root] .egl-pptrig { min-height: 44px; }
}
/* Icon bao loi validate: tang vung cham toi thieu 28px tren thiet bi cam
   ung (pointer: coarse) de de cham — ap dung toan project (moi .egx-field),
   desktop (chuot) giu nguyen kich thuoc goc. */
@media (pointer: coarse) {
    .egx-state[data-tip] { min-width: 28px; min-height: 28px; justify-content: center; }
}
/* Khoa pinch-zoom CHI TREN MOBILE (pointer: coarse): cho phep cuon
   (pan-x/pan-y) nhung cam gesture phong to. Desktop khong anh huong. */
@media (pointer: coarse) {
    html, body { touch-action: pan-x pan-y; }
}
/* Android rieng trang company: control_footer (fixed) tren Android cao hon
   muc tru 70px cua lab (thanh dieu huong/safe-area he thong) nen cuoi trang
   bi de len. Them 10px dem duoi company (Map.md §5.5). Scope
   html.is-android + [data-company-root] — iOS/PC khong anh huong. */
html.is-android [data-company-root] { padding-bottom: 10px; }
/* Android rieng trang category: cung footer/cung so do voi company
   (Map.md §5.5). Scope html.is-android + [data-category-root]. */
html.is-android [data-category-root] { padding-bottom: 10px; }
/* Android rieng trang dispatch_out/dispatch_in: cung footer/cung so do
   voi company + category (Map.md §5.5) — thieu dem nay nen bottom trang
   bi control_footer de len trong khi company/category khong bi. Scope
   html.is-android + [data-dispatchout-root]/[data-dispatchin-root]. */
html.is-android [data-dispatchout-root] { padding-bottom: 10px; }
html.is-android [data-dispatchin-root] { padding-bottom: 10px; }
/* Android rieng trang employee: nhu cac trang tren (Map.md §5.5). */
html.is-android [data-employee-root] { padding-bottom: 10px; }
/* Android rieng trang shift: nhu cac trang tren (Map.md §5.5) — thieu
   dem nay thi cuoi trang bi control_footer de len tren mobile. */
html.is-android [data-shift-root] { padding-bottom: 10px; }
