:root {
  --background: #f3f5f7;
  --blue: #18212b;
  --flashover-blue: #172554;
  --red-action-1: #b42318;
  --orange-action-1: #9a6700;
  --green-action-1: #166534;
  --red-action-2: #b42318;
  --fs-surface: #ffffff;
  --fs-surface-muted: #eef1f4;
  --fs-text: #18212b;
  --fs-muted: #5b6875;
  --fs-border: #cdd5df;
  --fs-primary: #1d4ed8;
  --fs-primary-2: #1d4ed8;
  --fs-focus: rgba(29, 78, 216, 0.35);
  --fs-radius-sm: 4px;
  --fs-radius-md: 6px;
  --fs-radius-lg: 8px;
}

html,
body {
  height: 100%;
}

body {
  background: var(--background);
  color: var(--fs-text);
  font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "zero" 0;
}

.fs-viewport {
  /* Fallback for browsers without dvh: a JS-measured viewport height keeps the tab bar above browser UI. */
  height: var(--app-height, 100vh);
  overflow: hidden;
  overscroll-behavior: none;
}

@supports (height: 100dvh) {
  .fs-viewport {
    /* Dynamic viewport units track the browser chrome natively, so the tab bar
       stays glued to the visual bottom without JS resize jitter. */
    height: 100dvh;
  }
}

@media (display-mode: standalone), (display-mode: fullscreen) {
  .fs-viewport {
    /* Installed to the home screen there is no browser chrome, and iOS computes
       dvh as if Safari's UI existed — leaving a gap under the tab bar. The
       classic unit fills the real screen in standalone mode. */
    height: 100vh;
  }
}

/* ------------------------------------------------------------------ */
/* Shell chrome */
/* ------------------------------------------------------------------ */
.fs-header {
  position: relative;
  z-index: 40;
  background: var(--flashover-blue);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 18px rgba(11, 18, 32, 0.16);
  padding-top: env(safe-area-inset-top, 0px);
}

.fs-header.hidden,
.fs-tabbar.hidden {
  display: none !important;
}

/* The Tailwind CDN used to inject .hidden after this stylesheet, so it beat
   display rules like .fs-sheet-backdrop's flex. With the compiled Tailwind
   CSS loading first, .hidden must carry !important to stay authoritative. */
.hidden {
  display: none !important;
}

.fs-confidentiality-banner {
  height: 16px;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(220, 38, 38, 0.72);
  color: rgba(255, 255, 255, 0.96);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.fs-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 14px;
  max-width: 56rem;
  margin: 0 auto;
  width: 100%;
}

.fs-header-side {
  flex: 0 0 42px;
  display: flex;
  justify-content: flex-start;
}

.fs-header-side-end {
  justify-content: flex-end;
}

.fs-header-circle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 18px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.fs-header-circle:active {
  transform: scale(0.94);
}

.fs-header-circle-solid {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.20);
}

.fs-header-icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  background-color: rgba(255, 255, 255, 0.92);
  flex: 0 0 auto;
}

.fs-header-circle-solid .fs-header-icon {
  background-color: #ffffff;
}

.fs-icon-settings {
  -webkit-mask: url("/design_assets/lucide/settings.svg") no-repeat center / contain;
  mask: url("/design_assets/lucide/settings.svg") no-repeat center / contain;
}

.fs-icon-back {
  -webkit-mask: url("/design_assets/lucide/arrow-left.svg") no-repeat center / contain;
  mask: url("/design_assets/lucide/arrow-left.svg") no-repeat center / contain;
}

.fs-icon-bell {
  -webkit-mask: url("/design_assets/lucide/bell.svg") no-repeat center / contain;
  mask: url("/design_assets/lucide/bell.svg") no-repeat center / contain;
}

.fs-icon-chevron {
  -webkit-mask: url("/design_assets/lucide/chevron-down.svg") no-repeat center / contain;
  mask: url("/design_assets/lucide/chevron-down.svg") no-repeat center / contain;
}

.fs-icon-plus {
  -webkit-mask: url("/design_assets/lucide/circle-plus.svg") no-repeat center / contain;
  mask: url("/design_assets/lucide/circle-plus.svg") no-repeat center / contain;
}

.fs-icon-check {
  -webkit-mask: url("/design_assets/lucide/circle-check.svg") no-repeat center / contain;
  mask: url("/design_assets/lucide/circle-check.svg") no-repeat center / contain;
}

.fs-header-pill {
  flex: 1 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 4px 18px;
  border-radius: 14px;
  background: rgba(24, 15, 94, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 18px rgba(0, 0, 0, 0.18);
  color: #ffffff;
  transition: transform 0.15s ease;
}

.fs-header-pill:active {
  transform: scale(0.97);
}

.fs-header-pill[disabled] {
  pointer-events: none;
}

.fs-header-pill-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.fs-header-pill-label {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.15;
}

/* Optional second line in the context pill. Screens that never set it keep the
   pill at its original height because the element stays .hidden. */
.fs-header-pill-sub {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  opacity: 0.78;
  margin-top: 1px;
}

.fs-header-pill-chevron {
  width: 18px;
  height: 18px;
  background-color: rgba(255, 255, 255, 0.88);
  transition: transform 0.2s ease;
}

.fs-header-pill[aria-expanded="true"] .fs-header-pill-chevron {
  transform: rotate(180deg);
}

/* ------------------------------------------------------------------ */
/* Brigade switcher dropdown */
/* ------------------------------------------------------------------ */
.fs-switcher {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.fs-switcher-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 18, 32, 0.45);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.fs-switcher-panel {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 76px);
  left: 50%;
  width: min(340px, calc(100vw - 32px));
  transform: translateX(-50%) translateY(-8px) scale(0.96);
  transform-origin: top center;
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
  background: var(--fs-surface);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(11, 18, 32, 0.28);
  overflow: hidden;
}

.fs-switcher[data-open="true"] .fs-switcher-backdrop {
  opacity: 1;
}

.fs-switcher[data-open="true"] .fs-switcher-panel {
  transform: translateX(-50%) translateY(0) scale(1);
  opacity: 1;
}

.fs-switcher-list {
  max-height: 40vh;
  overflow-y: auto;
}

.fs-switcher-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 14px 18px;
  text-align: left;
  color: var(--fs-text);
  font-size: 15px;
  font-weight: 700;
}

.fs-switcher-row + .fs-switcher-row {
  border-top: 1px solid var(--fs-border);
}

.fs-switcher-row:active {
  background: rgba(24, 15, 94, 0.08);
}

.fs-switcher-row[aria-current="true"] {
  color: var(--flashover-blue);
}

.fs-switcher-row .fs-icon-check {
  width: 20px;
  height: 20px;
  background-color: var(--green-action-1);
}

.fs-switcher-row-meta {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--fs-muted);
}

.fs-switcher-empty {
  padding: 16px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--fs-muted);
}

.fs-switcher-manage {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 18px;
  border-top: 1px solid var(--fs-border);
  background: rgba(24, 15, 94, 0.06);
  color: var(--flashover-blue);
  font-size: 14px;
  font-weight: 800;
  text-align: left;
}

.fs-switcher-manage .fs-header-icon {
  width: 20px;
  height: 20px;
  background-color: var(--flashover-blue);
}

.fs-header-badge,
.fs-tabbar-badge,
.fs-action-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e11d48;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.fs-header-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  border: 2px solid var(--flashover-blue);
}

