/* Equipment app sizing: readable text prevents focus zoom; touch controls avoid double-tap zoom. */
.app-install{display:block;width:100%;margin:0 0 16px;text-align:left;font-size:13px;background:#244b60;border-color:#456878;color:white}
.app-install[hidden]{display:none}
.wk-day-summary{display:none}
@media screen and (min-width:701px),print{
 .wk-days .wk-dayg>tr:nth-child(2)>td{border-top:1px solid #edf1f4!important}
 .wk-days .wk-dayg+.wk-dayg>tr:nth-child(2)>td{border-top:12px solid #f2f4f7!important}
}
.app-install-guide{font-size:16px;line-height:1.7}.app-install-guide>img{border-radius:14px;margin-bottom:16px}
.app-install-guide h2{font-size:24px;margin:0 0 12px}.app-install-guide h3{margin:22px 0 6px;font-size:16px}
.app-install-guide ol{margin:8px 0;padding-left:24px}.app-install-guide li{margin:8px 0}
@media screen and (max-width:1024px) and (pointer:coarse){
 body input,body select,body textarea{font-size:16px!important}
}
@media screen and (max-width:700px){
 :root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft JhengHei",sans-serif;-webkit-text-size-adjust:100%;text-size-adjust:100%}
 body{font-size:16px;line-height:1.6;touch-action:manipulation}
 body input,body select,body textarea{font-size:16px!important;line-height:1.5}
 body input:not([type=checkbox]):not([type=radio]):not([type=hidden]),body select{min-height:48px!important}
 body textarea{min-height:110px}
 body button{min-height:44px!important;font-size:15px;line-height:1.5}
 button,a,input,select,textarea,summary,label{touch-action:manipulation}
 body label{font-size:14px;line-height:1.65;margin-bottom:20px}
 .content{padding:22px max(16px,env(safe-area-inset-right)) max(28px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}
 .pagehead h1{font-size:25px;line-height:1.4}.pagehead p{font-size:14px}
 .topbar{min-height:64px;height:auto;padding:10px 16px;gap:10px}.topbar .user{gap:6px}.topbar .user>div{font-size:13px;max-width:88px}
 .topbar .user small{font-size:12px}.topbar #logout{padding:8px;font-size:13px}.topbar .crumb{font-size:15px}
 .sidebar{padding:14px max(16px,env(safe-area-inset-right)) 14px max(16px,env(safe-area-inset-left))}
 .sidebar .brand{font-size:16px;letter-spacing:0;padding-bottom:18px}.sidebar .brand small{font-size:11px;letter-spacing:1px}
 .side-drawer{padding-top:max(24px,env(safe-area-inset-top));padding-bottom:max(24px,env(safe-area-inset-bottom));width:82vw;max-width:320px}
 .side-drawer .nav{font-size:16px;min-height:48px}.side-drawer .side-foot{font-size:13px}
 .panelhead small,.empty,.notice,.checkin-foot{font-size:14px;line-height:1.75}
 .panelhead{flex-wrap:wrap;gap:10px}.panelhead h2{font-size:16px}
 .stat .label,.stat .sub{font-size:13px;line-height:1.6}.stat .value{font-size:25px}
 .wk-groups .wk-group dt,.wk-groups .wk-group dd{font-size:14px}.wk-groups .wk-group h3{font-size:16px}
 .wk-calc .wk-calc-label,.wk-calc .wk-calc-detail,.wk-calc .wk-calc-detail>small{font-size:14px}
 .wk-calc .wk-calc-amount{font-size:16px}.wk-calc .total b{font-size:22px}
 .wk-days tbody>tr>td{font-size:15px}
 .wk-days tbody>tr>td:before{font-size:13px}
 .wk-days td small,.wk-days .wk-issue,.wk-days .wk-override{font-size:14px}
 .wk-days .wk-row-actions{gap:10px}.wk-days .wk-row-actions button{font-size:14px}
 /* Keep the native date picker and site select within the mobile form. */
 .wk-calc #wk-bp-form label:has(input[type=date],select){display:flex;flex-direction:column;align-items:stretch;gap:6px;min-width:0;max-width:100%}
 .wk-calc #wk-bp-form input[type=date]{display:block;box-sizing:border-box;width:100%;min-width:0;max-width:100%;-webkit-appearance:none;appearance:none}
 .wk-calc #wk-bp-form input[type=date]::-webkit-date-and-time-value{min-width:0;text-align:left}
 .wk-days .wk-dayg:not(.wk-expanded)>tr:not(.wk-day-summary){display:none!important}
 .wk-days .wk-dayg>tr.wk-day-summary{display:block!important;padding:0!important;border:0}
 .wk-days .wk-dayg>tr.wk-day-summary>td{display:block;width:100%;padding:0!important}
 .wk-days .wk-day-summary .wk-day-toggle{display:block;width:100%;padding:14px;text-align:left;border:0;border-radius:0;background:white;font-weight:400;color:var(--navy)}
 .wk-days .wk-day-summary .wk-day-toggle:focus-visible{outline:2px solid var(--teal);outline-offset:-3px}
 .wk-day-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
 .wk-days .wk-day-summary .wk-day-date strong{font-size:17px}.wk-days .wk-day-summary .wk-day-date small{display:block;font-size:12px;margin-top:2px}
 .wk-day-sites{display:block;font-size:14px;line-height:1.6;margin:8px 0 12px;overflow-wrap:anywhere}
 .wk-day-metrics{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,.8fr) minmax(0,1.4fr);gap:8px}
 .wk-day-metrics>span{min-width:0}.wk-days .wk-day-summary .wk-day-metrics small{display:block;font-size:12px}
 .wk-day-metrics b{display:block;font-size:15px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.wk-day-metrics>span:last-child{text-align:right;color:var(--teal)}
 .wk-day-disclosure{display:flex;justify-content:space-between;gap:8px;margin-top:12px;padding-top:9px;border-top:1px solid var(--line);color:var(--muted);font-size:12px}
 .wk-expanded .wk-day-disclosure>span:last-child{transform:rotate(180deg)}
 .wk-days .wk-expanded>tr:nth-child(2){border-top:1px solid var(--line)}
 .wk-search{gap:12px}.wk-search input{min-width:0;flex-basis:100%}.wk-search select{flex:1;min-width:0}.wk-search #wk-site{flex-basis:100%}
 .my-account,.fm-profile{padding:18px}.my-account-facts small,.fm-profile small{font-size:14px}
 /* 工頭個人資料：標籤同輸入同一行，減少捲動；iPhone 日期欄唔好撐出框外 */
 body .fm-profile{padding:12px}
 .fm-profile fieldset{margin:10px 0;padding:6px 12px 10px}.fm-profile legend{font-size:14px;padding:0 4px}
 .fm-profile .two{display:block}
 body .fm-profile label{display:grid;grid-template-columns:5.6em minmax(0,1fr);align-items:center;column-gap:10px;margin:0;padding:6px 0;font-size:14px;line-height:1.3}
 .fm-profile label>*{min-width:0}.fm-profile label>small,.fm-profile label>.trade-other{grid-column:2}.fm-profile label>small{margin-top:3px}.fm-profile label>.trade-other{margin-top:6px!important}
 body .fm-profile input:not([type=checkbox]):not([type=radio]):not([type=hidden]),body .fm-profile select{min-height:44px!important;width:100%;max-width:100%;padding-top:8px;padding-bottom:8px}
 .fm-profile input[type=date]{-webkit-appearance:none;appearance:none;display:block;min-width:0;box-sizing:border-box;text-align:left}
 .fm-profile input[type=date]::-webkit-date-and-time-value{text-align:left}
 body .fm-profile textarea{min-height:64px;height:64px}
 .fm-profile>form>small,.fm-profile fieldset>small{display:block;margin-top:6px}
 .fm-profile .error:empty{display:none}.fm-profile button.primary{width:100%;margin-top:4px}
 .fr-card{font-size:15px}.fr-card small,.fr-none,.fr-line,.fr-area-hint{font-size:14px;line-height:1.7}
 .fr-card .fr-actions{gap:10px}.fr-picker label{min-width:0;width:100%;font-size:14px}
 .py-facts,.py-issues,.py-ref,.py-card small,.py-manual-form,.py-day-form{font-size:14px;line-height:1.7}
 body .py-manual-form input[name=note],body .py-day-foot input[name=note]{min-width:0;flex-basis:100%}
 .checkin-body{padding:12px max(10px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))}
 .checkin-content label,.checkin-content .identity-card label,.checkin-content label small,.checkin-content .identity-card small,.checkin-content .id-warning,.checkin-content .scan-status{font-size:14px}
 .checkin-content label.check{align-items:flex-start;gap:10px}
 .checkin-content label.check>input{width:22px;height:22px;flex:none;padding:0;margin:2px 0 0}
 .checkin-content label.check>span{flex:1;min-width:0;overflow-wrap:anywhere}
 .checkin-content .two{grid-template-columns:minmax(0,1fr);gap:0}
 .checkin-content .carry small{font-size:14px}.checkin-head p{font-size:14px}
 dialog{padding:22px 18px;max-height:calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));width:min(720px,calc(100vw - 24px))}
 dialog .two,.wk-form .wk-grid{grid-template-columns:minmax(0,1fr)}
 .modalfoot{gap:12px;flex-wrap:wrap}.modalfoot button{flex:1}
 #toast{bottom:max(20px,env(safe-area-inset-bottom));font-size:15px}
}
/* 其他月份及已被取代的表格：右邊展開三角 */
.gt-history>summary{list-style:none;cursor:pointer;display:flex;align-items:center;flex-wrap:wrap;gap:4px 12px}
.gt-history>summary::-webkit-details-marker{display:none}
.gt-history>summary>small{margin-left:auto}
.gt-caret{color:var(--muted);font-size:14px;transition:transform .15s}.gt-history[open]>summary .gt-caret{transform:rotate(180deg)}
/* 2026-11-10 手機壓縮排版：頂部系統名、間距收窄、四格統計合成一張卡、資料／薪金／強積金／歷史預設收起、每日出勤每日兩行 */
.m-brand,.fold-btn,.fold-sum{display:none}
@media screen and (max-width:700px){
 .sidebar{padding:9px max(14px,env(safe-area-inset-right)) 9px max(14px,env(safe-area-inset-left))}
 .m-brand{display:flex;align-items:center;gap:10px;color:#fff;font-size:16px;font-weight:700;letter-spacing:.5px;line-height:1.3}.m-brand img{width:28px;height:28px;border-radius:7px;flex:none}
 body{line-height:1.5}
 .topbar{min-height:52px;padding:6px 12px}
 .content{padding:14px max(12px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
 .pagehead{margin-bottom:12px;gap:8px}.pagehead h1{font-size:21px;line-height:1.3;margin:2px 0 4px}.pagehead p{font-size:13px;line-height:1.55;margin:0}
 .panel{margin-bottom:12px}.panelhead,.panelbody{padding:12px 14px}.panelhead small{font-size:12.5px;line-height:1.5}
 body label{margin-bottom:12px;line-height:1.5}
 .notice{padding:10px 12px;margin-bottom:12px}.empty{padding:20px 14px}
 /* 四格統計：一張卡 2×2 */
 .stats{gap:0;margin-bottom:12px;background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden}
 .stats .stat{border:0;border-radius:0;padding:10px 12px!important;min-width:0}
 .stats .stat:nth-child(odd){border-right:1px solid var(--line)}.stats .stat:nth-child(n+3){border-top:1px solid var(--line)}
 .stats .stat .label{font-size:12px;line-height:1.4;margin-bottom:2px}.stats .stat .value{font-size:18px!important;letter-spacing:0;line-height:1.35;overflow-wrap:anywhere}.stats .stat .sub{font-size:11px!important;line-height:1.4;margin-top:2px}
 /* 收合區 */
 [data-fold]>.fold-head{display:flex!important;flex-direction:row!important;flex-wrap:wrap;align-items:center!important;gap:4px 8px!important;cursor:pointer;margin:0}
 .fold-head>h2,.fold-head>h3{margin:0}
 .fold-head .fold-sum{display:block;margin-left:auto;min-width:0;font-size:13px;font-weight:600;color:var(--teal);text-align:right;font-variant-numeric:tabular-nums}
 .fold-btn{display:grid;place-items:center;flex:none;order:3;width:32px;height:32px;min-height:32px!important;margin:-4px -6px -4px auto;padding:0;border:0;background:transparent;color:var(--muted);font-size:16px}
 .fold-sum+.fold-btn,.fold-sum~.fold-btn{margin-left:0}
 .fold-head>small,.fold-head>.tag{order:5;flex-basis:100%}
 [data-fold].fold-open>.fold-head .fold-btn{transform:rotate(180deg)}[data-fold].fold-open>.fold-head .fold-sum{display:none}
 [data-fold].fold-open>.fold-head .fold-btn{margin-left:auto}
 [data-fold]:not(.fold-open)>:not(.fold-head),[data-fold]:not(.fold-open)>.fold-head>small{display:none!important}
 [data-fold]:not(.fold-open)>.fold-head{border-bottom:0}
 /* 工人詳細 */
 .wk-group{padding:10px 14px;margin-bottom:8px}.wk-group.fold-open>h3{margin-bottom:6px}
 .wk-group dl>div{padding:7px 0;line-height:1.45;gap:10px}
 .wk-monthbar{margin:10px 0 12px}
 .wk-calc{padding:0 14px 10px}.wk-calc>.wk-calc-row{padding:10px 0;gap:3px 12px;line-height:1.5}
 .wk-calc>.total{margin:6px -6px 0;padding:12px 6px}.wk-calc>.total b{font-size:20px}
 .panel:has(.wk-days)>.panelhead{padding:8px 0 10px 4px;gap:4px}.panel:has(.wk-days)>.panelhead small{font-size:12px;line-height:1.5}
 .wk-days .wk-dayg{margin-bottom:8px;border-radius:10px}
 .wk-days .wk-day-summary .wk-day-toggle{position:relative;padding:9px 34px 9px 12px;line-height:1.4}
 .wk-days .wk-day-summary .wk-day-toggle::after{content:"⌄";position:absolute;right:12px;top:50%;transform:translateY(-60%);color:var(--muted);font-size:16px}
 .wk-days .wk-expanded .wk-day-toggle::after{transform:translateY(-40%) rotate(180deg)}
 .wk-day-heading{align-items:center}.wk-day-date{display:flex;align-items:baseline;gap:8px;min-width:0}
 .wk-days .wk-day-summary .wk-day-date strong{font-size:15px;white-space:nowrap}.wk-days .wk-day-summary .wk-day-date small{display:inline;margin:0;font-size:12px}
 .wk-day-heading .tag{padding:2px 7px;flex:none}
 .wk-day-sites{font-size:13px;line-height:1.4;margin:2px 0 4px;color:var(--muted)}
 .wk-day-metrics{display:flex;flex-wrap:wrap;gap:2px 14px;align-items:baseline}
 .wk-day-metrics>span{display:flex;align-items:baseline;gap:5px}.wk-days .wk-day-summary .wk-day-metrics small{display:inline;font-size:11px}
 .wk-day-metrics b{display:inline;font-size:14px}.wk-day-metrics>span:last-child{margin-left:auto}
 .wk-day-disclosure{display:none}
 .wk-days .wk-dayg>tr:not(.wk-allow-row):not(.wk-hist-row):not(.wk-day-summary){gap:8px 12px;padding:10px 12px}
 .wk-days tr.wk-allow-row>td,.wk-days tr.wk-hist-row>td{padding:10px 12px}
 .wk-history{padding:2px 14px 10px}.wk-history>li{padding:9px 0;gap:4px}
 /* 審批卡 */
 .fr-list{gap:10px;margin-bottom:14px}.fr-card{padding:12px;gap:8px}.fr-times{padding:8px 10px}.fr-ot,.fr-none{padding:6px 10px}
 .fr-tabs{gap:6px;margin-bottom:12px}.fr-tabs button{padding:6px 12px}.fr-picker{padding:10px 12px;margin-bottom:10px;gap:6px}.fr-picker small{padding-bottom:0}
 .m-stack tr{padding:10px 12px;gap:6px 12px}
 /* 工人名單：每人一張細卡（編號＋姓名／年齡＋證件／工種＋地盤／最後出勤） */
 .m-stack .wk-table tr{gap:2px 10px}.m-stack .wk-table td{font-size:13.5px;line-height:1.45}
 .m-stack .wk-table td:is([data-label^="性別"],[data-label="工種"],[data-label="所屬地盤"],[data-label^="身份證"])::before{display:none}
 .m-stack .wk-table td[data-label="最後出勤"]{grid-column:1/-1;display:flex;gap:6px;align-items:baseline;font-size:12.5px;color:var(--muted)}
 .m-stack .wk-table td[data-label="最後出勤"]::before{margin:0}
 /* 賬號管理：狀態放右上角，權限同功能用細字 */
 .m-stack .ac-table tr{gap:2px 12px}
 .m-stack .ac-table td:is([data-label="權限"],[data-label="狀態"])::before{display:none}
 .m-stack .ac-table td[data-label="狀態"]{position:absolute;top:10px;right:12px}
 .m-stack .ac-table td[data-label="權限"]{grid-column:1/-1;font-size:13px;color:var(--muted)}
 .m-stack .ac-table td.ac-pages{font-size:13px;line-height:1.5}.m-stack .ac-table td.ac-pages::before{display:inline;margin-right:6px}
 .m-stack .ac-table button{min-height:38px!important;padding:6px 10px;font-size:13px}
 #gt-jump{min-height:38px!important;padding:6px 10px;font-size:14px}
 /* 每日出勤展開後：短欄四格一行，長欄標籤同數值同一行 */
 .wk-days .wk-dayg>tr:not(.wk-allow-row):not(.wk-hist-row):not(.wk-day-summary){grid-template-columns:repeat(4,minmax(0,1fr))}
 .wk-days tbody>tr>td:nth-child(1),.wk-days tbody>tr>td:nth-child(2){grid-column:span 2}
 .wk-days tbody>tr>td:is(.wk-day-time,.wk-day-mpf,.wk-day-net){display:flex;align-items:baseline;gap:10px}
 .wk-days tbody>tr>td:is(.wk-day-time,.wk-day-mpf,.wk-day-net):before{flex:none;width:6.5em;margin:0}
 .wk-days tbody>tr>td.wk-day-site{padding-bottom:6px}
 .wk-days tbody>tr>td.wk-day-net{padding:8px 10px}.wk-days tbody>tr>td.wk-day-net b{font-size:17px}
 /* 資料核對／匯出報表 */
 .py-bar{margin:8px 0;gap:8px}.py-bar .left{gap:8px}.py-editor input{width:150px}
 .rv-summary{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin-bottom:8px}
 .rv-box{flex-direction:column;align-items:stretch}.rv-box-open{padding:10px 12px}.rv-box b{font-size:14px;line-height:1.4}.rv-box small{font-size:11.5px;line-height:1.4}
 .rv-box>[data-rv-auto-confirm]{margin:0 10px 10px;min-height:38px!important;padding:6px 8px;font-size:14px}
 .rv-todo-title{margin:12px 0 8px;font-size:16px}.rv-lead{padding:8px 8px 0}
 .py-block,.py-ok{padding:8px 12px;margin:8px 0;font-size:13.5px;line-height:1.5}.py-block ul{margin:2px 0 0;padding-left:18px}
 .gt-review .rv-todo-title+:is(.py-block,.py-ok){margin:0 0 10px}
 .rv-filters,.rv-list>.rv-filters{padding:8px;gap:6px}.rv-filters-top{padding:8px;margin-bottom:8px}
 .rv-filters select{flex:1 1 0;padding-left:10px;padding-right:26px}.rv-cat-fixed{padding:6px 12px;font-size:14px}
 .rv-person{padding:8px 12px;min-height:0!important;line-height:1.4}.rv-person-name b{font-size:15px}
 .rv-pane-head{position:sticky;top:0;z-index:4;padding:8px 10px;margin-bottom:8px;gap:8px;box-shadow:0 2px 8px #12345512}.rv-pane-head h3{font-size:16px}.rv-pane-head small{font-size:12px}
 .rv-back{min-height:38px!important;padding:6px 10px;font-size:14px}
 .py-card{padding:10px 12px;margin-bottom:8px;gap:6px;border-left-width:4px}
 .py-facts,.py-issues,.py-ref,.py-card small,.py-manual-form,.py-day-form{font-size:13.5px;line-height:1.5}
 .py-seg{padding:8px 10px;gap:4px}.py-evidence{padding:6px 8px;line-height:1.5}
 body .py-manual-form input[type=number],body .py-seg-inputs input[type=number],body .rv-auto-edit input[type=number]{min-height:40px!important;width:68px;padding:6px 4px}
 body .py-manual-form input[name=note],body .py-day-foot input[name=note],body .rx-workbench .py-manual-form input[name=note]{flex:1 1 calc(100% - 130px);min-width:0;min-height:42px!important}
 .py-manual-form>button,.py-day-foot>button{min-height:42px!important}
 .rv-others{margin-top:8px}.rv-others>summary{padding:10px 12px}.rv-others ul{padding:0 12px 8px}
 .rv-completed{margin-top:8px}.rv-completed>summary,.rv-completed-entry>summary{padding:10px 12px}
 .rv-auto-day{padding:8px 10px}.rv-auto-date{padding-top:0}
 .gt-tables .gt-form{padding:8px 0 0;gap:8px}.gt-file{min-width:0}.gt-checkbar{margin-top:10px;padding-top:10px}
 .m-stack .gt-list:not(:has(thead)) tr{padding:10px 44px 10px 2px;gap:4px}
 /* 匯出報表：月份、地盤並排 */
 .rx-form-panel{padding:12px 14px}.rx-fields{grid-template-columns:minmax(0,1fr);gap:10px}.rx-fields label{margin:0}
 .rx-fields select{padding-left:10px;padding-right:24px}
 @media(max-width:360px){.sbx-main .topbar .user>div{display:none}}
 #rx-status{margin:8px 0 0;font-size:13px;line-height:1.5}.rx-form-actions{margin-top:8px}.rx-form-actions button{flex:1}
 .rx-note{margin-top:8px;font-size:12px;line-height:1.5}
 /* 概覽、打卡站、其他 */
 .ov-grid{gap:12px;margin-bottom:12px}.ov-sm{padding:9px 0}.ov-list li{padding:5px 0}.ov-trend{height:150px}
 .station-summary{padding:10px 12px;margin-bottom:12px;gap:8px}
 .wk-search{gap:8px;margin-bottom:10px}
 .my-account,.fm-profile{padding:14px;margin-bottom:12px}.my-account-facts{gap:10px;margin-bottom:14px}.my-account-facts small{margin-bottom:2px}
 .bk-panel .panelbody{padding:12px 14px}.bk-panel p{line-height:1.6}
 /* 每日出勤展開：日期已喺摘要，唔再重複；地盤＋班次一行；四個數一行；強積金／實付並排；按鈕一行 */
 .wk-days .wk-dayg>tr:not(.wk-allow-row):not(.wk-hist-row):not(.wk-day-summary){gap:6px 10px;padding:8px 12px}
 .wk-days .wk-dayg>tr:not(.wk-allow-row):not(.wk-hist-row):not(.wk-day-summary)>td:nth-child(1){display:none!important}
 .wk-days tbody>tr>td{font-size:14px;line-height:1.45}.wk-days tbody>tr>td:before{font-size:11px;margin-bottom:1px}
 .wk-days tbody>tr>td:nth-child(2){grid-row:1;grid-column:4/5;font-size:13px;color:var(--muted)}
 .wk-days tbody>tr>td.wk-day-site{grid-row:1;grid-column:1/4;padding:0!important;border:0!important;font-size:15px}
 .wk-days tbody>tr>td.wk-day-site:before{display:none}
 .wk-days tbody>tr>td.wk-day-time{grid-column:1/-1}
 .wk-days tbody>tr>td:is(.wk-day-mpf,.wk-day-net){grid-column:span 2;display:block;align-self:stretch}
 .wk-days tbody>tr>td:is(.wk-day-mpf,.wk-day-net):before{width:auto;margin:0 0 1px}
 .wk-days tbody>tr>td.wk-day-net{padding:5px 8px;border-radius:6px}.wk-days tbody>tr>td.wk-day-net b{font-size:15px}
 .wk-days tbody>tr>td.wk-day-status:before{display:none}
 .wk-days .wk-state{font-size:13px}.wk-days .wk-issue,.wk-days .wk-override,.wk-days td small{font-size:12px;line-height:1.5}
 .wk-days .wk-row-actions{gap:6px}.wk-days .wk-row-actions>small{order:9}
 body .wk-days .wk-row-actions :is(.wk-pay-btn,.wk-allow-btn,.wk-hist-btn){min-height:34px!important;padding:3px 10px;gap:4px;font-size:13px}
 .wk-days .wk-row-actions .wk-ico{width:12px}
 /* 資料核對／匯出報表：撳人名喺名下展開（唔轉頁） */
 .rv-people.rv-inline .rv-list{display:block!important}.rv-inline .rv-detail,.rv-inline .rv-pane-head{display:none!important}
 .rv-inline .rv-person{position:relative;padding-right:34px}
 .rv-inline .rv-person::after{content:"⌄";position:absolute;right:12px;top:50%;transform:translateY(-60%);color:var(--muted);font-size:16px}
 .rv-inline .rv-person.active{box-shadow:none;background:#eaf3f7;border-bottom-color:transparent}.rv-inline .rv-person.active::after{transform:translateY(-40%) rotate(180deg)}
 .rv-inline .rv-pane{padding:6px 6px 8px;background:#eaf3f7;border-bottom:1px solid var(--line)}
 .rv-inline .rv-pane .py-card,.rv-inline .rv-pane .rv-auto-day{margin:0 0 6px;padding:8px 10px}.rv-inline .rv-pane>:last-child{margin-bottom:0}
 .rv-inline .py-card header{gap:4px 8px}.rv-inline .py-issues{margin:2px 0;padding-left:16px}
 /* 本月閘機表格：地盤選單收窄，查看／刪除放右邊同一行 */
 .m-stack .gt-list:not(:has(thead)) tr{grid-template-columns:minmax(0,1fr) auto;gap:2px 8px;padding:8px 2px}
 .m-stack .gt-list:not(:has(thead)) td:nth-child(1){font-size:12px;color:var(--muted)}
 .m-stack .gt-list:not(:has(thead)) td:nth-child(2){grid-column:1/-1;margin-bottom:4px}
 .m-stack .gt-list:not(:has(thead)) td:nth-child(3){grid-column:1}
 .m-stack .gt-list:not(:has(thead)) td:nth-child(3) small{margin-top:2px}
 body .m-stack .gt-list:not(:has(thead)) td:nth-child(3) select{min-height:42px!important;padding-top:6px;padding-bottom:6px}
 .m-stack .gt-list:not(:has(thead)) td:last-child:has(button){grid-column:2;grid-row:3;align-self:start;flex-wrap:nowrap;gap:4px}
 body .m-stack .gt-list:not(:has(thead)) td:last-child button{min-height:42px!important;padding:6px 12px}
 .m-stack .gt-list:not(:has(thead)) td:last-child .tag{white-space:nowrap}
 /* 其他月份及已被取代：每份兩行（檔名／月份 · 地盤 · 時間 · 狀態），刪除放右邊 */
 .gt-history>summary{padding:12px 14px}.gt-history>summary>h2{font-size:15px}.gt-history>summary>small{display:none}.gt-history>summary>.gt-caret{margin-left:auto}
 .gt-history .m-stack tr{display:flex;flex-wrap:wrap;align-items:center;gap:2px 0;padding:8px 48px 8px 14px}
 .gt-history .m-stack td{font-size:12.5px;color:var(--muted)}
 .gt-history .m-stack td::before{display:none!important}
 .gt-history .m-stack td:not(:first-child):not(.gt-remove-cell)+td:not(.gt-remove-cell):not(:empty)::before{display:inline!important;content:"·";margin:0 6px}
 .gt-history .m-stack td:first-child{flex-basis:100%;color:var(--navy);font-size:14px}
 .gt-history .m-stack td:first-child small{display:inline;margin-left:6px}
 .gt-history .m-stack td .tag{padding:0 6px;font-size:11.5px}
 .gt-history .m-stack .gt-remove-cell{top:50%;transform:translateY(-50%)}
 /* 閘機表格：選單、查看、×、選檔案、加入、核對一律 44px 高 */
 body .gt-tables .panelbody :is(select,button,input[type=file]){height:44px!important;min-height:44px!important;box-sizing:border-box;padding-top:0;padding-bottom:0}
 /* 按鈕文字用 flex 置中（iOS 用 line-height 會偏下） */
 body .gt-tables .panelbody button{display:inline-flex;align-items:center;justify-content:center;line-height:1.2}
 body .gt-tables .panelbody input[type=file]{line-height:normal;padding:7px 8px}
 .gt-tables .gt-form{align-items:flex-end}
 /* 已停用賬號：一個一行，啟用掣放右邊 */
 .ac-disabled>summary{padding:6px 2px;font-size:14px}
 .ac-disabled .m-stack :is(table,tbody){display:block;width:100%}
 .ac-disabled .m-stack .ac-table tr{display:flex;flex-wrap:wrap;align-items:center;gap:0;padding:8px 92px 8px 12px;position:relative;width:100%;box-sizing:border-box}
 .ac-disabled .m-stack .ac-table td{flex-basis:100%}.ac-disabled .m-stack .ac-table td:first-child small{display:inline;margin-left:8px}
 .ac-disabled .m-stack .ac-table td[data-label="權限"]{font-size:12px;color:var(--muted)}
 .ac-disabled .m-stack .ac-table td[data-label="狀態"],.ac-disabled .m-stack .ac-table td.ac-pages{display:none!important}
 .ac-disabled .m-stack .ac-table td:last-child{position:absolute;right:12px;top:50%;transform:translateY(-50%);flex-basis:auto;width:max-content!important;max-width:none}
 .ac-disabled .m-stack .ac-table .ac-actions{width:auto!important;min-width:0!important}
 body .ac-disabled .m-stack .ac-table td:last-child button{min-height:36px!important;padding:4px 14px}
 /* 資料備份：匯出方式＋年份一行；選檔案＋校驗掣一行 */
 .bk-year-fields{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 10px}.bk-year-fields>label{min-width:0}.bk-year-fields>label[hidden]{display:none}
 body .bk-year-fields :is(select,input){height:48px!important;min-height:48px!important;box-sizing:border-box}
 #bk-restore{display:flex;flex-wrap:wrap;align-items:flex-end;gap:0 8px}#bk-restore>label{flex:1 1 0;min-width:0;margin:0}
 body #bk-restore>label>input,body #bk-restore>button{height:48px!important;min-height:48px!important;box-sizing:border-box;margin-top:6px}
 #bk-restore>label>input{width:100%;min-width:0;padding:10px 8px;line-height:normal}
 #bk-restore>button{flex:none;display:inline-flex;align-items:center;justify-content:center;line-height:1.2;padding:0 10px}#bk-restore>.error{order:3;flex-basis:100%;margin:4px 0 0}
 /* 頂部：系統名同帳號／功能兩行固定喺畫面頂 */
 :root{--sbh:56px}
 html{scroll-padding-top:calc(var(--sbh) + 64px)}
 .sidebar{position:sticky;top:0;z-index:40;height:var(--sbh);box-sizing:border-box;justify-content:center;padding-top:0;padding-bottom:0}
 .m-brand{font-size:17px}.m-brand img{width:32px;height:32px;border-radius:8px}
 .topbar{position:sticky;top:var(--sbh);z-index:35}
}
@media screen and (max-width:700px) and (display-mode:standalone){
 .sidebar{top:env(safe-area-inset-top)}.topbar{top:calc(var(--sbh) + env(safe-area-inset-top))}
 html{scroll-padding-top:calc(var(--sbh) + 64px + env(safe-area-inset-top))}
 body::before{content:"";position:fixed;inset:0 0 auto 0;height:env(safe-area-inset-top);background:#102f42;z-index:41}
}
/* 手機：每日出勤「編輯薪金／額外津貼」展開表單壓縮 */
@media screen and (max-width:700px){
 .wk-days tr.wk-allow-row>td{padding:8px 12px 10px}
 body .wk-days .wk-allow-form{display:flex;flex-wrap:wrap;gap:6px 8px;align-items:center}
 .wk-days .wk-allow-form>b{flex-basis:100%;font-size:14px;margin:0}
 body .wk-days .wk-allow-form>label{flex:1 1 0;display:flex;align-items:center;gap:6px;margin:0;font-size:13px;white-space:nowrap;min-width:0}
 body .wk-days .wk-allow-form>label.wk-allow-why{flex-basis:100%;flex-direction:column;align-items:stretch;gap:2px;font-size:12px;color:#667085;white-space:normal}
 body .wk-days .wk-allow-form input{flex:1 1 auto;width:auto;min-width:0;height:44px;min-height:44px;padding:0 10px;box-sizing:border-box;font-size:16px;color:#1d2939}
 body .wk-days .wk-allow-form>button{flex:1 1 0;height:40px;min-height:40px;margin:0;padding:0 8px;display:inline-flex;align-items:center;justify-content:center;line-height:1.2}
 .wk-days .wk-allow-form>small{flex-basis:100%;font-size:12px;line-height:1.4}
 .wk-days .wk-allow-form>.error:empty{display:none}
}
@media screen and (display-mode:standalone){
 body{min-height:100svh;padding-top:env(safe-area-inset-top)}
 .layout{min-height:calc(100svh - env(safe-area-inset-top))}
 .login.login-simple{min-height:calc(100svh - env(safe-area-inset-top));padding-bottom:max(24px,env(safe-area-inset-bottom))}
 .app-install{display:none}
}

/* Older WebViews ignore CSS min() and need the dialog polyfill backdrop. */
dialog{position:fixed;width:94vw;max-width:720px;max-height:calc(100vh - 32px);overflow:auto}dialog.sitepay-polyfilled{position:absolute}dialog + .backdrop{background:#102f4277}dialog:not([open]){display:none}

@supports (height:100dvh){dialog{max-height:calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}}
/* Attendance review: one scroll surface, explicit time editing, no nested panels. */
body.fr-review-open{overflow:hidden}
dialog.fr-mobile-dialog{width:94vw;max-width:600px;overscroll-behavior:contain}
.fr-mobile-dialog #modalbody,.fr-mobile-form{min-width:0;max-width:100%}
.fr-mobile-dialog h2:focus{outline:none}
.fr-dialog-head{display:flex;align-items:flex-start;margin-bottom:12px}
.fr-dialog-head h2{flex:1;min-width:0;margin:8px 0 0!important}
.fr-dialog-head button{flex:0 0 44px;height:44px;font-size:23px;padding:0;margin-left:12px}
.fr-mobile-form label,.fr-time-row>*{min-width:0}
.fr-mobile-form input,.fr-mobile-form select,.fr-mobile-form textarea{min-width:0;max-width:100%;font-size:16px}
.fr-mobile-form textarea{resize:vertical}
.fr-time{min-width:0;margin:18px 0;padding:0;border:0}
.fr-time legend{font-weight:700;font-size:15px;margin-bottom:8px}
.fr-preset{display:flex!important;align-items:center;gap:10px;min-height:44px;margin:0 0 8px;padding:0 12px;border:1px solid var(--line,#d5dde3);border-radius:10px;font-weight:600;color:var(--ink,#16202a);cursor:pointer}
.fr-preset input{width:22px;height:22px;margin:0;flex:none}
.fr-time-row label[hidden]{display:none}
.fr-time-row{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
.fr-time-row label{display:grid;grid-template-columns:38px minmax(0,1fr);align-items:center;gap:8px;margin:0;color:var(--muted)}
.fr-time-row input{display:block;width:100%;height:46px;padding:10px 8px;-webkit-appearance:none;appearance:none}
.fr-time-row input::-webkit-date-and-time-value{text-align:left;min-width:0}
.fr-extra{border-top:1px solid var(--line);padding-top:16px;margin-top:16px}
.fr-mobile-form .fr-toggle{display:flex;align-items:center;min-height:48px;font-size:15px;cursor:pointer}
.fr-toggle input[type=checkbox]{width:23px;height:23px;flex:0 0 23px;margin:0 12px 0 0;accent-color:var(--teal)}
.fr-toggle small{display:block;font-size:12px;font-weight:400;margin-top:3px}
.fr-extra [hidden]{display:none!important}
.fr-night-pick[hidden],.fr-day-extras[hidden]{display:none!important}
.fr-mobile-form .modalfoot{padding:8px 0 4px;gap:0}
.fr-mobile-form .modalfoot button{min-height:46px}
.fr-mobile-form .modalfoot button+button{margin-left:9px}
@media(max-width:680px){
 dialog.fr-mobile-dialog,dialog.fr-mobile-dialog.sitepay-polyfilled{position:fixed;top:0;left:0;right:0;bottom:0;margin:0;width:100%;max-width:none;height:100%;height:100dvh;max-height:100%;max-height:100dvh;border-radius:0;padding:20px 18px;padding:calc(20px + env(safe-area-inset-top)) 18px calc(20px + env(safe-area-inset-bottom));overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch}
 .fr-mobile-dialog #modalbody{overflow:visible}
 .fr-mobile-dialog h2{font-size:19px;margin-bottom:12px}
 .fr-mobile-form .modalfoot button{flex:1 1 auto}
}
.fr-card.fr-auto-unverified,.fm-notice-card.fr-auto-unverified{border:2px solid #b84236;background:#fff8f7}
.fr-card.fr-makeup,.fm-notice-card.fr-makeup{border:2px solid #c98a1b;background:#fffaf0}
.fr-makeup-warning{background:#fff3dc;border-left:4px solid #c98a1b;padding:12px;color:#7a4f00;border-radius:6px;font-size:14px;line-height:1.7;margin:12px 0}
.fr-makeup-time{color:#9a5b00}
.fr-auto-warning{background:#fff0ed;border-left:4px solid #b84236;padding:12px;color:#8a2d25;border-radius:6px;font-size:14px;line-height:1.7;margin:12px 0}
