/* Presentation only: existing dialogs own loading, saving and dismissal.
   Popover calendars and inline forms are deliberately excluded. */
:root{--ui-field-radius:12px;--ui-field-border:#eaded8;--ui-field-bg:#fffdfb;--ui-field-text:#4c403b;--ui-label:#776962;--ui-focus:#f38c7f;--ui-focus-ring:#f5776c18;--ui-gap:8px;--ui-field-gap:10px;--ui-soft:#fff3ed;--ui-selected:#f48e7c;--ui-selected-text:#b75e4e;--ui-body-size:14px;--ui-control-size:13px;--ui-label-size:12px;--ui-control-height:38px}
/* Discoverable workspace entry points; primary, dangerous and disabled actions
   retain their stronger/semantic styles. No dimensions or handlers change. */
html body.app-shell :is(button,a.button):is([aria-haspopup="dialog"],[data-popup-menu],[data-list-tools-open],[data-schedule-settings-open],[data-education-help],[data-education-popup],[data-education-preview],[data-intake-open],[data-vacancy-open],[data-oneoff-popup]):not(.primary,.danger,.danger-button,:disabled,[aria-disabled="true"],[data-intake-open="intakeCleanup"]){background:var(--ui-soft);border-color:var(--ui-selected);color:#9c4438;font-weight:700}
html body.app-shell :is(button,a.button):is([aria-haspopup="dialog"],[data-popup-menu],[data-list-tools-open],[data-schedule-settings-open],[data-education-help],[data-education-popup],[data-education-preview],[data-intake-open],[data-vacancy-open],[data-oneoff-popup]):not(.primary,.danger,.danger-button,:disabled,[aria-disabled="true"],[data-intake-open="intakeCleanup"]):is(:hover,[aria-expanded="true"]){background:#ffe5db;border-color:#e77c69;color:#87392e}
/* All internal families, including asynchronous fragments and iframe forms. */
html body dialog.ui-popup:modal{min-width:0;min-height:0;padding:20px;max-height:calc(100dvh - var(--ui-popup-top,clamp(12px,8dvh,72px)) - 12px)}
html body dialog.ui-popup:modal .ui-popup-title{font-size:20px!important;line-height:1.4;letter-spacing:-.4px;margin:0 0 10px;color:var(--text,#302c2b);font-weight:700}
html body dialog.ui-popup:modal .ui-popup-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin:0 0 12px;flex-shrink:0}
html body dialog.ui-popup:modal .ui-popup-head .ui-popup-title{margin:0}
html body dialog.ui-popup.ui-popup-headerless:modal>.ui-popup-title,html body dialog.ui-popup.ui-popup-headerless:modal>form>.ui-popup-title{padding-right:62px;min-height:30px}
html body dialog.ui-popup:modal .ui-popup-corner-close{position:absolute;right:20px;top:20px}
html body dialog.ui-popup:modal .ui-popup-close{flex:none;min-height:30px;padding:4px 11px;margin:0;border:1px solid var(--ui-field-border);border-radius:16px;background:#fff;color:var(--ui-label);font-size:12px;font-weight:600;line-height:20px}
html body dialog.ui-popup:modal .ui-popup-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--ui-field-border);background:transparent}
html body dialog.ui-popup:modal :is(.ui-popup-actions,.actions,.form-actions)>:is(button,.button){border-radius:var(--ui-field-radius)}
html body dialog.ui-popup:modal :is(input,select,textarea){box-sizing:border-box;max-width:100%}
html body dialog.ui-popup:modal :is(input,select,textarea,button,.button){font-family:inherit}
/* Native button and anchor defaults differ. Shared action chrome, not the
   calendar/document body, owns typography and single-line action labels. */
html body dialog.ui-popup:modal :is(.ui-popup-actions,.ui-popup-page-tabs)>:is(button,.button){font-size:var(--ui-control-size);font-weight:700;line-height:20px;white-space:nowrap}
html body dialog.ui-popup:modal .ui-popup-actions>:is(button,.button):not(.ui-popup-close){box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;min-height:var(--ui-control-height)}
html body dialog.ui-popup:modal .slot-fields>a.button{align-self:end;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;min-height:var(--ui-control-height);font-size:var(--ui-control-size);font-weight:700;line-height:20px}
html body dialog.ui-popup:modal a.button{white-space:nowrap}
html body dialog.ui-popup:modal .field{min-width:0;font-size:var(--ui-control-size)}
html body dialog.ui-popup:modal .field>label{font-size:var(--ui-label-size);font-weight:600;line-height:18px}
html body dialog.ui-popup:modal>:is(div,form,section){min-width:0;max-width:100%;box-sizing:border-box}
html body dialog.ui-popup:modal .schedule-action-dialog{min-width:0;max-width:100%;padding:0}
html body dialog.ui-popup:modal .charge-receipt-modal-content{padding:0}
html body dialog.ui-popup.send-modal:modal .send-modal-head{padding:0 0 12px;background:transparent}
html body dialog.ui-popup.send-modal:modal .send-modal-toolbar{padding:8px 0}
html body dialog.ui-popup.send-modal:modal .send-modal-body{padding:0;gap:12px}
html body dialog.ui-popup.send-modal:modal .send-modal-footer{padding:12px 0 0;background:transparent}
html body dialog.ui-popup-fit:modal{height:fit-content!important;overflow:visible}
html body dialog:modal iframe.ui-popup-fit-frame{display:block;flex:none!important;min-height:0!important;width:100%;border:0}
html body dialog.education-dialog:not(:has([data-preview-stage]:not([hidden]))):modal{height:fit-content}
html body dialog.education-dialog:not(.ui-popup-fit):not(:has([data-preview-stage]:not([hidden]))) iframe{height:180px;flex:none}
html.ui-popup-embedded,html.ui-popup-embedded body{min-height:0!important;height:auto!important}
html.ui-popup-embedded body{margin:0!important;display:block!important;background:#fff!important}
html.ui-popup-embedded .app-main{margin:0!important;min-height:0!important;width:100%!important}
html.ui-popup-embedded :is(.sidebar,.sidebar-overlay,.topbar){display:none!important}
html.ui-popup-embedded main{min-height:0!important;padding:0!important}
html.ui-popup-embedded .page-head[hidden]{display:none!important}
html.ui-popup-embedded .education-popup-body{padding:0!important}
html.ui-popup-embedded .internal-popup-body{padding:0!important}
html.ui-popup-embedded :is(h1,h2){font-size:20px;line-height:1.4;margin:0 0 12px}
html.ui-popup-embedded :is(.actions,.form-actions){display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-top:12px;padding-top:12px;border-top:1px solid var(--ui-field-border)}
html.ui-popup-embedded :is(.actions,.form-actions,footer)>:is(button,.button){border-radius:var(--ui-field-radius)}
html.ui-popup-embedded :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){box-sizing:border-box;border-radius:var(--ui-field-radius);border-color:var(--ui-field-border);background:var(--ui-field-bg);color:var(--ui-field-text)}
html.ui-popup-embedded label{color:var(--ui-label)}
/* Compact shared generic forms, including embedded older field templates. */
html.ui-popup-embedded .field{min-width:0;font-size:var(--ui-control-size)}
html.ui-popup-embedded .field>label{font-size:var(--ui-label-size);font-weight:600;line-height:18px}
html.ui-popup-embedded .field :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),select:not([multiple])){height:var(--ui-control-height);min-height:var(--ui-control-height);font:inherit;width:100%}
html.ui-popup-embedded .field :is(input[type=checkbox],input[type=radio]),html body dialog.ui-popup:modal .field :is(input[type=checkbox],input[type=radio]){width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;max-width:16px!important;max-height:16px!important;padding:0;margin:0;flex:0 0 16px;accent-color:var(--ui-selected)}
html.ui-popup-embedded main>form.card{border:0;box-shadow:none;padding:0;background:transparent}
html.ui-popup-embedded .education-field :is(input[type=checkbox],input[type=radio]),html body dialog.ui-popup:modal .education-field :is(input[type=checkbox],input[type=radio]){width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;max-width:16px!important;max-height:16px!important;margin:0;padding:0;flex:0 0 16px;accent-color:var(--ui-selected)}
html body.education-popup-body .education-record-form :is(input[type=checkbox],input[type=radio]){width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;max-width:16px!important;max-height:16px!important;margin:0;padding:0;flex:0 0 16px;accent-color:var(--ui-selected)}
.ui-popup-page-tabs{display:flex;gap:8px;margin:0 0 12px}
.ui-popup-page-tabs[hidden],html body dialog.ui-popup :is(.ui-popup-head,.ui-popup-actions)[hidden]{display:none!important}
.ui-popup-page-tabs button{flex:1;border-radius:12px;border:1px solid var(--ui-field-border);background:#fff;color:var(--ui-label);min-height:38px}
.ui-popup-page-tabs button[aria-pressed=true]{background:var(--ui-soft);border-color:var(--ui-selected);color:var(--ui-selected-text);box-shadow:0 0 0 1px var(--ui-selected)}
[data-popup-pages]>[data-popup-page][hidden]{display:none!important}
.ui-popup-reader-nav{align-items:center;justify-content:space-between}
.ui-popup-reader-nav button{flex:none;padding:5px 12px;min-height:32px}
.ui-popup-reader-nav span{font-size:12px;color:var(--ui-label)}
html.ui-popup-embedded [data-popup-embedded-title]{display:none}
html.ui-popup-embedded .education-form-grid{gap:10px}
@media(max-width:560px){html.ui-popup-embedded .education-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}html.ui-popup-embedded .education-field{grid-column:auto;min-width:0}html.ui-popup-embedded .education-field :is(input,select){min-width:0;width:100%}html body dialog.ui-popup .education-dialog-head>strong{width:auto}html body dialog.ui-popup .education-dialog-head{flex-wrap:nowrap}}
@media(max-width:560px),(max-height:550px){html body dialog.ui-popup:modal{padding:14px}html body dialog.ui-popup:modal .ui-popup-head{gap:8px;margin-bottom:10px}html body dialog.ui-popup:modal .ui-popup-actions{padding-top:8px;margin-top:8px}}
@media(max-width:560px),(max-height:550px){html body dialog.ui-popup:modal .ui-popup-corner-close{top:14px;right:14px}}
@media(min-width:761px) and (max-height:550px){html body #quickPaymentDialog.ui-popup #quickPaymentService{margin-right:60px}}
html body dialog:modal{box-sizing:border-box;inset:var(--ui-popup-top,clamp(12px,8dvh,72px)) 0 auto!important;margin:0 auto!important;border:1px solid #fff8!important;border-radius:22px!important;background:#fff!important;color:var(--text,#302c2b);box-shadow:0 24px 80px #24161436!important;max-width:calc(100vw - 24px);max-height:calc(100dvh - var(--ui-popup-top,clamp(12px,8dvh,72px)) - 12px);animation:popup-enter .18s cubic-bezier(.2,.75,.3,1) both}
html body dialog:modal::backdrop{background:rgb(25 22 21 / 55%)!important;backdrop-filter:blur(3px)!important}
html body dialog:modal :is(h2,h3){letter-spacing:-.4px}
/* Inputs share the chooser's warm surfaces without changing field dimensions,
   financial calendars, table layout, or the native work-day popover. */
html body dialog:modal :where(input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]):not([type=button]):not([type=range]):not([type=color]),select,textarea){border-color:var(--ui-field-border);border-radius:var(--ui-field-radius);background:var(--ui-field-bg);color:var(--ui-field-text);box-shadow:none;transition:border-color .14s,background .14s,box-shadow .14s}
html body dialog:modal :is(input,select,textarea):focus{outline:none;border-color:var(--ui-focus);background:#fff;box-shadow:0 0 0 3px var(--ui-focus-ring)}
html body dialog:modal label{color:var(--ui-label)}
html body dialog:modal :is(.vacancy-workspace>header,.intake-panel-head,.page-head){gap:12px}
html body dialog:modal :is(.vacancy-workspace>header h3,.intake-panel-head h2){font-size:20px;line-height:1.4;margin:0}
html body dialog:modal :is(.oneoff-edit-head,.service-management-head,.education-dialog-head){gap:12px}
html body dialog:modal :is(.oneoff-edit-head h3,.service-management-head h2,.education-dialog-head h2){font-size:20px;line-height:1.4;margin:0}
html body dialog:modal :is(.oneoff-edit-footer,.service-management-actions,.expense-policy-actions){padding-top:12px;border-top:1px solid #f1e7e1;gap:var(--ui-gap)}
html body dialog:modal .slot-form>footer{padding-top:12px;border-top:1px solid #f1e7e1}
html body dialog:modal :is(.slot-fields,.oneoff-edit-fields,.service-management-fields){gap:var(--ui-field-gap)}
html body dialog:modal :is(.assignment-time-button,.quick-slot){border-radius:9px;background:#fffaf7;border-color:#efded6}
html body dialog:modal :is(.assignment-time-button,.quick-slot):hover{background:#fff0e9;border-color:#efa99c}
html body dialog:modal :is(.assignment-time-button.selected,.quick-slot.selected){background:#fff0e9;border-color:#ee8c79;color:#af5949;box-shadow:0 0 0 1px #ee8c79}
html body dialog:modal button{white-space:nowrap}
html body dialog:modal :is([data-intake-close],[data-vacancy-close],[data-service-close],[data-oneoff-close],.payment-detail-close){border-radius:16px;padding:4px 11px;min-height:30px}
html body dialog:modal :is([data-education-close],[data-education-help-close],[data-expense-close],[data-expense-policy-close],[data-revoke-close],.booking-menu-close){border-radius:16px;padding:4px 11px;min-height:30px}
html body dialog:modal :is(button,a):focus-visible{outline:2px solid var(--primary,#f5776c);outline-offset:2px}
body:has(dialog:modal){overflow:hidden}
@keyframes popup-enter{from{opacity:0;transform:translateY(9px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-width:560px){html body dialog:modal{border-radius:19px!important}}
@media(prefers-reduced-motion:reduce){html body dialog:modal{animation:none!important}}
.popup-choice-source{position:absolute!important;clip-path:inset(50%);width:1px!important;height:1px!important;overflow:hidden!important;padding:0!important;margin:0!important;border:0!important}
.popup-choice-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:6px 0 12px}
html body dialog:modal .popup-choice-option{display:flex;align-items:center;justify-content:flex-start;gap:9px;padding:8px 10px;min-height:50px;margin:0;background:#fff;border:1px solid #eee1db;border-radius:13px;color:#776962;font-size:13px;font-weight:650;transition:background .14s,border-color .14s}
html body dialog:modal .popup-choice-option:hover{background:#fff7f2;border-color:#f4b8ab}
html body dialog:modal .popup-choice-option[aria-pressed=true]{background:var(--ui-soft);border-color:var(--ui-selected);color:var(--ui-selected-text);box-shadow:0 0 0 1px var(--ui-selected)}
.popup-choice-option .booking-menu-icon{width:30px;height:30px;border-radius:10px}.popup-choice-option .booking-menu-icon svg{width:19px;height:19px}
@media(max-width:560px),(max-height:550px){.popup-choice-options{gap:6px;margin:5px 0 8px}html body dialog:modal .popup-choice-option{gap:6px;padding:5px 7px;min-height:42px;font-size:12px}.popup-choice-option .booking-menu-icon{width:25px;height:25px}}
@media(prefers-reduced-motion:reduce){html body dialog:modal :is(input,select,textarea,.popup-choice-option){transition:none}}
@media(max-width:560px),(max-height:550px){html body dialog:modal :is(.oneoff-edit-head h3,.service-management-head h2,.education-dialog-head h2){font-size:17px}html body dialog:modal :is(.slot-fields,.oneoff-edit-fields,.service-management-fields){gap:8px}html body dialog:modal :is(.oneoff-edit-footer,.service-management-actions,.expense-policy-actions){padding-top:8px}}