.fs-tabbar-btn {
  position: relative;
}

.fs-tabbar-btn.fs-desktop-only {
  display: none;
}

.fs-tabbar-badge {
  position: absolute;
  top: 4px;
  right: 18%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.fs-action-badge {
  flex: 0 0 auto;
  min-width: 22px;
  height: 22px;
}

.fs-header-badge.hidden,
.fs-tabbar-badge.hidden,
.fs-action-badge.hidden {
  display: none !important;
}

@media (max-width: 420px) {
  .fs-header-row {
    padding: 10px 12px;
    gap: 8px;
  }

  .fs-header-pill-label {
    font-size: 16px;
  }
}

.fs-tabbar {
  background: #ffffff;
  backdrop-filter: none;
  border-top: 1px solid var(--fs-border);
  /* Keep the tab bar clear of the iOS home indicator when installed to the home screen. */
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
}

.fs-desktop-nav-brand,
.fs-desktop-nav-label,
.fs-desktop-account {
  display: none;
}

.fs-tabbar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: 14px;
  color: var(--fs-muted);
  min-width: 0;
  padding-inline: 3px;
}

@media (max-width: 480px) {
  .fs-tabbar-btn {
    gap: 3px;
    padding-block: 8px;
  }

  .fs-tabbar-btn .text-\[11px\] {
    font-size: 10px;
  }
}

.fs-tabbar-btn img {
  width: 22px;
  height: 22px;
  opacity: 0.9;
}

.fs-btn-success {
  background: var(--green-action-1);
  color: #fff;
}

.fs-btn-success:hover:not(:disabled) {
  background: #14532d;
}

.fs-issue-event-image {
  margin-top: 10px;
}

.fs-issue-event-image img {
  display: block;
  width: min(100%, 360px);
  height: 180px;
  object-fit: cover;
  border: 1px solid var(--fs-border);
  border-radius: 8px;
}

.fs-tabbar-icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  background-color: var(--flashover-blue);
  opacity: 0.9;
}

.fs-tabbar-icon-checks {
  -webkit-mask: url("/design_assets/lucide/list-check.svg") no-repeat center / contain;
  mask: url("/design_assets/lucide/list-check.svg") no-repeat center / contain;
}

.fs-tabbar-icon-reports {
  -webkit-mask: url("/design_assets/lucide/file-text.svg") no-repeat center / contain;
  mask: url("/design_assets/lucide/file-text.svg") no-repeat center / contain;
}

.fs-tabbar-icon-issues {
  -webkit-mask: url("/design_assets/lucide/triangle-alert.svg") no-repeat center / contain;
  mask: url("/design_assets/lucide/triangle-alert.svg") no-repeat center / contain;
}

.fs-tabbar-icon-brigades {
  -webkit-mask: url("/design_assets/lucide/warehouse.svg") no-repeat center / contain;
  mask: url("/design_assets/lucide/warehouse.svg") no-repeat center / contain;
}

.fs-tabbar-icon-setup {
  -webkit-mask: url("/design_assets/lucide/wrench.svg") no-repeat center / contain;
  mask: url("/design_assets/lucide/wrench.svg") no-repeat center / contain;
}

.fs-tabbar-icon-assets {
  -webkit-mask: url("/design_assets/lucide/archive.svg") no-repeat center / contain;
  mask: url("/design_assets/lucide/archive.svg") no-repeat center / contain;
}

.fs-tabbar-icon-members {
  -webkit-mask: url("/design_assets/lucide/users-round.svg") no-repeat center / contain;
  mask: url("/design_assets/lucide/users-round.svg") no-repeat center / contain;
}

.fs-tabbar-icon-account {
  -webkit-mask: url("/design_assets/lucide/circle-user-round.svg") no-repeat center / contain;
  mask: url("/design_assets/lucide/circle-user-round.svg") no-repeat center / contain;
}

.fs-tabbar-btn[aria-current="page"] {
  color: var(--fs-primary);
  background: rgba(37, 99, 235, 0.10);
}

.fs-tabbar-btn[aria-current="page"] img {
  opacity: 1;
}

@media (min-width: 1024px) {
  body.fs-viewport {
    display: grid;
    grid-template-columns: 224px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
  }

  body.fs-viewport > .fs-header {
    grid-column: 2;
    grid-row: 1;
  }

  body.fs-viewport > #app-root {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
  }

  body.fs-viewport > .fs-tabbar {
    grid-column: 1;
    grid-row: 1 / 3;
    flex-direction: column;
    min-height: 0;
    padding: 22px 14px 18px;
    background: var(--flashover-blue);
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
    backdrop-filter: none;
  }

  body.fs-viewport > .fs-tabbar:not(.hidden),
  body.fs-viewport > .fs-tabbar.fs-tabbar-suppressed {
    display: flex !important;
  }

  .fs-desktop-nav-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 48px;
    padding: 0 10px 20px;
    color: #fff;
    font-size: 18px;
    font-weight: 850;
    letter-spacing: -0.02em;
  }

  .fs-desktop-nav-brand img {
    width: 34px;
    height: 34px;
    object-fit: contain;
  }

  .fs-desktop-nav-label {
    display: block;
    padding: 12px 12px 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
  }

  #app-tabbar-grid {
    width: 100%;
    max-width: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .fs-tabbar-btn {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
  }

  .fs-tabbar-btn.fs-desktop-only {
    display: flex;
  }

  .fs-tabbar-btn.fs-mobile-only {
    display: none;
  }

  .fs-tabbar-btn .text-\[11px\] {
    font-size: 14px;
    font-weight: 700;
  }

  .fs-tabbar-icon {
    width: 20px;
    height: 20px;
    background-color: currentColor;
  }

  .fs-tabbar-btn[aria-current="page"] {
    color: rgba(255, 255, 255, 0.72);
    background: transparent;
    box-shadow: none;
  }

  .fs-tabbar-btn[data-desktop-current="page"],
  .fs-desktop-account[data-desktop-current="page"] {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 3px 0 0 #ffffff;
  }

  .fs-tabbar-badge {
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    box-shadow: 0 0 0 2px var(--flashover-blue);
  }

  .fs-desktop-account {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 46px;
    margin-top: auto;
    padding: 11px 12px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    font-weight: 700;
    text-align: left;
  }

  .fs-desktop-account:hover,
  .fs-tabbar-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
  }

  .fs-header-row {
    max-width: none;
    padding-inline: 24px;
  }

  #app-root .max-w-4xl {
    max-width: 76rem;
  }

  .fs-page {
    padding: 24px;
  }
}

/* ------------------------------------------------------------------ */
/* Components */
/* ------------------------------------------------------------------ */
.fs-page {
  padding: 18px 16px 18px;
}

.fs-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fs-card {
  background: var(--fs-surface);
  border: 1px solid var(--fs-border);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.fs-card-attention {
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.14);
}

.fs-card-inner {
  padding: 16px;
}

.fs-card-title {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.fs-card-title-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  opacity: 0.78;
}

.fs-card-subtitle {
  color: var(--fs-muted);
  font-size: 13px;
}

.fs-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fs-label {
  color: var(--fs-muted);
  font-size: 13px;
  font-weight: 600;
}

.fs-input,
.fs-select {
  width: 100%;
  border: 1px solid var(--fs-border);
  background: #ffffff;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 16px;
  outline: none;
}

