/* Shared spacing, typography and section boundaries. Loaded after feature styles. */
:root{--ui-gap:16px;--ui-font:Arial,Helvetica,sans-serif;--ui-section-line:#c8d1dc}
html[data-theme=dark]{--ui-section-line:#405164}
body{font-family:var(--ui-font);line-height:1.45}
button,input,select,textarea,summary{font-family:inherit}
.app-shell h1{font-size:24px;line-height:1.25;font-weight:700}
.app-shell h2,.dialog-card h2{font-size:20px;line-height:1.3;font-weight:700}
.app-shell h3,.dialog-card h3{font-size:16px;line-height:1.4;font-weight:600}
.app-shell .btn,.app-shell .admin-nav-btn{font-weight:600}
body .host-role-preview,body #adminView,body #employeeView,body #ratesView{width:calc(100% - 32px);max-width:1920px;box-sizing:border-box}
body .host-role-preview{margin:12px auto 0;padding:8px 16px;min-height:52px}
body #adminView,body #employeeView,body #ratesView{padding-top:16px;font-size:14px}
#adminView>.topbar,#employeeView>.employee-header,#ratesView>.topbar{min-height:68px;padding:12px 16px;margin:0 0 var(--ui-gap);box-sizing:border-box}
#adminView>#adminNav{margin:0 0 var(--ui-gap);padding:8px;gap:6px}
#adminView>[data-admin-page],#adminView>#projectsSection,#adminView>#overviewDashboard{margin-top:0}
#adminView>.card:not(.admin-nav),#adminView>#projectsSection{border:1px solid var(--ui-section-line)}
.section-heading{gap:12px;margin-bottom:16px}
.section-heading h2,.section-heading h3{margin:0}
#employeeView .header-logo,#adminView .header-logo,#ratesView .header-logo{max-width:180px;max-height:38px}
#employeeView #myProjectAssignmentsPanel{margin:0 0 16px}
#inlinePersonnel{border:1px solid var(--ui-section-line);border-radius:14px;padding:16px;margin-block:16px;background:var(--surface-solid)}
#inlinePersonnel>section,#inlinePersonnel>.personnel-form{padding-block:16px;margin:0;border-top:1px solid var(--ui-section-line)}
#inlinePersonnel>.personnel-form:first-of-type{border-top:0;padding-top:0}
#inlinePersonnel h3{margin:0 0 12px}
#inlinePersonnel form>.btn,#inlinePersonnel form>.planning-grid+.btn{margin-top:12px}
#inlinePersonnel label{display:flex;flex-direction:column;gap:6px}
#inlinePersonnel :is(input,select){border-color:var(--ui-section-line)}
#peopleSection[data-workspace=review] :is(#inlinePersonnel,#staffProfileDetails){display:none!important}
#peopleSection:is([data-workspace=review],[data-workspace=report]) .staff-profile-header{padding:12px;border:1px solid var(--ui-section-line);border-radius:12px;background:var(--surface-solid);margin-bottom:12px;flex-shrink:0}
#peopleSection:is([data-workspace=review],[data-workspace=report]) #adminEmployeeName{font-size:20px;margin:0}
#peopleSection:is([data-workspace=review],[data-workspace=report]) #staffIdentityAvatar{width:52px;height:64px;min-height:0}
#peopleSection:is([data-workspace=review],[data-workspace=report]) .profile-stat{padding:4px 8px}
#peopleSection:is([data-workspace=review],[data-workspace=report]) #adminEditor{display:flex;flex-direction:column;min-height:0;overflow:hidden}
#adminView #peopleSection:is([data-workspace=review],[data-workspace=report])>.admin-panel:last-child{overflow:hidden!important}
#peopleSection:is([data-workspace=review],[data-workspace=report]) #staffReportsViewport{overflow:auto;min-height:180px;overscroll-behavior:contain}
.venue-row{display:grid;grid-template-columns:minmax(140px,1fr) minmax(180px,1.4fr) auto auto;gap:12px;align-items:center}
.venue-row>input{min-width:0}
.dialog-card{scrollbar-width:none;clip-path:inset(0 round 20px)}
.dialog-card::-webkit-scrollbar{display:none}
@media(max-width:760px){
 :root{--ui-gap:12px}
 body .host-role-preview,body #adminView,body #employeeView,body #ratesView{width:calc(100% - 16px)}
 body #adminView,body #employeeView,body #ratesView{padding-top:12px}
 .app-shell h1{font-size:20px}.app-shell h2{font-size:18px}
 #adminView>.topbar,#employeeView>.employee-header{padding:10px 12px;min-height:60px}
 .venue-row{grid-template-columns:1fr auto}.venue-row>input{grid-column:1/-1}
 #inlinePersonnel{padding:12px}
 #peopleSection:is([data-workspace=review],[data-workspace=report]) #staffReportsViewport{max-height:65dvh}
 #peopleSection:is([data-workspace=review],[data-workspace=report]) .staff-profile-header{position:sticky;top:0;z-index:2}
}

/* The dialog owns the rounded frame; only its inner card scrolls. */
dialog.dialog{overflow:hidden;scrollbar-width:none;box-sizing:border-box;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px)}
dialog.dialog[open]{display:flex;flex-direction:column}
dialog.dialog>.dialog-language{flex:0 0 auto}
dialog.dialog>.dialog-card{flex:0 1 auto;min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scroll-padding-block:16px;box-sizing:border-box}
@media(max-width:760px){
 dialog.dialog{max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);padding:8px}
 dialog.dialog>.dialog-card{padding-bottom:max(16px,env(safe-area-inset-bottom))}
 body .dialog-card :is(input,select,textarea){font-size:16px;min-width:0;max-width:100%}
 #registrationConsentRow .checkbox-label{display:block;line-height:1.5}
 #registrationConsentRow input{width:18px;height:18px;min-height:0;vertical-align:middle;margin-right:6px}
 #registerForm .dialog-actions-right{flex-wrap:wrap}
 #registerForm .dialog-actions-right .btn{min-height:44px;white-space:normal}
}
dialog.dialog::-webkit-scrollbar{display:none}
#notificationsDialog{width:min(900px,calc(100vw - 24px));padding:0;border-radius:20px}
#notificationsDialog .dialog-card{width:100%;max-width:none;box-sizing:border-box;max-height:calc(100dvh - 24px);overflow:auto;margin:0}
body:has(dialog[open]){overflow:hidden}

