/* Spacious desktop dialogs: about 40% of viewport area; phones use the full screen. */
#modal,dialog.photo-editor,dialog.report-equipment-details{box-sizing:border-box;width:min(1040px,68vw);min-height:min(560px,55dvh);max-width:calc(100vw - 64px);max-height:60dvh;padding:36px 40px;border:1px solid #cdd7cd;border-radius:24px;background:#f9faf6;color:#203a32;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;font-size:16px;line-height:1.6;box-shadow:0 28px 90px #122b2340,0 1px 0 #fff inset;overflow:auto;overscroll-behavior:contain;scroll-padding:28px}
#modal::backdrop,dialog.photo-editor::backdrop,dialog.report-equipment-details::backdrop{background:#122b2366;backdrop-filter:blur(4px)}
#modal :is(h2,h3,h4),dialog.photo-editor :is(h2,h3),dialog.report-equipment-details :is(h2,h3){color:#203a32;overflow-wrap:anywhere}
#modal h2,dialog.photo-editor h2,dialog.report-equipment-details h2{font-size:24px;line-height:32px;font-weight:600;letter-spacing:-.4px;margin:0 0 28px}
#modal h3,dialog.photo-editor h3,dialog.report-equipment-details h3{font-size:18px;line-height:26px;font-weight:600;margin:28px 0 16px}
#modal h4{font-size:16px;line-height:24px;margin:24px 0 12px}#modal p{font-size:16px;line-height:26px;margin:16px 0 24px}#modal small,#modal .sub,#modal .footnote{font-size:14px;line-height:22px;color:#52675f}
#modal :is(button,input,select,textarea),dialog.photo-editor :is(button,input,select,textarea),dialog.report-equipment-details :is(button,input,select,textarea){font-family:inherit;font-size:16px;line-height:24px;border-radius:12px;color:#203a32}
#modal button,dialog.photo-editor button,dialog.report-equipment-details button{min-height:48px;padding:11px 18px;border:1px solid #738379;background:#f9faf6;box-shadow:0 3px 6px #6d816921,0 1px 0 #fff inset;white-space:normal;max-width:100%;overflow-wrap:anywhere}
#modal button.primary,dialog.photo-editor button.primary{background:#244f43;border-color:#244f43;color:#fff}#modal button.danger{color:#9b3028;border-color:#9b3028}#modal button:disabled{color:#52675f;background:#edf0ea;border-color:#cdd7cd;box-shadow:none}
#modal :is(input,select,textarea),dialog.photo-editor :is(input,select,textarea){min-height:48px;padding:11px 14px;border:1px solid #738379;background:#fff;min-width:0;max-width:100%;box-sizing:border-box}
#modal :is(input[type=checkbox],input[type=radio]){min-height:22px;width:22px;height:22px;flex:none;padding:0;accent-color:#244f43}#modal input[type=file]{padding:10px;line-height:26px}#modal textarea{min-height:144px;resize:vertical}
#modal :focus-visible,dialog.photo-editor :focus-visible,dialog.report-equipment-details :focus-visible{outline:3px solid #244f43;outline-offset:3px}
#modal .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 32px}#modal .form-grid>label{margin:0;gap:10px;font-size:16px;line-height:24px;color:#203a32}
#modal label{font-size:16px;line-height:24px;color:#203a32}#modal .report-ui label,#modal .workflow-ui label,#modal .offline-reports label{margin:22px 0 10px}#modal label:has(>input[type=checkbox]),#modal label:has(>input[type=radio]){display:flex;flex-direction:row;align-items:flex-start;gap:12px}
#modal fieldset{min-width:0;margin:28px 0;padding:24px;border:1px solid #cdd7cd;border-radius:18px}#modal legend{font-size:18px;line-height:26px;font-weight:600;padding:0 8px}#modal fieldset fieldset{padding:20px;margin:24px 0;background:#edf0ea}
#modal .form-actions,#modal .workflow-ui .form-actions,#modal .report-ui .form-actions,#modal .offline-reports .form-actions{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:12px;margin:28px 0 0;padding-top:20px;border-top:1px solid #cdd7cd}
#modal .form-actions>p{flex-basis:100%;margin:0 0 8px}#modal .form-actions>button{margin:0}#modal .workflow-tabs{display:flex;flex-wrap:wrap;gap:12px;margin:0 0 28px}#modal .workflow-tabs button{margin:0}
#modal .workflow-ui{width:100%;min-width:0;max-height:none;overflow:visible;padding:0}#modal .report-ui{width:100%;min-width:0}#modal .report-ui form[data-report]>fieldset{gap:28px}#modal .report-ui form[data-report] [data-values]{gap:24px}#modal .report-ui form[data-report]>fieldset>label{gap:10px;margin:0}#modal .report-ui form[data-report] [data-value-field]>label{margin:0 0 10px}
#modal .report-ui>button[data-report-close],#modal .workflow-ui>button[data-wf-close]{display:block;margin:28px 0 0 auto}
#modal .workflow-list{padding:0;list-style:none;display:grid;gap:20px}#modal .workflow-list>li{padding:24px;border:1px solid #cdd7cd;border-radius:18px;gap:16px}#modal .workflow-list>li>p{margin:8px 0 16px}
#modal .error{font-size:16px;line-height:24px;padding:16px 20px;color:#9b3028;background:#fff0ed}#modal .badge{font-size:14px;line-height:22px;white-space:normal}
#modal th,#modal td{font-size:14px;line-height:22px;padding:16px;text-transform:none;letter-spacing:0}#modal td strong{font-size:16px}#modal td small{font-size:14px}#modal .table-wrap{margin:24px 0}#modal .report-photos{gap:24px}#modal .report-photos figure{padding:20px;border-radius:16px}
#modal.workspace-menu{padding:32px 36px}#modal.workspace-menu .workspace-menu-header{margin-bottom:32px}#modal.workspace-menu .workspace-menu-header h2{margin:0}#modal.workspace-menu .workspace-menu-items{gap:16px}#modal.workspace-menu h3{margin:28px 0 16px}#modal.workspace-menu section:first-child h3{margin-top:0}
dialog.photo-editor .photo-editor-tools{gap:20px;margin:24px 0}dialog.photo-editor .photo-editor-tools label{gap:10px}dialog.photo-editor .photo-editor-viewport{margin:24px 0;max-height:36dvh}
@media(max-width:900px){#modal,dialog.photo-editor,dialog.report-equipment-details{width:calc(100vw - 32px);max-width:none;min-height:min(600px,70dvh);max-height:calc(100dvh - 32px);padding:28px;border-radius:20px}#modal.workspace-menu{padding:28px}}
@media(max-width:600px){#modal,dialog.photo-editor,dialog.report-equipment-details{width:100%;max-width:100%;height:100dvh;max-height:100dvh;min-height:0;margin:0;border:0;border-radius:0;padding:24px 20px max(28px,env(safe-area-inset-bottom));scroll-padding:24px}#modal.workspace-menu{padding:24px 20px max(28px,env(safe-area-inset-bottom))}#modal h2,dialog.photo-editor h2{font-size:24px;line-height:32px;margin-bottom:28px}#modal .form-grid,#modal .report-ui [data-company-pdf-form],#modal .report-ui [data-pdf-settings]{grid-template-columns:minmax(0,1fr);gap:24px}#modal .form-grid .full{grid-column:1}#modal fieldset{padding:20px 16px}#modal .form-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}#modal .form-actions>p{grid-column:1}#modal .form-actions button{width:100%;text-align:center}#modal .form-actions button.primary{order:-1}#modal .workflow-list>li{padding:20px 16px}#modal .workflow-tabs button{flex:1 1 140px}#modal .report-ui>button[data-report-close],#modal .workflow-ui>button[data-wf-close]{width:100%;margin-top:28px}#modal .workspace-menu-items{grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){#modal *,dialog.photo-editor *,dialog.report-equipment-details *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

#modal .report-ui label,#modal .workflow-ui label,#modal .offline-reports label{display:grid;gap:10px}
#modal .report-ui>label{max-width:min(100%,560px)}
#modal label:has(>input[type=checkbox]),#modal label:has(>input[type=radio]){display:flex;flex-direction:row;gap:12px}
#modal[open],dialog.photo-editor[open],dialog.report-equipment-details[open]{animation:workspace-modal-enter 180ms cubic-bezier(.2,.7,.2,1)}
@keyframes workspace-modal-enter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){#modal[open],dialog.photo-editor[open],dialog.report-equipment-details[open]{animation:none!important}}

#modal[open]:has(> form[data-expense-accounting-form]) {
 display:flex;
 flex-direction:column;
 overflow:hidden;
}
#modal:has(> form[data-expense-accounting-form]) > h2 { flex:none; margin-bottom:12px; }
#modal > form[data-expense-accounting-form] {
 display:flex;
 flex:1;
 flex-direction:column;
 min-height:0;
}
#modal .expense-accounting-fields {
 min-height:0;
 overflow:auto;
 overscroll-behavior:contain;
 padding:4px 6px 10px;
 scroll-padding-block:8px;
}
#modal .expense-accounting-fields > p { margin:0 0 18px; }
#modal .expense-accounting-fields .form-grid { row-gap:16px; }
#modal > form[data-expense-accounting-form] > .error {
 flex:none;
 max-height:20dvh;
 overflow:auto;
 margin:8px 0 0;
}
#modal > form[data-expense-accounting-form] > .error:empty { display:none; }
#modal > form[data-expense-accounting-form] > .form-actions {
 flex:none;
 margin-top:8px;
 padding-top:12px;
}
#modal [data-domestic-per-diem], #modal [data-expense-lodging] { grid-column:1 / -1; margin:0; }
#modal [data-domestic-per-diem] p:empty, #modal [data-expense-lodging] p:empty { display:none; }
#modal .expense-per-diem-meal {
 display:grid;
 grid-template-columns:minmax(0,1fr) minmax(0,12rem);
 align-items:end;
 gap:12px;
 margin-top:12px;
}
#modal .expense-per-diem-meal label { min-width:0; margin:0; }
#modal .expense-per-diem-meal label:has(> input[type=checkbox]) { align-self:center; }
@media(max-width:480px){
 #modal .expense-per-diem-meal { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
}