.fs-input:focus,
.fs-select:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px var(--fs-focus);
}

.fs-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 640px) {
  .fs-actions {
    grid-template-columns: 1fr 1fr;
  }
}

.fs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .fs-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.fs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 750;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: transform 0.06s ease, box-shadow 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.fs-btn-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.fs-btn-primary .fs-btn-icon,
.fs-btn-danger .fs-btn-icon {
  filter: brightness(0) invert(1);
}

.fs-btn:active {
  transform: translateY(1px);
}

.fs-btn-primary {
  color: #ffffff;
  background: var(--fs-primary);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.22);
}

.fs-btn-secondary {
  color: var(--fs-text);
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
}

.fs-btn-danger {
  color: #ffffff;
  background: var(--red-action-1);
}

.fs-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.fs-input:disabled,
.fs-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: rgba(15, 23, 42, 0.05);
}

.fs-locked {
  opacity: 0.65;
}

.fs-btn[aria-busy="true"] {
  pointer-events: none;
}

.fs-btn-spinner {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: fs-spin 0.75s linear infinite;
}

@keyframes fs-spin {
  to {
    transform: rotate(360deg);
  }
}

.fs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--fs-border);
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.fs-row > * {
  min-width: 0;
}

.fs-check-target {
  border: 1px solid var(--fs-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.fs-check-target-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: rgba(24, 15, 94, 0.04);
  border-bottom: 1px solid var(--fs-border);
}

.fs-check-target-actions {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.fs-check-target-actions .fs-row {
  border-width: 0;
  border-radius: 0;
  box-shadow: none;
}

.fs-check-target-actions .fs-row + .fs-row {
  border-top: 1px solid var(--fs-border);
}

.fs-check-family {
  overflow: hidden;
}

.fs-check-family-appliances {
  border-top: 4px solid var(--flashover-blue);
}

.fs-check-family-station {
  border-top: 4px solid var(--orange-action-1);
}

.fs-check-family-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fs-check-family-station .fs-icon-bubble {
  background: color-mix(in srgb, var(--orange-action-1) 12%, white);
}

.fs-check-family .fs-list {
  gap: 12px;
}

.fs-check-family-station .fs-row {
  border-left: 3px solid var(--orange-action-1);
}

.fs-check-family-station .fs-check-not-due {
  border-left-color: var(--fs-border);
  background: #f5f7fa;
  opacity: 0.62;
}

/* Asset records use the visual language of a labelled equipment card: the
   identity and current operational state stay visible while the tabs change. */
.fs-asset-page {
  display: grid;
  gap: 14px;
}

.fs-asset-back {
  justify-self: start;
}

.fs-asset-record {
  border-left: 4px solid var(--flashover-blue);
}

.fs-asset-record-main,
.fs-asset-list-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.fs-asset-record-photo {
  width: clamp(88px, 18vw, 128px);
  height: clamp(88px, 18vw, 128px);
  flex: 0 0 auto;
  border-radius: 14px;
  border: 1px solid var(--fs-border);
  background: #eef3f8;
  object-fit: cover;
}

.fs-asset-record-photo.is-placeholder {
  padding: 30px;
  object-fit: contain;
  opacity: 0.7;
}

.fs-asset-record-copy {
  min-width: 0;
}

.fs-asset-record-kicker {
  margin-bottom: 3px;
  color: var(--flashover-blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fs-asset-record-copy h2 {
  margin: 0;
  color: var(--fs-text);
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1.1;
}

.fs-asset-record-flags,
.fs-reminder-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.fs-asset-list-photo {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  padding: 0;
  border-radius: 9px;
  border: 1px solid var(--fs-border);
  background: #eef3f8;
  object-fit: cover;
}

.fs-asset-list-photo.is-placeholder {
  padding: 12px;
  object-fit: contain;
}

.fs-asset-fault-text {
  color: var(--red-action-1);
  font-weight: 700;
}

.fs-asset-retired-toggle {
  justify-content: flex-start;
  gap: 8px;
  box-shadow: none;
}

.fs-asset-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--fs-border);
  border-radius: 14px;
  background: #eef3f8;
}

.fs-asset-tabs button,
.fs-asset-segment button,
.fs-asset-weekdays button,
.fs-chip {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--fs-muted);
  font-size: 13px;
  font-weight: 750;
}

.fs-asset-tabs button[aria-current="page"],
.fs-asset-segment button[aria-pressed="true"],
.fs-asset-weekdays button[aria-pressed="true"] {
  border-color: var(--flashover-blue);
  background: #ffffff;
  color: var(--flashover-blue);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.fs-asset-grid,
.fs-asset-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

#asset-tab-panel {
  display: grid;
  gap: 14px;
}

.fs-asset-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.fs-asset-facts {
  display: grid;
  gap: 12px;
  margin: 0;
}

.fs-asset-facts div {
  display: grid;
  gap: 2px;
}

.fs-asset-facts dt {
  color: var(--fs-muted);
  font-size: 12px;
  font-weight: 700;
}

.fs-asset-facts dd {
  margin: 0;
  color: var(--fs-text);
}

.fs-asset-routine-callout {
  border-left: 4px solid var(--flashover-blue);
}

.fs-asset-row-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.fs-asset-empty {
  display: grid;
  gap: 3px;
  padding: 18px;
  border: 1px dashed var(--fs-border);
  border-radius: 12px;
  color: var(--fs-muted);
  text-align: center;
}

.fs-asset-empty strong {
  color: var(--fs-text);
}

.fs-asset-sheet {
  width: min(94vw, 560px);
  max-height: min(86vh, 760px);
  overflow-y: auto;
}

.fs-asset-sheet-actions {
  position: sticky;
  bottom: -16px;
  padding-top: 10px;
  padding-bottom: 4px;
  background: var(--fs-surface);
}

.fs-chip {
  min-height: 34px;
  padding: 6px 10px;
  border-color: var(--fs-border);
  background: #f7f9fc;
}

.fs-chip:hover {
  border-color: var(--flashover-blue);
  color: var(--flashover-blue);
}

.fs-asset-routine-editor,
.fs-asset-builder-section {
  display: grid;
  gap: 14px;
}

.fs-asset-builder-section {
  padding-top: 16px;
  border-top: 1px solid var(--fs-border);
}

.fs-asset-segment {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 4px;
  border-radius: 12px;
  background: #eef3f8;
}

.fs-asset-interval {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fs-asset-interval input {
  max-width: 130px;
}

.fs-asset-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.fs-field[hidden] {
  display: none;
}

.fs-asset-weekdays button {
  min-width: 0;
  padding: 7px 3px;
  border-color: var(--fs-border);
}

.fs-asset-builder-row .fs-row-actions {
  flex-wrap: wrap;
}

.fs-asset-history-row {
  align-items: flex-start;
}

.fs-asset-history-photo {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border: 1px solid var(--fs-border);
  border-radius: 9px;
  object-fit: cover;
}

@media (max-width: 680px) {
  .fs-asset-grid,
  .fs-asset-two-col {
    grid-template-columns: 1fr;
  }

  .fs-asset-record-main {
    align-items: flex-start;
  }

  .fs-asset-reminder-row,
  .fs-asset-builder-row,
  .fs-asset-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .fs-asset-row-end,
  .fs-asset-row-end .fs-row-actions,
  .fs-asset-builder-row .fs-row-actions {
    justify-content: flex-start;
  }

  .fs-asset-tabs button {
    min-height: 44px;
    padding-inline: 4px;
    font-size: 12px;
  }
}

.fs-row-main {
  min-width: 0;
}

/* A row with an independent overflow/action button needs a real primary
   button, rather than a button role on the parent. */
.fs-row-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

.fs-row-primary:focus-visible {
  outline: 3px solid var(--fs-focus);
  outline-offset: 3px;
  border-radius: var(--fs-radius-sm);
}

.fs-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  min-width: 0;
}

.fs-btn-compact {
  width: auto;
  padding: 8px 10px;
}

.fs-select-compact {
  width: auto;
  min-width: 146px;
  padding: 8px 10px;
}

@media (max-width: 480px) {
  .fs-row.fs-row-stack-sm {
    align-items: stretch;
    flex-direction: column;
  }

  .fs-row-stack-sm .fs-row-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .fs-row-stack-sm .fs-row-actions-pair {
    grid-template-columns: 1fr 1fr;
  }

  .fs-row-stack-sm .fs-row-actions-stack {
    grid-template-columns: 1fr;
  }

  .fs-row-stack-sm .fs-btn-compact,
  .fs-row-stack-sm .fs-select-compact {
    width: 100%;
    min-width: 0;
  }
}

.fs-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(15, 23, 42, 0.04);
  color: var(--fs-muted);
  font-size: 20px;
  line-height: 1;
}

