/* HENDAR UALL-AD — consolidated functional corrections.
   Deliberately excludes the executive dashboard visual system. */

/* Arabic text must wrap only at valid word boundaries.  Dense data tables
   become horizontally scrollable instead of compressing headings letter by
   letter. */
#appShell .view:not(#dashboardView) :is(h1,h2,h3,h4,h5,h6,p,span,small,strong,label,button,a,th,td,dt,dd),
#modalBackdrop :is(h1,h2,h3,h4,h5,h6,p,span,small,strong,label,button,a,th,td,dt,dd){
  word-break:normal!important;
  overflow-wrap:normal!important;
  hyphens:none!important;
  text-orientation:mixed!important;
}
#appShell .view:not(#dashboardView) :is(.table-card,.table-scroll,.data-table-wrap,.reports-table-wrap,.hr-suite-table-wrap,.document-table,.hr-unified-table),
#modalBackdrop :is(.table-card,.table-scroll,.data-table-wrap,.reports-table-wrap,.hr-suite-table-wrap,.document-table,.hr-unified-table),
.company-finance-scroll-viewport{
  max-width:100%!important;
  overflow-x:auto!important;
  overscroll-behavior-inline:contain;
  touch-action:pan-x pan-y!important;
  -webkit-overflow-scrolling:touch;
}
#appShell .view:not(#dashboardView) :is(.table-card,.table-scroll,.data-table-wrap,.reports-table-wrap,.hr-suite-table-wrap,.document-table,.hr-unified-table)>table,
#modalBackdrop :is(.table-card,.table-scroll,.data-table-wrap,.reports-table-wrap,.hr-suite-table-wrap,.document-table,.hr-unified-table)>table{
  width:100%;
  min-width:760px;
  table-layout:auto!important;
}
#appShell .view:not(#dashboardView) table :is(th,td),#modalBackdrop table :is(th,td){
  min-inline-size:82px;
  writing-mode:horizontal-tb!important;
  white-space:normal;
}
#appShell .view:not(#dashboardView) table :is(th,td):has(input[type="checkbox"]),#modalBackdrop table :is(th,td):has(input[type="checkbox"]){min-inline-size:42px}
#companyFinanceTable table{min-width:1220px!important}
#companyFinanceTable th{min-inline-size:92px}
#companyFinanceTable th:nth-child(5){min-inline-size:240px}
#companyFinanceTable td small{display:block;line-height:1.55}

/* Native file controls stay inside ordinary form fields.  Special designed
   drop zones keep their own invisible activation layer from UALL-AC. */
label>input[type="file"]:not(#edieFiles){display:block;max-width:100%;min-width:0;width:100%;box-sizing:border-box;overflow:hidden}

/* Transparent payroll arithmetic: the employee can be checked for 28, 29,
   30 or 31-day months without changing the full-month salary rule. */
.employee-payroll-calculation{display:grid;gap:9px;margin-top:11px;padding:11px 12px;border:1px solid #c9dde4;border-radius:11px;background:#f1f8fa;color:#173a53}
.employee-payroll-calculation header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.employee-payroll-calculation header strong{color:#0a4962;font-size:.78rem}
.employee-payroll-calculation header span{color:#527081;font-size:.72rem;text-align:end}
.employee-payroll-calculation>div{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.employee-payroll-calculation>div span{padding:7px 8px;border-radius:8px;background:#fff;color:#6c808d;font-size:.67rem}
.employee-payroll-calculation>div b{display:block;margin-top:2px;color:#123b55;font-size:.84rem}
.employee-payroll-calculation ul{margin:0;padding-inline-start:19px;color:#526c7d;font-size:.69rem;line-height:1.7}

/* HENDAR-native confirmation for genuinely unsaved payroll input. */
.employee-payroll-discard-prompt{position:fixed;z-index:9999;inset:0;display:grid;place-items:center;padding:18px;background:rgba(5,22,37,.64);backdrop-filter:blur(4px)}
.employee-payroll-discard-prompt>div{width:min(480px,100%);padding:20px;border:1px solid #d4dfe6;border-radius:18px;background:#fff;box-shadow:0 28px 90px rgba(4,22,38,.35);color:#15364e}
.employee-payroll-discard-prompt h3{margin:5px 0 7px;color:#0a2f52;font-size:1.1rem}
.employee-payroll-discard-prompt p{margin:0;color:#627786;font-size:.79rem;line-height:1.8}
.employee-payroll-discard-prompt footer{display:flex;justify-content:flex-end;gap:8px;margin-top:17px}

@media(max-width:620px){
  .employee-payroll-calculation header{display:grid}
  .employee-payroll-calculation header span{text-align:start}
  .employee-payroll-calculation>div{grid-template-columns:repeat(2,minmax(0,1fr))}
  .employee-payroll-discard-prompt footer{display:grid;grid-template-columns:1fr}
}
@media print{
  #appShell .view:not(#dashboardView) :is(.table-card,.table-scroll,.data-table-wrap,.reports-table-wrap,.hr-suite-table-wrap,.document-table,.hr-unified-table),.company-finance-scroll-viewport{overflow:visible!important}
  .employee-payroll-discard-prompt{display:none!important}
}
