/* Stable portal chrome and shared view navigation. */
[data-portal-section-title]{font-size:18px;font-weight:800}
main[data-portal-shell]:focus{outline:none}
.mdc-workspace-loading main[data-portal-shell]{cursor:progress;pointer-events:none;opacity:.65;transition:opacity .12s}
.mdc-workspace-loading .mg-top::after,.mdc-workspace-loading .workspace-header::after{content:'';position:absolute;inset:auto 0 0;height:3px;background:#ffe000;animation:mdc-workspace-progress 1s ease-in-out infinite}
@keyframes mdc-workspace-progress{0%,100%{opacity:.35}50%{opacity:1}}
.mg-view-tabs{display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding:4px;border:1px solid #ccdbe2;border-radius:14px;background:#fff;margin:0 0 16px}
.mg-view-tabs a{display:block;padding:10px 20px;border-radius:10px;color:#17262d;text-decoration:none;font-weight:800;white-space:nowrap}
.mg-view-tabs a[aria-current=page]{background:#ffe000;color:#17262d}
.mg-view-tabs a:hover{background:#f1f5f7}.mg-view-tabs a[aria-current=page]:hover{background:#f5d800}
.mg-view-tabs a:focus-visible{outline:3px solid #526bff;outline-offset:1px}
.booking-overview-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:16px 0}
.booking-overview-stats a{display:flex;flex-direction:column;gap:10px;padding:20px;border:1px solid #cfdee5;border-top:4px solid #ffe000;border-radius:14px;background:#fff;text-decoration:none;color:#17262d}
.booking-overview-stats strong{font-size:30px;line-height:1.2}.booking-overview-stats span{font-weight:700}
.booking-overview-notes{padding:20px;background:white;border:1px solid #cfdee5;border-radius:14px;margin:16px 0}
.booking-table-scroll{overflow:auto;border:1px solid #cfdee5;border-radius:12px;background:#fff}
.booking-table-scroll table{width:100%;border-collapse:collapse}.booking-table-scroll th,.booking-table-scroll td{padding:8px 12px;text-align:left;border-bottom:1px solid #e5edf1;white-space:nowrap}
.booking-table-scroll th{background:#f2f6f8;position:sticky;top:0}.booking-table-scroll a{color:#1c4d65;font-weight:700}
.mg-bookings-view .dispatch-date{display:flex;flex-wrap:wrap;align-items:end;gap:10px;margin:12px 0}.mg-bookings-view .dispatch-date label{display:grid;gap:4px}.mg-bookings-view h1{margin:10px 0 16px}
@media(max-width:760px){.mg-view-tabs{gap:2px}.mg-view-tabs a{padding:9px 12px;font-size:13px}.booking-overview-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.booking-overview-stats a{padding:14px}.mg-bookings-view .dispatch-date .button{padding:8px 10px}}
@media(prefers-reduced-motion:reduce){.mdc-workspace-loading .mg-top::after,.mdc-workspace-loading .workspace-header::after{animation:none}}

/* Bookings, Directory, Detailers and Reports use the same compact scale as Marketing. */
body.mdc-management:has([data-compact-workspace]){height:100dvh;overflow:hidden}
body:has([data-compact-workspace]) .mg-page{height:100dvh;display:flex;flex-direction:column;overflow:hidden}
body:has([data-compact-workspace]) .mg-top{flex:none;padding:9px 24px;min-height:58px}
body:has([data-compact-workspace]) #management-main{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;max-width:none;margin:0;padding:12px 24px 8px;overflow:hidden;gap:8px}
body:has([data-compact-workspace]) .mg-footer{display:none}
[data-compact-workspace]>.mg-heading{margin:0;flex:none}
[data-compact-workspace]>.mg-heading .mg-eyebrow,[data-compact-workspace]>.mg-heading>p:last-child{display:none}
[data-compact-workspace]>.mg-heading h1{font-size:25px;line-height:1.2;letter-spacing:-.8px;margin:0}
.mdc-management [data-compact-workspace]>.mg-directory-tabs{display:flex;align-items:center;flex-wrap:wrap;flex:none;width:100%;margin:0;padding:3px;gap:4px;border:1px solid #ccd9de;border-radius:12px;background:#fff}
.mdc-management [data-compact-workspace]>.mg-directory-tabs a{padding:6px 14px;font-size:12px;font-weight:700;line-height:1.6;border:0;border-radius:8px;color:#17262d;text-decoration:none;white-space:nowrap}
.mdc-management [data-compact-workspace]>.mg-directory-tabs a[aria-current=page]{background:#ffe500;color:#17262d}
[data-compact-workspace]>.mg-directory-tabs a:focus-visible{outline:2px solid #17262d;outline-offset:2px}
.pw-content{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain}
.mdc-management .pw-content .button{display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:6px 12px;font-size:12px;line-height:1.6;vertical-align:middle}
.pw-content h2{font-size:17px}.pw-content .mg-card{padding:16px;margin:12px 0}
.pw-content .mg-form-grid{gap:12px}
.pw-content>.mg-search,.pw-content>form.dispatch-date{display:flex;align-items:flex-end;flex-wrap:wrap;margin:0 0 8px;padding:9px 10px;gap:8px;border:1px solid #d4e0e5;border-radius:9px;background:#fff;flex:none}
.pw-content>.mg-search label,.pw-content>form.dispatch-date label{display:flex;flex-direction:column;gap:3px;margin:0;font-size:11px;font-weight:400;flex:1 1 105px;max-width:none;min-width:0}
.pw-content>.mg-search label:first-of-type{flex-basis:180px}
.mdc-management .pw-content>.mg-search input,.mdc-management .pw-content>.mg-search select,.mdc-management .pw-content>form.dispatch-date input,.mdc-management .pw-content>form.dispatch-date select{height:32px;min-height:32px;width:100%;min-width:0;margin:0;padding:5px 28px 5px 9px;font-size:12px;line-height:1.6;border-radius:6px}
.mdc-management .pw-content>.mg-search .button,.mdc-management .pw-content>form.dispatch-date .button{min-height:30px;padding:5px 10px;font-size:11px}
.pw-list{display:flex;flex-direction:column;overflow:hidden;gap:8px}
.pw-list>p{flex:none;margin:0;display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.pw-list>.mg-table-scroll{background:#fff;flex:1;min-height:120px;overflow:auto;margin:0;overscroll-behavior:contain}
.pw-list>.mg-table-scroll th{position:sticky;top:0;z-index:1}
.pw-list>.mg-table-scroll td,.pw-list>.mg-table-scroll th{padding:6px 10px;font-size:12px;line-height:1.5}
.pw-list>.mg-pagination{flex:none;margin:0;gap:8px}
.pw-list .mg-status{padding:3px 8px;font-size:11px}
.pw-document .finance-stats{gap:12px;margin:12px 0}.pw-document .finance-stat{padding:16px}
.pw-content .comparison-presets,.pw-content .chart-type-options{gap:6px;flex-wrap:wrap}
.pw-content .comparison-presets a,.pw-content .chart-type-options a{font-size:12px;padding:6px 12px;min-height:32px}
@media(max-width:760px){
 body:has([data-compact-workspace]) .mg-top{padding:8px 12px;min-height:52px}
 body:has([data-compact-workspace]) #management-main{padding:8px 12px;gap:7px}
 [data-compact-workspace]>.mg-heading h1{font-size:21px}
 .mdc-management [data-compact-workspace]>.mg-directory-tabs a{font-size:11px;text-align:center;padding:5px 6px}
 .mdc-management .pw-content .button{font-size:11px;min-height:30px;padding:5px 8px}
 .pw-content>.mg-search,.pw-content>form.dispatch-date{padding:8px;gap:6px}
 .pw-list>.mg-table-scroll{min-height:100px}
}
@media(max-height:550px){.pw-list{overflow:auto}.pw-list>.mg-table-scroll{flex:none;max-height:60dvh}}

/* Compact booking views retain their operational controls and status colors. */
.mg-bookings-view .booking-overview-stats{gap:10px;margin:10px 0}
.mg-bookings-view .booking-overview-stats a{padding:14px;gap:6px;font-size:12px}
.mg-bookings-view .booking-overview-stats strong{font-size:26px}
.mg-bookings-view .booking-overview-notes{padding:14px;margin:10px 0;font-size:12px}
.mg-bookings-view .booking-table-scroll td,.mg-bookings-view .booking-table-scroll th{padding:6px 10px;font-size:12px;line-height:1.5}
.mg-bookings-view .dispatch-columns{gap:10px}.mg-bookings-view .dispatch-lane{padding:10px}
.mg-bookings-view .dispatch-lane>h2{font-size:14px;margin-bottom:10px}
.mg-bookings-view .dispatch-cards{gap:8px}.mg-bookings-view .dispatch-job{padding:10px}
.mg-bookings-view .dispatch-job h3{font-size:13px;margin:6px 0}
.mg-bookings-view .mdc-calendar-heading{gap:8px;margin:8px 0;flex-wrap:wrap}
.mg-bookings-view .mdc-calendar-heading h2{font-size:17px;margin:4px 0}
.mg-bookings-view .nav-tab-wrapper{margin:8px 0;padding-bottom:8px;gap:6px;flex-wrap:wrap}
.mg-bookings-view .nav-tab{padding:6px 12px;font-size:12px}
.pw-booking-editor .mdc-admin-card{padding:16px}.pw-booking-editor .mdc-admin-columns{gap:12px}
.pw-booking-editor .mdc-admin-fields{gap:10px}
.mdc-management .pw-booking-editor input:not([type=checkbox]):not([type=radio]),.mdc-management .pw-booking-editor select{min-height:34px;padding:6px 10px;font-size:12px}
@media(max-width:760px){.mg-bookings-view .booking-overview-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.mg-bookings-view .booking-overview-stats a{padding:10px}.pw-booking-editor .mdc-admin-card{padding:12px}}