.fs-icon-btn img {
  width: 18px;
  height: 18px;
  opacity: 0.78;
}

.fs-icon-btn:active {
  transform: translateY(1px);
}

.fs-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
  /* Breathing room so centered cards can never touch the screen edges or notches. */
  padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
}

.fs-sheet {
  width: 92%;
  max-width: 520px;
  max-height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--fs-surface);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.22);
}

.fs-sheet-title {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.fs-sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

/* ------------------------------------------------------------------ */
/* Installed app guidance                                              */
/* ------------------------------------------------------------------ */
.fs-install-card .fs-card-inner {
  display: grid;
  gap: 14px;
}

.fs-install-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fs-install-card-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid #b7c7e2;
  background: #eaf0f9;
  color: var(--flashover-blue);
  font-size: 27px;
  font-weight: 400;
  line-height: 1;
}

.fs-install-intro {
  margin: 8px 0 0;
  color: var(--fs-muted);
  font-size: 14px;
  line-height: 1.45;
}

.fs-install-eyebrow {
  margin-bottom: 5px;
  color: var(--fs-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.fs-install-steps {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: install-step;
}

.fs-install-steps li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  color: var(--fs-text);
  font-size: 14px;
  line-height: 1.4;
  counter-increment: install-step;
}

.fs-install-steps li::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #b7c7e2;
  background: #eaf0f9;
  color: var(--flashover-blue);
  content: counter(install-step);
  font-size: 12px;
  font-weight: 800;
}

.fs-install-nudge {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 75;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(420px, calc(100vw - 32px));
  border: 1px solid #1e3a67;
  background: var(--flashover-blue);
  box-shadow: 0 14px 30px rgba(15, 30, 56, 0.25);
  color: #ffffff;
  padding: 12px 12px 12px 14px;
}

.fs-install-nudge-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.fs-install-nudge-copy strong {
  font-size: 14px;
}

.fs-install-nudge-copy span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  line-height: 1.3;
}

.fs-install-nudge-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.fs-install-nudge-action,
.fs-install-nudge-close {
  border: 1px solid rgba(255, 255, 255, 0.44);
  background: transparent;
  color: #ffffff;
  font-weight: 700;
}

.fs-install-nudge-action {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 13px;
}

.fs-install-nudge-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
}

.fs-install-nudge-action:focus-visible,
.fs-install-nudge-close:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .fs-install-nudge {
    align-items: flex-start;
  }
}

@media (display-mode: standalone), (display-mode: fullscreen) {
  .fs-install-nudge,
  .fs-install-card {
    display: none !important;
  }
}

@keyframes fsSearchHitPulse {
  0% {
    box-shadow: 0 0 0 0 var(--fs-focus), 0 6px 16px rgba(15, 23, 42, 0.05);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0), 0 6px 16px rgba(15, 23, 42, 0.05);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0), 0 6px 16px rgba(15, 23, 42, 0.05);
  }
}

.fs-row.fs-search-hit {
  border-color: rgba(37, 99, 235, 0.55);
  animation: fsSearchHitPulse 900ms ease-out;
}

button.fs-card,
button.fs-row {
  appearance: none;
  text-align: left;
  cursor: pointer;
}

.fs-row-action {
  cursor: pointer;
}

button.fs-card:active,
button.fs-row:active {
  transform: translateY(1px);
}

button.fs-card:disabled,
button.fs-row:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

button.fs-card:disabled:hover,
button.fs-row:disabled:hover {
  border-color: var(--fs-border);
}

button.fs-card:hover,
button.fs-row:hover {
  border-color: rgba(37, 99, 235, 0.28);
}

.fs-row-action:hover {
  border-color: rgba(37, 99, 235, 0.28);
}

button.fs-card:focus,
button.fs-row:focus {
  outline: none;
  box-shadow: 0 0 0 4px var(--fs-focus), 0 10px 30px rgba(15, 23, 42, 0.06);
}

.fs-row-action:focus {
  outline: none;
  box-shadow: 0 0 0 4px var(--fs-focus), 0 10px 30px rgba(15, 23, 42, 0.06);
}

.fs-row-title {
  font-size: 16px;
  font-weight: 750;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.fs-row-meta {
  color: var(--fs-muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.fs-row-meta-subtle {
  font-size: 11px;
  opacity: 0.75;
}

.fs-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(15, 23, 42, 0.04);
  color: var(--fs-text);
}

.fs-pill-success {
  background: rgba(22, 163, 74, 0.10);
  border-color: rgba(22, 163, 74, 0.18);
  color: #166534;
}

.fs-pill-warn {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.22);
  color: #92400e;
}

.fs-pill-danger {
  background: rgba(225, 29, 72, 0.10);
  border-color: rgba(225, 29, 72, 0.20);
  color: #9f1239;
}

.fs-pill-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.fs-row-attention {
  border-color: rgba(245, 158, 11, 0.34);
  background: #fffbeb;
}

.fs-notification-row {
  align-items: flex-start;
}

.fs-notification-row-unread {
  border-color: rgba(37, 99, 235, 0.32);
  background: rgba(37, 99, 235, 0.04);
}

.fs-unread-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--fs-primary);
  margin-top: 6px;
}

.fs-alert {
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(15, 23, 42, 0.04);
  color: var(--fs-text);
}

.fs-alert-success {
  background: rgba(22, 163, 74, 0.10);
  border-color: rgba(22, 163, 74, 0.18);
  color: #166534;
}

.fs-alert-error {
  background: rgba(225, 29, 72, 0.10);
  border-color: rgba(225, 29, 72, 0.20);
  color: #9f1239;
}

.fs-alert-warn {
  background: #fff8eb;
  border-color: rgba(154, 103, 0, 0.24);
  color: var(--orange-action-1);
}

.fs-action-card-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.fs-icon-bubble {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(37, 99, 235, 0.10);
  border: 1px solid rgba(37, 99, 235, 0.18);
}

