/* Reference-inspired workspace: quiet green accents, wide tables and focused dialogs. */
:root{--service-accent:#23764f}.sidebar{background:var(--surface);color:var(--ink);border-inline-end:1px solid var(--line)}.sidebar nav button{color:var(--ink);border-radius:7px}.sidebar nav button.active{background:var(--pale);color:var(--green);box-shadow:none}.sidebar .brand,.sidebar-foot{border-color:var(--line)}.sidebar .brand small,.sidebar .user-role{color:var(--muted)}.sidebar #logoutBtn{color:var(--ink)}
.panel{border-radius:12px;box-shadow:0 1px 3px #0000000b}.panel-head{padding-block:18px}.filters{background:var(--surface-soft);padding:20px;gap:14px;border:1px solid var(--line);border-radius:10px}.filters label{display:grid;gap:7px;font-size:13px;min-width:150px}.filters input,.filters select{width:100%;min-height:44px}#filters{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr))}#filters>input[name=q]{grid-column:span 2}th{background:var(--surface-soft);font-weight:700}td,th{padding:14px 16px}.report-choices{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:24px}.report-choices button{display:grid;text-align:start;gap:8px;padding:24px;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:12px;font-size:18px}.report-choices button span{font-size:13px;color:var(--muted);font-weight:400}.report-choices button.selected{border-color:var(--green);background:var(--pale)}.report-panel.hidden{display:none!important}#reportTable,#custodyReportTable{display:none!important}.service-dialog{width:min(1100px,94vw);max-height:90dvh;padding:0;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--ink)}.service-dialog .dialog-form{padding:24px;max-height:75dvh;overflow:auto}.service-dialog::backdrop{background:#10201a77}.service-dialog .dialog-head{padding:18px 24px;border-bottom:1px solid var(--line)}#custodyEntryDialog .stack{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}#custodyEntryDialog section{margin:0;padding:0}#custodyEntryDialog form button{align-self:end}#custodyView .custody-layout{display:block}#custodyView>.custody-ledger{display:none}#cashCustodySummary{display:flex;gap:16px;padding-bottom:18px}#cashCustodySummary .fund-card{flex:1}#custodyView .fund-card{background:var(--surface);border:1px solid var(--line);border-inline-start:4px solid var(--green);border-radius:12px;padding:22px}#custodyView .fund-card b{color:var(--ink)}.fund-card button{margin-top:10px}#medicalDetail{margin-top:20px}.sidebar nav button[data-view=medical]::before{content:'+';mask:none;background:none;font-weight:bold;text-align:center}#operationsView .panel-head{border-bottom:1px solid var(--line);margin-bottom:18px}
@media(max-width:800px){#filters{grid-template-columns:repeat(2,minmax(0,1fr))}.report-choices{grid-template-columns:1fr}.report-choices button{padding:18px}#custodyEntryDialog .stack{grid-template-columns:1fr 1fr}.service-dialog .dialog-form{padding:15px}}
@media(max-width:480px){#filters{grid-template-columns:1fr}#filters>input[name=q]{grid-column:auto}#custodyEntryDialog .stack{grid-template-columns:1fr}.filters label{min-width:0}}
@media print{.report-choices,.service-dialog{display:none!important}}
#custodyView .fund-card{color:var(--ink)}#custodyView .fund-card small,#custodyView .fund-card p{color:var(--muted)}#custodyView .fund-card p{margin-block:10px;line-height:1.7}.sidebar-close{color:var(--ink);background:var(--surface-soft)}#custodyEntryDialog section>.panel-head{padding-block:4px 12px;margin-bottom:14px}#custodyEntryDialog section>.panel-head .eyebrow{display:none}#custodyEntryDialog section>.panel-head h3{font-size:15px}
@media(min-width:801px){#reportFilters{grid-template-columns:repeat(3,minmax(0,1fr))}#reportFilters button{white-space:nowrap}}
.sidebar nav button:hover{background:var(--pale);color:var(--green)}

.medical-upload{padding:14px;border:1px dashed var(--border,#b8cdbf);border-radius:12px;min-width:0}.medical-upload input{max-width:100%;width:100%}.medical-file{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:10px 0;border-bottom:1px solid var(--border,#dce6df)}.medical-file span{flex:1;overflow-wrap:anywhere;min-width:120px}.medical-file a{color:var(--accent,#147354)}.upload-status{padding:12px;background:#fff6df;color:#714b10;border-radius:8px}

#stats .stat-link{display:flex;flex-direction:column;align-items:stretch;text-align:start;width:100%;font:inherit;cursor:pointer;color:var(--ink);background:var(--surface);transition:transform .15s,border-color .15s}#stats .stat-link:hover:not(:disabled){transform:translateY(-3px);border-color:var(--green)}#stats .stat-link:focus-visible{outline:3px solid var(--green);outline-offset:3px}#stats .stat-link:disabled{cursor:default;opacity:1}.monthly-hint{padding:14px;border-inline-start:4px solid var(--green);background:var(--pale);border-radius:8px;line-height:1.8}.monthly-hint[hidden]{display:none}.monthly-date{white-space:nowrap;direction:ltr;display:inline-block}.monthly-days{display:block;color:var(--muted);margin-top:5px}.due-today{font-weight:bold;color:var(--green)}.due-soon{font-weight:bold}
#directorAccount{margin-top:20px}.sidebar nav button[data-view=director]::before{content:'↗';mask:none;background:none;font-size:22px;text-align:center;font-weight:bold}#directorAccount .cell-actions{flex-wrap:wrap}

#directorClassifyDialog{width:min(980px,96vw)}
.director-batch-preview{min-width:0}.director-batch-preview .table-wrap{max-height:300px;overflow:auto}.director-batch-preview summary{cursor:pointer;padding:12px 0;font-weight:600}
#maintenanceDialog{width:min(1000px,96vw)}.merge-group{border:1px solid var(--line,#dde5eb);border-radius:12px;padding:16px;margin:16px 0;min-width:0}.merge-group>.primary{margin-top:12px}#employeeArchiveFilter{min-width:170px}
.request-item{display:grid;grid-template-columns:minmax(0,1fr) 170px auto;gap:12px;align-items:center;padding:12px;border-bottom:1px solid #dde5eb}.request-item textarea{min-height:65px}#requestDocumentForm [hidden]{display:none!important}#issuedRequestDocument{display:inline-block;margin:12px}#requestDocumentForm details{padding:14px;border:1px solid #dde5eb;border-radius:10px}@media(max-width:650px){.request-item{grid-template-columns:minmax(0,1fr)}.request-item button{justify-self:start}}
#requestDocumentForm label:has([name=showLogo]){display:flex;flex-direction:row;align-items:center;gap:10px}#requestDocumentForm input[name=showLogo]{width:20px;height:20px;min-height:0;flex:none}

/* Keep each saved-request value aligned directly below its heading in RTL. */
#requestDocumentHistory .request-history-table th,
#requestDocumentHistory .request-history-table td { text-align: center; vertical-align: middle; }
#requestDocumentHistory .request-history-table bdi { white-space: nowrap; }

.director-time { white-space: nowrap; }

.director-period-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 14px 0; }
.director-period-filters label { display: flex; flex-direction: column; gap: 6px; min-width: 160px; flex: 1 1 170px; }
.director-period-filters [hidden] { display: none !important; }
#directorPeriodSummary { white-space: normal; text-align: start; }
@media(max-width:480px){ .director-period-filters label,.director-period-filters button { flex-basis:100%; min-width:0; width:100%; } }

#directorRecentTransfers .director-register-table th,#directorRecentTransfers .director-register-table td { text-align:center; vertical-align:middle; padding:14px 12px; }
#directorRecentTransfers .director-register-table th { white-space:normal; min-width:95px; }
#directorRecentTransfers .director-register-table th:nth-child(3),#directorRecentTransfers .director-register-table th:nth-child(4) { min-width:155px; }
#directorRecentTransfers .director-register-table td:nth-child(2),#directorRecentTransfers .director-register-table td:nth-child(7) { white-space:normal; min-width:170px; max-width:300px; overflow-wrap:anywhere; }
#directorRecentTransfers .director-register-table bdi { white-space:nowrap; }
#directorRecentTransfers .director-register-table td:last-child { white-space:normal; min-width:205px; }
#directorRecentTransfers .director-register-table td:last-child button { margin:3px; }
.request-revision-notice { border-inline-start:4px solid #b38b37; background:#fff7e5; padding:12px; margin-bottom:12px; }

#employeeBenefitsDialog{width:min(1080px,96vw)}#employeeBenefitsDialog section{margin:22px 0}#employeeBenefitsDialog details{border:1px solid var(--line,#dce5e8);border-radius:10px;padding:14px;margin:12px 0}#employeeBenefitsDialog summary{cursor:pointer;font-weight:600;padding:8px}#employeeBenefitsDialog [hidden]{display:none!important}#employeeBenefitsDialog .check-label{display:flex;flex-direction:row;align-items:flex-start;gap:10px}#employeeBenefitsDialog .check-label input{flex:none;width:20px;min-height:20px;margin-top:4px}#employeeBenefitsDialog .benefit-note{color:var(--muted);line-height:1.9}.benefit-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:20px 0}.benefit-summary>div{padding:16px;background:var(--pale,#edf6f1);border-radius:12px;min-width:0}.benefit-summary b{display:block;font-size:20px;margin-top:8px;overflow-wrap:anywhere}.benefit-table th,.benefit-table td{white-space:normal;vertical-align:middle;padding:12px;text-align:start}.benefit-table bdi{white-space:nowrap;direction:ltr}.benefit-table th{min-width:130px}.benefit-warning{padding:14px;background:#fff5da;border-inline-start:4px solid #bf9439;line-height:1.8}.benefit-void{opacity:.65}#benefitTerminateForm{padding:18px;border:1px solid #ce9a74;border-radius:12px;margin-top:18px}@media(max-width:700px){.benefit-summary{grid-template-columns:repeat(2,minmax(0,1fr))}#employeeBenefitsDialog .form-grid{grid-template-columns:minmax(0,1fr)}#employeeBenefitsDialog .span-2{grid-column:auto}}@media(max-width:380px){.benefit-summary{grid-template-columns:minmax(0,1fr)}}

#employeeBenefitsDialog .benefit-calculation-table{width:100%;min-width:0;table-layout:fixed}#employeeBenefitsDialog .benefit-calculation-table th{width:36%;min-width:0}#employeeBenefitsDialog .benefit-calculation-table td{overflow-wrap:anywhere}#employeeBenefitsDialog .benefit-calculation-table bdi{display:inline-block}#employeeBenefitsDialog .benefit-summary bdi{white-space:normal}
@media(max-width:700px){#employeeBenefitsDialog .benefit-calculation-table,#employeeBenefitsDialog .benefit-calculation-table tbody,#employeeBenefitsDialog .benefit-calculation-table tr,#employeeBenefitsDialog .benefit-calculation-table th,#employeeBenefitsDialog .benefit-calculation-table td{display:block;width:100%;min-width:0}#employeeBenefitsDialog .benefit-calculation-table th{padding-bottom:6px}#employeeBenefitsDialog .benefit-calculation-table td{padding-top:6px;border-top:0}}

.leave-due-card{display:flex;justify-content:space-between;align-items:center;gap:18px;background:var(--pale);border:1px solid var(--line);border-inline-start:4px solid var(--green);border-radius:14px;padding:20px;margin:18px 0}.leave-due-card h4{font-size:25px;margin:8px 0}.leave-due-card p{margin:8px 0!important}.leave-due-card small{line-height:1.8}#employeeLeaveHint{white-space:normal;line-height:1.8}#employeeLeaveFields{grid-column:1/-1;min-width:0}#employeeLeaveFields.hidden{display:none!important}@media(max-width:700px){.leave-due-card{align-items:stretch;flex-direction:column}.leave-due-card button{width:100%}}

.leave-due-card bdi{display:inline-block;white-space:nowrap}#employeeLeaveFields{align-items:center}#employeeLeaveFields input{min-height:44px}#employeeLeaveFields button{min-height:44px;align-self:center}#employeeLeaveHint{grid-column:1/-1;margin:0;padding:12px}
#financialApprovalForm h4{margin:10px 0 0;padding:10px 0;border-bottom:1px solid #d8ddd5;color:#506056}
#financialApprovalForm .muted{margin:0;line-height:1.6}
#issuedFinancialApproval{display:inline-block;margin:12px}
#financialApprovalHistory{margin-top:30px}
#financialApprovalHistory th,#financialApprovalHistory td{text-align:center;vertical-align:middle}
#financialApprovalHistory bdi{white-space:nowrap}

.approval-preview-dialog{width:min(1100px,96vw);max-width:96vw;padding:20px;border:0;border-radius:12px}.approval-preview-dialog iframe{width:100%;height:70vh;border:1px solid #d8ddd5;margin-top:14px}.approval-preview-dialog::backdrop{background:#17251c88}
/* Employee letters retain clear bilingual fields on small screens. */
#employeeLetterForm [hidden]{display:none!important}
#employeeLetterForm .employee-letter-hint:empty{display:none}
#employeeLetterForm input[readonly]{background:var(--pale,#edf6f1);font-weight:600}
#employeeLetterForm label{min-width:0}
#employeeLetterForm select,#employeeLetterForm input{max-width:100%}
#employeeNationalitySearch{margin-bottom:8px}
@media(max-width:700px){#employeeLetterForm,#employeeSignerFields{grid-template-columns:minmax(0,1fr)}#employeeLetterForm .span-2{grid-column:auto}}
#receiptForm [hidden]{display:none!important}
#receiptForm label{min-width:0}#receiptForm input,#receiptForm select{max-width:100%}
#receiptEmployeeSearch{margin-bottom:8px}
.receipt-image-preview{display:flex;flex-direction:column;align-items:center;gap:12px;padding:14px;border:1px solid var(--line,#dce5e8);border-radius:12px}
.receipt-image-preview img{max-width:100%;max-height:260px;object-fit:contain}
#receiptForm textarea[readonly]{background:var(--pale,#edf6f1)}
@media(max-width:700px){#receiptForm{grid-template-columns:minmax(0,1fr)}#receiptForm .span-2{grid-column:auto}}
