/* v293 · Selección cercana al guardado y resultados en orden de cálculo. */
html body .employee-floating-heading{display:flex!important;flex-wrap:wrap;align-items:center;gap:12px}
html body .employee-floating-heading .employee-floating-identity{flex:1 1 250px;min-width:0}
html body .employee-record-controls{display:flex;flex:0 1 auto;align-items:flex-end;justify-content:flex-end;gap:10px;min-width:0;max-width:100%;margin-left:auto}
html body .employee-period-control{display:grid;gap:5px;min-width:0;width:clamp(210px,26vw,330px);max-width:100%}
html body .employee-period-control label{margin:0;font-size:12px;line-height:1.35;font-weight:700;color:#355c70}
html body .employee-period-control #period{width:100%!important;min-width:0!important;max-width:100%!important;margin:0!important;height:42px;font-size:14px;box-sizing:border-box}
html body .employee-record-controls #saveEmp{flex:0 0 auto;margin:0!important;min-height:42px}
html body .employee-floating-heading #closeEmployeeDetails{margin:0;align-self:center}
html body .employee-quick-summary{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;align-items:stretch}
html body .employee-quick-summary>div{min-width:0;padding:13px 14px;border-radius:9px!important;display:flex;flex-direction:column;justify-content:center;gap:5px;overflow-wrap:anywhere}
html body .employee-quick-summary small{font-size:12px;line-height:1.45;margin:0}
html body .employee-quick-summary b{font-variant-numeric:tabular-nums;line-height:1.4}
html body .employee-quick-summary .employee-quick-total{background:#d9f2e9!important;border:1px solid #8fcbb8!important;color:#174f43!important}
html body .employee-quick-summary .employee-quick-total :is(small,b){color:#174f43!important;-webkit-text-fill-color:#174f43!important;opacity:1!important}
html body .employee-quick-summary .employee-quick-total>b{font-size:22px}
html body .payroll-total-grid .payroll-total-card{order:0}
html body .payroll-total-grid .payroll-total-deductions{order:1;grid-column:1/-1!important}
html body .payroll-total-grid .payroll-total-grand{order:2;grid-column:1/-1!important;min-height:120px!important;background:#0b5471!important;border-color:#0b5471!important}
html[data-theme="dark"] body .employee-period-control label{color:#d4e8f2}
html[data-theme="dark"] body .employee-period-control #period{background:#203944!important;color:#f2f8fc!important;border-color:#789dad!important;color-scheme:dark}
html[data-theme="dark"] body .payroll-total-grid .payroll-total-grand{background:#a1dffd!important;border-color:#c6ecff!important;color:#123f55!important}
html[data-theme="dark"] body .payroll-total-grid .payroll-total-grand :is(small,strong,span){color:#123f55!important;-webkit-text-fill-color:#123f55!important;opacity:1!important}
@media(max-width:1000px){
  html body .employee-floating-heading .employee-floating-identity{flex-basis:calc(100% - 58px);order:0}
  html body .employee-floating-heading #closeEmployeeDetails{order:1}
  html body .employee-record-controls{order:2;flex:1 1 100%;margin-left:0;justify-content:stretch}
  html body .employee-period-control{flex:1 1 auto;width:auto}
}
@media(max-width:600px){
  html body .employee-record-controls{display:grid;grid-template-columns:minmax(0,1fr);gap:9px}
  html body .employee-period-control{width:100%}
  html body .employee-period-control #period{height:44px;font-size:16px}
  html body .employee-record-controls #saveEmp{width:100%;min-height:42px}
  html body .employee-quick-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  html body .employee-quick-summary>div{padding:11px 10px}
  html body .employee-quick-summary .employee-quick-total{grid-column:1/-1}
}
@media(max-width:350px){html body .employee-quick-summary{grid-template-columns:minmax(0,1fr)!important}}

/* Calendario independiente de los registros de asistencia. */
#payrollCalendarDialog{z-index:30000!important;padding:16px!important;align-items:center;justify-content:center}
html body .payroll-calendar-dialog{width:min(600px,100%)!important;max-height:calc(100dvh - 32px);overflow-y:auto;margin:auto;display:grid;gap:14px;box-sizing:border-box}
.payroll-calendar-dialog h2,.payroll-calendar-dialog p{margin:0;line-height:1.5}
.payroll-calendar-dialog fieldset{border:1px solid #b8d0df;border-radius:8px;padding:12px;min-width:0}
.payroll-weekdays{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}
.payroll-weekdays label{display:grid;justify-items:center;gap:6px;padding:7px 3px;font-size:13px}
.payroll-calendar-dialog :is(input,textarea){width:100%;min-width:0;max-width:100%;box-sizing:border-box;font-size:16px}
.payroll-calendar-dialog input[type=checkbox]{width:18px;height:18px}
.payroll-calendar-dialog .dialog-actions{position:static;margin:0;padding:8px 0 0;gap:10px;display:flex;flex-wrap:wrap}
#sundayRateInput{width:100%;min-width:0;box-sizing:border-box;padding:10px 12px;font:600 16px/1.5 system-ui;resize:none;min-height:70px;border:1px solid #b8d0df;border-radius:7px;background:#f5fafc;color:#17384b}
#employeeQuickSundayRate,#sundayRatePay{white-space:pre-line;overflow-wrap:anywhere;line-height:1.5}
html[data-theme=dark] #sundayRateInput{background:#203944;color:#edf8ff;border-color:#6e99af}
html[data-theme=dark] .payroll-calendar-dialog{background:#172e39;color:#edf8ff}
html[data-theme=dark] .payroll-calendar-dialog :is(p,small,legend,label){color:#d3e6f0}
html body .employee-quick-summary .employee-quick-total{grid-column:1/-1}
@media(max-width:420px){.payroll-weekdays{grid-template-columns:repeat(4,minmax(0,1fr))}.payroll-calendar-dialog .dialog-actions>button{flex:1 1 130px}}