.fs-icon-bubble img {
  width: 22px;
  height: 22px;
}

.fs-action-card-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.fs-action-card-subtitle {
  color: var(--fs-muted);
  font-size: 12px;
}

/* Keep the loading overlay feeling consistent with the new theme */
.loading-overlay {
  background-color: rgba(243, 245, 247, 0.94);
  backdrop-filter: none;
}

/* ------------------------------------------------------------------ */
/* Terms gate */
/* ------------------------------------------------------------------ */
.fs-terms {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 36px;
  min-height: 100%;
}

.fs-terms-card {
  width: min(920px, 100%);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.fs-terms-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--fs-muted);
  margin-bottom: 8px;
}

.fs-terms-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.fs-terms-meta {
  font-size: 12px;
  color: var(--fs-muted);
  margin: 0;
}

.fs-terms-body {
  border: 1px solid var(--fs-border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--fs-surface);
  height: clamp(220px, 46vh, 460px);
}

.fs-terms-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--fs-surface);
}

.fs-terms-ack {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--fs-text);
}

.fs-terms-ack input {
  margin-top: 3px;
  accent-color: var(--fs-primary);
}

.fs-terms-error {
  font-size: 13px;
  color: #dc2626;
}

.fs-terms-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.fs-terms-link {
  color: var(--fs-primary);
  font-weight: 600;
  text-decoration: none;
}

.fs-terms-link:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------------------ */
/* Brigade dashboard */
/* ------------------------------------------------------------------ */
.fs-dash-identity {
  padding: 2px 4px 4px;
}

.fs-dash-identity-kicker {
  color: var(--fs-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fs-dash-identity-title {
  margin: 2px 0 0;
  color: var(--fs-text);
  font-size: clamp(22px, 3vw, 29px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.fs-dash-identity-meta {
  margin-top: 5px;
  color: var(--fs-muted);
  font-size: 13px;
  font-weight: 600;
}

.fs-dash-sec {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fs-muted);
}

.fs-dash-sec-title {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin: 0;
  color: inherit;
  font: inherit;
}

.fs-dash-sec-icon {
  width: 16px;
  height: 16px;
  opacity: 0.78;
}

.fs-dash-sec-link {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fs-primary);
  white-space: nowrap;
}

.fs-dash-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.fs-dash-tile {
  appearance: none;
  width: 100%;
  background: var(--fs-surface);
  border: 1px solid var(--fs-border);
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
  padding: 12px 8px 10px;
  text-align: center;
  font: inherit;
}

.fs-dash-tile-action {
  cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}

.fs-dash-tile-action:hover {
  border-color: rgba(37, 99, 235, 0.35);
}

.fs-dash-tile-action:active {
  transform: translateY(1px);
}

.fs-dash-tile-action:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--fs-focus), 0 6px 16px rgba(15, 23, 42, 0.05);
}

.fs-dash-tile-num {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--fs-text);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "zero" 0;
}

.fs-dash-tile-label {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  min-height: 26px;
  color: var(--fs-muted);
  margin-top: 2px;
}

.fs-dash-tile-alert .fs-dash-tile-num {
  color: var(--red-action-1);
}

.fs-dash-tile-warn .fs-dash-tile-num {
  color: #b45309;
}

.fs-dash-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 16px;
  border-radius: 18px;
  background: var(--flashover-blue);
  color: #ffffff;
  text-align: left;
  box-shadow: 0 10px 24px rgba(24, 15, 94, 0.24);
  transition: transform 0.15s ease;
}

.fs-dash-hero:active {
  transform: scale(0.98);
}

.fs-dash-hero-resume {
  background: #8a5300;
  box-shadow: 0 10px 24px rgba(138, 83, 0, 0.24);
}

.fs-dash-hero-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fs-dash-hero-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
}

.fs-dash-hero-title {
  font-size: 17px;
  font-weight: 800;
}

.fs-dash-hero-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.fs-dash-hero-go {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
}

.fs-dash-queue {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 6px;
  margin-top: -4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fs-muted);
}

.fs-dash-queue-link {
  color: var(--fs-primary);
  font-weight: 800;
  white-space: nowrap;
}

.fs-dash-queue.hidden {
  display: none !important;
}

/* A tappable card row (for example, join requests). */
.fs-dash-tap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  text-align: left;
}

/* Dashboard panels describe the kind of work they contain. The tint is a
   quiet category cue; the status pill carries the urgent state. */
.fs-dash-panel {
  box-shadow: none;
}

.fs-dash-panel-issues {
  background: #fffafb;
  border-color: rgba(225, 29, 72, 0.25);
}

.fs-dash-panel-activity {
  background: #ffffff;
}

.fs-dash-panel-issues .fs-dash-sec,
.fs-dash-panel-issues .fs-dash-sec-icon {
  color: #9f1239;
}

.fs-dash-panel .fs-list {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--fs-border);
  border-radius: 14px;
  background: #ffffff;
}

.fs-dash-panel .fs-row {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.fs-dash-panel .fs-row + .fs-row {
  border-top: 1px solid var(--fs-border);
}

.fs-dash-panel .fs-row:hover {
  border-color: transparent;
  background: rgba(37, 99, 235, 0.025);
}

.fs-dash-panel .fs-row:focus {
  box-shadow: inset 0 0 0 3px var(--fs-focus);
}

.fs-dash-row-content {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.fs-dash-row-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 10px;
  background: rgba(225, 29, 72, 0.10);
}

.fs-dash-row-icon img {
  width: 16px;
  height: 16px;
}

.fs-row-chevron {
  color: var(--fs-muted);
  font-weight: 900;
  font-size: 18px;
  flex: 0 0 auto;
}

.fs-dash-quick {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.fs-dash-quick-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--fs-surface);
  border: 1px solid var(--fs-border);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
  text-align: left;
}

.fs-dash-quick-item:disabled {
  opacity: 0.5;
}

.fs-dash-quick-item .fs-icon-bubble {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  flex: 0 0 34px;
}

.fs-dash-quick-item .fs-icon-bubble img {
  width: 18px;
  height: 18px;
}

.fs-dash-quick-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--fs-text);
}

.fs-dash-quick-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--fs-primary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fs-dash-quick-badge.hidden {
  display: none !important;
}

/* ------------------------------------------------------------------ */
/* Operational system reset                                           */
/* ------------------------------------------------------------------ */
/* A field tool needs clear edges, predictable spacing and status-led
   contrast. These rules deliberately override the earlier soft-card visual
   language while retaining the same component API across all screens. */
.fs-header {
  background: var(--flashover-blue);
  border-bottom-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.fs-header-circle,
.fs-header-pill,
.fs-switcher-panel,
.fs-tabbar-btn,
.fs-card,
.fs-input,
.fs-select,
.fs-btn,
.fs-row,
.fs-check-target,
.fs-sheet,
.fs-alert,
.fs-dash-tile,
.fs-dash-hero,
.fs-dash-quick-item {
  border-radius: var(--fs-radius-sm);
}

.fs-header-circle {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.30);
  box-shadow: none;
  transition: background-color 120ms ease;
}

.fs-header-circle-solid,
.fs-header-circle:active {
  background: rgba(255, 255, 255, 0.12);
}

.fs-header-pill {
  background: #0f1e38;
  border-color: rgba(255, 255, 255, 0.26);
  box-shadow: none;
  transition: background-color 120ms ease;
}