/* Report family: one work view, separate tools and factual details. */
#modal .report-modal-header{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:28px}
#modal .report-modal-heading{display:flex;align-items:flex-start;gap:16px;min-width:0}
#modal .report-modal-heading>.pf-icon{width:28px;height:28px;margin-top:2px;flex:none}
#modal .report-modal-header h2{margin:0}
#modal .report-modal-header button,#modal .report-editor button,#modal [data-artifact-proof]{display:inline-flex;align-items:center;justify-content:center;gap:10px}
#modal .report-modal-header [data-report-close]{flex:none;margin:0}
#modal .report-editor-summary{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:0 0 24px}
#modal .report-editor-nav{display:flex;flex-wrap:wrap;gap:12px;padding:0 0 24px;margin:0 0 28px;border-bottom:1px solid #cdd7cd}
#modal .report-editor-nav button[aria-pressed=true]{background:#244f43;border-color:#244f43;color:white}
#modal .report-editor-content>fieldset{margin:0;padding:0;border:0}
#modal .report-editor-tool-group{margin:0 0 32px}
#modal .report-editor-tool-group h3{display:flex;align-items:center;gap:12px;margin:0 0 20px}
#modal .report-editor-tool-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
#modal .report-editor-tool-grid button{min-height:72px;justify-content:flex-start;text-align:left;padding:18px 20px}
#modal .report-editor-details dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 32px;margin:0 0 28px}
#modal .report-editor-details dl>div{min-width:0}
#modal .report-editor-details dt{color:#52675f;font-size:14px;margin-bottom:6px}
#modal .report-editor-details dd{margin:0;font-weight:600;overflow-wrap:anywhere}
#modal .report-editor-policy{display:flex;align-items:flex-start;gap:12px;padding:20px;background:#edf0ea;border-radius:14px}
#modal .report-editor-policy>.pf-icon{flex:none;margin-top:3px}
#modal .report-editor-footer .report-editor-signature-status{display:flex;gap:12px}
#modal .report-ui>.error:empty{display:none}
#modal .report-pdf-artifact-hash:not([hidden]){display:block;padding:20px;margin-top:16px;background:#edf0ea;border-radius:12px}
@media(max-width:600px){#modal .report-modal-header{gap:16px}#modal .report-modal-heading{gap:12px}#modal .report-modal-header [data-report-close]{width:48px;padding:10px}#modal .report-modal-header [data-report-close] span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}#modal .report-editor-nav{display:grid;grid-template-columns:1fr;gap:12px}#modal .report-editor-nav button{width:100%}#modal .report-editor-tool-grid,#modal .report-editor-details dl{grid-template-columns:minmax(0,1fr)}#modal .report-editor-tool-grid button{justify-content:center;text-align:center}}

#modal .report-ui .pf-icon{display:inline-block;width:22px;height:22px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle}

#modal .report-editor :is([data-add-row],[data-remove-row]){display:flex;margin:16px 0 0 auto}

#modal .report-editor-details>button{display:flex;margin-left:auto}
#modal .template-nav,#modal .template-field-nav{display:flex;flex-wrap:wrap;gap:12px;margin:0 0 28px;padding-bottom:24px;border-bottom:1px solid #cdd7cd}
#modal .template-designer button{display:inline-flex;align-items:center;justify-content:center;gap:10px}
#modal .template-designer nav button[aria-pressed=true],#modal .template-field-list button[aria-pressed=true]{background:#244f43;border-color:#244f43;color:#fff}
#modal .template-general{display:grid;gap:24px}#modal .template-general>label{margin:0;gap:10px}
#modal .template-general input:not([type=checkbox]){width:100%}
#modal .template-fields-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;margin:0 0 24px}
#modal .template-fields-heading h3{margin:0}
#modal .template-designer-layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:32px;align-items:start}
#modal .template-field-list{list-style:none;display:grid;gap:12px;padding:0;margin:0}
#modal .template-field-list li{padding:0;margin:0;min-width:0}
#modal .template-field-list button{width:100%;justify-content:flex-start;text-align:left;padding:14px;min-height:60px;overflow-wrap:anywhere}
#modal .template-field-list .template-column-item{padding-left:20px}
#modal .template-field-editor{min-width:0}
#modal .template-field-editor [data-field-path]{min-width:0;padding:0;margin:0;border:0;background:transparent}
#modal .template-field-editor legend{font-size:18px;padding:0;margin:0 0 24px;font-weight:600;overflow-wrap:anywhere}
#modal .template-field-section{display:grid;gap:24px}
#modal .template-field-section>label{margin:0;gap:10px}
#modal .template-field-section input:not([type=checkbox]),#modal .template-field-section select{width:100%}
#modal .template-designer [data-option-id]{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px;align-items:end;padding:20px 0;margin:0;border-bottom:1px solid #cdd7cd}
#modal .template-designer [data-option-id]>label{grid-column:1/-1;margin:0}
#modal .template-designer [data-option-id] button{padding:10px;min-width:0}
#modal .template-designer [data-option-add],#modal .template-designer [data-add-column],#modal .template-designer [data-copy-company]{display:flex;margin:24px 0 0 auto}
#modal .template-column-links{display:grid;gap:12px;margin:0 0 24px}
#modal .template-column-links button{justify-content:flex-start;text-align:left;min-height:60px}
#modal .template-pdf{margin:0}
.report-pdf-layout-preview { margin: 12px 0 0; min-width: 0; }
.report-pdf-layout-preview figcaption { margin-bottom: 8px; font-weight: 650; }
.report-pdf-layout-paper {
  padding: 14px 16px;
  border: 1px solid var(--border, #ccd7d0);
  border-top: 4px solid var(--pdf-layout-accent);
  border-radius: 8px;
  background: var(--paper, #fff);
  overflow-wrap: anywhere;
}
.report-pdf-layout-paper p,
.report-pdf-layout-paper footer { white-space: pre-wrap; margin: 8px 0 0; }
.report-pdf-layout-paper p:empty,
.report-pdf-layout-paper footer:empty { display: none; }
.report-pdf-layout-sample {
  display: grid;
  place-items: center;
  margin-top: 12px;
  min-height: 54px;
  border: 1px dashed var(--border, #ccd7d0);
  border-radius: 6px;
}
.report-pdf-layout-preview[data-image-size="small"] .report-pdf-layout-sample { min-height: 36px; }
.report-pdf-layout-preview[data-image-size="large"] .report-pdf-layout-sample { min-height: 72px; }

#modal .report-ui .template-field-picker{display:none}
@media(max-width:750px){#modal .template-designer-layout{grid-template-columns:minmax(0,1fr)}#modal .template-field-rail{display:none}#modal .report-ui .template-field-picker{display:grid;margin:0 0 28px;gap:10px}#modal .template-field-picker select{width:100%}}
@media(max-width:600px){#modal .template-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}#modal .template-nav button{padding:12px 8px;gap:6px}#modal .template-field-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}#modal .template-field-nav button{padding:12px}#modal .template-fields-heading{gap:16px}#modal .template-fields-heading button{min-width:0}#modal .template-designer [data-option-id]{grid-template-columns:minmax(0,1fr)}#modal .template-designer [data-option-id]>label{grid-column:1}#modal .template-designer [data-option-id] button{width:100%}}

#modal .template-parent-field{display:flex;margin:0 0 24px auto}
#modal .template-designer :is([data-field-up],[data-option-up])>.pf-icon{transform:rotate(-90deg)}
#modal .template-designer :is([data-field-down],[data-option-down])>.pf-icon{transform:rotate(90deg)}
#modal .template-designer>.form-actions{position:sticky;bottom:0;z-index:3;background:#f9faf6;padding:20px 0 4px;box-shadow:0 -12px 16px #f9faf6}
#modal .template-designer>.form-actions{bottom:-36px;padding-bottom:36px}
@media(max-width:900px){#modal .template-designer>.form-actions{bottom:-28px;padding-bottom:28px}}
@media(max-width:600px){#modal .template-designer>.form-actions{bottom:calc(-1 * max(28px,env(safe-area-inset-bottom)));padding-bottom:max(28px,env(safe-area-inset-bottom))}}

#modal .template-nav [data-add]{margin-left:auto}
@media(max-width:600px){#modal .template-nav [data-add]{grid-column:1/-1;width:100%;margin-left:0}}

#modal .offline-reports button{display:inline-flex;align-items:center;justify-content:center;gap:10px}
#modal .offline-notice{display:flex;align-items:flex-start;gap:14px;padding:20px 24px;background:#edf0ea;border-radius:16px;margin:0 0 28px}
#modal .offline-notice>.pf-icon{flex:none;margin-top:3px}
#modal .offline-toolbar{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:12px;margin:0 0 28px}
#modal .offline-draft-list{list-style:none;display:grid;gap:20px;padding:0;margin:0}
#modal .offline-draft{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:20px;padding:24px;border:1px solid #cdd7cd;border-radius:18px;background:#fff}
#modal .offline-draft-icon{width:48px;height:48px;display:grid;place-items:center;background:#edf0ea;border-radius:14px}
#modal .offline-draft-copy{min-width:0}#modal .offline-draft-copy h3{margin:0 0 8px;font-size:18px;line-height:26px}
#modal .offline-draft-copy p{margin:0 0 12px;color:#52675f;font-size:14px;line-height:22px;overflow-wrap:anywhere}
#modal .offline-draft-actions{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap}
#modal .offline-record-summary{padding:24px;border:1px solid #cdd7cd;border-radius:18px;margin-bottom:28px}
#modal .offline-action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
#modal .offline-action-grid button{min-height:72px;text-align:left;justify-content:flex-start;padding:20px}
#modal .offline-empty{display:grid;justify-items:center;gap:20px;padding:40px;text-align:center}
#modal .offline-empty>.pf-icon{width:36px;height:36px}
#modal .offline-reports [data-offline-create]{display:grid;gap:24px}#modal .offline-reports [data-offline-create]>label{margin:0;gap:10px}
#modal .offline-reports [data-offline-create]>button{justify-self:end;margin:0}
#modal .offline-reports [data-offline-create]>.form-actions{margin-top:4px}
#modal .offline-compare{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
@media(max-width:1100px){#modal .offline-draft{grid-template-columns:48px minmax(0,1fr)}#modal .offline-draft-actions{grid-column:1/-1}}
@media(max-width:600px){#modal .offline-toolbar{display:grid;grid-template-columns:minmax(0,1fr)}#modal .offline-toolbar button{width:100%}#modal .offline-toolbar button.primary{order:-1}#modal .offline-draft{padding:20px 16px;gap:16px}#modal .offline-draft-actions{display:grid;grid-template-columns:minmax(0,1fr);width:100%;gap:12px}#modal .offline-draft-actions button{width:100%}#modal .offline-action-grid,#modal .offline-compare{grid-template-columns:minmax(0,1fr)}#modal .offline-notice{padding:20px 16px}}
#modal .report-modal-header [data-offline-close]{flex:none;margin:0}
#modal .offline-reports>button[data-offline-back]{display:flex;margin:28px 0 0 auto}
@media(max-width:600px){#modal .report-modal-header [data-offline-close]{width:48px;padding:10px}#modal .report-modal-header [data-offline-close] span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}#modal .offline-reports>button[data-offline-back]{width:100%}}
#modal:has(>.offline-reports.offline-compact){min-height:0}
#modal .offline-action-grid>.danger{grid-column:2}
@media(max-width:600px){#modal .offline-action-grid>.danger{grid-column:1}}

/* Report attachments stay with their field; the canonical selection is in a
   separate, explicit picker rather than a permanently visible multi-select. */
.report-media-field{border:1px solid var(--line,#dce3de);border-radius:20px;padding:24px;display:flex;flex-direction:column;gap:24px;min-width:0}
.report-media-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}
.report-media-heading>label{margin:0;font-size:18px;font-weight:650}
.report-media-tools{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:12px}
.report-media-empty{display:flex;align-items:center;justify-content:center;gap:12px;padding:24px;margin:0;color:var(--muted,#52645b)}
.report-media-empty[hidden]{display:none}
.report-upload-action{position:relative;display:inline-flex!important;align-items:center;justify-content:center;gap:10px;min-height:48px;margin:0!important;padding:12px 18px!important;border:1px solid var(--line,#dce3de);border-radius:12px;cursor:pointer;overflow:hidden;background:var(--surface,#fafbf7);font-weight:500!important}
.report-upload-action input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%;margin:0;padding:0}
.report-upload-action:focus-within{outline:3px solid #244f43;outline-offset:3px}
.report-media-field .report-photos{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:24px;margin:0}
.report-media-field figure{display:flex;flex-direction:column;align-items:stretch;gap:16px;padding:20px;margin:0;border:1px solid var(--line,#dce3de);border-radius:16px;min-width:0}
.report-media-field figure img{width:100%;max-height:340px;object-fit:contain;border-radius:12px;background:#edf0eb}
.report-media-field figure figcaption{font-size:16px;font-weight:600;overflow-wrap:anywhere}
.report-media-field figure .badge{align-self:flex-start}
.report-media-field figure label{display:flex;flex-direction:column;gap:10px;margin:0}
.report-media-field figure button{align-self:flex-end}
.report-media-picker{width:min(760px,calc(100vw - 48px));max-height:70dvh;padding:32px;border:1px solid var(--line,#dce3de);border-radius:24px;background:#fafbf7;color:#243d33;box-sizing:border-box}
.report-media-picker h3{font-size:22px;margin:0 0 24px}
.report-media-picker small{display:block;font-size:16px;line-height:1.6}
.report-media-picker .form-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:28px}
.report-media-choices{display:grid;gap:12px}
.report-media-choices label{display:flex;align-items:center;gap:16px;padding:16px;border:1px solid var(--line,#dce3de);border-radius:12px;min-height:48px;overflow-wrap:anywhere}
.report-media-choices input[type=checkbox]{width:24px;height:24px;flex:none;margin:0}
.report-media-picker::backdrop{background:rgb(25 47 38 / .35);backdrop-filter:blur(4px)}
@media(max-width:600px){.report-media-field{padding:20px;gap:20px}.report-media-tools>*{width:100%}.report-media-field figure{padding:16px}.report-media-field figure button{align-self:stretch}.report-media-picker{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0;padding:24px}}
#modal [data-report-media][hidden]{display:none!important}
#modal .report-media-heading>label{margin:0;font-size:18px;font-weight:600}
#modal .report-media-field figure label{margin:0;gap:10px}
#modal .report-media-picker h3{font-size:22px;margin:0 0 24px}
#modal .report-media-choices label{margin:0;align-items:center}
#modal .report-media-choices input[type=checkbox]{min-height:24px;padding:0}
#modal .report-media-empty{margin:0;padding:24px}
#modal .report-upload-action input[type=file]{padding:0;min-height:100%;border:0}
#modal .report-media-queue{list-style:none;padding:0;margin:0;display:grid;gap:16px}
#modal .report-media-queue li{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:20px;background:#edf0ea;border-radius:12px;overflow-wrap:anywhere}
#modal .report-media-queue li strong{font-weight:600}
#modal .report-media-field>[data-field-refresh]{align-self:flex-end}
/* Explicit annotation tools, with the existing canvas/history controls. */
dialog.photo-editor .photo-editor-header{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:24px}
dialog.photo-editor .photo-editor-heading{display:flex;align-items:center;gap:14px;min-width:0}
dialog.photo-editor .photo-editor-heading h2{margin:0}
dialog.photo-editor .photo-editor-close{flex:none;width:48px;padding:10px}
dialog.photo-editor .photo-editor-note{display:flex;align-items:flex-start;gap:14px;padding:18px 20px;background:#edf0ea;border-radius:16px;margin:0 0 24px}
dialog.photo-editor .photo-editor-note .pf-icon{flex:none;margin-top:3px}
dialog.photo-editor .photo-editor-tool-buttons{display:flex;flex-wrap:wrap;gap:12px}
dialog.photo-editor .photo-editor-tool-buttons button{display:inline-flex;align-items:center;justify-content:center;gap:10px}
dialog.photo-editor .photo-editor-tool-buttons button[aria-pressed=true]{color:#fff;background:#244f43;border-color:#244f43}
dialog.photo-editor .photo-editor-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;margin:24px 0}
dialog.photo-editor .photo-editor-tools label{min-width:0;margin:0;gap:10px}
dialog.photo-editor .photo-editor-tools label:has([data-text]){grid-column:1/-1}
dialog.photo-editor .photo-editor-tools [data-text]{max-width:none;width:100%}
dialog.photo-editor .photo-editor-tools label[hidden]{display:none!important}
dialog.photo-editor .photo-editor-viewport{border:1px solid #cdd7cd;border-radius:16px;padding:16px;background:#edf0ea}
dialog.photo-editor .form-actions{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:12px;margin-top:24px}
dialog.photo-editor .form-actions button{display:inline-flex;align-items:center;justify-content:center;gap:10px}
dialog.photo-editor [data-mark-count]{font-size:14px;color:#52675f;margin:16px 0}
dialog.photo-editor .photo-editor-error:empty{display:none}
dialog.photo-editor .photo-editor-error:not(:empty){background:#fff0ed;color:#9b3028;padding:16px 20px;border-radius:12px}
@media(max-width:600px){dialog.photo-editor .photo-editor-header{gap:16px}dialog.photo-editor .photo-editor-tool-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}dialog.photo-editor .photo-editor-tool-buttons button{padding:12px}dialog.photo-editor .photo-editor-tools{grid-template-columns:minmax(0,1fr)}dialog.photo-editor .form-actions{display:grid;grid-template-columns:minmax(0,1fr)}dialog.photo-editor .form-actions button{width:100%}}
dialog.photo-editor .pf-icon{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
/* Keep the editor's primary actions visible while its workspace scrolls. */
dialog.photo-editor[open]{display:flex;flex-direction:column;height:min(760px,60dvh);min-height:0;overflow:hidden;padding:24px 28px}
dialog.photo-editor .photo-editor-header{align-items:center;flex:none;gap:12px;margin-bottom:16px}
dialog.photo-editor .photo-editor-heading{flex:1}
dialog.photo-editor .photo-editor-header h2{font-size:22px;line-height:28px}
dialog.photo-editor .photo-editor-info-open{display:inline-flex;align-items:center;gap:8px;flex:none}
dialog.photo-editor .photo-editor-body{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;scroll-padding:16px}
dialog.photo-editor .photo-editor-tools{margin:16px 0;gap:16px}
dialog.photo-editor .photo-editor-tools label{flex-direction:row;align-items:center;gap:12px}
dialog.photo-editor .photo-editor-tools input[data-width],dialog.photo-editor .photo-editor-tools select[data-zoom]{width:100%;min-width:60px}
dialog.photo-editor .photo-editor-tools label:has([data-text]){flex-direction:column;align-items:stretch}
dialog.photo-editor .photo-editor-viewport{margin:16px 0;max-height:24dvh;padding:12px}
dialog.photo-editor>.form-actions{flex:none;margin:16px 0 0;padding-top:16px;border-top:1px solid #cdd7cd}
dialog.photo-editor .photo-editor-info .photo-editor-note{margin:0 0 24px}
dialog.photo-editor .photo-editor-info>button{display:block;margin-left:auto}
@media(max-width:600px){dialog.photo-editor[open]{height:100dvh;max-height:100dvh;padding:20px}dialog.photo-editor .photo-editor-header h2{font-size:20px;line-height:26px}dialog.photo-editor .photo-editor-info-open{width:48px;padding:10px;font-size:0}dialog.photo-editor .photo-editor-info-open .pf-icon{font-size:16px}dialog.photo-editor .photo-editor-tools label{flex-direction:row}dialog.photo-editor>.form-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}dialog.photo-editor>.form-actions [data-apply]{grid-column:1/-1;order:2}dialog.photo-editor>.form-actions [data-cancel]{grid-column:1/-1;order:3}}
/* The real form nodes remain in one form; only the workspace scrolls. */
#modal:has(>.report-ui form.report-editor){height:min(840px,60dvh);min-height:0;overflow:hidden}
#modal>.report-ui:has(form.report-editor){height:100%;display:flex;flex-direction:column;min-height:0}
#modal .report-ui:has(form.report-editor)>.report-modal-header{flex:none;margin-bottom:20px}
#modal .report-ui:has(form.report-editor)>.security{flex:none;margin:0 0 16px;padding:12px 16px}
#modal .report-ui:has(form.report-editor)>.report-editor-summary{flex:none;margin:0 0 16px}
#modal form.report-editor{display:flex;flex-direction:column;flex:1;min-height:0;gap:0}
#modal .report-editor-nav{flex:none;padding-bottom:16px;margin-bottom:20px}
#modal .report-editor-workspace{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scroll-padding:24px;padding:0 4px 4px 0}
#modal .report-editor>.report-editor-footer{flex:none;margin:20px 0 0;padding-top:16px}
#modal .report-editor-tools>.report-editor-signature-status{padding:16px 20px;margin:0 0 24px;border-radius:12px;background:#edf0ea}
#modal .report-ui:has(form.report-editor)>.error:not(:empty){flex:none;max-height:18dvh;overflow:auto;margin:16px 0 0}
dialog.photo-editor .photo-editor-color-swatch{display:inline-flex;position:relative;flex:none;width:48px;height:48px;box-sizing:border-box;border:2px solid #738379;border-radius:12px;background:var(--photo-color);box-shadow:inset 0 0 0 5px #f9faf6}
dialog.photo-editor .photo-editor-color-swatch input[data-color]{position:absolute;inset:0;width:100%;height:100%;min-height:100%;margin:0;padding:0;opacity:0;cursor:pointer}
dialog.photo-editor .photo-editor-color-swatch:focus-within{outline:3px solid #244f43;outline-offset:3px}
@media(max-width:600px){#modal:has(>.report-ui form.report-editor){height:100dvh;max-height:100dvh}#modal .report-editor-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:16px}#modal .report-editor-nav button{display:flex;flex-direction:column;gap:6px;padding:10px 6px;font-size:14px;line-height:20px;min-height:68px}#modal .report-editor>.report-editor-footer{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}#modal .report-editor-footer button{min-width:0;padding:10px;font-size:14px;line-height:20px}#modal .report-editor-workspace{scroll-padding:16px}}
#modal:has(>.report-ui form.report-editor){width:min(1040px,62vw);height:min(840px,64dvh);max-height:64dvh;padding:24px 28px}
#modal .report-ui:has(form.report-editor)>.report-modal-header{margin-bottom:16px}
#modal .report-ui:has(form.report-editor)>.report-editor-summary{margin-bottom:12px}
#modal .report-editor-nav{padding-bottom:12px;margin-bottom:12px}
#modal .report-editor>.report-editor-footer{margin-top:16px;padding-top:12px}
@media(max-width:600px){#modal:has(>.report-ui form.report-editor){width:100%;height:100dvh;max-height:100dvh;padding:24px 20px max(28px,env(safe-area-inset-bottom))}}
dialog.photo-editor button:disabled{background:#edf0ea;color:#52675f;border-color:#cdd7cd;box-shadow:none;opacity:1;cursor:not-allowed}
#modal .report-editor-workspace:focus-visible{outline:2px solid #244f43;outline-offset:-2px;border-radius:8px}
/* A landscape phone needs its height budget for the report, rather than a
   desktop-sized floating frame whose header consumes the entire workspace. */
@media(max-height:500px) and (min-width:601px) and (max-width:1100px){
 #modal[open]:has(>.report-ui form.report-editor){box-sizing:border-box;width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0;padding:12px 20px;overflow:auto}
 #modal .report-ui:has(form.report-editor)>.report-modal-header{margin-bottom:8px;gap:16px}
 #modal .report-ui:has(form.report-editor)>.report-modal-header h2{font-size:20px;line-height:28px}
 #modal .report-ui:has(form.report-editor)>.report-editor-summary{margin-bottom:8px}
 #modal form.report-editor .report-editor-nav{padding-bottom:8px;margin-bottom:8px;gap:12px}
 #modal form.report-editor .report-editor-workspace{min-height:120px;scroll-padding:16px}
 #modal form.report-editor>.report-editor-footer{margin-top:8px;padding-top:8px}
}
@media(max-width:600px){#modal .report-editor-nav{grid-template-columns:repeat(var(--report-view-count,3),minmax(0,1fr))}#modal .report-editor-footer>button:only-child{grid-column:1/-1}}

/* M31: compare work links, then review the explicit change. */
#modal:has(.report-time-links){width:min(1040px,62vw);height:min(840px,64dvh);max-height:64dvh;min-height:0;padding:24px 28px;overflow:hidden}
#modal>.report-ui:has(.report-time-links){height:100%;display:flex;flex-direction:column;min-height:0}
#modal .report-ui:has(.report-time-links)>.report-modal-header{flex:none;margin-bottom:12px}
#modal .report-time-links{display:flex;flex-direction:column;flex:1;min-height:0}
#modal .time-link-workspace{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scroll-padding:24px;padding:4px}
#modal .time-link-workspace:focus-visible{outline:2px solid #244f43;outline-offset:-2px;border-radius:8px}
#modal .time-link-list{display:grid;gap:24px}
#modal .time-link-list>article{padding:0 0 24px;border-bottom:1px solid #cdd7cd}
#modal .time-link-status{display:flex;align-items:center;gap:10px;font-size:16px;font-weight:600;margin:0 0 12px}
#modal .time-link-comparison{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
#modal .report-time-links .report-time-summary{display:block;margin:0;padding:16px;background:#edf0ea;border:1px solid #d5ded3;border-radius:14px;min-width:0}
#modal .report-time-summary h3{display:flex;align-items:flex-start;gap:10px;margin:0 0 8px;font-size:16px;line-height:24px;font-weight:500}
#modal .report-time-summary strong{display:block;font-size:18px;line-height:26px;font-weight:600}
#modal .report-time-summary p{margin:8px 0 0;font-size:14px;line-height:20px;color:#52675f}
#modal .report-time-links button{display:inline-flex;align-items:center;justify-content:center;gap:10px}
#modal .time-link-card-actions{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap;margin:16px 0 0}
#modal .time-link-notice{display:flex;align-items:flex-start;gap:12px;padding:16px 20px;background:#edf0ea;border-radius:14px;margin:0 0 24px}
#modal .time-link-notice>.pf-icon{flex:none;margin-top:3px}
#modal .time-link-empty{text-align:center;padding:32px 24px;color:#52675f}
#modal .time-link-empty>.pf-icon{width:40px;height:40px}
#modal .time-link-facts{display:grid;gap:20px;margin:24px 0 0}
#modal .time-link-facts>div{display:grid;gap:8px}
#modal .time-link-facts dt{font-size:14px;color:#52675f}
#modal .time-link-facts dd{margin:0;overflow-wrap:anywhere;white-space:pre-wrap}
#modal [data-link-form]{display:grid;gap:24px;margin-top:28px}
#modal [data-link-form]>label{margin:0}
#modal [data-link-form]>p{margin:0}
#modal .time-link-footer{flex:none;margin-top:20px;padding-top:16px}
#modal .report-ui:has(.report-time-links)>.error:not(:empty){flex:none;max-height:16dvh;overflow:auto;margin:16px 0 0}
@media(max-width:600px){#modal:has(.report-time-links){width:100%;height:100dvh;max-height:100dvh;padding:24px 20px max(28px,env(safe-area-inset-bottom))}#modal .time-link-comparison{grid-template-columns:minmax(0,1fr);gap:16px}#modal .time-link-list>article{padding:0 0 24px}#modal .time-link-card-actions{display:grid;grid-template-columns:minmax(0,1fr)}#modal .time-link-footer{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}#modal .time-link-footer button{width:100%;padding:10px 12px}#modal .time-link-footer .primary{order:0}}

/* M32: measurement, minute proposal and reviewed work share one clear frame. */
#modal:has(.report-timer-layout){width:min(1040px,62vw);height:min(840px,64dvh);max-height:64dvh;min-height:0;padding:24px 28px;overflow:hidden}
#modal>.report-ui:has(.report-timer-layout){height:100%;display:flex;flex-direction:column;min-height:0}
#modal .report-ui:has(.report-timer-layout)>.report-modal-header{flex:none;margin-bottom:16px}
#modal .report-timer-layout,#modal .report-timer-layout>form{display:flex;flex-direction:column;flex:1;min-height:0;gap:0}
#modal .report-timer-workspace{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scroll-padding:24px;padding:4px}
#modal .report-timer-workspace:focus-visible{outline:2px solid #244f43;outline-offset:-2px;border-radius:8px}
#modal .report-timer-footer{flex:none;margin:16px 0 0;padding-top:16px}
#modal .report-timer-layout button{display:inline-flex;align-items:center;justify-content:center;gap:10px}
#modal .report-timer-nav{flex:none;display:flex;gap:12px;margin:0 0 16px;padding-bottom:12px;border-bottom:1px solid #cdd7cd}
#modal .report-timer-nav button[aria-pressed=true]{background:#244f43;color:#fff;border-color:#244f43}
#modal .report-timer-context{margin:0 0 20px;font-size:18px;font-weight:600}
#modal .report-timer-start-card{border:1px solid #cdd7cd;border-radius:18px;background:#edf0ea;padding:20px;margin-bottom:24px}
#modal .report-timer-start-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;align-items:end}
#modal .report-timer-start-fields>label{margin:0}
#modal .report-timer-start-card>.form-actions{margin-top:20px;padding-top:16px}
#modal .report-timer-layout .workflow-list{margin:24px 0 0}
#modal .report-timer-layout .workflow-list>li{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:20px;margin:0}
#modal .report-timer-layout .workflow-list>li p{font-size:14px;margin:8px 0 0}
#modal .report-timer-metric{display:flex;align-items:baseline;flex-wrap:wrap;gap:10px;padding:24px;background:#edf0ea;border:1px solid #cdd7cd;border-radius:18px}
#modal .report-timer-metric [data-time-live]{display:block;font-size:40px;line-height:48px;letter-spacing:-1px}
#modal .report-timer-overview>small{display:block;margin:16px 0 24px}
#modal .report-timer-detail-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:12px;margin-top:24px}
#modal .report-timer-layout[data-timer-mode=minutes] .report-timer-overview{display:grid;gap:24px}
#modal .report-timer-layout[data-timer-mode=minutes] .report-timer-overview>p{margin:0}
#modal .report-timer-layout[data-timer-mode=minutes] .form-grid{gap:20px 24px}
#modal .report-timer-layout[data-timer-mode=minutes] .form-grid>label,#modal .report-timer-layout[data-timer-mode=minutes] .report-timer-overview>label{margin:0}
#modal .report-timer-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:24px 0}
#modal .report-timer-metric-card{padding:20px 16px;background:#edf0ea;border:1px solid #cdd7cd;border-radius:14px;min-width:0}
#modal .report-timer-metric-card dt{font-size:14px;line-height:22px;font-weight:500;margin-bottom:12px}
#modal .report-timer-metric-card dd{font-size:20px;line-height:28px;font-weight:600;margin:0;overflow-wrap:anywhere}
#modal .report-ui:has(.report-timer-layout)>.error:not(:empty){flex:none;max-height:16dvh;overflow:auto;margin:16px 0 0}
@media(max-width:600px){#modal:has(.report-timer-layout){width:100%;height:100dvh;max-height:100dvh;padding:24px 20px max(28px,env(safe-area-inset-bottom))}#modal .report-timer-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}#modal .report-timer-start-fields,#modal .report-timer-metrics{grid-template-columns:minmax(0,1fr)}#modal .report-timer-start-card{padding:20px 16px}#modal .report-timer-footer{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}#modal .report-timer-footer button{width:100%;padding:10px 12px}#modal .report-timer-footer .primary{order:0}#modal .report-timer-metric [data-time-live]{font-size:32px;line-height:40px}#modal .report-timer-layout .workflow-list>li{align-items:stretch;flex-direction:column}#modal .report-timer-layout .workflow-list>li button{align-self:flex-end}}

#modal .report-timer-layout[data-timer-mode=measurement] .report-timer-context{font-size:16px;line-height:24px;margin:0 0 8px}
#modal .report-timer-layout[data-timer-mode=measurement] .report-timer-overview>p:not(.report-timer-context):not(.report-timer-metric){font-size:14px;line-height:20px;margin:0 0 12px}
#modal .report-timer-layout[data-timer-mode=measurement] .report-timer-metric{margin:0;padding:12px 16px;gap:8px}
#modal .report-timer-layout[data-timer-mode=measurement] .report-timer-overview>small{font-size:14px;line-height:20px;margin:8px 0 0}
#modal .report-timer-layout[data-timer-mode=measurement] .report-timer-nav{margin-bottom:12px;padding-bottom:8px}

#modal .report-timer-metric [data-time-live]{font-variant-numeric:tabular-nums}
#modal .report-timer-layout[data-timer-mode=confirm] .report-timer-target{font-size:14px;line-height:22px;margin:0 0 12px}
#modal .report-timer-layout[data-timer-mode=confirm] .report-timer-metrics{margin:0 0 20px}
#modal .report-timer-layout[data-timer-mode=confirm] .report-timer-metric-card{padding:16px}
#modal .report-timer-layout[data-timer-mode=confirm] .report-timer-metric-card dt{margin-bottom:8px}

/* M27: review the recipient and immutable PDF before queuing a share. */
#modal:has(.report-mail-layout){width:min(1040px,62vw);height:min(840px,64dvh);max-height:64dvh;min-height:0;padding:24px 28px;overflow:hidden}
#modal>.report-ui:has(.report-mail-layout){height:100%;display:flex;flex-direction:column;min-height:0}
#modal .report-ui:has(.report-mail-layout)>.report-modal-header{flex:none;margin-bottom:16px}
#modal .report-mail-layout,#modal .report-mail-layout>form{display:flex;flex-direction:column;flex:1;min-height:0;gap:0}
#modal .report-mail-workspace{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scroll-padding:24px;padding:4px}
#modal .report-mail-workspace:focus-visible{outline:2px solid #244f43;outline-offset:-2px;border-radius:8px}
#modal .report-mail-footer{flex:none;margin:16px 0 0;padding-top:16px}
#modal .report-mail-layout button{display:inline-flex;align-items:center;justify-content:center;gap:10px}
#modal .report-mail-footer .primary{order:1}
#modal .report-mail-layout .workflow-list{display:grid;gap:24px;margin:0;padding:0}
#modal .report-mail-layout .report-mail-row{display:block;padding:20px;border:1px solid #cdd7cd;border-radius:18px;background:#fff;margin:0;min-width:0}
#modal .report-mail-layout .report-mail-recipient{display:block;font-size:18px;line-height:26px;overflow-wrap:anywhere}
#modal .report-mail-row p{font-size:14px;line-height:22px;margin:12px 0 0}
#modal .report-mail-row .report-mail-state{font-size:16px;line-height:24px;font-weight:600}
#modal .report-mail-row .report-mail-actions{margin-top:20px;padding-top:16px;gap:12px}
#modal .report-mail-info-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:24px}
#modal .report-mail-info ol{padding-left:24px;display:grid;gap:24px}
#modal .report-mail-info ol p{margin:8px 0 0}
#modal .report-mail-layout[data-mail-mode=share] .report-mail-workspace{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:24px}
#modal .report-mail-layout[data-mail-mode=share] .report-mail-workspace>p,#modal .report-mail-layout[data-mail-mode=share] label:has([name=recipient]),#modal .report-mail-layout[data-mail-mode=share] label:has(textarea){grid-column:1/-1}
#modal .report-mail-layout label{margin:0}
#modal .report-mail-layout .report-mail-workspace>p{margin:0 0 24px}
#modal .report-mail-layout[data-mail-mode=share] .report-mail-workspace>p{margin:0}
#modal .report-mail-layout[data-mail-mode=decision] .report-mail-workspace{display:grid;align-content:start;gap:24px}
#modal .report-mail-layout[data-mail-mode=decision] .report-mail-workspace>p{margin:0}
#modal .report-mail-layout .report-mail-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:0 0 24px}
#modal .report-mail-fact{display:block;padding:16px;background:#edf0ea;border:1px solid #cdd7cd;border-radius:14px;min-width:0}
#modal .report-mail-fact-recipient,#modal .report-mail-fact:last-child{grid-column:1/-1}
#modal .report-mail-fact dt{font-size:14px;line-height:22px;margin-bottom:8px;font-weight:500}
#modal .report-mail-fact dd{font-size:16px;line-height:24px;margin:0;overflow-wrap:anywhere;white-space:pre-wrap}
#modal .report-mail-fact-recipient dd{font-size:18px;line-height:26px;font-weight:600}
#modal .report-mail-layout[data-mail-mode=decision-review] .report-mail-workspace>p:first-child{padding:16px 20px;background:#edf0ea;border-radius:14px}
#modal .report-ui:has(.report-mail-layout)>.error:not(:empty){flex:none;max-height:16dvh;overflow:auto;margin:16px 0 0}
@media(max-width:600px){#modal:has(.report-mail-layout){width:100%;height:100dvh;max-height:100dvh;padding:24px 20px max(28px,env(safe-area-inset-bottom))}#modal .report-mail-layout[data-mail-mode=share] .report-mail-workspace,#modal .report-mail-layout .report-mail-facts{grid-template-columns:minmax(0,1fr)}#modal .report-mail-footer,#modal .report-mail-row .report-mail-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}#modal .report-mail-footer button,#modal .report-mail-row .report-mail-actions button{width:100%;padding:10px 12px}#modal .report-mail-footer .primary{order:0}#modal .report-mail-layout .report-mail-row{padding:20px 16px}}

/* Keep the original-work card separate from its preservation notice. */
#modal .time-link-workspace>.report-time-summary+.time-link-notice{margin-top:24px}

/* QR/barcode and serial capture: preserve controls in one readable workspace. */
dialog.report-code-scanner[open]{display:flex;flex-direction:column;width:min(1040px,52vw);height:min(840px,76dvh);max-height:76dvh;max-width:calc(100vw - 64px);box-sizing:border-box;overflow:hidden;padding:24px 28px;border:1px solid #cdd7cd;border-radius:24px;background:#f9faf6;color:#203a32;font:16px/1.6 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;box-shadow:0 28px 90px #122b2340;animation:report-scan-enter 160ms ease-out}
dialog.report-code-scanner::backdrop{background:#17382b59;backdrop-filter:blur(6px)}
.report-code-scanner [hidden]{display:none!important}
.report-code-scanner button,.report-code-scanner .report-scan-upload{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:48px;padding:11px 18px;box-sizing:border-box;border:1px solid #738379;border-radius:12px;background:#f9faf6;color:#203a32;font:inherit;line-height:24px;white-space:normal;overflow-wrap:anywhere;box-shadow:0 3px 6px #6d816921,0 1px 0 #fff inset}
.report-code-scanner button.primary{background:#244f43;color:#fff;border-color:#244f43}.report-code-scanner button:disabled{opacity:.5;cursor:not-allowed}
.report-code-scanner :focus-visible{outline:3px solid #244f43;outline-offset:3px}
.report-scan-header{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:20px;flex:none}.report-scan-title{display:flex;align-items:flex-start;gap:16px;min-width:0}.report-scan-title>.pf-icon{margin-top:5px;flex:none}
.report-scan-header h2{font-size:24px;line-height:32px;margin:0;font-weight:650;overflow-wrap:anywhere}.report-scan-header>[data-cancel]{flex:none}
.report-scan-workspace{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scroll-padding:24px;padding:4px}.report-scan-main{display:grid;gap:24px}
.report-code-scanner h3{display:flex;align-items:center;gap:12px;font-size:18px;line-height:26px;margin:0 0 20px;font-weight:600}
.report-scan-method-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.report-scan-method-actions>[data-stop]{grid-column:1/-1}
.report-code-scanner label{display:grid;gap:10px;margin:0;font-weight:500}.report-code-scanner input:not([type=file]),.report-code-scanner select,.report-code-scanner textarea{box-sizing:border-box;width:100%;min-height:48px;padding:12px 14px;border:1px solid #738379;border-radius:12px;background:#fff;color:#203a32;font:inherit}
.report-code-scanner .report-scan-upload{position:relative;display:flex;margin:0;cursor:pointer;font-weight:500;min-height:80px}.report-scan-upload input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.report-scan-upload:focus-within{outline:3px solid #244f43;outline-offset:3px}
.report-code-scanner .report-scan-video{width:100%;max-height:240px;margin-top:20px;background:#e8ede6;border-radius:16px;object-fit:contain;outline:2px solid #244f4344}
.report-code-scanner [data-ocr-panel]{margin-top:24px;padding:24px;border:1px solid #cdd7cd;border-radius:16px;background:#edf0ea;display:grid;gap:20px}.report-code-scanner [data-ocr-panel] h3{margin:0}.report-code-scanner [data-ocr-cancel]{margin-top:20px}
.report-scan-raw{display:grid;gap:20px;border-top:1px solid #cdd7cd;padding-top:20px}.report-scan-raw textarea{min-height:100px}.report-scan-raw p{margin:0}
.report-scan-values{display:grid;gap:24px;padding:24px;border:1px solid #cdd7cd;border-radius:16px;background:#edf0ea}.report-scan-values h3{margin:0}.report-scan-values p{margin:0;color:#52675f}
.report-code-scanner [data-scan-status]:empty,.report-code-scanner [data-results]:empty,.report-code-scanner>[role=alert]:empty{display:none}.report-code-scanner [data-scan-status]{margin:0;padding:16px 20px;border-radius:12px;background:#edf0ea}
.report-code-scanner [data-results]>ul{list-style:none;margin:0;padding:0;display:grid;gap:24px}.report-scan-match{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:24px;border:1px solid #cdd7cd;border-radius:16px;background:#fff}.report-scan-match>strong,.report-scan-match>p{grid-column:1/-1}.report-scan-match>strong{font-size:18px;line-height:26px}.report-scan-match>p{margin:0;color:#52675f}
.report-scan-information p{margin:0 0 24px}.report-code-scanner>[role=alert]{flex:none;margin:16px 0 0;padding:16px;border-radius:12px;background:#fff0eb;color:#8e3324;max-height:18dvh;overflow:auto}
.report-scan-footer{flex:none;display:flex;justify-content:flex-end;flex-wrap:wrap;gap:12px;border-top:1px solid #cdd7cd;padding-top:20px;margin-top:24px}
@keyframes report-scan-enter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:600px){dialog.report-code-scanner[open]{width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0;padding:24px 20px max(28px,env(safe-area-inset-bottom))}.report-scan-header{gap:16px}.report-scan-header>[data-cancel]{width:48px;padding:10px}.report-scan-header>[data-cancel]>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.report-scan-method-actions{grid-template-columns:minmax(0,1fr);gap:12px}.report-scan-upload{min-height:64px!important}.report-scan-values,.report-code-scanner [data-ocr-panel],.report-scan-match{padding:20px}.report-scan-match{grid-template-columns:minmax(0,1fr)}.report-scan-footer{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin-top:20px;padding-top:16px}.report-scan-footer>button{width:100%}}
@media(prefers-reduced-motion:reduce){dialog.report-code-scanner[open],.report-code-scanner *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.report-code-scanner .pf-icon{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle}
.report-scan-header>[data-cancel]{min-width:100px}
@media(max-width:600px){.report-scan-header>[data-cancel]{min-width:48px}}
#modal .report-editor [data-scan-code]{display:flex;margin:12px 0 0 auto;gap:10px}
@media(max-width:600px){#modal .report-editor [data-scan-code]{width:100%;justify-content:center}}
/* Equipment: fixed navigation with a single scroll workspace. */
dialog.report-equipment-details[open]{display:flex;flex-direction:column;width:min(1040px,52vw);height:min(840px,76dvh);min-height:0;max-height:76dvh;padding:24px 28px;overflow:hidden}
.report-equipment-details [hidden]{display:none!important}.report-equipment-details .pf-icon{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.report-equipment-details button{display:inline-flex;align-items:center;justify-content:center;gap:10px;font:inherit;line-height:24px;cursor:pointer}.report-equipment-details button:disabled{opacity:.5;cursor:not-allowed}.equipment-header{display:flex;align-items:center;justify-content:space-between;gap:24px;flex:none}.equipment-header>div{display:flex;align-items:center;gap:12px;min-width:0}.equipment-header h2{margin:0!important}.equipment-header>[data-equipment-close]{width:48px;padding:10px;flex:none}.equipment-header>[data-equipment-close]>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.report-equipment-details>nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;flex:none;margin:24px 0}.report-equipment-details>nav button{padding:10px 12px}.report-equipment-details>nav button[aria-pressed=true]{background:#244f43;border-color:#244f43;color:#fff}
.equipment-workspace{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scroll-padding:20px;padding:4px 4px 20px}.equipment-workspace [data-equipment-meta]{padding:24px;border:1px solid #cdd7cd;border-radius:16px;background:#edf0ea;margin-bottom:28px}.equipment-workspace h3{margin:0 0 20px!important;font-size:18px;line-height:26px}.equipment-workspace h4{font-size:16px;line-height:24px;margin:28px 0 16px}.equipment-workspace dl{display:grid;grid-template-columns:140px minmax(0,1fr);gap:12px 24px;margin:0}.equipment-workspace dt{color:#52675f}.equipment-workspace dd{margin:0;overflow-wrap:anywhere}.equipment-workspace ul{list-style:none;margin:0 0 24px;padding:0;display:grid;gap:20px}.equipment-workspace li{padding:24px;border:1px solid #cdd7cd;border-radius:16px;background:#fff;display:flex;flex-wrap:wrap;gap:16px}.equipment-workspace li>strong,.equipment-workspace li>p{flex-basis:100%;margin:0}.equipment-workspace li>button{margin-left:auto}.equipment-workspace p{margin:0 0 24px}.equipment-workspace a{color:#244f43;text-underline-offset:4px;overflow-wrap:anywhere;min-height:48px;display:inline-flex;align-items:center}.equipment-workspace label{display:grid;gap:10px;margin:20px 0}.equipment-workspace select{width:100%;min-height:48px;padding:12px;border:1px solid #738379;border-radius:12px;background:#fff;box-sizing:border-box}.equipment-workspace [data-document-picker]:not(:empty){margin-top:24px;padding:20px;border:1px solid #cdd7cd;border-radius:16px}.equipment-workspace [data-document-picker]>button{margin:12px 12px 0 0}
.equipment-footer{display:flex;justify-content:flex-end;gap:12px;margin-top:20px;padding-top:16px;border-top:1px solid #cdd7cd;flex:none}.report-equipment-details>[role=alert]:empty{display:none}.report-equipment-details>[role=alert]:not(:empty){margin:16px 0 0;padding:16px;background:#fff0eb;color:#8e3324;border-radius:12px;max-height:18dvh;overflow:auto}
@media(max-width:1000px){dialog.report-equipment-details[open]{width:calc(100vw - 48px);max-width:none}.report-equipment-details>nav{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:600px){dialog.report-equipment-details[open]{width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0;padding:24px 20px max(28px,env(safe-area-inset-bottom))}.report-equipment-details>nav{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:20px 0}.equipment-workspace [data-equipment-meta],.equipment-workspace li{padding:20px}.equipment-workspace dl{grid-template-columns:minmax(0,1fr);gap:4px}.equipment-workspace dd:not(:last-child){margin-bottom:12px}.equipment-workspace li>button,.equipment-footer>button{width:100%}.equipment-header h2{font-size:22px;line-height:30px}}

.equipment-workspace [data-equipment-meta]{padding:20px;margin-bottom:24px}.equipment-workspace [data-equipment-meta] h3{margin-bottom:12px!important}.equipment-workspace dl[data-grouped]{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.equipment-workspace dl[data-grouped] dt{font-size:14px;line-height:22px;margin-bottom:4px}.equipment-workspace dl[data-grouped] dd{font-size:16px;line-height:24px;margin:0}
@media(max-width:600px){.equipment-workspace dl[data-grouped]{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}}

/* Selected navigation must not change wrapping or move the content. */
.report-equipment-details>nav button,.report-equipment-details>nav button[aria-pressed=true]{font-weight:500}

.equipment-workspace [data-equipment-history]>button{display:flex;margin:12px 0 0 auto}
@media(max-width:600px){.equipment-workspace [data-equipment-history]>button,.equipment-workspace [data-document-picker]>button{width:100%;margin:12px 0 0}}

/* Tablet capture needs readable method controls instead of a narrow desktop column. */
@media(min-width:601px) and (max-width:1000px){dialog.report-code-scanner[open]{width:calc(100vw - 48px);max-width:none}.report-scan-method-actions{grid-template-columns:repeat(3,minmax(0,1fr))}.report-scan-method-actions button span,.report-scan-upload span{min-width:0;overflow-wrap:normal;word-break:normal}}
@media(min-width:601px) and (max-width:760px){.report-scan-method-actions{grid-template-columns:minmax(0,1fr)}.report-code-scanner .report-scan-upload{min-height:64px}}

@media(min-width:761px){.report-scan-method-actions.has-photo-capture{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Signature assignment: original form controls, one visible task at a time. */
#modal[open]:has(.signature-request-layout){width:min(1040px,52vw);height:min(900px,76dvh);min-height:0;max-height:76dvh;padding:24px 28px;overflow:hidden}
#modal .signature-request-layout{height:100%;max-height:none;overflow:hidden;padding:0;display:flex;flex-direction:column;gap:20px}
.signature-request-layout [hidden]{display:none!important}
.signature-request-layout .pf-icon{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#modal .signature-request-layout button{display:inline-flex;align-items:center;justify-content:center;gap:10px;margin:0;font-weight:500}
.signature-request-header{display:flex;align-items:center;justify-content:space-between;gap:20px;flex:none}
.signature-request-header>div{display:flex;align-items:center;gap:12px;min-width:0}
#modal .signature-request-header h2{margin:0;font-size:24px;line-height:32px}
.signature-request-header>[data-signature-close]{width:48px;flex:none;padding:10px}
.signature-request-header>[data-signature-close]>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.signature-request-layout form{display:flex;flex-direction:column;flex:1;min-height:0;gap:20px}
.signature-request-context{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 20px;align-items:center;flex:none}
.signature-request-context>p{margin:0!important;overflow-wrap:anywhere}.signature-request-context>p:first-child{font-size:16px;font-weight:600}.signature-request-context>p:nth-child(2){grid-column:1;color:#52675f;font-size:14px;line-height:22px}
.signature-request-count{grid-column:2;grid-row:1/3;border-radius:100px;padding:6px 12px;background:#e4ebe3;font-size:14px;white-space:nowrap}
.signature-request-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;flex:none}
#modal .signature-request-nav>button{padding:10px 8px;font-size:16px;line-height:24px}
#modal .signature-request-nav>button[aria-pressed=true]{background:#244f43;color:#fff;border-color:#244f43}
.signature-request-workspace{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scroll-padding:20px;padding:4px 4px 20px}
.signature-request-workspace>.signature-request-context{margin-bottom:20px}.signature-request-workspace>.signature-request-nav{margin-bottom:24px}
#modal .signature-request-layout h3{display:flex;align-items:center;gap:10px;font-size:18px;line-height:26px;margin:0 0 20px}
#modal .signature-request-layout label{display:flex;flex-direction:column;gap:10px;margin:0 0 24px}
#modal .signature-request-layout .workflow-check{flex-direction:row;align-items:center;gap:12px;margin-top:24px}
#modal .signature-request-layout fieldset{margin:0;padding:0;border:0;min-width:0}
.signature-request-layout fieldset>legend{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.signature-request-layout fieldset>button{margin:0 0 20px auto!important;display:flex!important}
.signature-request-layout fieldset>p{margin:0 0 24px;line-height:24px}
.signature-request-layout [data-signature-reminder-policy]{padding:24px!important;background:#edf0ea;border-radius:16px!important}
.signature-request-layout [data-signature-reminder-policy]:disabled{opacity:.55}
.signature-request-search{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:16px 24px;margin-bottom:24px}
#modal .signature-request-search>label,#modal .signature-request-picker>label{margin:0}
.signature-request-search>button{grid-column:1/-1;justify-self:end}
.signature-request-picker{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:16px;margin-bottom:24px}
.signature-request-settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 24px}.signature-request-full{grid-column:1/-1}
.signature-request-selected{margin-top:28px;padding-top:24px;border-top:1px solid #cdd7cd}
#modal .signature-request-selected ol{list-style-position:inside;margin:0;padding:0;display:grid;gap:16px}
.signature-request-selected li{padding:20px;border:1px solid #cdd7cd;border-radius:16px;background:#fff;overflow-wrap:anywhere}
.signature-request-selected li button{margin:12px 8px 0 0!important}
.signature-request-selected ol{list-style:none}.signature-request-person-name{margin:0!important;overflow-wrap:anywhere}.signature-request-person-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:12px;margin-top:16px}
.signature-request-selected .signature-request-person-actions button{margin:0!important}
.signature-request-person-actions :is([data-signature-up],[data-signature-down]){width:48px;padding:10px!important;flex:none}
.signature-request-person-actions :is([data-signature-up],[data-signature-down])>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.signature-request-person-actions [data-signature-up] .pf-icon{transform:rotate(-90deg)}.signature-request-person-actions [data-signature-down] .pf-icon{transform:rotate(90deg)}
.signature-request-summary{display:grid;grid-template-columns:140px minmax(0,1fr);gap:12px 24px;margin:0}.signature-request-summary dt{color:#52675f}.signature-request-summary dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
.signature-request-conditions{margin-top:28px;padding:20px 24px;background:#edf0ea;border-radius:16px}.signature-request-conditions p{margin:0 0 16px}.signature-request-conditions p:last-child{margin:0}
.signature-request-footer{display:flex;justify-content:flex-end;gap:12px;flex:none;border-top:1px solid #cdd7cd;padding-top:16px}
.signature-request-layout .error:not(:empty){flex:none;margin:0;padding:16px;border-radius:12px;background:#fff0eb;color:#8e3324;max-height:15dvh;overflow:auto}
@media(max-width:1100px){#modal[open]:has(.signature-request-layout){width:calc(100vw - 48px);max-width:none}}
@media(max-width:600px){#modal[open]:has(.signature-request-layout){width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0;padding:24px 20px max(24px,env(safe-area-inset-bottom))}.signature-request-layout form{gap:16px}.signature-request-nav{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.signature-request-settings-grid{grid-template-columns:minmax(0,1fr)}.signature-request-footer{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.signature-request-footer>button{width:100%}.signature-request-summary{grid-template-columns:minmax(0,1fr);gap:4px}.signature-request-summary dd{margin-bottom:12px}.signature-request-context{gap:4px 12px}}
@media(max-width:600px){.signature-request-search{grid-template-columns:minmax(0,1fr)}.signature-request-search>button{width:100%}}

/* Signature review: a single readable workspace with explicit sections. */
#modal[open]:has(.signature-review-layout){width:min(1040px,52vw);height:min(900px,76dvh);min-height:0;max-height:76dvh;padding:24px 28px;overflow:hidden}
#modal .signature-review-layout{height:100%;max-height:none;overflow:hidden;padding:0;display:flex;flex-direction:column;gap:20px}
.signature-review-layout [hidden]{display:none!important}
.signature-review-layout .pf-icon{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#modal .signature-review-layout button{display:inline-flex;align-items:center;justify-content:center;gap:10px;margin:0;font-weight:500;min-height:48px}
.signature-review-header{display:flex;align-items:center;justify-content:space-between;gap:20px;flex:none}.signature-review-header>div{display:flex;align-items:center;gap:12px;min-width:0}
#modal .signature-review-header h2{margin:0;font-size:24px;line-height:32px}
.signature-review-header>[data-signature-close]{width:48px;flex:none;padding:10px}
.signature-review-header>[data-signature-close]>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.signature-review-workspace{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scroll-padding:20px;padding:4px 4px 20px}
#modal .signature-review-layout h3{font-size:18px;line-height:26px;margin:0 0 20px}
#modal .signature-review-layout p{margin:0 0 20px;line-height:24px;overflow-wrap:anywhere}
.signature-review-layout [data-signature-summary]{padding:20px;background:#edf0ea;border:1px solid #cdd7cd;border-radius:16px;margin-bottom:24px}
#modal .signature-review-layout [data-signature-summary] h3{margin-bottom:12px}#modal .signature-review-layout [data-signature-summary] p{margin-bottom:8px}#modal .signature-review-layout [data-signature-summary] p:last-child{margin-bottom:0}
.signature-review-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:28px}
#modal .signature-review-nav button{padding:10px 8px;font-size:16px;line-height:24px}#modal .signature-review-nav button[aria-pressed=true]{background:#244f43;color:#fff;border-color:#244f43}
.signature-review-layout :is(ol,ul){display:grid;gap:16px;list-style:none;margin:0 0 28px;padding:0}
.signature-review-layout li{padding:20px;border:1px solid #cdd7cd;border-radius:16px;background:#fff;overflow-wrap:anywhere;line-height:24px}
#modal .signature-review-layout li p:last-child{margin-bottom:0}#modal .signature-review-layout [data-signature-inbox-list] strong{font-size:18px;line-height:26px;display:block;margin-bottom:12px}
#modal .signature-review-layout [data-signature-open]{display:flex;margin-left:auto}
#modal .signature-review-layout fieldset{margin:28px 0 0;border:1px solid #cdd7cd;border-radius:16px;padding:20px;min-width:0}
.signature-review-layout legend{font-weight:600;padding:0 8px}.signature-review-layout .workflow-check{display:flex;align-items:flex-start;gap:12px;line-height:24px;margin:24px 0 0!important}.signature-review-layout .workflow-check input{width:24px;height:24px;flex:none;margin:0}
#modal .signature-review-layout [data-signature-download]{display:flex;margin:0 0 20px auto}#modal .signature-review-layout [data-signature-downloaded]:empty{display:none}
.signature-review-layout [data-signature-reminders]{margin-top:28px;padding-top:24px;border-top:1px solid #cdd7cd}.signature-review-management{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:12px;margin-top:24px}
.signature-review-footer{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:12px;flex:none;padding-top:20px;border-top:1px solid #cdd7cd}.signature-review-footer>[data-signature-back]{margin-right:auto!important}
.signature-review-layout>.error:empty{display:none}.signature-review-layout>.error:not(:empty){flex:none;max-height:16dvh;overflow:auto;padding:16px;border-radius:12px;background:#fff0eb;color:#8e3324;margin:0!important}.signature-review-layout>[data-signature-retry]{flex:none;align-self:flex-end}
.signature-review-layout .workflow-tabs{display:flex;flex-wrap:wrap;gap:12px;margin:0 0 28px!important}.signature-review-layout [data-signature-empty]{padding:32px 24px;background:#edf0ea;border-radius:16px;display:flex;align-items:center;gap:16px}
#modal .signature-review-layout form label{display:flex;flex-direction:column;gap:10px;margin:0 0 24px}.signature-review-layout textarea{box-sizing:border-box;width:100%;min-height:180px;padding:16px;line-height:24px;resize:vertical}
@media(max-width:1100px){#modal[open]:has(.signature-review-layout){width:calc(100vw - 48px);max-width:none}}
@media(max-width:600px){#modal[open]:has(.signature-review-layout){width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0;padding:24px 20px max(28px,env(safe-area-inset-bottom))}#modal .signature-review-header h2{font-size:22px;line-height:30px}.signature-review-nav{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.signature-review-footer{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.signature-review-footer.is-single{grid-template-columns:minmax(0,1fr)}.signature-review-footer>button{width:100%;margin:0!important}.signature-review-layout .workflow-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.signature-review-management{display:grid;grid-template-columns:minmax(0,1fr)}#modal .signature-review-layout [data-signature-download],#modal .signature-review-layout [data-signature-open]{width:100%}}
#modal .signature-review-layout .workflow-tabs button[aria-pressed=true]{background:#244f43;color:#fff;border-color:#244f43}
@media(max-width:600px){#modal .signature-review-layout .workflow-tabs button{padding:10px 8px;overflow-wrap:normal;word-break:normal}.signature-review-layout[data-signature-layout=inbox] .signature-review-footer>button:last-child{grid-column:1/-1}}
@media(max-width:600px){#modal .signature-review-layout textarea{min-height:clamp(96px,24dvh,180px)}}

/* Keep the page still while the browser's modal top layer is active. */
html{scrollbar-gutter:stable}
html:has(dialog:modal){overflow:hidden}

/* Signature delivery: short cards, explicit readonly information view. */
.signature-mail-layout [hidden]{display:none!important}
.signature-mail-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin:0 0 28px}
#modal .signature-mail-filters label{display:flex;flex-direction:column;gap:10px;margin:0}
.signature-mail-layout select{box-sizing:border-box;min-height:48px;width:100%;padding:12px;border:1px solid #738379;border-radius:12px;background:#fff;color:#203a32}
#modal .signature-mail-layout [data-mail-note]{font-size:14px;line-height:22px;color:#52675f;background:#edf0ea;border-radius:12px;padding:16px;display:flex;gap:12px;margin-bottom:24px}
.signature-mail-context,.signature-mail-decision{padding:20px;background:#edf0ea;border:1px solid #cdd7cd;border-radius:16px;margin-bottom:24px}
#modal .signature-mail-context h3{margin-bottom:12px}#modal .signature-mail-context p:last-child,#modal .signature-mail-decision p:last-child{margin-bottom:0}
.signature-mail-decision{background:#fff}.signature-mail-decision p{white-space:pre-wrap}
#modal .signature-mail-layout [data-mail-list] strong{font-size:18px;line-height:26px;display:block;margin-bottom:12px}
.signature-mail-row-actions{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap;margin-top:24px}
.signature-mail-layout [data-mail-warning]{padding:16px;border-left:3px solid #94612d;background:#f5eee2;border-radius:8px;color:#63441f}
.signature-mail-layout [data-mail-empty]{padding:32px 24px;background:#edf0ea;border-radius:16px;display:flex;align-items:center;gap:16px}
.signature-mail-detail h3{overflow-wrap:anywhere}.signature-mail-detail li p{white-space:pre-wrap}
@media(max-width:600px){.signature-mail-filters{grid-template-columns:minmax(0,1fr)}.signature-mail-row-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.signature-mail-layout[data-mail-mode=inbox] .signature-review-footer>[data-mail-refresh]{grid-column:1/-1}}
.signature-mail-header-title{flex:1}.signature-mail-nav-open{width:48px;padding:10px!important;flex:none;margin-left:auto!important}
.signature-mail-layout .signature-review-header>div{flex:1}.signature-mail-layout .signature-review-header{gap:12px}
.signature-mail-card-header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:start;margin-bottom:16px}
#modal .signature-mail-card-header strong{margin:0}.signature-mail-card-header .signature-mail-row-actions{display:flex;margin:0;flex-wrap:nowrap}
#modal .signature-mail-layout [data-mail-list] p{margin-bottom:12px}#modal .signature-mail-layout [data-mail-list] [data-mail-warning]{margin-bottom:0}
.signature-mail-details-open{width:48px;padding:10px!important;flex:none}.signature-mail-details-open>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@media(max-width:600px){.signature-mail-card-header{grid-template-columns:minmax(0,1fr)}.signature-mail-card-header .signature-mail-row-actions{justify-content:flex-end}}
.signature-mail-layout [data-mail-list]>li>div{width:100%;min-width:0}

/* M37: event cards and explicit navigation, one content scroll surface. */
.signature-notice-layout [hidden]{display:none!important}
.signature-notice-layout .signature-review-header{gap:12px}.signature-notice-layout .signature-review-header>div{flex:1}
.signature-notice-main{min-width:0}.signature-notice-layout .signature-review-footer:empty{display:none}
#modal .signature-notice-layout .workflow-list{margin:0;gap:20px}
#modal .signature-notice-layout [data-notice-card]{display:grid;grid-template-columns:40px minmax(0,1fr) auto;gap:20px;align-items:start;padding:24px;background:#fff}
.signature-notice-symbol{width:40px;height:40px;border-radius:50%;background:#edf0ea;display:grid;place-items:center;color:#244f43}
#modal .signature-notice-layout [data-notice-card] h3{font-size:18px;line-height:26px;margin:0 0 12px;overflow-wrap:anywhere}
#modal .signature-notice-layout [data-notice-card] p{margin:0 0 12px;font-size:16px;line-height:24px}
#modal .signature-notice-layout [data-notice-card] .signature-notice-meta{font-size:14px;line-height:22px;color:#52675f}
#modal .signature-notice-layout [data-notice-card] .signature-notice-status{display:inline-block;font-size:14px;line-height:22px;padding:6px 10px;border-radius:10px;background:#edf0ea;margin:0}
#modal .signature-notice-layout [data-notice-empty]{display:flex;gap:16px;align-items:center;padding:28px;background:#edf0ea;border-radius:16px}
.signature-notice-navigation h3{margin:0 0 24px}
@media(max-width:600px){#modal .signature-notice-layout [data-notice-card]{grid-template-columns:32px minmax(0,1fr);gap:16px;padding:20px}.signature-notice-symbol{width:32px;height:32px}#modal .signature-notice-layout [data-notice-card]>button{grid-column:2;justify-self:end}.signature-notice-layout .signature-review-footer>[data-signature-notice-refresh]{grid-column:1/-1}}

/* M38: renewed access keeps its effect notice and explicit acknowledgement. */
.signature-reissue-layout [hidden]{display:none!important}
#modal .signature-reissue-layout [data-reissue-notice]{display:flex;gap:12px;align-items:flex-start;padding:20px;background:#edf0ea;border-radius:16px;font-size:14px;line-height:22px;color:#52675f;margin:0 0 28px}
#modal .signature-reissue-layout [data-reissue-context]{font-size:18px;line-height:26px;margin:0 0 24px;padding:20px 24px;background:#edf0ea;border-radius:16px}
#modal .signature-reissue-layout [data-reissue-person]{display:grid;grid-template-columns:40px minmax(0,1fr);gap:20px;align-items:start;padding:24px;background:#fff}
.signature-reissue-person-icon{width:40px;height:40px;border-radius:50%;background:#edf0ea;color:#244f43;display:grid;place-items:center}
#modal .signature-reissue-layout [data-reissue-person]>div{width:100%;min-width:0}
#modal .signature-reissue-layout [data-reissue-person] h3{font-size:18px;line-height:26px;margin:0 0 12px;overflow-wrap:anywhere}
#modal .signature-reissue-layout [data-reissue-person] p{margin:0 0 12px}
#modal .signature-reissue-layout .signature-reissue-phase{display:inline-block;font-size:14px;line-height:22px;background:#edf0ea;padding:6px 10px;border-radius:10px}
#modal .signature-reissue-layout .signature-reissue-meta{font-size:14px;line-height:22px;color:#52675f}
.signature-reissue-layout [data-signature-renew]{display:flex;margin:24px 0 0 auto}
.signature-reissue-layout [data-reissue-summary]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin:0 0 28px;padding:24px;border:1px solid #cdd7cd;border-radius:18px;background:#fff}
.signature-reissue-layout [data-reissue-summary]>div{min-width:0}.signature-reissue-layout [data-reissue-summary] [data-wide]{grid-column:1/-1}
.signature-reissue-layout dt{font-size:14px;line-height:22px;color:#52675f;margin-bottom:10px}.signature-reissue-layout dd{font-size:16px;line-height:24px;margin:0;overflow-wrap:anywhere}
#modal .signature-reissue-layout [data-reissue-empty]{display:flex;gap:16px;padding:28px;background:#edf0ea;border-radius:16px}
.signature-reissue-layout .signature-review-footer:empty{display:none}
@media(max-width:600px){.signature-reissue-layout [data-reissue-summary]{grid-template-columns:minmax(0,1fr);padding:20px}#modal .signature-reissue-layout [data-reissue-person]{grid-template-columns:32px minmax(0,1fr);gap:16px;padding:20px}.signature-reissue-person-icon{width:32px;height:32px}}

@media(min-width:601px){#modal .signature-reissue-layout [data-reissue-person]>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px 20px}#modal .signature-reissue-layout [data-reissue-person] h3{grid-column:1;align-self:center;margin:0}#modal .signature-reissue-layout [data-signature-renew]{grid-column:2;grid-row:1;margin:0}#modal .signature-reissue-layout [data-reissue-person] p{grid-column:1/-1;justify-self:start;margin:0}}

/* M35: a calm recipient page; the rejection task uses the shared dialog. */
.external-signature{background:#edf0e9;padding:40px 24px;min-height:100dvh;color:#243e35}
.external-card{max-width:1100px;padding:32px;border:1px solid #d3dcd2;border-radius:28px;background:#f9faf6;box-shadow:0 16px 48px #244f430d;animation:external-arrive 180ms ease-out}
.external-card>header{margin-bottom:32px;flex-wrap:nowrap}.external-card .brand{padding:0}.external-card>h1{font-size:32px;line-height:40px;letter-spacing:-.8px;margin:0 0 32px}
.external-flow{display:grid;grid-template-columns:minmax(240px,.8fr) minmax(0,1.5fr);gap:32px;align-items:start}
.external-context{padding:24px;background:#edf0e9;border-radius:20px;min-width:0}.external-card .external-context>.pf-icon{width:40px;height:40px;padding:9px;border:1px solid #cdd8cc;border-radius:12px;background:#fafbf7;margin-bottom:20px}
.external-card .external-context h2{font-size:22px;line-height:30px;margin:0 0 20px;overflow-wrap:anywhere}.external-card .external-person{font-size:16px;line-height:24px;margin:0 0 16px}
.external-card .external-state{padding:8px 12px;background:#fff;border-radius:12px;font-size:14px;line-height:22px;margin:0 0 24px}.external-card .signature-description{font-size:16px;line-height:24px;margin:0 0 24px;white-space:pre-wrap}
.external-context dl{margin:0;display:grid;gap:24px}.external-context dt{font-size:14px;line-height:22px;color:#52675f;margin:0 0 8px}.external-context dd{font-size:16px;line-height:24px;margin:0;overflow-wrap:anywhere}
.external-task{min-width:0}.external-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:0;list-style:none;margin:0 0 28px}.external-steps li{display:flex;flex-direction:column;align-items:flex-start;gap:12px;padding:12px 0;border-bottom:2px solid #d5ddd2;color:#52675f;font-size:14px;line-height:20px}.external-steps li[aria-current=step]{border-color:#244f43;color:#244f43;font-weight:600}.external-steps .pf-icon{width:24px;height:24px}
.external-card .external-step{padding:24px;background:#fff;border:1px solid #d3dcd2;border-radius:20px;margin-bottom:28px}.external-card .external-step h2,.external-card .external-result h2{font-size:20px;line-height:28px;margin:0 0 20px}.external-card p{font-size:16px;line-height:24px;margin:0 0 20px}
.external-card .pf-icon{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.external-card button{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:48px;font-size:16px;line-height:24px;border-radius:12px;margin:0}.external-card button.primary{background:#244f43;border-color:#244f43;color:white}
.external-actions,.external-card .form-actions{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap}.external-card .form-actions{margin:28px 0 20px;padding-top:24px;border-top:1px solid #d3dcd2}
.external-card form{gap:24px;margin:24px 0 0}.external-card label{font-size:16px;line-height:24px;gap:10px}.external-card input{min-height:48px;padding:12px;border:1px solid #b7c5b7;border-radius:10px;background:#fff}.external-card input[name=code]{font-size:24px;letter-spacing:.35em;font-variant-numeric:tabular-nums}
.external-card fieldset{padding:24px;gap:24px;margin:0 0 28px;border:1px solid #d3dcd2;border-radius:20px;background:#fff}.external-card legend{font-size:18px;line-height:26px;font-weight:600;padding:0 8px}.external-card fieldset p{margin:0}.external-card .workflow-check{line-height:24px;gap:12px}.external-card .workflow-check input{width:24px;height:24px;min-height:24px;margin:0;flex:none}
.external-card .external-assurance{display:flex;align-items:flex-start;gap:12px;font-size:14px;line-height:22px;padding:20px;background:#edf0e9;border-radius:16px;margin-bottom:28px}.external-card .external-meta{font-size:14px;line-height:22px;color:#52675f;margin:20px 0 0}.external-card [data-external-reviewed]:empty{display:none}.external-card [data-external-reviewed]:not(:empty){margin-top:24px;font-size:14px;line-height:22px}
.external-card .external-message{display:flex;gap:12px;padding:20px;background:#e5eee4;border-radius:16px;margin-bottom:24px}.external-card .external-result{padding:28px;background:#e5eee4;border-radius:20px;margin-bottom:28px}.external-result>.pf-icon{width:40px;height:40px;padding:8px;border:1px solid #a8bea9;border-radius:50%;margin-bottom:20px}.external-card .external-result p{margin:0}
.external-card>.error:empty{display:none}.external-card>.error:not(:empty){padding:20px;border:1px solid #dcb6a9;border-radius:16px;background:#fff0eb;font-size:16px;line-height:24px;color:#8e3324;margin:28px 0 0}
#modal .external-reason-layout .signature-review-header>button{width:48px;flex:none;padding:10px}.external-reason-layout .signature-review-workspace>h3{padding:20px;background:#edf0e9;border-radius:16px}.external-reason-layout .signature-review-header>button>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@keyframes external-arrive{from{opacity:.4;transform:translateY(8px)}to{opacity:1;transform:none}}
@media(max-width:800px){.external-flow{grid-template-columns:minmax(0,1fr);gap:28px}.external-context dl{grid-template-columns:repeat(2,minmax(0,1fr))}.external-card{padding:24px}.external-card>h1{font-size:28px;line-height:36px}.external-context>.pf-icon{margin-bottom:16px}}
@media(max-width:600px){.external-signature{padding:20px 12px}.external-card{padding:24px 20px;border-radius:24px}.external-card>header{margin-bottom:28px}.external-card>h1{font-size:26px;line-height:34px;margin-bottom:28px}.external-card .external-step,.external-context{padding:20px}.external-steps{gap:10px}.external-steps li{font-size:13px;line-height:20px}.external-card .external-actions,.external-card .form-actions{display:grid;grid-template-columns:minmax(0,1fr)}.external-actions>button,.external-card .form-actions>button{width:100%}.external-context dl{grid-template-columns:minmax(0,1fr)}.external-card fieldset{padding:20px}}
@media(prefers-reduced-motion:reduce){.external-card{animation:none}}

/* M34: current file state and historical scan job results stay separate. */
.scanner-layout .scanner-health{display:grid;grid-template-columns:40px minmax(0,1fr);gap:20px;padding:24px;margin:0 0 28px;border-radius:18px;background:#edf0e9}
.scanner-health>.pf-icon{width:40px;height:40px;padding:9px;border:1px solid #cad7ca;border-radius:50%;color:#244f43;background:#fafbf7}
#modal .scanner-layout .scanner-health h3{font-size:18px;line-height:26px;margin:0 0 20px}.scanner-health>div{min-width:0;display:flex;flex-direction:column;align-items:flex-start}.scanner-health [data-scanner-service]{align-self:flex-end}
#modal .scanner-layout .scanner-note{display:flex;align-items:flex-start;gap:12px;padding:20px;border-radius:16px;background:#f1eee4;font-size:14px;line-height:22px;color:#625b3f;margin:0 0 28px}
#modal .scanner-layout .scanner-feedback{display:flex;gap:12px;padding:20px;border-radius:16px;background:#e5eee4;font-size:16px;line-height:24px;margin:0 0 24px}
#modal .scanner-layout .scanner-context{font-size:18px;line-height:26px;padding:20px 24px;margin:0 0 24px;background:#edf0e9;border-radius:16px;overflow-wrap:anywhere}
#modal .scanner-layout .scanner-jobs{list-style:none;padding:0;margin:0;display:grid;gap:20px}
#modal .scanner-layout .scanner-jobs>li{display:grid;grid-template-columns:36px minmax(0,1fr);gap:20px;padding:24px;background:#fff;border:1px solid #cdd7cd;border-radius:18px}
.scanner-jobs>li>.pf-icon{width:36px;height:36px;padding:7px;border-radius:10px;background:#edf0e9;color:#244f43}.scanner-jobs>li>div{min-width:0}
#modal .scanner-layout .scanner-jobs h3{font-size:18px;line-height:26px;margin:0 0 16px;overflow-wrap:anywhere}
#modal .scanner-layout .scanner-jobs p{font-size:14px;line-height:22px;margin:0 0 12px;color:#52675f}
#modal .scanner-layout .scanner-jobs .scanner-state{display:inline-block;font-size:14px;line-height:22px;padding:6px 10px;border-radius:10px;background:#edf0e9;color:#243e35;margin:0 0 16px}
.scanner-layout .scanner-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:12px;margin-top:24px}
.scanner-layout .scanner-pairs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin:0 0 28px;padding:24px;border:1px solid #cdd7cd;border-radius:18px;background:#fff}.scanner-pairs>div{min-width:0}.scanner-pairs dt{font-size:14px;line-height:22px;color:#52675f;margin-bottom:10px}.scanner-pairs dd{font-size:16px;line-height:24px;margin:0;overflow-wrap:anywhere}
#modal .scanner-layout .scanner-technical{padding:20px;border-radius:16px;background:#f1eee4;font-size:14px;line-height:22px;white-space:pre-wrap;overflow-wrap:anywhere;margin:0}
#modal .scanner-layout .scanner-empty,#modal .scanner-layout .scanner-loading{display:flex;align-items:center;gap:16px;padding:28px;background:#edf0e9;border-radius:16px;margin:0;font-size:16px;line-height:24px}
.scanner-layout .signature-review-header>[data-scanner-close]{width:48px;flex:none;padding:10px}.scanner-layout [data-scanner-close]>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@media(max-width:600px){.scanner-layout .scanner-health{padding:20px;grid-template-columns:32px minmax(0,1fr);gap:16px}.scanner-health>.pf-icon{width:32px;height:32px;padding:6px}#modal .scanner-layout .scanner-jobs>li{padding:20px;grid-template-columns:32px minmax(0,1fr);gap:16px}.scanner-jobs>li>.pf-icon{width:32px;height:32px;padding:6px}.scanner-layout .scanner-actions{display:grid;grid-template-columns:minmax(0,1fr)}.scanner-layout .scanner-actions>button{width:100%}.scanner-layout .scanner-pairs{grid-template-columns:minmax(0,1fr);padding:20px}.scanner-layout .signature-review-footer:has(>:only-child){grid-template-columns:minmax(0,1fr)}}

#modal .scanner-layout .scanner-health h3{margin:0}.scanner-layout .scanner-health>div{justify-content:center}.scanner-layout .signature-review-header>[data-scanner-service]{flex:none;font-size:14px;line-height:22px;white-space:nowrap}.scanner-layout .scanner-jobs+.scanner-note{margin-top:28px!important}.scanner-layout .scanner-empty+.scanner-note{margin-top:28px!important}
@media(max-width:600px){.scanner-layout .signature-review-header{flex-wrap:wrap}.scanner-layout .signature-review-header>div{flex:1}.scanner-layout .signature-review-header>[data-scanner-service]{order:3;width:100%}}
@media(min-width:601px){#modal .scanner-layout .scanner-jobs>li>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px 20px}#modal .scanner-layout .scanner-jobs h3{grid-column:1;align-self:center;margin:0}#modal .scanner-layout .scanner-actions{grid-column:2;grid-row:1;margin:0;align-items:start}#modal .scanner-layout .scanner-jobs p{grid-column:1/-1;justify-self:start;margin:0}}

#modal .settings-system .settings-system-card{padding:24px;border:1px solid #cdd7cd;border-radius:18px;margin:0 0 24px;background:#f9faf6}#modal .settings-system-card:last-child{margin-bottom:0}#modal .settings-system h3{display:flex;gap:12px;align-items:center;font-size:20px;line-height:28px;margin:0 0 20px}#modal .settings-system dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin:0}#modal .settings-system dl>div{min-width:0}#modal .settings-system dt{font-size:14px;line-height:22px;color:#52675f;margin-bottom:8px}#modal .settings-system dd{font-size:16px;line-height:24px;font-weight:600;margin:0;overflow-wrap:anywhere}#modal .settings-system p{font-size:16px;line-height:26px;margin:20px 0 0;color:#52675f}#modal .settings-system .report-modal-header h2{margin:0}#modal .settings-system .report-modal-header{margin:0 0 24px}#modal .settings-system h3>.pf-icon{flex:none}
@media(max-width:600px){#modal .settings-system dl{grid-template-columns:minmax(0,1fr)}#modal .settings-system .settings-system-card{padding:24px 20px}#modal .settings-system .report-modal-header{gap:16px}}

/* Company username: one field, explicit details and a fixed action row. */
#modal .profile-layout .report-modal-header{flex:none;margin:0;gap:20px}#modal .profile-layout .report-modal-header h2{font-size:24px;line-height:32px;margin:0}#modal .profile-layout .report-modal-heading{gap:12px}#modal .profile-layout form{display:grid;gap:10px;padding:24px;border:1px solid #cdd7cd;border-radius:18px;background:#fff}#modal .profile-layout form label{display:block;font-size:18px;line-height:26px;font-weight:600;margin:0}#modal .profile-layout form input{width:100%;font-size:18px;min-height:56px}#modal .profile-layout .profile-rules{font-size:14px;line-height:22px;color:#52675f;margin:6px 0 0}#modal .profile-layout .profile-clear{font-size:16px;line-height:24px;margin:12px 0 0}#modal .profile-layout .profile-intro{margin:0 0 24px}#modal .profile-layout .profile-message{display:flex;align-items:flex-start;gap:12px;padding:20px;border-radius:14px;margin:24px 0 0}#modal .profile-layout .profile-message.success{background:#e6eee4;color:#244f43;margin:0 0 24px}#modal .profile-layout .profile-message.error{background:#fff0eb;color:#8e3324}#modal .profile-message>.pf-icon{flex:none;margin-top:3px}#modal .profile-footer{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:12px;flex:none;padding-top:20px;border-top:1px solid #cdd7cd}#modal .profile-context{display:flex;align-items:flex-start;gap:16px;background:#edf0ea;border-radius:18px;padding:24px}#modal .profile-context>.pf-icon{flex:none;margin-top:3px}#modal .profile-context p{margin:0}#modal .profile-loading{display:flex;gap:12px;align-items:center;padding:24px}#modal .profile-comparison{display:grid;gap:24px;grid-template-columns:repeat(2,minmax(0,1fr));margin:0 0 24px}#modal .profile-comparison>div{padding:24px;border:1px solid #cdd7cd;border-radius:18px;min-width:0}#modal .profile-comparison dt{font-size:14px;line-height:22px;color:#52675f;margin-bottom:10px}#modal .profile-comparison dd{margin:0;font-size:18px;line-height:26px;overflow-wrap:anywhere;font-weight:600}
@media(max-width:600px){#modal .profile-layout .report-modal-header{align-items:flex-start;gap:12px}#modal .profile-layout .report-modal-heading{gap:10px}#modal .profile-layout .report-modal-header h2{font-size:22px;line-height:30px}#modal .profile-layout [data-profile-action=close]{width:48px;padding:10px;flex:none}#modal .profile-layout [data-profile-action=close]>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}#modal .profile-layout form{padding:20px}#modal .profile-footer{display:grid;grid-template-columns:minmax(0,1fr)}#modal .profile-footer>button{width:100%}#modal .profile-comparison{grid-template-columns:minmax(0,1fr)}}

#modal .profile-layout>.profile-message{flex:none;max-height:20dvh;overflow:auto;margin:0!important;padding:16px 20px}#modal .profile-layout>.profile-message[hidden]{display:none!important}
@media(max-width:600px){#modal .profile-layout .report-modal-header>button{width:48px;padding:10px;flex:none}#modal .profile-layout .report-modal-header>button>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}}

/* Account MFA: explicit steps, one workspace, no disclosure text toggles. */
#modal .mfa-layout .report-modal-header{flex:none;margin:0;gap:20px}#modal .mfa-layout .report-modal-header h2{margin:0;font-size:24px;line-height:32px}#modal .mfa-footer{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:12px;flex:none;border-top:1px solid #cdd7cd;padding-top:20px}#modal .mfa-layout>.mfa-error{display:flex;align-items:flex-start;gap:12px;flex:none;margin:0;padding:16px 20px;max-height:18dvh;overflow:auto;border-radius:14px;background:#fff0eb;color:#8e3324}#modal .mfa-error>.pf-icon{flex:none;margin-top:3px}#modal .mfa-status{display:flex;gap:16px;align-items:center;padding:24px;border:1px solid #cdd7cd;border-radius:18px;background:#edf0ea;margin-bottom:24px}#modal .mfa-status h3{margin:0 0 8px}#modal .mfa-status p{margin:0;color:#52675f}#modal .mfa-status-symbol{display:flex;justify-content:center;align-items:center;width:52px;height:52px;border-radius:16px;background:#f9faf6;flex:none;color:#244f43}#modal .mfa-status-symbol>.pf-icon{width:28px;height:28px}#modal .mfa-actions{display:grid;gap:16px;margin:24px 0}#modal .mfa-actions button{width:100%;min-height:56px;padding:16px}#modal .mfa-summary{margin:0 0 24px;display:grid;gap:24px}#modal .mfa-summary>div{padding:24px;border:1px solid #cdd7cd;border-radius:18px}#modal .mfa-summary dt{font-size:14px;line-height:22px;color:#52675f;margin-bottom:10px}#modal .mfa-summary dd{margin:0;font-size:18px;line-height:26px;overflow-wrap:anywhere;font-weight:600}#modal .mfa-notice{display:flex;gap:14px;align-items:flex-start;padding:24px;background:#edf0ea;border-radius:18px;margin:0 0 24px}#modal .mfa-notice p{margin:0;line-height:26px}#modal .mfa-notice>.pf-icon{flex:none;margin-top:3px}#modal .mfa-fields{padding:24px;border:1px solid #cdd7cd;background:#fff;border-radius:18px;display:grid;gap:10px}#modal .mfa-layout .mfa-fields label{font-weight:600;margin:16px 0 0}#modal .mfa-layout .mfa-fields label:first-child{margin-top:0}#modal .mfa-fields input{width:100%;min-height:52px}#modal .mfa-factor-choice{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:24px 0 0}#modal .mfa-factor-choice button{padding:12px;min-height:52px}#modal .mfa-factor-choice button[aria-pressed=true]{background:#244f43;color:#fff;border-color:#244f43}#modal .mfa-qr{display:grid;justify-items:center;gap:20px;margin:0 0 28px;padding:24px;border:1px solid #cdd7cd;border-radius:18px}#modal .mfa-qr p{margin:0;justify-self:stretch}#modal .mfa-qr img{display:block;width:min(240px,100%);height:auto;background:#fff}#modal .mfa-uri{white-space:pre-wrap;word-break:break-all;overflow-wrap:anywhere;font-size:14px;line-height:24px;padding:24px;border:1px solid #cdd7cd;border-radius:18px;background:#fff;margin:0 0 24px}#modal .mfa-recovery-codes{list-style:decimal;display:grid;grid-template-columns:minmax(0,1fr);gap:12px;padding:0 0 0 28px;margin:24px 0}#modal .mfa-recovery-codes li{padding:16px 20px;background:#fff;border:1px solid #cdd7cd;border-radius:12px;min-width:0;margin:0}#modal .mfa-recovery-codes code{font-family:ui-monospace,monospace;font-size:14px;line-height:24px;overflow-wrap:anywhere}#modal .mfa-ack{display:flex;gap:12px;align-items:flex-start;margin:28px 0 0;font-size:16px;line-height:26px}#modal .mfa-ack input{flex:none;margin-top:2px}#modal .mfa-loading{display:flex;align-items:center;gap:12px;padding:24px}
@media(max-width:600px){#modal .mfa-layout .report-modal-header{gap:12px;align-items:flex-start}#modal .mfa-layout .report-modal-header h2{font-size:22px;line-height:30px}#modal .mfa-layout .report-modal-header>button{width:48px;padding:10px;flex:none}#modal .mfa-layout .report-modal-header>button>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}#modal .mfa-footer{display:grid;grid-template-columns:minmax(0,1fr)}#modal .mfa-footer>button{width:100%}#modal .mfa-fields,#modal .mfa-qr,#modal .mfa-notice{padding:20px}#modal .mfa-factor-choice{grid-template-columns:minmax(0,1fr)}#modal .mfa-recovery-codes li{padding:16px 12px}}

/* Organization: one task and one scroll region, with explicit scope review. */
#modal .org-layout .report-modal-header{margin:0;flex:none;gap:20px}#modal .org-layout .report-modal-header h2{font-size:24px;line-height:32px;margin:0}#modal .org-layout .report-modal-heading{gap:12px;min-width:0}#modal .org-footer{display:flex;justify-content:flex-end;gap:12px;flex:none;flex-wrap:wrap;padding-top:20px;border-top:1px solid #cdd7cd}#modal .org-error{display:flex;align-items:flex-start;gap:12px;flex:none;padding:16px 20px;margin:0;color:#8e3324;background:#fff0eb;border-radius:12px;max-height:120px;overflow:auto}#modal .org-note{display:flex;gap:14px;align-items:flex-start;padding:24px;background:#edf0ea;border-radius:18px;margin-bottom:24px}#modal .org-note p{margin:0;line-height:26px}#modal .org-note>.pf-icon{margin-top:3px}#modal .org-task-list{display:grid;gap:16px;margin:0 0 24px}#modal .org-task-list>button{justify-content:flex-start;min-height:64px;padding:18px 24px;text-align:start}#modal .org-fields{padding:24px;border:1px solid #cdd7cd;border-radius:18px;background:#fff;display:grid;gap:24px}#modal .org-layout .org-fields label,#modal .org-search{display:grid;gap:10px;margin:0;font-size:16px;line-height:24px}#modal .org-fields input:not([type=checkbox]),#modal .org-fields select,#modal .org-search input{width:100%;min-height:52px;font-size:16px}#modal .org-fields textarea{min-height:112px;width:100%;font-size:16px;line-height:24px}#modal .org-fields .org-task-list{margin:0}#modal .org-fields .org-check{display:flex;align-items:center;gap:12px;min-height:48px}#modal .org-context{font-size:16px;color:#52675f;margin-bottom:24px}#modal .org-count{font-size:14px;line-height:22px;margin:12px 0 24px;color:#52675f}#modal .org-list{list-style:none;padding:0;margin:0;display:grid;gap:16px}#modal .org-list>li{padding:20px 24px;border:1px solid #cdd7cd;border-radius:16px;background:#fff;display:flex;align-items:center;justify-content:space-between;gap:20px}#modal .org-list>li>div{display:grid;gap:8px;min-width:0}#modal .org-list strong{font-size:16px;line-height:24px;overflow-wrap:anywhere}#modal .org-list>li>label{display:grid;gap:12px;width:100%;font-size:16px;line-height:24px}#modal .org-list select{min-height:52px;width:100%;font-size:16px}#modal .org-list span{font-size:14px;color:#52675f}#modal .org-list input[type=checkbox]{justify-self:start;width:24px;height:24px}#modal .org-create{display:flex;justify-content:flex-end;margin-bottom:24px}#modal .org-pages{display:flex;gap:12px;align-items:center;justify-content:flex-end;margin-top:24px}#modal .org-comparison{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;margin-bottom:24px}#modal .org-comparison>section,#modal .org-reason{min-width:0;padding:24px;border:1px solid #cdd7cd;border-radius:18px;background:#fff}#modal .org-comparison h4{font-size:16px;line-height:24px;margin:24px 0 12px}#modal .org-summary{margin:0;display:grid;gap:20px}#modal .org-summary dt{font-size:14px;color:#52675f;margin-bottom:8px}#modal .org-summary dd{margin:0;overflow-wrap:anywhere;font-size:16px;line-height:24px}#modal .org-summary-list{list-style:none;padding:0;display:grid;gap:12px;margin:0}#modal .org-summary-list li{display:grid;gap:4px;overflow-wrap:anywhere;font-size:16px;line-height:24px}#modal .org-summary-list strong{font-size:14px}#modal .org-reason p{margin:0}
@media(max-width:600px){#modal .org-layout .report-modal-header{gap:12px;align-items:flex-start}#modal .org-layout .report-modal-header h2{font-size:22px;line-height:30px}#modal .org-layout .report-modal-header>button{width:48px;padding:10px;flex:none}#modal .org-layout .report-modal-header>button>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}#modal .org-footer{display:grid;grid-template-columns:minmax(0,1fr)}#modal .org-footer>button{width:100%}#modal .org-comparison{grid-template-columns:minmax(0,1fr)}#modal .org-fields,#modal .org-note,#modal .org-comparison>section,#modal .org-reason{padding:20px}#modal .org-list>li{padding:20px;flex-wrap:wrap}#modal .org-list>li>button{width:100%}#modal .org-task-list>button{padding:18px 20px}}

#modal .org-fields .org-check{flex-direction:row}
@media(max-width:600px){#modal .org-create>button{width:100%}#modal .org-fields textarea{min-height:80px}}

/* Personnel: one file task per view; the same pinned identity and scan status. */
#modal .personnel-layout .report-modal-header{flex:none;margin:0;gap:20px}#modal .personnel-layout .report-modal-header h2{font-size:24px;line-height:32px;margin:0}#modal .personnel-layout .report-modal-heading{min-width:0;gap:12px}#modal .personnel-footer{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:12px;flex:none;padding-top:20px;border-top:1px solid #cdd7cd}#modal .personnel-error{display:flex;gap:12px;align-items:flex-start;flex:none;padding:16px 20px;border-radius:12px;background:#fff0eb;color:#8e3324;margin:0;max-height:104px;overflow:auto}#modal .personnel-note{display:flex;gap:14px;align-items:flex-start;padding:24px;background:#edf0ea;border-radius:18px;margin:0 0 24px}#modal .personnel-note p{margin:0;line-height:26px}#modal .personnel-note>.pf-icon{margin-top:3px}#modal .personnel-context{font-size:16px;line-height:24px;color:#52675f;margin-bottom:24px}#modal .personnel-fields,#modal .personnel-filter{display:grid;gap:24px;padding:24px;border:1px solid #cdd7cd;border-radius:18px;background:#fff;margin:0 0 24px}#modal .personnel-layout .personnel-fields label,#modal .personnel-layout .personnel-filter label{display:grid;gap:10px;font-size:16px;line-height:24px;margin:0}#modal .personnel-fields input,#modal .personnel-fields select,#modal .personnel-filter input,#modal .personnel-filter select{min-height:52px;width:100%;font-size:16px}#modal .personnel-fields textarea{min-height:112px;width:100%;font-size:16px;line-height:24px}#modal .personnel-fields .personnel-context{margin:0}#modal .personnel-count{font-size:14px;line-height:22px;color:#52675f;margin:0 0 24px}#modal .personnel-documents{list-style:none;padding:0;margin:0;display:grid;gap:20px}#modal .personnel-documents>li{padding:24px;border:1px solid #cdd7cd;border-radius:18px;background:#fff;min-width:0}#modal .personnel-document-heading{display:flex;gap:16px;align-items:flex-start}#modal .personnel-document-heading>.pf-icon{width:28px;height:28px;flex:none;color:#244f43}#modal .personnel-document-heading>div{min-width:0}#modal .personnel-documents h3{font-size:18px;line-height:26px;margin:0 0 10px;overflow-wrap:anywhere}#modal .personnel-documents p{font-size:14px;line-height:22px;margin:0 0 12px;color:#52675f}#modal .personnel-status{display:inline-flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:14px;line-height:22px;color:#3d574c;padding:8px 12px;background:#edf0ea;border-radius:10px}#modal .personnel-document-actions{display:flex;flex-wrap:wrap;gap:12px;justify-content:flex-end;margin-top:24px}#modal .personnel-document-actions:empty{display:none}#modal .personnel-document-actions>a{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:48px;padding:12px 16px;border:1px solid #b6c3b6;border-radius:12px;background:#fafbf7;text-decoration:none;color:#244f43;font-weight:500}#modal .personnel-pages{display:flex;justify-content:flex-end;gap:12px;margin-top:24px}#modal .personnel-file{display:flex;gap:20px;align-items:center;min-width:0;padding:24px;border:1px solid #cdd7cd;border-radius:18px;background:#fff;margin-bottom:24px}#modal .personnel-file>img{width:96px;height:96px;object-fit:contain;flex:none;border-radius:12px;background:#edf0ea}#modal .personnel-file>.pf-icon{width:36px;height:36px;flex:none;color:#244f43}#modal .personnel-file>div{min-width:0}#modal .personnel-file h3{font-size:18px;line-height:26px;margin:0 0 10px;overflow-wrap:anywhere}#modal .personnel-file p{font-size:14px;line-height:22px;margin:0;color:#52675f}#modal .personnel-file-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:24px 0}#modal .personnel-file-choice{position:relative;display:flex;align-items:center;justify-content:center;gap:12px;min-height:72px;padding:20px;border:1px solid #b6c3b6;border-radius:16px;background:#fff;cursor:pointer;font-size:16px;font-weight:600;line-height:24px;text-align:center}#modal .personnel-file-choice:focus-within{outline:3px solid #244f43;outline-offset:3px}#modal .personnel-file-choice:has(input:disabled){opacity:.6;cursor:wait}#modal .personnel-file-choice input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:inherit}#modal .personnel-formats{font-size:14px;line-height:22px;color:#52675f;margin:0 0 24px}#modal .personnel-inline-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:12px;margin:24px 0}#modal .personnel-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;padding:24px;margin:0 0 24px;border:1px solid #cdd7cd;border-radius:18px;background:#fff}#modal .personnel-summary>div{min-width:0}#modal .personnel-summary dt{font-size:14px;line-height:22px;color:#52675f;margin-bottom:8px}#modal .personnel-summary dd{font-size:16px;line-height:24px;margin:0;overflow-wrap:anywhere}#modal .personnel-preparing{display:flex;align-items:center;gap:12px}#modal .personnel-reason{padding:24px;border:1px solid #cdd7cd;border-radius:18px;background:#fff;margin-bottom:24px}#modal .personnel-reason h3{margin-bottom:16px}#modal .personnel-reason p{margin:0;white-space:pre-wrap}
@media(max-width:600px){#modal .personnel-layout .report-modal-header{gap:12px;align-items:flex-start}#modal .personnel-layout .report-modal-header h2{font-size:22px;line-height:30px}#modal .personnel-layout .report-modal-header>button{width:48px;padding:10px;flex:none}#modal .personnel-layout .report-modal-header>button>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}#modal .personnel-footer{display:grid;grid-template-columns:minmax(0,1fr)}#modal .personnel-footer>button{width:100%}#modal .personnel-file-choices,#modal .personnel-summary{grid-template-columns:minmax(0,1fr)}#modal .personnel-file-choices:has(>:only-child){grid-template-columns:minmax(0,1fr)}#modal .personnel-fields,#modal .personnel-filter,#modal .personnel-note,#modal .personnel-file,#modal .personnel-documents>li,#modal .personnel-summary,#modal .personnel-reason{padding:20px}#modal .personnel-document-actions,#modal .personnel-inline-actions{display:grid;grid-template-columns:minmax(0,1fr)}#modal .personnel-document-actions>button,#modal .personnel-document-actions>a,#modal .personnel-inline-actions>button{width:100%}#modal .personnel-fields textarea{min-height:80px}}

#modal .personnel-toolbar{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:12px;margin:0 0 24px}#modal .personnel-active-filter{font-size:14px;line-height:22px;color:#52675f;margin:0 0 24px}#modal .personnel-file-choices:has(>:only-child){grid-template-columns:minmax(0,1fr)}
@media(max-width:600px){#modal .personnel-toolbar{display:grid;grid-template-columns:minmax(0,1fr)}#modal .personnel-toolbar>button{width:100%}}
/* Employee editor: one field group per view and one shared content scroll. */
.employee-editor-layout .employee-editor-context{margin:0 0 24px;font-size:18px;line-height:28px;font-weight:600;overflow-wrap:anywhere}.employee-editor-sections{display:grid;gap:16px}.employee-editor-layout .employee-editor-sections button{display:flex;align-items:center;gap:16px;width:100%;padding:20px;min-height:72px;text-align:left;font-size:18px;line-height:26px}.employee-editor-fields{display:grid;gap:24px;margin:0}.employee-editor-fields label{display:grid;gap:10px;font-size:16px;line-height:24px;font-weight:600}.employee-editor-fields input,.employee-editor-fields select{width:100%;min-width:0;min-height:48px;padding:12px 16px;font:inherit;font-weight:400;color:#203a32;background:#fff;border:1px solid #738379;border-radius:12px}.employee-editor-fields input[readonly]{background:#edf1e9}.employee-editor-note{font-size:15px;line-height:24px;color:#52675f;margin:24px 0 0}.employee-editor-footer{display:flex;justify-content:flex-end;gap:12px;padding-top:20px;border-top:1px solid #cdd7cd}.employee-editor-layout button{min-height:48px}.employee-editor-changes{display:grid;gap:20px}.employee-editor-changes>section{padding:24px;border:1px solid #cdd7cd;border-radius:16px;background:#fff}.employee-editor-changes h3{margin:0 0 20px;font-size:18px;line-height:26px}.employee-editor-changes dl{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;margin:0}.employee-editor-changes dt{font-size:14px;line-height:22px;color:#52675f;margin-bottom:8px}.employee-editor-changes dd{margin:0;font-size:16px;line-height:26px;overflow-wrap:anywhere}.employee-editor-result{display:flex;align-items:center;gap:16px}.employee-editor-result h3{font-size:20px;line-height:28px;margin:0}.employee-editor-error{padding:16px;margin:16px 0;border:1px solid #ae564b;border-radius:12px;font-size:16px;line-height:24px;background:#fff5ef;color:#77362d}.employee-editor-layout :focus-visible{outline:3px solid #244f43;outline-offset:3px}
@media(max-width:600px){.employee-editor-footer{flex-direction:column}.employee-editor-footer>button{width:100%;justify-content:center}.employee-editor-changes dl{grid-template-columns:minmax(0,1fr);gap:20px}.employee-editor-layout .report-modal-header>button{width:48px;padding:12px;flex:none}.employee-editor-layout .report-modal-header>button>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.employee-editor-changes>section{padding:20px}}

.employee-editor-new-summary{display:grid;gap:20px}.employee-editor-new-summary>section{padding:20px 24px;background:#fff;border:1px solid #cdd7cd;border-radius:16px}.employee-editor-new-summary h3{display:flex;align-items:center;gap:12px;font-size:18px;line-height:26px;margin:0 0 20px}.employee-editor-new-summary dl{display:grid;gap:16px;margin:0}.employee-editor-new-summary dl>div{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}.employee-editor-new-summary dt{font-size:14px;line-height:22px;color:#52675f}.employee-editor-new-summary dd{font-size:16px;line-height:24px;margin:0;overflow-wrap:anywhere}@media(max-width:600px){.employee-editor-new-summary>section{padding:20px}.employee-editor-new-summary dl>div{grid-template-columns:minmax(0,1fr);gap:6px}}

/* Scheduling: one explicit task per view, with a fixed action rail. */
.planning-context{display:flex;flex-direction:column;gap:16px;margin:0 0 28px}.planning-context p{font-size:20px;font-weight:600;line-height:28px}.planning-status{display:inline-flex;align-items:center;gap:10px;align-self:flex-start;padding:8px 12px;border:1px solid #cdd7cd;border-radius:12px;background:#edf1e9;color:#244f43;font-size:14px;line-height:22px}
.planning-sections{display:grid;gap:16px}.planning-layout .planning-sections button{display:flex;justify-content:flex-start;gap:16px;width:100%;padding:20px;text-align:left;border-radius:16px;background:#fff}.planning-sections button>span{display:grid;gap:8px;min-width:0;flex:1}.planning-sections strong{font-size:18px;line-height:26px;font-weight:600}.planning-sections small{font-size:14px;line-height:22px;color:#52675f;overflow-wrap:anywhere}
.planning-fields{display:grid;grid-template-columns:minmax(0,1fr);gap:24px;margin:0}.planning-layout .planning-fields label{margin:0!important;font-size:16px;line-height:24px;font-weight:600;min-width:0}.planning-fields input,.planning-fields select,.planning-fields textarea{box-sizing:border-box;width:100%;min-width:0;min-height:48px;padding:12px 16px;border:1px solid #738379;border-radius:12px;background:#fff;color:#203a32;font:inherit;font-weight:400}.planning-layout .planning-fields textarea{margin:0;min-height:128px}.planning-layout .planning-fields .planning-checkbox{flex-direction:row;align-items:center;gap:12px;padding:4px 0}.planning-fields .planning-checkbox input{width:24px;height:24px;min-height:24px;padding:0;flex:none;margin:0}
.planning-layout .planning-note{display:flex;align-items:flex-start;gap:12px;padding:16px 20px;border-radius:12px;background:#edf1e9;font-size:15px;line-height:24px;margin:24px 0}.planning-note .pf-icon{margin-top:2px}.planning-layout .planning-card{padding:24px;border:1px solid #cdd7cd;border-radius:16px;background:#fff;margin:0 0 24px;min-width:0}.planning-card p{white-space:pre-wrap}.planning-card>p:last-child{margin-bottom:0}.planning-summary{display:grid;gap:20px;margin:0}.planning-summary>div{display:grid;grid-template-columns:minmax(0,.7fr) minmax(0,1.3fr);gap:16px}.planning-summary dt{font-size:14px;line-height:22px;color:#52675f}.planning-summary dd{font-size:16px;line-height:24px;margin:0;overflow-wrap:anywhere}.planning-comparison{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.planning-comparison .planning-summary>div{grid-template-columns:minmax(0,1fr);gap:6px}
.planning-secondary,.planning-footer{display:flex;gap:12px;justify-content:flex-end;flex-wrap:wrap}.planning-secondary{margin-top:28px}.planning-footer{flex:none;padding-top:20px;border-top:1px solid #cdd7cd}.planning-layout button{min-height:48px}.planning-error{display:flex;gap:12px;align-items:flex-start;margin:0;padding:16px;border:1px solid #ae564b;border-radius:12px;background:#fff5ef;color:#77362d;font-size:16px;line-height:24px}.planning-warnings{display:grid;gap:12px;padding:0;margin:0 0 24px;list-style:none}.planning-warnings li{display:flex;gap:12px;align-items:flex-start;font-size:16px;line-height:24px;color:#77362d}.planning-days{display:grid;gap:20px}.planning-days article{padding-top:20px;border-top:1px solid #d3dcd2}.planning-days h4{font-size:16px;line-height:24px;margin:0 0 20px}.planning-history{display:grid;gap:20px;margin:0;padding:0;list-style:none}.planning-history li{padding:24px;border:1px solid #cdd7cd;border-radius:16px;background:#fff}.planning-history li>div{display:flex;align-items:center;gap:12px;font-size:14px;line-height:22px;margin-bottom:20px}.planning-history li>p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.planning-history button{display:flex;margin-left:auto!important}.planning-layout :focus-visible{outline:3px solid #244f43;outline-offset:3px}.planning-layout .planning-card .pf-icon{flex:none}
@media(max-width:600px){.planning-comparison{grid-template-columns:minmax(0,1fr);gap:0}.planning-footer{display:grid;grid-template-columns:minmax(0,1fr)}.planning-footer>button{width:100%}.planning-secondary{display:grid;grid-template-columns:minmax(0,1fr)}.planning-summary>div{grid-template-columns:minmax(0,1fr);gap:6px}.planning-layout .planning-card{padding:20px}.planning-layout .report-modal-header>button{width:48px;padding:12px;flex:none}.planning-layout .report-modal-header>button>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.planning-layout .planning-fields textarea{min-height:96px}}
@media(prefers-reduced-motion:no-preference){.planning-layout .planning-card{animation:planning-arrive 180ms ease-out}.planning-layout button{transition:background-color 180ms ease-out,border-color 180ms ease-out}@keyframes planning-arrive{from{opacity:.5;transform:translateY(4px)}to{opacity:1;transform:none}}}

#modal .planning-layout .report-modal-header{margin:0;gap:20px}#modal .planning-layout .planning-context{flex-direction:row;align-items:center;gap:16px;margin-bottom:24px}#modal .planning-layout .planning-context p{margin:0;font-size:18px;line-height:26px;min-width:0;overflow-wrap:anywhere}.planning-context .planning-status{flex:none}@media(max-width:600px){#modal .planning-layout .planning-context{align-items:flex-start;flex-wrap:wrap}}
#modal .planning-layout .planning-comparison h3{display:flex;align-items:center;gap:12px}#modal .planning-layout .planning-shared{background:#edf1e9}.planning-shared .planning-summary{gap:12px}.planning-shared .planning-summary dt{font-size:14px}

/* WebKit date widgets must stay within their labeled field on iOS. */
#modal .planning-layout .planning-fields input[type=datetime-local]{-webkit-appearance:none;appearance:none;display:block;min-inline-size:0;max-inline-size:100%;inline-size:100%;overflow:hidden;text-align:left}
#modal .planning-layout .planning-fields input[type=datetime-local]::-webkit-date-and-time-value{text-align:left;min-height:24px}
/* Keep the checkbox caption beside its control. The shared review-form rule
   stacks ordinary field labels and must not also stack this checkbox row. */
#modal .planning-layout form .planning-checkbox{display:flex;flex-direction:row;align-items:center;gap:12px;min-height:48px;padding:8px 0}
#modal .planning-layout .planning-checkbox>span{min-width:0;overflow-wrap:anywhere}
/* With a software keyboard, three stacked actions leave too little room for
   the focused field and its label. Keep the two secondary actions together. */
@media(max-width:600px){#modal .planning-layout .planning-footer:has(>[data-planning-action=clear]){grid-template-columns:repeat(2,minmax(0,1fr))}#modal .planning-layout .planning-footer:has(>[data-planning-action=clear])>[data-planning-action=check]{grid-column:1/-1}}

/* Policy workspace: calm surfaces, explicit actions and one reading axis. */
.policy-page{display:grid;gap:32px;min-width:0}.policy-page>.heading{margin:0}.policy-page .heading .actions{display:flex;gap:12px;flex-wrap:wrap}.policy-page button{min-height:48px;display:inline-flex;align-items:center;justify-content:center;gap:10px}.policy-search{display:grid;gap:10px;max-width:560px;margin:0;font-size:16px;line-height:24px;font-weight:600}.policy-search input{width:100%;min-height:48px;padding:12px 16px;border:1px solid #738379;border-radius:12px;background:#fff;font:inherit;font-weight:400;color:#203a32}.policy-page-section{display:grid;gap:24px;min-width:0}.policy-page-section>header{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}.policy-page-section h2{font-size:22px;line-height:30px;margin:0}.policy-records{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:24px}.policy-records>li{min-width:0}.policy-records article{display:flex;flex-direction:column;gap:24px;height:100%;box-sizing:border-box;padding:24px;border:1px solid #cdd7cd;border-radius:20px;background:#fff;box-shadow:0 4px 16px #244f4308}.policy-records article>header{display:flex;align-items:flex-start;gap:16px}.policy-records article>header>.pf-icon{width:24px;height:24px;flex:none;color:#244f43;margin-top:2px}.policy-records h3{font-size:18px;line-height:26px;margin:0;overflow-wrap:anywhere}.policy-records p{font-size:15px;line-height:24px;margin:8px 0 0;color:#52675f;overflow-wrap:anywhere}.policy-records .planning-summary>div{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.policy-record-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:auto;padding-top:4px}.policy-load-error{display:grid;gap:16px;justify-items:start;padding:24px;border:1px solid #ae7766;border-radius:16px;background:#fff5ef}.policy-load-error .planning-note{margin:0;display:flex;gap:12px;line-height:24px}.policy-source-order{list-style:none;display:grid;gap:20px;margin:0;padding:0}.policy-source-order li{display:flex;align-items:flex-start;gap:16px;padding:20px;border:1px solid #cdd7cd;border-radius:16px;background:#fff;font-size:16px;line-height:24px}.policy-source-order .pf-icon{flex:none;color:#244f43}.policy-page :focus-visible{outline:3px solid #244f43;outline-offset:3px}
@media(max-width:600px){.policy-page{gap:28px}.policy-records article{padding:20px}.policy-page .heading .actions{width:100%}.policy-page .heading .actions>button{flex:1}.policy-record-actions>button{flex:1}.policy-page-section>header>button{width:100%}.policy-layout .planning-secondary{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}}
@media(prefers-reduced-motion:no-preference){.policy-records article{animation:planning-arrive 180ms ease-out}.policy-page button{transition:background-color 180ms ease-out,border-color 180ms ease-out}}

#modal .policy-layout[data-policy-view=home] .planning-note{padding:12px 16px;margin:0 0 16px}#modal .policy-layout[data-policy-view=home] .planning-sections{gap:12px}#modal .policy-layout[data-policy-view=home] .planning-sections button{padding:8px 16px}#modal .policy-layout[data-policy-view=home] .planning-sections button>span{gap:4px}

/* WebKit date controls must shrink to the same field column as text inputs. */
#modal .policy-layout .planning-fields input[type=date]{-webkit-appearance:none;appearance:none;display:block;min-inline-size:0;max-inline-size:100%;inline-size:100%;overflow:hidden;text-align:left}#modal .policy-layout .planning-fields input[type=date]::-webkit-date-and-time-value{text-align:left;min-height:24px}
/* All five priorities remain visible in the standard desktop workspace. */
.policy-source-order{gap:12px}.policy-source-order li{min-height:48px;box-sizing:border-box;padding:12px 16px}

/* Project activity: summaries first; comparison and composition stay separate. */
.activity-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:24px}.activity-toolbar .planning-checkbox{display:flex;flex-direction:row;align-items:center;gap:12px;min-height:48px;margin:0}.activity-toolbar input[type=checkbox]{width:24px;height:24px;margin:0;flex:none}.activity-events{list-style:none;margin:0;padding:0;display:grid;gap:24px}.activity-events>li{min-width:0}.activity-events article{display:grid;gap:20px;padding:24px;border:1px solid #cdd7cd;border-radius:16px;background:#fff}.activity-events header{display:flex;align-items:flex-start;gap:16px}.activity-events header>.pf-icon{flex:none;color:#244f43;margin-top:3px}.activity-events header>div{min-width:0;flex:1}.activity-layout .activity-events h3{font-size:18px;line-height:26px;margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}.activity-events header p{font-size:14px;line-height:22px;margin:8px 0 0;color:#52675f}.activity-read-state{font-size:13px;line-height:22px;padding:4px 8px;border-radius:8px;background:#edf1e9;color:#244f43}.activity-layout .activity-project,.activity-layout .activity-preview{font-size:16px;line-height:24px;margin:0;overflow-wrap:anywhere}.activity-preview{white-space:pre-wrap;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.activity-event-actions{display:flex;gap:12px;justify-content:flex-end;flex-wrap:wrap}.activity-more{display:flex;justify-content:center;margin-top:24px}.activity-side{display:flex;gap:12px;margin-bottom:24px}.activity-side button[aria-pressed=true]{background:#e0e9df;border-color:#244f43;color:#203a32}.activity-layout .activity-comment-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:16px;line-height:26px;margin:0}.activity-notice{display:flex;align-items:flex-start;gap:12px;padding:16px;border-radius:12px;background:#e0e9df;color:#244f43;font-size:16px;line-height:24px;margin:0 0 24px}.activity-load-error{display:grid;gap:16px;margin-bottom:24px}.activity-layout .activity-load-error .planning-note{margin:0}.activity-load-error>button{justify-self:end}.activity-count{min-width:24px;height:24px;padding:0 6px;display:inline-flex;align-items:center;justify-content:center;border-radius:8px;background:#e0e9df;color:#244f43;font-size:13px;font-weight:600}.activity-layout .activity-changes .planning-card:last-child{margin-bottom:0}
@media(max-width:600px){.activity-events article{padding:20px}.activity-events header{flex-wrap:wrap}.activity-read-state{margin-left:36px}.activity-event-actions{display:grid;grid-template-columns:minmax(0,1fr)}.activity-side>button{flex:1}.activity-toolbar{gap:12px}.activity-toolbar>button{flex:1}.activity-layout .planning-secondary{grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:no-preference){.activity-notice{animation:planning-arrive 180ms ease-out}.activity-events article{animation:planning-arrive 180ms ease-out}}

#modal .activity-layout .activity-context{display:flex;align-items:flex-start;gap:12px;font-size:15px;line-height:24px;color:#52675f;margin:0 0 20px}#modal .activity-layout .activity-context>.pf-icon{flex:none;margin-top:2px}#modal .activity-layout .activity-context>span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}#modal .activity-layout .activity-toolbar{margin:0 0 20px}#modal .activity-layout .activity-events{padding:0;margin:0;list-style:none}#modal .activity-layout .activity-events>li{padding:0;margin:0;border:0;background:transparent}#modal .activity-layout .activity-events article{padding:20px;gap:16px}#modal .activity-layout .activity-events h3{margin:0;font-size:18px;line-height:26px}#modal .activity-layout .activity-events header p{margin:8px 0 0;font-size:14px;line-height:22px}#modal .activity-layout .activity-project,#modal .activity-layout .activity-preview{margin:0;font-size:15px;line-height:24px}#modal .activity-layout .activity-preview{-webkit-line-clamp:1}#modal .activity-layout .activity-comment-text{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:16px;line-height:26px}

.workspace-v2 .toptools .activity-count{height:22px;min-width:22px;line-height:20px}

#modal .activity-layout .planning-footer .activity-notice{margin:0;padding:0;background:transparent;border:0;align-self:center;flex:1;font-size:14px;line-height:22px;min-width:0}#modal .activity-layout .planning-footer .activity-notice .pf-icon{width:20px;height:20px;flex:none}

/* Activity filters are a separate step; Berlin date inputs retain their native picker. */
.activity-filter-dates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}#modal .activity-layout .activity-filters>.activity-context{margin:0}.activity-filters .planning-secondary{justify-content:flex-end;margin:0}
#modal .activity-layout .activity-filters input[type=date]{-webkit-appearance:none;appearance:none;display:block;min-inline-size:0;max-inline-size:100%;inline-size:100%;overflow:hidden;text-align:left}#modal .activity-layout .activity-filters input[type=date]::-webkit-date-and-time-value{text-align:left;min-height:24px}
@media(max-width:600px){.activity-filter-dates{grid-template-columns:minmax(0,1fr)}}

@media(max-width:600px){.activity-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center}.activity-toolbar>button{width:100%;padding:12px;white-space:nowrap;word-break:normal;overflow-wrap:normal}.activity-toolbar .planning-checkbox{grid-column:1/-1;justify-self:start}}
@media(max-width:380px){.activity-toolbar{grid-template-columns:minmax(0,1fr)}}

.activity-events header p{overflow-wrap:anywhere}

/* Certificates: a chosen employee, one task per view, explicit review. */
.qualification-layout .qualification-employee{display:grid;gap:10px;margin:0 0 28px;font-size:16px;line-height:24px;font-weight:600}
.qualification-layout .qualification-employee select{width:100%;min-width:0;min-height:48px;font-size:16px}
.qualification-toolbar,.qualification-record-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:12px;margin:0 0 24px}
.qualification-record-actions{margin:24px 0 0}
#modal .qualification-records{display:grid;gap:20px;margin:0 0 24px;padding:0;list-style:none}
#modal .qualification-records>li{padding:24px;margin:0;min-width:0;border:1px solid #cdd7cd;border-radius:16px;background:#fff}
.qualification-records article>header{display:flex;align-items:flex-start;gap:16px;margin:0 0 20px}
.qualification-records header>div{min-width:0;flex:1}
#modal .qualification-records h3{font-size:18px;line-height:26px;margin:0 0 8px;overflow-wrap:anywhere}
#modal .qualification-records header p{font-size:14px;line-height:22px;margin:0;color:#52675f}
#modal .qualification-records .planning-status{margin-bottom:16px}
#modal .qualification-layout .planning-fields input[type=date]{-webkit-appearance:none;appearance:none;display:block;min-inline-size:0;max-inline-size:100%;inline-size:100%;overflow:hidden;text-align:left}
#modal .qualification-layout .planning-fields input[type=date]::-webkit-date-and-time-value{text-align:left;min-height:24px}
#modal .qualification-layout .qualification-hint{font-size:14px;line-height:22px;margin:24px 0 0;color:#52675f}
#modal .qualification-layout[data-qualification-view=detail] .planning-status{margin:0 0 28px}
#modal .qualification-layout .planning-summary{margin:0 0 28px}
@media(max-width:600px){#modal .qualification-records>li{padding:20px}.qualification-toolbar,.qualification-record-actions{display:grid;grid-template-columns:minmax(0,1fr)}.qualification-layout .qualification-record-actions button{width:100%}}
@media(prefers-reduced-motion:no-preference){.qualification-result.is-confirmed .pf-icon{animation:qualification-success 180ms ease-out}@keyframes qualification-success{from{opacity:.4;transform:scale(.8)}to{opacity:1;transform:none}}}
.qualification-selection{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:end;margin-bottom:28px}
.qualification-layout .qualification-selection .qualification-employee{margin:0}
.qualification-card-bottom{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px}
#modal .qualification-card-bottom .planning-status{margin:0}
.qualification-card-bottom .qualification-record-actions{margin:0 0 0 auto}
@media(max-width:600px){.qualification-selection{grid-template-columns:minmax(0,1fr)}.qualification-selection>button{justify-self:end}.qualification-card-bottom .qualification-record-actions{margin-left:0;width:100%}}

/* DOC01: shared spacious dialog, fixed actions and a scrollable workspace. */
#modal:has(>.document-dialog){width:min(1000px,calc(100vw - 64px));height:min(760px,84dvh);min-height:0;max-height:calc(100dvh - 32px);padding:0;overflow:hidden}
#modal:has(>.document-dialog--compact){height:fit-content}
#modal .document-dialog{height:100%;max-height:inherit;min-height:0;display:flex;flex-direction:column;color:#203a32;font-size:16px;line-height:24px}
#modal .document-dialog .pf-icon{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
#modal .document-dialog-header{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding:28px 32px;border-bottom:1px solid #cdd7cd;flex:none}
#modal .document-dialog-header>div{min-width:0}#modal .document-dialog-header h2{display:flex;gap:12px;align-items:center;font-size:24px;line-height:32px;margin:0;letter-spacing:0}#modal .document-dialog-header p{font-size:16px;line-height:24px;margin:12px 0 0;overflow-wrap:anywhere}#modal .document-dialog-header>button{flex:none}
#modal .document-dialog-workspace{min-height:0;overflow:auto;overscroll-behavior:contain;padding:28px 32px;flex:1;scroll-padding:24px}#modal .document-dialog--compact .document-dialog-workspace{flex:0 1 auto}
#modal .document-dialog-footer{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:12px;padding:20px 32px;border-top:1px solid #cdd7cd;background:#f9faf6;flex:none}
#modal .document-dialog button{min-height:48px;display:inline-flex;align-items:center;justify-content:center;gap:8px;margin:0}#modal .document-dialog label{display:grid;gap:10px;margin:0;font-size:16px;line-height:24px}#modal .document-dialog :is(input,select,textarea){font-size:16px;line-height:24px;width:100%}
#modal .document-filter-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 32px}#modal .document-filter-search{grid-column:1/-1}#modal .document-action-fields{border:0;padding:0;margin:0;display:grid;gap:28px}#modal .document-action-error{margin:20px 0 0;color:#8e3028}#modal .document-action-error:empty{display:none}
@media(max-width:600px),(max-height:500px) and (max-width:1100px){#modal:has(>.document-dialog){width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0}#modal .document-dialog-header{padding:20px;gap:16px}#modal .document-dialog-header h2{font-size:24px;line-height:32px}#modal .document-dialog-workspace{padding:24px 20px;min-height:80px}#modal .document-dialog-footer{padding:16px 20px max(20px,env(safe-area-inset-bottom))}#modal .document-filter-fields{grid-template-columns:minmax(0,1fr);gap:24px}}
@media(max-width:600px){#modal .document-dialog-footer{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}#modal .document-dialog-footer>.primary{grid-column:1/-1;order:-1}#modal .document-dialog-footer>button{width:100%;min-width:0}}
@media(min-width:601px) and (min-height:501px){#modal .document-dialog--compact{height:auto;max-height:calc(84dvh - 2px)}}

#modal .document-dialog{-webkit-text-size-adjust:100%;text-size-adjust:100%}

/* M07 history: read-only commercial versions, never a technical JSON disclosure. */
#modal .estimate-history{min-width:0;color:#203a32;-webkit-text-size-adjust:100%;text-size-adjust:100%}
#modal .estimate-history h3{font-size:18px;line-height:27px;margin:24px 0 12px;font-weight:600;letter-spacing:0}#modal .estimate-history h4{font-size:16px;line-height:25px;margin:0;font-weight:600;letter-spacing:0}
.estimate-history-tabs{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:24px}.estimate-history-tabs button[aria-pressed=true]{background:#e0e9df!important;border-color:#244f43!important;color:#244f43}
.estimate-history-cards,.estimate-history-lines{list-style:none;padding:0;margin:24px 0;display:grid;gap:20px}.estimate-history-card{padding:24px;border:1px solid #cdd7cd;border-radius:18px;background:#fff}.estimate-history-card>header{display:flex;gap:16px;align-items:flex-start}.estimate-history-card>header>div{min-width:0;flex:1}.estimate-history-card h4{overflow-wrap:anywhere}.estimate-history-icon{width:40px;height:40px;border:1px solid #cdd7cd;border-radius:13px;background:#e0e9df;display:grid;place-items:center;flex:none}
#modal .estimate-history-meta{font-size:14px;line-height:23px;color:#52675f;margin:8px 0 0;overflow-wrap:anywhere}#modal .estimate-history-note{font-size:14px;line-height:23px;color:#52675f;margin:16px 0;display:flex;align-items:flex-start;gap:10px}.estimate-history-note>.pf-icon{margin-top:2px}
.estimate-history-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 28px;margin:24px 0}.estimate-history-facts>div{min-width:0}.estimate-history-facts dt{font-size:14px;line-height:22px;color:#52675f;margin-bottom:8px}.estimate-history-facts dd{font-size:16px;line-height:25px;font-weight:550;margin:0;overflow-wrap:anywhere}
#modal .estimate-history-user-text{font-size:16px;line-height:26px;margin:20px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}.estimate-history-card-actions{display:flex;justify-content:flex-end;margin-top:24px;padding-top:20px;border-top:1px solid #dbe2d7}.estimate-history-pagination{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:24px;flex-wrap:wrap}.estimate-history-pagination>span{font-size:14px;line-height:22px}.estimate-history-section{margin-top:28px;padding-top:24px;border-top:1px solid #cdd7cd}#modal .estimate-history-section h4{display:flex;align-items:center;gap:10px}.estimate-history-lines>li{min-width:0;padding:20px;border:1px solid #d3dccd;border-radius:14px;background:#fff}.estimate-history-lines>li>strong{font-size:16px;line-height:25px;overflow-wrap:anywhere}.estimate-history-lines .estimate-history-facts{margin:16px 0 0}.estimate-history-empty,.estimate-history-loading,.estimate-history-error{display:flex;gap:16px;align-items:center;flex-wrap:wrap;padding:24px;border:1px solid #cdd7cd;border-radius:16px;background:#fff;font-size:16px;line-height:26px}.estimate-history-error{color:#8e3028}.estimate-history-error p{margin:0;overflow-wrap:anywhere}.estimate-history-error button{margin-left:auto!important}#modal .estimate-history-rule{font-size:14px;line-height:23px;color:#52675f;margin:24px 0 0}
@media(max-width:600px){.estimate-history-card{padding:20px 16px}.estimate-history-card>header{gap:12px}.estimate-history-card-actions button{width:100%}.estimate-history-facts{gap:20px}.estimate-history-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.estimate-history-tabs button{min-width:0;width:100%}.estimate-history-lines>li{padding:20px 16px}.estimate-history-pagination{justify-content:center}.estimate-history-pagination button{flex:1}.estimate-history-pagination>span{order:-1;width:100%;text-align:center}.estimate-history-error button{margin-left:0!important;width:100%}}

/* Employee tabs retain a single draft; time is entered as hours. */
.employee-editor-tabs{display:flex;gap:12px;margin-bottom:28px;flex-wrap:wrap;border-bottom:1px solid #cdd7cd;padding-bottom:20px}
.employee-editor-tabs>[role=tab]{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:48px;padding:12px 20px;flex:1;background:#fff;border:1px solid #a8bbb1;border-radius:12px;font-size:16px;line-height:24px}
.employee-editor-tabs>[aria-selected=true]{background:#e4eee6;border-color:#244f43;box-shadow:inset 0 -3px 0 #244f43;color:#244f43;font-weight:600}
.employee-editor-tabs .pf-icon{width:20px;height:20px;flex:none}.employee-editor-layout .employee-editor-error{overflow-wrap:anywhere}
.capacity-heading{align-items:flex-start;gap:24px}.capacity-heading>div{max-width:760px}.capacity-heading p{font-size:16px;line-height:26px;margin:16px 0 0;color:#52665a}
.capacity-heading>button,.capacity-form button,.capacity-result>button{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:48px;margin:0}.capacity-form .form-actions{gap:16px;margin-top:28px}
.capacity-form>[class=form-grid]{max-width:600px;margin-bottom:28px}.capacity-requirement{margin:0 0 24px;padding:24px;border:1px solid #cdd7cd;border-radius:16px;background:#fafbf8;min-width:0}
.capacity-requirement legend{padding:0 10px;font-weight:600;font-size:18px}.capacity-requirement>.form-grid{gap:24px;grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:20px}
.capacity-form label,.capacity-filter-fields label{display:grid;gap:10px;margin:0;font-size:16px;line-height:24px}.capacity-form label[hidden]{display:none}.capacity-form input,.capacity-form select{font-size:16px;min-height:48px;width:100%;min-width:0}
.capacity-refine{margin-right:12px!important}.capacity-filter-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.capacity-filter-fields>label:last-child{grid-column:1/-1}
.capacity-ready{display:flex;gap:16px;align-items:center;padding:20px 0;margin:0;line-height:26px;color:#52665a}.capacity-result h2{font-size:24px;line-height:32px;margin:0 0 24px}.capacity-result h3{font-size:18px;line-height:26px}.capacity-result [data-capacity-daily-panel]{margin-top:24px}.capacity-result .stats{gap:20px}
@media(max-width:600px){.employee-editor-tabs{gap:8px}.employee-editor-tabs>[role=tab]{padding:12px 8px;gap:6px;font-size:14px}.capacity-heading{display:grid;gap:20px}.capacity-heading>button{justify-self:start}.capacity-requirement{padding:20px}.capacity-requirement>.form-grid,.capacity-filter-fields{grid-template-columns:minmax(0,1fr)}.capacity-form .form-actions{display:grid;grid-template-columns:minmax(0,1fr)}.capacity-form .form-actions>button{width:100%}.capacity-refine{margin-bottom:12px!important}}
.capacity-requirement-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.capacity-requirement-actions>button{margin:0!important}
.capacity-form>.form-grid{padding-top:12px}.capacity-heading .pf-icon,.capacity-form .pf-icon,.capacity-result .pf-icon{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.capacity-preview-note{display:flex;align-items:center;gap:10px;font-size:14px;line-height:24px;color:#52665a;margin:20px 0 0}
@media(min-width:851px) and (min-height:501px){#modal:has(.capacity-filter-fields){width:min(960px,60vw);height:min(720px,66dvh)}}
#modal .employee-editor-layout{-webkit-text-size-adjust:100%;text-size-adjust:100%}
#modal .employee-editor-tabs>[role=tab]{overflow-wrap:normal;word-break:normal}#modal .employee-editor-tabs>[role=tab]>span{overflow-wrap:normal;word-break:normal}
@media(max-width:600px){#modal .employee-editor-tabs>[role=tab]{flex-direction:column;gap:6px;padding:10px 6px;font-size:14px;line-height:20px;min-height:72px}#modal .employee-editor-tabs>[role=tab] .pf-icon{width:20px;height:20px}}

/* iOS date controls must not force the employee/grid column wider than the screen. */
.employee-editor-fields{grid-template-columns:minmax(0,1fr)}
#modal .employee-editor-fields label,.capacity-form label,.capacity-filter-fields label{min-width:0}
#modal .employee-editor-fields input[type=date],.capacity-form input[type=date],.capacity-filter-fields input[type=date]{-webkit-appearance:none;appearance:none;display:block;box-sizing:border-box;min-inline-size:0;max-inline-size:100%;inline-size:100%;overflow:hidden;text-align:left}
#modal .employee-editor-fields input[type=date]::-webkit-date-and-time-value,.capacity-form input[type=date]::-webkit-date-and-time-value,.capacity-filter-fields input[type=date]::-webkit-date-and-time-value{text-align:left;min-height:24px}
/* The grid owns the spacing; shared form-label margins must not double it. */
#modal .employee-editor-layout form.employee-editor-fields label{margin:0}
@media(max-height:500px) and (min-width:601px) and (max-width:1100px){
 #modal[open]:has(.employee-editor-layout){width:100%;max-width:100%;min-width:0;height:100dvh;max-height:100dvh;min-height:0;margin:0;border:0;border-radius:0;padding:12px 20px}
 #modal .employee-editor-layout{gap:12px}
 #modal .employee-editor-layout .report-modal-header h2{font-size:20px;line-height:28px;margin:0}
 #modal .employee-editor-layout .report-modal-header{margin:0;gap:16px;flex:none}
 #modal .employee-editor-tabs{gap:12px;margin-bottom:12px;padding-bottom:12px}
 #modal .employee-editor-tabs>[role=tab]{padding:10px 12px;min-height:48px}
 #modal .employee-editor-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 24px}
 #modal .employee-editor-footer{padding-top:12px;flex:none}
}

/* M07 history: one content scroll, visible pagination before the records. */
#modal:has(>.document-dialog):has([data-history-close]){width:60vw;max-width:60vw;height:66dvh;max-height:66dvh;min-width:0}
#modal:has([data-history-close]) .document-dialog-header{padding:20px 24px;gap:20px}
#modal:has([data-history-close]) .document-dialog-workspace{padding:24px}
#modal:has([data-history-close]) .document-dialog-footer{padding:16px 24px}
#modal .estimate-history-pagination{margin:20px 0 24px;padding:16px 0;border-top:1px solid #dbe2d7;border-bottom:1px solid #dbe2d7}
@media(max-width:850px){#modal:has(>.document-dialog):has([data-history-close]){width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0}#modal:has([data-history-close]) .document-dialog-header{padding:20px 16px;gap:16px}#modal:has([data-history-close]) .document-dialog-workspace{padding:24px 16px}#modal:has([data-history-close]) .document-dialog-footer{padding:16px}}

#modal .estimate-history:has(>.estimate-history-cards){display:grid;grid-template-columns:minmax(0,1fr) auto;gap:20px}
#modal .estimate-history:has(>.estimate-history-cards)>.estimate-history-tabs{grid-column:1/-1;margin:0}
#modal .estimate-history:has(>.estimate-history-cards)>h3{grid-column:1;margin:0;align-self:center}
#modal .estimate-history:has(>.estimate-history-cards)>.estimate-history-pagination{grid-column:2;grid-row:2;margin:0;padding:0;border:0;gap:12px}
#modal .estimate-history:has(>.estimate-history-cards)>.estimate-history-cards,#modal .estimate-history:has(>.estimate-history-cards)>.estimate-history-note,#modal .estimate-history:has(>.estimate-history-cards)>.estimate-history-rule{grid-column:1/-1;margin:0}
@media(max-width:600px){#modal .estimate-history:has(>.estimate-history-cards){grid-template-columns:minmax(0,1fr)}#modal .estimate-history:has(>.estimate-history-cards)>h3,#modal .estimate-history:has(>.estimate-history-cards)>.estimate-history-pagination{grid-column:1;grid-row:auto}}

/* Project editor: fixed actions, a single content scroll area, and quiet green emphasis. */
#modal[open]:has(.signature-review-layout.project-editor-layout){width:60vw;max-width:1100px;height:66dvh;max-height:66dvh;padding:24px 28px;overflow:hidden}
#modal .project-editor-layout{gap:20px;min-width:0}
.project-editor-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 28px}
.project-editor-tabs:has(>button:last-child:nth-child(2)){grid-template-columns:repeat(2,minmax(0,1fr))}
#modal .project-editor-tabs button{min-width:0;border:1px solid #ccd9cd;background:#f5f8f3;color:#34533c;padding:12px}
#modal .project-editor-tabs [aria-selected=true]{background:#e0ebdc;border-color:#537d51;color:#264f2d;box-shadow:inset 0 -3px #52784c}
#modal .project-editor-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin:0;padding:0}
#modal .project-editor-layout form.project-editor-fields label{display:flex;flex-direction:column;gap:10px;margin:0;min-width:0;font-size:14px;font-weight:600;line-height:20px}
#modal .project-editor-fields :is(input,select){width:100%;min-width:0;max-width:100%;box-sizing:border-box;min-height:48px;margin:0;appearance:none;font-size:16px;line-height:24px}
#modal .project-editor-fields small{font-size:13px;line-height:20px;font-weight:400;color:#536250}
.project-editor-footer{flex:none;display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap;border-top:1px solid #d8e0d4;padding-top:20px}
#modal .project-editor-error{flex:none;background:#fff1ed;color:#8a3026;border-radius:12px;padding:12px 16px;margin:0;max-height:20dvh;overflow:auto;font-size:14px;line-height:22px}
.project-editor-changes{display:grid;gap:20px}.project-editor-changes section{padding:20px;border:1px solid #d5dfd0;border-radius:16px;background:#f7f9f4;min-width:0}
#modal .project-editor-changes h3{font-size:16px;line-height:24px;margin:0 0 12px}.project-editor-changes dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:0}.project-editor-changes dt{font-size:13px;color:#596555;margin-bottom:8px}.project-editor-changes dd{margin:0;overflow-wrap:anywhere;font-size:16px;line-height:24px}
.project-editor-context{font-weight:600}.project-editor-notice{display:flex;align-items:flex-start;gap:16px}.project-editor-result{display:flex;align-items:center;gap:16px;padding:24px;border-radius:16px;background:#e5efde}.project-editor-result>.pf-icon{width:36px;height:36px;color:#397244}#modal .project-editor-result h3{margin:0}
@media(max-width:850px),(max-height:520px) and (orientation:landscape){#modal[open]:has(.signature-review-layout.project-editor-layout){width:100vw;max-width:none;height:100dvh;max-height:100dvh;margin:0;border-radius:0;padding:20px;box-sizing:border-box}}
@media(max-width:520px){#modal .project-editor-fields{grid-template-columns:minmax(0,1fr)}.project-editor-tabs{gap:8px}#modal .project-editor-tabs button{flex-direction:column;gap:6px;padding:12px 6px;font-size:13px}.project-editor-footer button{flex:1 1 140px}.project-editor-changes dl{grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:no-preference){.project-editor-result>.pf-icon{animation:project-result-in 180ms ease-out}@keyframes project-result-in{from{transform:scale(.85);opacity:.3}to{transform:scale(1);opacity:1}}}
.project-editor-field{display:flex;flex-direction:column;gap:10px;min-width:0}.project-editor-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.project-editor-summary dl{grid-template-columns:minmax(0,1fr)}
@media(max-width:520px){.project-editor-summary{grid-template-columns:minmax(0,1fr)}}

#modal .project-editor-layout .report-modal-header{margin:0;flex:none;gap:20px}
#modal .project-editor-layout .report-modal-header h2{margin:0;font-size:24px;line-height:32px}
.project-editor-layout :focus-visible{outline:3px solid #244f43;outline-offset:3px}
#modal .project-editor-fields select{appearance:auto}

/* PRJ07: one work order at a time; compact summaries and visible actions. */
#modal[open]:has(.signature-review-layout.work-order-layout){width:60vw;max-width:1100px;height:66dvh;max-height:66dvh;min-height:0;padding:24px 28px;overflow:hidden}
#modal .work-order-layout .report-modal-header{margin:0;flex:none;gap:20px;align-items:flex-start}
#modal .work-order-layout .report-modal-heading{min-width:0;align-items:flex-start}
#modal .work-order-layout .report-modal-heading>.pf-icon{margin-top:5px}
#modal .work-order-layout .report-modal-header h2{font-size:24px;line-height:32px;margin:0}
#modal .work-order-layout .report-modal-header p{font-size:14px;line-height:22px;margin:6px 0 0;color:#52675f}
#modal .work-order-layout .report-modal-header>button{flex:none}
.orders-footer{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap;padding-top:20px;border-top:1px solid #d1dbcd;flex:none}
.orders-actions{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap;margin:0 0 24px}
#modal .work-order-layout .orders-intro{font-size:15px;line-height:24px;margin:0 0 24px;color:#52675f}
.orders-toolbar{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:0 0 24px}
#modal .orders-toolbar label{display:flex;align-items:center;gap:12px;flex:1 1 220px;margin:0;min-width:0}
#modal .orders-toolbar input{width:100%;min-width:0}
.orders-views{display:flex;gap:8px;flex-wrap:wrap}#modal .orders-views button{padding:10px 12px}
#modal .orders-views [aria-pressed=true],#modal .orders-tabs [aria-selected=true]{background:#e2ecde;border-color:#527a4f;box-shadow:inset 0 -3px #527a4f}
.orders-visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.orders-cards{display:grid;gap:16px}.orders-cards>article{border:1px solid #d0dccc;border-radius:18px;background:#fafbf7;padding:20px;min-width:0}
.orders-card-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}
#modal .orders-card-heading h3{font-size:18px;line-height:26px;margin:0;flex:1 1 180px}
#modal .orders-cards article>p{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:14px;line-height:22px;color:#52675f;margin:12px 0 20px}
.orders-card-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.orders-card-footer>span{font-size:14px;line-height:22px;color:#52675f}
.order-status{display:inline-flex;align-items:center;padding:5px 10px;border:1px solid #d4dfce;border-radius:999px;background:#edf1e8;font-size:13px;line-height:20px;white-space:nowrap}.order-status--active{background:#e3eee1;color:#315d36;border-color:#c1d4b9}.order-status--done{background:#e2ebe6;color:#244f43}
.orders-records{display:grid;gap:16px;list-style:none;padding:0;margin:0}
#modal .work-order-layout .orders-records>li{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;flex-wrap:wrap;padding:20px;border:1px solid #d0dccc;border-radius:16px;background:#fafbf7;margin:0;min-width:0}
.orders-records>li>div:first-child{flex:1 1 180px;min-width:0}#modal .orders-records h4{font-size:16px;line-height:24px;margin:0 0 10px}#modal .orders-records p{font-size:14px;line-height:22px;margin:0 0 12px;color:#52675f}
.orders-record-actions{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap}
#modal .orders-records p.orders-dependency{margin:12px 0 0;display:flex;gap:10px;align-items:flex-start;overflow-wrap:anywhere}
.orders-detail-facts{display:flex;gap:16px 24px;flex-wrap:wrap;margin-bottom:24px;font-size:14px;line-height:22px;color:#52675f}.orders-detail-facts>span{display:flex;gap:10px;align-items:center}
#modal .work-order-layout p.orders-source{font-size:14px;line-height:22px;display:flex;gap:10px;align-items:flex-start;margin:0 0 24px}
.orders-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0 0 24px}
.orders-stage-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}#modal .orders-stage-heading h3{margin:0;font-size:18px;line-height:26px}
.orders-board{display:grid;gap:24px;grid-template-columns:repeat(3,minmax(0,1fr))}.orders-board>section{min-width:0}#modal .orders-board>section>h3{font-size:16px;line-height:24px;margin:0 0 16px}.orders-board>section>h3 span{font-size:13px;color:#52675f}#modal .orders-board .orders-card-heading h3{font-size:16px;line-height:24px}.orders-board .orders-card-footer>button{margin-left:auto!important}
.orders-dates{display:grid;gap:24px}#modal .orders-dates h3{font-size:18px;line-height:26px;margin:0 0 16px}
.orders-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:32px 20px;text-align:center;color:#52675f}.orders-empty>.pf-icon{width:32px;height:32px}#modal .orders-empty p{margin:0}
#modal .work-order-layout form .orders-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
#modal .work-order-layout form .orders-fields label{display:flex;flex-direction:column;gap:10px;margin:0;min-width:0;font-size:14px;line-height:20px;font-weight:600}
#modal .orders-fields :is(input,select){width:100%;min-width:0;max-width:100%;font-size:16px;line-height:24px;font-weight:400;min-height:48px;appearance:auto}
.orders-fixed-field{display:flex;flex-direction:column;gap:10px;font-size:14px;line-height:20px}.orders-fixed-field strong{font-size:16px;line-height:24px;font-weight:500}
#modal .work-order-layout .orders-prerequisites{margin:28px 0 0;padding:20px;border:1px solid #d0dccc;border-radius:16px;min-width:0}#modal .orders-prerequisites legend{font-size:16px;line-height:24px;font-weight:600;padding:0 8px}
#modal .work-order-layout form .orders-prerequisites label{display:flex;flex-direction:row;align-items:flex-start;gap:12px;margin:0 0 16px;font-size:16px;line-height:24px;font-weight:400}#modal .orders-prerequisites label:last-child{margin-bottom:0!important}#modal .orders-prerequisites input{margin:0;flex:none}
#modal .work-order-layout .orders-blockers{padding:20px;border:1px solid #d9bf92;background:#fff8eb;border-radius:16px;margin-top:24px}#modal .orders-blockers h3{display:flex;gap:12px;align-items:center;font-size:18px;line-height:26px;margin:0 0 16px}#modal .orders-blockers ul{display:grid;gap:12px;margin:0;padding:0;list-style:none}#modal .orders-blockers li{border:0;padding:0;background:none;font-size:15px;line-height:24px}
#modal .work-order-layout .orders-ready{display:flex;gap:12px;align-items:flex-start;padding:20px;border-radius:16px;background:#e9f1e3;font-size:15px;line-height:24px;margin:24px 0 0}
.orders-notice{display:flex;gap:16px;align-items:flex-start}.orders-preview{margin-top:28px}#modal .orders-preview h3{display:flex;gap:12px;align-items:center;margin:0 0 16px}#modal .orders-preview small{display:block;margin-top:8px}
#modal .work-order-layout :is(.orders-error,.orders-feedback){flex:none;padding:12px 16px;border-radius:12px;margin:0;font-size:14px;line-height:22px;max-height:18dvh;overflow:auto}#modal .work-order-layout .orders-error{background:#fff0eb;color:#8d3327}#modal .work-order-layout .orders-feedback{background:#e4efde;color:#315d36}
.work-order-layout :focus-visible{outline:3px solid #244f43;outline-offset:3px}
@media(max-width:1200px){.orders-board{grid-template-columns:minmax(0,1fr)}}
@media(max-width:850px),(max-height:520px) and (orientation:landscape){#modal[open]:has(.signature-review-layout.work-order-layout){width:100vw;max-width:none;height:100dvh;max-height:100dvh;margin:0;padding:20px;border-radius:0;box-sizing:border-box}}
@media(max-width:520px){#modal .work-order-layout form .orders-fields{grid-template-columns:minmax(0,1fr)}.orders-footer>button{flex:1 1 130px}.orders-toolbar{gap:20px}.orders-views{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}#modal .orders-views button{flex-direction:column;gap:6px;font-size:13px;padding:10px 6px}.orders-card-footer>button,.orders-record-actions{margin-left:auto!important}#modal .work-order-layout .report-modal-header>button{width:48px;padding:12px}#modal .work-order-layout .report-modal-header>button>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}#modal .work-order-layout .report-modal-header h2{font-size:22px;line-height:30px}}
@media(prefers-reduced-motion:no-preference){.work-order-layout .orders-feedback{animation:orders-feedback-in 160ms ease-out}@keyframes orders-feedback-in{from{opacity:.4;transform:translateY(3px)}to{opacity:1;transform:translateY(0)}}}
/* Keep the first record visible within the forty-percent desktop window. */
.work-order-layout .orders-actions,.work-order-layout .orders-toolbar,.work-order-layout .orders-tabs{margin-bottom:16px}
.work-order-layout .orders-detail-facts{margin-bottom:16px;align-items:center}
.work-order-layout .orders-cards>article{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:20px;row-gap:8px;padding:16px}
.work-order-layout .orders-card-heading{grid-column:1;gap:12px}
#modal .work-order-layout .orders-cards article>p{grid-column:1;margin:0}
.work-order-layout .orders-card-footer{display:contents}.work-order-layout .orders-card-footer>span{grid-column:1}.work-order-layout .orders-card-footer>button{grid-column:2;grid-row:1/span 3;align-self:center}
.orders-section-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.orders-section-heading>div{min-width:0}#modal .orders-section-heading h3{font-size:16px;line-height:24px;margin:0}#modal .orders-section-heading p{font-size:14px;line-height:22px;margin:0 0 8px;color:#52675f}
@media(max-width:1600px){.orders-board{grid-template-columns:minmax(0,1fr)}}
@media(max-width:520px){.work-order-layout .orders-cards>article{column-gap:12px;grid-template-columns:minmax(0,1fr)}.work-order-layout .orders-card-footer>button{grid-column:1;grid-row:auto;justify-self:end}.orders-section-heading{align-items:flex-start;flex-wrap:wrap}.orders-section-heading>button{margin-left:auto!important}}

/* M07 editor: one draft, explicit server result, separate approval. */
#modal[open]:has(.signature-review-layout.estimate-editor-layout){width:60vw;max-width:1100px;height:66dvh;max-height:66dvh;min-height:0;padding:24px 28px;overflow:hidden}
#modal .estimate-editor-layout .report-modal-header{margin:0;flex:none;gap:20px}
#modal .estimate-editor-layout .report-modal-header h2{font-size:24px;line-height:32px;margin:0}
.estimate-editor-footer{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap;border-top:1px solid #d1dbcd;padding-top:20px;flex:none}
.estimate-editor-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 24px}
#modal .estimate-editor-tabs [aria-selected=true]{background:#e2ecde;border-color:#527a4f;box-shadow:inset 0 -3px #527a4f}
#modal .estimate-editor-layout .estimate-editor-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin:0 0 24px}
#modal .estimate-editor-layout form label{display:flex;flex-direction:column;gap:10px;min-width:0;margin:0;font-size:14px;line-height:20px;font-weight:600}
#modal .estimate-editor-layout :is(input,select,textarea){width:100%;min-width:0;max-width:100%;font-size:16px;line-height:24px;font-weight:400;min-height:48px;appearance:auto}
#modal .estimate-editor-layout textarea{min-height:150px;padding:14px;box-sizing:border-box}
.estimate-editor-fixed{display:flex;flex-direction:column;gap:10px;font-size:14px;line-height:20px}.estimate-editor-fixed strong{font-size:16px;line-height:24px;font-weight:500}
.estimate-editor-actions{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap;margin-bottom:20px}
#modal .estimate-editor-layout .estimate-editor-lines{display:grid;gap:16px;list-style:none;padding:0;margin:0}
#modal .estimate-editor-layout .estimate-editor-lines>li{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;flex-wrap:wrap;border:1px solid #d0dccc;border-radius:16px;background:#fafbf7;padding:20px;min-width:0}
.estimate-editor-lines>li>div:first-child{min-width:0;flex:1 1 200px;font-size:16px;line-height:24px;font-weight:600;overflow-wrap:anywhere}
#modal .estimate-editor-lines small{display:block;font-size:14px;line-height:22px;font-weight:400;margin-top:10px;color:#52675f}
.estimate-editor-row-actions{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap}
.estimate-editor-pagination{display:flex;justify-content:flex-end;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:20px;font-size:14px;line-height:22px}
.estimate-editor-empty{display:flex;justify-content:center;align-items:center;gap:16px;min-height:120px}.estimate-editor-notice{display:flex;gap:16px;align-items:flex-start}
#modal .estimate-editor-layout .estimate-editor-hint{font-size:14px;line-height:22px;color:#52675f;margin:0 0 20px}
#modal .estimate-editor-layout .estimate-editor-error{padding:12px 16px;border-radius:12px;background:#fff0eb;color:#8d3327;flex:none;margin:0;font-size:14px;line-height:22px;max-height:18dvh;overflow:auto}
.estimate-editor-success{display:flex;gap:16px;align-items:center;padding:20px;border-radius:16px;background:#e5efdf;margin-bottom:24px}.estimate-editor-success>.pf-icon{width:32px;height:32px;color:#315d36}#modal .estimate-editor-success h3{font-size:18px;line-height:26px;margin:0 0 8px}#modal .estimate-editor-success p{font-size:14px;line-height:22px;margin:0}
.estimate-editor-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:0 0 24px}.estimate-editor-totals dt{font-size:14px;line-height:22px;color:#52675f;margin-bottom:10px}.estimate-editor-totals dd{font-size:22px;line-height:30px;font-weight:600;margin:0;overflow-wrap:anywhere}
.estimate-editor-changes{display:grid;gap:20px}.estimate-editor-changes section{padding:20px;border:1px solid #d0dccc;border-radius:16px;background:#fafbf7;min-width:0}#modal .estimate-editor-changes h3{font-size:16px;line-height:24px;margin:0 0 16px}.estimate-editor-changes dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:0}.estimate-editor-changes dt{font-size:13px;line-height:20px;color:#52675f;margin-bottom:8px}.estimate-editor-changes dd{margin:0;font-size:16px;line-height:24px;overflow-wrap:anywhere;white-space:pre-wrap}
#modal .estimate-editor-source h3{font-size:18px;line-height:26px;margin:0 0 12px}.estimate-editor-layout :focus-visible{outline:3px solid #244f43;outline-offset:3px}
@media(max-width:850px),(max-height:520px) and (orientation:landscape){#modal[open]:has(.signature-review-layout.estimate-editor-layout){width:100vw;max-width:none;height:100dvh;max-height:100dvh;margin:0;padding:20px;border-radius:0;box-sizing:border-box}}
@media(max-width:520px){#modal .estimate-editor-layout .estimate-editor-fields,.estimate-editor-changes dl{grid-template-columns:minmax(0,1fr)}#modal .estimate-editor-tabs button{flex-direction:column;gap:6px;font-size:13px;padding:12px 6px}.estimate-editor-tabs{gap:8px}.estimate-editor-footer>button{flex:1 1 130px}.estimate-editor-totals{grid-template-columns:minmax(0,1fr)}.estimate-editor-row-actions{width:100%}.estimate-editor-row-actions>button{flex:1 1 120px}#modal .estimate-editor-layout .report-modal-header>button{width:48px;padding:12px;flex:none}#modal .estimate-editor-layout .report-modal-header>button>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}}
@media(prefers-reduced-motion:no-preference){.estimate-editor-success>.pf-icon{animation:estimate-editor-success 180ms ease-out}@keyframes estimate-editor-success{from{opacity:.3;transform:scale(.85)}to{opacity:1;transform:scale(1)}}}
.estimate-editor-changes--new{grid-template-columns:repeat(2,minmax(0,1fr))}.estimate-editor-changes--new .estimate-editor-wide{grid-column:1/-1}#modal .estimate-editor-changes section>p{margin:0;line-height:24px;white-space:pre-wrap}
@media(max-width:520px){.estimate-editor-changes--new{grid-template-columns:minmax(0,1fr)}}
@media(min-width:851px){#modal .estimate-editor-layout .estimate-editor-rule-fields{grid-template-columns:repeat(3,minmax(0,1fr))}#modal .estimate-editor-layout textarea{min-height:120px}}

/* Keep editor close actions stable beside long translated headings. */
#modal :is(.project-editor-layout,.estimate-editor-layout,.work-order-layout)>.report-modal-header>:is([data-project-action="close"],[data-estimate-action="close"],[data-order-action="close"]){flex:none;white-space:nowrap;margin:0}
@media(max-width:600px){
 #modal :is(.project-editor-layout,.estimate-editor-layout,.work-order-layout)>.report-modal-header{gap:16px}
 #modal :is(.project-editor-layout,.estimate-editor-layout,.work-order-layout)>.report-modal-header>:is([data-project-action="close"],[data-estimate-action="close"],[data-order-action="close"]){width:48px;height:48px;padding:12px}
 #modal :is(.project-editor-layout,.estimate-editor-layout,.work-order-layout)>.report-modal-header>:is([data-project-action="close"],[data-estimate-action="close"],[data-order-action="close"])>span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
}

/* Native WebKit date controls must fit the work-order field column. */
#modal .work-order-layout .orders-fields input[type=date]{-webkit-appearance:none;appearance:none;display:block;box-sizing:border-box;min-inline-size:0;max-inline-size:100%;inline-size:100%;overflow:hidden;text-align:left}
#modal .work-order-layout .orders-fields input[type=date]::-webkit-date-and-time-value{text-align:left;min-height:24px}

/* Material requirements: compact facts on the page, generous single-scroll forms. */
.material-cards,.material-history{list-style:none;padding:0;margin:24px 0;display:grid;gap:20px}
.material-cards>li{padding:24px;border:1px solid #d5dfd5;border-radius:20px;background:#fbfcf9;min-width:0}
.material-cards header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}
.material-cards h4{font-size:18px;line-height:26px;margin:0 0 8px;overflow-wrap:anywhere}.material-cards small{color:#52645b;font-size:14px}
.material-unit{padding:8px 12px;border-radius:12px;background:#e9efe9;white-space:nowrap}
.material-cards dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin:24px 0}.material-cards dt{font-size:13px;color:#52645b;margin-bottom:8px}.material-cards dd{font-size:20px;line-height:28px;margin:0;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.material-missing{display:flex;align-items:center;gap:10px;color:#745b26;font-size:14px;margin:16px 0}.material-cards .project-actions{gap:12px;flex-wrap:wrap}.material-filters{margin-top:20px}
#modal .material-layout textarea{width:100%;min-height:100px;margin:0;padding:12px;border:1px solid #bdcdbf;border-radius:12px;font:inherit;box-sizing:border-box}.material-wide{grid-column:1/-1}
#modal .material-layout .report-modal-header>button{flex:none;width:48px;height:48px;padding:12px}#modal .material-layout .report-modal-header>button>span{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap}
.material-history-summary{padding:20px;background:#eaf0e7;border-radius:16px;margin-bottom:24px}.material-history-summary p{white-space:pre-wrap;overflow-wrap:anywhere;margin:12px 0 0}
.material-history>li{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;padding:20px;border:1px solid #d5dfd5;border-radius:16px}.material-history small{display:block;margin-top:8px}.material-history p{white-space:pre-wrap;overflow-wrap:anywhere;margin:12px 0 0}.material-history button{flex:none}.material-layout h2{overflow-wrap:anywhere;min-width:0}.material-layout .project-editor-fields p{margin:0;align-self:center}.material-layout .project-editor-summary p{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:600px){.material-cards>li{padding:20px}.material-cards dl{gap:12px}.material-cards dd{font-size:18px}.material-history>li{flex-direction:column}.material-cards .project-actions>button{flex:1 1 140px}}
.material-cards h3{font-size:18px;line-height:26px;margin:0 0 8px;overflow-wrap:anywhere}.material-toolbar{justify-content:flex-end}
#modal .material-layout>.report-modal-content{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 4px 12px 0}
#modal .material-layout>.report-modal-header{flex:none}.material-layout .report-modal-heading{display:flex;align-items:center;gap:12px;min-width:0}

/* The pinned report context stays quiet and readable above the editor. */
#modal .report-work-context{display:grid;gap:12px;padding:20px 24px;margin:0 0 24px;border:1px solid #d4e0d8;border-radius:18px;background:#f3f7f2}
#modal .report-work-context p{display:flex;align-items:flex-start;gap:12px;margin:0;overflow-wrap:anywhere}#modal .report-work-context .pf-icon{flex-shrink:0;margin-top:2px}
.report-work-list{display:grid;gap:16px}.report-work-list li{padding:20px;gap:20px}.report-work-list li>div{min-width:0;overflow-wrap:anywhere}.report-work-list p{margin:8px 0 0}

#modal .report-ui:has(form.report-editor)>.report-work-context{flex:none;padding:12px 16px;margin:0 0 12px;gap:8px}
#modal .report-ui:has(form.report-editor)>.report-work-context p{font-size:14px;line-height:20px}

#modal:has(>.report-ui .report-work-results){width:60vw;height:66dvh;min-height:0;max-height:66dvh;padding:24px 28px;overflow:hidden}
#modal>.report-ui:has(.report-work-results){height:100%;min-height:0;display:flex;flex-direction:column}
#modal .report-ui:has(.report-work-results)>.report-modal-header{flex:none;margin-bottom:16px}
#modal .report-ui:has(.report-work-results)>.report-work-context{flex:none;padding:14px 18px;gap:8px;margin:0 0 16px}
#modal .report-work-results{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scroll-padding:16px}
#modal .report-work-results .report-work-list{margin:0;padding:0;gap:16px}
#modal .report-work-list>li{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;gap:20px}
#modal .report-work-list p{margin:6px 0 0}
#modal .report-ui .report-work-footer{flex:none;margin:16px 0 0;padding-top:16px;gap:12px}
@media(max-width:850px){#modal:has(>.report-ui .report-work-results){width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0;padding:20px}#modal .report-work-list>li{align-items:flex-start;flex-wrap:wrap}}

/* The exit decision remains spacious without covering the whole editor. */
.report-draft-exit{box-sizing:border-box;width:min(640px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:32px;border:1px solid #cdd7cd;border-radius:24px;background:#f8faf7;color:#20382c;box-shadow:0 24px 80px #102e2440;overflow:auto;animation:report-draft-enter .18s ease-out}
.report-draft-exit::backdrop{background:#142c225c;backdrop-filter:blur(3px)}
.report-draft-exit h2{font-size:1.5rem;line-height:1.3;margin:20px 0 12px}.report-draft-exit p{line-height:1.6;margin:0 0 24px}.report-draft-exit [data-exit-status]:empty{display:none}
.report-draft-exit-symbol{display:grid;place-items:center;width:56px;height:56px;border-radius:18px;background:#e1ecdf;color:#285e3b}.report-draft-exit-symbol svg{width:28px;height:28px}
.report-draft-exit-actions{display:flex;gap:12px;flex-wrap:wrap}.report-draft-exit-actions button{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:48px;padding:12px 18px;margin:0;border:1px solid #b7c7b9;border-radius:12px;background:#fff;color:#20382c;font:inherit;cursor:pointer}.report-draft-exit-actions svg{width:20px;height:20px;flex:none}.report-draft-exit-actions [data-exit-save]{background:#285e3b;color:white;border-color:#285e3b}.report-draft-exit-actions button:disabled{opacity:.55;cursor:wait}.report-draft-exit-actions button:focus-visible{outline:3px solid #528f61;outline-offset:3px}
@keyframes report-draft-enter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:600px){.report-draft-exit{padding:24px}.report-draft-exit-actions{flex-direction:column}.report-draft-exit-actions button{width:100%}}
@media(prefers-reduced-motion:reduce){.report-draft-exit{animation:none}}

.report-draft-exit .pf-icon{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none;pointer-events:none}

/* Keep the complete photo visible beside its mobile tools before zooming. */
dialog.photo-editor .photo-editor-viewport canvas{margin-inline:auto}
@media(max-width:600px){
 dialog.photo-editor .photo-editor-tool-buttons{grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
 dialog.photo-editor .photo-editor-tool-buttons button{justify-content:center;padding:12px 6px}
 dialog.photo-editor .photo-editor-tool-buttons button span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 dialog.photo-editor .photo-editor-tools{grid-template-columns:repeat(2,minmax(0,1fr))}
 dialog.photo-editor .photo-editor-tools label:has([data-zoom]){grid-column:1/-1}
}

@media(max-width:600px){dialog.photo-editor>.form-actions [data-cancel]{display:none}}

/* A taller portrait workspace uses the same ~40% desktop screen area. */
@media(min-width:900px){
 dialog.photo-editor-portrait[open]{width:min(880px,54vw);height:min(960px,74dvh);max-height:74dvh}
 dialog.photo-editor-portrait .photo-editor-tool-buttons{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
 dialog.photo-editor-portrait .photo-editor-tool-buttons button{flex-direction:column;gap:4px;padding:8px;min-width:0}
 dialog.photo-editor-portrait .photo-editor-tool-buttons button span{font-size:12px;line-height:16px;white-space:normal}
 dialog.photo-editor-portrait .photo-editor-tools{grid-template-columns:minmax(0,.65fr) minmax(0,.9fr) minmax(0,1.45fr)}
 dialog.photo-editor-portrait .photo-editor-viewport{max-height:40dvh}
 dialog.photo-editor-portrait>.form-actions [data-cancel]{display:none}
}
@media(min-width:900px) and (max-width:1099px){
 dialog.photo-editor-portrait .photo-editor-tools{grid-template-columns:minmax(0,.65fr) minmax(0,.8fr) minmax(0,1.55fr)}
 dialog.photo-editor-portrait .photo-editor-tools label{flex-direction:column;align-items:flex-start}
 dialog.photo-editor-portrait .photo-editor-tool-buttons button span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 dialog.photo-editor-portrait>.form-actions [data-undo],dialog.photo-editor-portrait>.form-actions [data-redo]{font-size:0;gap:0;width:48px;min-width:48px;padding:10px}
}

/* A single desktop toolbar gives landscape photos the remaining workspace. */
@media(min-width:900px){
 dialog.photo-editor-landscape[open]{width:min(1040px,60vw);height:min(820px,66dvh);max-height:66dvh}
 dialog.photo-editor-landscape .photo-editor-body{display:flex;flex-direction:column;gap:16px}
 dialog.photo-editor-landscape .photo-editor-toolbar{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:12px;align-items:end;flex:none}
 dialog.photo-editor-landscape .photo-editor-tool-buttons{display:flex;flex-wrap:nowrap;gap:6px}
 dialog.photo-editor-landscape .photo-editor-tool-buttons button{width:48px;min-width:48px;padding:10px;gap:0}
 dialog.photo-editor-landscape .photo-editor-tool-buttons button span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 dialog.photo-editor-landscape .photo-editor-tools{grid-template-columns:48px 56px minmax(132px,1fr);gap:8px;margin:0}
 dialog.photo-editor-landscape .photo-editor-tools label{flex-direction:column;align-items:flex-start;gap:4px;font-size:12px;line-height:16px}
 dialog.photo-editor-landscape .photo-editor-tools input[data-width]{min-width:0;width:56px;padding-inline:8px}
 dialog.photo-editor-landscape .photo-editor-tools select[data-zoom]{padding-inline:10px}
 dialog.photo-editor-landscape .photo-editor-tools label:has([data-text]){grid-column:1/-1}
 dialog.photo-editor-landscape .photo-editor-viewport{flex:1;min-height:90px;margin:0;max-height:50dvh}
 dialog.photo-editor-landscape>.form-actions [data-cancel]{display:none}
 dialog.photo-editor-landscape>.form-actions [data-undo],dialog.photo-editor-landscape>.form-actions [data-redo]{font-size:0;gap:0;width:48px;min-width:48px;padding:10px}
 dialog.photo-editor-landscape>.form-actions [data-mark-count]{margin:0 auto 0 0;white-space:nowrap}
}
@media(min-width:900px) and (max-width:1099px){
 dialog.photo-editor-landscape[open]{width:66vw;height:60dvh;max-height:60dvh}
}
@media(max-width:899px){
 dialog.photo-editor-landscape>.form-actions [data-mark-count]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
}

/* Text entry is a separate clear step, leaving the photo workspace intact. */
dialog.photo-editor .photo-editor-text-entry{width:min(640px,calc(100vw - 48px));height:fit-content;max-height:calc(100dvh - 48px);margin:auto;padding:32px;border-radius:24px}
dialog.photo-editor .photo-editor-text-entry label{display:flex;flex-direction:column;gap:12px;margin:0 0 24px}
dialog.photo-editor .photo-editor-text-entry label[hidden]{display:none!important}
dialog.photo-editor .photo-editor-text-entry input{width:100%;max-width:none}
dialog.photo-editor .photo-editor-text-entry>button{display:block;margin-left:auto}
@media(max-width:600px){dialog.photo-editor .photo-editor-text-entry{width:calc(100vw - 32px);max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);padding:24px;border-radius:20px}}

.task-checklist {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0;
  padding: 1rem;
}

.task-checklist [data-checklist-items] {
  display: grid;
  gap: .75rem;
}

.task-checklist [data-checklist-items]:empty {
  display: none;
}

.task-checklist-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: .75rem;
}

.task-checklist-row > span {
  overflow-wrap: anywhere;
}

.task-checklist-row .task-checklist-done {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.task-checklist [data-checklist-add] {
  justify-self: start;
}

#entity-form .form-grid[hidden] {
  display: none;
}

@media (max-width: 580px) {
  .task-checklist-row {
    grid-template-columns: 1fr auto;
  }

  .task-checklist-row > :first-child {
    grid-column: 1 / -1;
  }
}

#modal .personnel-template-fields{border:0;margin:0;padding:0;min-inline-size:0}
#modal .personnel-template-text{white-space:pre-wrap;overflow-wrap:anywhere}

#modal .personnel-validity{display:flex;gap:6px;align-items:center;margin-top:8px}
#modal .personnel-validity.expired{color:#9c3a29}

.hr-chart-controls{display:flex;align-items:end;flex-wrap:wrap;gap:16px;margin:0 0 24px}
[data-hr-payroll-withdraw-form]{margin-top:16px;padding:16px;border:1px solid #cad7ce;border-radius:12px}
[data-hr-payroll-withdraw-form] > p{flex-basis:100%;margin:0}
[data-hr-payroll-withdraw-form][hidden],[data-hr-payroll-withdraw-open][hidden]{display:none}
[data-hr-payroll-import]{margin-block:16px 24px}
[data-hr-payroll-import-preview] .hr-workforce-summary{max-inline-size:100%;overflow-x:auto}
[data-hr-payroll-import-preview] .hr-workforce-summary table{table-layout:auto}
[data-hr-payroll-import-preview] .hr-workforce-summary th:first-child{width:auto;white-space:nowrap}
[data-hr-payroll-import-preview] .hr-workforce-summary :is(th,td):nth-child(2),
[data-hr-payroll-actual] .hr-workforce-summary tbody th{white-space:nowrap}

[data-hr-payroll-import-preview] .hr-workforce-summary td{text-align:start}


.hr-org-views{display:flex;flex-wrap:wrap;gap:8px;margin-block-end:20px}
.hr-org-views button[aria-pressed=true]{background:var(--ws-tint,#e2eee6);border-color:var(--ws-primary,#244f43)}
.hr-overview-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:12px}
.hr-overview-card{display:flex;flex-direction:column;align-items:start;min-width:0;padding:16px;border:1px solid var(--ws-border,#d6dfd8);border-radius:12px}
.hr-overview-card :is(h4,h5){margin:0}
[data-hr-recruitment-stage] dd{white-space:nowrap}
.hr-overview-card dl{display:grid;gap:8px;width:100%;margin:12px 0 16px}
.hr-overview-card dl>div{display:flex;justify-content:space-between;gap:8px}
.hr-overview-card dd{margin:0;font-weight:700;font-variant-numeric:tabular-nums;text-align:end}
.hr-overview-card button{margin-top:auto}
.hr-card-picker{display:flex;flex-wrap:wrap;gap:6px 16px;flex-basis:100%;min-width:0;border:1px solid var(--ws-border,#d6dfd8);border-radius:12px;padding:8px 12px}
.hr-card-picker label{display:flex;align-items:center;gap:6px;padding:4px 0;margin:0}
.hr-card-picker input[type=checkbox]{margin:0}
.hr-preset-panel{margin-block-start:24px;padding-block-start:16px;border-block-start:1px solid var(--ws-border,#d6dfd8)}
.hr-preset-panel h4{margin:0 0 12px}
.hr-preset-panel .hr-chart-controls{margin-bottom:12px}
.hr-preset-panel [hidden]{display:none}
.hr-turnover-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px}
.hr-turnover-metrics>div{padding:12px;border:1px solid var(--ws-border,#d6dfd8);border-radius:12px}
.hr-turnover-metrics dd{margin:4px 0 0;font-weight:700;font-variant-numeric:tabular-nums}
.hr-workforce-summary{border:1px solid var(--ws-border,#d6dfd8);border-radius:12px;padding:16px;margin-block:0 24px}
.hr-workforce-summary h3{margin-block:0 8px}
.hr-workforce-summary>p{margin-block:0 12px}
.hr-workforce-summary table{width:100%;table-layout:fixed}
.hr-workforce-summary th,.hr-workforce-summary td{overflow-wrap:anywhere;text-align:end;font-variant-numeric:tabular-nums}
.hr-workforce-summary th:first-child{text-align:start;width:50%}
:is([data-hr-absences-results],[data-hr-work-time-results],[data-hr-attendance-results],[data-hr-payroll-actual]) .hr-workforce-summary{max-inline-size:100%;min-inline-size:0;overflow-x:auto}
:is([data-hr-absences-results],[data-hr-work-time-results],[data-hr-attendance-results],[data-hr-payroll-actual]) .hr-workforce-summary:focus-visible{outline:2px solid var(--ws-ink,#173e34);outline-offset:2px}
:is([data-hr-absences-results],[data-hr-work-time-results],[data-hr-attendance-results],[data-hr-payroll-actual]) .hr-workforce-summary table{table-layout:auto}
:is([data-hr-absences-results],[data-hr-work-time-results],[data-hr-attendance-results],[data-hr-payroll-actual]) .hr-workforce-summary th:first-child{width:auto}
:is([data-hr-absences-results],[data-hr-work-time-results],[data-hr-attendance-results],[data-hr-payroll-actual]) .hr-workforce-summary th,
:is([data-hr-absences-results],[data-hr-work-time-results],[data-hr-attendance-results],[data-hr-payroll-actual]) .hr-workforce-summary td{overflow-wrap:normal;padding:9px 8px}
:is([data-hr-absences-results],[data-hr-work-time-results],[data-hr-attendance-results],[data-hr-payroll-actual]) .hr-workforce-summary td{white-space:nowrap}
.hr-organization-chart{display:grid;gap:12px;margin:0;padding:0;list-style:none}
.hr-organization-chart li{min-width:0;overflow-wrap:anywhere}
.hr-organization-chart li[data-chart-depth="1"]{margin-inline-start:clamp(10px,2vw,24px)}
.hr-organization-chart li[data-chart-depth="2"]{margin-inline-start:clamp(20px,4vw,48px)}
.hr-organization-chart li[data-chart-depth="3"]{margin-inline-start:clamp(30px,6vw,72px)}
.hr-organization-chart li>div{display:flex;align-items:start;gap:12px;padding:16px;border:1px solid #d6dfd8;border-radius:12px}
.hr-organization-chart li>div>.pf-icon{flex:none}
.hr-organization-chart p{margin:4px 0 0}

#modal .workflow-ui .workflow-preset-list{display:grid;gap:12px;margin:20px 0 24px}
#modal .workflow-ui .workflow-preset-list>li{padding:12px 16px;gap:12px;flex-wrap:wrap}
#modal .workflow-ui :is([data-wf-preset],[data-wf-templates]){display:inline-flex;align-items:center;gap:8px;min-height:44px}
#modal .workflow-ui :is([data-wf-preset],[data-wf-templates]) .pf-icon{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}

#modal .standalone-timer-heading {
 position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start;
 justify-content: space-between; flex: none; gap: 16px; padding-bottom: 12px;
 background: #f9faf6;
}
#modal .standalone-timer-heading h2 { margin: 0; align-self: center; }
#modal .standalone-timer-close {
 flex: none; display: grid; place-items: center; width: 44px; height: 44px; min-height: 44px; margin: 0; padding: 8px;
}
#modal .standalone-timer-close .pf-icon {
 width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round;
}

[data-signature-drawing] { display: grid; gap: 12px; margin-block: 20px; }
[data-signature-drawing] :is(h3,p) { margin: 0; }
[data-handwriting-pad], .signature-ink-preview {
 width: 100%; max-width: 560px; height: 140px; display: block;
 background: var(--surface, #fff); border: 1px solid var(--border, #c8d5ce); border-radius: 12px;
}
[data-handwriting-pad] { touch-action: none; cursor: crosshair; }
:is([data-handwriting-pad], .signature-ink-preview) polyline {
 fill: none; stroke: #19362f; stroke-width: 2.4px; stroke-linecap: round; stroke-linejoin: round;
 vector-effect: non-scaling-stroke;
}
.signature-ink-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.signature-ink-actions button { min-height: 44px; }
.signature-ink-actions button[hidden] { display: none; }
.signature-ink-confirm { width: min(460px, calc(100vw - 32px)); padding: 24px; }
.signature-ink-confirm .form-actions { margin-top: 20px; }
.signature-ink-confirm .pf-icon { margin-inline-end: 6px; vertical-align: middle; }
[data-signature-proof] .signature-ink-preview { max-width: 240px; height: 74px; margin-block: 8px 16px; }

.document-signature-evidence { padding-block: 14px; border-bottom: 1px solid var(--border, #ccd7d0); }
.document-signature-evidence ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
  margin-block: 16px 20px;
}
.document-signature-evidence li {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border, #ccd7d0);
  border-radius: 16px;
  overflow-wrap: anywhere;
}
.document-signature-evidence li time { display: block; margin-block: 6px 12px; }
.document-signature-evidence .signature-ink-preview { width: 100%; height: 90px; }

/* Signing desk and measurement workspace */
.signature-review-layout [data-signature-inbox-list] {
  display: grid;
  gap: 12px;
}
#modal .signature-review-layout [data-signature-inbox-list] > li {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px;
}
.signature-review-layout [data-signature-inbox-list] > li > .pf-icon {
  width: 42px;
  height: 42px;
  padding: 10px;
  border-radius: 12px;
  background: color-mix(in srgb, currentColor 9%, transparent);
}
.signature-inbox-copy { min-width: 0; overflow-wrap: anywhere; }
.signature-inbox-copy p:empty { display: none; }
.signature-inbox-status { display: inline-block; margin-top: 6px; font-size: .875rem; font-weight: 600; }
.signature-inbox-priority { display: inline-block; margin-inline-start: 8px; font-size: .875rem; }
.signature-inbox-priority[data-signature-priority="high"] { font-weight: 700; }
.signature-download-step,.timer-desk-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.signature-download-step p { margin: 0; }
.signature-download-step [role=status]:empty { display: none; }
#modal [data-signature-pad-step] {
  border: 1px solid var(--line,#cdd8cf);
  border-radius: 16px;
  padding: 18px;
  margin-top: 20px;
}
[data-signature-pad-step]:disabled [data-signature-drawing] { pointer-events: none; opacity: .65; }
.signature-consent-note { font-size: .92rem; margin: 14px 0; }
.timer-desk { display: grid; gap: 16px; }
.timer-desk-intro,.timer-desk-panel h3 { margin: 0; }
.timer-desk-panel,.time-workspace-live { border: 1px solid var(--line,#cdd8cf); border-radius: 16px; padding: 18px; }
.timer-desk-panel { display: grid; gap: 14px; }
.timer-desk-panel h3,.time-workspace-live h2 { display: flex; align-items: center; gap: 10px; }
.timer-desk-panel .form-actions:empty { display: none; }
.timer-desk .workflow-list li { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 14px; }
.timer-desk .workflow-list p { margin: 4px 0 0; }
.time-workspace-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-block: 16px; }
.time-workspace-summary article { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--line,#cdd8cf); border-radius: 16px; }
.time-workspace-summary strong { font-size: clamp(1.15rem,3vw,1.7rem); }
.time-workspace-live { margin-block: 16px; }
.time-workspace-live h2 { margin-top: 0; }
@media(max-width:600px){
  #modal .signature-review-layout [data-signature-inbox-list] > li { grid-template-columns: 32px minmax(0,1fr); gap: 10px; }
  .signature-review-layout [data-signature-inbox-list] > li > .pf-icon { width: 32px; height: 32px; padding: 7px; }
  [data-signature-inbox-list] button { grid-column: 2; justify-self: start; }
  .time-workspace-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
#modal .signature-review-layout .signature-download-step p { margin: 0; }
#modal .signature-review-layout .signature-download-step [data-signature-download] { margin: 0; }
#modal .signature-review-layout .signature-inbox-copy strong { margin-bottom: 4px; }
#modal .signature-review-layout .signature-inbox-copy p { margin: 0; }
.report-timer-visible-details { border-top: 1px solid var(--line,#cdd8cf); margin-top: 16px; padding-top: 16px; }
.time-workspace-filters { margin-block: 20px; }
.time-workspace-filters h2 { margin-bottom: 12px; }
.time-workspace-filters .form-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,160px),1fr)); }
[data-location-status]:empty { display: none; }
[data-location-status] { margin-block: 8px 0; }


#modal [data-employee-discard] { width: min(100%, 29rem); margin-inline: auto; }
#modal [data-employee-discard] h2 { margin: 0 0 24px; }

.signature-review-layout [data-signature-inbox-search] {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin: 0 0 16px;
}
.signature-review-layout [data-signature-inbox-search] label {
  flex: 1 1 220px;
  min-width: 0;
  margin: 0;
}
.signature-review-layout [data-signature-inbox-search] input {
  width: 100%;
  margin-bottom: 0;
}

#modal [data-staff-filters]{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) auto;align-items:end;gap:12px;margin:20px 0}
#modal [data-staff-filters]>label{display:grid;gap:6px;margin:0;min-width:0}
#modal [data-staff-filters] input,#modal [data-staff-filters] select{width:100%;min-width:0;margin:0}
#modal [data-staff-filters] .actions{display:flex;flex-wrap:wrap;gap:8px}
@media(max-width:760px){#modal [data-staff-filters]{grid-template-columns:minmax(0,1fr)}}
#modal [data-staff-filters][data-payroll-documents]{grid-template-columns:minmax(0,1fr) auto}
@media(max-width:760px){#modal [data-staff-filters][data-payroll-documents]{grid-template-columns:minmax(0,1fr)}}

[data-hr-attendance-results] .hr-workforce-summary td:nth-child(2){white-space:normal}

#modal [data-expense-trip][hidden],#modal [data-expense-calculation][hidden]{display:none}

#modal [data-expense-report-filters]{display:grid;gap:18px}
#modal [data-expense-report-results] .expense-report-table{max-width:100%;overflow:auto;margin:18px 0}
#modal .expense-report-table table{min-width:740px}
#modal [data-expense-report-filters] .primary,
.heading :is([data-expense-report],[data-travel-advances]){
  display:inline-flex;
  align-items:center;
  gap:8px;
}
#modal [data-expense-report-filters] .primary>.pf-icon,
.heading :is([data-expense-report],[data-travel-advances])>.pf-icon{
  width:18px;
  height:18px;
  flex:none;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
#modal .expense-report-table td:first-child{white-space:nowrap}
#modal label:has(>[data-advance-trip]){display:grid;gap:8px;max-width:420px}

#modal [data-expense-receipt-field]{grid-column:1/-1;display:grid;gap:12px;min-width:0;padding:20px;border:1px solid #dce3d9;border-radius:12px}
#modal [data-expense-receipt-field] label{display:grid;gap:8px;min-width:0}
#modal [data-expense-receipt-field] button{justify-self:start}
#modal [data-expense-receipt-field] button[hidden]{display:none}
#modal [data-expense-receipt-status]{margin:0}


#modal [data-travel-requests] [data-travel-status] {
  flex: none;
  margin: 0;
}
#modal [data-travel-requests] [data-travel-status]:empty { display: none; }
#modal [data-travel-requests] [data-travel-form] .hr-chart-controls { gap: 12px 16px; }
#modal [data-travel-requests] [data-travel-form] .hr-chart-controls label { margin-bottom: 0; }
@media (max-height: 620px) {
  #modal [data-travel-requests] { gap: 12px; }
  #modal [data-travel-requests] .signature-review-footer { padding-top: 12px; }
}

#modal [data-travel-form] input[aria-invalid=true] { border-color: #a44235; }
#modal [data-travel-requests] [data-travel-status]:not(:empty) {
  color: #8e3324;
  background: #fff0eb;
  padding: 8px 12px;
  border-radius: 10px;
}

#modal [data-card-statement] {
  margin-block: 24px;
  padding-block-start: 20px;
  border-block-start: 1px solid #cdd7cd;
}
#modal [data-card-statement] [role=status]:not(:empty) { margin-block-start: 16px; }

#modal [data-card-statement] > label {
  display: grid;
  gap: 8px;
  max-width: 420px;
}
#modal [data-card-column-mapping] { margin-block: 16px; }

/* Local second factor after a verified organization sign-in. */
#modal:has(.sso-factor){width:min(600px,calc(100vw - 24px));min-height:0;height:fit-content;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);margin:auto;padding:0;box-sizing:border-box;border-radius:24px;}
#modal .sso-factor{padding:32px;display:grid;gap:16px;animation:sso-factor-enter .18s ease-out;}
#modal .sso-factor>header{display:flex;justify-content:space-between;align-items:center;gap:24px;}
#modal .sso-factor h2,#modal .sso-factor p{margin:0;}
#modal .sso-factor>header button,#modal .sso-factor-languages button{min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;padding:10px;}
#modal .sso-factor-emblem{width:52px;height:52px;display:grid;place-items:center;border-radius:16px;background:var(--green-soft,#e4efe8);color:var(--green,#27634b);}
#modal .sso-factor-emblem svg{width:28px;height:28px;}
#modal .sso-factor-languages{display:flex;gap:10px;}
#modal .sso-factor-languages [aria-pressed=true]{outline:2px solid var(--green,#27634b);outline-offset:2px;}
#modal .sso-factor form{display:grid;gap:16px;padding-top:8px;}
#modal .sso-factor form input{font-size:20px;letter-spacing:.12em;min-height:52px;box-sizing:border-box;width:100%;}
#modal .sso-factor form label{font-weight:600;margin:0;}
#modal .sso-factor [data-status]:empty,#modal .sso-factor .error:empty{display:none;}
#modal .sso-factor form>button{min-height:48px;}
@keyframes sso-factor-enter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:480px){#modal .sso-factor{padding:24px;gap:16px;}#modal .sso-factor h2{font-size:24px;}#modal .sso-factor form input{font-size:18px;}}
@media(prefers-reduced-motion:reduce){#modal .sso-factor{animation:none;}}

#modal .sso-factor .pf-icon{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none;}
#modal .sso-factor .login-factor-help{justify-self:start;border:0;background:transparent;box-shadow:none;padding-inline:0;text-align:start;}

#modal:has(.sso-admin){width:min(1000px,68vw);padding:0;min-height:0;max-height:60dvh;overflow:hidden;}
#modal .sso-admin{display:grid;grid-template-rows:auto minmax(0,1fr) auto;max-height:60dvh;}
#modal .sso-admin>header{display:grid;grid-template-columns:1fr auto;gap:16px;padding:24px 32px;border-bottom:1px solid var(--border);}
#modal .sso-admin-title{display:flex;align-items:center;gap:12px;min-width:0;}
#modal .sso-admin h2{margin:0;font-size:24px;line-height:1.3;}
#modal .sso-admin h3{margin:0;font-size:18px;line-height:1.45;}
#modal .sso-admin p{margin:0;}
#modal .sso-admin .pf-icon{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none;}
#modal .sso-admin button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;}
#modal .sso-admin [data-sso-close]{width:44px;padding:10px;align-self:start;}
#modal .sso-admin-languages{display:flex;gap:10px;grid-column:1/-1;}
#modal .sso-admin-languages button{padding:8px 10px;}
#modal .sso-admin-languages [aria-pressed=true]{outline:2px solid var(--green);outline-offset:2px;}
#modal .sso-admin-body{overflow:auto;overscroll-behavior:contain;padding:24px 32px;display:grid;gap:24px;align-content:start;min-height:0;}
#modal .sso-admin-shortcuts{display:flex;gap:12px;flex-wrap:wrap;}
#modal .sso-admin-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;}
#modal .sso-admin-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:24px;padding:20px;border:1px solid var(--border);border-radius:18px;}
#modal .sso-admin-card>div:first-child{display:grid;gap:12px;min-width:0;}
#modal .sso-admin-card-actions{display:flex;gap:12px;align-items:center;justify-content:flex-end;flex-wrap:wrap;}
#modal .sso-admin-state{display:inline-flex;align-items:center;gap:8px;font-size:14px;}
#modal .sso-admin-state[data-state=active]{color:#244f43;font-weight:600;}
#modal .sso-admin-meta{color:#52675f;font-size:14px;overflow-wrap:anywhere;}
#modal .sso-admin-account-list{display:grid;gap:16px;}
#modal .sso-admin form{display:grid;gap:20px;}
#modal .sso-admin label{display:grid;gap:10px;font-weight:600;}
#modal .sso-admin input,#modal .sso-admin select,#modal .sso-admin textarea{width:100%;font-size:16px;font-weight:400;}
#modal .sso-admin textarea{min-height:108px;resize:vertical;}
#modal .sso-admin>footer{display:flex;gap:12px;align-items:center;justify-content:flex-end;flex-wrap:wrap;padding:20px 32px;border-top:1px solid var(--border);background:#f9faf6;}
#modal .sso-admin-note{padding:16px 20px;border:1px solid var(--border);border-radius:14px;background:#eef4ef;overflow-wrap:anywhere;}
#modal .sso-admin-note>.pf-icon{vertical-align:middle;margin-right:8px;}
#modal .sso-admin-summary{display:grid;gap:20px;}
#modal .sso-admin dl{margin:0;display:grid;gap:16px;grid-template-columns:repeat(2,minmax(0,1fr));}
#modal .sso-admin dl>div{display:grid;gap:8px;min-width:0;}
#modal .sso-admin dt{color:#52675f;font-size:14px;}
#modal .sso-admin dd{margin:0;overflow-wrap:anywhere;}
#modal .sso-admin dl.sso-admin-endpoints{grid-template-columns:1fr;}
#modal .sso-admin-effects{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;}
#modal .sso-admin-effects>div{display:grid;gap:8px;padding:16px;border:1px solid var(--border);border-radius:14px;}
#modal .sso-admin-effects strong{font-size:24px;}
#modal .sso-admin-effects span{font-size:14px;}
#modal .sso-admin .sso-admin-link{justify-self:start;text-align:start;border:0;box-shadow:none;background:transparent;padding-inline:0;text-decoration:underline;}
#modal .sso-admin-empty{display:grid;gap:24px;padding:24px 0;}
@media(max-width:900px){#modal:has(.sso-admin){width:calc(100vw - 24px);max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);height:fit-content;margin:auto;border-radius:20px;}#modal .sso-admin{max-height:calc(100dvh - 24px);}#modal .sso-admin>header,#modal .sso-admin>footer,#modal .sso-admin-body{padding:20px 24px;}}
@media(max-width:600px){#modal .sso-admin-card{grid-template-columns:1fr;}#modal .sso-admin-card-actions{justify-content:flex-start;}#modal .sso-admin-effects{grid-template-columns:repeat(2,minmax(0,1fr));}#modal .sso-admin>footer{display:grid;grid-template-columns:1fr 1fr;}#modal .sso-admin>footer button{width:100%;}#modal .sso-admin dl{grid-template-columns:1fr;}}
#modal .sso-admin form,#modal .sso-admin label{display:grid;gap:12px;}
#modal .sso-admin form{gap:20px;}
#modal .sso-admin-review-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:32px;align-items:start;}
#modal .sso-admin-review-grid>div{display:grid;gap:20px;min-width:0;}
#modal .sso-admin-review-grid .sso-admin-effects{grid-template-columns:repeat(2,minmax(0,1fr));}
#modal .sso-admin-meta{font-size:14px;color:#52675f;overflow-wrap:anywhere;}
@media(max-width:760px){#modal .sso-admin-review-grid{grid-template-columns:minmax(0,1fr);gap:28px;}}
#modal .sso-admin-review-grid>div:first-child{gap:12px;}
#modal .sso-admin-review-grid .sso-admin-effects{gap:8px;}
#modal .sso-admin-review-grid .sso-admin-effects>div{grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px;padding:8px;}
#modal .sso-admin-review-grid .sso-admin-effects strong{font-size:20px;line-height:1.2;}
#modal .sso-admin-review-grid .sso-admin-effects span{font-size:14px;line-height:1.4;}
#modal .sso-admin-review-note{margin-right:auto;flex:1;max-width:500px;display:grid;gap:4px;}
#modal .sso-admin-review-note>span{display:flex;align-items:center;gap:8px;font-size:14px;line-height:1.4;}
#modal .sso-admin-review-note small{font-size:14px;line-height:1.4;color:#52675f;}
@media(max-width:600px){#modal .sso-admin-review-note{grid-column:1/-1;}}

.login-card .sso-sign-in-entry{display:grid;gap:16px;margin-top:24px;text-align:center}.sso-sign-in-entry>span{color:#52665d;font-size:14px}.sso-sign-in-entry>button{display:flex;align-items:center;justify-content:center;gap:12px;min-height:48px}.sso-sign-in-entry .pf-icon{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8}
#modal:has(>.sso-sign-in){width:min(920px,68vw);min-height:0}#modal .sso-sign-in{display:grid;gap:20px}#modal .sso-sign-in header{display:flex;align-items:center;gap:16px}#modal .sso-sign-in header h2{margin:0;flex:1}#modal .sso-sign-in header>button{width:44px;height:44px;padding:10px}#modal .sso-sign-in .pf-icon{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}#modal .sso-sign-in-languages{display:flex;gap:12px}#modal .sso-sign-in-languages button{width:48px;height:44px;padding:10px}#modal .sso-sign-in-languages svg{width:28px;height:22px}#modal .sso-sign-in-languages [aria-pressed=true]{outline:2px solid #275548;outline-offset:2px}#modal .sso-sign-in :is(p,form){margin:0}#modal .sso-sign-in :is([role=status],[role=alert]):empty{display:none}#modal .sso-sign-in form{display:grid;gap:16px}#modal .sso-sign-in input{min-height:48px;font-size:16px}#modal .sso-sign-in-hint{font-size:14px;color:#52665d}#modal .sso-sign-in-providers{display:grid;gap:16px}#modal .sso-sign-in-providers button{display:flex;align-items:center;gap:16px;min-height:64px;padding:16px 20px;text-align:start}#modal .sso-sign-in-providers span{flex:1}
@media(max-width:760px){#modal:has(>.sso-sign-in){width:calc(100vw - 24px);max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:24px}#modal .sso-sign-in header{gap:12px}#modal .sso-sign-in header h2{font-size:22px;line-height:1.4}}
#modal .sso-admin-company-code{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:16px;margin:0 0 24px}#modal .sso-admin-company-code input{font-size:16px;min-height:48px}#modal .sso-admin-company-code button{display:flex;align-items:center;gap:10px;min-height:48px}#modal .sso-admin-company-code p{grid-column:1/-1;margin:0;font-size:14px}#modal .sso-admin-company-code p:empty{display:none}@media(max-width:520px){#modal .sso-admin-company-code{grid-template-columns:1fr}#modal .sso-admin-company-code button{justify-self:start}}
#modal .sso-sign-in-providers span{min-width:0;overflow-wrap:anywhere}#modal .sso-sign-in header>button{flex:0 0 44px}
#modal .sso-sign-in header{position:sticky;top:0;z-index:1;background:#f9faf6}@media(max-width:760px){#modal:has(>.sso-sign-in){height:fit-content;margin:auto;border-radius:20px;inset:0}}

/* Native account consent: clear identity, one decision, one close control. */
#modal:has(.native-consent){width:min(600px,calc(100vw - 24px));min-height:0;height:fit-content;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);margin:auto;padding:0;box-sizing:border-box;border-radius:24px;}
#modal .native-consent{display:grid;gap:24px;padding:32px;animation:sso-factor-enter .18s ease-out;font-size:16px;line-height:1.5;}
#modal .native-consent>header{display:flex;justify-content:space-between;align-items:center;gap:24px;}
#modal .native-consent h2{font-size:28px;line-height:1.2;margin:0;letter-spacing:-.025em;}
#modal .native-consent p{margin:0;}
#modal .native-consent-heading{display:grid;gap:12px;}
#modal .native-consent-heading p{color:var(--muted,#52665d);}
#modal .native-consent-emblem{width:56px;height:56px;display:grid;place-items:center;border-radius:18px;background:var(--green-soft,#e4efe8);color:var(--green,#27634b);}
#modal .native-consent .pf-icon{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none;}
#modal .native-consent>header button,#modal .native-consent-languages button{min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;padding:10px;}
#modal .native-consent-languages{display:flex;gap:12px;}
#modal .native-consent-languages [aria-pressed=true]{outline:2px solid var(--green,#27634b);outline-offset:2px;}
#modal .native-consent dl{margin:0;padding:24px;display:grid;gap:24px;background:var(--green-soft,#e4efe8);border:1px solid var(--line,#cbd9cf);border-radius:18px;}
#modal .native-consent dl>div{display:grid;grid-template-columns:24px minmax(0,1fr);column-gap:16px;row-gap:4px;}
#modal .native-consent dl .pf-icon{grid-row:1 / 3;color:var(--green,#27634b);margin-top:2px;}
#modal .native-consent dt{font-size:14px;color:var(--muted,#52665d);}
#modal .native-consent dd{margin:0;font-size:18px;font-weight:600;overflow-wrap:anywhere;}
#modal .native-consent-actions{display:grid;gap:12px;}
#modal .native-consent-actions button{min-height:48px;font-size:16px;white-space:normal;}
#modal .native-consent [hidden],#modal .native-consent [data-status]:empty,#modal .native-consent [role=alert]:empty{display:none;}
@media(max-width:480px){#modal .native-consent{padding:24px;gap:20px;}#modal .native-consent h2{font-size:24px;}#modal .native-consent dl{padding:20px;gap:20px;}#modal .native-consent dd{font-size:16px;}}
@media(prefers-reduced-motion:reduce){#modal .native-consent{animation:none;}}

#modal:has(.sso-enrollment){width:min(720px,calc(100vw - 24px));overflow:auto;}
#modal .sso-enrollment{gap:20px;}
#modal .sso-enrollment h3{margin:0;font-size:19px;line-height:1.4;}
#modal .sso-enrollment-steps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;font-size:13px;color:var(--muted,#56685e);}
#modal .sso-enrollment-steps li{display:grid;gap:8px;align-content:start;}
#modal .sso-enrollment-steps li>span{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:var(--green-soft,#e4efe8);font-weight:700;}
#modal .sso-enrollment-steps [aria-current]{color:var(--green,#27634b);font-weight:700;}
#modal .sso-enrollment-setup{display:grid;grid-template-columns:240px minmax(0,1fr);gap:24px;align-items:center;}
#modal .sso-enrollment-qr{background:white;border-radius:18px;overflow:hidden;width:240px;height:240px;}
#modal .sso-enrollment-qr img{display:block;width:240px;height:240px;}
#modal .sso-enrollment-guide{display:grid;gap:16px;min-width:0;}
#modal .sso-enrollment-guide button,#modal .sso-enrollment>[data-enroll-ack]{min-height:48px;display:flex;align-items:center;justify-content:center;gap:10px;}
#modal #sso-enrollment-key code{display:block;overflow-wrap:anywhere;user-select:all;margin-top:8px;font-size:15px;}
#modal .sso-enrollment-warning,#modal .sso-enrollment-expiry{display:flex;gap:10px;align-items:flex-start;font-size:14px;line-height:1.5;}
#modal .sso-enrollment-expiry{flex-wrap:wrap;color:var(--muted,#56685e);}
#modal .sso-enrollment-codes{margin:0;padding:16px;list-style:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;background:var(--green-soft,#e4efe8);border-radius:16px;}
#modal .sso-enrollment-codes code{font-size:13px;overflow-wrap:anywhere;user-select:all;font-variant-numeric:tabular-nums;}
#modal .sso-enrollment-saved{display:flex;gap:12px;align-items:flex-start;line-height:1.5;}
#modal .sso-enrollment-saved input{width:22px;height:22px;min-width:22px;margin:1px 0 0;}
#modal .sso-enrollment form>.primary{display:flex;gap:10px;justify-content:center;align-items:center;}
@media(max-width:600px){#modal .sso-enrollment-setup{grid-template-columns:minmax(0,1fr);gap:20px;}#modal .sso-enrollment-qr{justify-self:center;}#modal .sso-enrollment-codes{grid-template-columns:minmax(0,1fr);}#modal .sso-enrollment-steps{font-size:12px;gap:10px;}}
#modal .sso-enrollment>header{position:sticky;top:0;z-index:2;background:var(--surface,#f8faf6);padding-block:4px;}
#modal .sso-enrollment form>.primary,#modal .sso-enrollment>[data-enroll-ack]{position:sticky;bottom:0;z-index:1;box-shadow:0 -8px 16px var(--surface,#f8faf6);}
@media(max-width:600px){#modal .sso-enrollment-qr,#modal .sso-enrollment-qr img{width:192px;height:192px;}#modal .sso-enrollment>header{top:-12px;}}
