/* Attendance keeps a compact desktop grid and comfortable touch targets. */
#main:has(.attendance-workspace){padding-top:12px}
.attendance-workspace{min-width:0;max-width:100%}
.attendance-workspace .page-heading{margin-bottom:12px}
.attendance-workspace .page-heading h1{font-size:26px}
.attendance-filter-panel{padding:12px 14px;background:#fff;border:1px solid #dce5ed;border-radius:12px;margin-bottom:12px}
.attendance-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.attendance-filters>label{display:flex;align-items:center;gap:10px;min-width:0;font-size:12px;color:#4a647d}
.attendance-workspace .access-worker-filter{margin:0;max-width:none}
.attendance-filters select,.attendance-filters .edge-select{min-width:0;flex:1}
.attendance-workspace .access-toolbar{margin:10px 0 0;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.attendance-period-options{flex:1;min-width:0}.attendance-period-options>summary{font-size:12px;cursor:pointer;padding:9px 4px;color:#4a647d}
.attendance-period-content{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.attendance-period-options[open]>summary{padding:2px 4px 7px}
.attendance-workspace .segmented .button{padding:7px 11px;min-height:34px}
.attendance-workspace .access-dates{display:flex;align-items:center;gap:6px;margin-left:auto}
.attendance-workspace .access-dates label{display:flex;align-items:center;gap:5px;font-size:11px}
.attendance-workspace .access-dates input{width:137px;min-height:34px;padding:5px 7px}
.attendance-workspace .access-dates .button{padding:7px;min-height:34px}
.attendance-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;border:1px solid #dce5ed;border-radius:10px;overflow:hidden;background:#dce5ed;margin-bottom:10px}
.attendance-kpis>div{display:flex;align-items:baseline;gap:9px;padding:10px 14px;background:#fff;min-width:0;flex-wrap:wrap}
.attendance-kpis strong{font-size:21px;line-height:1.2;font-variant-numeric:tabular-nums;color:#17394f}
.attendance-kpis span{font-size:11px;color:#4a647d}
.attendance-kpis .needs-review{background:#fff7ee}.attendance-kpis .needs-review strong{color:#99521b}
.attendance-report-actions,.attendance-report-actions>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
.attendance-report-actions{justify-content:space-between;margin-bottom:8px}
.attendance-report-actions .button{min-height:34px;padding:7px 10px}
.attendance-workspace .access-export{margin:0;gap:8px;font-size:11px}
.attendance-workspace .access-export>.text-link{padding:7px 3px}
.attendance-period-label,.attendance-filter-hint{font-size:11px;color:#4a647d}
.attendance-filter-hint{margin:4px 0 8px}
.attendance-workspace .access-period-summary{margin:10px 0;font-size:12px;color:#4a647d}
.attendance-workspace .access-period-summary>summary{cursor:pointer;padding:8px 0}
.attendance-workspace .access-period-summary .access-chart{margin:6px 0}
.attendance-workspace .shift-method{margin:8px 0;line-height:1.5}
.attendance-workspace table:not(.shift-matrix) th,.attendance-workspace table:not(.shift-matrix) td{padding:7px 10px}
.attendance-workspace .shift-matrix th,.attendance-workspace .shift-matrix td{padding:5px 7px}
.attendance-workspace .shift-matrix .shift-day-column,.attendance-workspace .shift-matrix .shift-day-cell{width:104px;min-width:104px;max-width:104px}
.attendance-workspace .shift-matrix .shift-person-column{width:154px;min-width:154px;max-width:154px}
.attendance-workspace .shift-cell-times{display:flex;gap:6px;flex-wrap:wrap}
.attendance-workspace .shift-cell-time{font-size:11px}
.attendance-workspace .shift-cell-time>span:first-child{font-size:9px}
.attendance-workspace .shift-cell-entry+.shift-cell-entry{margin-top:4px;padding-top:4px}
.attendance-workspace .shift-matrix-scroll{max-height:max(280px,calc(100dvh - 300px))}
.attendance-workspace .shift-person-column .button{min-height:28px;line-height:1.3;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;max-height:44px}
.attendance-workspace .shift-cell-issues summary{font-size:10px;line-height:1.3}
.attendance-workspace .edge-dt-toolbar{padding:7px 10px;gap:8px}
.attendance-workspace .edge-dt-search input{min-height:32px}
.attendance-export-dialog{width:min(780px,calc(100vw - 24px));max-height:calc(100dvh - 24px)}
.attendance-export-dialog .dialog-header{padding:16px 20px}.attendance-export-dialog .dialog-header h2{font-size:22px}
.attendance-export-dialog .dialog-header p{margin:4px 0 0;font-size:12px;color:#4a647d}
.attendance-export-dialog .dialog-body{padding:16px 20px;display:grid;gap:12px}
.attendance-export-dialog label{display:grid;gap:5px;font-size:12px;min-width:0}
.attendance-export-dialog input,.attendance-export-dialog select{width:100%;min-width:0}
.attendance-export-dialog [hidden]{display:none!important}
.attendance-export-help{font-size:12px;line-height:1.5;color:#4a647d;margin:0}
.attendance-export-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:10px}
.attendance-export-people{max-height:300px;overflow:auto;margin:10px 0;border:1px solid #dce5ed;border-radius:8px}
.attendance-export-person{display:grid;grid-template-columns:minmax(100px,1.2fr) repeat(3,minmax(85px,1fr));gap:8px;padding:10px;border-bottom:1px solid #e5ebf0;align-items:center}
.attendance-export-person:last-child{border-bottom:0}.attendance-export-person>strong{font-size:12px;overflow-wrap:anywhere}
.attendance-export-dialog .checkbox-label{display:flex;align-items:flex-start;gap:8px;line-height:1.5;margin-top:10px}
.attendance-export-dialog input[type=checkbox]{width:18px;min-width:18px;margin-top:1px}
@media(max-width:740px){
  #main:has(.attendance-workspace){padding-top:12px}
  .attendance-workspace .page-heading h1{font-size:23px}
  .attendance-filter-panel{padding:10px; margin-bottom:8px}
  .attendance-filters{grid-template-columns:1fr;gap:7px}
  .attendance-filters>label{display:grid;grid-template-columns:58px minmax(0,1fr);gap:6px;font-size:11px}
  .attendance-workspace .access-views{width:auto}
  .attendance-workspace .access-periods{display:flex;flex:1;overflow-x:auto;width:auto}
  .attendance-workspace .segmented .button{padding:7px 10px;min-height:44px;font-size:11px}
  .attendance-workspace .access-views{width:100%}.attendance-workspace .access-views .button{flex:1}
  .attendance-period-options{width:100%}.attendance-period-options>summary{min-height:36px}
  .attendance-workspace .access-dates{margin-left:0;width:100%;display:grid;grid-template-columns:32px minmax(0,1fr) minmax(0,1fr) 32px;gap:5px}
  .attendance-workspace .access-dates label{display:grid;gap:2px}
  .attendance-workspace .access-dates input{width:100%;min-width:0;font-size:16px;min-height:44px;padding:5px}
  .attendance-workspace .access-dates>.button{min-height:44px}.attendance-workspace .access-dates>.button:last-child{grid-column:1/-1;padding:7px;min-height:36px}
  .attendance-kpis{margin-bottom:8px}.attendance-kpis>div{padding:8px;gap:2px;flex-direction:column}
  .attendance-kpis strong{font-size:17px}.attendance-kpis span{font-size:10px}
  .attendance-report-actions{gap:6px}.attendance-report-actions>div{width:100%;justify-content:space-between}
  .attendance-workspace .access-export{justify-content:flex-start;width:100%;gap:6px}
  .attendance-workspace .access-export .button,.attendance-report-actions .button{min-height:44px}
  .attendance-period-label{margin-left:auto;font-size:10px}
  .attendance-workspace .shift-matrix .shift-person-column{width:130px;min-width:130px;max-width:130px}
  .attendance-workspace .shift-matrix-scroll{max-height:55dvh;min-height:230px}
  .attendance-workspace .shift-person-column .button{min-height:44px}
  .attendance-workspace .shift-matrix-card .edge-dt-filters{display:none}
  .attendance-export-fields{grid-template-columns:1fr 1fr}.attendance-export-fields>label:last-child{grid-column:1/-1}
  .attendance-export-person{grid-template-columns:1fr 1fr}.attendance-export-person>strong{grid-column:1/-1}
  .attendance-export-dialog .dialog-body,.attendance-export-dialog .dialog-header{padding:12px}
  .attendance-export-dialog .form-end{display:flex;gap:8px}.attendance-export-dialog .form-end>.button{flex:1;min-height:44px}
}
@media(min-width:741px){.attendance-period-options[open]>summary{display:none}}
.attendance-report-section+.attendance-report-section{margin-top:28px}
.device-usage-form{margin-bottom:20px}
.worker-sites{margin-bottom:20px}
.worker-site-list{margin:0;padding-left:20px;display:grid;gap:16px}
.worker-site-list ul{margin-top:8px;padding-left:20px;display:grid;gap:8px}
.worker-site-list small{display:block;color:var(--text-muted)}
#worker-site-dialog .dialog-body{display:grid;gap:16px}
#worker-site-dialog fieldset{border:1px solid var(--border);border-radius:10px;padding:12px}
#worker-site-extra{display:grid;gap:10px}