.fs-header-pill:active {
  background: #0b172b;
  transform: none;
}

.fs-confidentiality-banner {
  background: var(--red-action-1);
  color: #ffffff;
}

.fs-switcher-panel {
  border: 1px solid var(--fs-border);
  box-shadow: 0 16px 30px rgba(24, 33, 43, 0.20);
}

.fs-switcher-manage {
  background: var(--fs-surface-muted);
  color: var(--flashover-blue);
}

.fs-tabbar {
  background: #ffffff;
  backdrop-filter: none;
}

.fs-tabbar-btn {
  color: var(--fs-muted);
}

.fs-tabbar-btn[aria-current="page"] {
  color: var(--flashover-blue);
  background: #eaf0f9;
}

.fs-page {
  padding: 16px;
}

.fs-stack {
  gap: 16px;
}

.fs-card,
.fs-check-target {
  border-color: var(--fs-border);
  box-shadow: none;
}

.fs-card-attention {
  border-left: 3px solid var(--orange-action-1);
  border-color: var(--fs-border);
  box-shadow: none;
}

.fs-card-inner {
  padding: 16px;
}

.fs-card-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
}

.fs-card-subtitle,
.fs-row-meta {
  font-size: 14px;
}

.fs-input,
.fs-select {
  min-height: 44px;
  padding: 10px 12px;
  background: #ffffff;
}

.fs-input:focus,
.fs-select:focus {
  border-color: var(--fs-primary);
  box-shadow: 0 0 0 3px var(--fs-focus);
}

.fs-btn {
  min-height: 44px;
  padding: 10px 14px;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: none;
  transition: background-color 120ms ease, border-color 120ms ease, opacity 120ms ease;
}

.fs-btn:active {
  transform: none;
  opacity: 0.86;
}

.fs-btn-primary {
  background: var(--flashover-blue);
}

.fs-btn-primary:hover {
  background: #0f1e38;
}

.fs-btn-secondary {
  background: #ffffff;
  border-color: var(--fs-border);
}

.fs-btn-danger {
  background: var(--red-action-1);
}

.fs-row {
  min-height: 48px;
  padding: 11px 12px;
  border-color: var(--fs-border);
  box-shadow: none;
}

.fs-row-title {
  font-weight: 700;
}

button.fs-row:hover,
.fs-row-action:hover {
  border-color: var(--fs-primary);
  background: #f7faff;
}

button.fs-card:focus,
button.fs-row:focus,
.fs-row-action:focus {
  box-shadow: 0 0 0 3px var(--fs-focus);
}

.fs-icon-bubble,
.fs-dash-row-icon {
  border-radius: var(--fs-radius-sm);
  background: var(--fs-surface-muted);
}

.fs-pill {
  border-radius: 999px;
  box-shadow: none;
}

.fs-sheet {
  border: 1px solid var(--fs-border);
  border-radius: var(--fs-radius-lg);
  box-shadow: 0 18px 34px rgba(24, 33, 43, 0.22);
}

.fs-sheet-backdrop {
  background: rgba(24, 33, 43, 0.52);
  backdrop-filter: none;
}

.fs-dash-identity {
  padding-inline: 0;
}

.fs-dash-identity-kicker {
  color: var(--flashover-blue);
}

.fs-dash-identity-title {
  letter-spacing: -0.02em;
}

.fs-dash-tiles {
  gap: 8px;
}

.fs-dash-tile {
  padding: 12px 8px;
  border-color: var(--fs-border);
  box-shadow: none;
}

.fs-dash-tile-action:hover {
  border-color: var(--fs-primary);
  background: #f7faff;
}

.fs-dash-hero {
  padding: 16px;
  background: var(--flashover-blue);
  border-left: 4px solid #60a5fa;
  box-shadow: none;
}

.fs-dash-hero-resume {
  background: var(--flashover-blue);
  border-left-color: var(--orange-action-1);
  box-shadow: none;
}

.fs-dash-hero:active {
  transform: none;
  opacity: 0.92;
}

.fs-dash-hero-go {
  width: auto;
  height: auto;
  flex-basis: auto;
  padding-left: 12px;
  border-radius: 0;
  background: transparent;
}

.fs-dash-panel,
.fs-dash-panel-issues,
.fs-dash-panel-activity {
  background: #ffffff;
  border-color: var(--fs-border);
  box-shadow: none;
}

.fs-dash-panel-issues {
  border-left: 3px solid var(--red-action-1);
}

.fs-dash-panel .fs-list {
  border-color: var(--fs-border);
  border-radius: var(--fs-radius-sm);
}

.fs-dash-panel .fs-row:hover {
  background: #f7faff;
}

.fs-dash-quick {
  gap: 8px;
}

.fs-dash-quick-item {
  padding: 12px;
  box-shadow: none;
}

.fs-dash-quick-item .fs-icon-bubble {
  border-radius: var(--fs-radius-sm);
}

/* Fleet board. Sits on the page background rather than inside a panel: the
   tiles are the cards, and nesting them in another one flattens the whole
   dashboard into the same shape. Each tile ends in one verdict strip, with the
   defect count on its own line directly above it. */
.fs-dash-fleet-panel .fs-dash-sec,
.fs-dash-fleet-panel .fs-dash-sec-icon {
  color: var(--green-action-1);
}

.fs-dash-fleet-panel-issues .fs-dash-sec,
.fs-dash-fleet-panel-issues .fs-dash-sec-icon {
  color: var(--red-action-1);
}

.fs-dash-fleet {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.fs-dash-fleet-empty {
  grid-column: 1 / -1;
  padding: 14px;
  background: var(--fs-surface);
  border: 1px solid var(--fs-border);
  border-radius: var(--fs-radius-sm);
  color: var(--fs-muted);
  font-size: 13px;
}

.fs-dash-fleet-tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  text-align: left;
  background: var(--fs-surface);
  border: 1px solid var(--fs-border);
  border-radius: var(--fs-radius-sm);
}

.fs-dash-fleet-tile:hover {
  border-color: var(--fs-primary);
}

.fs-dash-fleet-tile:focus-visible {
  box-shadow: 0 0 0 3px var(--fs-focus);
}

.fs-dash-fleet-body {
  min-width: 0;
  padding: 12px 12px 10px;
}

.fs-dash-fleet-icon {
  display: block;
  width: 26px;
  height: 26px;
}

.fs-dash-fleet-name {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--fs-text);
  overflow-wrap: anywhere;
}

.fs-dash-fleet-meta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--fs-muted);
}

.fs-dash-fleet-sub {
  margin-top: 1px;
  font-size: 12px;
  color: var(--fs-muted);
  opacity: 0.85;
}

/* Pinned to the bottom so strips line up across a row of unequal-height tiles. */
.fs-dash-fleet-foot {
  margin-top: auto;
}

.fs-dash-fleet-reminders {
  border-top: 1px solid var(--fs-border);
}

