/* Personal preview, enabled only after the authenticated employee is resolved. */
:is(body,#worker-urban-theme)[data-worker-halloween-preview] {
  background: #032333 !important; isolation: isolate; min-height: 100svh;
}
:is(body,#worker-urban-theme)[data-worker-halloween-preview]::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(#0715231a,#0715231a),#032333 url('/assets/worker-halloween-pumpkins-v1.webp') center bottom / cover no-repeat;
}
:is(body,#worker-urban-theme)[data-worker-background="urban"][data-worker-halloween-preview]::before {
  background-image: linear-gradient(#0715231a,#0715231a),url('/assets/worker-halloween-pumpkins-v1.webp');
  background-position: center bottom;
}
body[data-worker-halloween-preview] .halloween-header-web {
  position: absolute; top: 0; right: 0; width: 80px; height: 80px;
  background: url('/assets/worker-halloween-web-v1.svg?v=2') center / contain no-repeat;
  transform: rotate(90deg); opacity: .33; pointer-events: none; z-index: 0;
}
body:not([data-worker-halloween-preview]) .halloween-header-web { display: none; }
:is(body,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-preview] .portal-head[data-studio-header] {
  position: relative; overflow: hidden !important; background: linear-gradient(110deg,#163932ed,#244740de) !important;
  border: 1px solid #e4a54e88 !important;
}
body[data-worker-halloween-preview] .portal-head .walker-identity,
body[data-worker-halloween-preview] .portal-head .walker-menu-btn { position: relative; z-index: 1; }
body[data-worker-halloween-preview] :is(.primary-btn,.home-quick-card,.tool-card,.walker-menu-btn) {
  position: relative; overflow: hidden;
}
body[data-worker-halloween-preview] :is(.primary-btn,.home-quick-card,.tool-card,.walker-menu-btn)::after {
  content: ''; position: absolute; top: 0; right: 0; width: 27px; height: 27px;
  background: url('/assets/worker-halloween-web-v1.svg?v=2') center / contain no-repeat;
  transform: rotate(90deg); opacity: .4; pointer-events: none;
}
:is(body,#worker-urban-theme)[data-worker-background="urban"][data-worker-halloween-preview] #portalPanel :is(.home-summary-card,.home-quick-card) {
  background: #09222dbd !important;
  border-color: #bba27366 !important;
  backdrop-filter: blur(3px);
  box-shadow: 0 4px 14px #00000020;
}
:is(body,#worker-urban-theme)[data-worker-background="urban"][data-worker-halloween-preview] #portalPanel :is(.home-summary-card,.home-quick-card) strong { color: #fff6e8 !important; }
:is(body,#worker-urban-theme)[data-worker-background="urban"][data-worker-halloween-preview] #portalPanel :is(.home-summary-card,.home-quick-card) small,
:is(body,#worker-urban-theme)[data-worker-background="urban"][data-worker-halloween-preview] #portalPanel .home-summary-card > span { color: #e1e8e9 !important; }
:is(body,#worker-urban-theme)[data-worker-background="urban"][data-worker-halloween-preview] #portalPanel .home-quick-card:hover { background: #103643e8 !important; }
:is(body,#worker-urban-theme)[data-worker-background="urban"][data-worker-halloween-preview] #portalPanel .home-quick-icon { background: #fff6e8ee !important; }
:is(body,#worker-urban-theme)[data-worker-background="urban"][data-worker-halloween-preview] #portalPanel .home-overview-head { margin-bottom: 12px; }
:is(body,#worker-urban-theme)[data-worker-background="urban"][data-worker-halloween-preview] #portalPanel .home-quick-head { margin-top: 16px; }
/* Keep alerts inside the clipped card and clear of the decorative web. */
body[data-worker-halloween-preview] .home-quick-badge {
  top: 6px; right: 6px; min-width: 24px; height: 24px;
  box-sizing: border-box; padding: 0 5px;
  background: #b92f3f; color: #fff; border: 2px solid #fff0d6;
  font-size: 15px; line-height: 1; z-index: 3;
  box-shadow: 0 2px 6px #0006;
}
body[data-worker-halloween-preview] .home-quick-card:has(.home-quick-badge:not([hidden])) { padding-right: 36px; }
body[data-worker-halloween-preview] .home-quick-card:has(.home-quick-badge:not([hidden]))::after { display: none; }
/* Seasonal navigation: unchanged sizing and safe-area clearance. */
:is(body,#worker-urban-theme)[data-worker-background="urban"][data-worker-halloween-preview] .worker-bottom-nav {
  background: #09222df5 !important; border-color: #c18b4b88 !important;
  box-shadow: 0 -4px 18px #0005; backdrop-filter: blur(12px);
}
:is(body,#worker-urban-theme)[data-worker-background="urban"][data-worker-halloween-preview] .worker-bottom-nav button {
  color: #efe4d6 !important; background: transparent !important;
}
:is(body,#worker-urban-theme)[data-worker-background="urban"][data-worker-halloween-preview] .worker-bottom-nav button:is(.is-active,:hover) {
  color: #ffcf91 !important; background: #f4a34022 !important;
  box-shadow: inset 0 0 0 1px #efa34b77;
}
:is(body,#worker-urban-theme)[data-worker-background="urban"][data-worker-halloween-preview] .worker-bottom-nav button.is-active::before { background: #ffb659; }
:is(body,#worker-urban-theme)[data-worker-background="urban"][data-worker-halloween-preview] .worker-bottom-nav button[data-tab] svg {
  color: #edbc83; background: #ffffff0c;
}
:is(body,#worker-urban-theme)[data-worker-background="urban"][data-worker-halloween-preview] .worker-bottom-nav button.is-active svg { color: #ffca83; background: #f4a3401a; }
body[data-worker-halloween-preview] .worker-bottom-nav button:focus-visible { outline-color: #ffca83; }
/* Appearance choice is deliberately available in both preview styles. */
.worker-theme-settings[hidden] { display: none !important; }
.worker-theme-settings { display: flex; align-items: center; gap: 10px; padding: 12px; margin: 0 0 12px; border: 1px solid #d5e5e0; border-radius: 14px; background: #eef7f3; color: #183e40; }
.worker-theme-icon { display: grid; place-items: center; flex: 0 0 36px; height: 36px; border-radius: 11px; background: #f4ac5520; font-size: 23px; }
.worker-theme-copy { flex: 1; min-width: 0; }
.worker-theme-settings .worker-theme-copy h3 { margin: 0 0 3px; font: 700 14px/1.3 system-ui,sans-serif; color: inherit !important; }
.worker-theme-settings .worker-theme-copy p { margin: 0; font: 400 12px/1.35 system-ui,sans-serif; color: inherit; opacity: .8; }
.worker-theme-toggle { position: relative; flex: 0 0 52px; width: 52px; min-height: 44px; padding: 0; border: 0; background: transparent !important; cursor: pointer; touch-action: manipulation; }
.worker-theme-toggle::before { content: ''; position: absolute; inset: 7px 0; border-radius: 20px; background: #6c898b; border: 1px solid #466968; }
.worker-theme-toggle span { position: absolute; top: 11px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px #0003; transition: transform .18s ease; }
.worker-theme-toggle[aria-checked="true"]::before { background: #f4ac55; border-color: #c78432; }
.worker-theme-toggle[aria-checked="true"] span { transform: translateX(22px); background: #342514; }
.worker-theme-toggle:focus-visible { outline: 3px solid #d98b2b; outline-offset: 3px; border-radius: 20px; }
@media (prefers-reduced-motion: reduce) { .worker-theme-toggle span { transition: none; } }
.worker-theme-settings h3 { margin: 2px 0 4px; font-size: 17px; }
.worker-theme-settings p { margin: 0 0 10px; font-size: 13px; }
.worker-theme-settings .eyebrow { font-size: 10px; color: #55736d; }
.worker-theme-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.worker-theme-options button { position: relative; min-width: 0; min-height: 44px; padding: 10px; border: 1px solid #aac8c0; border-radius: 10px; background: #fff; color: #24483e; font: 700 14px/1.3 system-ui,sans-serif; cursor: pointer; }
.worker-theme-options button[aria-pressed="true"] { background: #165d50; color: #fff; border-color: #165d50; }
.worker-theme-options button:focus-visible { outline: 3px solid #ea9c42; outline-offset: 2px; }
.worker-theme-prompt { box-sizing: border-box; width: min(360px,calc(100% - 32px)); padding: 24px 20px 20px; border: 1px solid #c18b4b; border-radius: 22px; background: #102e35; color: #fff5e8; text-align: center; box-shadow: 0 16px 60px #0008; }
.worker-theme-prompt::backdrop { background: #03131bc4; backdrop-filter: blur(5px); }
.worker-theme-prompt h2 { margin: 8px 0; font-size: 25px; color: #fff5e8; }
.worker-theme-prompt p { margin: 0 0 20px; font-size: 14px; line-height: 1.5; color: #e2dace; }
.worker-theme-pumpkin { font-size: 40px; }
.worker-theme-options .worker-theme-yes { overflow: hidden; background: #f4ac55; color: #291b10; border-color: #ffcf91; }
.worker-theme-yes::after { content: ''; position: absolute; top: 0; right: 0; width: 32px; height: 32px; background: url('/assets/worker-halloween-web-v1.svg?v=2') center/contain no-repeat; transform: rotate(90deg); pointer-events: none; }
.worker-theme-yes::after { filter: brightness(.3); opacity: .8; }
body[data-worker-halloween-eligible] .worker-profile-view .worker-theme-settings { display: none; }
:is(body,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-eligible] .walker-menu-drawer:not(.worker-profile-view) {
  width: min(560px,calc(100vw - 24px)); box-sizing: border-box; padding: 14px !important;
  max-height: calc(100dvh - 116px - env(safe-area-inset-bottom)); overflow-y: auto; overflow-x: hidden;
  bottom: calc(90px + env(safe-area-inset-bottom)); border-radius: 20px !important;
}
:is(body,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-eligible] .walker-menu-drawer:not(.worker-profile-view) .walker-menu-head {
  padding: 0 0 12px !important; margin: 0 !important; background: transparent !important; border: 0 !important;
}
:is(body,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-eligible] .walker-menu-head h2 { font-size: 23px; color: #183e40 !important; }
body[data-worker-halloween-eligible] .walker-menu-head .eyebrow { display: none; }
body[data-worker-halloween-eligible] .walker-menu-drawer:not(.worker-profile-view) .tool-grid { grid-template-columns: minmax(0,1fr); gap: 7px; }
:is(body,#worker-urban-theme,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-eligible] .walker-menu-drawer:not(.worker-profile-view) .tool-card {
  grid-template-columns: 36px minmax(0,1fr); min-height: 62px !important; padding: 9px 10px !important; gap: 10px; border-radius: 12px !important; margin: 0; box-shadow: none !important;
}
body[data-worker-halloween-eligible] .walker-menu-drawer:not(.worker-profile-view) .tool-card strong { font-size: 14px; line-height: 1.3; margin-bottom: 3px; }
body[data-worker-halloween-eligible] .walker-menu-drawer:not(.worker-profile-view) .tool-card small { font-size: 12px; line-height: 1.35; }
:is(body,#worker-urban-theme,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-preview] .walker-menu-drawer:not(.worker-profile-view) { background: #0c2730f5 !important; border: 1px solid #ad8655 !important; }
:is(body,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-preview] .walker-menu-head h2 { color: #fff5e8 !important; }
body[data-worker-halloween-preview] .worker-theme-settings { background: #193942; border-color: #967955; color: #fff5e8; }
body[data-worker-halloween-preview] .worker-theme-settings .eyebrow { color: #e6bd87; }
:is(body,#worker-urban-theme,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-preview] .walker-menu-drawer:not(.worker-profile-view) .tool-card { background: #17353e !important; border: 1px solid #a58c6955 !important; }
:is(body,#worker-urban-theme,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-preview] .walker-menu-drawer .tool-card strong { color: #fff5e8 !important; }
:is(body,#worker-urban-theme,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-preview] .walker-menu-drawer .tool-card small { color: #dce6e5 !important; }
/* Keep the drawer header and appearance switch from shrinking off-screen. */
:is(body,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-eligible] #walkerMenuDrawer {
  top: auto !important; bottom: calc(90px + env(safe-area-inset-bottom)) !important;
  max-height: calc(100dvh - 116px - env(safe-area-inset-bottom)) !important;
}
body[data-worker-halloween-eligible] #walkerMenuDrawer > * { flex-shrink: 0; }
:is(body,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-preview] #walkerMenuDrawer .worker-theme-settings h3 { color: #fff5e8 !important; }
:is(body,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-eligible] .worker-theme-options button[aria-pressed="true"] { background: #165d50 !important; color: #fff !important; border-color: #165d50 !important; }
:is(body,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-preview] .worker-theme-options button[aria-pressed="true"] { background: #f4ac55 !important; color: #291b10 !important; border-color: #ffcf91 !important; }
:is(body,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-eligible] #workerThemePrompt { background: #102e35 !important; color: #fff5e8 !important; padding: 24px 20px 20px !important; }
:is(body,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-eligible] #workerThemePrompt h2 { color: #fff5e8 !important; font-size: 25px !important; }
:is(body,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-eligible] #workerThemePrompt .worker-theme-yes { background: #f4ac55 !important; color: #291b10 !important; }
/* The same artwork and navigation follow the selected theme into services.
   Forms stay light for legibility, including their existing validation colors. */
:is(body,#worker-urban-theme,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-preview] :is(.employee-week-card,.portal-section,.employee-action-card,.panel-card,.card-surface,.glass-card,.metric-card,.schedule-card,.case-hero,.comment-card,.notification-panel,.sign-card,.panel,.form-section,.hld-route-card,.hld-stop-card,.request-card,.worker-visible-name-form,.employee-modal-section,.legal-block,.essential-detail,.selected-summary,.catalog-item,.product-card,.activation-card) {
  background: #fff9efed !important; border-color: #bd945e !important;
  box-shadow: 0 5px 18px #0003 !important;
}
:is(body,#worker-urban-theme,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-preview] :is(.employee-hero,.hero-card,.voice-header,.mobile-topbar,.topbar,.hld-header,.sign-header,.hero-panel)[data-studio-header],
:is(body,#worker-urban-theme,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-preview] :is(.employee-hero,.hero-card,.voice-header,.mobile-topbar,.topbar,.hld-header,.sign-header,.hero-panel) {
  background: linear-gradient(110deg,#163932ed,#244740de) !important; border-color: #bd945e !important;
  color: #fff5e8 !important;
}
:is(body,#worker-urban-theme,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-preview] :is(.employee-hero,.hero-card,.voice-header,.mobile-topbar,.topbar,.hld-header,.sign-header,.hero-panel) :is(h1,h2,h3,.eyebrow,.section-label) { color: #fff5e8 !important; }
:is(body,#worker-urban-theme,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-preview] :is(.employee-hero,.hero-card,.voice-header,.mobile-topbar,.topbar,.hld-header,.sign-header,.hero-panel) :is(p,small,.subtitle) { color: #e1e8e9 !important; }
:is(body,#worker-urban-theme,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-preview] .worker-profile-view { background: #0c2730f5 !important; border-color: #ad8655 !important; }
:is(body,#worker-urban-theme,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-preview] .worker-profile-view .tool-card { background: #17353e !important; border-color: #a58c6955 !important; }
body[data-worker-halloween-preview] .worker-profile-view .worker-profile-name { background: #193942; color: #fff5e8; }
body[data-worker-halloween-preview] .worker-profile-view .worker-theme-settings { display: none; }
:is(body,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-preview] #walkerMenuDrawer .walker-menu-head h2 { color: #fff5e8 !important; }
:is(body,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-preview] #walkerMenuDrawer .walker-menu-head { background: transparent !important; border: 0 !important; padding: 0 0 12px !important; }
:is(body,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-preview] #walkerMenuDrawer .worker-theme-settings .eyebrow { color: #e6bd87 !important; }
:is(body,#worker-urban-theme,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-preview] .portal-head[data-studio-header] { background: #163932ed !important; }
:is(body,#worker-urban-theme,#dashcontrol-studio-theme#dashcontrol-studio-theme)[data-worker-halloween-preview] .portal-head[data-studio-header] :is(h1,h2,h3,.eyebrow,.hero-copy) { color: #fff5e8 !important; }
@media print {
  body[data-worker-halloween-preview]::before { display: none !important; }
  body[data-worker-halloween-preview] .worker-bottom-nav { display: none !important; }
}
