/*
 * Preview UI tuning
 * Neutralises legacy blue/green filter states, aligns the Settings header,
 * corrects Protection icon colour, and compacts Live actions.
 */

/* Alerts: filter sheet and calendar menu use neutral active states. */
body .phone-shell-wrap.persistent-bottom-nav-shell.events-shell-active
  .reference-alerts-filter-panel
  .reference-alerts-filter-panel-head button,
body .phone-shell-wrap.persistent-bottom-nav-shell.events-shell-active
  .reference-alerts-filter-panel
  .reference-alerts-filter-section > span,
body .phone-shell-wrap.persistent-bottom-nav-shell.events-shell-active
  .reference-alerts-filter-panel
  .reference-alerts-clear-filters {
  color: #f5f5f2 !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.events-shell-active
  .reference-alerts-filter-options button.active,
body .phone-shell-wrap.persistent-bottom-nav-shell.events-shell-active
  .reference-alerts-date-menu button.active {
  border-color: rgba(255, 255, 255, 0.18) !important;
  background: #3a3b38 !important;
  background-image: none !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 22px rgba(0, 0, 0, 0.16) !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.events-shell-active
  .reference-alerts-filter-options button.active *,
body .phone-shell-wrap.persistent-bottom-nav-shell.events-shell-active
  .reference-alerts-date-menu button.active *,
body .phone-shell-wrap.persistent-bottom-nav-shell.events-shell-active
  .reference-alerts-date-menu button.active svg,
body .phone-shell-wrap.persistent-bottom-nav-shell.events-shell-active
  .reference-alerts-date-menu button.active svg * {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.events-shell-active
  .reference-alerts-top-action.active,
body .phone-shell-wrap.persistent-bottom-nav-shell.events-shell-active
  .reference-alerts-filter-action.active {
  border-color: rgba(255, 255, 255, 0.18) !important;
  background: #363734 !important;
  background-image: none !important;
  color: #ffffff !important;
}

/* Settings: use the same 74px header rhythm as Alerts. */
body .phone-shell-wrap.persistent-bottom-nav-shell.settings-main-shell-active
  .app-screen-header {
  min-height: calc(74px + env(safe-area-inset-top, 0px)) !important;
  height: calc(74px + env(safe-area-inset-top, 0px)) !important;
  flex: 0 0 calc(74px + env(safe-area-inset-top, 0px)) !important;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 13px 4px !important;
  grid-template-columns: 42px minmax(0, 1fr) 42px !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.settings-main-shell-active
  .app-screen-header h1 {
  font-size: 19px !important;
  line-height: 1.15 !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.settings-main-shell-active
  .app-screen-header-side,
body .phone-shell-wrap.persistent-bottom-nav-shell.settings-main-shell-active
  .app-screen-header-action,
body .phone-shell-wrap.persistent-bottom-nav-shell.settings-main-shell-active
  .app-screen-header-spacer {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
}

/* Settings: override legacy colour applied directly to Protection SVG paths. */
body .phone-shell-wrap.persistent-bottom-nav-shell.settings-main-shell-active
  .settings-detail-section
  .settings-section-body
  .settings-row-icon {
  color: #a7a8a6 !important;
  background: rgba(255, 255, 255, 0.025) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: none !important;
  filter: none !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.settings-main-shell-active
  .settings-detail-section
  .settings-section-body
  .settings-row-icon svg,
body .phone-shell-wrap.persistent-bottom-nav-shell.settings-main-shell-active
  .settings-detail-section
  .settings-section-body
  .settings-row-icon svg * {
  color: #a7a8a6 !important;
  stroke: #a7a8a6 !important;
  filter: none !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.settings-main-shell-active
  .settings-detail-section
  .settings-section-body
  .settings-row-icon::before,
body .phone-shell-wrap.persistent-bottom-nav-shell.settings-main-shell-active
  .settings-detail-section
  .settings-section-body
  .settings-row-icon::after {
  content: none !important;
  display: none !important;
}

/* Live: retain control affordance while reducing vertical footprint. */
body .phone-shell-wrap.persistent-bottom-nav-shell.live-shell-active
  .live-v3-action-panel {
  min-height: 104px !important;
  height: 104px !important;
  flex: 0 0 104px !important;
  padding: 10px 14px !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.live-shell-active
  .live-v3-action-grid {
  height: 84px !important;
  gap: 10px !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.live-shell-active
  .live-v3-action-card {
  min-height: 84px !important;
  height: 84px !important;
  padding: 7px 10px !important;
  gap: 5px !important;
  border-radius: 16px !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.live-shell-active
  .live-v3-screenshot-icon {
  width: 27px !important;
  height: 27px !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.live-shell-active
  .live-v3-screenshot-icon svg {
  width: 26px !important;
  height: 26px !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.live-shell-active
  .live-v3-record-dot {
  width: 12px !important;
  height: 12px !important;
}


/* September polish: remove the legacy blue plate rendered behind Settings icons. */
body .phone-shell-wrap.persistent-bottom-nav-shell.settings-main-shell-active
  .settings-detail-section
  .settings-section-body
  .settings-row-icon,
body .phone-shell-wrap.persistent-bottom-nav-shell.settings-main-shell-active
  .settings-detail-section
  .settings-section-body
  .settings-row-icon > *,
body .phone-shell-wrap.persistent-bottom-nav-shell.settings-main-shell-active
  .settings-detail-section
  .settings-section-body
  .settings-row-icon svg,
body .phone-shell-wrap.persistent-bottom-nav-shell.settings-main-shell-active
  .settings-detail-section
  .settings-section-body
  .settings-row-icon svg * {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
}

/* Shared notification badge is blue on every header treatment. */
body .phone-shell-wrap .app-screen-header-badge,
body .phone-shell-wrap .preview-reference-bell > i,
body .phone-shell-wrap .reference-home-bell > i,
body .phone-shell-wrap .home-header-alert > i,
body .phone-shell-wrap .locked-home-bell > i,
body .phone-shell-wrap .unified-alert-dot {
  background: #1687ff !important;
  background-color: #1687ff !important;
  box-shadow: 0 0 8px rgba(22, 135, 255, 0.24) !important;
}

/* Live camera selector: blue active label with no underline. */
body .phone-shell-wrap.persistent-bottom-nav-shell.live-shell-active
  .live-v3-camera-tabs button.active {
  color: #1687ff !important;
}

body .phone-shell-wrap.persistent-bottom-nav-shell.live-shell-active
  .live-v3-camera-tabs button.active::after {
  content: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Keep Live action borders neutral across hover and keyboard focus. */
body .phone-shell-wrap.persistent-bottom-nav-shell.live-shell-active
  .live-v3-action-card:hover:not(:disabled),
body .phone-shell-wrap.persistent-bottom-nav-shell.live-shell-active
  .live-v3-action-card:focus-visible:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.105) !important;
  outline: none !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.02),
    0 10px 24px rgba(0, 0, 0, 0.15) !important;
}

/* Shared footer navigation: icon-only, with a blue active icon. */
body .persistent-bottom-nav-shell > .app-primary-bottom-nav button > .bottom-nav-label {
  display: none !important;
}

body .persistent-bottom-nav-shell > .app-primary-bottom-nav button.active,
body .persistent-bottom-nav-shell > .app-primary-bottom-nav button.active .bottom-nav-icon {
  color: #1687ff !important;
}

body .persistent-bottom-nav-shell > .app-primary-bottom-nav button {
  gap: 0 !important;
}

/* Home filters and alert timeline. */
body .persistent-bottom-nav-shell.home-shell-active
  .preview-reference-filters button.active::before {
  background: #1687ff !important;
  box-shadow: 0 0 7px rgba(22, 135, 255, 0.22) !important;
}

body .persistent-bottom-nav-shell.home-shell-active
  .preview-reference-event-list {
  position: relative !important;
}

body .persistent-bottom-nav-shell.home-shell-active
  .preview-reference-event:not(:last-child)::after {
  content: "" !important;
  position: absolute !important;
  z-index: 1 !important;
  left: 35.5px !important;
  top: calc(50% + 23px) !important;
  width: 1px !important;
  height: calc(100% - 36px) !important;
  background: rgba(167, 168, 166, 0.45) !important;
  pointer-events: none !important;
}

body .persistent-bottom-nav-shell.home-shell-active
  .preview-reference-event-icon {
  z-index: 2 !important;
}

body .persistent-bottom-nav-shell.home-shell-active
  .preview-reference-dots {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
}


/* Win over screen-specific legacy active-nav selectors without changing inactive icons. */
html body .phone-shell-wrap.phone-shell-wrap.persistent-bottom-nav-shell.persistent-bottom-nav-shell
  > nav.app-primary-bottom-nav
  > button.active[aria-current="page"]
  > svg.bottom-nav-icon {
  color: #1687ff !important;
}


/* Home spacing and CTA refinement. */
body .persistent-bottom-nav-shell.home-shell-active
  .preview-reference-events-title {
  margin-top: 30px !important;
}

body .persistent-bottom-nav-shell.home-shell-active
  .preview-reference-status {
  height: 68px !important;
  min-height: 68px !important;
  margin-top: 19px !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
  border-radius: 16px !important;
}

body .persistent-bottom-nav-shell.home-shell-active
  .preview-reference-status::after {
  top: 19px !important;
  bottom: 19px !important;
}

body .persistent-bottom-nav-shell.home-shell-active
  .preview-reference-section-head button {
  border-color: rgba(22, 135, 255, 0.88) !important;
  background: #1687ff !important;
  background-image: none !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 7px 16px rgba(22, 135, 255, 0.16) !important;
}

body .persistent-bottom-nav-shell.home-shell-active
  .preview-reference-latest {
  border-color: rgba(22, 135, 255, 0.9) !important;
  background: #1687ff !important;
  background-image: none !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 9px 20px rgba(22, 135, 255, 0.18) !important;
}

body .persistent-bottom-nav-shell.home-shell-active
  .preview-reference-latest::after {
  content: none !important;
  display: none !important;
}

/* Cal Sans display typography: headings and primary card titles only. */
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) {
  --app-heading-font: "Cal Sans", "Arial Rounded MT Bold", system-ui, sans-serif;
}

body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) :is(h1, h2, h3, h4, h5, h6),
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .preview-reference-section-head > strong,
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .preview-reference-events-title,
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .preview-reference-event-copy > strong,
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .reference-alert-copy > strong,
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .reference-alert-empty > strong,
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .reference-alerts-filter-panel-head > strong,
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .reference-saved-alerts-entry strong,
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .settings-row-copy > strong,
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .settings-logout-card > strong,
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .notification-summary > strong,
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .assignment-current > strong,
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .assignment-options strong,
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .location-vehicle-label strong,
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .location-directions-notice strong {
  font-family: var(--app-heading-font) !important;
  font-optical-sizing: auto;
}

/* Relax Cal Sans tracking at compact UI sizes. */
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) :is(h1, h2, h3, h4, h5, h6),
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .preview-reference-section-head > strong,
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .preview-reference-events-title {
  letter-spacing: 0.02em !important;
}

body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .preview-reference-event-copy > strong,
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .reference-alert-copy > strong,
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .reference-alert-empty > strong,
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .reference-alerts-filter-panel-head > strong,
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .reference-saved-alerts-entry strong,
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .settings-row-copy > strong,
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .settings-logout-card > strong,
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .notification-summary > strong,
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .assignment-current > strong,
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .assignment-options strong,
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .location-vehicle-label strong,
body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .location-directions-notice strong {
  letter-spacing: 0.03em !important;
}

/* Screen-specific legacy rules used negative tracking; these final selectors normalise it. */
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.has-app-screen-header
  .app-screen-header h1,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alert-group h2,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.event-detail-shell-active
  .version4-incident-heading h2,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.health-shell-active
  .system-health-hero h2 {
  letter-spacing: 0.02em !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alert-copy > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alert-empty > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alerts-filter-panel-head > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-saved-alerts-entry strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.settings-main-shell-active
  .settings-row-copy > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.settings-main-shell-active
  .settings-logout-card > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.notification-preferences-shell-active
  .settings-row-copy > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.notification-preferences-shell-active
  .notification-summary > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.assignment-shell-active
  .assignment-current > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.assignment-shell-active
  .assignment-options strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.location-shell-active
  .location-vehicle-label strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.location-shell-active
  .location-directions-notice strong {
  letter-spacing: 0.03em !important;
}

/* Settings title tracking needs the redesign wrapper to outrank its legacy rule. */
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.settings-main-shell-active
  .settings-detail-redesign .settings-row-copy > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.notification-preferences-shell-active
  .settings-detail-redesign .settings-row-copy > strong {
  letter-spacing: 0.03em !important;
}

/* Cal Sans needs visibly relaxed tracking at mobile UI sizes. */
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.has-app-screen-header
  .app-screen-header h1,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.home-shell-active
  .preview-reference-welcome-only h1,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.home-shell-active
  .preview-reference-section-head > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.home-shell-active
  .preview-reference-events-title,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alert-group h2,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.event-detail-shell-active
  .version4-incident-heading h2,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.health-shell-active
  .system-health-hero h2 {
  letter-spacing: 0.04em !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.home-shell-active
  .preview-reference-event-copy > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alert-copy > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alert-empty > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alerts-filter-panel-head > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-saved-alerts-entry strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.settings-main-shell-active
  .settings-detail-redesign .settings-row-copy > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.settings-main-shell-active
  .settings-logout-card > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.notification-preferences-shell-active
  .settings-detail-redesign .settings-row-copy > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.notification-preferences-shell-active
  .notification-summary > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.assignment-shell-active
  .assignment-current > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.assignment-shell-active
  .assignment-options strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.location-shell-active
  .location-vehicle-label strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.location-shell-active
  .location-directions-notice strong {
  letter-spacing: 0.075em !important;
}

/* Render Cal Sans from its native face instead of browser-synthesised weights. */
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.has-app-screen-header
  .app-screen-header h1,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.home-shell-active
  .preview-reference-welcome-only h1,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.home-shell-active
  .preview-reference-section-head > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.home-shell-active
  .preview-reference-events-title,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.home-shell-active
  .preview-reference-event-copy > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alert-group h2,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alert-copy > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alert-empty > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alerts-filter-panel-head > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-saved-alerts-entry strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.event-detail-shell-active
  .version4-incident-heading h2,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.settings-main-shell-active
  .settings-detail-redesign .settings-row-copy > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.settings-main-shell-active
  .settings-logout-card > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.notification-preferences-shell-active
  .settings-detail-redesign .settings-row-copy > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.notification-preferences-shell-active
  .notification-summary > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.assignment-shell-active
  .assignment-current > strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.assignment-shell-active
  .assignment-options strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.health-shell-active
  .system-health-hero h2,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.location-shell-active
  .location-vehicle-label strong,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.location-shell-active
  .location-directions-notice strong {
  font-weight: 400 !important;
  font-synthesis: none !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Home used a legacy 72px nav item that pushed icon-only controls below centre. */
html body .persistent-bottom-nav-shell.home-shell-active
  > .app-primary-bottom-nav button,
html body .persistent-bottom-nav-shell.home-shell-active
  > .app-primary-bottom-nav button.active {
  min-height: 60px !important;
  padding: 2px 4px !important;
  justify-content: center !important;
  align-items: center !important;
}

/* Compact the individual cards on the Alerts screen. */
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alert-card {
  height: 118px !important;
  min-height: 118px !important;
  padding: 10px 9px 10px 14px !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alert-thumb {
  height: 88px !important;
  min-height: 88px !important;
}


/* Live action controls: compact, optically centred icon and label rows. */
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.live-shell-active
  .live-v3-action-panel {
  min-height: 88px !important;
  height: 88px !important;
  flex-basis: 88px !important;
  padding: 9px 14px !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.live-shell-active
  .live-v3-action-grid {
  height: 70px !important;
  gap: 10px !important;
  align-items: stretch !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.live-shell-active
  .live-v3-action-card {
  min-height: 70px !important;
  height: 70px !important;
  padding: 7px 10px !important;
  display: grid !important;
  grid-template-rows: 27px 18px !important;
  align-content: center !important;
  align-items: center !important;
  justify-items: center !important;
  gap: 3px !important;
  text-align: center !important;
  line-height: 18px !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.live-shell-active
  .live-v3-action-card > * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  justify-self: center !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.live-shell-active
  .live-v3-screenshot-icon {
  width: 24px !important;
  height: 27px !important;
  display: grid !important;
  place-items: center !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.live-shell-active
  .live-v3-screenshot-icon svg {
  width: 23px !important;
  height: 23px !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.live-shell-active
  .live-v3-record-dot {
  width: 12px !important;
  height: 12px !important;
  align-self: center !important;
}


/* Alerts: final blue/neutral active-state pass. */
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alerts-filter-options button.active,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alerts-filter-options button.active *,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alerts-date-menu button.active,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alerts-date-menu button.active *,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alerts-top-action.active,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alerts-top-action.active > span {
  color: #ffffff !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alert-filter-row button.active::before {
  background: #1687ff !important;
  background-color: #1687ff !important;
  box-shadow: 0 0 7px rgba(22, 135, 255, 0.24) !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-system-thumb {
  color: #1687ff !important;
  background: radial-gradient(circle, rgba(22, 135, 255, 0.11), transparent 64%) !important;
}


/* Home: single-purpose status card and continuous Recent Alerts timeline. */
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.home-shell-active
  .preview-reference-status {
  justify-content: flex-start !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.home-shell-active
  .preview-reference-status::after {
  content: none !important;
  display: none !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.home-shell-active
  .preview-reference-event:not(:last-child)::after {
  height: calc(100% - 28px) !important;
}


/* Alert Details: neutral playback control, category colours, and compact actions. */
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.event-detail-shell-active
  .event-detail-hero-play,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.event-detail-shell-active
  .event-detail-hero-play:hover,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.event-detail-shell-active
  .event-detail-hero-play:focus-visible {
  border: 0 !important;
  outline: 0 !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.event-detail-shell-active
  .version4-severity.category-critical {
  color: #ff4747 !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.event-detail-shell-active
  .version4-severity.category-system,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.event-detail-shell-active
  .version4-severity.category-motion {
  color: #1687ff !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.event-detail-shell-active
  .version4-severity.category-suspicious {
  color: #f2ad3d !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.event-detail-shell-active
  .version4-severity.category-security {
  color: #a8aaa7 !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.event-detail-shell-active
  .event-detail-assessment {
  padding-bottom: 14px !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.event-detail-shell-active
  .event-detail-incident-actions {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin-top: 16px !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.event-detail-shell-active
  .event-detail-incident-actions button,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.event-detail-shell-active
  .event-detail-incident-actions button.primary {
  min-width: 0 !important;
  min-height: 46px !important;
  padding: 8px 6px !important;
  grid-column: auto !important;
  border-radius: 11px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  font-size: 11.5px !important;
  line-height: 1 !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.event-detail-shell-active
  .event-detail-incident-actions button svg {
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.event-detail-shell-active
  .event-detail-incident-actions button.saved {
  border-color: rgba(22, 135, 255, 0.58) !important;
  color: #70b7ff !important;
  background: rgba(22, 135, 255, 0.12) !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.event-detail-shell-active
  .event-detail-acknowledge {
  width: 100% !important;
  min-height: 46px !important;
  margin-top: 10px !important;
  padding: 0 14px !important;
  border: 1px solid rgba(22, 135, 255, 0.78) !important;
  border-radius: 11px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #1687ff !important;
  color: #ffffff !important;
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 650 !important;
  letter-spacing: 0.02em !important;
  text-transform: none !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.event-detail-shell-active
  .event-detail-acknowledge.acknowledged,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.event-detail-shell-active
  .event-detail-acknowledge:disabled {
  border-color: rgba(255, 255, 255, 0.12) !important;
  background: #292a27 !important;
  color: #a8aaa7 !important;
  opacity: 1 !important;
}


/* Alert Details: icon-only Save beside the title. */
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.event-detail-shell-active
  .version4-title-row {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.event-detail-shell-active
  .version4-title-row h2 {
  min-width: 0 !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.event-detail-shell-active
  .version4-save-alert {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  padding: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 10px !important;
  display: grid !important;
  place-items: center !important;
  background: #242522 !important;
  color: #b4b6b2 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025) !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.event-detail-shell-active
  .version4-save-alert svg {
  width: 20px !important;
  height: 20px !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.event-detail-shell-active
  .version4-save-alert.saved {
  border-color: rgba(22, 135, 255, 0.52) !important;
  background: rgba(22, 135, 255, 0.12) !important;
  color: #1687ff !important;
}


/* Alerts: Saved Alerts uses the shared blue accent without a green active edge. */
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-saved-alerts-entry > svg,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-saved-alerts-entry.active > svg,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-saved-alerts-entry b {
  color: #1687ff !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-saved-alerts-entry b {
  background: rgba(22, 135, 255, 0.12) !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-saved-alerts-entry.active {
  border-color: rgba(255, 255, 255, 0.12) !important;
  background: linear-gradient(145deg, #20211e, #171815) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025) !important;
}

/* Shared notification dot severity: blue default, amber elevated, red critical. */
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .app-screen-header-badge.notification-default,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .preview-reference-bell > i.notification-default {
  background: #1687ff !important;
  background-color: #1687ff !important;
  box-shadow: 0 0 8px rgba(22, 135, 255, 0.28) !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .app-screen-header-badge.notification-elevated,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .preview-reference-bell > i.notification-elevated {
  background: #f2ad3d !important;
  background-color: #f2ad3d !important;
  box-shadow: 0 0 8px rgba(242, 173, 61, 0.3) !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .app-screen-header-badge.notification-critical,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .preview-reference-bell > i.notification-critical {
  background: #ff4747 !important;
  background-color: #ff4747 !important;
  box-shadow: 0 0 8px rgba(255, 71, 71, 0.32) !important;
}


/* Unread labels follow alert category colour and match timestamp sizing. */
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.home-shell-active
  .preview-reference-event-meta b,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alert-card-meta b {
  font: inherit !important;
  font-weight: 650 !important;
  line-height: inherit !important;
  letter-spacing: 0.04em !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alert-card-meta {
  width: 100% !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  color: #a8aaa7 !important;
  font-size: 13.5px !important;
  line-height: 1.05 !important;
  font-weight: 420 !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alert-card-meta time {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .preview-reference-event-meta b.new-critical,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .reference-alert-card-meta b.new-critical {
  color: #ff4747 !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .preview-reference-event-meta b.new-suspicious,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .reference-alert-card-meta b.new-suspicious {
  color: #f2ad3d !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .preview-reference-event-meta b.new-standard,
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active) .reference-alert-card-meta b.new-standard {
  color: #1687ff !important;
}


/* Home unread-first filters, contextual status copy, and tighter Alerts metadata. */
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.home-shell-active
  .preview-reference-status-copy {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 2px !important;
  text-align: left !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.home-shell-active
  .preview-reference-status-copy small {
  max-width: 245px !important;
  overflow: hidden !important;
  color: #a8aaa7 !important;
  font-size: 12.5px !important;
  line-height: 1.15 !important;
  font-weight: 430 !important;
  letter-spacing: 0.015em !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alert-card-meta {
  gap: 4px !important;
  justify-content: flex-start !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alert-card-meta time {
  width: auto !important;
  max-width: none !important;
  flex: 0 1 auto !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alert-card-meta b {
  flex: 0 0 auto !important;
}


/* Suspicious Alerts use amber; detail category sits closer to its heading. */
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alert-card.tone-suspicious .reference-alert-status-icon {
  color: #f2ad3d !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.event-detail-shell-active
  .version4-incident-heading {
  min-height: 0 !important;
  gap: 2px !important;
}


/* Multi-select replaces the category icon without adding a fourth grid item. */
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alert-card.selection-active .reference-alert-status-icon {
  display: none !important;
  margin: 0 !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.events-shell-active
  .reference-alert-selection-toolbar .select-all {
  border-color: rgba(22, 135, 255, 0.42) !important;
  color: #1687ff !important;
  background: rgba(22, 135, 255, 0.09) !important;
}


/* Home recent alerts: category colours and a continuous first-to-last timeline. */
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.home-shell-active
  .preview-reference-event-icon.red {
  color: #ff4747 !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.home-shell-active
  .preview-reference-event-icon.amber {
  color: #f2ad3d !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.home-shell-active
  .preview-reference-event-icon.neutral {
  color: #a9adaa !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.home-shell-active
  .preview-reference-event-list::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  z-index: 1 !important;
  left: 35.5px !important;
  top: 42px !important;
  bottom: 42px !important;
  width: 1px !important;
  background: rgba(167, 168, 166, 0.45) !important;
  pointer-events: none !important;
}

html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.home-shell-active
  .preview-reference-event::after {
  content: none !important;
  display: none !important;
}


/* Mask the timeline beneath each icon so connectors meet the circle edges only. */
html body .phone-shell-wrap:not(.event-detail-shell-active):not(.events-shell-active).persistent-bottom-nav-shell.home-shell-active
  .preview-reference-event-icon {
  background: #141613 !important;
}