.fs-dash-fleet-reminder {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

.fs-dash-fleet-reminder + .fs-dash-fleet-reminder {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.fs-dash-fleet-reminder.is-amber {
  background: rgba(245, 158, 11, 0.12);
  color: #9a5b05;
}

.fs-dash-fleet-reminder.is-red {
  background: rgba(180, 35, 24, 0.10);
  color: var(--red-action-1);
}

.fs-dash-fleet-reminder img {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin-top: 1px;
}

.fs-dash-fleet-issues {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(180, 35, 24, 0.10);
  color: var(--red-action-1);
  font-size: 12px;
  font-weight: 700;
}

.fs-dash-fleet-issues img {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.fs-dash-fleet-strip {
  padding: 6px 12px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  background: var(--fs-muted);
}

.fs-dash-fleet-strip-ready {
  background: var(--green-action-1);
}

.fs-dash-fleet-strip-due {
  background: var(--orange-action-1);
}

.fs-dash-fleet-strip-overdue,
.fs-dash-fleet-strip-issues {
  background: var(--red-action-1);
}

@media (min-width: 1024px) {
  body.fs-viewport > .fs-tabbar {
    background: var(--flashover-blue);
    box-shadow: none;
  }

  .fs-tabbar-btn,
  .fs-desktop-account {
    border-radius: var(--fs-radius-sm);
  }

  .fs-tabbar-btn[aria-current="page"] {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 3px 0 0 #ffffff;
  }

  .fs-tabbar-badge {
    box-shadow: 0 0 0 2px var(--flashover-blue);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ------------------------------------------------------------------ */
/* Operational consistency across app-shell screens                    */
/* ------------------------------------------------------------------ */
/* Screens share the same components, but the setup and check flows add
   their own local styles. These higher-specificity rules keep every route
   within the flat, status-led system without changing its workflow. */
body .fs-grid {
  gap: 12px;
}

body .fs-field {
  gap: 6px;
}

body .fs-notification-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  cursor: pointer;
}

body .fs-notification-toggle-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  min-height: 44px;
  cursor: pointer;
}

body .fs-notification-toggle-control > input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  opacity: 0;
  pointer-events: none;
}

body .fs-notification-toggle-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 48px;
  height: 28px;
  padding: 3px;
  background: #98a5b3;
  border: 1px solid #7f8d9c;
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(24, 33, 43, 0.18);
  transition: background-color 160ms ease-out, border-color 160ms ease-out;
}

body .fs-notification-toggle-thumb {
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(24, 33, 43, 0.28);
  transform: translateX(0);
  transition: transform 160ms ease-out;
}

body .fs-notification-toggle-control > input:checked + .fs-notification-toggle-track {
  background: var(--fs-primary);
  border-color: var(--fs-primary);
}

body .fs-notification-toggle-control > input:checked + .fs-notification-toggle-track .fs-notification-toggle-thumb {
  transform: translateX(20px);
}

body .fs-notification-toggle-control > input:focus-visible + .fs-notification-toggle-track {
  outline: 3px solid var(--fs-focus);
  outline-offset: 3px;
}

body .fs-notification-toggle-control:active .fs-notification-toggle-track {
  opacity: 0.84;
}

body .fs-label {
  color: var(--fs-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

body .fs-list {
  border-radius: var(--fs-radius-sm);
}

body .fs-list > .fs-row:first-child {
  border-top: 0;
}

body .fs-check-target {
  border-left: 3px solid var(--fs-primary);
  background: #ffffff;
}

body .fs-check-target-header,
body .fs-check-target-actions {
  background: transparent;
}

body .fs-notification-row-unread {
  background: #f7faff;
  border-left: 3px solid var(--fs-primary);
}

body .fs-unread-dot {
  background: var(--fs-primary);
  box-shadow: none;
}

body .fs-action-card-inner {
  min-height: 64px;
  padding: 14px 16px;
}

body .fs-action-card-title,
body .fs-card-title {
  color: var(--fs-text);
}

body .fs-row-actions .fs-btn,
body .fs-actions .fs-btn {
  min-width: 0;
}

/* Appliance schedule and setup editor */
body .fs-schedule-seg button,
body .fs-schedule-stepper button,
body .fs-schedule-days button {
  min-height: 40px;
  border-radius: var(--fs-radius-sm);
  background: #ffffff;
  box-shadow: none;
}

body .fs-schedule-seg button[aria-pressed="true"],
body .fs-schedule-days button[aria-pressed="true"] {
  background: var(--flashover-blue);
  border-color: var(--flashover-blue);
}

body .fs-setup-toolbar,
body .fs-check-toolbar,
body .fs-check-actions {
  background: var(--background);
  border-color: var(--fs-border);
  box-shadow: none;
  backdrop-filter: none;
}

body .fs-setup-kicker,
body .fs-check-kicker {
  color: var(--fs-muted);
  letter-spacing: 0.06em;
}

body .fs-setup-title,
body .fs-check-title {
  color: var(--fs-text);
}

body .fs-setup-list {
  gap: 8px;
}

body .fs-setup-row,
body .fs-setup-item-card,
body .fs-setup-modal-card,
body .fs-setup-image-picker {
  border-radius: var(--fs-radius-sm) !important;
  box-shadow: none !important;
}

body .fs-setup-row {
  border-color: var(--fs-border);
}

body .fs-setup-badge,
body .fs-setup-plus {
  border-radius: var(--fs-radius-sm);
  background: var(--fs-surface-muted);
}

body .fs-setup-item-card {
  border-color: var(--fs-border);
  background: #ffffff;
}

body .fs-setup-item-card.is-add {
  border-color: var(--fs-primary);
  background: #f7faff;
}

body .fs-setup-item-card.is-drop-before,
body .fs-setup-item-card.is-drop-after,
body .fs-setup-drop-before,
body .fs-setup-drop-after {
  box-shadow: none !important;
}

body .fs-setup-item-card.is-drop-before,
body .fs-setup-drop-before { border-left: 3px solid var(--fs-primary); }
body .fs-setup-item-card.is-drop-after,
body .fs-setup-drop-after { border-right: 3px solid var(--fs-primary); }

body .fs-setup-image-picker {
  border-color: var(--fs-primary);
  background: #f7faff;
}

body .fs-setup-progress,
body .fs-check-progress-bar {
  border-radius: 2px;
  background: var(--fs-surface-muted);
}

body .fs-setup-progress > div,
body .fs-check-progress-fill {
  border-radius: 0;
  background: var(--fs-primary);
}

/* Check runner: semantic colour is reserved for check state only. */
body .fs-check-photo,
body .fs-check-thumb,
body .fs-check-tile,
body .fs-check-note-img,
body .fs-check-note-preview-img,
body .fs-check-signature,
body .fs-signature-pad,
body .fs-check-summary-row,
body .fs-check-modal-card {
  border-radius: var(--fs-radius-sm) !important;
  box-shadow: none !important;
}

/* A signature is a drawing surface, not a page scroll gesture. */
body .fs-signature-pad {
  touch-action: none;
}

body .fs-check-photo,
body .fs-check-thumb,
body .fs-check-note-img,
body .fs-check-note-preview-img {
  background: var(--fs-surface-muted);
  border-color: var(--fs-border);
}

body .fs-check-tile {
  border-color: var(--fs-border);
  background: #ffffff;
  transition: border-color 120ms ease, background-color 120ms ease;
}

body .fs-check-tile:hover {
  transform: none;
  border-color: var(--fs-primary);
  background: #f7faff;
}

body .fs-check-tile.is-active,
body .fs-check-status-row.fs-row-active {
  border-color: var(--fs-primary);
  background: #eaf0f9;
  box-shadow: inset 3px 0 0 var(--fs-primary) !important;
}

body .fs-check-tile.is-active::after {
  border-radius: 2px;
  border-color: var(--flashover-blue);
  background: var(--flashover-blue);
  box-shadow: none;
}

body .fs-check-tile.status-present { border-color: var(--green-action-1); background: #f0fdf4; }
body .fs-check-tile.status-missing { border-color: var(--red-action-1); background: #fff5f5; }
body .fs-check-tile.status-note,
body .fs-check-tile.status-partial { border-color: var(--orange-action-1); background: #fff8eb; }

body .fs-check-pill,
body .fs-check-selected-marker {
  border-radius: var(--fs-radius-sm);
  box-shadow: none;
}

body .fs-check-pill.present,
body .fs-check-action.present { background: var(--green-action-1); }
body .fs-check-pill.missing,
body .fs-check-action.missing { background: var(--red-action-1); }
body .fs-check-pill.note,
body .fs-check-action.note { background: var(--orange-action-1); }
body .fs-check-pill.partial { background: var(--orange-action-1); color: #ffffff; }
body .fs-check-selected-marker { background: var(--flashover-blue); }

body .fs-check-action {
  border-radius: var(--fs-radius-sm);
  box-shadow: none;
}

body .fs-check-summary-row {
  background: #ffffff;
  border-color: var(--fs-border);
}

@media (max-width: 560px) {
  body .fs-check-tile,
  body .fs-check-thumb { border-radius: 3px !important; }
}

/* Shared level selector. The dial gives the quick gauge-shaped reading while
   the nine segments make every stored eighth explicit and easy to tap. */
.fs-level-gauge {
  --level-gauge-blue: var(--flashover-blue, #172554);
  --level-gauge-low: var(--red-action-1, #b42318);
  --level-gauge-track: #dfe5ec;
  --level-gauge-band: #f6d5d1;
  display: grid;
  gap: 10px;
  width: min(100%, 400px);
  margin-inline: auto;
}
.fs-level-gauge-dial {
  position: relative;
  width: min(100%, 320px);
  margin-inline: auto;
  touch-action: none;
  cursor: pointer;
  border-radius: var(--fs-radius-md, 6px);
}
.fs-level-gauge-dial svg {
  display: block;
  width: 100%;
  height: auto;
}

/* One track carries three layers: the empty dial, the no-go band, and the
   reading itself, so they always line up to the pixel. */
.fs-level-gauge-arc,
.fs-level-gauge-low-arc,
.fs-level-gauge-fill {
  fill: none;
  stroke-width: 15;
  stroke-linecap: butt;
}
.fs-level-gauge-arc { stroke: var(--level-gauge-track); }
.fs-level-gauge-low-arc { stroke: var(--level-gauge-band); }
.fs-level-gauge-fill { stroke: var(--level-gauge-blue); }
.fs-level-gauge-fill.is-low { stroke: var(--level-gauge-low); }
.fs-level-gauge-low-arc.is-empty,
.fs-level-gauge-fill.is-empty { display: none; }

.fs-level-gauge-tick {
  stroke: #97a4b4;
  stroke-width: 2.5;
  stroke-linecap: round;
}
.fs-level-gauge-tick.is-major {
  stroke: #55647a;
  stroke-width: 4;
}
.fs-level-gauge-mark-label {
  fill: #35475e;
  font-size: 16px;
  font-weight: 800;
}
.fs-level-gauge-minimum-casing {
  stroke: var(--fs-surface, #fff);
  stroke-width: 9;
  stroke-linecap: round;
}
.fs-level-gauge-minimum-mark {
  stroke: var(--level-gauge-low);
  stroke-width: 4;
  stroke-linecap: round;
}
.fs-level-gauge-needle {
  fill: var(--level-gauge-blue);
  /* Rotated about the dial hub in viewBox units, so the swing is one
     transition rather than an animated pair of endpoints. */
  transform-box: view-box;
  transform-origin: 150px 150px;
  transition: transform 130ms ease-out, opacity 130ms ease-out;
}
.fs-level-gauge-needle.is-empty { opacity: 0; }
.fs-level-gauge-hub {
  fill: #fff;
  stroke: var(--level-gauge-blue);
  stroke-width: 6;
}
.fs-level-gauge-dial:focus-visible {
  outline: 3px solid var(--fs-focus, rgba(29, 78, 216, 0.35));
  outline-offset: 2px;
}

.fs-level-gauge-readout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 26px;
}
.fs-level-gauge-readout-value {
  color: var(--fs-text, #18212b);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
}
.fs-level-gauge-readout-value.is-placeholder {
  color: var(--fs-muted, #5b6875);
  font-size: 15px;
  font-weight: 700;
}
.fs-level-gauge-readout.is-low .fs-level-gauge-readout-value { color: var(--level-gauge-low); }
.fs-level-gauge-readout-flag {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(180, 35, 24, 0.1);
  color: var(--level-gauge-low);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .01em;
  text-transform: uppercase;
}

/* A segmented control: one bordered strip rather than nine loose boxes, so the
   nine eighths read as a single scale from Empty to Full. */
.fs-level-gauge-options {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  border: 1px solid var(--fs-border, #cdd5df);
  border-radius: var(--fs-radius-md, 6px);
  background: var(--fs-surface, #fff);
  overflow: hidden;
}
.fs-level-gauge-options button {
  position: relative;
  min-height: 44px;
  padding-inline: 2px;
  border: 0;
  border-left: 1px solid var(--fs-border, #cdd5df);
  background: transparent;
  color: var(--fs-text, #18212b);
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}
.fs-level-gauge-options button:first-child { border-left: 0; }
.fs-level-gauge-options button:hover { background: var(--fs-surface-muted, #eef1f4); }
.fs-level-gauge-options button.is-selected {
  background: var(--level-gauge-blue);
  border-left-color: var(--level-gauge-blue);
  color: #fff;
}
.fs-level-gauge-options button.is-selected + button { border-left-color: var(--level-gauge-blue); }
.fs-level-gauge-options button:focus-visible {
  outline: 3px solid var(--fs-focus, rgba(29, 78, 216, 0.35));
  outline-offset: -3px;
  z-index: 1;
}

.fs-level-gauge-none {
  min-height: 40px;
  padding: 7px 14px;
  border: 1px solid var(--fs-border, #cdd5df);
  border-radius: var(--fs-radius-md, 6px);
  background: var(--fs-surface, #fff);
  color: var(--fs-muted, #5b6875);
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}
.fs-level-gauge-none:hover { background: var(--fs-surface-muted, #eef1f4); }
.fs-level-gauge-none.is-selected {
  border-color: var(--level-gauge-blue);
  background: var(--level-gauge-blue);
  color: #fff;
}
.fs-level-gauge-none:focus-visible {
  outline: 3px solid var(--fs-focus, rgba(29, 78, 216, 0.35));
  outline-offset: 2px;
}

.fs-level-gauge-minimum-key {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--fs-muted, #5b6875);
  font-size: 12px;
  font-weight: 700;
}
.fs-level-gauge-minimum-key::before {
  content: "";
  width: 16px;
  border-top: 4px solid var(--red-action-1, #b42318);
  border-radius: 2px;
}

@media (max-width: 380px) {
  .fs-level-gauge-options button {
    min-height: 40px;
    padding-inline: 0;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fs-level-gauge-needle { transition: none; }
}
