/* Time controls stay inside the existing schedule and work-order workflow. */
html body .pqpTimeActions{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:8px;margin:2px 0 0}
html body .pqpTimeButton{font:600 13px/1.25 system-ui;min-height:44px;padding:8px 12px;border:1px solid #cbd0d6;border-radius:7px;background:transparent;color:#30363c;cursor:pointer;white-space:nowrap;width:auto}
html body .pqpTimeButton.primary{background:#282c30;color:white;border-color:#282c30}
html body .pqpTimeButton:disabled{opacity:.5;cursor:wait}
html body .pqpTimeLink{font:400 12px/1.4 system-ui;border:0;background:transparent;color:#646c76;padding:6px 0;min-height:44px;text-decoration:underline;width:auto;cursor:pointer}
html body .pqpTimeElapsed{font:500 13px/1.4 system-ui;color:#646c76;margin-right:8px;font-variant-numeric:tabular-nums}
html body .pqpTimeNotice{font-size:13px;color:#646c76;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
html body .pqpTimeDialog{box-sizing:border-box;width:min(560px,calc(100% - 24px));max-height:88dvh;border:1px solid #cbd0d6;border-radius:10px;padding:0;color:#25292d;background:#fff;overflow:auto}
html body .pqpTimeDialog::backdrop{background:#0007}
html body .pqpTimeDialog header{position:sticky;top:0;z-index:1;background:white;display:flex;justify-content:space-between;align-items:center;padding:14px 18px;border-bottom:1px solid #dce0e4}
html body .pqpTimeDialog h2{font-size:20px;margin:0}
html body .pqpTimeDialog main{padding:16px 18px}
html body .pqpTimeDialog p{font-size:14px;line-height:1.45;overflow-wrap:anywhere}
html body .pqpTimeDialog details{border-top:1px solid #dce0e4;padding:12px 0}
html body .pqpTimeDialog summary{cursor:pointer;font-weight:600;min-height:32px}
html body .pqpTimeDialog label{display:block;font-size:13px;color:#646c76;margin:12px 0}
html body .pqpTimeDialog input,html body .pqpTimeDialog select,html body .pqpTimeDialog textarea{box-sizing:border-box;display:block;width:100%;min-width:0;font:16px system-ui;padding:10px;border:1px solid #cbd0d6;border-radius:6px;background:white;color:#25292d;margin-top:5px}
html body .pqpTimeEntry{display:flex;justify-content:space-between;align-items:center;gap:12px;border-top:1px solid #e0e3e7;padding:10px 0}
html body .pqpTimeEntry small{display:block;color:#737a84;font-size:12px;line-height:1.45}
html body .pqpTimeToolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:8px 0}
html body .pqpTimeError{color:#954e4e;font-size:13px;white-space:pre-wrap}
html body .pqpTimeWorkOrder{margin:14px 0;border-top:1px solid #dce0e4;padding-top:12px}
html body .pqpTimeWorkOrder summary{font-weight:600;cursor:pointer}
@media print{.pqpTimeWorkOrder,.pqpTimeActions{display:none!important}}
/* Approved Schedule mockup: details left, compact clock column right. */
html body #dashboardPage .dashboardAgenda{border:1px solid #d6d9de;border-radius:9px;background:#fff;padding:16px;box-shadow:none}
html body .dashboardAgenda .homePanelHead{margin-bottom:12px}
html body .dashboardAgendaTabs{display:flex;gap:0;padding:3px;background:#f0f1f3;border-radius:7px;margin:0 0 14px}
html body .dashboardAgendaTabs button{flex:1;min-width:0;min-height:40px;border:0;border-radius:5px;padding:8px;font-size:14px;font-weight:500;background:transparent;color:#60666c}
html body .dashboardAgendaTabs button[aria-pressed="true"]{background:#fff;color:#25292d;box-shadow:0 1px 4px #00000012;font-weight:650}
html body .dashboardAgendaDate{font-size:14px;color:#7b8189;margin:0 0 12px;line-height:1.4}
html body .dashboardAgendaRow{grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:14px 0}
html body .agendaJobDetails{min-width:0;grid-column:1}
html body .dashboardAgendaBooking{display:block;min-height:0;padding:0;margin:0 0 3px;width:100%;line-height:1.4}
html body .dashboardAgendaBooking strong{font-size:15px;font-weight:650}
html body .dashboardAgendaAddress,html body .dashboardAgendaMeta,html body .agendaClockStarted{display:block;font-size:13px;color:#7b8189;line-height:1.5}
html body .agendaClockStarted[hidden]{display:none}
html body .agendaWorkOrder{display:block;background:none;border:0;border-radius:0;color:#737a84;font:400 13px/1.5 system-ui;text-decoration:underline;text-align:left;padding:5px 0;min-height:32px;width:auto;cursor:pointer}
html body .dashboardAgendaRow .pqpTimeActions{grid-column:2;grid-row:1;display:block;margin:0;text-align:right}
html body .dashboardAgendaRow .pqpTimeActions>span{display:flex;flex-direction:column;align-items:flex-end;gap:5px}
html body .dashboardAgendaRow .pqpTimeButton{min-width:88px;min-height:40px;font-size:13px;padding:8px 11px}
html body .dashboardAgendaRow .pqpTimeButton:not(:disabled){background:#282c30;color:#fff;border-color:#282c30}
html body .dashboardAgendaRow~.dashboardAgendaRow .pqpTimeButton:not(.primary){background:transparent;color:#30363c;border-color:#aeb5be}
html body .pqpTimeElapsed{border:0;background:none;padding:0;margin:0;color:#646c76;font:600 13px/1.4 system-ui;cursor:pointer;width:auto}
html body .agendaViewCalendar{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;background:none;color:#454b52;border:0;border-top:1px solid #e0e4e8;padding:14px 0 0;min-height:48px;font:400 15px system-ui;text-align:left;cursor:pointer}
html body .agendaViewCalendar span{font-size:24px;color:#7b8189;line-height:1}
html body #pqpTimeRunning:empty{display:none}
html body #dashboardPage .dashboardAgenda{border-radius:9px!important;box-shadow:none!important}
html body #dashboardPage .dashboardAgendaTabs{border-radius:7px!important}
html body #dashboardPage .dashboardAgendaTabs button{border-radius:5px!important}
html body #dashboardPage .dashboardAgendaRow .pqpTimeButton{border-radius:7px!important;min-height:44px}
/* Schedule owns time management; unboxed icons replace navigation text links. */
html body .dashboardAgenda .homePanelHead{display:flex;justify-content:space-between;align-items:center;flex-wrap:nowrap}
html body .agendaJobTools{display:flex;align-items:center;gap:4px;margin-top:3px}
html body #dashboardPage .agendaIconButton{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;min-width:44px;height:44px;min-height:44px;margin:0;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;color:#646c76;text-decoration:none;cursor:pointer}
html body .agendaIconButton svg{display:block;pointer-events:none}
/* Compact owner time editor; override the app's global dialog/control resets. */
html body dialog.pqpTimeDialog{border-radius:10px!important;padding:0!important}
html body dialog.pqpTimeDialog header{padding:12px 16px!important}
html body dialog.pqpTimeDialog main{padding:12px 16px!important}
html body dialog.pqpTimeDialog h2{font-size:20px!important;line-height:1.3!important}
html body dialog.pqpTimeDialog .pqpTimeButton{border-radius:7px!important;padding:8px 12px!important;min-height:44px;font:600 13px/1.25 system-ui!important;width:auto!important}
html body dialog.pqpTimeDialog input,html body dialog.pqpTimeDialog select,html body dialog.pqpTimeDialog textarea{border-radius:7px!important;min-height:44px;padding:10px!important}
html body dialog.pqpTimeDialog details{margin:0!important;padding:0!important;border:0!important;border-top:1px solid #dce0e4!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
html body dialog.pqpTimeDialog summary{font:600 14px/1.4 system-ui!important;min-height:44px;box-sizing:border-box;padding:12px 0!important;margin:0!important;background:transparent!important;color:#30363c}
html body dialog.pqpTimeDialog p{margin:8px 0 12px;font-size:14px!important}
html body dialog.pqpTimeDialog .pqpTimeEntry{padding:10px 0!important;margin:0!important}
html body dialog.pqpTimeDialog .pqpTimeEntry strong{font-size:14px;line-height:1.4}
html body dialog.pqpTimeDialog .pqpTimeEntry>div{min-width:0;overflow-wrap:anywhere}
html body dialog.pqpTimeDialog .pqpTimeEntry button{flex-shrink:0}
html body dialog.pqpTimeDialog .pqpTimeHistory details{margin-left:8px!important}
html body dialog.pqpTimeDialog .pqpTimeHistory summary{font-weight:500!important;color:#646c76}
html body dialog.pqpTimeDialog .pqpTimeHistoryItem{padding:10px 0;border-top:1px solid #eef0f2}
html body dialog.pqpTimeDialog .pqpTimeHistoryItem strong{font-size:13px}
html body dialog.pqpTimeDialog .pqpTimeHistoryItem small{display:block;font-size:12px;color:#737a84}
html body dialog.pqpTimeDialog .pqpTimeHistoryItem p{font-size:12px!important;line-height:1.5;margin:6px 0}
/* Dedicated Time Clock card, matching the approved compact mockup. */
html body #dashboardPage .dashboardAgenda[hidden]{display:none!important}
html body #dashboardAgendaList label{display:block;font-size:13px;color:#737a84;margin:8px 0 10px}
html body #dashboardAgendaList select{display:block;box-sizing:border-box;width:100%;min-width:0;min-height:44px;margin-top:5px;padding:10px 12px!important;border:1px solid #cbd0d6!important;border-radius:7px!important;background:#fff;color:#30363c;font:16px system-ui}
html body #dashboardAgendaList p{font-size:15px;line-height:1.4;margin:8px 0}
html body #dashboardAgendaList .pqpClockTotal{display:block;font-size:28px;font-weight:650;line-height:1.25;margin:8px 0 3px;font-variant-numeric:tabular-nums}
html body #dashboardAgendaList .pqpClockStarted{font-size:13px;color:#737a84;margin:0 0 12px}
html body #dashboardAgendaList .pqpClockManage{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:44px;padding:12px 0 0!important;border:0!important;border-top:1px solid #dce0e4!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:#454b52;font:400 15px system-ui;text-align:left;cursor:pointer}
html body #dashboardAgendaList .pqpClockManage span{font-size:24px;line-height:1;color:#7b8189}
html body dialog.pqpTimeDialog .pqpTimeTotals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:16px 0}
html body dialog.pqpTimeDialog .pqpTimeTotals small{display:block;font-size:12px;color:#737a84}
html body dialog.pqpTimeDialog .pqpTimeTotals strong{display:block;font-size:18px;margin-top:4px}
html body dialog.pqpTimeDialog .pqpTimeDay{display:flex;justify-content:space-between;gap:12px;font-size:13px;margin-top:18px;padding-bottom:8px;color:#646c76}
/* Crew controls: one compact row, unboxed actions. */
html body dialog.pqpTimeDialog .pqpCrewRow{display:flex;align-items:center;gap:4px;border-top:1px solid #e0e3e7;padding:4px 0;margin:0}
html body dialog.pqpTimeDialog .pqpCrewName,html body dialog.pqpTimeDialog .pqpCrewIcon{border:0!important;background:transparent!important;box-shadow:none!important;min-height:44px;margin:0!important;padding:0!important;color:#646c76;cursor:pointer}
html body dialog.pqpTimeDialog .pqpCrewName{flex:1;min-width:0;width:auto!important;text-align:left;font:500 15px/1.4 system-ui;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#30363c}
html body dialog.pqpTimeDialog .pqpCrewIcon{flex:0 0 44px;width:44px!important;display:inline-flex;align-items:center;justify-content:center}
html body dialog.pqpTimeDialog .pqpCrewDelete{color:#954e4e}
html body dialog.pqpTimeDialog .pqpCrewIcon svg{pointer-events:none}


html body dialog.pqpTimeDialog .pqpTimeEmployee{border-top:1px solid #e0e3e7;margin-top:12px;padding:0}
html body dialog.pqpTimeDialog .pqpTimeEmployee>summary{cursor:pointer;min-height:48px;display:flex;align-items:center;gap:12px;padding:8px 0;list-style:none}
html body dialog.pqpTimeDialog .pqpTimeEmployee>summary::-webkit-details-marker{display:none}
html body dialog.pqpTimeDialog .pqpTimeEmployee>summary strong{flex:1;min-width:0;overflow-wrap:anywhere}
html body dialog.pqpTimeDialog .pqpTimeEmployee>summary span{font-size:14px;color:#646c76}
html body dialog.pqpTimeDialog .pqpTimeEmployee>summary::after{content:"";display:block;box-sizing:border-box;flex-shrink:0;width:8px;height:8px;margin:0 12px;border-right:2px solid #60666c;border-bottom:2px solid #60666c;transform:rotate(225deg)}
html body dialog.pqpTimeDialog .pqpTimeEmployee[open]>summary::after{width:12px;height:12px;margin:0 10px;transform:rotate(45deg)}

/* Owner corrections stay reachable from the Dashboard's time clock card. */
html body #dashboardAgendaList #pqpClockManage{display:block;width:100%!important;min-height:44px;margin:0 0 14px;padding:10px!important;border-radius:7px!important;background:transparent!important;color:#30363c!important;border:1px solid #cbd0d6!important;font:600 14px system-ui}

html body dialog.pqpTimeDialog .pqpTimeLocation>label{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:44px}
html body dialog.pqpTimeDialog .pqpTimeLocation input[type=checkbox]{width:22px!important;height:22px!important;min-height:22px!important;flex:0 0 22px;accent-color:#30363c}
html body dialog.pqpTimeDialog .pqpTimeLocation p{font-size:14px;color:#646c76;line-height:1.5}
html body dialog.pqpTimeDialog .pqpTimeLocation a{display:inline-block;padding:12px 0;color:#30363c}

/* Job-site settings use the same quiet, compact controls as the time editor. */
html body dialog.pqpTimeDialog .pqpTimeLocation>label{min-height:36px;margin:2px 0!important;font-size:13px;color:#60666c}
html body dialog.pqpTimeDialog .pqpTimeLocation input[type=checkbox]{width:18px!important;height:18px!important;min-height:18px!important;flex-basis:18px;margin:0!important;padding:0!important}
html body dialog.pqpTimeDialog .pqpTimeLocation p{font-size:12px!important;line-height:1.4;margin:2px 0 8px!important}
html body dialog.pqpTimeDialog .pqpLocationActions{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
html body dialog.pqpTimeDialog .pqpLocationActions .pqpTimeButton{border:0!important;background:transparent!important;box-shadow:none!important;color:#60666c!important;padding:0!important;font-weight:500!important;min-height:44px}
html body dialog.pqpTimeDialog .pqpTimeLocation a.pqpLocationMap{font:500 13px/1.4 system-ui;color:#60666c;min-height:44px;box-sizing:border-box;display:inline-flex;align-items:center;padding:0!important}
html body dialog.pqpTimeDialog .pqpLocationFooter{display:flex;justify-content:flex-end;margin:0 0 10px}
html body dialog.pqpTimeDialog .pqpLocationSave{background:#eef0f2!important;color:#60666c!important;border:1px solid #cfd3d7!important;box-shadow:none!important;font-weight:500!important;min-width:64px;min-height:40px!important;padding:8px 12px!important}
html body dialog.pqpTimeDialog .pqpLocationStatus:empty{display:none}

html body dialog.pqpTimeDialog .pqpHoursBottomActions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:8px 0 12px}
html body dialog.pqpTimeDialog .pqpHoursBottomActions .pqpTimeButton{min-height:44px!important;margin:0!important}
html body dialog.pqpTimeDialog .pqpHoursBottomActions [hidden]{display:none!important}
html body dialog.pqpTimeDialog .pqpTimeLocation .pqpLocationState{font-weight:500;color:#454b52;margin-top:8px!important}
html body dialog.pqpTimeDialog .pqpLocationActions .pqpLocationLocate{border:1px solid #cfd3d7!important;border-radius:7px!important;background:#eef0f2!important;padding:8px 10px!important}
html body dialog.pqpTimeDialog .pqpLocationActions{gap:10px;margin:8px 0}

/* Separate adjacent job-clock sharing actions on touch screens. */
html body #pqpTimeShare main>.pqpTimeButton{margin-top:4px!important;margin-right:12px!important;margin-bottom:8px!important}
html body #pqpTimeShare main>.pqpTimeButton:last-child{margin-right:0!important}

/* Respect conditional fields and keep crew actions clear of row dividers. */
html body dialog.pqpTimeDialog [hidden]{display:none!important}
html body dialog.pqpTimeDialog .pqpCrewList{margin-top:12px}
html body dialog.pqpTimeDialog input[type=datetime-local]{max-width:100%;min-width:0;box-sizing:border-box}
html body dialog.pqpTimeDialog input[type=datetime-local]::-webkit-date-and-time-value{min-width:0;text-align:left}

/* Match the crew clock's soft, full-width primary action. */
html body #dashboardAgendaList #pqpClockPunch,
html body dialog.pqpTimeDialog .pqpHoursPunch{display:flex;align-items:center;justify-content:center;gap:10px;width:100%!important;box-sizing:border-box;min-height:44px!important;padding:10px!important;margin:10px 0 14px!important;background:#d9dde1!important;color:#30363c!important;border:1px solid #cbd0d6!important;border-radius:7px!important;font:600 14px system-ui!important}
html body #dashboardAgendaList #pqpClockPunch svg,
html body dialog.pqpTimeDialog .pqpHoursPunch svg{width:20px;height:20px;flex:none;pointer-events:none}

html body #pqpLunchSettings[hidden]{display:none!important}
html body #pqpLunchSettings{margin-bottom:16px}
html body #pqpLunchSettings summary{cursor:pointer;font-weight:600;padding:8px 0}
html body .pqpLunchForm label{display:block;font-size:14px;color:#646c76;margin:12px 0}
html body .pqpLunchForm input,html body .pqpLunchForm select{box-sizing:border-box;display:block;width:100%;min-width:0;font:16px system-ui;padding:10px;border:1px solid #cbd0d6;border-radius:7px;background:white;color:#25292d;margin-top:5px}
html body .pqpLunchForm label:has(input[type=checkbox]){display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px}
html body .pqpLunchForm input[type=checkbox]{width:18px;height:18px;min-height:18px;margin:0;padding:0;accent-color:#30363c}

html body .pqpLunchForm input:not([type=checkbox]),html body .pqpLunchForm select{min-height:44px}
html body .pqpLunchForm .pqpTimeButton{min-height:44px;padding:10px 14px;border:1px solid #cbd0d6!important;border-radius:7px!important;background:#eef0f2!important;color:#30363c!important;font:600 14px system-ui;width:auto}
