@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(vendor/raleway/raleway-0.ttf) format('truetype');
}
@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(vendor/raleway/raleway-1.ttf) format('truetype');
}
@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(vendor/raleway/raleway-2.ttf) format('truetype');
}
@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(vendor/raleway/raleway-3.ttf) format('truetype');
}
@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(vendor/raleway/raleway-4.ttf) format('truetype');
}

/* MCP source of truth. Page styles own layout; this file owns shared appearance.
   Settings → Style guide renders these components and reads these tokens. */
/* Balance the navigation's bottom selection border so the settings glyph stays centred. */
.pmcp .primary-nav .nav-settings{width:52px;height:52px;align-self:center;padding:0;border-radius:0;border-top:3px solid transparent}
:root{
    --font-family:'Google Sans Code',ui-monospace,'SFMono-Regular',Consolas,'Liberation Mono',monospace;
    --ink:#181715;--muted:#625d52;--canvas:#f6f2ea;--paper:#fff;
    --border:#d8d0c2;--accent:#174f4f;--accent-hover:#103e3e;--accent-tint:#e9f0ec;
    --green:#236443;--green-tint:#e8f3ec;
    --raised-edge:#548080 #0c3434 #0c3434 #548080;--pressed-edge:#0c3434 #548080 #548080 #0c3434;
    --secondary:#eee7da;--secondary-hover:#e3dacb;--secondary-edge:#fffaf0 #a89e8c #a89e8c #fffaf0;
    --secondary-pressed-edge:#a89e8c #fffaf0 #fffaf0 #a89e8c;
    --danger:#a12727;--danger-hover:#861f1f;--danger-edge:#c85b5b #681616 #681616 #c85b5b;
    --success-bg:#e1f0e6;--success-ink:#235c36;--success-border:#8fb39b;
    --error-bg:#fbe4e9;--error-ink:#922b42;--error-border:#ce8798;
    --holiday-bg:#eadbff;--holiday-ink:#50277a;--holiday-accent:#9d70cc;
    --text-micro:10px;--text-small:11px;--text-control:12px;--text-body:13px;
    --text-subheading:14px;--text-section:16px;--text-detail:18px;--text-page:28px;
    --weight-regular:400;--weight-bold:600;--line-copy:1.6;--line-heading:1.3;
    --space-1:4px;--space-2:8px;--space-3:12px;--space-4:18px;--space-5:24px;
    --field-gap:8px;--form-gap:18px;--heading-copy-gap:12px;--copy-action-gap:18px;
    --table-cell-padding-block:6px;--table-cell-padding:var(--table-cell-padding-block) 16px;--table-action-size:28px;
    --control-height:36px;--control-compact-height:32px;--button-height:40px;
    --control-padding:7px 12px;--arrow-inset:12px;--arrow-space:38px;
    --panel-padding:24px;--dialog-padding:24px;--radius:4px;
    --dialog-radius:12px;--dialog-header-start:#e5f2ee;--dialog-header-end:#eee9f6;--dialog-border:#c5d7cf;
    --dialog-tabs-bg:#edf3ef;--dialog-tab-bg:#dce8e1;
    --crew-day-header-bg:#e2d3bf;--crew-add-bg:#faf7f2;--crew-add-border:#c2ab8d;
    --toggle-blue-bg:#edf3fc;--toggle-blue-border:#a7c1e7;--toggle-blue-ink:#365f99;
    --toggle-teal-bg:#eaf6f3;--toggle-teal-border:#8fc5bc;--toggle-teal-ink:#2f756b;
    --toggle-amber-bg:#fcf4e6;--toggle-amber-border:#e2bb78;--toggle-amber-ink:#895817;
    --body-size:var(--text-body);--input-size:var(--text-control);--input-height:var(--control-height);--section-copy-size:var(--text-body);
}
body.pmcp .field-label-feedback{display:flex;align-items:baseline;gap:var(--space-3);flex-wrap:wrap}
body.pmcp .field-label-action{margin-bottom:var(--field-gap);font-size:var(--text-control)}
body.pmcp .field-label-action>a{font-size:inherit;line-height:inherit;text-decoration:none;border-bottom:0}
/* Date fields retain native typing and validation; the shared calendar starts in January 2027. */
.date-field{display:block;position:relative;min-width:0}
body.pmcp label>.date-field{margin-top:var(--field-gap)}
body.pmcp .van-plan-dates label>.date-field{margin-top:0}
body.pmcp .date-field>input[type=date]{width:100%;margin:0;padding-right:var(--arrow-space);box-sizing:border-box}
.date-field>input::-webkit-calendar-picker-indicator{display:none}
body.pmcp .date-picker-trigger{position:absolute;right:0;top:0;height:100%;width:var(--control-height);display:flex;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--ink);box-shadow:none;border-radius:var(--radius)}
.date-field:has(input:disabled)>.date-picker-trigger,.date-field:has(input[readonly])>.date-picker-trigger{display:none}
body.pmcp .date-picker{position:fixed;inset:auto;margin:0;width:300px;max-height:calc(100vh - 16px);overflow:auto;padding:var(--space-3);border:1px solid var(--dialog-border);border-radius:var(--dialog-radius);background:var(--paper);color:var(--ink);box-shadow:0 8px 24px #18171540}
.date-picker-heading{display:flex;align-items:center;justify-content:space-between;gap:var(--space-2);margin-bottom:var(--space-2)}
.date-picker-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:var(--space-1);text-align:center}
.date-picker-grid>span{font-size:var(--text-small)}
body.pmcp .date-picker-grid>.button{padding:var(--space-1);height:var(--control-compact-height);min-width:0}
body.pmcp .date-picker-grid>.button[data-event-day],body.pmcp .date-picker-grid>.button[data-event-day]:hover{background:color-mix(in srgb,var(--accent) 22%,var(--paper));border-color:color-mix(in srgb,var(--accent) 35%,var(--paper));color:var(--ink)}
body.pmcp .date-picker-grid>.button[aria-current=date],body.pmcp .date-picker-grid>.button[aria-current=date]:hover{background:var(--accent);color:var(--paper)}
.date-picker-actions{display:flex;justify-content:space-between;margin-top:var(--space-2)}
body.pmcp .field-feedback{color:var(--muted);font-size:var(--text-control);font-weight:var(--weight-regular)}
body.pmcp .field-feedback.is-error{color:var(--error-ink)}
body.pmcp input[data-client-number][aria-invalid=true]{border-color:var(--error-border);background:var(--error-bg);color:var(--error-ink)}
@font-face {
  font-family: 'Google Sans Code';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(vendor/google-monospace/2e7a66e51800b1533a8aa530.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Google Sans Code';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(vendor/google-monospace/46cf75fe5548cd3788fa3133.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Google Sans Code';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url(vendor/google-monospace/2e7a66e51800b1533a8aa530.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Google Sans Code';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url(vendor/google-monospace/46cf75fe5548cd3788fa3133.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Google Sans Code';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(vendor/google-monospace/bb4bbd5717a4bc928bd2ca3b.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Google Sans Code';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(vendor/google-monospace/c537020a25b563b9d306da94.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Google Sans Code';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(vendor/google-monospace/bb4bbd5717a4bc928bd2ca3b.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Google Sans Code';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(vendor/google-monospace/c537020a25b563b9d306da94.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Raised section tabs join their shared content surface. */
.tabbed-content{margin-top:var(--space-5)}
.content-tabs{position:relative;z-index:1;display:grid;grid-template-columns:repeat(var(--tab-count,4),minmax(130px,1fr));gap:var(--space-1);overflow-x:auto;margin:0;padding:0;background:transparent}
.content-tabs a{display:flex;align-items:center;justify-content:center;min-height:var(--button-height);padding:var(--space-2) var(--space-4);white-space:nowrap;text-decoration:none;font-size:var(--text-control);background:var(--secondary);border:1px solid var(--border);border-radius:var(--radius) var(--radius) 0 0;color:var(--muted)}
.content-tabs a:hover{background:var(--accent-tint);color:var(--accent)}
.content-tabs a[aria-current]{background:var(--paper);color:var(--accent);border-bottom-color:var(--paper);box-shadow:inset 0 3px 0 var(--accent);font-weight:var(--weight-bold)}
.content-tabs a:focus-visible{outline:2px solid var(--accent);outline-offset:-5px}
body.pmcp .tabbed-content>[data-content-panel]{margin-top:-1px;padding:var(--panel-padding);background:var(--paper);border:1px solid var(--border);border-radius:0 0 var(--radius) var(--radius)}
body.pmcp .tabbed-content>[data-content-panel]>:first-child:not(dialog){margin-top:0}
body.pmcp .tabbed-content>[data-content-panel]>:last-child:not(dialog){margin-bottom:0}
body.pmcp .tabbed-content>[data-content-panel]>.panel{padding:0;border:0;box-shadow:none;background:transparent}
[data-content-panel][hidden]{display:none!important}
.pmcp .button.demo-toggle[aria-pressed=true]{background:var(--green);color:white;border-color:#699d80 #17432d #17432d #699d80}
.pmcp .button.demo-toggle[aria-pressed=true]:hover{background:#17432d}
.style-guide-choice{border:0;padding:0;margin:20px 0 0}
.style-guide-choice legend{margin-bottom:8px;font-weight:700}
.style-guide-choice .crew-type-toggle{display:inline-flex}

/* Primary filter groups: independent single choices with All as the reset. */
.primary-toggle-groups{display:flex;flex-wrap:wrap;gap:var(--space-3);margin-block:var(--space-4)}
.primary-toggle{--toggle-bg:var(--toggle-teal-bg);--toggle-border:var(--toggle-teal-border);--toggle-ink:var(--toggle-teal-ink);flex:1 1 auto;min-width:0;margin:0;padding:var(--space-2) var(--space-3) var(--space-3);border:1px solid var(--toggle-border);border-left:4px solid var(--toggle-ink);border-radius:8px;background:var(--toggle-bg)}
.primary-toggle--blue{--toggle-bg:var(--toggle-blue-bg);--toggle-border:var(--toggle-blue-border);--toggle-ink:var(--toggle-blue-ink)}
.primary-toggle--amber{--toggle-bg:var(--toggle-amber-bg);--toggle-border:var(--toggle-amber-border);--toggle-ink:var(--toggle-amber-ink)}
body.pmcp .primary-toggle legend{padding-inline:var(--space-2);color:var(--toggle-ink);font-weight:var(--weight-regular);letter-spacing:.04em}
.primary-toggle-options{display:flex;flex-wrap:wrap;gap:var(--space-2)}
body.pmcp .primary-toggle-options label{position:relative;display:block;margin:0;cursor:pointer}
.primary-toggle-options input{position:absolute;opacity:0;width:1px;height:1px;min-height:0;margin:0;padding:0;border:0}
.primary-toggle-options span{display:flex;align-items:center;justify-content:center;min-height:var(--control-height);padding:7px 12px;border:1px solid var(--dialog-border);border-radius:6px;background:var(--paper);color:var(--accent);font-size:var(--text-control);font-weight:var(--weight-regular);line-height:1.5}
.primary-toggle-options label:hover span{border-color:var(--accent)}
.primary-toggle-options input:checked+span{background:var(--accent);border-color:var(--accent);color:var(--paper)}
.primary-toggle-options input:focus-visible+span{outline:2px solid var(--toggle-ink);outline-offset:3px}
.primary-toggle-options input:disabled+span{opacity:.5;cursor:not-allowed}

:root{--settings-nav-bg:#f8e5ef;--settings-nav-hover:#f3ccdf;--settings-nav-selected:#efb4d0;--settings-nav-ink:#54263d;--settings-nav-accent:#c33378}
.pmcp .settings-tabs{display:flex;flex-wrap:wrap;gap:0;margin-bottom:var(--space-5);background:var(--settings-nav-bg)}
.pmcp .settings-tabs a{display:inline-flex;align-items:center;justify-content:center;min-height:var(--button-height);padding:var(--space-3) var(--space-4);white-space:nowrap;text-decoration:none;font-family:var(--font-family);font-size:var(--text-control);font-weight:var(--weight-regular);line-height:var(--line-copy);border:0;border-bottom:3px solid transparent;border-radius:0;box-shadow:none;background:transparent;color:var(--settings-nav-ink)}
.pmcp .settings-tabs a:hover{background:var(--settings-nav-hover)}
.pmcp .settings-tabs a[aria-current]{background:var(--settings-nav-selected);color:var(--settings-nav-ink);border-bottom-color:var(--settings-nav-accent);font-weight:var(--weight-bold)}
.pmcp .settings-tabs a:focus-visible{outline:2px solid var(--settings-nav-accent);outline-offset:-4px}
.reset-settings p,#reset-warning p{margin:16px 0;line-height:1.6}

.readiness-types{--job-bg:#e6d8f4;--job-edge:#8b5db3;--job-ink:#4a286b}
.readiness-crew{--job-bg:#f6c9cc;--job-edge:#b53640;--job-ink:#70212a}
.readiness-partial{--job-bg:#fff0bd;--job-edge:#b48a19;--job-ink:#695010}
.readiness-ready{--job-bg:#d9ecdb;--job-edge:#4d895a;--job-ink:#285433}
.readiness-cancelled{--job-bg:#e6e6e6;--job-edge:#aaa;--job-ink:#555}
.pmcp .job-card[class*="readiness-"]{background:var(--job-bg);border-color:var(--job-edge);color:var(--job-ink)}
.pmcp .job-card[class*="readiness-"] .card-crew{color:var(--job-ink)}
.job-legend{display:flex;flex-wrap:wrap;gap:10px 20px;list-style:none;padding:0;margin:0 0 16px;font-size:var(--text-small)}
.job-legend li{display:flex;align-items:center;gap:7px}
.legend-swatch{display:inline-block;width:13px;height:13px;flex-shrink:0;border:1px solid var(--job-edge);background:var(--job-bg);border-radius:2px}

.pmcp .crew-type-field{border:0;padding:0;margin:0;min-width:0}
.pmcp .crew-type-field legend{font-size:var(--text-control);font-weight:700;margin-bottom:8px}
.pmcp .crew-type-toggle{display:inline-flex;border:1px solid var(--accent);border-radius:3px;overflow:hidden;max-width:100%}
.pmcp .crew-type-toggle label{position:relative;cursor:pointer;flex:1;margin:0}
.pmcp .crew-type-toggle input{position:absolute;opacity:0;width:1px;min-height:0;height:1px;padding:0;margin:0;border:0}
.pmcp .crew-type-toggle span{display:block;padding:10px 22px;background:var(--paper);color:var(--accent);text-align:center;white-space:nowrap;font-size:var(--text-control)}
.pmcp .crew-type-toggle input:checked+span{background:var(--accent);color:white;font-weight:700}
.pmcp .crew-type-toggle input:focus-visible+span{outline:3px solid #edaa76;outline-offset:-4px}
.pmcp .crew-type-toggle label:hover span{box-shadow:inset 0 0 0 2px var(--accent)}

.calendar-view-toggle{display:flex;border:1px solid var(--border);border-radius:3px;overflow:hidden}
.calendar-view-toggle a{padding:9px 12px;font-size:var(--text-control);color:var(--ink);text-decoration:none;background:var(--paper)}
.calendar-view-toggle a[aria-current]{background:var(--accent);color:#fff}
.job-tabs{display:flex;align-items:flex-end;gap:6px;margin:0 0 18px;padding-top:12px;border-bottom:1px solid var(--dialog-border);overflow-x:auto}
.job-tabs[hidden],[data-job-panel][hidden]{display:none}
.pmcp .job-tabs :is(button,a){flex-shrink:0;display:block;border:1px solid var(--dialog-border);border-bottom:0;border-radius:6px 6px 0 0;background:var(--dialog-tab-bg);color:var(--accent);padding:9px 18px;font:inherit;font-size:var(--text-control);font-weight:700;line-height:1.5;text-decoration:none;box-shadow:none;cursor:pointer}
.pmcp .job-tabs :is(button,a):hover{background:var(--accent-tint);color:var(--accent)}
.pmcp .job-tabs :is(button,a):is([aria-selected=true],[aria-current],[aria-pressed=true]){background:var(--accent);color:white;border-color:var(--accent)}
.pmcp .job-tabs :is(button,a):focus-visible{outline:2px solid currentColor;outline-offset:-5px}
.pmcp .button.secondary,.pmcp button[data-close-job-create],.pmcp .close-dialog,.pmcp .month-arrow{background:var(--secondary);color:var(--ink);border-color:var(--secondary-edge)}
.pmcp .button.secondary:hover:not(:disabled),.pmcp button[data-close-job-create]:hover,.pmcp .close-dialog:hover,.pmcp .month-arrow:hover{background:var(--secondary-hover);color:var(--ink);border-color:var(--secondary-edge)}
.pmcp .site-notification{position:fixed;inset:auto 0 var(--space-4);margin:0 auto;width:fit-content;max-width:min(var(--max),calc(100% - 64px));box-sizing:border-box;z-index:10000;display:flex;align-items:center;padding:16px 20px;border:1px solid #8fb39b;border-radius:6px;background:#e1f0e6;color:#235c36;box-shadow:0 8px 28px #1817152b,0 2px 6px #18171514;font-size:var(--text-subheading)}
.pmcp .site-notification[hidden]{display:none}
.pmcp .site-notification[data-kind=error]{background:#fbe4e9;color:#922b42;border-color:#ce8798}
.pmcp .site-notification p{flex:1;margin:0;font-size:inherit;line-height:1.5;overflow-wrap:anywhere}
body.pmcp{font-family:var(--font-family);font-size:var(--text-body);font-weight:var(--weight-regular);line-height:var(--line-copy);font-variant-ligatures:none}
body.pmcp h1,body.pmcp .calendar-heading h1{font-size:var(--text-page)}
body.pmcp h2,body.pmcp dialog h2,body.pmcp #job-detail h2,body.pmcp .allocation-picker h2{font-size:var(--text-section)}
body.pmcp h3,body.pmcp .crew-day-heading h3,body.pmcp .job-vans-heading h3{font-size:var(--text-subheading)}
body.pmcp h1,body.pmcp h2,body.pmcp h3{font-weight:var(--weight-bold);line-height:var(--line-heading)}
body.pmcp p,body.pmcp .van-defaults p,body.pmcp .reset-settings p,body.pmcp #reset-warning p{font-size:var(--text-body);line-height:var(--line-copy)}
body.pmcp .panel{padding:var(--panel-padding)}
body.pmcp .client-panel{padding:0}
body.pmcp .panel>h2+p,body.pmcp .panel>h1+p{margin-top:var(--heading-copy-gap);margin-bottom:0}
/* Standalone panels need the same heading and form separation as popups. */
body.pmcp .panel>h1+h2{margin-top:var(--heading-copy-gap)}
body.pmcp .panel>h1+form,body.pmcp .panel>h2+form{margin-top:var(--form-gap)}
body.pmcp .panel>p+form,body.pmcp .panel>p+.button,body.pmcp .panel>p+.dialog-actions{margin-top:var(--copy-action-gap)}
body.pmcp dialog{padding:var(--dialog-padding);border-radius:var(--dialog-radius);border-color:var(--dialog-border)}
body.pmcp .dialog-heading{gap:var(--space-3);margin-bottom:var(--space-4)}
body.pmcp .dialog-header{margin:calc(-1 * var(--dialog-padding)) calc(-1 * var(--dialog-padding)) var(--space-4);padding:var(--dialog-padding);background:linear-gradient(110deg,var(--dialog-header-start),var(--dialog-header-end));border-bottom:1px solid var(--dialog-border)}
body.pmcp .dialog-header .dialog-heading,body.pmcp .dialog-header .day-crew-popup-heading{margin:0}
body.pmcp .dialog-header h2{margin:0;overflow-wrap:anywhere}
body.pmcp .dialog-header p{margin:var(--space-3) 0 0}
body.pmcp .dialog-header .close-dialog{flex-shrink:0}
body.pmcp .job-tabs{background:var(--dialog-tabs-bg)}
body.pmcp dialog .job-tabs{margin-inline:calc(-1 * var(--dialog-padding));padding-inline:var(--dialog-padding)}
body.pmcp .dialog-header:has(+.job-tabs),body.pmcp .dialog-header:has(+[data-content-tabs]){margin-bottom:0}
body.pmcp .day-crew-popup{padding:var(--dialog-padding);border-radius:var(--dialog-radius);border-color:var(--dialog-border)}
body.pmcp dialog .dialog-footer{margin:var(--space-4) calc(-1 * var(--dialog-padding)) calc(-1 * var(--dialog-padding));padding:var(--space-4) var(--dialog-padding);border-top:1px solid var(--dialog-border);background:var(--accent-tint)}
/* A final form must not leave a margin beneath its full-bleed footer. */
body.pmcp dialog>form:last-child:has(>.dialog-footer){margin-block:0}
body.pmcp dialog .dialog-footer>.secondary:last-child,body.pmcp dialog .dialog-footer>[data-close-job-create]:last-child{margin-left:auto}
body.pmcp.pmcp label,body.pmcp.pmcp legend{font-size:var(--text-control)}
body.pmcp input:not([type=hidden]):not([type=checkbox]):not([type=radio]),body.pmcp.pmcp select,body.pmcp.pmcp textarea{
    font-family:var(--font-family);font-size:var(--text-control);font-weight:var(--weight-regular);line-height:1.5;
    min-height:var(--control-height);padding:var(--control-padding);border-radius:var(--radius);
}
body.pmcp input:not([type=hidden]):not([type=checkbox]):not([type=radio]),body.pmcp.pmcp select{height:var(--control-height)}
body.pmcp input::placeholder,body.pmcp.pmcp textarea::placeholder{font-weight:var(--weight-regular)}
body.pmcp label>input:not([type=checkbox]):not([type=radio]):not([type=hidden]),body.pmcp label>select,body.pmcp label>textarea{margin-top:var(--field-gap)}
/* Separate labels in form rows use field spacing, not the full row gap. */
body.pmcp .client-form label+input,body.pmcp .client-form label+select,body.pmcp .person-form>label+input,body.pmcp .person-form>label+select{margin-top:calc(var(--field-gap) - var(--form-gap))}
body.pmcp .client-form:not(.client-search),body.pmcp .person-form,body.pmcp .job-create-form{gap:var(--form-gap)}
body.pmcp.pmcp select:not([multiple]):not([size]),body.pmcp.pmcp select[size="1"]{
    appearance:none;-webkit-appearance:none;padding-right:var(--arrow-space);
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23625d52' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat:no-repeat;background-position:right var(--arrow-inset) center;background-size:16px;
}
body.pmcp .crew-picker-trigger{font-family:var(--font-family);font-size:var(--text-control);font-weight:var(--weight-regular);padding-right:var(--arrow-inset)}
body.pmcp.pmcp .crew-slot-add select,body.pmcp.pmcp .crew-slot-assignment select,body.pmcp.pmcp .van-booking-table select,body.pmcp.pmcp.pmcp .van-booking-table input{height:var(--control-compact-height);min-height:var(--control-compact-height);padding-block:5px}
body.pmcp .button{
    min-height:var(--button-height);padding:8px 14px;font-family:var(--font-family);font-size:var(--text-control);font-weight:var(--weight-bold);
    line-height:1.4;letter-spacing:.04em;border-width:3px;border-radius:2px;
}
body.pmcp .button{border-color:var(--raised-edge);background:var(--accent);color:#fff}
body.pmcp .button:hover:not(:disabled){background:var(--accent-hover);border-color:var(--raised-edge);color:#fff}
body.pmcp .button:active:not(:disabled){border-color:var(--pressed-edge)}
body.pmcp .button.secondary,body.pmcp .close-dialog,body.pmcp .month-arrow{background:var(--secondary);color:var(--ink);border-color:var(--secondary-edge)}
body.pmcp .button.secondary:hover:not(:disabled),body.pmcp .close-dialog:hover,body.pmcp .month-arrow:hover{background:var(--secondary-hover);color:var(--ink);border-color:var(--secondary-edge)}
body.pmcp .button.secondary:active:not(:disabled){border-color:var(--secondary-pressed-edge)}
body.pmcp .button.danger{background:var(--danger);border-color:var(--danger-edge);color:#fff}
body.pmcp .button.danger:hover:not(:disabled){background:var(--danger-hover);border-color:var(--danger-edge)}
body.pmcp .button:disabled{background:#eae5dc;border-color:#faf7f0 #ccc3b4 #ccc3b4 #faf7f0;color:#827b70;cursor:not-allowed}
body.pmcp .button.small,body.pmcp .category-actions .button,body.pmcp .crew-day .button,body.pmcp .job-vans .button,body.pmcp .crew-picker-clear,body.pmcp .work-task .task-status{
    min-height:var(--control-compact-height);height:auto;font-size:var(--text-small);padding:5px 10px;border-width:2px;
}
body.pmcp .button.close-dialog,body.pmcp #job-detail .close-dialog,body.pmcp .allocation-picker .close-dialog{width:28px;height:28px;min-height:28px;padding:0;font-size:var(--text-detail)}
body.pmcp .button.close-dialog{border-color:transparent;background:transparent;color:var(--muted);box-shadow:none;border-radius:var(--radius)}
body.pmcp .button.close-dialog:hover,body.pmcp .button.close-dialog:active{border-color:transparent;background:var(--dialog-tab-bg);color:var(--accent)}
body.pmcp .close-dialog:focus:not(:focus-visible){outline:none}
body.pmcp .close-dialog:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
body.pmcp #job-title:focus{outline:none}
body.pmcp #job-detail .job-pin{width:28px;height:28px;min-height:28px;padding:4px}
body.pmcp .button.icon-action{display:inline-flex;align-items:center;justify-content:center;width:var(--control-compact-height);height:var(--control-compact-height);min-height:var(--control-compact-height);padding:6px;vertical-align:middle}
.icon-action svg{display:block;width:16px;height:16px}
body.pmcp th,body.pmcp td{padding:var(--table-cell-padding);vertical-align:middle}
body.pmcp td .button.icon-action{width:var(--table-action-size);height:var(--table-action-size);min-height:var(--table-action-size);padding:4px;line-height:1}
body.pmcp .table-actions{width:1%;text-align:center;white-space:nowrap}
body.pmcp .table-actions--left{text-align:left}
body.pmcp .table-actions--left .icon-action ~ .icon-action{margin-inline-start:var(--space-1)}
body.pmcp .calendar-title .month-arrow,body.pmcp .month-nav .month-arrow{width:var(--button-height);height:var(--button-height);padding:0;font-size:var(--text-detail)}
body.pmcp .dialog-actions{gap:var(--space-3)}
body.pmcp .people-filters>.button{height:var(--control-height);min-height:var(--control-height)}
body.pmcp .crew-type-toggle span{font-size:var(--text-control);padding:8px 12px;line-height:1.5}
body.pmcp .crew-type-toggle{min-height:var(--control-height)}
body.pmcp .job-tabs button,body.pmcp .content-tabs a,body.pmcp .calendar-view-toggle a{font-size:var(--text-control)}
body.pmcp td,body.pmcp .people-table td,body.pmcp .people-table td a{font-size:var(--text-control)}
body.pmcp th{font-size:var(--text-control);font-weight:var(--weight-bold)}
body.pmcp .site-notification,body.pmcp .site-notification p{font-size:var(--text-body)}
body.pmcp .site-notification{background:var(--success-bg);color:var(--success-ink);border-color:var(--success-border)}
body.pmcp .site-notification[data-kind=error]{background:var(--error-bg);color:var(--error-ink);border-color:var(--error-border)}
body.pmcp .work-task .task-status{background:#fff1c5;color:#634809;border-color:#fff8df #cba854 #cba854 #fff8df}
body.pmcp .work-task.done .task-status{background:var(--green-tint);color:var(--green);border-color:#f5fff8 #82ae90 #82ae90 #f5fff8}
body.pmcp .button.demo-toggle[aria-pressed=true]{background:var(--green);color:white;border-color:#699d80 #17432d #17432d #699d80}
body.pmcp .button.demo-toggle[aria-pressed=true]:hover{background:#17432d}
.style-guide-nav{margin-bottom:var(--space-5)}
.subsection-tabs{display:flex;flex-wrap:wrap;gap:var(--space-2);padding-bottom:var(--space-3);border-bottom:1px solid var(--border)}
body.pmcp .subsection-tabs .button[aria-current]{background:var(--accent);color:var(--paper);border-color:var(--pressed-edge)}
.style-guide .panel{margin-top:0}
.style-guide .type-examples{display:grid;gap:var(--space-3);margin-block:var(--space-4)}
.style-guide .type-examples>*{margin:0}
.style-guide .rule-list{margin:var(--space-3) 0;padding-left:var(--space-4)}
.ux-rules{padding-left:var(--space-5);margin:var(--space-4) 0 0}
.ux-rules li+li{margin-top:var(--space-3)}
.style-guide .spacing-sample{display:flex;align-items:center;gap:var(--space-3);margin-block:var(--space-2)}
.style-guide .spacing-sample>span:first-child{height:12px;width:var(--sample-space);background:var(--accent)}
@media(max-width:700px){:root{--panel-padding:20px;--dialog-padding:20px}}
@media(forced-colors:active){body.pmcp.pmcp select:not([multiple]):not([size]),body.pmcp.pmcp select[size="1"]{appearance:auto;background-image:none}}

.style-guide-colours span[data-style-token]{width:auto;height:auto;border:0;background:none}
.style-guide .guide-small{font-size:var(--text-small)}
.style-guide .guide-checkbox{display:flex;align-items:center;gap:var(--space-2)}
body.pmcp dialog>p+form,body.pmcp dialog>p+.style-guide-fields{margin-top:var(--form-gap)}
.style-guide dialog>.dialog-actions{margin-top:var(--copy-action-gap)}

body.pmcp #job-detail,body.pmcp .allocation-picker{padding:var(--dialog-padding)}

body.pmcp strong,body.pmcp b,body.pmcp label{font-weight:var(--weight-bold)}

.font-switcher{display:grid;gap:var(--space-3);margin-block:var(--space-4);max-width:640px}
.font-switcher .dialog-actions{align-items:center}
body.pmcp .font-switcher [data-font-loading]{font-size:var(--text-small);color:var(--muted);margin:0}


.page-actions{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-3);margin-left:auto}
body.pmcp #van-categories{width:min(800px,calc(100vw - 32px))}

/* Directory filters share the input height and tinted, divided choices. */
body.pmcp .people-crew-filter .crew-type-toggle{height:var(--control-height);min-height:var(--control-height)}
body.pmcp .people-crew-filter .crew-type-toggle label{display:flex}
body.pmcp .people-crew-filter .crew-type-toggle label+label{border-left:1px solid var(--accent)}
body.pmcp .people-crew-filter .crew-type-toggle span{display:flex;align-items:center;justify-content:center;padding:0 12px;font-size:var(--text-control);background:var(--accent-tint);flex:1}
body.pmcp .people-crew-filter .crew-type-toggle input:checked+span{background:var(--accent);color:var(--paper)}
/* Shared filter panel used by Calendar, Crew, Workload and Clients. */
body.pmcp .filter-bar{padding:var(--space-4);background:var(--paper);border:1px solid var(--border);border-radius:var(--radius);margin-bottom:var(--space-5)}
@media(max-width:700px){body.pmcp .filter-bar{padding:14px}}

.user-permissions{min-width:0;margin:0;padding:0;border:0}
.user-permissions[hidden]{display:none}
.user-permissions>legend{margin-bottom:var(--space-2);font-weight:var(--weight-bold)}
.user-permissions p{margin:0 0 var(--space-3)}
form[data-read-only] :is(button,input)[type=submit],form:has([data-readonly-form]) button:not([type]),form:has([data-readonly-form]) button[type=submit]{display:none}

/* Calendar holiday overlay uses shared compact typography. */
.calendar-holidays { padding: var(--space-1, 4px) var(--space-2, 8px); color: var(--ink); font-size: var(--text-small); background: var(--surface-tint, #e5ece9); line-height: 24px; }
.calendar-holidays > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-holidays:not(.calendar-bank-holidays){background:var(--holiday-bg);color:var(--holiday-ink);font-weight:var(--weight-bold);box-shadow:inset var(--space-1) 0 var(--holiday-accent)}

/* Text keeps status meaning available without colour. */
.status-badge{display:inline-block;padding:var(--space-1) var(--space-2);border:1px solid var(--border);border-radius:var(--radius);font-size:var(--text-small);line-height:var(--line-heading);font-weight:var(--weight-bold);white-space:nowrap}
.status-badge--overdue{background:var(--error-bg);color:var(--error-ink);border-color:var(--error-border)}
.client-type--graduation{background:var(--toggle-blue-bg);border-color:var(--toggle-blue-border);color:var(--toggle-blue-ink)}
.client-type--b2b{background:var(--error-bg);border-color:var(--error-border);color:var(--error-ink)}

/* Calendar date badges reserve room for two digits. */
body.pmcp .calendar-date-header time{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:28px;padding:2px 4px;border-radius:var(--radius);font-variant-numeric:tabular-nums;flex-shrink:0}

body.pmcp .crew-type-tag{display:inline-block;padding:3px 8px;border:1px solid var(--border);border-radius:var(--radius);font-size:var(--text-small);font-weight:var(--weight-bold);background:var(--secondary);white-space:nowrap}
body.pmcp .crew-type-tag-staff{background:var(--toggle-blue-bg);border-color:var(--toggle-blue-border);color:var(--toggle-blue-ink)}
body.pmcp .crew-type-tag-freelancer{background:var(--error-bg);border-color:var(--error-border);color:var(--error-ink)}
body.pmcp #crew-categories{width:min(800px,calc(100vw - 32px))}
body.pmcp .address-autocomplete{position:relative}
body.pmcp .address-autocomplete input{width:100%;margin-top:var(--field-gap)}
body.pmcp .address-suggestions{position:absolute;top:100%;left:0;right:0;z-index:20;background:var(--paper);border:1px solid var(--border);border-radius:var(--radius);box-shadow:0 4px 16px #18171525}
body.pmcp .address-suggestions button{display:block;width:100%;padding:var(--space-3);text-align:left;border:0;border-bottom:1px solid var(--border);background:var(--paper);color:var(--ink);font:inherit;cursor:pointer;white-space:normal}
body.pmcp .address-suggestions button:hover,body.pmcp .address-suggestions button[aria-selected=true]{background:var(--accent-tint)}

/* Allocation controls leave room for availability and distance beside the name. */
body.pmcp .crew-day{padding:0;margin-bottom:var(--space-4);border:1px solid var(--crew-add-border);border-radius:var(--dialog-radius);overflow:hidden;background:var(--paper)}
body.pmcp .crew-day:nth-child(even){background:var(--paper)}
body.pmcp .crew-day:last-child{margin-bottom:0}
body.pmcp .crew-day-heading{margin:0;padding:var(--space-3) var(--space-4);border-bottom:1px solid var(--border);background:var(--crew-day-header-bg);min-height:var(--control-compact-height)}
body.pmcp .crew-slot{margin:var(--space-3) var(--space-4)}
body.pmcp .crew-slot-assignment{flex-wrap:wrap;gap:var(--space-3)}
body.pmcp .crew-slot-assignment :is(.crew-picker-trigger,select){flex:0 1 260px;width:260px;max-width:100%}
body.pmcp .crew-slot-add{grid-template-columns:var(--crew-label-width) minmax(0,1fr) var(--crew-action-width);margin:0;padding:var(--space-3) var(--space-4);background:var(--crew-add-bg);border:0;border-top:1px solid var(--crew-add-border);border-radius:0}
body.pmcp .crew-day-heading+.crew-slot-add{border-top:0}
body.pmcp .crew-slot-add>label{margin:0;font-weight:var(--weight-bold)}
body.pmcp .crew-slot-add select{width:260px;max-width:100%;margin:0}
body.pmcp .crew-picker-trigger{display:flex;align-items:center;justify-content:space-between;gap:var(--space-2);width:260px;max-width:100%;min-height:var(--control-compact-height);padding:var(--space-2);border:1px solid var(--border);border-radius:var(--radius);background:var(--paper);color:var(--ink);font:inherit;font-size:var(--text-control);text-align:left;cursor:pointer;box-shadow:none}
body.pmcp .crew-picker-trigger:hover{border-color:var(--accent);background:var(--accent-tint)}
body.pmcp .crew-picker-trigger:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
body.pmcp .crew-slot-assignment select[hidden],body.pmcp .van-booking-table select[hidden]{display:none}
.allocation-status,.crew-distance{display:inline-flex;align-items:center;gap:var(--space-2);font-size:var(--text-small);font-weight:var(--weight-bold);white-space:nowrap;color:var(--muted)}
.allocation-status::before{content:"";width:9px;height:9px;flex-shrink:0;border-radius:50%;background:currentColor}
.crew-distance svg{width:18px;height:18px;flex-shrink:0}
:is(.allocation-status,.crew-distance)[data-state=green]{color:#247047}
:is(.allocation-status,.crew-distance)[data-state=amber]{color:#91600b}
:is(.allocation-status,.crew-distance)[data-state=red]{color:#ad3434}
body.pmcp .crew-person .crew-distance{margin-top:var(--space-2)}
body.pmcp #crew-picker,body.pmcp #style-crew-picker{width:min(820px,calc(100vw - 32px))}
body.pmcp #van-picker,body.pmcp #style-van-picker{width:min(820px,calc(100vw - 32px))}
body.pmcp #van-picker h2:focus{outline:none}
body.pmcp .crew-picker-heading{display:flex;align-items:baseline;flex-wrap:wrap;gap:var(--space-2) var(--space-3)}
body.pmcp .crew-picker-heading .crew-picker-date{margin:0;font-size:var(--text-control);color:var(--muted)}
body.pmcp :is(#crew-picker,#style-crew-picker) .crew-picker-heading{flex-direction:column;align-items:flex-start}
body.pmcp .dialog-header:has(+.crew-picker-navigation){margin-bottom:0}
body.pmcp .crew-picker-navigation{display:flex;align-items:flex-end;flex-wrap:wrap;gap:var(--space-2) var(--space-3);margin:0 calc(-1 * var(--dialog-padding)) var(--space-4);padding:var(--space-3) var(--dialog-padding) 0;background:var(--dialog-tabs-bg);border-bottom:1px solid var(--dialog-border)}
body.pmcp dialog .crew-picker-navigation .job-tabs{margin:0;padding:0;border:0;background:transparent;overflow:visible}
body.pmcp .crew-picker-filter{position:relative;width:200px;max-width:100%;margin:0 0 var(--space-1) auto}
body.pmcp .crew-picker-filter svg{position:absolute;left:var(--space-2);top:50%;transform:translateY(-50%);width:16px;height:16px;color:var(--muted);pointer-events:none}
body.pmcp.pmcp .crew-picker-navigation input.crew-picker-search{width:100%;min-height:var(--control-compact-height);height:var(--control-compact-height);margin:0;padding:var(--space-1) var(--space-2) var(--space-1) var(--control-compact-height);font-size:var(--text-control)}
body.pmcp .crew-choice-table{width:100%;margin:0}
body.pmcp .crew-choice-table :is(th,td){white-space:nowrap;font-size:var(--text-control)}
body.pmcp .crew-choice-table .crew-choice-name{width:100%;font-weight:var(--weight-bold)}
body.pmcp .crew-choice-table .crew-choice-action{text-align:right}
body.pmcp .crew-choice-table tr[data-selected=true]{background:var(--accent-tint)}
body.pmcp .crew-picker-group[data-group=unavailable] tbody{color:var(--muted);background:var(--canvas)}
body.pmcp .crew-choice-table [hidden],body.pmcp .crew-choice-table tr[hidden]{display:none}
body.pmcp .crew-readonly-name{display:flex;align-items:center;gap:var(--space-3);flex-wrap:wrap}
@media(max-width:650px){body.pmcp .crew-slot-assignment :is(.crew-picker-trigger,select){flex-basis:100%;width:100%}body.pmcp .crew-slot-add{grid-template-columns:minmax(0,1fr) var(--crew-action-width)}body.pmcp .crew-slot-add>label{grid-column:1/-1}body.pmcp .crew-slot-add select{width:100%}}

/* One enclosing job card keeps independently dated travel inside its footer. */
.calendar-job-group{display:grid;grid-template-columns:repeat(var(--group-columns),minmax(0,1fr));align-content:start;align-self:start;min-width:0;z-index:1;margin:3px 5px;padding-bottom:var(--space-1);border:1px solid var(--job-edge);border-left-width:3px;border-radius:var(--radius);background:var(--job-bg);background:color-mix(in srgb,var(--job-bg) 45%,var(--paper));color:var(--job-ink);pointer-events:none;overflow:hidden}
.calendar-job-group:not(:has(.calendar-van-bar)){padding-bottom:0}
.calendar-job-group>a{pointer-events:auto}
.calendar-job-group>a:focus-visible{outline:2px solid var(--job-ink);outline-offset:-2px}
body.pmcp .calendar-job-group>.job-card{margin:0;border:0;border-radius:0;padding:var(--space-2);box-shadow:none}
body.pmcp .calendar-van-bar{display:block;min-width:0;margin:0 var(--space-1);padding:var(--space-1);background:transparent;border:0;border-top:1px solid var(--job-edge);border-radius:0;color:var(--job-ink);font-size:var(--text-micro);line-height:var(--line-copy);text-decoration:none;overflow-wrap:anywhere}
body.pmcp .calendar-van-bar:not(.calendar-van-cell):hover{background:var(--job-bg)}
body.pmcp .calendar-van-bar .card-van{margin:0;padding:0;border:0;background:none;color:inherit;font-size:inherit;max-width:none}
body.pmcp .calendar-van-bar>strong{display:block}
body.pmcp .calendar-van-bar.cancelled{color:var(--job-ink)}
body.pmcp .calendar-van-bar.continues-before{border-top-left-radius:0;border-bottom-left-radius:0}
body.pmcp .calendar-van-bar.continues-after{border-top-right-radius:0;border-bottom-right-radius:0}
body.pmcp .crew-record{padding-block:var(--space-4);border-bottom:1px solid var(--border)}
body.pmcp .crew-record>h3+p,body.pmcp .crew-record>p+p{margin-top:var(--field-gap)}
body.pmcp .crew-record-notes{white-space:pre-wrap;overflow-wrap:anywhere}

body.pmcp [data-bright-employee][hidden]{display:none}

/* Compact BrightHR employee linking rows. */
body.pmcp .bright-employee-row{display:grid;grid-template-columns:minmax(160px,1fr) minmax(200px,1.3fr) max-content;align-items:center;gap:var(--space-3);min-width:460px;padding-block:var(--space-2)}
body.pmcp .bright-employee-row>label{margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.pmcp .bright-employee-row>select{margin:0;min-width:0;width:100%}
body.pmcp .bright-employee-row>.button{margin:0;white-space:nowrap}
body.pmcp .bright-employee-row[hidden]{display:none}

.icon-action [data-eye-slash][hidden]{display:none}

body.pmcp .bright-toolbar{justify-content:flex-end}
body.pmcp .bright-heading{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-3);margin-bottom:var(--space-3)}
body.pmcp .bright-heading > p{margin:0}

body.pmcp .button.demo-toggle[aria-pressed=true],body.pmcp .button.demo-toggle[aria-pressed=true] span{color:#fff}
body.pmcp .bright-employee-table td{border-bottom:0;white-space:nowrap}
body.pmcp .bright-employee-table label{margin:0}
body.pmcp .bright-employee-table select{margin:0;min-width:200px;width:100%}

/* Crew picker: identity and crew type share one line, without an avatar. */
body.pmcp .crew-person-heading{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-2)}

.calendar-bank-holidays{background:var(--surface-tint);font-weight:var(--weight-semibold,600)}

/* Sales stage colours also drive calendar job backgrounds. */
:root{--calendar-date-header-bg:#ebe4d7;--sales-penciled-bg:#fff5d6;--sales-penciled-ink:#654c12;--sales-penciled-edge:#d6bb70;--sales-penciled-selected-bg:#f5d875;--sales-penciled-selected-ink:#503b08;--sales-confirmed-bg:#eaf6ec;--sales-confirmed-ink:#285738;--sales-confirmed-edge:#99bea3;--sales-confirmed-selected-bg:#a7d7b5;--sales-confirmed-selected-ink:#20492e;--sales-lost-bg:#fceaea;--sales-lost-ink:#813939;--sales-lost-edge:#d2a0a0;--sales-lost-selected-bg:#efa7a7;--sales-lost-selected-ink:#652929}
.sales-dates-needed{--stage-bg:#191919;--stage-ink:#fff;--stage-edge:#191919;--stage-selected-bg:#000;--stage-selected-ink:#fff}
.pmcp .sales-stage-filters .sales-dates-needed[aria-pressed=true]{box-shadow:inset 0 -3px 0 #fff}
.sales-stage--penciled{--stage-selected-bg:var(--sales-penciled-selected-bg);--stage-selected-ink:var(--sales-penciled-selected-ink);--stage-bg:var(--sales-penciled-bg);--stage-ink:var(--sales-penciled-ink);--stage-edge:var(--sales-penciled-edge)}
.sales-stage--confirmed{--stage-selected-bg:var(--sales-confirmed-selected-bg);--stage-selected-ink:var(--sales-confirmed-selected-ink);--stage-bg:var(--sales-confirmed-bg);--stage-ink:var(--sales-confirmed-ink);--stage-edge:var(--sales-confirmed-edge)}
.sales-stage--lost{--stage-selected-bg:var(--sales-lost-selected-bg);--stage-selected-ink:var(--sales-lost-selected-ink);--stage-bg:var(--sales-lost-bg);--stage-ink:var(--sales-lost-ink);--stage-edge:var(--sales-lost-edge)}
.pmcp .sales-stage-tag{display:inline-flex;align-items:center;gap:var(--space-1);padding:2px var(--space-2);border:1px solid var(--stage-edge,var(--border));border-radius:var(--radius);background:var(--stage-bg,var(--secondary));color:var(--stage-ink,var(--ink));font-size:var(--text-small);font-weight:var(--weight-bold);line-height:var(--line-heading);white-space:nowrap;vertical-align:middle;text-decoration:none}
.sales-stage-tag svg{width:14px;height:14px;flex:none}
.sales-stage-filters{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-2);margin-bottom:var(--space-3)}
.pmcp .sales-stage-filters .sales-stage-tag{min-height:var(--control-compact-height);padding:var(--space-1) var(--space-3);font-size:var(--text-control);cursor:pointer}
.pmcp .sales-stage-filters [aria-pressed=false]{border-style:dashed}
.pmcp .sales-stage-filters [aria-pressed=true]{background:var(--stage-selected-bg,var(--accent));color:var(--stage-selected-ink,var(--paper));border-color:var(--stage-selected-bg,var(--accent))}
.pmcp .sales-stage-filters .sales-stage-all[aria-pressed=true]{background:var(--accent);color:var(--paper);border-color:var(--accent)}
.sales-stage-filters .sales-stage-tag:hover{box-shadow:0 0 0 1px var(--stage-edge,var(--accent))}
.sales-stage-filters .sales-stage-tag:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.calendar-job-title{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-2)}
.pmcp .calendar-job-title>strong{display:inline;min-width:0}
.sales-stage-demo-jobs{display:flex;flex-wrap:wrap;gap:var(--space-3)}
.sales-stage-demo-jobs article{padding:var(--space-3);border:1px solid var(--border);border-radius:var(--radius)}

/* Search and Sales stages share one bar, wrapping only on smaller screens. */
body.pmcp .calendar-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-4)}
body.pmcp .calendar-toolbar .sales-stage-filters{margin:0;flex:none}
body.pmcp .calendar-toolbar .calendar-filters{flex:1 1 320px;min-width:0;margin:0;padding:0;border:0;background:transparent}
body.pmcp .calendar-toolbar .calendar-filters input[type=search]{width:auto;flex:1;min-width:160px}
body.pmcp .calendar-date-header,body.pmcp .calendar-date-header.crew-booked,body.pmcp .calendar-date-header.crew-tentative,body.pmcp .calendar-date-header.crew-unknown{background:var(--calendar-date-header-bg);border-color:var(--border)}
@media(max-width:700px){body.pmcp .calendar-toolbar .sales-stage-filters{flex:1 1 100%}body.pmcp .calendar-toolbar .calendar-filters input[type=search]{min-width:0;flex-basis:120px}}

.sales-stage-cycle{margin:0}
.pmcp .sales-stage-cycle button{min-height:var(--control-compact-height);cursor:pointer}
.sales-stage-cycle button:hover{box-shadow:0 0 0 1px var(--stage-edge,var(--accent))}
.sales-stage-cycle button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

.sales-notes-log{margin-top:var(--space-4);padding-top:var(--space-4);border-top:1px solid var(--border)}
.record-log{list-style:none;margin:var(--space-4) 0 0;padding:0}
.record-log>li{padding:var(--space-3) 0;border-top:1px solid var(--border)}
.record-log>li p{margin:0;white-space:normal;overflow-wrap:anywhere}
.record-log>li p+p{margin-top:var(--space-2)}

/* Calendar colour follows Sales; each allocation control reports its own progress. */
.calendar-job-group[data-sales-stage]{--job-bg:var(--secondary);--job-edge:var(--border);--job-ink:var(--ink);background:var(--job-bg)}
.calendar-job-group[data-sales-stage=""].cancelled{--job-bg:#e6e6e6;--job-edge:#aaa;--job-ink:#555}
.calendar-job-group[data-sales-stage=penciled]{--job-bg:var(--sales-penciled-bg);--job-edge:var(--sales-penciled-edge);--job-ink:var(--sales-penciled-ink)}
.calendar-job-group[data-sales-stage=confirmed]{--job-bg:var(--sales-confirmed-bg);--job-edge:var(--sales-confirmed-edge);--job-ink:var(--sales-confirmed-ink)}
.calendar-job-group[data-sales-stage=lost]{--job-bg:var(--sales-lost-bg);--job-edge:var(--sales-lost-edge);--job-ink:var(--sales-lost-ink)}
.calendar-job-block{min-width:0;pointer-events:auto}
body.pmcp .calendar-job-block>.job-card{--job-bg:inherit;--job-edge:inherit;--job-ink:inherit;display:block;min-width:0;margin:0;padding:var(--space-2);border:0;border-radius:0;background:var(--job-bg);color:var(--job-ink);box-shadow:none}
body.pmcp .calendar-job-block>.job-card .card-crew{color:inherit}
body.pmcp .calendar-job-block>.job-card:hover{background:color-mix(in srgb,var(--job-bg) 85%,var(--paper))}
.allocation-red{--allocation-bg:#fce2e2;--allocation-edge:#c26b6b;--allocation-ink:#822e2e}
.allocation-amber{--allocation-bg:#fff0c2;--allocation-edge:#bd9335;--allocation-ink:#6d500e}
.allocation-green{--allocation-bg:#def0df;--allocation-edge:#75a982;--allocation-ink:#285a36}
.job-allocation-controls{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-1);padding:0 var(--space-2) var(--space-2);margin:0}
.pmcp .job-allocation-button{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-1);min-height:var(--control-compact-height);max-width:100%;padding:var(--space-1) var(--space-2);border:1px solid var(--allocation-edge);border-radius:var(--radius);background:var(--allocation-bg);color:var(--allocation-ink);font:inherit;font-size:var(--text-small);font-weight:var(--weight-bold);line-height:var(--line-heading);text-decoration:none;white-space:nowrap;cursor:pointer}
.job-allocation-button svg{width:16px;height:16px;flex:none}
.pmcp .job-allocation-button:hover{box-shadow:inset 0 0 0 1px var(--allocation-edge)}
.pmcp .job-allocation-button:focus-visible,.calendar-job-block>.job-card:focus-visible{outline:2px solid var(--ink);outline-offset:-2px}
.legend-swatch[class*=allocation-]{background:var(--allocation-bg);border-color:var(--allocation-edge)}
.sales-stage-demo-jobs article{background:var(--stage-bg);color:var(--stage-ink);border-color:var(--stage-edge)}

.section-actions{display:flex;align-items:center;justify-content:flex-end;gap:var(--space-2);margin-bottom:var(--space-3)}
body.pmcp .section-actions .button{display:inline-flex;align-items:center;gap:var(--space-2);height:var(--control-compact-height);min-height:var(--control-compact-height);padding:var(--space-1) var(--space-3)}
.calendar-heading>.section-actions{margin-left:auto;margin-bottom:0}
.section-actions svg{width:var(--text-section);height:var(--text-section)}
body.pmcp .job-intake-section{margin:var(--space-3) 0 0;padding:var(--panel-padding);border:1px solid var(--border);border-radius:var(--radius)}
body.pmcp .job-intake-section legend{padding:0 var(--space-2);font-size:var(--text-section);font-weight:var(--weight-bold)}
body.pmcp .job-intake-section label{margin:0}

/* Keep section navigation accessible when account utilities fill a narrow header. */
@media(max-width:700px){
    body.pmcp .primary-nav{flex-wrap:wrap}
    body.pmcp:not(.workflow) .primary-nav-links{flex:1 0 100%}
    body.pmcp .primary-nav-links+.nav-action{margin-left:auto}
    body.pmcp .primary-nav>.nav-action,body.pmcp .nav-signout .nav-action{padding-inline:var(--space-2);font-size:var(--text-control)}
}

/* Approved Workflow appearance, 12 October 2026. */
html[data-workflow-brand="on"] body.pmcp {
  --font-family: 'Raleway', Arial, sans-serif;
  --ink: #252a40;
  --muted: #60677a;
  --canvas: #f5f7fb;
  --border: #cbd7eb;
  --accent: #33397e;
  --accent-hover: #282d66;
  --accent-tint: #e8eef8;
  --secondary: #e8eef8;
  --secondary-hover: #dbe6f5;
  --dialog-header-start: #e8eef8;
  --dialog-header-end: #f8e8f1;
  --dialog-border: #cbd7eb;
  --dialog-tabs-bg: #e8eef8;
  --dialog-tab-bg: #dbe6f5;
  --surface-tint: #e8eef8;
  background: var(--canvas);
}

html[data-workflow-brand="off"] body.pmcp{--ink:#25282d;--muted:#626770;--canvas:#f4f5f6;--border:#cdd1d6;--accent:#39434f;--accent-hover:#242d37;--accent-tint:#edf0f3;--secondary:#e8ebef;--secondary-hover:#dce1e7;--dialog-header-start:#e6e9ee;--dialog-header-end:#f1f2f5;--dialog-border:#cdd1d6;--dialog-tabs-bg:#e9ecf1;--dialog-tab-bg:#dce2ea}
body.pmcp{--sales-penciled-bg:#c5cbd2;--sales-penciled-ink:#29323c;--sales-penciled-edge:#7c8796;--sales-penciled-selected-bg:#657181;--sales-penciled-selected-ink:#fff;--sales-po-ready-bg:#f6d35c;--sales-po-ready-ink:#513d09;--sales-po-ready-edge:#ba8a17;--sales-po-ready-selected-bg:#e7b62b;--sales-po-ready-selected-ink:#382a06;--sales-confirmed-bg:#8ed59f;--sales-confirmed-ink:#184728;--sales-confirmed-edge:#398653;--sales-confirmed-selected-bg:#268447;--sales-confirmed-selected-ink:#fff;--sales-lost-bg:#f39a9a;--sales-lost-ink:#702020;--sales-lost-edge:#ba4545;--sales-lost-selected-bg:#b83333;--sales-lost-selected-ink:#fff}
.sales-stage--po_ready{--stage-bg:var(--sales-po-ready-bg);--stage-ink:var(--sales-po-ready-ink);--stage-edge:var(--sales-po-ready-edge);--stage-selected-bg:var(--sales-po-ready-selected-bg);--stage-selected-ink:var(--sales-po-ready-selected-ink)}
.pmcp .calendar-job-group[data-sales-stage=po_ready]{--job-bg:var(--sales-po-ready-bg);--job-ink:var(--sales-po-ready-ink);--job-edge:var(--sales-po-ready-edge)}
body.pmcp table thead th,body.pmcp .calendar-date-header{background:#e5e7eb;color:var(--ink);border-color:#cdd1d6}
body.pmcp table tbody tr:nth-child(even){background:#f1f2f4}
body.pmcp table tbody tr:nth-child(odd){background:var(--paper)}
html[data-workflow-brand="on"] body.pmcp .primary-nav{background:#33397e;border-color:#e15099}
html[data-workflow-brand="on"] body.pmcp .primary-nav a,html[data-workflow-brand="on"] body.pmcp .primary-nav button{color:white}
html[data-workflow-brand="on"] body.pmcp .primary-nav a[aria-current]{background:white;color:#252a40}
body.pmcp .button{border-width:1px;border-color:var(--accent);border-radius:var(--radius);box-shadow:none;text-transform:none;letter-spacing:normal}
body.pmcp .button.secondary{border-color:var(--border)}
body.pmcp #job-detail{padding:0;overflow:hidden;width:min(1040px,calc(100vw - 32px));max-width:none}
.job-scroll{box-sizing:border-box;max-height:calc(90vh - 2px);overflow:auto;scrollbar-gutter:auto;padding:var(--dialog-padding)}
body.pmcp #job-detail .job-tabs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin}
body.pmcp #job-detail .job-tabs>[role=tab]{flex:none;white-space:nowrap}
.planning-intro{margin:var(--space-4) 0}
.planning-intro h3{margin:0}
.planning-intro p{margin:var(--space-2) 0 0}
.planning-stream-card{border:1px solid var(--border);border-radius:var(--dialog-radius);padding:var(--space-4);margin:var(--space-4) 0;background:var(--paper)}
.planning-stream-heading{display:flex;align-items:center;gap:var(--space-3);margin-bottom:var(--space-3)}
.planning-stream-heading h4{margin:0}
.planning-stream-table th{width:1%;white-space:nowrap;text-align:left}
.planning-stream-table td{white-space:normal;overflow-wrap:anywhere}
.planning-stream-table .planning-stream-notes{white-space:pre-wrap}
.planning-stream-copy{display:flex;align-items:center;gap:var(--space-2);width:100%;padding:var(--space-1) var(--space-2);border:1px solid transparent;border-radius:var(--radius);background:transparent;color:inherit;font:inherit;text-align:left;white-space:normal;overflow-wrap:anywhere;cursor:pointer;user-select:text}
.planning-stream-copy svg{width:var(--text-section);height:var(--text-section);flex:none}
.planning-stream-copy [data-stream-value]{min-width:0}
.planning-stream-copy:hover{background:var(--accent-tint);border-color:var(--border)}
.planning-stream-copy:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.planning-form{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--space-3);margin-top:var(--space-4);padding:var(--space-4);border:1px solid var(--border);border-radius:var(--dialog-radius);background:var(--paper)}
.planning-form[hidden]{display:none}
.planning-form h4{margin:0}
/* Labels use the shared child-control margin; adding grid gap here doubles field spacing. */
.planning-form label{display:block;font-weight:var(--weight-bold)}
.planning-form input,.planning-form select,.planning-form textarea{width:100%;min-width:0;box-sizing:border-box;margin:0;font-weight:var(--weight-regular)}
.planning-table{width:100%;margin:0}
.planning-table th,.planning-table td{white-space:nowrap}
.inline-form{display:inline-flex;gap:var(--space-2);margin:0}
.planning-stay-status{display:inline-block;padding:var(--space-1) var(--space-2);border-radius:var(--radius);background:var(--secondary)}
.planning-stay-status[data-status="Booked"]{background:var(--success-bg);color:var(--success-ink)}
.planning-stay-status[data-status="Needs booking"]{background:var(--toggle-amber-bg);color:var(--toggle-amber-ink)}
.planning-stay-fields{display:grid;gap:var(--space-3);min-width:0;margin:var(--space-3) 0;padding:var(--space-4);border:1px solid var(--border);border-radius:var(--radius)}
.planning-export-option{display:flex;align-items:center;gap:var(--space-2);margin:var(--space-4) 0}
.planning-email-preview{padding:var(--space-4);border:1px solid var(--border);border-radius:var(--radius);margin:var(--space-4) 0;overflow-wrap:anywhere}
.planning-email-preview p{margin:0 0 var(--space-2)}
.scout-response-page{max-width:720px;margin:auto}
.calendar-holiday-clash{display:flex;gap:var(--space-1);align-items:center;color:var(--danger);text-decoration:none}
.calendar-holiday-clash svg{width:var(--text-body);height:var(--text-body);flex:none}
.calendar-van-bar .card-van{display:flex;gap:var(--space-2);align-items:center;flex-wrap:wrap}
.calendar-van-bar svg{width:var(--text-section);height:var(--text-section);flex:none}
.crew-row-actions{display:flex;gap:var(--space-1);justify-content:end}
body.pmcp .crew-light-button{font:inherit;font-size:var(--text-small);font-weight:var(--weight-bold);cursor:pointer;text-decoration:underline;text-underline-offset:2px}
.crew-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--space-2);margin:var(--space-3) 0}
.crew-metrics div{padding:var(--space-3);border:1px solid var(--border);border-radius:var(--radius)}
.crew-metrics dt{color:var(--muted)}
.crew-metrics dd{margin:var(--space-1) 0 0;font-weight:var(--weight-bold)}
@media(max-width:600px){.planning-stream-card,.planning-form{padding:var(--space-3)}.crew-metrics{grid-template-columns:1fr}}

body.pmcp #crew-detail{width:min(820px,calc(100vw - 32px));max-width:none;max-height:90vh;overflow:auto}
[data-crew-profile-panel="contact"] .person-categories{display:none}
[data-crew-profile-panel="categories"] .person-form>:not(.person-categories):not(.dialog-actions):not([type=hidden]){display:none}
body.pmcp .crew-row-actions svg{width:var(--text-section);height:var(--text-section)}
body.pmcp .calendar-resources{display:block;min-width:max-content}
.resource-timeline{min-width:calc(200px + var(--resource-days) * 48px)}
.resource-row{display:grid;grid-template-columns:200px minmax(0,1fr);border-bottom:1px solid var(--border);min-height:52px}
.resource-name{position:sticky;left:0;z-index:2;background:var(--paper);padding:var(--space-2);border-right:1px solid var(--border)}
.resource-name small{display:block;color:var(--muted);font-size:var(--text-small)}
.resource-days{display:grid;grid-template-columns:repeat(var(--resource-days),minmax(48px,1fr));min-width:0}
.resource-head{background:#e5e7eb}
.resource-head .resource-name{background:#e5e7eb}
.resource-head .resource-days>span{text-align:center;border-right:1px solid var(--border);font-size:var(--text-small)}
.resource-grid-cell{border-right:1px solid var(--border);background:var(--paper);min-height:48px}
.resource-row:nth-child(even) .resource-grid-cell{background:#f1f2f4}
.resource-booking{display:flex;align-items:center;gap:var(--space-1);min-width:0;overflow:hidden;margin:var(--space-1);padding:var(--space-1);border:1px solid var(--stage-edge);border-radius:var(--radius);background:var(--stage-bg);color:var(--stage-ink);z-index:1;font-size:var(--text-small);font-weight:var(--weight-bold);text-decoration:none;white-space:nowrap}
.resource-booking svg{width:var(--text-section);height:var(--text-section);color:var(--danger);flex:none}
.resource-today{box-shadow:inset 0 -3px var(--accent)}

#van-map{height:560px;min-height:360px;margin:var(--space-4) 0;border:1px solid var(--border);border-radius:var(--radius);z-index:0}
.van-map-controls,.van-map-controls form{display:flex;gap:var(--space-2);align-items:end;flex-wrap:wrap}
body.pmcp .van-map-controls label{display:grid;gap:var(--space-1)}
@media(max-width:600px){#van-map{height:420px}}

.planning-po-status{border:0;padding:0;margin:var(--space-3) 0}
.planning-po-status legend{font-weight:var(--weight-bold);padding:0;margin-bottom:var(--field-gap)}
.planning-po-options{display:flex;gap:var(--space-2);flex-wrap:wrap}
.planning-po-options label{position:relative;cursor:pointer}
body.pmcp .planning-po-options input{position:absolute;opacity:0;width:1px;height:1px;min-height:0;margin:0;padding:0}
.planning-po-options span{display:flex;align-items:center;justify-content:center;box-sizing:border-box;height:var(--control-height);padding:0 var(--space-3);background:var(--dialog-tab-bg);color:var(--accent);border:1px solid var(--dialog-border);border-radius:var(--radius)}
.planning-po-options input:checked+span{background:var(--accent);border-color:var(--accent);color:white}
.planning-po-options input:focus-visible+span{outline:2px solid var(--ink);outline-offset:2px}

.pmcp .app-wordmark{display:flex;align-items:center;align-self:center;line-height:1;padding-block:var(--space-4);padding-inline:var(--space-4);font-size:var(--text-section);font-weight:800;letter-spacing:.08em;white-space:nowrap;color:white}
html[data-workflow-brand="on"] .app-wordmark span{color:#e15099}
@media(max-width:1100px){.pmcp .app-wordmark{font-size:var(--text-control)}}

.van-map-marker{background:none;border:0}
.van-marker-body{display:flex;align-items:center;justify-content:center;position:relative;width:48px;height:42px;border:2px solid var(--paper);border-radius:var(--radius);background:var(--accent);color:var(--paper);box-shadow:0 3px 12px #172e2e55}
.van-marker-body::after{content:'';position:absolute;top:100%;left:18px;border:6px solid transparent;border-top-color:var(--accent)}
.van-marker-body svg{width:27px;height:27px}
.van-marker-body b{position:absolute;right:-8px;top:-9px;display:grid;place-items:center;min-width:22px;height:22px;background:var(--paper);color:var(--accent);border:1px solid var(--accent);border-radius:50%;font-size:var(--text-small)}
.van-map-marker:focus-visible .van-marker-body{outline:3px solid var(--ink);outline-offset:3px}
html[data-workflow-brand="off"] body.pmcp{--font-family:system-ui,-apple-system,"Segoe UI",sans-serif}

.van-travel-band{display:grid;grid-template-columns:repeat(var(--travel-days),minmax(0,1fr));width:100%;gap:var(--space-1)}
.van-travel-segment{min-width:0;padding:var(--space-1);border-left:1px solid var(--job-edge);overflow:hidden}
.van-travel-segment:first-child{border-left:0}
.van-travel-label{display:flex;align-items:center;gap:var(--space-1);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.van-travel-segment small{display:block;font-size:var(--text-small);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.van-travel-return svg{transform:scaleX(-1)}

body.pmcp{--calendar-date-header-bg:#e5e7eb}

/* Shared desktop header utilities. */
body.pmcp .primary-nav{align-items:center}
body.pmcp .nav-signout .nav-icon{display:inline-flex;align-items:center;justify-content:center;width:var(--button-height);height:var(--button-height);min-height:var(--button-height);padding:var(--space-2);border:0;border-radius:var(--radius);box-shadow:none;background:transparent;color:white}
body.pmcp .nav-signout .nav-icon:hover{background:#ffffff25}
body.pmcp .nav-signout .nav-icon:focus-visible{outline:2px solid var(--nav-focus,var(--paper));outline-offset:2px}
body.pmcp .nav-signout .nav-icon svg{display:block;flex:none}

/* Paired fields in the desktop Add a job form. */
.form-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--form-gap);align-items:start}
.form-pair>*,.form-pair input,.form-pair select{min-width:0}
.current-url-row{align-items:end}
.current-url-action{display:flex;align-items:center;min-height:var(--control-height)}
.current-url-action [aria-disabled="true"]{opacity:.5;cursor:default}
[data-contact-details]:empty{display:none}
body.pmcp .person-form .form-pair input:not([type=checkbox]):not([type=radio]):not([type=hidden]),body.pmcp .person-form .form-pair select{height:var(--control-height);min-height:var(--control-height)}

.contact-details{margin-top:var(--space-4)}
.contact-details table{width:100%}
.contact-details th{width:1%;white-space:nowrap;text-align:left}
.contact-details td{white-space:normal;overflow-wrap:anywhere}
.notes-heading{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);margin-bottom:var(--space-4)}
.notes-heading h3{margin:0}
.job-notes-table{width:100%}
.job-notes-table td{vertical-align:top}
.job-notes-table th:nth-child(n+2),.job-notes-table td:nth-child(n+2){width:1%;white-space:nowrap}
.job-notes-table td:first-child{white-space:normal;overflow-wrap:anywhere}
.job-editor-form:has(#sale-panel-notes:not([hidden])) [data-sale-save]{display:none}

.job-contact-action{margin-left:auto}
.job-editor-form:has(#sale-panel-contacts[hidden]) .job-contact-action{display:none}

/* Crew contact popup and directory: compact desktop presentation. */
body.pmcp [data-crew-profile-panel="contact"] .person-form{grid-template-columns:repeat(2,minmax(0,1fr))}
body.pmcp [data-crew-profile-panel="contact"] .person-form>*{min-width:0}
body.pmcp [data-crew-profile-panel="contact"] .person-form>:is(.person-notes-label,.dialog-actions){grid-column:1/-1}
body.pmcp #crew-detail .crew-history-heading{margin-top:var(--space-5);margin-bottom:var(--space-3)}
body.pmcp .dialog-header .close-dialog{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;line-height:1}
body.pmcp .people-table{min-width:0;width:100%}
body.pmcp .people-table :is(th,td){padding-inline:var(--space-2)}
body.pmcp .people-table :is(th,td):is(:nth-child(1),:nth-child(4)){white-space:normal;overflow-wrap:anywhere}
@media(max-width:650px){body.pmcp [data-crew-profile-panel="contact"] .person-form{grid-template-columns:minmax(0,1fr)}}

body.pmcp .people-filters .crew-category-filter{flex:0 0 100%;min-width:0;margin:0;padding:var(--space-3) 0 0;border:0;border-top:1px solid var(--border)}
body.pmcp .crew-category-filter legend{float:left;width:100%;padding:0;margin-bottom:var(--space-2);font-size:var(--text-control)}
body.pmcp .crew-category-filter .primary-toggle-options{clear:both}
body.pmcp .people-filters .crew-category-filter input{width:1px;height:1px;min-height:0;margin:0;padding:0}

/* Inventory and MGC use the shared table, popup and allocation components. */
body.pmcp .mgc-equipment-table td{white-space:normal}
body.pmcp .mgc-form{margin-top:var(--space-4)}
body.pmcp .mgc-ready{display:flex;align-items:center;gap:var(--space-2);margin-top:var(--space-4)}
body.pmcp .mgc-ready input,body.pmcp .mgc-equipment-table input[type=checkbox]{width:auto;min-height:0;margin:0}
body.pmcp #job-detail .job-tabs{flex-wrap:wrap}

body.pmcp .map-kind-toggle{display:inline-flex;margin-bottom:var(--space-4)}

body.pmcp .inventory-category-add{display:flex;align-items:flex-end;gap:var(--space-3);margin-bottom:var(--space-4)}
body.pmcp .inventory-category-add label{flex:1;min-width:0;margin:0}
body.pmcp .inventory-category-add input{margin-bottom:0}
body.pmcp .inventory-category-add button{flex:none;margin:0}
body.pmcp .section-notes{margin-top:var(--space-5)}
body.pmcp .note-filter{display:flex;gap:var(--space-3);align-items:center;margin-bottom:var(--space-4)}
body.pmcp .note-filter select{width:auto;min-width:10rem;margin:0}
body.pmcp .note-tag{display:inline-block;margin-top:var(--space-2);color:var(--muted)}
body.pmcp .activity-dialog{width:min(72rem,calc(100vw - 4rem));max-width:none}
body.pmcp .activity-dialog .activity-content{padding:var(--space-4)}
body.pmcp .activity-dialog .activity-search{display:flex;align-items:flex-end;gap:var(--space-3);margin-bottom:var(--space-4)}
body.pmcp .activity-search label{flex:1;margin:0}
body.pmcp .activity-search input,body.pmcp .activity-search select{margin-bottom:0}
body.pmcp .activity-pagination{display:flex;justify-content:space-between;margin-top:var(--space-4)}

body.pmcp .notes-heading .button{display:inline-flex;align-items:center;gap:var(--space-2);white-space:nowrap;flex:none}
body.pmcp .notes-heading .button svg{width:var(--text-section);height:var(--text-section);flex:none}

/* Jobs share the calendar stage colours across the whole row. */
body.pmcp [data-sales-table] tbody tr[data-sale-row],
body.pmcp [data-sales-table] tbody tr[data-sale-row]>td,
body.pmcp [data-client-jobs-table] tbody tr[data-client-job-row],
body.pmcp [data-client-jobs-table] tbody tr[data-client-job-row]>td{background:var(--stage-bg);color:var(--stage-ink)}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
body.pmcp .job-section-notes{margin-top:var(--space-5)}
body.pmcp .job-section-notes>.section-notes{margin-top:0}

body.pmcp .notes-toolbar .note-filter{margin:0}
.job-editor-form:has([data-contact-autosave]):has(#sale-panel-contacts:not([hidden])) [data-sale-save]{display:none}

body.pmcp .van-map-controls{align-items:center}
body.pmcp .van-map-controls .map-kind-toggle{margin:0;flex:none}
body.pmcp .van-map-controls label{display:flex;align-items:center;gap:var(--space-2);margin:0}
body.pmcp .van-map-controls input[type=date]{width:auto;margin:0}

/* Compact calendar PO, stream and summary layouts. */
.planning-po-number{display:flex;align-items:end;gap:var(--space-3)}
.planning-po-number>label{flex:1;min-width:0}
body.pmcp .planning-po-number>.button{flex:none;margin:0;height:var(--control-height);min-height:var(--control-height)}
.planning-po-details,.job-summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-4);align-items:start}
body.pmcp .planning-po-details .planning-po-status{margin:0}
.planning-po-details .planning-po-options{gap:var(--space-1)}
.planning-po-details .planning-po-options span{padding-inline:var(--space-2)}
.job-summary-table{width:100%}
.job-summary-table th{width:1%;white-space:nowrap;text-align:left}
.job-summary-table td{white-space:normal;overflow-wrap:anywhere}

/* Vehicle checks reuse the shared forms, tables and native dialogs. */
.van-check-note { white-space: pre-wrap; }
.van-check-photos { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-block: var(--space-4); }
.van-check-photos img { width: 180px; height: 120px; object-fit: cover; border-radius: var(--radius); }
.van-check-followup { padding-block: var(--space-4); border-top: 1px solid var(--border); }
.van-qr-card { text-align: center; background: white; color: black; padding: var(--space-5); }
.van-qr-card svg { width: 280px; max-width: 100%; height: auto; }
.van-qr-url { overflow-wrap: anywhere; }
@media print {
 body:has(#van-qr[open]) *:not(:has(#van-qr)):not(#van-qr):not(#van-qr *) { display: none !important; }
 body:has(#van-qr[open]) :has(#van-qr) { margin: 0; padding: 0; border: 0; overflow: visible; }
 body:has(#van-qr[open]) #van-qr { visibility: visible; position: absolute; inset: 0; margin: 0; width: 100%; max-width: none; max-height: none; overflow: visible; border: 0; box-shadow: none; }
 #van-qr .dialog-header, #van-qr .dialog-actions, #van-qr [data-van-qr-link] { display: none; }
 #van-qr::backdrop { background: white; }
}

.sales-group-title { margin-top: var(--space-5); margin-bottom: var(--space-4); }
.van-checks-panel h2 { margin-block: var(--space-5) var(--space-4); }
.van-checks-panel > h2:first-child { margin-top: 0; }
.van-check-filter { display: flex; gap: var(--space-3); align-items: end; margin-bottom: var(--space-4); }
.van-check-filter label { flex: 1; }

.van-check-item { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding-block: var(--space-2); border-bottom: 1px solid var(--border); }
.van-check-item .crew-type-toggle { flex-shrink: 0; }
body.pmcp .dialog-heading h2[tabindex="-1"]:focus { outline: none; }

.van-check-warning { display: inline-flex; align-items: center; gap: var(--space-1); }
.van-check-warning svg { width: 1em; height: 1em; flex-shrink: 0; }

/* Keep both Jobs groups aligned within the desktop page. */
body.pmcp [data-sales-table] { table-layout: fixed; width: 100%; }
/* Match Jobs headers to rows containing the shared action icons. */
body.pmcp [data-sales-table] :is(th,td) { height:calc(var(--table-action-size) + 2 * var(--table-cell-padding-block) + 1px); box-sizing:border-box; }
body.pmcp [data-sales-table] :is(th,td):not(.table-actions) { white-space: normal; overflow-wrap: anywhere; }
[data-sales-table] .sales-client-column { width: 22%; }
[data-sales-table] .sales-owner-column { width: 16%; }
[data-sales-table] .sales-dates-column { width: 23%; }
[data-sales-table] .sales-actions-column { width: calc(4 * var(--table-action-size) + 6 * var(--space-2)); }

[data-sales-table] .sales-job-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Settings destinations share one content surface below the section buttons. */
.settings-content>:first-child:not(dialog){margin-top:0}
.settings-content>:last-child:not(dialog){margin-bottom:0}
body.pmcp .settings-content>.panel{padding:0;border:0;box-shadow:none;background:transparent}
body.pmcp .settings-content>.panel+.panel{margin-top:var(--space-5);padding-top:var(--space-5);border-top:1px solid var(--border)}

.settings-subnav{background:var(--settings-nav-bg);border-bottom:1px solid var(--settings-nav-selected);padding:0}
body.pmcp .settings-subnav .settings-tabs{width:min(var(--max),calc(100% - 2 * var(--page-gutter)));margin:0 auto;gap:0}


:root{--page-gutter:32px}

/* Inventory keeps the booking name and dates together on one compact row. */
.inventory-table :is(th,td){white-space:nowrap}
.inventory-table :is(th,td):first-child,.inventory-table :is(th,td):last-child{width:1%}
.inventory-table :is(th,td):nth-child(2){width:auto}
.inventory-job-date{font-size:var(--text-small);color:var(--muted)}

:root{--inventory-current-ink:#b5123d;--inventory-upcoming-ink:#a94e00}
.inventory-booking[data-booking-state=none]{color:var(--muted)}
.inventory-booking[data-booking-state=current]{color:var(--inventory-current-ink)}
.inventory-booking[data-booking-state=upcoming]{color:var(--inventory-upcoming-ink)}
body.pmcp .inventory-booking :is(a,.inventory-job-date){color:inherit}

.client-notes-toolbar{display:flex;align-items:flex-end;gap:var(--space-3);margin-bottom:var(--space-4)}
.client-notes-toolbar label{flex:1;min-width:0;margin:0}
.client-notes-toolbar :is(input,select){margin-bottom:0}
.client-notes-toolbar button{flex:none}
.client-notes-table td:nth-child(1){white-space:normal;overflow-wrap:anywhere}
.client-file-preview{display:block;max-width:100%;max-height:55vh;object-fit:contain;margin-inline:auto}

/* Compact search and action row shared by client contact tables. */
.contact-toolbar,.directory-toolbar{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);margin-bottom:var(--space-3)}
.contact-toolbar input[type=search],.directory-toolbar input[type=search]{flex:1 1 0;min-width:0;width:auto;max-width:100%}
.contact-toolbar .section-actions,.directory-toolbar .section-actions{flex:none;margin:0}

/* Delete icons always use the shared destructive colour, even on secondary buttons. */
body.pmcp .button:has(.delete-icon){background:var(--danger);border-color:var(--danger-edge);color:var(--paper)}
body.pmcp .button:has(.delete-icon):hover:not(:disabled){background:var(--danger-hover);border-color:var(--danger-edge);color:var(--paper)}
:root{--text-page-compact:24px}
body.pmcp main.client-directory-page{padding-top:var(--space-5)}
body.pmcp .client-directory-page .calendar-heading{margin-bottom:var(--space-5)}
body.pmcp .client-directory-page .calendar-heading h1{font-size:var(--text-page-compact)}

body.pmcp .category-add .button{height:var(--control-height);min-height:var(--control-height)}

/* Job stage is one joined choice; ownership is a separate toggle. */
.sales-stage-group{display:inline-flex;align-items:stretch;flex:none}
body.pmcp .sales-stage-group .sales-stage-tag{position:relative;border-radius:0;border-style:solid}
body.pmcp .sales-stage-group .sales-stage-tag+.sales-stage-tag{margin-left:-1px}
body.pmcp .sales-stage-group .sales-stage-tag:first-child{border-radius:var(--radius) 0 0 var(--radius)}
body.pmcp .sales-stage-group .sales-stage-tag:last-child{border-radius:0 var(--radius) var(--radius) 0}
body.pmcp .sales-stage-group .sales-stage-tag:is([aria-pressed=true],:focus-visible){z-index:1}
.sales-owner-scope{display:inline-flex;align-items:center;flex:none;margin-left:var(--space-2);padding-left:var(--space-4);border-left:1px solid var(--border)}
body.pmcp .sales-owner-scope .sales-stage-tag{border-style:solid}

/* Shared on/off indicator for an independent filter choice. */
:root{--toggle-control-ink:#000;--toggle-indicator-width:28px;--toggle-indicator-height:16px;--toggle-indicator-inset:2px}
.toggle-indicator{position:relative;display:inline-block;flex:none;width:var(--toggle-indicator-width);height:var(--toggle-indicator-height);border-radius:var(--toggle-indicator-height);background:var(--muted)}
.toggle-indicator::after{content:'';position:absolute;top:var(--toggle-indicator-inset);left:var(--toggle-indicator-inset);width:calc(var(--toggle-indicator-height) - 2 * var(--toggle-indicator-inset));height:calc(var(--toggle-indicator-height) - 2 * var(--toggle-indicator-inset));border-radius:50%;background:var(--paper)}
[aria-pressed=true]>.toggle-indicator{background:var(--green)}
[aria-pressed=true]>.toggle-indicator::after{transform:translateX(calc(var(--toggle-indicator-width) - var(--toggle-indicator-height)))}
body.pmcp .sales-owner-scope .owner-toggle{gap:var(--space-2)}
body.pmcp .sales-stage-filters .owner-toggle[aria-pressed]{background:var(--paper);border-color:var(--toggle-control-ink);color:var(--toggle-control-ink)}
.toggle-state{font-size:var(--text-small);min-width:3ch}
.jobs-toolbar{display:flex;align-items:center;gap:var(--space-4);margin-bottom:var(--space-3)}
.jobs-toolbar>.sales-stage-filters{flex:1;margin:0}
.jobs-toolbar>.section-actions{flex:none;margin:0}

/* Client type choices share their directory tag colours. */
body.pmcp .client-filter .crew-type-toggle input[name=client_type_filter][value=b2b]+span{background:var(--error-bg);color:var(--error-ink)}
body.pmcp .client-filter .crew-type-toggle input[name=client_type_filter][value=graduation]+span{background:var(--toggle-blue-bg);color:var(--toggle-blue-ink)}
body.pmcp .client-filter .crew-type-toggle input[name=client_type_filter]:checked+span{box-shadow:inset 0 0 0 2px currentColor;font-weight:var(--weight-bold)}
body.pmcp .client-upcoming-toggle{display:inline-flex;align-items:center;gap:var(--space-2);height:var(--control-height);padding:var(--space-1) var(--space-3);background:var(--paper);color:var(--toggle-control-ink);border:1px solid var(--toggle-control-ink);font-size:var(--text-control);cursor:pointer}
/* Keep every Map control on the same height and centre line. */
body.pmcp .van-map-controls>.button{display:inline-flex;align-items:center;justify-content:center;height:var(--control-height);min-height:var(--control-height)}
body.pmcp .van-map-controls .map-kind-toggle{height:var(--control-height)}
body.pmcp .van-map-controls .map-kind-toggle a{display:inline-flex;align-items:center;justify-content:center;height:calc(var(--control-height) - 2px);padding-block:0}
body.pmcp .van-map-controls form{margin:0;align-items:center}
body.pmcp .van-map-controls label>input:not([type=checkbox]):not([type=radio]):not([type=hidden]){margin:0}
body.pmcp .van-map-controls label>.date-field{margin:0}
body.pmcp .van-map-controls .date-field>input[type=date]{width:calc(12ch + var(--control-height) + var(--space-5));padding-right:calc(var(--control-height) + var(--space-3))}

/* Calendar logistics: approved desktop Workflow design. */
.calendar-logistics-group{position:relative;pointer-events:auto;border:3px solid var(--job-edge);padding:0;gap:0;background:color-mix(in srgb,var(--job-bg) 45%,var(--paper));overflow:hidden}
.calendar-plan-heading{grid-column:1/-1;grid-row:1;min-width:0;padding:var(--space-4);background:var(--job-bg);container-type:inline-size;container-name:calendar-job-heading}
.calendar-logistics-group:has(>.calendar-event-day)>.calendar-plan-heading{border-bottom:1px solid var(--job-edge)}
.calendar-plan-title-row{display:flex;align-items:center;gap:var(--space-3);min-width:0}
body.pmcp .calendar-plan-heading .job-card{flex:1;min-width:0;width:auto;min-height:0;display:block;background:none;color:inherit;padding:0;margin:0;border:0;box-shadow:none;border-radius:0;text-decoration:none;font:inherit;overflow-wrap:anywhere}
.calendar-plan-title-row>strong{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.pmcp .calendar-plan-heading .job-card strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.calendar-readiness{flex:none}
.calendar-day-statuses{display:flex;align-items:center;gap:var(--space-1)}
body.pmcp .calendar-status-icon{width:var(--control-compact-height);height:var(--control-compact-height);padding:var(--space-1);flex:none}
.calendar-status-icon svg{width:20px;height:20px}
.calendar-event-day{display:flex;flex-direction:column;align-items:flex-start;gap:var(--space-2);min-width:0;padding:var(--space-3);background:color-mix(in srgb,var(--job-bg) 80%,var(--job-edge));border:0;font-size:var(--text-small)}
.calendar-day-statuses{margin-top:auto}
.calendar-event-title{font-size:var(--text-control);font-weight:var(--weight-bold);letter-spacing:.04em;text-transform:uppercase}
.calendar-event-times{display:flex;flex-direction:column;gap:var(--space-1) var(--space-2);font-variant-numeric:tabular-nums;font-weight:var(--weight-bold)}
.calendar-event-session{overflow-wrap:anywhere}
.calendar-event-times time{white-space:nowrap}
.calendar-readiness-summary{display:grid;gap:var(--space-3);margin-top:var(--space-4)}
body.pmcp .calendar-readiness-summary .calendar-status-icon{width:100%;height:auto;justify-content:flex-start;padding:var(--space-3)}
.readiness-value{margin-left:auto}
.calendar-van-plans{--van-load-bg:#e8f2fc;--van-travel-bg:#cbdff5;--van-combined-bg:#a9c8e9;--van-stay-bg:#86afd8;--van-full-day-bg:#456e9b;--van-line:#7c9fc4;--van-ink:#20395d;grid-column:1/-1;grid-row:3;min-width:0;border-top:1px solid var(--van-line);background:var(--van-load-bg);overflow:hidden}
.calendar-van-row{position:relative;--van-label-width:24px;display:grid;grid-template-columns:repeat(var(--log-days),minmax(0,1fr));min-width:0;min-height:48px;background:var(--van-load-bg)}
.calendar-van-row+.calendar-van-row{border-top:1px solid var(--van-line)}
.calendar-van-row-label{position:absolute;left:0;top:0;bottom:0;width:var(--van-label-width);box-sizing:border-box;display:block;writing-mode:vertical-rl;transform:rotate(180deg);text-align:center;padding:var(--space-1);background:var(--van-load-bg);color:var(--van-ink);border-left:1px solid var(--van-line);font-size:var(--text-small);font-weight:var(--weight-bold);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;z-index:2}
body.pmcp .calendar-van-cell[data-first-column]{padding-left:calc(var(--van-label-width) + var(--space-2))}
.calendar-van-day-guide{border-right:1px dashed var(--van-line);pointer-events:none}
.calendar-van-day-guide:last-of-type{border-right:0}
body.pmcp .calendar-van-cell{display:flex;align-items:center;justify-content:center;align-self:stretch;flex-wrap:nowrap;gap:var(--space-1);min-width:0;min-height:48px;margin:0;padding:var(--space-2);border:0;border-right:1px dashed var(--van-line);border-radius:0;color:var(--van-ink);font:inherit;font-size:var(--text-small);line-height:var(--line-heading);white-space:nowrap;z-index:1;background:var(--van-load-bg);text-decoration:none}
body.pmcp .calendar-van-cell:last-child{border-right:0}
body.pmcp .calendar-van-cell>strong{flex:0 1 auto;min-width:0;font-weight:var(--weight-regular);max-width:100%;overflow:hidden;text-overflow:ellipsis}
.calendar-van-cell>span{flex:0 1 auto;min-width:0;white-space:normal;overflow-wrap:normal;word-break:normal;text-transform:uppercase;font-weight:var(--weight-bold)}
.calendar-van-cell .calendar-solid-van{width:27px;height:27px;flex:0 0 27px}
body.pmcp .calendar-van-cell:is([data-kind=out],[data-kind=back]){background:var(--van-travel-bg)}
body.pmcp .calendar-van-cell[data-kind=stay]{background:var(--van-stay-bg)}
body.pmcp .calendar-van-cell[data-combined=true]{background:var(--van-combined-bg)}
body.pmcp .calendar-van-cell[data-action-count="4"]{background:var(--van-full-day-bg);color:var(--paper)}
body.pmcp .calendar-van-cell[data-action-count="4"] svg{color:var(--van-ink)}
.calendar-van-cell:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.van-plan-card{border:1px solid var(--crew-add-border);border-radius:var(--dialog-radius);overflow:hidden;margin-bottom:var(--space-4)}
.van-plan-heading{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3) var(--space-4);background:var(--crew-day-header-bg);border-bottom:1px solid var(--crew-add-border)}
.van-plan-heading>label{font-weight:var(--weight-bold)}
.van-plan-heading select,.van-plan-heading .van-picker-trigger{width:auto;flex:1;margin:0}
.van-plan-dates{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--space-4);padding:var(--space-4)}
.van-plan-dates label{display:grid;gap:var(--space-2);font-weight:var(--weight-bold);min-width:0}
.van-plan-dates input{width:100%;min-width:0;margin:0;box-sizing:border-box}
.van-plan-card .dialog-actions{padding:0 var(--space-4) var(--space-4);margin:0}
.van-plan-legacy{display:flex;align-items:center;gap:var(--space-3);margin:var(--space-4)}

/* Context-only actions, using the shared navy and control tokens. */
body.pmcp .calendar-van-quick{position:fixed;inset:auto;margin:0;padding:0;width:max-content;max-width:calc(100vw - 16px);border:1px solid var(--dialog-border);border-radius:var(--dialog-radius);background:var(--paper);color:var(--ink);box-shadow:0 10px 28px #18171555,0 3px 8px #18171533;overflow:visible}
.calendar-van-quick-actions{padding:var(--space-1);display:grid;grid-template-columns:1fr;gap:var(--space-2)}
body.pmcp .calendar-van-quick .button:not(:disabled){width:100%;height:var(--control-height);box-sizing:border-box;margin:0;display:flex;align-items:center;justify-content:center;gap:var(--space-1);text-align:left;background:var(--brand-navy,#33397e);border-color:var(--brand-navy,#33397e);color:var(--paper)}

.calendar-van-action-label{display:flex;align-items:center;gap:var(--space-1);white-space:nowrap}
.calendar-van-action-label svg{width:18px;height:18px;flex:none}

.calendar-van-cell[data-van-actions]{cursor:grab;touch-action:none;user-select:none}
.calendar-van-cell.is-dragging{opacity:.5;cursor:grabbing}
.calendar-week{position:relative}
.calendar-van-drop-target{position:absolute;inset:0;grid-row:1 / -1;box-sizing:border-box;z-index:3;pointer-events:none;display:flex;align-items:flex-start;justify-content:center;padding-top:var(--space-3);background:#cbdff54d;color:var(--van-ink,#20395d);outline:2px dashed var(--accent);outline-offset:-2px;font-size:var(--text-small);font-weight:var(--weight-bold)}
.calendar-van-drop-target.is-invalid{background:#812c3a26;color:#812c3a}
.calendar-van-drop-target[hidden]{display:none}
.calendar-van-drag-ghost{position:fixed;z-index:10000;pointer-events:none;display:flex;align-items:center;justify-content:center;gap:var(--space-1);padding:var(--space-2);box-sizing:border-box;border:1px solid var(--accent);border-radius:var(--radius);box-shadow:0 8px 22px #18171540;white-space:nowrap;opacity:.95}
.calendar-van-drag-ghost strong{font-weight:var(--weight-regular)}
.calendar-van-drag-ghost>span{min-width:0;white-space:normal;overflow-wrap:normal;word-break:normal;text-transform:uppercase;font-weight:var(--weight-bold)}
.calendar-van-drag-ghost svg{width:27px;height:27px;flex:0 0 27px}
.calendar-van-drag-ghost.is-invalid{border-color:#812c3a}

.calendar-van-quick::after{content:"";position:absolute;left:var(--bubble-tip,50%);bottom:-5px;width:8px;height:8px;transform:translateX(-50%) rotate(45deg);background:var(--paper);border-right:1px solid var(--dialog-border);border-bottom:1px solid var(--dialog-border);pointer-events:none}
.calendar-van-quick[data-placement=below]::after{top:-5px;bottom:auto;transform:translateX(-50%) rotate(225deg)}

#guide-allocation>.calendar-logistics-group{margin-bottom:var(--space-4)}

/* Clip at the border box so torn edges cover the full outer border, including corners.
   Only week continuations use these edges; tentative jobs keep solid true ends. */
.calendar-event-day[data-day-divider]{border-left:1px solid var(--job-edge)}
.calendar-logistics-group:is(.continues-before,.continues-after){overflow:clip;overflow-clip-margin:border-box}
.calendar-logistics-group.continues-before{border-left-color:transparent;border-top-left-radius:0;border-bottom-left-radius:0}
.calendar-logistics-group.continues-after{border-right-color:transparent;border-top-right-radius:0;border-bottom-right-radius:0}
.calendar-continuation-edge{position:absolute;top:-3px;bottom:-3px;height:calc(100% + 6px);width:12px;z-index:4;pointer-events:none}
.calendar-continuation-edge.edge-before{left:-3px;transform:scaleX(-1)}
.calendar-continuation-edge.edge-after{right:-3px}

/* FSM quick-add shares the van speech bubble and standard compact controls. */
.calendar-van-add-actions{padding:var(--space-3);display:grid;gap:var(--space-2);max-width:360px}
.calendar-van-add-actions p{margin:0}
.calendar-van-add-row{display:grid;grid-template-columns:1fr auto;align-items:center;gap:var(--space-2);border-top:1px solid var(--border);padding-top:var(--space-2)}
.calendar-van-add-row small{grid-column:1/-1;color:var(--muted)}
body.pmcp .calendar-van-add-row .button{height:var(--control-compact-height);width:auto}
.calendar-van-more{justify-self:start;margin-top:var(--space-1)}

/* Combined activities use one compact icon row, also retained by the drag ghost. */
.calendar-van-cell>.calendar-van-activity-icons,
.calendar-van-drag-ghost>.calendar-van-activity-icons{display:flex;flex:0 1 auto;align-items:center;justify-content:center;gap:var(--space-1);min-width:0;max-width:100%;white-space:nowrap}
.calendar-van-cell .calendar-van-activity-icons .calendar-solid-van,
.calendar-van-drag-ghost .calendar-van-activity-icons .calendar-solid-van{flex:0 0 27px;width:27px;height:27px;color:var(--van-ink)}

/* Missing coverage is marked in its empty day cell, never over activity icons. */
body.pmcp .calendar-van-missing-day{display:flex;align-items:center;justify-content:center;min-width:0;padding:var(--space-2);color:#b51f45;text-decoration:none;background:transparent;border:0;box-shadow:none}
body.pmcp .calendar-van-missing-day[data-first-column]{padding-left:calc(24px + var(--space-2))}
.calendar-van-missing-day .calendar-van-date-warning{width:27px;height:27px;flex:0 0 27px}

/* Job planning uses a stronger header and a compact second navigation level. */
body.pmcp .dialog-header.job-planning-header{background:linear-gradient(115deg,#192e49,#354f7a);color:#fff;border-bottom-color:#192e49;margin-bottom:0}
body.pmcp .job-planning-header :is(h2,.job-detail-client,.job-dates,.detail-status){color:#fff}
body.pmcp .job-planning-header :is(.job-pin,.close-dialog){color:#fff;background:transparent;border-color:transparent;box-shadow:none}
body.pmcp .job-planning-header :is(.job-pin,.close-dialog):hover{background:#ffffff20;color:#fff}
body.pmcp .job-planning-header .job-pin.is-pinned{background:#ffffff25;border-color:#ffffff80}
body.pmcp .job-planning-header :is(.job-pin,.close-dialog):focus-visible{outline:2px solid #fff;outline-offset:2px}
.job-navigation[hidden],.job-subnav[hidden]{display:none}
body.pmcp .job-navigation .job-primary-tabs{margin-bottom:0;flex-wrap:nowrap}
.job-navigation{margin-bottom:var(--space-4)}
body.pmcp .job-subnav{display:flex;gap:var(--space-2);padding:var(--space-2) var(--dialog-padding);margin-inline:calc(-1 * var(--dialog-padding));border-bottom:1px solid var(--dialog-border);background:var(--paper)}
body.pmcp .job-subnav[hidden]{display:none}
body.pmcp .job-subnav button{font:inherit;font-size:var(--text-control);font-weight:var(--weight-bold);color:var(--accent);background:var(--paper);border:1px solid transparent;border-radius:var(--radius);padding:var(--space-2) var(--space-3);cursor:pointer}
body.pmcp .job-subnav button[aria-current]{background:var(--accent-tint);border-color:var(--dialog-border)}
body.pmcp .job-subnav button:hover{background:var(--accent-tint)}
body.pmcp .job-subnav button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.job-navigation-demo{padding:var(--dialog-padding);border:1px solid var(--dialog-border);border-radius:var(--dialog-radius);overflow:hidden}
body.pmcp .job-navigation-demo .job-tabs{margin-inline:calc(-1 * var(--dialog-padding));padding-inline:var(--dialog-padding)}

body.pmcp dialog.job-navigation-demo{width:min(1040px,calc(100vw - 32px));max-width:none}

/* Primary planning tabs retain their readiness colour in every interaction state. */
body.pmcp .job-navigation .job-primary-tabs button{background:color-mix(in srgb,var(--dialog-tab-bg) 65%,var(--accent) 35%);border-color:color-mix(in srgb,var(--dialog-border) 55%,var(--accent) 45%);color:var(--ink)}
body.pmcp .job-navigation .job-primary-tabs button[aria-current]{background:var(--accent);border-color:var(--accent);color:#fff}
body.pmcp .job-navigation .job-primary-tabs button[data-readiness]{background:color-mix(in srgb,var(--allocation-bg) 75%,var(--allocation-edge) 25%);border-color:var(--allocation-edge);color:var(--allocation-ink)}
body.pmcp .job-navigation .job-primary-tabs button[data-readiness]:hover{background:color-mix(in srgb,var(--allocation-bg) 60%,var(--allocation-edge) 40%);color:var(--allocation-ink)}
body.pmcp .job-navigation .job-primary-tabs button[data-readiness][aria-current]{background:color-mix(in srgb,var(--allocation-bg) 40%,var(--allocation-edge) 60%);border-color:var(--allocation-ink);color:var(--ink);box-shadow:inset 0 3px 0 var(--allocation-ink)}

body.pmcp .job-navigation .job-primary-tabs button:not([data-readiness])[aria-current]{box-shadow:inset 0 3px 0 #17253d}
.van-plan-summary{width:100%;white-space:nowrap}
.van-plan-summary td:first-child{width:100%}
.van-plan-add{margin-block:var(--space-4)}
.van-plan-add-controls{display:flex;align-items:center;gap:var(--space-2)}
.van-plan-add-controls>:first-child{flex:1;min-width:0}
.van-signoff{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);border-top:1px solid var(--border);padding-top:var(--space-3);margin-top:var(--space-4)}
.van-signoff p{margin:0}
.van-signoff-approved{color:var(--success-ink)}
/* Scout shares Allocation's date cards and role alignment, with compact shortlists. */
body.pmcp .scout-slot{grid-template-columns:var(--crew-label-width) minmax(0,1fr);margin-block:0;padding-block:var(--space-3)}
body.pmcp .scout-slot ~ .scout-slot{border-top:1px solid var(--border)}
.scout-slot .crew-slot-category{white-space:nowrap}
.scout-role-actions{display:flex;align-items:center;gap:var(--space-2);min-width:0}
.scout-role-actions>.icon-action{flex:none}
.scout-slot .scout-shortlist{flex-wrap:nowrap;min-width:0;overflow-x:auto;padding:var(--space-1)}
.scout-slot .scout-shortlist>.button{flex:0 0 auto;white-space:nowrap}
.scout-slot .scout-shortlist>.muted{white-space:nowrap}
.scout-shortlist{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-2)}
body.pmcp .scout-picker,body.pmcp .scout-request{width:min(960px,calc(100vw - 80px));max-height:calc(100vh - 80px);overflow:auto}
.scout-selection-form{margin:0}
.scout-choice-table{width:100%}
.scout-choice-table td,.scout-choice-table th{white-space:nowrap}
body.pmcp .scout-choice-table input[type=checkbox]{width:18px;height:18px;min-height:0;margin:0;padding:0}

/* Scout request actions share one spaced desktop row; replies never allocate crew. */
body.pmcp .scout-request-actions{display:flex;align-items:center;flex-wrap:nowrap;gap:var(--space-4);margin-top:var(--space-5)}
body.pmcp .scout-request-actions>.button{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);flex:1;white-space:nowrap;margin:0}
body.pmcp .scout-shortlist>.button{display:inline-flex;align-items:center;gap:var(--space-2)}
.scout-status-icon{width:16px;height:16px;flex:none;vertical-align:middle}
.scout-status-icon[data-scout-status=sent]{color:#244c79}
.scout-status-icon[data-scout-status=accepted]{color:var(--success-ink)}
.scout-status-icon[data-scout-status=declined]{color:var(--error-ink)}
.scout-status-icon[data-scout-status=maybe]{color:#6d500e}
.scout-status-icon[data-scout-status=expired]{color:var(--muted)}
body.pmcp .button[data-scout-marked-sent]{background:var(--accent-tint);border-color:var(--accent);color:var(--accent)}
.scout-request .planning-stay-status{display:inline-flex;align-items:center;gap:var(--space-2)}

body.pmcp .button.scout-add{background:#192e49;border-color:#192e49;color:#fff}
body.pmcp .button.scout-add:hover{background:#354f7a;border-color:#354f7a;color:#fff}
body.pmcp .scout-shortlist>.button[data-scout-state=sent]{--scout-bg:#e2edf9;--scout-edge:#90accb;--scout-ink:#244c79}
body.pmcp .scout-shortlist>.button[data-scout-state=accepted]{--scout-bg:var(--success-bg);--scout-edge:var(--success-border);--scout-ink:var(--success-ink)}
body.pmcp .scout-shortlist>.button[data-scout-state=declined]{--scout-bg:var(--error-bg);--scout-edge:var(--error-border);--scout-ink:var(--error-ink)}
body.pmcp .scout-shortlist>.button[data-scout-state=maybe]{--scout-bg:#fff0c2;--scout-edge:#bd9335;--scout-ink:#6d500e}
body.pmcp .scout-shortlist>.button:is([data-scout-state=sent],[data-scout-state=accepted],[data-scout-state=declined],[data-scout-state=maybe]){background:var(--scout-bg);border-color:var(--scout-edge);color:var(--scout-ink)}

.scout-day-actions{display:flex;justify-content:flex-end;margin:0;padding:var(--space-3) var(--space-4);border-top:1px solid var(--border);background:var(--crew-add-bg)}
.scout-confirm-allocation{display:flex;align-items:center;justify-content:space-between;gap:var(--space-4);margin-top:var(--space-4);padding-top:var(--space-4);border-top:1px solid var(--border)}
body.pmcp .button.scout-add:disabled{background:var(--border);border-color:var(--border);color:var(--muted);cursor:default}
.scout-status-icon[data-scout-status=allocated]{color:var(--success-ink)}
body.pmcp .scout-shortlist>.button[data-scout-state=allocated]{--scout-bg:var(--success-ink);--scout-edge:var(--success-ink);--scout-ink:#fff}
body.pmcp .scout-shortlist>.button[data-scout-state=allocated],.scout-request .planning-stay-status[data-scout-state=allocated]{background:var(--success-ink);border-color:var(--success-ink);color:#fff}
[data-scout-state=allocated] .scout-status-icon{color:#fff}
[data-scout-state=allocated] .scout-confirmed-check{stroke:var(--success-ink)}

.scout-shortlist [data-scout-not-selected] .scout-candidate-name{text-decoration-line:line-through;text-decoration-thickness:1px}

.scout-simulation{display:flex;align-items:center;justify-content:space-between;gap:var(--space-4);margin-top:var(--space-4);padding:var(--space-3);border:1px solid #df1682;border-radius:var(--radius);background:#ffe2f3}
.scout-simulation-actions{display:flex;gap:var(--space-3)}
.scout-simulation-form{margin:0}
body.pmcp .button.scout-simulate{background:#f22294;border-color:#c10069;color:#19101a}
body.pmcp .button.scout-simulate:hover{background:#ff59b2;border-color:#c10069;color:#19101a}

/* An allocation elsewhere overrides the reply colour without changing the reply. */
body.pmcp .scout-shortlist>.button[data-scout-state=conflict]{--scout-bg:#fff0dc;--scout-edge:#d8872e;--scout-ink:#8a450c;background:var(--scout-bg);border-color:var(--scout-edge);color:var(--scout-ink)}
.scout-status-icon[data-scout-status=conflict]{color:#d47713}
.scout-conflict-note{padding:var(--space-3);background:#fff0dc;border:1px solid #d8872e;border-radius:var(--radius);color:#8a450c}
.scout-warning-tooltip{position:fixed;inset:auto;margin:0;max-width:340px;padding:var(--space-3) var(--space-4);border:1px solid #d8872e;border-radius:var(--radius);background:#fff;color:var(--text);box-shadow:0 6px 20px #0003;font:inherit;pointer-events:auto}

body.pmcp .scout-shortlist>.button[hidden]{display:none}
.scout-day-actions [data-scout-hide]{display:inline-flex;align-items:center;gap:var(--space-2)}

/* Keep each reply/allocation colour when interacting, overriding generic blue buttons. */
body.pmcp .scout-shortlist>.button[data-scout-state]:is(:hover,:focus-visible):not(:disabled){background:color-mix(in srgb,var(--scout-bg,var(--secondary)) 92%,#000 8%);border-color:var(--scout-edge,var(--secondary-edge));color:var(--scout-ink,var(--ink))}

.scout-day-actions[data-scout-filters]{gap:var(--space-2);flex-wrap:wrap}
body.pmcp .scout-shortlist>.button,body.pmcp .scout-role-actions>.scout-add{height:var(--table-action-size);min-height:var(--table-action-size);padding:var(--space-1) var(--space-2);font-size:var(--text-small);line-height:var(--line-heading)}
body.pmcp .scout-role-actions>.scout-add{width:var(--table-action-size);padding:var(--space-1)}
.scout-role-actions{--scout-icon-size:14px}
.scout-shortlist .scout-status-icon,.scout-role-actions>.scout-add svg{width:var(--scout-icon-size);height:var(--scout-icon-size)}

/* Separate each freelancer PO card from the white planning panel. */
.planning-form.planning-po{background:var(--accent-tint)}

/* A completed restore stays distinct from an unavailable action. */
body.pmcp .button.is-complete:disabled{background:var(--success-bg);color:var(--success-ink);border-color:var(--success-border);opacity:1;cursor:default}
.startup-restore-actions{flex-wrap:nowrap}

/* Compact accommodation controls save in place. */
.accommodation-table{--table-cell-padding:var(--table-cell-padding-block) var(--space-2)}
.accommodation-table :is(th,td):is(:nth-child(2),:nth-child(3)){width:1%;white-space:nowrap}
.accommodation-table input,.accommodation-table select{min-width:0;box-sizing:border-box}
.accommodation-table input{width:100%}
.accommodation-table select{width:auto}
body.pmcp.pmcp .accommodation-table select,body.pmcp.pmcp .accommodation-table input[name="stay_reference"]{height:var(--control-compact-height);min-height:var(--control-compact-height);padding-block:var(--space-1)}
.accommodation-table .accommodation-row-form{display:block;margin:0;padding:0;border:0;background:transparent}
body.pmcp.pmcp .accommodation-table select.accommodation-status{background-color:var(--stay-bg);color:var(--stay-ink);border-color:var(--stay-border)}
.accommodation-status,.planning-stay-status[data-status="To check"]{--stay-bg:var(--error-bg);--stay-ink:var(--error-ink);--stay-border:var(--error-border)}
.planning-stay-status[data-status="To check"]{background:var(--error-bg);color:var(--error-ink)}
.accommodation-status[data-status="Not needed"],.accommodation-status[data-status="Booked"]{--stay-bg:var(--success-bg);--stay-ink:var(--success-ink);--stay-border:var(--success-border)}
.planning-stay-status[data-status="Not needed"]{background:var(--success-bg);color:var(--success-ink)}
.accommodation-status[data-status="Needs booking"]{--stay-bg:var(--toggle-amber-bg);--stay-ink:var(--toggle-amber-ink);--stay-border:var(--toggle-amber-border)}
.planning-notes{margin-top:var(--space-5)}
.planning-notes h3{margin-bottom:var(--space-4)}
.planning-notes .job-notes-table td:first-child{white-space:normal}
/* Shared approval checkpoint: visually separate from routine save actions. */
.planning-signoff{display:flex;align-items:center;justify-content:space-between;gap:var(--space-4);margin-top:var(--space-4);padding:var(--space-4);border:1px solid var(--toggle-blue-border);border-left:var(--space-1) solid var(--brand-navy,var(--accent));border-radius:var(--radius);background:var(--toggle-blue-bg)}
.planning-signoff p{margin:0;font-weight:var(--weight-bold)}
.planning-signoff[data-approved="1"]{background:var(--success-bg);border-color:var(--success-border);border-left-color:var(--success-ink)}
.planning-signoff-approved{color:var(--success-ink)}
body.pmcp .button.planning-signoff-button{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);min-height:var(--button-height);padding:var(--space-2) var(--space-4);font-size:var(--text-subheading);font-weight:var(--weight-bold);background:var(--success-ink);color:var(--paper);border:2px solid var(--success-ink);box-shadow:0 3px 7px #13233c30}
body.pmcp .button.planning-signoff-button:hover:not(:disabled){filter:brightness(1.15);background:var(--success-ink);color:var(--paper)}
body.pmcp .planning-signoff[data-approved="1"] .planning-signoff-button{background:var(--error-ink);color:var(--paper);border-color:var(--error-ink);box-shadow:none}
body.pmcp .planning-signoff[data-approved="1"] .planning-signoff-button:hover:not(:disabled){background:var(--error-ink);color:var(--paper);filter:brightness(1.15)}
.planning-signoff-button svg{width:var(--text-detail);height:var(--text-detail);flex:none}
body.pmcp .job-notes-table tr.planning-audit-row{--audit-bg:var(--success-bg);--audit-ink:var(--success-ink)}
body.pmcp .job-notes-table tr.planning-audit-row[data-note-kind="reopened"]{--audit-bg:var(--toggle-amber-bg);--audit-ink:var(--toggle-amber-ink)}
body.pmcp .job-notes-table tr.planning-audit-row[data-note-kind="invalidated"]{--audit-bg:var(--error-bg);--audit-ink:var(--error-ink)}
body.pmcp .job-notes-table tr.planning-audit-row>td{background:var(--audit-bg);color:var(--audit-ink)}
body.pmcp .job-notes-table tr.planning-audit-row>td:first-child{white-space:nowrap}
.planning-audit-label{display:inline-flex;vertical-align:middle;align-items:center;gap:var(--space-2);font-weight:var(--weight-bold);margin-right:var(--space-3)}
.planning-audit-label svg{width:var(--text-section);height:var(--text-section);flex:none}

.planning-signoff-button .signoff-check{stroke:var(--success-ink)}

/* Sign-off locks retain the existing section layout. */
body.pmcp fieldset.planning-edit-fields{display:block;min-width:0;margin:0;padding:0;border:0}

/* Shared location choices use the existing single-column form rhythm. */
[data-library-form] [data-location-fields]{display:grid;gap:var(--space-4)}
[data-library-form] [data-location-fields][hidden]{display:none}
[data-location-choices] fieldset{display:grid;gap:var(--space-2)}
body.pmcp label.location-choice{display:flex;align-items:center;gap:var(--space-2);margin:0;font-weight:var(--weight-normal)}
body.pmcp label.location-choice input[type=checkbox]{flex:none;width:var(--text-body);height:var(--text-body);min-height:0;margin:0;padding:0}
.accommodation-table-with-hotels :is(th,td):nth-child(3){width:25%;white-space:normal}
.accommodation-table-with-hotels :is(th,td):nth-child(4){width:1%;white-space:nowrap}
.accommodation-table-with-hotels select[name="stay_hotel"]{max-width:100%;width:100%}

/* Compact main navigation: Calendar stays visible; other permitted sections use More. */
body.pmcp .primary-nav{--nav-height:52px;--nav-font-weight:700}
body.pmcp .primary-nav-links{overflow:visible;align-items:stretch}
body.pmcp .primary-nav a,body.pmcp .primary-nav .nav-action{font-weight:var(--nav-font-weight)}
body.pmcp .primary-nav-links>a,body.pmcp .nav-more>summary{display:flex;align-items:center;box-sizing:border-box;min-height:var(--nav-height)}
body.pmcp .nav-more{position:relative;margin:0;padding:0;border:0}
body.pmcp .nav-more>summary{list-style:none;gap:var(--space-2);cursor:pointer;border-radius:0}
body.pmcp .nav-more>summary::-webkit-details-marker{display:none}
body.pmcp .nav-more>summary svg{width:var(--text-section);height:var(--text-section)}
body.pmcp .nav-more[open]>summary svg{transform:rotate(180deg)}
body.pmcp .nav-more[data-current-section]>summary{background:var(--paper);color:var(--ink);border-bottom-color:#ff9b71}
body.pmcp .nav-more-menu{position:absolute;top:100%;left:0;z-index:300;min-width:12rem;max-height:calc(100vh - 7rem);overflow:auto;padding:var(--space-2) 0;background:var(--paper);border:1px solid var(--border);border-radius:0 0 var(--radius) var(--radius);box-shadow:0 8px 24px #13233c30}
body.pmcp .primary-nav .nav-more .nav-more-menu a{display:block;color:var(--ink);background:var(--paper);border:0;padding:var(--space-3) var(--space-4)}
body.pmcp .primary-nav .nav-more .nav-more-menu a:hover,body.pmcp .primary-nav .nav-more .nav-more-menu a:focus-visible{background:var(--toggle-blue-bg);outline-color:var(--accent)}
body.pmcp .primary-nav .nav-more .nav-more-menu a[aria-current]{background:var(--toggle-blue-bg);color:var(--toggle-blue-ink);box-shadow:inset var(--space-1) 0 var(--brand-navy,var(--accent))}

/* Location forms: compact single-line controls and room for access/notes. */
body.pmcp.pmcp .location-form input:not([type=hidden]):not([type=checkbox]):not([type=radio]),
body.pmcp.pmcp .location-form select{height:var(--control-compact-height);min-height:var(--control-compact-height)}
body.pmcp.pmcp .location-form textarea{min-height:calc(var(--control-compact-height) * 4);resize:vertical}

body.pmcp .hotel-travel-table th:first-child{width:100%}
body.pmcp .hotel-travel-table input{width:14ch;min-width:14ch}

body.pmcp.pmcp .person-form.location-form .form-pair input:not([type=hidden]):not([type=checkbox]):not([type=radio]),
body.pmcp.pmcp .person-form.location-form .form-pair select{height:var(--control-compact-height);min-height:var(--control-compact-height)}

body.pmcp .location-form .address-autocomplete{font-size:var(--text-control);line-height:var(--line-copy)}

/* Client guide posts: readable instructions and captioned private images. */
.guide-list {display:grid;gap:var(--space-5);margin-top:var(--space-4)}
.guide-card {background:var(--surface,#fff);border:1px solid var(--border,#ccd4dc);border-radius:var(--radius-card,8px);padding:var(--space-5);display:grid;gap:var(--space-4)}
.guide-card-heading {display:flex;align-items:flex-start;justify-content:space-between;gap:var(--space-4)}
.guide-card-heading h3,.guide-card-heading p {margin:0}
.guide-card-heading p {margin-top:var(--space-2)}
.guide-copy {line-height:var(--line-copy);overflow-wrap:anywhere}
.guide-gallery {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--space-4)}
.guide-gallery figure {margin:0;min-width:0}
.guide-gallery img {display:block;width:100%;height:220px;object-fit:contain;background:var(--surface-muted,#f1f3f6);border-radius:var(--radius-control,4px)}
.guide-gallery figcaption {margin-top:var(--space-2);line-height:var(--line-copy);overflow-wrap:anywhere}
.guide-videos {display:flex;flex-wrap:wrap;gap:var(--space-3)}
.guide-image-edit {padding:var(--space-3);border:1px solid var(--border,#ccd4dc);border-radius:var(--radius-control,4px);display:grid;gap:var(--space-3)}
.guide-image-edit img {max-width:100%;height:140px;object-fit:contain;justify-self:start}
[data-guide-captions] {display:grid;gap:var(--space-3)}

.guide-actions {flex:none;display:flex;gap:var(--space-2)}
.guide-actions .icon-action {flex:none}

.guide-actions svg {flex:none}

/* User invitations reuse the compact table actions. */
.user-invite-action {display:inline-flex;margin:0 0 0 var(--space-2);vertical-align:middle}
.user-invite-action svg {width:var(--text-section);height:var(--text-section);flex:none}

/* Deliverable details use the shared table type and spacing. */
.deliverable-detail { display: block; white-space: normal; max-width: 36ch; margin-top: var(--space-1); }

/* Shared inline checkbox label, including requirements forms. */
body.pmcp label.form-checkbox{display:flex;align-items:center;gap:var(--space-2);margin:0;font-weight:var(--weight-regular)}
body.pmcp label.form-checkbox input[type=checkbox]{flex:none;width:var(--text-body);height:var(--text-body);min-height:0;margin:0;padding:0}
body.pmcp fieldset.delivery-services-fields{display:grid;gap:var(--space-3)}
.status-badge[class*=allocation-]{background:var(--allocation-bg);color:var(--allocation-ink);border-color:var(--allocation-edge)}
.deliverables-table :is(th,td):first-child{white-space:normal;min-width:14ch}
.delivery-presets + .table-scroll{margin-top:var(--space-4)}

/* Quick-add deliverables share compact button sizes and restored-state colours. */
.delivery-preset-grid{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-2)}
.delivery-preset-grid form{margin:0}
.delivery-preset-grid .button{display:inline-flex;align-items:center;gap:var(--space-2)}
.delivery-preset-grid svg{width:var(--text-body);height:var(--text-body);flex:none}

/* Deliverable row controls use the same compact table scale as accommodation. */
.delivery-inline-form{display:inline-flex;margin:0;align-items:center;max-width:100%}
body.pmcp .delivery-inline-form :is(input,select){height:var(--control-compact-height);min-height:var(--control-compact-height);padding:var(--space-1) var(--space-2);font-size:var(--text-small);margin:0;max-width:24ch}
body.pmcp .button.delivery-progress{background:var(--allocation-bg);color:var(--allocation-ink);border-color:var(--allocation-edge);white-space:nowrap;min-width:12ch}
body.pmcp .button.delivery-progress:hover{background:var(--allocation-bg);color:var(--allocation-ink);filter:brightness(.95)}
body.pmcp td .button.delivery-notes-trigger{width:auto;min-width:var(--table-action-size);gap:var(--space-1)}
.delivery-notes-trigger svg{flex:none}
.delivery-notes-dialog{width:min(40rem,90vw)}
.delivery-comment-list article{padding:var(--space-3) 0;border-bottom:1px solid var(--border)}
.delivery-comment-list article p{margin:0 0 var(--space-1);white-space:pre-wrap;overflow-wrap:anywhere}
.delivery-note-preview{position:fixed;margin:0;width:24rem;max-width:calc(100vw - 2rem);max-height:20rem;overflow:auto;background:var(--paper);color:var(--ink);border:1px solid var(--border);border-radius:var(--radius-control);padding:var(--space-3);box-shadow:0 8px 24px #13233c40;font-size:var(--text-small)}

body.pmcp .people-filters>.crew-status-filter{flex:0 0 auto;min-width:0}
body.pmcp .people-filters>.crew-status-filter select{width:auto}
/* One crew editor, using the shared connected tabs and control spacing. */
body.pmcp #crew-detail{width:min(1100px,calc(100vw - 2 * var(--dialog-padding)));max-width:none}
body.pmcp .crew-editor{margin-top:var(--space-4)}
body.pmcp .crew-editor .content-tabs{display:flex}
body.pmcp .crew-editor .content-tabs a{flex:1;min-width:max-content}
body.pmcp .crew-editor-panel{padding:var(--panel-padding);border:1px solid var(--border);border-radius:0 0 var(--radius) var(--radius);background:var(--paper)}
body.pmcp .crew-editor-panel>.panel{margin:0;padding:0;border:0;box-shadow:none}
body.pmcp .crew-editor-panel>.person-form{margin:0;max-width:none}
body.pmcp .crew-editor .crew-profile-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-3)}
body.pmcp .crew-editor .crew-profile-fields>:is(.person-notes-label,.dialog-actions){grid-column:1/-1}
body.pmcp .crew-profile-form>.dialog-actions{margin-top:var(--space-4)}
body.pmcp .people-table [data-person-status="blacklisted"] td{background:#151515;color:#fff}
body.pmcp .people-table [data-person-status="blacklisted"] :is(.crew-type-tag,.crew-light,.icon-action){background:#151515;color:#fff;border-color:#aaa}
body.pmcp .people-table [data-person-status="blacklisted"] .icon-action:hover{background:#383838;color:#fff}
body.pmcp .people-table [data-person-status="blacklisted"] .icon-action:focus-visible{outline-color:#fff}
body.pmcp .people-table [data-person-status="archived"] td{background:#e5e5e5;color:#686868}

/* Ask MCP: desktop, non-modal planning conversation. */
.pmcp #mcp-assistant .assistant-launcher{position:fixed;right:var(--space-5);bottom:var(--space-5);z-index:900;display:flex;align-items:center;gap:var(--space-2);border-radius:24px;box-shadow:0 4px 18px #17253c40}
.pmcp .assistant-launcher svg{width:22px;height:22px}
.pmcp #assistant-panel{position:fixed;inset:auto var(--space-5) 80px auto;margin:0;width:460px;height:min(640px,calc(100vh - 160px));padding:0;border:1px solid var(--border);border-radius:12px;background:var(--paper);color:var(--ink);box-shadow:0 12px 48px #17253c50;font-size:var(--text-body);overflow:hidden}
.pmcp #assistant-panel:popover-open{display:flex;flex-direction:column}
.pmcp .assistant-header{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-4);background:linear-gradient(120deg,#193148,#353c72);color:#fff}
.pmcp .assistant-header>div{flex:1}
.pmcp .assistant-header h2{font-size:var(--text-detail);margin:0;color:inherit}
.pmcp .assistant-header p{margin:var(--space-1) 0 0;font-size:var(--text-small)}
.pmcp .assistant-context{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-3);border-bottom:1px solid var(--border)}
.pmcp .assistant-context label{margin:0;font-size:var(--text-control)}
.pmcp .assistant-context select{flex:1;min-width:0;height:var(--control-compact-height);font-size:var(--text-control)}
.pmcp .assistant-messages{flex:1;overflow-y:auto;min-height:120px;padding:var(--space-4);background:var(--canvas)}
.pmcp .assistant-message{padding:var(--space-3);margin-bottom:var(--space-3);border:1px solid var(--border);border-radius:8px;background:var(--paper);overflow-wrap:anywhere}
.pmcp .assistant-message-user{margin-left:var(--space-5);background:var(--accent-tint)}
.pmcp .assistant-message strong{font-size:var(--text-small)}
.pmcp .assistant-message p{white-space:pre-wrap;margin:var(--space-2) 0;line-height:var(--line-copy)}
.pmcp .assistant-message small{display:block;color:var(--muted);margin-top:var(--space-2)}
.pmcp .assistant-message a{max-width:100%;white-space:normal;margin:var(--space-1)}
.pmcp .assistant-suggestions{display:flex;gap:var(--space-1);padding:var(--space-3) var(--space-3) 0}
.pmcp .assistant-suggestions button{flex:1;min-width:0;padding-inline:var(--space-2)}
.pmcp .assistant-compose{display:flex;align-items:flex-end;gap:var(--space-2);margin:0;padding:var(--space-3)}
.pmcp .assistant-compose textarea{flex:1;min-width:0;min-height:64px;height:64px;max-height:140px;resize:vertical;font-size:var(--text-body);margin:0}
.pmcp .assistant-footnote{font-size:var(--text-small);color:var(--muted);margin:0;padding:0 var(--space-3) var(--space-2)}

.pmcp #assistant-panel .assistant-header .button{color:#fff;background:#ffffff15;border:1px solid #ffffff70;box-shadow:none}
.pmcp #assistant-panel .assistant-header .button:hover{color:#fff;background:#ffffff30}
.pmcp #assistant-panel .assistant-header .button svg{width:18px;height:18px}
