/* Compact header controls; keep the Bridge’s existing colors and shapes. */
body > header.bridge-header .bridge-header-actions button:not(#bridgePendingReviews){
 font:600 11px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif!important;
 padding:3px 9px!important;min-height:26px;height:auto;min-width:0;
}

/* Shared icon controls retain the original gold shield and neutral full-screen icon. */
html[data-bridge-theme] body>header.bridge-header #themeSwitch{width:24px;height:28px;min-height:28px!important;padding:0!important;margin:0 0 0 4px!important;background:none!important;border:0!important;box-shadow:none!important;flex:none}
html[data-bridge-theme] #themeSwitch .bridge-theme-fill{fill-opacity:0}
@media(hover:hover){html[data-bridge-theme] #themeSwitch:hover .bridge-theme-fill{fill-opacity:1}}
html[data-bridge-theme] #themeSwitch:focus-visible .bridge-theme-fill{fill-opacity:1}
body>header.bridge-header .bridge-header-actions #bridgeFullscreenToggle{width:28px;min-width:28px;padding:4px!important;display:inline-flex;align-items:center;justify-content:center}
body>header.bridge-header #bridgeFullscreenToggle svg{width:16px;height:16px}
html body>header.bridge-header #connectionStatus{box-sizing:border-box;width:100%;text-align:right;font:400 9px/1.25 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;margin:2px 0 0;padding:0;min-height:0}
html body>header.bridge-header #connectionStatus.status-error{font-size:12px}
html body>header.bridge-header #connectionStatus:empty{display:none}
html body>header.bridge-header .bridge-header-status:has(#execution[hidden]):not(:has(#superExecution,#adminMessage)){display:none}

body>header.bridge-header #oldBridgeCommanderLink[hidden]{display:none!important}body>header.bridge-header #oldBridgeCommanderLink{font:600 11px/1.4 -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif;padding:3px 9px;min-height:26px;box-sizing:border-box;text-decoration:none;display:inline-flex;align-items:center}

html[data-bridge-theme] #themeSwitch .bridge-theme-outline{stroke:#ad9667!important;stroke-width:1px!important;vector-effect:non-scaling-stroke;stroke-linejoin:round}html[data-bridge-theme] #themeSwitch .bridge-theme-fill{fill:#ad9667!important}

html body>header.bridge-header #bridgeLoadingSpeed{display:block!important;box-sizing:border-box;width:100%;text-align:right;font:400 9px/1.25 -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif!important;color:#929292!important;margin:2px 0 0;padding:0;min-height:12px;order:0}

/* Keep a stable message slot below the header: no page movement on updates. */
html body>header.bridge-header #connectionStatus,html body>header.bridge-header #connectionStatus:empty{display:block!important;box-sizing:border-box;height:16px;min-height:16px;max-height:16px;margin:0;padding:0;line-height:16px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}

/* Align the full-screen glyph with the divider, moving the action group together. */
html body>header.bridge-header .bridge-header-row{padding-left:18px!important;padding-right:12px!important}

html body>header.bridge-header .bridge-header-feedback{position:relative;display:block;width:100%;height:28px;min-height:28px;box-sizing:border-box}
html body>header.bridge-header .bridge-header-feedback #bridgeLoadingSpeed{position:absolute;top:0;right:0;width:auto;margin:2px 0 0}
html body>header.bridge-header .bridge-header-feedback #connectionStatus{position:absolute;inset:auto 0 0 0;width:100%}
html body>header.bridge-header .bridge-header-feedback .bridge-header-status{position:absolute;inset:0 100px 0 0;display:block!important;height:28px;min-height:28px;max-height:28px;overflow:hidden;padding-top:2px;padding-bottom:2px}
html body>header.bridge-header .bridge-header-feedback:has(#connectionStatus:not(:empty)) .bridge-header-status{visibility:hidden}

/* Loading time blends into the header and shares the shield's inset. */
html[data-bridge-theme] body.bridge-header-page>header.bridge-header{background:inherit!important}
html body>header.bridge-header .bridge-header-feedback,html body>header.bridge-header .bridge-header-feedback :is(#bridgeLoadingSpeed,#connectionStatus,.bridge-header-status){background:transparent!important;box-shadow:none!important;border:0!important}
html body>header.bridge-header .bridge-header-feedback #bridgeLoadingSpeed{right:18px;color:#9000ff!important}
@media(max-width:650px){html body>header.bridge-header .bridge-header-feedback #bridgeLoadingSpeed{right:18px}}

/* Align the divider with the portal surface, inside the body’s 18px padding. */
html body.bridge-header-page>header.bridge-header .bridge-header-line{margin-inline:18px}
html body>header.bridge-header .bridge-header-title{font-size:14px!important}
html[data-bridge-theme] body>header.bridge-header #bridgeWordmarkTheme{display:inline-flex;align-items:center;justify-content:center;width:24px;height:28px;min-height:28px;padding:0!important;margin:0!important;flex:none;background:none!important;border:0!important;box-shadow:none!important;cursor:pointer}
#bridgeWordmarkTheme svg{display:block;width:24px;height:28px}
#bridgeWordmarkTheme .bridge-theme-outline{fill:none;stroke:#ad9667;stroke-width:1px;vector-effect:non-scaling-stroke;stroke-linejoin:round}
#bridgeWordmarkTheme .bridge-theme-fill{fill:#ad9667;fill-opacity:0}
@media(hover:hover){#bridgeWordmarkTheme:hover .bridge-theme-fill{fill-opacity:1}}
#bridgeWordmarkTheme:focus-visible .bridge-theme-fill{fill-opacity:1}
@media(max-width:1050px){html body>header.bridge-header .bridge-header-title{font-size:12px!important}}

html body>header.bridge-header .bridge-header-feedback #connectionStatus{top:2px;bottom:auto;left:18px;right:150px;width:auto;text-align:left;font-size:11px;line-height:16px}
html body>header.bridge-header .bridge-header-status{display:none!important}
:is(.admin-status,.own-time-status,.crew-feedback,.delivery-message,.artist-tasks-message,#planningMessage,#projectDataMessage,#projectSupervisionStatus,#financialsMessage,#financialsStatus,#proposalStatus,#commanderClientsStatus,#supplierStatus,#crewRatesStatus){position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%);white-space:nowrap!important}
@media(max-width:650px){html body>header.bridge-header .bridge-header-feedback #connectionStatus{left:18px;right:110px;font-size:10px}}

html body>header.bridge-header #connectionStatus button{font:inherit;line-height:inherit;min-height:0;padding:0 4px;margin:0 4px;border:0;background:transparent;color:inherit;text-decoration:underline}

/* Ordered header actions; the wordmark shield remains the theme toggle. */
html[data-bridge-theme] body>header.bridge-header #themeSwitch{display:none!important}
html body>header.bridge-header #oldBridgeCommanderLink{order:10}
html body>header.bridge-header #bridgeViewAs{order:20}
html body>header.bridge-header #cloudSignOut{order:30}
html[data-bridge-theme] body>header.bridge-header #bridgeFullscreenToggle{order:40;background:transparent!important;border:0!important;box-shadow:none!important;color:#9000ff!important;border-radius:0!important}


/* Match the divider's full width and origin, not the length of the reminder.
   Divider inset:18px; status insets:18px/150px (18px/110px on small screens). */
html body>header.bridge-header #connectionStatus .status-advisory{display:block;background-image:var(--gradient,linear-gradient(90deg,#ff6600,#ff0048 40%,#db00ad 65%,#9000ff));background-size:calc(100% + 132px) 100%;background-position:0 0;background-repeat:no-repeat;background-clip:text;-webkit-background-clip:text;color:transparent!important;-webkit-text-fill-color:transparent;font-weight:400}
@media(max-width:650px){html body>header.bridge-header #connectionStatus .status-advisory{background-size:calc(100% + 92px) 100%;background-position:0 0}}

/* Phone branding shares the top row; account actions span the row below. */
@media(max-width:650px){
 html body.bridge-header-page>header.bridge-header{--bridge-logo-width:200px}
 html body>header.bridge-header .bridge-header-row{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;align-items:start;gap:6px 8px;min-height:0;padding:4px 8px!important}
 html body>header.bridge-header .bridge-header-row>.brand{grid-column:1;grid-row:1;min-width:0;align-self:center;box-sizing:border-box;padding:6px 4px}
 html body>header.bridge-header .bridge-header-row>.brand img{width:100%!important;max-width:200px!important;min-width:0}
 html body>header.bridge-header .bridge-header-title{grid-column:2;grid-row:1;order:0;flex-basis:auto;justify-self:end;align-self:center;box-sizing:border-box;padding:6px 4px;font-size:12px!important;letter-spacing:1px;white-space:nowrap}
 html body>header.bridge-header .bridge-brand-wordmark{gap:4px}
 html[data-bridge-theme] body>header.bridge-header #bridgeWordmarkTheme{position:static;transform:none;width:26px;height:30px;min-height:30px}
 html body>header.bridge-header #bridgeWordmarkTheme svg{width:26px;height:30px}
 html body>header.bridge-header .bridge-header-title .bridge-brand-shield{width:26px;height:30px}
 html body>header.bridge-header .bridge-header-actions{grid-column:1/-1;grid-row:2;align-self:start;display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px;width:100%;min-width:0;margin:0}
 html body>header.bridge-header .bridge-header-actions>:is(button,#oldBridgeCommanderLink){flex:1 1 0;justify-content:center;white-space:nowrap}
 html body>header.bridge-header .bridge-header-actions:empty{display:none}
 html[data-bridge-theme] body>header.bridge-header .bridge-header-actions :is(button:not(#bridgePendingReviews),#oldBridgeCommanderLink){font-size:10px!important;line-height:16px!important;padding:3px 6px!important;min-height:26px;height:auto}
 html[data-bridge-theme] body>header.bridge-header .bridge-header-actions #bridgeFullscreenToggle{display:none!important}
 html[data-bridge-theme] body.bridge-header-page>header.bridge-header .bridge-header-actions #bridgeViewAsNotice{position:static;transform:none;order:50;flex-basis:100%;width:100%;max-width:100%;height:auto;min-height:26px;justify-content:flex-end}
 html[data-bridge-theme] body.bridge-header-page>header.bridge-header .bridge-header-actions #bridgeViewAsNotice>button{font-size:16px!important}
 html body.bridge-header-page>header.bridge-header .bridge-header-line{margin-inline:8px}
 html body>header.bridge-header .bridge-header-feedback{height:24px;min-height:24px}
 html body>header.bridge-header .bridge-header-feedback :is(#connectionStatus,#bridgeLoadingSpeed){top:4px;bottom:auto;margin:0;padding:0;height:16px;min-height:16px;max-height:16px;font-size:10px!important;line-height:16px!important}
 html body>header.bridge-header .bridge-header-feedback #connectionStatus{left:8px;right:102px}
 html body>header.bridge-header .bridge-header-feedback #bridgeLoadingSpeed{right:8px}
}
