/* Explicit owner controls only: staff navigation and transactional actions are preserved. */
html {scrollbar-gutter:stable}
/* Auto margins previously centred short pages vertically and moved the header. */
body.v52-app .main {margin:0 auto;align-self:stretch;min-height:100dvh;display:flex;flex-direction:column}
body.v52-app #content {flex:1 0 auto}
body.v52-app #content.rh-page-loading {min-height:max(350px,var(--rh-loading-height,350px))}
body.v52-app .rf5723-job-pane {min-height:420px}
/* Notifications do not take up page space or change the user's scroll position. */
body #notice {position:fixed;top:20px;left:50%;right:auto;transform:translateX(-50%);z-index:800;width:min(440px,calc(100vw - 40px));pointer-events:none}
body #notice:empty {display:none}
body #notice .notice {display:flex;align-items:flex-start;gap:12px;margin:0;padding:16px;border-radius:12px;box-shadow:0 8px 28px #0003;pointer-events:auto}
body #notice .notice>span {flex:1;min-width:0;font-size:14px;line-height:1.6}
body #notice .rh-notice-close {flex:0 0 32px;width:32px;min-height:32px;padding:0;border:1px solid currentColor;border-radius:8px;background:transparent;color:inherit;font-size:22px;line-height:1;cursor:pointer}
body.rh-simple-owner .top-actions .v51-help-icon {display:none!important}
body.rh-simple-owner .topbar .top-actions {gap:8px}
body.rh-simple-owner .rh-tools-button {margin-top:22px;border-top:1px solid var(--rh-control-border);border-radius:0;padding-top:20px}
body.rh-simple-owner #rh-sidebar-updates {margin-top:auto;padding-top:20px}
body.rh-simple-owner .sidebar .aside-foot {margin-top:12px}
.rh-page-trail {display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:0 0 20px;color:var(--rf-muted)}
.rh-tool-directory>p {margin:0 0 16px}
.rh-tool-directory>label {display:block}
.rh-tool-directory input {width:100%;margin-top:8px}
.rh-tool-directory #rh-tool-count:empty {display:none}
.rh-tool-group {border-bottom:1px solid var(--rh-control-border)}
body.v52-app .rh-tool-group>summary {padding:16px 12px;min-height:48px;cursor:pointer;color:var(--rf-text);font-weight:700}
.rh-tool-list {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:8px 0 16px}
body.v52-app .rh-tool-result {display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:5px;min-height:76px;width:100%;padding:12px 16px;border:1px solid var(--rh-control-border);border-radius:10px;background:var(--rf-surface-raised);color:var(--rf-text);text-align:left;white-space:normal}
.rh-tool-result span {font-size:13px;color:var(--rf-muted);font-weight:400;line-height:1.5}
.rh-tool-result:focus-visible,.rh-tool-group>summary:focus-visible {outline:3px solid var(--rh-focus);outline-offset:2px}
.rh-tool-footer {border-top:1px solid var(--rh-control-border);padding-top:16px;margin-top:16px}
body.v52-app .rh-today-filter {display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:14px;color:var(--rf-text)}
body.v52-app .rh-today-filter select {width:auto;min-width:200px;max-width:100%;min-height:44px}
.rh-email-organise {border-top:1px solid var(--rh-control-border);margin-top:16px;padding-top:16px}
.rh-email-organise .help {margin:0 0 12px}
.rh-email-attachments {list-style:none;padding:0;margin:12px 0}
.rh-email-attachments li {display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 0;border-top:1px solid var(--rh-control-border)}
.rh-email-attachments li>div:first-child {min-width:0;overflow-wrap:anywhere}
.rh-email-attachments small {display:block;color:var(--rf-muted);margin-top:4px}
.rh-email-attachments .actions {margin:0;flex-shrink:0}
/* Restore inset spacing after the shared disclosure styles. */
body.v52-app :is(.rf5723-today-attendance,.rf5723-today-snapshot,.v570-workspaces,.v571-cost-register,.v551-panel,.rf5728-ai,.compact-section)>summary {padding:16px 20px;min-height:52px;font-size:14px;line-height:1.5}
body.v52-app .rf5723-today-attendance>summary span {font-size:13px;margin-top:4px}
body.v52-app .rf5723-today-attendance>div {padding:0 20px 20px}
body.v52-app #rf5723-snapshot-body {padding:0 20px 20px}
body.v52-app .rf5723-today-snapshot>summary small {font-size:13px}
body.v52-app .rf5723-job-fold>summary {padding:16px 20px;gap:16px}
body.v52-app .rf5723-job-fold>summary small {font-size:13px;line-height:1.5}
body.v52-app .rf5723-job-inner-fold>summary {padding:12px 16px}
body.v52-app #rf5723-materials .rf5723-material-content {padding:0 20px 20px}
body.v52-app .v573-order-row pre {font-size:14px;line-height:1.6;max-height:180px}
body.v52-app .v573-order-row strong {font-size:14px}
body.v52-app .v573-order-row small {font-size:13px;line-height:1.5;color:var(--rf-muted);opacity:1}
body.v52-app .v573-order-row :is(.v574-auto-source,.v573-actual) {color:var(--rf-positive)}
body.v52-app .v573-order-row :is(.v574-alert,.v573-cost-needed) {color:var(--rf-warning)}
body.v52-app .v573-order-date,body.v52-app .v573-order-head small,body.v52-app .v573-order-help {font-size:12px;line-height:1.5}
body.v52-app .v573-order-tabs button {min-height:44px;padding:8px 14px}
body.v52-app .v573-orders-panel .v573-order-tabs button.selected {background:var(--rh-button);color:var(--rh-button-text);border-color:var(--rh-button)}
body.v52-app .v573-counter {background:var(--rf-surface-raised);color:var(--rf-text);border:1px solid var(--rh-control-border);font-size:12px;padding:2px 8px}
/* Compact planned-job cards divide the full row evenly, up to five on a laptop. */
body.v52-app .rh-planned-list {padding:16px}
.rh-planned-grid {display:grid;grid-template-columns:repeat(var(--rh-planned-columns,3),minmax(0,1fr));gap:12px;align-items:stretch}
.rh-planned-job {display:flex;flex-direction:column;width:100%;max-width:100%;min-width:0;box-sizing:border-box;padding:14px;border:1px solid var(--rh-control-border);border-radius:10px;background:var(--rf-surface-raised);color:var(--rf-text);font-size:14px;line-height:1.5;gap:12px}
.rh-planned-site {display:grid;gap:3px;min-width:0;overflow-wrap:anywhere}
.rh-planned-site>span {color:var(--rf-muted);font-size:13px;line-height:1.45}
.rh-planned-crew {display:grid;gap:6px;min-width:0}
.rh-planned-worker>span {display:flex;gap:8px;justify-content:space-between;align-items:baseline;flex-wrap:wrap}
.rh-planned-worker strong {min-width:0;overflow-wrap:anywhere;font-size:13px}
.rh-planned-shift {display:inline-flex;gap:6px;align-items:center;max-width:100%;flex-wrap:wrap}
body.v52-app .rh-planned-grid .rh-planned-worker .button {min-height:30px;padding:5px 6px;font-size:12px;line-height:1.3;flex:none}
body.v52-app .rh-planned-grid:is([data-columns="4"],[data-columns="5"]) .rh-planned-worker .button {min-width:0}
.rh-planned-shift .rh-planned-time {font-size:12px}
.rh-planned-time {font-variant-numeric:tabular-nums;white-space:nowrap;font-size:13px}
.rh-planned-status,.rh-planned-warning {display:block;font-size:12px;line-height:1.5;color:var(--rf-warning);overflow-wrap:anywhere}
.rh-planned-actions {display:flex;gap:8px;align-items:center;margin-top:auto;padding-top:2px;flex-wrap:wrap}
body.v52-app .rh-planned-grid .rh-planned-job .rh-planned-actions>.button {min-width:0;flex:1 1 50px}
body.v52-app .rh-planned-actions>.button,body.v52-app .rh-planned-actions details.rf-row-more>summary {min-height:36px;font-size:13px;padding:7px 11px}
.rh-planned-notes {border-top:1px solid var(--rh-control-border);margin-top:14px}
body.v52-app .rh-planned-notes>summary {padding:12px 0;font-size:13px}
@media(max-width:1200px){
 .rh-planned-grid:is([data-columns="4"],[data-columns="5"]) {grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:960px){
 .rh-planned-grid:not([data-columns="1"]) {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
 body.v52-app .rh-planned-grid {grid-template-columns:1fr}
}
@media(max-width:600px){
  .rh-tool-list {grid-template-columns:1fr}
  .rh-email-attachments li {align-items:stretch;flex-direction:column}
  .rh-page-trail {gap:10px}
  body.v52-app .rh-today-filter {align-items:stretch;flex-direction:column;gap:6px}
  body.v52-app .rh-today-filter select {width:100%}
  body.v52-app .rf5723-job-fold>summary {padding:16px}
  body.v52-app :is(.rf5723-today-attendance,.rf5723-today-snapshot,.v570-workspaces,.v571-cost-register,.v551-panel,.rf5728-ai,.compact-section)>summary {padding:16px}
  body.v52-app .rf5723-today-attendance>div,body.v52-app #rf5723-snapshot-body {padding:0 16px 16px}
  body.v52-app #rf5723-materials .rf5723-material-content {padding:0 16px 16px}
  body.v52-app .v573-order-head {align-items:stretch;flex-direction:column;gap:12px;padding:16px}
  body.v52-app .v573-order-head .button {width:100%}
}

/* Reschedule one or several bookings in a single reviewed change. */
.rh-reschedule-bulk {display:flex;align-items:end;gap:12px;flex-wrap:wrap;padding:12px 0;border-bottom:1px solid var(--rh-control-border)}
.rh-reschedule-bulk label {flex:1 1 220px}
.rh-reschedule-job {display:grid;grid-template-columns:minmax(0,1fr) 180px;gap:18px;align-items:center;padding:16px 0;border-bottom:1px solid var(--rh-control-border)}
.rh-reschedule-job .checkbox-label {align-items:flex-start}
.rh-reschedule-job .checkbox-label>span {display:grid;gap:4px;min-width:0;overflow-wrap:anywhere}
.rh-reschedule-job small {color:var(--rf-muted);font-size:12px;line-height:1.5}
#rh-reschedule-form>label {display:block;margin-top:16px}
#rh-reschedule-form>.actions {margin-top:18px}
#rh-reschedule-feedback {margin-top:16px}
#rh-reschedule-feedback:empty {display:none}
.rh-reschedule-preview {display:grid;gap:4px;padding:12px 0;border-bottom:1px solid var(--rh-control-border)}
.rh-reschedule-preview p {margin:6px 0}
@media(max-width:600px){.rh-reschedule-job {grid-template-columns:1fr;gap:10px}}

/* Reusable record cards for job visits, attendance, staff shifts and assignments.
   Auto-fit shares the row equally, caps at five, and adapts to narrow sections. */
body.v52-app #content .rh-record-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,max(180px,calc((100% - 48px)/5))),1fr));gap:12px;align-items:stretch;min-width:0}
body.v52-app #content .rh-record-grid>.rh-record-card {display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:10px;min-width:0;width:100%;box-sizing:border-box;margin:0;padding:14px;border:1px solid var(--rh-control-border);border-radius:10px;background:var(--rf-surface-raised);color:var(--rf-text);font-size:14px;line-height:1.5;overflow-wrap:anywhere}
body.v52-app #content .rh-record-card>div:first-child {min-width:0;flex:0 1 auto}
body.v52-app #content .rh-record-card :is(.actions,.v52-task-controls,.v541-response-actions) {display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:auto;padding-top:4px;flex:0 1 auto}
body.v52-app #content .rh-record-card>.button {margin-top:auto}
body.v52-app #content .rh-record-grid .rh-record-card button.button {min-width:0;max-width:100%;min-height:36px;font-size:13px;flex:0 1 auto}
body.v52-app #content .rh-record-card :is(p,small,.muted,.crew-row-state) {font-size:13px;line-height:1.5}
body.v52-app #content .rf5723-today-jobs-list.rh-record-grid {padding:16px}
body.v52-app #content .rh-record-card .crew-worker-name {align-items:flex-start}
body.v52-app #content .rh-record-card .v541-shift-top {flex-wrap:wrap;gap:8px}
body.v52-app #content .rh-record-card .rh-message-preview {white-space:pre-wrap;max-width:100%;overflow-wrap:anywhere}
body.v52-app #content .rh-record-card .v541-shift-hours {margin:0}

/* Comfortable laptop density. Keep phone inputs and touch targets unchanged. */
@media screen and (min-width:761px) {
 body.v52-app {font-size:14px;line-height:1.5}
 body.v52-app .main {padding:24px 28px}
 body.v52-app.v51-workspace .sidebar {width:220px;padding:18px 12px}
 body.v52-app .brand {padding-bottom:20px;gap:10px}
 body.v52-app .sidebar .navitem {min-height:40px;padding:9px 12px;margin:2px 0;gap:10px;font-size:13px}
 body.v52-app .sidebar .navitem .icon {font-size:18px;width:22px;flex-basis:22px}
 body.v52-app .sidebar :is(.v51-tool-link,.subtle,.v51-tools>summary) {font-size:13px}
 body.v52-app .sidebar .aside-foot {padding:16px 10px 0;font-size:13px}
 body.rh-simple-owner .rh-tools-button {margin-top:16px;padding-top:16px}
 body.v52-app .topbar {margin-bottom:20px;padding-bottom:16px;gap:16px}
 body.v52-app .topbar h1 {font-size:24px;line-height:1.2;margin-top:6px}
 body.v52-app :is(.v51-welcome,.v52-toolbar,.v541-heading,.rf5723-today-head,.rf5723-job-heading,.crew-intro) h2 {font-size:24px;line-height:1.25}
 body.v52-app :is(.panel-head,.v52-panel-head,.v51-section-head,.rf5723-today-section-head,.modal-header) :is(h2,h3) {font-size:18px;line-height:1.35}
 body.v52-app :is(.help,.muted,.subtitle,.v51-note,.v52-subnote,.v541-note,.v541-heading p,.v51-welcome p,.v52-caution,label) {font-size:13px;line-height:1.5}
 body.v52-app :is(input,select,textarea) {font-size:14px;line-height:1.4;padding:8px 10px}
 body.v52-app :is(input,select):not([type=checkbox]):not([type=radio]) {min-height:38px}
 body.v52-app .modal-card :is(input,select):not([type=checkbox]):not([type=radio]) {min-height:38px}
 body.v52-app :is(.button,.button.small,.button.ghost,.button.subtle,summary.button,.rh-approval-tabs button,.v51-subtab,.v541-view-controls button) {min-height:38px;padding:8px 12px;font-size:13px;line-height:20px}
 body.v52-app .button:not(.icon-button):not(.v51-help-icon):not(.rf-mobile-menu-button) {min-width:120px}
 body.v52-app :is(.actions,.form-actions,.rf-office-actions,.v541-response-actions)>.button {flex-basis:120px}
 body.v52-app :is(.actions,.form-actions,.rf-office-actions,.v541-response-actions,.v541-view-controls) {gap:8px}
 body.v52-app :is(.icon-button,.v51-help-icon,.rf-mobile-menu-button) {min-height:38px;min-width:38px;width:38px;padding:6px}
 body.v52-app :is(.panel-head,.v52-panel-head,.v51-section-head) {padding:16px 18px;gap:12px}
 body.v52-app :is(.panel-body,.modal-card #modal-body) {padding:18px}
 body.v52-app .modal-header {padding:16px 18px}
 body.v52-app .grid-form {gap:12px}
 body.v52-app :is(th,td) {font-size:13px;line-height:1.45;padding:11px 14px}
 body.v52-app :is(.badge,.v541-status,.rf537-status,footer) {font-size:12px}
 body.v52-app :is(.metric .value,.v51-stat strong,.v52-kpi strong,.v52-target-tile b,.rh-pay-summary dd) {font-size:24px;line-height:1.3}
 body.v52-app .rh-inbox-card {padding:16px}
 body.v52-app .rh-inbox-card-heading h3 {font-size:17px}
 body.v52-app .rh-inbox-labels li {font-size:12px}
 body.v52-app :is(.rf5723-job-fold,.rf5723-today-attendance,.rf5723-today-snapshot,.v570-workspaces,.v571-cost-register,.v551-panel,.rf5728-ai,.compact-section)>summary {min-height:44px;padding:12px 16px;font-size:13px}
 /* Preserve the compact controls and equal-width cards already used for jobs. */
 body.v52-app .rh-planned-grid .rh-planned-worker .button {min-height:30px;padding:5px 6px;font-size:12px;line-height:1.3}
 body.v52-app .rh-planned-grid:is([data-columns="4"],[data-columns="5"]) .rh-planned-worker .button {min-width:0}
 body.v52-app .rh-planned-actions>.button,body.v52-app .rh-planned-actions details.rf-row-more>summary {min-height:34px;padding:6px 10px}
 body.v52-app #content .rh-record-grid .rh-record-card button.button {min-height:34px;padding:6px 10px}
 body.v52-app #content .rh-record-card :is(h3,p) {margin:0 0 6px}
}

/* Job billing: short job cards, with document and email state kept distinct. */
body.v52-app #content .rh-billing-overview {display:flex;flex-wrap:wrap;gap:10px 24px;padding:12px 16px;border:1px solid var(--rh-control-border);border-radius:10px;background:var(--rf-surface-raised);color:var(--rf-muted);font-size:13px}
.rh-billing-overview strong {color:var(--rf-text);font-variant-numeric:tabular-nums}
body.v52-app #content .rh-billing-grid {display:grid;grid-template-columns:minmax(0,1fr);gap:10px;align-items:start}
body.v52-app #content .rh-billing-card {display:grid;grid-template-columns:minmax(210px,1fr) minmax(210px,.85fr) minmax(320px,1.5fr);align-items:start;gap:18px;padding:14px;border-radius:10px;box-shadow:none;min-width:0;overflow-wrap:anywhere}
.rh-billing-card-head {display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:5px 8px}
body.v52-app #content .rh-billing-card-head h3 {font-size:15px;line-height:1.4;margin:0;flex:1;min-width:100px}
body.v52-app #content .rh-billing-card-head p {flex-basis:100%;margin:0;color:var(--rf-muted);font-size:12px;line-height:1.45}
.rh-billing-contract {display:flex;justify-content:space-between;gap:8px;font-size:13px;color:var(--rf-muted)}
.rh-billing-contract strong {color:var(--rf-text);font-variant-numeric:tabular-nums}
body.v52-app #content .rh-billing-amounts {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0;padding:10px;background:var(--rf-surface-raised);border-radius:8px}
.rh-billing-amounts dt {color:var(--rf-muted);font-size:12px;line-height:1.4}
body.v52-app #content .rh-billing-amounts dd {margin:2px 0 0;font-size:14px;font-weight:700;line-height:1.4;font-variant-numeric:tabular-nums;color:var(--rf-text)}
.rh-billing-quote {display:flex;gap:6px 8px;align-items:center;flex-wrap:wrap;font-size:12px}
.rh-billing-quote>strong {flex:1}
.rh-billing-badges {display:flex;align-items:center;flex-wrap:wrap;gap:4px 6px;min-width:0}
.rh-billing-status {font-size:11px;line-height:1.45;font-weight:600;color:var(--rf-muted);background:var(--rf-surface-raised);border:1px solid var(--rh-control-border);border-radius:5px;padding:2px 5px;max-width:100%}
.rh-billing-status.is-positive {color:var(--rf-positive)}
.rh-billing-status.is-warning {color:var(--rf-warning)}
.rh-billing-status.is-negative {color:var(--rf-negative)}
body.v52-app #content :is(.rh-billing-adjustments,.rh-billing-empty,.rh-billing-invoice-summary) {margin:0;color:var(--rf-muted);font-size:12px;line-height:1.5}
.rh-billing-document {border-top:1px solid var(--rh-control-border);padding-top:8px;min-width:0}
.rh-billing-document-title {display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:12px;line-height:1.5}
.rh-billing-document-title b {font-variant-numeric:tabular-nums}
body.v52-app #content .rh-billing-description {font-size:12px;color:var(--rf-muted);line-height:1.4;margin:3px 0 6px}
.rh-billing-document-bottom {display:flex;align-items:center;justify-content:space-between;gap:8px}
body.v52-app #content .rh-billing-card .rf-row-more {flex-shrink:0;margin:0}
body.v52-app #content .rh-billing-card .rf-row-more>summary {min-height:32px;min-width:54px;padding:5px 8px;font-size:12px;line-height:20px}
body.v52-app #content .rh-billing-card-actions {display:flex;align-items:center;gap:8px;margin-top:2px;padding-top:2px}
body.v52-app #content .rh-billing-card-actions .button {flex:1 1 0;min-width:0;min-height:36px;padding:7px 8px;font-size:12px;line-height:20px}
body.v52-app #content .rh-billing-older>summary {cursor:pointer;padding:7px 0;color:var(--rf-text);font-size:12px;font-weight:650}
.rh-billing-older .rh-billing-document+.rh-billing-document {margin-top:8px}
body.v52-app #content .rh-billing-help {font-size:12px;margin-top:16px}
body.v52-app #content :is(.rh-billing-identity,.rh-billing-balances,.rh-billing-documents) {min-width:0;display:grid;gap:10px}
body.v52-app #content .rh-billing-documents {padding-left:16px;border-left:1px solid var(--rh-control-border);gap:6px}
@media(max-width:1100px){
 body.v52-app #content .rh-billing-card {grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px}
 body.v52-app #content .rh-billing-documents {grid-column:1/-1;border-left:0;padding-left:0;border-top:1px solid var(--rh-control-border);padding-top:10px}
}
@media(max-width:650px){body.v52-app #content .rh-billing-card {grid-template-columns:minmax(0,1fr)}}

body .topbar #top-measurement-quote {width:40px;min-width:40px;height:40px;min-height:40px;padding:8px;display:inline-flex;align-items:center;justify-content:center;}
body .topbar #top-measurement-quote.hidden {display:none!important;}