#peopleSection[data-workspace=review] #staffPayments{display:none}
/* A report opened from an event uses the same bounded frame as review. */
#adminView:has(#peopleSection[data-workspace=report])>.accreditation-controls{display:none!important}
@media(min-width:1001px){
 body #adminView:has(#peopleSection:is([data-workspace=review],[data-workspace=report]):not(.hidden)){height:calc(100dvh - 12px);min-height:0!important;padding-bottom:12px}
 body:has(.host-role-preview:not(.hidden)) #adminView:has(#peopleSection:is([data-workspace=review],[data-workspace=report]):not(.hidden)){height:calc(100dvh - 76px)}
 #adminView #peopleSection:is([data-workspace=review],[data-workspace=report]){grid-template-rows:minmax(0,1fr);overflow:hidden}
 #adminView #peopleSection:is([data-workspace=review],[data-workspace=report])>.admin-panel{height:100%!important;min-height:0!important;max-height:none!important;resize:none;box-sizing:border-box;overflow:hidden!important}
 #peopleSection:is([data-workspace=review],[data-workspace=report]) #staffReportsViewport{min-height:0}
}

#notificationItems .notification-item.has-project,#notificationItems .notification-item.has-project>p{color:var(--event-text)}
html:has(dialog[open]){overflow:hidden}
.staff-extra-filters,.review-period-disclosure{border:1px solid var(--ui-section-line);border-radius:10px;padding:8px;margin-bottom:8px}
.staff-extra-filters summary,.review-period-disclosure summary{font-size:13px;font-weight:600;cursor:pointer}
.staff-extra-filters[open]>.staff-filter-grid{margin-top:10px}
#peopleSection[data-workspace=review] #reviewQueueStatus{margin:2px 0}
#peopleSection[data-workspace=review] #adminAddEmployeeBtn{display:none!important}
#peopleSection[data-workspace=review] .admin-report-filters{margin:0}

#peopleSection[data-workspace=review]>.admin-panel:first-child>.section-heading{margin-bottom:8px}
#peopleSection[data-workspace=review]>.admin-panel:first-child>.staff-filter-grid{margin:0 0 8px}
#peopleSection[data-workspace=review] :is(.staff-extra-filters,.review-period-disclosure){padding:6px 8px;margin-bottom:6px}
#peopleSection[data-workspace=review] :is(.staff-extra-filters,.review-period-disclosure)>summary{padding:0;min-height:20px;line-height:20px}
#peopleSection[data-workspace=review] #reviewQueueControls{gap:6px;margin-bottom:6px}
#peopleSection[data-workspace=review] #reviewQueueControls>.checkbox-label{margin:0;padding:0;min-height:22px}
#peopleSection[data-workspace=review] #employeeAdminList{margin-top:4px;min-height:100px}
#peopleSection[data-workspace=review] #reviewNext{min-height:34px;padding:6px 8px}

