/* .57 Screen readability only. Report/PDF templates are not altered. */
:root{--ui-text-scale:1;--read-font:calc(14px * var(--ui-text-scale));--read-small:calc(12px * var(--ui-text-scale))}
body{font-size:var(--read-font);line-height:1.55}
.modern-app .main,.hr-embedded,#hrApp{min-width:0}
.modern-app>.side{padding-top:0}.side .brand{min-height:72px;margin:-0px -12px 14px;padding:13px 18px;background:linear-gradient(110deg,#fff,#edf5ff);border-bottom:1px solid #dae7f5;justify-content:center}.side .brand-mark,.side .brand-mark:has(.sidebar-company-logo){height:42px}.side .brand-wordmark{font-size:34px;font-weight:800;letter-spacing:-1.2px}.sidebar-company-logo{max-height:44px;object-position:left center}.side-collapsed .side .brand{margin:0 -10px 14px;padding:10px 4px}.side-collapsed .side .brand-wordmark{font-size:13px;letter-spacing:-.5px}.side-collapsed .brand-mark{height:42px}
.top{align-items:center;flex-wrap:wrap;min-height:72px}.top-right{align-items:center;flex-wrap:wrap}.top-heading h1{font-size:calc(17px * var(--ui-text-scale))}.top-heading>span,.user-identity small{font-size:var(--read-small)}.user-identity strong{font-size:var(--read-font);white-space:normal}.home-top-search{height:auto;min-height:40px}.top-icon{flex:0 0 36px}.text-size-control{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;background:white;border:1px solid #d5e4f5;border-radius:8px;padding:3px 8px;margin:0}.text-size-control b{font-size:18px;color:#0b386b}.text-size-control select{padding:6px 3px;border:0;min-height:32px;width:auto;font-size:14px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.main p,.main li,.main summary,.main .notice,#hrApp p,#hrApp summary,#hrDialog p{font-size:var(--read-font)}
.main label,.hr-embedded label,#hrDialog label,.modal label{font-size:var(--read-font);line-height:1.6}
.main input,.main select,.main textarea,.hr-embedded input,.hr-embedded select,.hr-embedded textarea,#hrDialog input,#hrDialog select,#hrDialog textarea,.modal input,.modal select,.modal textarea{font-size:var(--read-font);min-width:0;max-width:100%;height:auto}
.main button,.hr-embedded button,#hrDialog button,.modal button{font-size:var(--read-font);min-height:2.5em;height:auto;white-space:normal;line-height:1.35}
.main small,.hr-embedded small,#hrDialog small,.main .badge{font-size:var(--read-small)}
.tablewrap td,.table-wrap td,.hr-embedded td,.tablewrap th,.table-wrap th,.hr-embedded th{font-size:var(--read-font);padding:1em .8em;line-height:1.55;vertical-align:top}
.tablewrap td button,.table-wrap td button{font-size:var(--read-small);line-height:1.4;min-height:2.5em}
.tablewrap td:last-child,.table-wrap td:last-child{white-space:normal;min-width:8em}.tablewrap th,.table-wrap th{position:sticky;top:0;z-index:2;font-weight:750}.tablewrap,.table-wrap{overflow:auto;max-width:100%;scrollbar-width:auto}.tablewrap table,.table-wrap table{min-width:calc(740px * var(--ui-text-scale))}
.panel h2,#hrDialog h2{font-size:calc(22px * var(--ui-text-scale));line-height:1.3}.panel h3{font-size:calc(17px * var(--ui-text-scale))}
.formgrid,.grid.two{grid-template-columns:repeat(auto-fit,minmax(min(100%,calc(290px * var(--ui-text-scale))),1fr))}.formgrid>*{min-width:0}.formgrid textarea{min-height:6em}.formgrid .wide{grid-column:1 / -1}
#hrDialog,.modal{max-width:96vw;max-height:92dvh;overflow:auto}#hrDialog{width:min(calc(1040px * var(--ui-text-scale)),96vw)}#hrDialog .modalhead{gap:16px;align-items:flex-start}#hrDialog .modalhead h2{flex:1}input[type=checkbox],input[type=radio]{width:calc(16px * var(--ui-text-scale))!important;height:calc(16px * var(--ui-text-scale))!important;min-height:0!important;flex:0 0 auto}.error,#hrDialog .error{font-size:var(--read-font)}
.nav button{font-size:calc(13px * var(--ui-text-scale));white-space:normal;min-height:3em}.nav button>span{min-width:0;overflow-wrap:anywhere}.nav button>.ui-icon{flex-shrink:0}.side-foot,.side-foot span,.sidebar-copyright{font-size:var(--read-small)}
.hr-menu .actions button,.hr-menu-group>summary{font-size:var(--read-font)}.hr-menu .actions{flex-wrap:wrap}.hr-menu-title small{font-size:var(--read-small)}
.attendance-title{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:16px;margin-bottom:16px}.attendance-title h2{margin:2px 0 4px}.attendance-title p{margin:0;color:#526d8c}.attendance-flow{display:flex;gap:12px;flex-wrap:wrap;padding:16px;background:#f0f7ff;border:1px solid #d9e9fc;border-radius:12px;margin-bottom:20px}.attendance-flow>span{flex:1;min-width:160px;color:#0c65d5;display:flex;gap:9px;align-items:center}.attendance-flow b{color:#153b6b}
.att-review-controls{display:flex;flex-wrap:wrap;gap:14px;align-items:flex-end}.att-review-controls>label{flex:1;min-width:min(100%,210px)}.att-review-controls input,.att-review-controls select{width:100%}.att-review-summary{display:flex;gap:12px;flex-wrap:wrap;margin:16px 0}.att-review-summary>span{padding:12px 16px;flex:1;min-width:180px;background:#edf6ff;color:#123969;border:1px solid #d8e9fc;border-radius:10px;font-weight:600}.att-review-summary>span:nth-child(2){background:#fff5e4}.att-review-summary>span:nth-child(3){background:#e8f8f1}.att-review-summary>span:nth-child(4){background:#f0edff}.att-status{display:inline-block;padding:.35em .7em;border-radius:7px;background:#edf5ff;color:#225da2;font-weight:650}.att-status.is-locked{background:#e4f7ee;color:#086044}.attendance-actions{display:flex;gap:6px;flex-wrap:wrap}
.employee-picker{position:relative;width:100%;min-width:min(100%,280px)}.employee-picker .employee-native{position:absolute!important;width:1px!important;height:1px!important;min-height:0!important;opacity:0;pointer-events:none;padding:0!important;border:0!important}.employee-selected{display:flex!important;align-items:center;gap:.8em;width:100%;min-height:3.6em!important;text-align:left!important;border:1px solid #b6d2f4!important;background:#f5f9ff!important;padding:.7em .9em!important;color:#14315b!important;box-shadow:0 2px 6px #174a8010}.employee-selected>span:nth-child(2){display:flex;gap:.6em;flex-wrap:wrap;flex:1;text-align:left}.employee-code{color:#005fd9;min-width:4em}.employee-avatar{display:inline-grid;place-items:center;font-size:1.3em;width:1.8em;height:1.8em;border-radius:50%;background:#dcecfc;color:#087bfa;flex:0 0 auto}.employee-chevron{margin-left:auto}.employee-picker-panel{position:absolute;top:calc(100% + 6px);left:0;width:100%;min-width:min(330px,85vw);max-width:88vw;background:#fff;border:1px solid #bad3ef;border-radius:12px;padding:12px;z-index:120;box-shadow:0 14px 35px #0727482b}.employee-picker-panel>input{width:100%}.employee-picker-panel [role=listbox]{max-height:min(340px,45dvh);overflow:auto;margin-top:8px}.employee-picker-panel [role=option]{display:flex;align-items:center;gap:10px;width:100%;padding:.8em;text-align:left;border:0;background:#fff;border-bottom:1px solid #edf2f7;border-radius:6px;color:#152e54}.employee-picker-panel [role=option]>span:nth-child(2){display:flex;flex-wrap:wrap;gap:8px;flex:1}.employee-picker-panel [role=option][aria-selected=true]{background:linear-gradient(100deg,#007fff,#005dd5);color:white}.employee-picker-panel [aria-selected=true] .employee-code{color:white}.employee-picker-panel [role=option]:hover{background:#e9f4ff;color:#142f50}.employee-picker-panel [role=option]:focus-visible{outline:3px solid #439cfb;outline-offset:-3px}
#rvEmployee+.employee-selected{min-width:0}.actions:has(#rvEmployee) .employee-picker{flex:1;min-width:min(100%,380px)}
.attendance-record-summary{background:#f2f8ff;border:1px solid #dceafe;border-radius:12px;padding:16px}.attendance-record-summary>strong{font-size:1.15em}.attendance-record-summary dl{display:grid;grid-template-columns:minmax(120px,1fr) 3fr;gap:8px;margin-bottom:0}.attendance-record-summary dt{font-weight:650}.attendance-record-summary dd{margin:0;overflow-wrap:anywhere}.attendance-duplicate{background:#fff3f3;border:1px solid #edbdc1;color:#9c2030;border-radius:12px;padding:18px}.attendance-duplicate>strong{font-size:1.2em}.attendance-history article{border-left:3px solid #348fff;padding:12px 18px;margin:8px 0;background:#f7fbff}.attendance-history small{display:block}.attendance-history pre{white-space:pre-wrap;overflow-wrap:anywhere}
/* Chat uses the same user font preference, with scroll instead of clipped text. */
#chatPanel{font-size:var(--read-font);width:min(calc(410px * var(--ui-text-scale)),calc(100vw - 30px));height:min(720px,calc(100dvh - 30px));right:18px;bottom:15px;z-index:10013}#chatPanel header{background:linear-gradient(100deg,#0784ff,#075ed8);color:#fff;padding:14px}#chatClose{color:white}#chatPanel input,#chatPanel textarea,#chatPanel select,#chatPanel button{font-size:var(--read-font);min-height:2.4em;line-height:1.4}#chatPanel input[type=checkbox]{min-height:0}#chatPanel small,#chatMessages small,#chatStatus,#chatCount{font-size:var(--read-small)}#chatMessages small{font-size:calc(11px * var(--ui-text-scale))}#chatPanel .chatPeer{flex-wrap:wrap}#chatPeerName{flex:1;min-width:120px}#chatPanel #chatInfo{font-size:var(--read-small);margin-left:auto}.chat-tabs{display:flex;gap:5px;flex-wrap:wrap}.chat-tabs button{flex:1;padding:7px!important}.chat-tabs [aria-selected=true]{background:#0879f6;color:white;border-color:#0879f6}.chat-tabs #chatNewGroup{flex-basis:100%;background:#eef6ff;color:#085ebd}#chatManage{overflow:auto;padding:16px;flex:1;min-height:0}.chat-manage-head{display:flex;justify-content:space-between;align-items:center;gap:8px}.chat-manage-head h3{margin:4px 0;font-size:1.15em}#chatManage label{display:block;margin:8px 0}#chatManage input:not([type=checkbox]){width:100%;box-sizing:border-box}.group-members{max-height:250px;overflow:auto;margin:12px 0;border:1px solid #e0eaf4;border-radius:8px;padding:10px}#chatManage label.group-member{display:flex;gap:10px;align-items:center;padding:8px;border-bottom:1px solid #edf3f9}.group-member small{display:block}.group-links{border-top:1px solid #dbe6f1;margin-top:16px;padding-top:10px}.group-links button{margin:4px 4px 4px 0}.group-links p,.chat-help{color:#516d8b;font-size:var(--read-small)}.group-request{border:1px solid #dfeafa;padding:10px;border-radius:8px;margin:10px 0}.group-request small{display:block}.group-request button{margin:8px 5px 0 0}.chat-keyboard{display:block;padding:0 12px 8px;color:#536d8a}.chat-sender{display:block;font-size:var(--read-small);color:#07539f;margin-bottom:5px}#chatMessages article{max-width:88%}#chatText{min-width:0}#chatAttach{flex:0 0 30px}#chatStatus:empty{display:none}#chatMessages{scrollbar-width:thin}#chatPanel #chatSend{background:#0779f6;align-self:flex-end}#chatUsers small{color:#54718c}
@media(min-width:1050px){html[data-text-size="200"] .modern-app:not(.side-collapsed){--rail:300px}html[data-text-size="200"] .home-top-search{flex-basis:100%;order:3;max-width:100%}html[data-text-size="200"] .user-identity{max-width:220px}}
@media(max-width:800px){.top-heading{max-width:calc(100vw - 100px)}.top-right{width:100%;justify-content:flex-end}.home-top-search{order:3;width:100%;max-width:100%}.page{padding:12px}.panel{padding:14px}#hrDialog{padding:16px}.att-review-controls>label{min-width:100%}.attendance-flow>span{min-width:100%}.attendance-record-summary dl{grid-template-columns:1fr}.attendance-record-summary dd{margin-bottom:8px}.employee-picker-panel{max-width:calc(100vw - 64px)}#chatPanel{right:10px;bottom:10px;width:calc(100vw - 20px)}.profile-menu>summary .user-identity{display:none}}
@media print{:root{--ui-text-scale:1}.text-size-control,#erpChatRoot{display:none!important}}

/* Accessible diagnostics use the same preference even outside the app root. */
#erpIssuePanel,#adminIssuePanel{font-size:var(--read-font)!important;width:min(calc(460px * var(--ui-text-scale)),calc(100vw - 32px))!important;max-width:calc(100vw - 32px);overflow:auto}#erpIssuePanel button,#adminIssuePanel button,#erpIssuePanel p,#adminIssuePanel p{font-size:var(--read-font);line-height:1.5;white-space:normal}#erpIssuePanel small,#adminIssuePanel small{font-size:var(--read-small)}
/* Enlarged controls reflow into real columns instead of squeezing long names. */
.att-review-controls{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,calc(260px * var(--ui-text-scale))),1fr));align-items:end}
.att-review-controls>label{min-width:0;width:100%}.att-review-controls>button{justify-self:start;max-width:100%}
.employee-selected>span:nth-child(2){min-width:0;overflow-wrap:normal;word-break:normal}.employee-code{white-space:nowrap}.employee-selected b{overflow-wrap:normal;word-break:normal}
@media(max-width:800px){.att-review-controls{grid-template-columns:1fr}}

/* .58: status decisions grouped, readable and distinct from routine details. */
.employee-status-panel{min-width:0;border:1px solid #b7d1ed;border-radius:12px;padding:18px;background:#f7fbff;margin:8px 0}
.employee-status-panel legend{font-weight:700;color:#123b64;padding:0 8px}
.employee-current-status{display:flex;gap:10px 20px;align-items:center;flex-wrap:wrap;padding:8px 0 14px}
.employee-current-status>b{background:#e0edfb;padding:6px 12px;border-radius:20px}
.employee-status-panel>.notice{margin-bottom:16px}
.employee-status-panel .formgrid{width:100%;min-width:0}
.employee-status-panel [hidden]{display:none!important}
.employee-status-panel .formgrid>label{min-width:0}

/* Attendance access: compact employee checklist, no typed grant syntax. */
#hrForm .scope-selection{min-width:0}
#hrForm .scope-selection-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:10px 12px;background:#edf5fc;border:1px solid #d7e5ef;border-radius:8px 8px 0 0}
#hrForm .scope-selection-toolbar strong{margin-left:auto;font-size:13px}
#hrForm .scope-selection-toolbar .check{gap:8px;margin:0}
#hrForm .scope-selection-toolbar button{padding:7px 10px}
#hrForm .scope-selection p{margin:9px 0;font-size:13px}
#hrForm .scope-list{max-height:330px;overflow:auto;border:1px solid #d7e5ef;border-radius:6px}
#hrForm .scope-employee{display:grid;grid-template-columns:20px minmax(65px,105px) minmax(0,1fr);gap:10px;align-items:center;padding:9px 12px;border-bottom:1px solid #e7eef5;cursor:pointer;color:#16354d}
#hrForm .scope-employee:last-child{border-bottom:0}
#hrForm .scope-employee:hover{background:#f4faff}
#hrForm .scope-employee:has(input:checked){background:#edf6ff}
#hrForm .scope-employee[hidden]{display:none}
#hrForm .scope-employee input{width:18px;height:18px;margin:0;accent-color:#0076c8}
#hrForm .scope-employee-number{font-weight:700}
#hrForm .scope-employee-name{overflow-wrap:anywhere}
#hrForm .scope-employee-name small{display:block;color:#627b90;margin-top:2px}
#hrForm .scope-inactive{margin-top:12px}
#hrForm .scope-inactive summary{cursor:pointer;font-size:13px;margin-bottom:8px}
@media(max-width:600px){#hrForm .scope-selection-toolbar strong{width:100%;margin-left:0}#hrForm .scope-employee{grid-template-columns:20px 68px minmax(0,1fr);gap:7px;padding:10px 8px}#hrForm .scope-list{max-height:280px}}
@media(max-width:800px){#hrDialog:has(.scope-selection) .modalhead{top:-16px;margin:-16px -16px 17px;padding:18px 16px}#hrDialog:has(.scope-selection) #hrForm>.actions{margin:18px -16px -16px;padding:13px 16px;bottom:-16px}}

/* Project Time Sheet: compact daily hours with separate verification and print. */
.timesheet-workspace{min-width:0}.timesheet-workspace .attendance-title{gap:12px}.timesheet-workspace .attendance-title .actions{flex-wrap:wrap;gap:8px}
.timesheet-access,.timesheet-hint{color:#526b81;font-size:var(--read-small);line-height:1.5}
.timesheet-filters{display:grid;grid-template-columns:minmax(240px,2fr) minmax(150px,1fr) repeat(2,minmax(145px,.8fr)) minmax(190px,1fr);gap:12px;background:#f4f8fc;border:1px solid #dae5ee;border-radius:12px;padding:16px;margin:16px 0}
.timesheet-filters>label{min-width:0;display:flex;flex-direction:column;justify-content:flex-end;gap:6px}.timesheet-filters input,.timesheet-filters select{width:100%;min-width:0}.timesheet-filters .employee-picker{min-width:0}
.timesheet-filter-actions{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px}.timesheet-person{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:8px 0 14px;flex-wrap:wrap}.timesheet-person>div{min-width:0}.timesheet-person strong{display:block;font-size:calc(20px * var(--ui-text-scale));color:#173b58}.timesheet-person span{display:block;color:#536e84;margin-top:4px;font-size:var(--read-small)}
.timesheet-metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));border:1px solid #d7e5f0;border-radius:12px;overflow:hidden;background:#f3f8fc}.timesheet-metrics>div{padding:14px 16px;border-right:1px solid #d7e5f0;min-width:0}.timesheet-metrics>div:last-child{background:#0c67a6;color:white;border-right:0}.timesheet-metrics span{display:block;font-size:var(--read-small)}.timesheet-metrics strong{display:block;font-size:calc(24px * var(--ui-text-scale));font-variant-numeric:tabular-nums;margin-top:5px;overflow-wrap:anywhere}
.timesheet-verification{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:12px 0;font-size:var(--read-small)}.timesheet-report-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.timesheet-report-head p{margin:6px 0;color:#47637b;font-size:var(--read-small)}.timesheet-report-head button{flex-shrink:0}
.timesheet-table-wrap{max-width:100%;overflow:auto;border:1px solid #d6e3ed;border-radius:10px;max-height:65vh;isolation:isolate}.timesheet-table{width:100%;min-width:1100px;border-collapse:separate;border-spacing:0;font-size:var(--read-small);line-height:1.4}.timesheet-table th,.timesheet-table td{padding:9px 8px;border-bottom:1px solid #e0e9f1;border-right:1px solid #e8eef4;vertical-align:middle;text-align:left}.timesheet-table thead th{position:sticky;top:0;z-index:2;background:#e9f3fb;color:#184b72;font-weight:700;white-space:nowrap}.timesheet-table th:first-child,.timesheet-table td:first-child{white-space:nowrap;min-width:90px}.timesheet-table td:nth-child(2){min-width:115px;max-width:190px;overflow-wrap:anywhere}.timesheet-table td small{display:block;color:#678097}.timesheet-table td.timesheet-number{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.timesheet-table td.timesheet-ot{font-weight:750;color:#086699}.timesheet-table tfoot th,.timesheet-table tfoot td{position:sticky;bottom:0;background:#e8f2fa;z-index:1;font-weight:750;border-top:1px solid #b7d2e6}.timesheet-table .attendance-actions{min-width:115px}.timesheet-table .attendance-actions button{font-size:var(--read-small);padding:6px 9px;white-space:nowrap}.timesheet-table .att-status{font-size:var(--read-small);padding:4px 7px}.timesheet-empty td{background:#fafbfd;color:#8192a2}.timesheet-holiday td{background:#f1f8f4}
#registerPagination[hidden]{display:none}
@media(max-width:1250px){.timesheet-filters{grid-template-columns:repeat(3,minmax(0,1fr))}.timesheet-filters .timesheet-employee{grid-column:span 2}}
@media(max-width:800px){.timesheet-filters{grid-template-columns:repeat(2,minmax(0,1fr));padding:12px}.timesheet-filters .timesheet-employee{grid-column:1/-1}.timesheet-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.timesheet-metrics>div{border-bottom:1px solid #d7e5f0}.timesheet-metrics>div:last-child{grid-column:1/-1}.timesheet-report-head button{width:100%}.timesheet-workspace .attendance-title .actions{width:100%}.timesheet-workspace .attendance-title .actions button{flex:1 1 145px}.timesheet-table-wrap{max-height:60vh}}
@media(max-width:430px){.timesheet-filters{grid-template-columns:1fr}.timesheet-filters .timesheet-employee{grid-column:auto}.timesheet-filters .employee-picker-panel{min-width:0;width:100%}}

/* Attendance Register: compact project selector and explicit archive filter. */
.timesheet-filter-actions .timesheet-inactive{display:flex;flex-direction:row;align-items:center;gap:8px;margin:0 8px 0 0;font-size:var(--read-small)}
.timesheet-filter-actions .timesheet-inactive input{width:auto;min-width:16px;margin:0}

/* OT explanations remain visible on touch screens without a hover tooltip. */
.ot-explanation{display:block;white-space:normal;min-width:100px;max-width:190px;font-size:.75rem;line-height:1.35;color:#526777;font-weight:400;margin-top:.25rem}
.employee-ot-panel{border:1px solid #ccd8df;border-radius:8px;padding:16px}
.employee-ot-panel legend{font-weight:700;padding:0 6px}

/* Compact Employee Data: the essential fields stay visible. */
.employee-easy-dialog .employee-extra{border:1px solid #d9e3eb;border-radius:8px;padding:12px 14px;min-width:0}
.employee-easy-dialog .employee-extra summary{cursor:pointer;font-weight:600;color:#294e6a}
.employee-easy-dialog .employee-extra[open] summary{margin-bottom:14px}
.employee-easy-dialog .employee-status-panel{border:0;padding:0;margin:0}
.employee-easy-dialog .employee-ot-panel{padding:12px 14px}
.employee-easy-dialog .employee-ot-panel>label{max-width:340px}
.employee-easy-dialog .employee-text-action{padding:6px 0;border:0;background:none;color:#0867ba;text-align:left}
.employee-easy-dialog .employee-basic{padding:0}
.employee-easy-dialog [hidden]{display:none!important}
.employee-easy-dialog .check{display:flex;align-items:center;gap:8px}
.employee-easy-dialog .check input{width:18px;min-width:18px;height:18px}