.app-shell :is(.entry-card,.venue-summary,.personnel-inline),.dialog-card :is(input,select,textarea){border-color:var(--ui-section-line)}
.app-shell .btn-ghost,.dialog-card .btn-ghost{border:1px solid var(--ui-section-line);box-shadow:none}
html:not([data-theme=dark]) .app-shell{--muted:#626d7b}
.staff-extra-filters>summary:focus-visible,.review-period-disclosure>summary:focus-visible{outline:2px solid #3275a8;outline-offset:3px}

.production-grid .rehearsal-toggle{display:flex;flex-direction:row;align-items:center;gap:8px;align-self:end;min-height:42px}.production-grid .rehearsal-toggle input{width:18px;min-height:18px;height:18px;margin:0;flex:0 0 18px}

/* Keep intermediate default views hidden until the requested route is ready. */
html.navigation-restoring #bootView{display:grid!important}
html.navigation-restoring #adminView,html.navigation-restoring #employeeView,html.navigation-restoring #ratesView{visibility:hidden!important}

/* Quiet form chrome and aligned task controls. */
.project-task-plan,.production-task>.production-grid{align-items:start}
.project-task-plan>label,.production-task>.production-grid>label{display:flex;flex-direction:column;gap:6px;line-height:20px}
.task-duration-input{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:8px;border:0;padding:0;margin:0;min-width:0}
.task-duration-input legend{line-height:20px;margin:0 0 6px;padding:0}
.task-duration-input label{position:relative;display:block!important}
.task-duration-input input{height:42px;padding-right:36px}
.task-duration-input .duration-unit{position:absolute;right:10px;top:11px;font-size:12px;color:var(--muted);pointer-events:none}
.project-task-plan>label>input,.production-task input{height:42px}
.draft-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}
.draft-toolbar p{margin:0;font-size:12px}.draft-toolbar .btn{padding:6px 10px;font-size:12px}
.equipment-heading>span{display:none}
body :is(input,select,textarea).field-invalid{border:1px solid #c53d42!important;box-shadow:none!important}
#peopleSection .employee-list :is(button,.employee-card){font-size:14px;line-height:1.45}
#peopleSection .employee-list strong{font-size:14px;font-weight:650}
#peopleSection .employee-list small{font-size:12px;font-weight:400}


.task-duration-input input{appearance:textfield;-moz-appearance:textfield}.task-duration-input input::-webkit-inner-spin-button{appearance:none}


/* Shared controls and type scale across directory, review and planning. */
:root{--ui-body:14px;--ui-small:12px;--ui-control-height:40px;--ui-control-radius:9px;--ui-hover:#edf3f9}
html[data-theme=dark]{--ui-hover:#243345}
body :is(#adminView,#employeeView,#ratesView,.dialog-card){font-size:var(--ui-body);line-height:1.45}
body :is(#adminView,#employeeView,#ratesView,.dialog-card) .btn{font-size:var(--ui-body);font-weight:600;line-height:1.4;border-radius:var(--ui-control-radius)}
body :is(.planning-grid,.production-grid,.production-filters,.staff-filter-grid,#reviewQueueControls,.profile-grid) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]),select){font-size:var(--ui-body);min-height:var(--ui-control-height);box-sizing:border-box;border-radius:var(--ui-control-radius);line-height:1.4}
body :is(.planning-grid,.production-grid,.production-filters,.staff-filter-grid,#reviewQueueControls,.profile-grid) textarea{font-size:var(--ui-body);line-height:1.45;border-radius:var(--ui-control-radius)}
#adminView #peopleSection #employeeAdminList .employee-row{padding:10px 12px!important;border-radius:10px!important;min-height:60px!important;box-shadow:none;line-height:1.45}
#adminView #peopleSection #employeeAdminList .employee-row strong{font-size:14px!important;line-height:20px!important;font-weight:600!important}
#adminView #peopleSection #employeeAdminList .employee-row span{font-size:12px!important;line-height:18px!important;font-weight:400!important;color:var(--muted)!important;margin-top:3px!important}
#adminView #peopleSection .staff-filter-grid :is(input,select),#adminView #reviewQueueControls :is(input[type=date],input[type=month]){font-size:14px!important;height:40px!important;min-height:40px!important;padding:8px 10px}
#adminView #peopleSection :is(.staff-filter-grid,#reviewQueueControls) label{font-size:13px;font-weight:500;line-height:1.45}
.task-section-heading{position:sticky;top:0;z-index:6;display:flex;align-items:center;justify-content:flex-start;gap:12px;flex-wrap:wrap;padding:10px 0;background:var(--surface-solid,#fff);border-bottom:1px solid var(--line);margin-bottom:12px}
.task-section-heading h3{margin:0}.task-section-heading .btn{flex:none;min-height:40px;padding:8px 16px}
.project-task-plan,.production-task{scroll-margin-top:76px}
html[data-theme=dark] :is(.shift-place-options,.distribution-pick,.distribution-role-dialog){background:var(--surface-solid);color:var(--text);border-color:var(--ui-section-line)}
html[data-theme=dark] :is(.shift-place-options strong,.equipment-hall-settings>p,.staff-choice-card span){color:var(--muted)}
html[data-theme=dark] :is(.shift-place-options button:hover,.shift-place-options button:focus,.distribution-pick-event:hover,.distribution-date-button:hover,.distribution-cell[data-assign-day]:hover){background:var(--ui-hover);color:var(--text)}
html[data-theme=dark] :is(.distribution-pick-event,.distribution-add){background:#202d3b;color:var(--text);border-color:var(--ui-section-line)}
html[data-theme=dark] .distribution-day-assigned{background:var(--tone-green-bg);color:var(--tone-green-text)}
html[data-theme=dark] .absence-badge{background:var(--tone-red-bg);color:var(--tone-red-text);border-color:var(--tone-red-text)}
html[data-theme=dark] :is(.task-error,.equipment-error,.distribution-remove){color:var(--danger)}
html[data-theme=dark] .staff-card-busy.has-bookings,html[data-theme=dark] .staff-card-busy.has-bookings span{color:var(--tone-amber-text)!important}
html[data-theme=dark] #employeeAdminList .queue-done{background:var(--tone-green-bg)!important;border-color:#42765d!important}
html[data-theme=dark] #employeeAdminList .queue-pending{background:var(--tone-amber-bg)!important;border-color:#806834!important}
html[data-theme=dark] #employeeAdminList .employee-row.active{outline:2px solid #85afd8;outline-offset:-2px}
@media(max-width:600px){.task-section-heading{gap:8px;padding:8px 0}.task-section-heading .btn{width:auto!important}.task-section-heading h3{flex:1;min-width:140px}}

body :is(.app-shell,.dialog-card) .field>label{font-size:13px;font-weight:500;line-height:1.45;color:var(--muted)}
body :is(.app-shell,.dialog-card) .field>:is(input,select,textarea){font-size:14px;line-height:1.45;border-radius:var(--ui-control-radius)}
html[data-theme=dark] :is(.role-inline,.empty-state strong,.sort-head,.sort-head span){color:var(--text)!important}
html[data-theme=dark] .field>label{color:var(--muted)!important}

html[data-theme=dark] #notificationItems .notification-item.has-project{background:color-mix(in srgb,var(--event-border,#7896b3) 18%,#161b22)!important;color:var(--text)}
html[data-theme=dark] #notificationItems .notification-item.has-project>:is(strong,p){color:var(--text)}
html[data-theme=dark] #notificationItems .notification-item .btn-link{color:var(--tone-blue-text)!important}

/* Form rhythm: captions, controls and neutral sections share one spacing scale. */
:root{--form-panel:#f4f6f8;--form-panel-alt:#fafbfc;--form-header:#e9edf2;--form-edge:#cbd3dc}
html[data-theme=dark]{--form-panel:#1d2631;--form-panel-alt:#18212b;--form-header:#273442;--form-edge:#405061}
#projectsSection>.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 16px}
#projectsSection>.section-heading h2{margin:0;line-height:1.3}
#projectsSection .project-inner-tabs{margin:0 0 14px;padding-bottom:12px}
#projectStatus:empty,#calendarStatus:empty{display:none}
#projectCreate{position:relative;padding:0;margin:0}
#projectCreate>summary{min-height:36px;box-sizing:border-box;padding:6px 330px 6px 0;font-size:15px;font-weight:600;line-height:24px}
#projectCreate>.draft-toolbar{position:absolute;right:0;top:0;min-height:36px;max-width:320px;gap:10px;margin:0;padding:0}
#projectCreate>.draft-toolbar p{font-size:12px;max-width:175px;line-height:16px}
#projectCreate>.draft-toolbar p:empty{display:none}
#projectCreate>.draft-toolbar .btn{min-height:32px;height:32px;padding:5px 9px;font-size:12px}
#projectForm{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:10px 0 0}
#projectForm>label{min-width:0;gap:6px;margin:0}
#projectForm>.project-trip-flag{grid-column:1/-1;display:flex;flex-direction:row;align-items:center;gap:12px;min-height:28px}
#projectForm .project-trip-flag>span{display:inline-flex;align-items:center;gap:8px}
#projectForm .project-trip-flag input{margin:0;width:16px;height:16px;min-height:16px}
#projectForm>.production-editor{margin:0;gap:12px}
.production-editor :is(.production-stages,[data-equipment-grid]){margin:0;padding:14px;border:1px solid var(--form-edge);border-radius:12px;background:var(--form-panel)}
.production-editor .production-stages>summary{padding:0 0 10px;margin:0;font-size:15px;font-weight:650}
.production-editor .production-stages:not([open])>summary{padding-bottom:0}
.production-stages>.production-grid{gap:12px;margin:0 0 12px;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));align-items:start}
.production-stages>.production-grid:last-child{margin-bottom:0}
.production-stages>[data-general-period]{grid-template-columns:repeat(2,minmax(0,1fr))}
.production-stages .production-time>span:last-child{gap:8px;grid-template-columns:minmax(0,1fr) 82px}
.rehearsal-schedule{min-width:0;margin:12px 0}
.rehearsal-schedule .rehearsal-toggle{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;font-weight:600}
.rehearsal-schedule .rehearsal-toggle input{width:18px;height:18px;min-height:18px;margin:0}
.rehearsal-schedule fieldset{min-width:0;margin:10px 0 0;padding:12px;border:1px solid var(--form-edge,#ccd3df);border-radius:10px}
.rehearsal-schedule fieldset[hidden]{display:none!important}
.rehearsal-hint{font-size:13px;margin:0 0 10px}
.rehearsal-row{display:grid;grid-template-columns:1fr 1fr auto;align-items:end;gap:12px;margin-bottom:10px}
.rehearsal-boundary{display:grid;grid-template-columns:minmax(130px,1fr) minmax(100px,.65fr);align-items:end;gap:8px;min-width:0}
.rehearsal-boundary label{display:grid;gap:5px;font-size:12px;min-width:0}
.rehearsal-boundary input{width:100%;min-width:0;box-sizing:border-box}
.rehearsal-schedule--compact{min-width:240px}
.rehearsal-schedule--compact .rehearsal-row{grid-template-columns:1fr}
@media(max-width:800px){.rehearsal-row{grid-template-columns:1fr}.rehearsal-row>button{justify-self:start}.rehearsal-boundary{grid-template-columns:minmax(0,1fr) minmax(100px,.65fr)}}
.production-editor .equipment-heading{align-items:center;gap:8px;margin:0 0 12px}
.production-editor .equipment-heading h3{font-size:15px;line-height:22px}
.production-editor .equipment-hall-details{margin:10px 0;padding:10px;background:var(--surface-solid,#fff);border-color:var(--form-edge)}
.production-editor .equipment-hall-details>summary{background:var(--form-header);color:var(--text);border-radius:7px;padding:8px 10px}
.project-tasks-section{border:1px solid var(--form-edge);border-radius:12px;padding:14px;background:var(--form-panel-alt)}
.task-section-heading{position:static;min-height:36px;margin:0 0 12px;padding:0 0 10px;gap:12px;background:transparent;border-color:var(--form-edge)}
.task-section-heading h3{font-size:15px;line-height:22px}
.task-section-heading .btn{min-height:34px;padding:6px 12px}
#projectTaskPlans>.project-task-plan,[data-tasks]>.production-task{margin:0 0 12px;padding:12px;border-color:var(--form-edge);background:var(--surface-solid,#fff);box-shadow:none}
#projectTaskPlans>.project-task-plan:nth-child(odd),[data-tasks]>.production-task:nth-child(odd){background:var(--form-panel)}
#projectTaskPlans>.project-task-plan:last-child,[data-tasks]>.production-task:last-child{margin-bottom:0}
.project-task-plan>[data-remove],.production-task>[data-remove-task]{margin:0;align-self:start;justify-self:start;grid-column:1/-1;min-height:34px;height:34px;padding:6px 10px}
.production-task>.production-grid{margin:0 0 12px;gap:12px}
.task-staff-cards{gap:10px}
.task-staff-cards .staff-assigned{margin:0;padding:10px;background:var(--surface-solid,#fff);border-color:var(--form-edge)}
.task-staff-cards .staff-assigned-list{margin-top:8px;gap:8px}
.task-staff-cards .staff-card-size-controls{margin:0;gap:12px}
.task-staff-cards .staff-card-size-controls label{margin:0}
.project-task-plan .task-staff{margin:0}
.production-task .task-staff{margin:12px 0}
#projectForm>.equipment-create-dock{position:static;margin:0;padding:10px 12px;min-height:48px;box-shadow:none;border-color:var(--form-edge);background:var(--form-header);color:var(--text)}
body .field-caption{display:flex;align-items:center;gap:6px;min-height:20px;line-height:20px}
body .context-help{position:relative;display:inline-flex;flex:none;width:20px;height:20px;margin:0 0 0 6px;padding:0;vertical-align:middle;line-height:20px}
body .context-help>.context-help-trigger{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:20px;height:20px;min-height:20px;min-width:20px;padding:0;margin:0;border:1px solid var(--form-edge);border-radius:50%;background:transparent;color:var(--muted);font:600 12px/18px Arial,sans-serif;cursor:help;box-shadow:none}
body .context-help>.context-help-text{display:none;position:absolute;top:24px;left:0;z-index:50;box-sizing:border-box;width:min(300px,75vw);padding:10px 12px;border:1px solid var(--form-edge);border-radius:9px;background:var(--surface-solid,#fff);color:var(--text,#202733);box-shadow:0 6px 20px #0002;font:400 13px/1.45 Arial,sans-serif;text-align:left;white-space:pre-line}
body .context-help:is(:hover,:focus-within,.is-open)>.context-help-text{display:block}
body .context-help-trigger:focus-visible{outline:2px solid #6b91c8;outline-offset:2px}
body .site-live-notice{position:static;display:inline-flex;align-items:center;max-width:220px;padding:0;margin:0 4px;color:var(--muted);background:none;border:0;border-radius:0;box-shadow:none;font-size:12px;line-height:16px;z-index:auto}
body .site-live-notice[hidden]{display:none}
body :has(dialog[open]) .site-live-notice{display:none}
#adminView .header-logo-desktop,#ratesView .header-logo-desktop,#employeeView .header-logo-desktop{width:190px;max-width:190px;max-height:48px;height:auto;object-fit:contain}
@media(max-width:900px){#projectForm{grid-template-columns:repeat(2,minmax(0,1fr))}.production-stages>.production-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){#projectCreate>summary{padding-right:0}#projectCreate>.draft-toolbar{position:static;max-width:none;justify-content:flex-start;margin:4px 0 8px}#projectCreate>.draft-toolbar p{max-width:none}#projectForm{grid-template-columns:minmax(0,1fr)}.production-stages>.production-grid{grid-template-columns:1fr}.production-editor :is(.production-stages,[data-equipment-grid]),.project-tasks-section{padding:12px}.task-section-heading h3{min-width:0;flex:none}.task-section-heading{flex-wrap:wrap}.context-help-text{max-width:calc(100vw - 48px)}}

/* Directory, review, rates and reference editors use the same control rhythm. */
:is(#peopleSection,#venuesSection,#ratesView){--section-space:16px;--field-space:12px}
#adminView #peopleSection>.admin-panel,#adminView #venuesSection,#ratesView .rates-panel{padding:16px;border-radius:14px;min-width:0;box-sizing:border-box}
:is(#peopleSection,#venuesSection,#ratesView) :is(.section-heading,.rate-module-head){display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin:0 0 16px}
:is(#peopleSection,#venuesSection,#ratesView) :is(h2,h3){margin:0;line-height:1.35}
#ratesView .rate-module-head h2{font-size:20px}
:is(#peopleSection,#venuesSection,#ratesView) .field{display:flex;flex-direction:column;gap:6px;min-width:0;margin:0}
:is(#peopleSection,#venuesSection,#ratesView) :is(.field>label,.planning-grid>label){font-size:13px;line-height:20px;font-weight:500}
:is(#peopleSection,#venuesSection,#ratesView) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]):not([type=file]),select){min-width:0;max-width:100%;height:40px;min-height:40px;box-sizing:border-box;font-size:14px;line-height:20px;padding:8px 10px;border-radius:9px}
:is(#peopleSection,#venuesSection,#ratesView) .btn{min-height:40px;padding:8px 12px;line-height:20px;font-size:14px;border-radius:9px;white-space:normal}
#adminView #peopleSection :is(.staff-extra-filters,.review-period-disclosure){padding:10px 12px;margin:0 0 12px;border-radius:9px;background:var(--form-panel)}
#adminView #peopleSection :is(.staff-extra-filters,.review-period-disclosure)>summary{padding:0;min-height:20px;line-height:20px;font-size:13px;font-weight:600}
#adminView #peopleSection .staff-filter-grid,#adminView #reviewQueueControls{gap:12px;margin:0 0 12px}
#adminView #peopleSection .staff-extra-filters[open]>.staff-filter-grid{margin:12px 0 0}
#adminView #peopleSection #employeeAdminList{gap:8px;margin-top:12px}
#staffProfileDetails .profile-grid{gap:12px;margin-top:12px}
#adminView #peopleSection[data-workspace=directory] #staffProfileDetails>summary{font-size:14px;padding:0;min-height:20px}
#adminView #peopleSection #reviewNext{min-height:40px;padding:8px 12px}
#venuesSection>.admin-summary-filters{display:grid;grid-template-columns:minmax(140px,.65fr) minmax(180px,1fr) minmax(180px,1.2fr) auto;gap:12px;align-items:end;margin:0 0 16px}
#adminView #venuesSection .venue-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr) auto auto;gap:12px;padding:12px;align-items:center;border:1px solid var(--form-edge);border-radius:10px;background:var(--form-panel)}
#venuesSection .venue-row>.venue-suggestions[hidden]{display:none}
#venuesSection .venue-row>.btn{width:auto;grid-column:auto;margin:0}
#venuesSection .venue-row .checkbox-label{margin:0;white-space:nowrap}
#venuesSection :is(#equipmentCatalog,#specialistRoleCatalog,#counterpartyCatalog){margin:16px 0 0;padding:16px;border:1px solid var(--form-edge);border-radius:12px;background:var(--form-panel-alt)}
#venuesSection :is(#equipmentCatalog,#specialistRoleCatalog,#counterpartyCatalog)>:is(h3,details>summary){font-size:16px;font-weight:600}
#venuesSection :is(#equipmentCatalog,#specialistRoleCatalog) .planning-actions-form{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;margin:0 0 8px}
#venuesSection :is([data-catalog-rows],[data-rows]){margin:12px 0}
#venuesSection form>.btn{margin:4px 4px 0 0}
#venuesSection [role=status]:empty{display:none}
#counterpartyCatalog .planning-grid{gap:12px}
#counterpartyCatalog .planning-grid>label{display:grid;gap:6px;min-width:0}
#ratesView .rates-tabs{position:static;display:flex;flex-wrap:wrap;gap:6px;padding:8px;margin:0 0 16px;border-radius:14px;min-width:0}
#ratesView .rates-tab{flex:1 1 180px;min-width:0;min-height:40px;padding:8px 12px;font-size:14px;font-weight:600;border-radius:9px;white-space:normal}
#ratesView :is(.grade-list,.work-reference-list){gap:8px;margin-top:12px}
#ratesView :is(.grade-chip,.work-reference-row){padding:12px;border:1px solid var(--form-edge);border-radius:10px;background:var(--form-panel);box-shadow:none;gap:12px}
#ratesView .ref-name strong,#ratesView .grade-chip strong{font-size:14px;font-weight:600}
#ratesView .work-rule-actions{display:flex;flex-wrap:wrap;gap:8px}
#ratesView .rates-employee-filters{gap:12px;margin:0 0 16px}
#ratesView .rate-inline-editor{gap:12px;padding:12px;margin-top:16px;border:1px solid var(--form-edge);border-radius:10px;background:var(--form-panel-alt);align-items:end}
:is(#venuesSection,#ratesView) .table-wrap{max-width:100%;box-sizing:border-box;overflow:auto;border-radius:10px;margin-top:16px}
#ratesView .summary-table :is(th,td){font-size:14px;line-height:20px;padding:10px 12px}
#ratesView .summary-table th{font-size:12px;text-transform:none;letter-spacing:0}
@media(max-width:760px){
 #adminView #peopleSection:not(.hidden){display:grid;grid-template-columns:minmax(0,1fr);gap:12px;height:auto;overflow:visible}
 #adminView #peopleSection>.admin-panel{height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;resize:none;padding:12px}
 #adminView #peopleSection #adminEditor{height:auto;overflow:visible}
 #adminView #peopleSection #employeeAdminList{max-height:260px;min-height:0;overflow:auto}
 #adminView #peopleSection:is([data-workspace=review],[data-workspace=report]) .staff-profile-header{position:static}
 #adminView #peopleSection #staffReportsViewport{min-height:0;max-height:none;overflow:auto;max-width:100%}
 #adminView #venuesSection,#ratesView .rates-panel{padding:12px}
 #adminView #venuesSection>.admin-summary-filters{grid-template-columns:minmax(0,1fr);gap:12px}
 #adminView #venuesSection .venue-row{grid-template-columns:minmax(0,1fr) auto;gap:12px}
 #venuesSection .venue-row>input{grid-column:1/-1;width:100%}
 #venuesSection :is(#equipmentCatalog,#specialistRoleCatalog,#counterpartyCatalog){padding:12px}
 #counterpartyCatalog .planning-grid{grid-template-columns:minmax(0,1fr)}
 #ratesView .rates-tabs{display:grid;grid-template-columns:minmax(0,1fr);gap:6px}
 #ratesView .rates-employee-filters{display:grid;grid-template-columns:minmax(0,1fr)}
 #ratesView .rates-employee-table :is(table,tbody,tr,td){min-width:0;max-width:100%;box-sizing:border-box;white-space:normal}
 #ratesView .rates-employee-table tr{background:var(--form-panel);border-color:var(--form-edge);box-shadow:none}
 #ratesView .rates-employee-table td::before{font-size:12px;font-weight:500;text-transform:none;letter-spacing:0}
 :is(#peopleSection,#venuesSection,#ratesView) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]),select,textarea){font-size:16px;min-height:44px}
 :is(#peopleSection,#venuesSection,#ratesView) .btn{min-height:44px}
 #adminView #peopleSection .staff-filter-grid :is(input,select),#adminView #reviewQueueControls :is(input[type=date],input[type=month]){font-size:16px!important;height:44px!important}
}
@media(max-width:760px){
 body .host-role-preview{gap:8px;min-width:0}
 body .host-role-preview select{min-width:0;width:auto;flex:1;max-width:100%}
 #adminView>.topbar .brand-heading{padding-right:72px!important;min-width:0}
 #adminView>.topbar .brand-home-btn{flex:none}
 #adminView>.topbar .panel-heading-copy{min-width:0;flex:1}
 #adminView>.topbar .panel-heading-copy h1{white-space:normal;overflow-wrap:anywhere;font-size:18px}
 #ratesView .rates-topbar .topbar-actions{align-items:stretch}
 #ratesView .rates-topbar .topbar-actions>.btn{height:auto;min-height:44px}
}
@media(min-width:761px) and (max-width:1050px){
 #adminView>.topbar,#ratesView>.topbar{position:relative;display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
 #adminView>.topbar .brand-heading{padding-right:80px;min-width:0}
 #adminView #adminServiceMenu{position:absolute;right:12px;top:12px;margin:0}
 #adminView>.topbar .topbar-actions,#ratesView>.topbar .topbar-actions{justify-content:flex-start}
 #adminView>.topbar .panel-heading-copy{min-width:0}
 #adminView>.topbar .panel-heading-copy h1{white-space:normal;overflow-wrap:normal}
}
@media(min-width:761px) and (max-width:1050px){
 #adminView>.topbar,#ratesView>.topbar{display:flex!important;flex-direction:column!important;align-items:stretch!important}
 #adminView>.topbar .brand-heading,#ratesView>.topbar .brand-heading{width:100%;box-sizing:border-box}
 #adminView>.topbar .topbar-actions,#ratesView>.topbar .topbar-actions{width:100%;margin:0;justify-content:flex-start!important}
}
/* Accreditation selection is separate from profile editing. */
body .accreditation-controls{display:block;padding:16px;margin:0 0 16px;border:1px solid var(--form-edge);border-radius:12px;background:var(--form-panel-alt)}
.accreditation-toolbar,.accreditation-selection-tools{display:flex;align-items:end;flex-wrap:wrap;gap:12px}
.accreditation-controls label{display:grid;gap:6px;min-width:0;font-size:13px}
.accreditation-controls :is(input[type=search],select){height:40px;min-width:0;font-size:14px}
.accreditation-controls [data-picker]{margin-top:12px}.accreditation-controls [data-picker][hidden]{display:none}
.accreditation-controls [role=status]:empty{display:none}
.accreditation-people{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:8px;max-height:360px;overflow:auto;margin-top:12px}
.accreditation-people>label{display:flex;align-items:center;gap:10px;border:1px solid var(--form-edge);border-radius:8px;padding:10px;cursor:pointer;background:var(--surface-solid)}
.accreditation-people input{width:18px;height:18px;min-height:18px;flex:none;margin:0}
.accreditation-people strong{font-size:14px;font-weight:600}.accreditation-people small{display:block;color:var(--muted);font-size:12px}
@media(max-width:760px){body .accreditation-controls{padding:12px}.accreditation-toolbar,.accreditation-selection-tools{display:grid;grid-template-columns:minmax(0,1fr)}.accreditation-controls :is(input[type=search],select){font-size:16px;min-height:44px}.accreditation-people{grid-template-columns:minmax(0,1fr)}}

.document-export-panel{margin-top:12px;padding:12px;border:1px solid var(--border,#cbd5e1);border-radius:10px}
.document-export-panel .btn{margin:8px 8px 0 0}
.document-export-panel ul{max-height:180px;overflow:auto;padding-left:24px}
.personnel-inline [data-upload-status],.personnel-dialog [data-upload-status]{overflow-wrap:anywhere}

.document-export-panel .error,[data-upload-status].error{color:var(--danger,#b42318)}

/* A report uses the persisted project palette, also used by planning/calendar. */
.entry-card.has-report-project{border-color:var(--event-border);border-left-width:4px;background:color-mix(in srgb,var(--event-bg) 65%,var(--surface-solid,#fff))}
.venue-summary.has-report-project{border-color:var(--event-border);background:var(--event-bg);color:var(--event-text)}
.report-venue-heading{display:flex;flex-direction:column;gap:3px;min-width:0;overflow-wrap:anywhere}
.report-project-title{display:block}.report-venue-name{display:block;font-weight:500}
#adminReportTableBody tr.has-report-project>td{background:color-mix(in srgb,var(--event-bg) 65%,var(--surface-solid,#fff));border-color:var(--event-border)}
#adminReportTableBody tr.has-report-project>td:first-child{border-left:4px solid var(--event-border)}
html[data-theme=dark] .entry-card.has-report-project,html[data-theme=dark] #adminReportTableBody tr.has-report-project>td{background:color-mix(in srgb,var(--event-border) 16%,#181d23);color:var(--text)}
html[data-theme=dark] .venue-summary.has-report-project{background:color-mix(in srgb,var(--event-border) 24%,#181d23);color:var(--text)}
.participant-costs{min-width:300px}.participant-costs>div{display:inline-block;vertical-align:top;width:33.333%;padding:0 8px 0 0;box-sizing:border-box}.participant-costs>div+div{margin-top:0}.participant-costs small{display:block;color:var(--muted)}
.taxi-route-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:10px 0}
.taxi-route-field{position:relative;min-width:0}.taxi-route-field label{display:block;margin-bottom:6px}
.taxi-route-input{display:flex;gap:4px}.taxi-route-input input{min-width:0;width:100%}.taxi-route-input button{flex:0 0 38px;padding:6px}
.taxi-route-options{position:absolute;top:100%;left:0;right:0;z-index:12;max-height:220px;overflow:auto;background:var(--surface-solid,#fff);border:1px solid var(--line-strong,#abb9cb);border-radius:8px;box-shadow:0 6px 16px #0002}
.taxi-route-options[hidden]{display:none}.taxi-route-options button{display:block;width:100%;border:0;border-radius:0;padding:9px 10px;text-align:left;white-space:normal;background:transparent;color:var(--text);font:inherit}
.taxi-route-options button:hover,.taxi-route-options button:focus{background:var(--surface-soft,#e8eff8)}
.taxi-route-summary{overflow-wrap:anywhere}.taxi-recipient{margin:4px 0;color:var(--muted);font-size:13px}
@media(max-width:520px){.taxi-route-fields{grid-template-columns:1fr}.venue-summary{flex-wrap:wrap}.report-venue-heading{width:100%}}

/* Theme resets must not erase the shared event identity. */
.has-report-project{--report-card-bg:color-mix(in srgb,var(--event-bg) 65%,var(--surface-solid,#fff));--report-venue-bg:var(--event-bg);--report-venue-text:var(--event-text)}
html[data-theme=dark] .has-report-project{--report-card-bg:color-mix(in srgb,var(--event-border) 16%,#181d23);--report-venue-bg:color-mix(in srgb,var(--event-border) 24%,#181d23);--report-venue-text:var(--text)}
html[data-theme] :is(#employeeView,#adminView) .entry-card.has-report-project{background:var(--report-card-bg)!important;border-color:var(--event-border)!important;border-left-width:4px!important}
html[data-theme] :is(#employeeView,#adminView) .venue-summary.has-report-project{background:var(--report-venue-bg)!important;border-color:var(--event-border)!important;color:var(--report-venue-text)!important}
html[data-theme] #adminReportTableBody tr.has-report-project>td{background:var(--report-card-bg)!important;border-color:var(--event-border)!important}
