:root {
  --fb-bg: #fff7ed;
  --fb-surface: #ffffff;
  --fb-surface-2: #ffedd5;
  --fb-border: #fed7aa;
  --fb-border-soft: #fee2c0;
  --fb-surface-warm: #fffaf5;
  --fb-navy: #1C2C59;
  --fb-navy-2: #29407e;
  --fb-orange: #F59321;
  --fb-orange-soft: #f7ab4d;
  --fb-text: #172033;
  --fb-muted: #687385;
  --fb-success: #15803d;
  --fb-focus-ring: rgba(245, 147, 33, 0.18);
  --fb-shadow-card: 0 1px 2px rgba(124, 45, 18, 0.05), 0 18px 45px rgba(124, 45, 18, 0.08);
  --fb-shadow-nav: 0 12px 30px rgba(28, 44, 89, 0.18);
}

html {
  min-height: 100%;
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--fb-bg);
  color: var(--fb-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: var(--fb-navy-2);
}
.location-map-picker { display: grid; gap: 10px; margin: 14px 0 16px; }
.location-map-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.location-map-toolbar strong { display: block; color: var(--fb-navy); font-weight: 900; }
.location-map-toolbar small, .location-map-help { color: var(--fb-muted); }
.location-map-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.location-map-status { min-height: 1.2rem; color: var(--fb-muted); font-size: .88rem; font-weight: 750; }
.location-map-status.is-error { color: #b91c1c; }
.location-map-help { margin: 0; font-size: .9rem; }
.location-map-canvas { width: 100%; min-height: 520px; border: 1px solid var(--fb-border); border-radius: 8px; overflow: hidden; background: #e5e7eb; }
.location-red-pin { position: relative; }
.location-red-pin span { position: absolute; left: 50%; top: 0; width: 30px; height: 30px; transform: translateX(-50%) rotate(-45deg); transform-origin: center; border: 3px solid #fff; border-radius: 50% 50% 50% 0; background: #dc2626; box-shadow: 0 4px 12px rgba(15,23,42,.38); }
.location-red-pin span::after { content: ''; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; transform: translate(-50%, -50%); border-radius: 50%; background: #fff; }
@media (max-width: 720px) { .location-map-toolbar { align-items: stretch; flex-direction: column; } .location-map-search { grid-template-columns: 1fr; } .location-map-canvas { min-height: 380px; } }
.route-stop-row { display: grid; grid-template-columns: 34px minmax(180px,2fr) minmax(130px,1fr) 130px minmax(180px,2fr) auto; gap: 10px; align-items: end; margin-bottom: 10px; padding: 12px; border: 1px solid #dbeafe; border-radius: 12px; background: #f8fafc; }
.route-stop-order { display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 5px; border-radius: 50%; background: var(--fb-navy); color: #fff; font-weight: 850; }
@media (max-width: 900px) { .route-stop-row { grid-template-columns: 34px 1fr; } .route-stop-row > label, .route-stop-row > button { grid-column: 2; } }
.route-preview-map { width: 100%; min-height: 520px; border: 1px solid var(--fb-border); border-radius: 8px; overflow: hidden; background: #e5e7eb; }
.route-preview-status { min-height: 1.3rem; margin-bottom: 10px; color: var(--fb-muted); font-weight: 750; }
.route-preview-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 12px; }
.route-option { display: grid; grid-template-columns: 18px 1fr; gap: 3px 9px; align-items: center; padding: 10px 12px; border: 1px solid var(--fb-border); border-radius: 8px; background: #fff; color: var(--fb-text); text-align: left; }
.route-option span { width: 18px; height: 18px; border-radius: 50%; }
.route-option strong { color: var(--fb-navy); }
.route-option small { grid-column: 2; color: var(--fb-muted); }
.route-option.is-selected { border-color: var(--fb-orange); box-shadow: 0 0 0 3px var(--fb-focus-ring); }
.route-map-pin { position: relative; }
.route-map-pin span { position: absolute; left: 50%; top: 0; display: grid; place-items: center; width: 34px; height: 34px; transform: translateX(-50%) rotate(-45deg); transform-origin: center; border: 3px solid #fff; border-radius: 50% 50% 50% 0; background: #f97316; color: #fff; box-shadow: 0 4px 12px rgba(15,23,42,.38); font-size: .78rem; font-weight: 900; }
.route-map-pin span::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: rgba(255,255,255,.18); }
.route-map-pin b { position: relative; z-index: 1; transform: rotate(45deg); line-height: 1; }
.route-map-pin.is-manual span { background: #2563eb; }
@media (max-width: 720px) { .route-preview-map { min-height: 380px; } }

.fleet-nav {
  background: var(--fb-navy);
  border-bottom: 4px solid var(--fb-orange);
  box-shadow: var(--fb-shadow-nav);
}

.fleet-nav .navbar-brand,
.fleet-nav .nav-link {
  color: #fff7ed;
  font-weight: 800;
}

.fleet-nav .navbar-brand {
  letter-spacing: 0;
}

.fleetbox-brand {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding-block: 0;
}

.fleetbox-brand img {
  display: block;
  width: auto;
  height: 34px;
  max-width: 154px;
  object-fit: contain;
}

.fleet-nav .nav-link {
  color: rgba(255, 247, 237, 0.84);
}

.fleet-nav .navbar-text,
.fleet-nav .fleet-nav-muted {
  color: rgba(255, 247, 237, 0.72);
  font-weight: 750;
}

.fleet-nav .btn-link.nav-link {
  width: 100%;
  border: 0;
  color: rgba(255, 247, 237, 0.84);
  text-align: left;
  text-decoration: none;
}

.fleet-nav .nav-link:hover,
.fleet-nav .nav-link:focus,
.fleet-nav .btn-link.nav-link:hover,
.fleet-nav .btn-link.nav-link:focus {
  color: white;
}

.fleet-auth-nav {
  align-items: stretch;
}

.global-search {
  position: relative;
  align-self: center;
  width: min(320px, 28vw);
  margin-inline: 12px;
}

.tenant-pill {
  display: grid;
  gap: 1px;
  align-self: center;
  max-width: 220px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 247, 237, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff7ed;
  text-decoration: none;
}

.tenant-pill:hover,
.tenant-pill:focus {
  border-color: rgba(255, 247, 237, 0.54);
  color: #fff;
}

.tenant-pill span {
  font-size: .64rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .72;
}

.tenant-pill strong {
  overflow: hidden;
  font-size: .82rem;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search .form-control {
  min-height: 38px;
  border-color: rgba(255, 247, 237, 0.32);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.global-search .form-control::placeholder {
  color: rgba(255, 247, 237, 0.74);
}

.global-search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1200;
  width: min(460px, 90vw);
  overflow: hidden;
  border: 1px solid var(--fb-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.22);
}

.global-search-item {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  color: var(--fb-text);
  text-decoration: none;
}

.global-search-item:hover,
.global-search-item:focus,
.global-search-item[aria-selected="true"] {
  background: #fff7ed;
}

.global-search-item:focus-visible,
.live-select-option:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid var(--fb-orange);
  outline-offset: -3px;
}

.global-search-item span {
  color: var(--fb-orange);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.global-search-item strong {
  color: var(--fb-navy);
}

.global-search-item small,
.global-search-empty {
  color: var(--fb-muted);
}

.global-search-empty {
  padding: 12px;
  font-weight: 750;
}

.live-select {
  position: relative;
  display: grid;
  gap: 6px;
}

.live-select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.live-select-options {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 1000;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--fb-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
}

.live-select-option {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--fb-border-soft);
  background: #fff;
  color: var(--fb-text);
  text-align: left;
}

.live-select-option:hover,
.live-select-option:focus {
  background: #fff7ed;
}

.live-select-option[aria-pressed="true"] {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 850;
}

.live-select-empty {
  padding: 10px 12px;
  color: var(--fb-muted);
  font-weight: 750;
}

.navbar-toggler {
  border-color: rgba(255, 247, 237, 0.45);
  background: #fff7ed;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(245, 147, 33, 0.28);
}

.app-container {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1240px;
  padding: 22px 16px 80px;
}

.page-shell {
  display: grid;
  gap: 18px;
}

.footer {
  flex-shrink: 0;
  padding: 18px 0;
  border-top: 1px solid var(--fb-border-soft);
  background: rgba(255, 250, 245, 0.82);
  color: var(--fb-muted);
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 12px 0 20px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 10px;
  color: var(--fb-muted);
  font-size: .84rem;
  font-weight: 800;
}

.breadcrumbs a {
  color: var(--fb-navy-2);
  text-decoration: none;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus {
  text-decoration: underline;
}

.breadcrumbs span:not(:last-child)::after,
.breadcrumbs a:not(:last-child)::after {
  content: "/";
  margin-left: 6px;
  color: #9ca3af;
}

.page-heading h1 {
  margin: 0;
  color: var(--fb-navy);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 850;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--fb-orange);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-kicker {
  display: block;
  margin: 0 0 7px;
  color: var(--fb-orange);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-copy {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--fb-muted);
  font-size: 1rem;
}

.heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin: -8px 0 18px;
}

.shortcut-link {
  display: grid;
  gap: 4px;
  min-height: 78px;
  padding: 12px 14px;
  border: 1px solid var(--fb-border);
  border-radius: 8px;
  background: #fff;
  color: var(--fb-text);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(124, 45, 18, 0.04);
}

.shortcut-link:hover,
.shortcut-link:focus {
  border-color: var(--fb-orange);
  color: var(--fb-text);
}

.shortcut-link span {
  color: var(--fb-orange);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.shortcut-link strong {
  color: var(--fb-navy);
  font-size: .98rem;
  line-height: 1.15;
}

.manual-content pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--fb-text);
  font: inherit;
  line-height: 1.55;
}

.notification-list {
  display: grid;
  gap: 10px;
}

.notification-row {
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--fb-border);
  border-radius: 8px;
  background: #fff;
}

.notification-row.is-unread {
  border-color: rgba(245, 147, 33, 0.45);
  background: #fffaf3;
}

.notification-marker {
  width: 6px;
  height: 100%;
  min-height: 44px;
  border-radius: 999px;
  background: #64748b;
}

.notification-marker.tone-critical {
  background: #dc2626;
}

.notification-marker.tone-warning {
  background: #d97706;
}

.notification-marker.tone-success {
  background: #15803d;
}

.notification-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.notification-row p {
  margin: 6px 0;
  color: var(--fb-muted);
}

.notification-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.surface {
  padding: 18px;
  border: 1px solid var(--fb-border);
  border-radius: 14px;
  background: var(--fb-surface);
  box-shadow: var(--fb-shadow-card);
}

.form-card,
.filter-panel {
  padding: 18px;
  border: 1px solid var(--fb-border);
  border-radius: 14px;
  background: var(--fb-surface);
  box-shadow: var(--fb-shadow-card);
}

.surface-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.surface-header h2,
.form-section h2 {
  margin: 0;
  color: var(--fb-navy);
  font-size: 1rem;
  font-weight: 850;
}

.surface-header span,
.asset-meta,
.asset-side span,
.empty-state {
  color: var(--fb-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  min-width: 118px;
  padding-inline: 16px;
  border-radius: 10px;
  font-weight: 850;
  line-height: 1.1;
  white-space: nowrap;
}

.btn-primary {
  border-color: var(--fb-navy);
  background: var(--fb-navy);
}

.btn-primary:hover,
.btn-primary:focus {
  border-color: var(--fb-navy-2);
  background: var(--fb-navy-2);
}

.btn-secondary {
  border-color: var(--fb-border);
  background: #fff;
  color: var(--fb-navy);
}

.btn-sm {
  min-height: 38px;
  min-width: 86px;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 0.88rem;
}

.btn-view {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.btn-edit {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.btn-archive {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}

.btn-danger-soft {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.btn-view:hover,
.btn-view:focus {
  border-color: #93c5fd;
  background: #dbeafe;
  color: #1e40af;
}

.btn-edit:hover,
.btn-edit:focus {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}

.btn-archive:hover,
.btn-archive:focus {
  border-color: #fcd34d;
  background: #fef3c7;
  color: #92400e;
}

.btn-danger-soft:hover,
.btn-danger-soft:focus {
  border-color: #fca5a5;
  background: #fee2e2;
  color: #991b1b;
}

.btn:disabled,
.btn.disabled {
  border-color: #d1d5db;
  background: #f3f4f6;
  color: #9ca3af;
  opacity: 1;
  cursor: not-allowed;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-tile {
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--fb-border);
  border-radius: 14px;
  background: #fff;
  color: var(--fb-text);
  text-decoration: none;
  box-shadow: var(--fb-shadow-card);
  transition: border-color 150ms ease, transform 150ms ease;
}

.dashboard-tile:hover,
.dashboard-tile:focus {
  border-color: var(--fb-orange);
  transform: translateY(-2px);
}

.dashboard-tile span {
  display: block;
  margin-bottom: 10px;
  color: var(--fb-orange);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-tile strong {
  color: var(--fb-navy);
  font-size: 1.35rem;
  line-height: 1.1;
}

.dashboard-updated { color: var(--fb-muted); font-size: 0.82rem; font-weight: 800; align-self: center; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.metric-card, .metric-card[class*="tone-"] { display: grid; gap: 5px; min-height: 132px; padding: 16px; border: 1px solid var(--fb-border); border-top: 4px solid var(--fb-navy); border-radius: 13px; background: #fff; color: var(--fb-text); text-decoration: none; box-shadow: var(--fb-shadow-card); }
.metric-card:hover { color: var(--fb-text); transform: translateY(-2px); }
.metric-card span { color: #475569; font-size: 0.76rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; }
.metric-card strong { color: var(--fb-navy); font-size: 2rem; line-height: 1; }
.metric-card small { color: #475569; font-size: 0.78rem; font-weight: 650; }
.metric-card.tone-success { border-top-color: #15803d; } .metric-card.tone-danger { border-top-color: #dc2626; } .metric-card.tone-warning, .metric-card.tone-orange { border-top-color: #f59321; } .metric-card.tone-purple { border-top-color: #7c3aed; } .metric-card.tone-neutral { border-top-color: #64748b; } .metric-card.tone-navy { border-top-color: var(--fb-navy); }
.dashboard-analysis-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.dashboard-chart-card { min-height: 220px; }
.stacked-bar { display: flex; height: 28px; overflow: hidden; border-radius: 8px; background: #e2e8f0; }
.stacked-bar span { min-width: 0; }
.tone-success { background: #15803d; } .tone-warning { background: #f59321; } .tone-danger { background: #dc2626; } .tone-navy { background: var(--fb-navy); } .tone-neutral { background: #94a3b8; } .tone-purple { background: #7c3aed; } .tone-orange { background: #f59321; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; color: var(--fb-muted); font-size: 0.8rem; }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; } .chart-legend i { width: 9px; height: 9px; border-radius: 50%; }
.horizontal-chart { display: grid; gap: 10px; }
.horizontal-chart > div { display: grid; grid-template-columns: 78px minmax(0, 1fr) 32px; align-items: center; gap: 9px; font-size: 0.8rem; }
.horizontal-chart > div > div { height: 12px; overflow: hidden; border-radius: 6px; background: #e2e8f0; } .horizontal-chart i { display: block; height: 100%; border-radius: inherit; }
.attention-list { display: grid; gap: 7px; max-height: 360px; overflow-y: auto; overscroll-behavior: contain; padding-right: 3px; scrollbar-gutter: stable; }
.attention-list:focus-visible { outline: 3px solid color-mix(in srgb, var(--fb-primary) 35%, transparent); outline-offset: 3px; }
.attention-list a { display: grid; grid-template-columns: 5px minmax(0, 1fr); gap: 10px; padding: 9px 10px; border: 1px solid var(--fb-border-soft); border-radius: 9px; color: var(--fb-text); text-decoration: none; }
.attention-list a > i { border-radius: 5px; } .attention-list span { display: grid; gap: 2px; } .attention-list strong { color: var(--fb-navy); font-size: 0.84rem; } .attention-list small { color: var(--fb-muted); font-size: 0.76rem; }
.dashboard-content { display: flex; flex-direction: column; }
.battery-report { order: 10; margin-top: 14px; }
.battery-insights { margin-bottom: 14px; overflow: visible; background: linear-gradient(145deg, #ffffff 0%, #f8fbff 62%, #eff6ff 100%); }
.battery-insights-header { align-items: flex-start; }
.battery-insight-search { display: grid; grid-template-columns: minmax(260px, 520px) auto; align-items: start; gap: 10px; margin: 16px 0 8px; }
.battery-insight-search label { display: grid; gap: 6px; color: #334155; font-size: .75rem; font-weight: 850; }
.battery-insight-submit { min-height: 38px; margin-top: 24px; }
.battery-insight-search .btn:disabled { cursor: not-allowed; opacity: .55; }
.battery-discovery { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 0 0 16px; color: #64748b; font-size: .73rem; font-weight: 750; }
.battery-discovery button { padding: 5px 9px; border: 1px solid #bfdbfe; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font: inherit; cursor: pointer; }
.battery-discovery button:hover, .battery-discovery button:focus { border-color: #2563eb; background: #dbeafe; }
.battery-discovery small { flex-basis: 100%; color: #64748b; }
.battery-tracker-state { display: flex !important; align-items: center; gap: 7px !important; min-height: 26px; color: #64748b !important; font-size: .72rem !important; font-weight: 750 !important; }
.battery-tracker-state i { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #94a3b8; }
.battery-tracker-state.is-selected { color: #166534 !important; }
.battery-tracker-state.is-selected i { background: #16a34a; box-shadow: 0 0 0 4px #dcfce7; }
.battery-scope-banner { display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; padding: 12px 14px; border: 1px solid #dbeafe; border-radius: 12px; background: #eff6ff; }
.battery-scope-banner > span { min-width: 64px; padding: 6px 8px; border-radius: 999px; background: #dbeafe; color: #1d4ed8; font-size: .68rem; font-weight: 900; letter-spacing: .06em; text-align: center; }
.battery-scope-banner > div { display: grid; gap: 2px; }
.battery-scope-banner strong { color: var(--fb-navy); font-size: .84rem; }
.battery-scope-banner small { color: #64748b; font-size: .73rem; }
.battery-scope-banner.is-tracker { border-color: #bbf7d0; background: #f0fdf4; }
.battery-scope-banner.is-tracker > span { background: #dcfce7; color: #166534; }
.battery-insight-grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 16px; }
.battery-insight-chart { min-height: 310px; padding: 18px; border: 1px solid #dbeafe; border-radius: 16px; background: rgba(255,255,255,.88); box-shadow: 0 12px 28px rgba(30,64,175,.08); }
.battery-chart-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.battery-chart-title > div { display: grid; gap: 3px; }
.battery-chart-title strong { color: var(--fb-navy); font-size: 1rem; }
.battery-chart-title span { color: var(--fb-muted); font-size: .78rem; }
.battery-view-badge { padding: 5px 9px; border-radius: 999px; background: #dbeafe; color: #1d4ed8 !important; font-weight: 850; white-space: nowrap; }
.battery-view-badge.is-selected { background: #dcfce7; color: #166534 !important; }
.battery-insight-chart svg { display: block; width: 100%; min-height: 235px; margin-top: 8px; overflow: visible; }
.battery-insight-chart text { fill: #64748b; font-size: 11px; }
.battery-grid-line { stroke: #e2e8f0; stroke-width: 1; stroke-dasharray: 4 5; }
.battery-area { fill: url(#battery-area); }
.battery-trend-line { fill: none; stroke: #2563eb; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.battery-insight-chart circle { fill: #fff; stroke: #2563eb; stroke-width: 3; }
.battery-insight-chart circle.charge-point { fill: #f59e0b; stroke: #fff; }
.battery-axis-date { font-weight: 750; }
.battery-chart-empty { display: grid; min-height: 230px; place-items: center; color: #64748b; text-align: center; }
.battery-insight-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.battery-insight-stats > div { display: flex; min-height: 104px; flex-direction: column; justify-content: center; padding: 14px; border: 1px solid #dbeafe; border-radius: 14px; background: rgba(255,255,255,.92); }
.battery-insight-stats .battery-primary-stat { grid-column: 1 / -1; min-height: 134px; color: #fff; border: 0; background: linear-gradient(135deg, #172554, #2563eb); box-shadow: 0 12px 25px rgba(37,99,235,.22); }
.battery-insight-stats span { color: #64748b; font-size: .7rem; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; }
.battery-insight-stats strong { margin-top: 5px; color: var(--fb-navy); font-size: 1.55rem; line-height: 1; }
.battery-insight-stats small { margin-top: 6px; color: #64748b; font-size: .7rem; }
.battery-insight-stats .battery-primary-stat span, .battery-insight-stats .battery-primary-stat small { color: #dbeafe; }
.battery-insight-stats .battery-primary-stat strong { color: #fff; font-size: 2.5rem; }
.battery-filters { display: grid; grid-template-columns: repeat(6, minmax(130px, 1fr)); align-items: end; gap: 10px; }
.battery-filters label { display: grid; gap: 5px; color: #334155; font-size: .75rem; font-weight: 850; }
.battery-report-help { margin: 12px 0; color: #475569; font-size: .8rem; font-weight: 650; }
.battery-charge-key { display: inline-block; width: 11px; height: 11px; margin-right: 5px; border: 1px solid #2563eb; border-radius: 3px; background: #dbeafe; vertical-align: -1px; }
.battery-table-wrap { max-height: 620px; border: 1px solid var(--fb-border-soft); border-radius: 10px; }
.battery-table { min-width: 1100px; margin: 0; }
.battery-table thead th { position: sticky; top: 0; z-index: 2; background: #fff7ed; white-space: nowrap; }
.battery-table td { white-space: nowrap; }
.battery-group-row th { padding: 9px 12px; background: #e2e8f0; color: #172554; font-size: .82rem; text-align: left; }
.battery-day-heading, .battery-value { text-align: center; }
.battery-value.is-last-charge, .last-charge { background: #dbeafe; color: #1d4ed8; font-weight: 900; }
.battery-tracker-search { position: relative; }
.battery-tracker-search .asset-search-results { top: 100%; right: 0; left: 0; z-index: 20; max-height: 280px; overflow-y: auto; }
.account-heading { margin-bottom: 18px; }
.account-manage-grid { display: grid; grid-template-columns: minmax(210px, 260px) minmax(0, 760px); align-items: start; gap: 18px; }
.account-manage-nav { position: sticky; top: 84px; padding: 10px; }
.account-nav-list { display: grid; gap: 6px; }
.account-nav-list a { display: grid; gap: 2px; padding: 11px 12px; border: 1px solid transparent; border-radius: 10px; color: var(--fb-navy); text-decoration: none; transition: background 150ms ease, border-color 150ms ease, transform 150ms ease; }
.account-nav-list a:hover, .account-nav-list a:focus { border-color: #fed7aa; background: #fff7ed; transform: translateX(2px); }
.account-nav-list a.is-active { border-color: #bfdbfe; background: linear-gradient(135deg, #eff6ff, #dbeafe); color: #1d4ed8; }
.account-nav-list span { font-size: .82rem; font-weight: 850; }
.account-nav-list small { color: #64748b; font-size: .68rem; font-weight: 650; }
.account-manage-content { width: 100%; max-width: none; }
.account-content-header { margin-bottom: 14px; }
.account-content-header h2 { margin: 0; color: var(--fb-navy); }
.account-manage-content > h3, .account-manage-content > h4 { color: var(--fb-navy); font-weight: 850; }
.account-manage-content .nav-pills { gap: 6px; }
.account-manage-content .nav-link { border-radius: 9px; }
.account-manage-content form:not(.form-inline) { max-width: 680px; }
.battery-snapshot-chart { margin: 16px 0; padding: 16px; border: 1px solid var(--fb-border-soft); border-radius: 12px; background: #f8fafc; }
.battery-snapshot-chart svg { display: block; width: 100%; min-height: 180px; overflow: visible; }
.battery-snapshot-chart line { stroke: #94a3b8; stroke-width: 1; }
.battery-snapshot-chart polyline { fill: none; stroke: #2563eb; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.battery-snapshot-chart circle { fill: #fff; stroke: #2563eb; stroke-width: 3; }
.battery-snapshot-chart text { fill: #64748b; font-size: 10px; }
.battery-snapshot-list { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.battery-snapshot-list span { min-width: 70px; padding: 9px; border: 1px solid #dbeafe; border-radius: 10px; background: #fff; text-align: center; }
.battery-snapshot-list span.is-charge { border-color: #f59e0b; box-shadow: inset 0 -3px #f59e0b; }
.battery-snapshot-list strong, .battery-snapshot-list small { display: block; }
.battery-snapshot-list small { color: #64748b; }
.battery-chart-prompt { margin: 16px 0; padding: 14px; border: 1px dashed #94a3b8; border-radius: 10px; color: #475569; background: #f8fafc; }
.email-preview { overflow: auto; padding: 12px; border: 1px solid var(--fb-border-soft); border-radius: 10px; background: #f8fafc; }
.tenant-grant-select { min-height: 240px; }
@media (max-width: 1100px) { .battery-filters { grid-template-columns: repeat(3, minmax(140px, 1fr)); } .battery-insight-grid { grid-template-columns: 1fr; } .battery-insight-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } .battery-insight-stats .battery-primary-stat { grid-column: auto; } }
@media (max-width: 640px) { .battery-filters, .battery-insight-search { grid-template-columns: 1fr; } .battery-insight-submit { margin-top: 0; } .battery-insight-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .battery-insight-chart { min-height: 270px; padding: 12px; } .battery-chart-title { align-items: stretch; flex-direction: column; } .battery-view-badge { align-self: flex-start; } }
@media (max-width: 800px) { .account-manage-grid { grid-template-columns: 1fr; } .account-manage-nav { position: static; } .account-nav-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .account-nav-list { grid-template-columns: 1fr; } }

.asset-list {
  display: grid;
  gap: 10px;
}

.asset-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--fb-border-soft);
  border-radius: 12px;
  background: var(--fb-surface-warm);
}

.asset-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--fb-navy);
  font-weight: 900;
}

.asset-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 6px;
  font-size: 0.9rem;
}

.asset-side {
  display: grid;
  align-content: center;
  gap: 10px;
  text-align: right;
}

.tenant-status-form {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(118px, auto);
  gap: 8px;
  align-items: center;
}

.tenant-status-form .btn {
  width: 100%;
  min-width: 118px;
  white-space: nowrap;
}

.tenant-account-row {
  grid-template-columns: minmax(0, 1fr) minmax(380px, 420px);
  align-items: start;
}

.tenant-account-side {
  align-content: start;
  gap: 14px;
}

.tenant-account-stats {
  display: grid;
  gap: 4px;
}

.tenant-account-actions {
  display: grid;
  gap: 8px;
}

.tenant-account-actions .tenant-status-form {
  grid-template-columns: minmax(0, 1fr) 172px;
}

.tenant-account-actions .form-control,
.tenant-account-actions .form-select,
.tenant-account-actions .btn {
  min-height: 42px;
  height: 42px;
  min-width: 0;
  font-size: .82rem;
}

.tenant-account-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 10px;
  white-space: nowrap;
}

.small-action {
  justify-self: end;
  color: var(--fb-orange);
  font-size: 0.85rem;
  font-weight: 900;
  text-decoration: none;
}

.small-action:hover,
.small-action:focus {
  color: var(--fb-navy);
  text-decoration: underline;
}

.link-action {
  justify-self: end;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fb-orange);
  font-size: 0.85rem;
  font-weight: 900;
  text-align: right;
}

.link-action:hover,
.link-action:focus {
  color: var(--fb-navy);
  text-decoration: underline;
}

.link-action:disabled {
  color: var(--fb-muted);
  cursor: not-allowed;
  text-decoration: none;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: var(--fb-success);
  font-size: 0.75rem;
  font-weight: 900;
}

.report-table td .status-chip {
  display: inline-flex;
}

.status-ok {
  background: #dcfce7;
  color: var(--fb-success);
}

.status-warning {
  background: #ffedd5;
  color: #c2410c;
}

.status-critical {
  background: #fee2e2;
  color: #b91c1c;
}

.status-chip-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.form-surface {
  display: grid;
  gap: 22px;
}

.swap-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: var(--fb-surface-2);
}

.swap-summary span {
  display: block;
  margin-bottom: 5px;
  color: var(--fb-muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.swap-summary strong {
  color: var(--fb-navy);
}

.report-summary {
  margin-bottom: 16px;
}
.operational-report-filter { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:14px; align-items:end; margin-bottom:16px; }

.form-section {
  display: grid;
  gap: 12px;
}

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

.auth-surface {
  max-width: 880px;
}

.authenticator-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.qr-frame {
  width: 220px;
  padding: 12px;
  border: 1px solid var(--fb-border-soft);
  border-radius: 12px;
  background: #fff;
}

.qr-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.manual-key {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--fb-surface-2);
  color: var(--fb-navy);
  font-weight: 850;
}

.recovery-codes {
  margin-top: 18px;
}

.recovery-code-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.recovery-code-grid code {
  padding: 10px;
  border-radius: 8px;
  background: var(--fb-surface-2);
  color: var(--fb-navy);
  font-weight: 850;
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(220px, 360px) auto;
  gap: 14px;
  align-items: end;
}

.filter-actions {
  display: flex;
  align-items: end;
  gap: 12px;
}

.filter-actions .btn {
  white-space: nowrap;
}

label {
  display: grid;
  gap: 7px;
  color: var(--fb-navy);
  font-weight: 800;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  align-self: end;
}

.check-row input {
  margin: 0;
}

.form-control,
.form-select {
  min-height: 44px;
  border-color: #fed7aa;
  border-radius: 10px;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--fb-orange);
  box-shadow: 0 0 0 0.2rem var(--fb-focus-ring);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 4px;
}

.table-responsive {
  border: 1px solid var(--fb-border-soft);
  border-radius: 12px;
  background: var(--fb-surface);
  box-shadow: var(--fb-shadow-card);
}

.sim-inventory-search {
  margin-bottom: 12px;
}

.sim-inventory-search label {
  flex: 1 1 320px;
}

.sim-inventory-table {
  max-height: min(62vh, 720px);
  overflow: auto;
}

.sim-inventory-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--fb-surface);
}

.table {
  margin-bottom: 0;
}

.table thead th {
  border-bottom-color: var(--fb-border-soft);
  color: var(--fb-navy);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.table tbody td {
  border-color: var(--fb-border-soft);
  color: var(--fb-text);
  vertical-align: middle;
}

.report-filter {
  margin-bottom: 16px;
}

.tenant-context-heading { margin-bottom: 20px; }
.tenant-context-current { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 12px 14px; border: 1px solid #bbf7d0; border-radius: 12px; background: #f0fdf4; }
.tenant-context-current-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #15803d; color: #fff; font-weight: 950; }
.tenant-context-current div { display: flex; min-width: 0; align-items: baseline; gap: 8px; }
.tenant-context-current small { color: #15803d; font-size: .7rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.tenant-context-current strong { color: var(--fb-navy); }
.tenant-context-current div > span { color: var(--fb-muted); font-size: .82rem; font-weight: 750; }
.tenant-context-toolbar { display: grid; grid-template-columns: minmax(240px, 560px) auto; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; padding: 14px; border: 1px solid var(--fb-border-soft); border-radius: 12px; background: #fff; }
.tenant-context-toolbar label { display: grid; gap: 6px; color: var(--fb-navy); font-size: .8rem; font-weight: 850; }
.tenant-context-toolbar-meta { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.tenant-context-toolbar-meta strong { color: var(--fb-muted); font-size: .82rem; }
.tenant-context-toolbar-meta .small-action { border: 0; background: transparent; cursor: pointer; }
.tenant-context-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.tenant-context-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; min-height: 132px; padding: 18px; border: 1px solid var(--fb-border-soft); border-radius: 14px; background: #fff; box-shadow: 0 5px 18px rgba(28, 44, 89, .06); transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease; }
.tenant-context-card:hover, .tenant-context-card:focus-within { border-color: var(--fb-orange); box-shadow: 0 10px 24px rgba(28, 44, 89, .1); transform: translateY(-2px); }
.tenant-context-card.is-active { border-color: #86efac; background: linear-gradient(135deg, #f0fdf4, #fff 72%); }
.tenant-context-card-copy { display: grid; min-width: 0; gap: 5px; }
.tenant-context-card-copy strong { overflow-wrap: anywhere; color: var(--fb-navy); font-size: 1.15rem; line-height: 1.2; }
.tenant-context-card-copy small { color: var(--fb-muted); font-weight: 750; }
.tenant-context-badge { width: fit-content; padding: 4px 7px; border-radius: 999px; background: #ffedd5; color: #9a3412; font-size: .68rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.tenant-context-card.is-active .tenant-context-badge { background: #dcfce7; color: #166534; }
.tenant-context-card .btn { min-width: 116px; white-space: nowrap; }
.tenant-context-card[hidden] { display: none; }
.tenant-context-empty { margin-top: 14px; }
.command-centre-filter { grid-template-columns: minmax(260px, 1fr) minmax(130px, 170px) auto; }
.command-device-list { display: grid; gap: 8px; }
.command-device-row { display: grid; grid-template-columns: 120px minmax(180px, 1.4fr) minmax(160px, 1fr) minmax(130px, .8fr) minmax(130px, .8fr); align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--fb-border-soft); border-radius: 10px; color: inherit; text-decoration: none; }
.command-device-row:hover, .command-device-row:focus { border-color: var(--fb-orange); background: var(--fb-surface-warm); }
.command-device-row > span:not(.status-chip) { display: grid; gap: 2px; min-width: 0; }
.command-device-row strong { overflow-wrap: anywhere; color: var(--fb-navy); }
.command-device-row small { color: var(--fb-muted); font-weight: 750; }
.command-device-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.command-category + .command-category { margin-top: 18px; }
.command-category .surface-header { align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.command-category .surface-header > span { max-width: 28rem; text-align: right; line-height: 1.35; }
.command-action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); align-items: stretch; gap: 16px; }
.command-action-card { display: grid; min-width: 0; height: 100%; align-content: start; gap: 14px; padding: 18px; border: 1px solid var(--fb-border-soft); border-radius: 12px; background: #fff; }
.command-action-card > strong { display: flex; min-height: 3rem; align-items: flex-start; color: var(--fb-navy); font-size: 1.02rem; line-height: 1.35; }
.command-action-card > small { color: var(--fb-muted); font-weight: 750; line-height: 1.4; }
.command-action-card label { min-width: 0; align-content: start; }
.command-parameter-fields { display: grid; min-width: 0; gap: 14px; }
.command-action-card.is-mutation .command-parameter-fields { min-height: 9.5rem; align-content: start; }
.command-action-card.is-diagnostic .command-parameter-fields:empty { display: none; }
.command-action-card .form-control,
.command-action-card .form-select { width: 100%; }
.command-action-card .btn { width: 100%; min-height: 46px; white-space: normal; line-height: 1.25; }
.command-action-card .js-preflight-status { display: block; min-height: 2.8rem; }
.command-action-card .js-apply-command,
.command-action-card > .btn:last-child { align-self: end; margin-top: auto; }
.command-confirmation-field > small { min-height: 2.5rem; color: var(--fb-muted); font-weight: 700; line-height: 1.35; }
.command-confirmation-field > small strong { color: var(--fb-navy); overflow-wrap: anywhere; }
.command-action-card.is-disabled { background: #f8fafc; opacity: .78; }
.command-response { margin: 0; max-width: 42rem; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; color: inherit; }

.list-filter {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 220px) minmax(120px, 160px) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--fb-border-soft);
  border-radius: 12px;
  background: var(--fb-surface-warm);
}

.list-filter-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  padding-top: 0;
}

.list-filter-actions .btn { min-height: 44px; }

.bulk-action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--fb-muted);
  font-size: 0.88rem;
  font-weight: 850;
}

.bulk-action-bar .form-select {
  width: min(220px, 100%);
}

.select-column {
  width: 44px;
  min-width: 44px;
  text-align: center;
}

.select-column input {
  width: 18px;
  height: 18px;
  accent-color: var(--fb-orange);
}

.permission-note {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--fb-border-soft);
  border-radius: 10px;
  background: var(--fb-surface-warm);
  color: var(--fb-muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.permission-matrix {
  min-width: 1180px;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-block: 1rem;
}

.permission-grid fieldset {
  border: 1px solid var(--border-color, #d8dee8);
  border-radius: 0.75rem;
  padding: 0.9rem;
}

.permission-grid legend {
  float: none;
  width: auto;
  padding-inline: 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.permission-checks {
  display: grid;
  gap: 6px;
}

.permission-checks label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--fb-text);
  font-size: 0.78rem;
  font-weight: 800;
}

.permission-checks input {
  width: 16px;
  height: 16px;
  accent-color: var(--fb-orange);
}

.permission-empty {
  color: var(--fb-muted);
  font-weight: 900;
}

.role-preview-select {
  width: min(260px, 100%);
}

.role-preview-grid {
  display: grid;
}

.role-preview-card {
  display: grid;
  gap: 10px;
}

.role-preview-card h3,
.role-preview-card h4 {
  margin: 0;
  color: var(--fb-navy);
}

.role-preview-card p,
.role-preview-card ul {
  margin: 0;
}

.role-preview-card ul {
  padding-left: 18px;
  color: var(--fb-muted);
  font-weight: 750;
}

.bulk-template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.bulk-template-grid article {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--fb-border-soft);
  border-radius: 8px;
  background: #fff;
}

.bulk-template-grid h3,
.bulk-template-grid p {
  margin: 0;
}

.bulk-template-grid h3 {
  color: var(--fb-navy);
  font-size: 1rem;
}

.bulk-template-grid p {
  color: var(--fb-muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.bulk-import-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.release-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.release-card div {
  display: grid;
  gap: 6px;
}

.release-card span,
.release-card p {
  margin: 0;
  color: var(--fb-muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.release-card code {
  overflow-wrap: anywhere;
  color: var(--fb-navy);
  font-size: 0.78rem;
}

.release-stage-form {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(260px, 1fr) minmax(280px, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--fb-border-soft);
  color: var(--fb-muted);
  font-weight: 800;
}

.pager div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pager-page { display: inline-grid; min-width: 38px; min-height: 38px; padding: 6px 10px; place-items: center; border: 1px solid var(--fb-border); border-radius: 8px; background: #fff; color: var(--fb-navy); text-decoration: none; }
.pager-page:hover, .pager-page:focus, .pager-page.is-current { border-color: var(--fb-navy); background: var(--fb-navy); color: #fff; }
.pager-ellipsis { padding: 0 2px; }

.quick-ranges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.selected-asset {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  background: var(--fb-surface-warm);
}

.selected-asset span,
.asset-search-result span,
.asset-search-empty {
  color: var(--fb-muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.selected-asset strong,
.asset-search-result strong {
  color: var(--fb-navy);
}

.asset-search-results {
  display: grid;
  gap: 8px;
}

.asset-search-result {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--fb-border-soft);
  border-radius: 10px;
  background: #fff;
  text-align: left;
  transition: border-color 150ms ease, transform 150ms ease;
}

.asset-search-result:hover,
.asset-search-result:focus {
  border-color: var(--fb-orange);
  transform: translateY(-2px);
}

.asset-search-empty {
  padding: 10px 0;
}

.replay-target-results {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--fb-border-soft);
  border-radius: 12px;
  background: var(--fb-surface-warm);
}

.replay-target-results[hidden] {
  display: none;
}

.replay-target-results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--fb-border-soft);
  color: var(--fb-navy);
}

.replay-target-results-heading span {
  color: var(--fb-muted);
  font-size: .78rem;
  font-weight: 850;
}

.replay-target-results-list {
  max-height: min(320px, 42vh);
  padding: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.replay-target-type {
  display: inline-flex;
  margin-left: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #ffedd5;
  color: #9a3412 !important;
  font-size: .68rem !important;
  line-height: 1;
  vertical-align: middle;
}

.report-table-wrap {
  overflow-x: auto;
}

.report-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.report-table th,
.report-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--fb-border-soft);
  vertical-align: top;
  text-align: left;
}

.report-table th {
  color: var(--fb-navy);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.report-table td {
  color: var(--fb-text);
  font-size: 0.92rem;
}

.report-table td span {
  display: block;
  color: var(--fb-muted);
  font-size: 0.84rem;
}

.report-table .actions-column {
  width: 1%;
  min-width: 360px;
}

.table-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.table-actions form {
  display: inline-flex;
  margin: 0;
}

.map-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  min-height: calc(100vh - 220px);
  overflow: hidden;
  border: 1px solid var(--fb-border);
  border-radius: 14px;
  background: var(--fb-surface);
  box-shadow: var(--fb-shadow-card);
}

.map-workspace {
  position: relative;
  width: calc(100vw - 32px);
  height: calc(100vh - 190px);
  min-height: 560px;
  margin-left: calc(50% - 50vw + 16px);
  transition: grid-template-columns 180ms ease;
}
.map-quick-tools { position: absolute; z-index: 700; top: 12px; left: 52px; display: flex; flex-wrap: wrap; gap: 6px; }
.map-quick-tools button, .map-quick-tools a { padding: 7px 10px; border: 1px solid rgba(28,44,89,.3); border-radius: 8px; background: rgba(255,255,255,.94); color: var(--fb-navy); font-size: .76rem; font-weight: 850; text-decoration: none; box-shadow: 0 2px 8px rgba(15,23,42,.14); }
.map-quick-tools button.is-active { border-color: #2563eb; background: #dbeafe; color: #1d4ed8; }
.map-quick-tools [data-tooltip] { position: relative; }
.map-quick-tools [data-tooltip]::after { content: attr(data-tooltip); position: absolute; top: calc(100% + 8px); left: 50%; z-index: 900; width: max-content; max-width: 230px; padding: 6px 8px; border-radius: 6px; background: #172554; color: #fff; font-size: .72rem; font-weight: 650; line-height: 1.3; text-align: center; white-space: normal; opacity: 0; pointer-events: none; transform: translate(-50%, -3px); transition: opacity .12s ease, transform .12s ease; }
.map-quick-tools [data-tooltip]::before { content: ''; position: absolute; top: calc(100% + 2px); left: 50%; z-index: 901; border: 4px solid transparent; border-bottom-color: #172554; opacity: 0; pointer-events: none; transform: translateX(-50%); transition: opacity .12s ease; }
.map-quick-tools [data-tooltip]:hover::after, .map-quick-tools [data-tooltip]:focus-visible::after, .map-quick-tools [data-tooltip]:hover::before, .map-quick-tools [data-tooltip]:focus-visible::before { opacity: 1; transform: translate(-50%, 0); }
.map-quick-tools [data-tooltip]:hover::before, .map-quick-tools [data-tooltip]:focus-visible::before { transform: translateX(-50%); }
.fleet-map.is-measuring, .fleet-map.is-measuring .leaflet-interactive { cursor: crosshair; }
.leaflet-control-layers-toggle { display: grid; place-items: center; background-image: none !important; color: var(--fb-navy); text-decoration: none; }
.leaflet-control-layers-toggle::before { content: 'Layers'; padding: 0 7px; font-size: .68rem; font-weight: 900; line-height: 1; }
.leaflet-control-layers:not(.leaflet-control-layers-expanded) .leaflet-control-layers-toggle { width: 54px; }
.fleet-marker-cluster {
  display: grid;
  place-items: center;
  border: 3px solid rgba(28, 44, 89, .72);
  border-radius: 999px;
  background: rgba(245, 147, 33, .9);
  color: white;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .22), 0 0 0 6px rgba(245, 147, 33, .18);
}
.fleet-marker-cluster span {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border-radius: inherit;
  font-size: .78rem;
  font-weight: 950;
  line-height: 1;
}
.fleet-marker-cluster-medium {
  background: rgba(37, 99, 235, .9);
  box-shadow: 0 9px 24px rgba(15, 23, 42, .24), 0 0 0 7px rgba(37, 99, 235, .16);
}
.fleet-marker-cluster-large {
  background: rgba(220, 38, 38, .9);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .28), 0 0 0 8px rgba(220, 38, 38, .15);
}
.measurement-guide { position: absolute; z-index: 720; top: 58px; left: 52px; display: none; max-width: 330px; padding: 10px 12px; border: 2px solid #2563eb; border-radius: 10px; background: rgba(255,255,255,.97); color: #172033; box-shadow: 0 5px 18px rgba(15,23,42,.2); pointer-events: none; }
.measurement-guide.is-visible { display: grid; gap: 2px; }
.measurement-guide strong { color: #1d4ed8; font-size: .82rem; }
.measurement-guide span { font-size: .76rem; font-weight: 650; }
.measurement-label { border: 1px solid #93c5fd; color: #172033; font-weight: 900; }
.user-location-label { border: 1px solid #38bdf8; color: #172554; font-weight: 900; }
.heading-indicator { border: 0; background: transparent; box-shadow: none; color: white; font-size: 9px; line-height: 1; }
.heading-indicator::before { display: none; }
.map-marker-tooltip { max-width: 240px; border: 1px solid #bfdbfe; border-radius: 10px; background: rgba(255,255,255,.97); color: var(--fb-text); box-shadow: 0 8px 22px rgba(15,23,42,.18); }
.map-marker-tooltip::before { border-top-color: #bfdbfe; }
.map-marker-hover { display: grid; gap: 2px; padding: 2px 3px; }
.map-marker-hover strong { color: var(--fb-navy); font-size: .78rem; overflow-wrap: anywhere; }
.map-marker-hover span { color: #475569; font-size: .68rem; font-weight: 750; }
.map-marker-hover small { color: var(--fb-muted); font-size: .64rem; font-weight: 700; }
.fleet-unit-popup { width: min(440px, calc(100vw - 34px)) !important; }
.fleet-unit-popup .leaflet-popup-content-wrapper { width: 100%; overflow: hidden; border: 1px solid #dbeafe; border-radius: 16px; box-shadow: 0 16px 38px rgba(15,23,42,.22); }
.fleet-unit-popup .leaflet-popup-content { width: auto !important; margin: 0; }
.fleet-unit-popup .leaflet-popup-close-button { top: 9px !important; right: 9px !important; z-index: 2; width: 28px !important; height: 28px !important; border-radius: 50%; background: rgba(255,255,255,.9) !important; color: #475569 !important; font-size: 20px !important; line-height: 26px !important; }
.map-unit-popup { max-height: 520px; overflow-y: auto; color: var(--fb-text); }
.map-unit-popup header { display: grid; gap: 3px; padding: 16px 46px 14px 16px; border-bottom: 1px solid #dbeafe; background: linear-gradient(135deg, #eff6ff, #fff7ed); }
.map-unit-popup header span { color: #2563eb; font-size: .68rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.map-unit-popup header strong { color: var(--fb-navy); font-size: 1.05rem; overflow-wrap: anywhere; }
.map-unit-popup header small { color: var(--fb-muted); font-size: .76rem; }
.map-unit-popup-grid, .map-unit-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.map-unit-popup-grid { padding: 14px 16px; }
.map-unit-popup-grid > div, .map-unit-summary > div { display: grid; gap: 2px; min-width: 0; }
.map-unit-popup-grid .is-wide { grid-column: 1 / -1; }
.map-unit-popup-grid span, .map-unit-summary span { color: var(--fb-muted); font-size: .64rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.map-unit-popup-grid strong, .map-unit-summary strong { color: var(--fb-navy); font-size: .76rem; overflow-wrap: anywhere; }
.map-popup-actions, .map-selection-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.map-popup-actions { padding: 14px 16px 16px; border-top: 1px solid #e2e8f0; background: #f8fafc; }
.map-popup-action { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; margin: 0; padding: 8px 10px; border: 1px solid #bfdbfe; border-radius: 9px; background: #eff6ff; color: #1d4ed8; font-size: .75rem; font-weight: 850; line-height: 1.15; text-align: center; text-decoration: none; white-space: normal; }
.map-popup-action:hover { border-color: #60a5fa; background: #dbeafe; color: #1e40af; text-decoration: none; }
.map-popup-action.is-primary { border-color: #1d4ed8; background: #1d4ed8; color: #fff; }
.map-popup-action.is-active { border-color: #1d4ed8; background: #1d4ed8; color: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,.16); }
.active-tenant-context, .map-selection, .read-only-field { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--fb-border-soft); border-radius: 12px; background: #fff; }
.active-tenant-context span, .read-only-field span { color: var(--fb-muted); font-size: .72rem; font-weight: 850; text-transform: uppercase; }
.active-tenant-context a { font-size: .8rem; font-weight: 850; }
.map-unit-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.map-unit-heading > div { display: grid; gap: 2px; min-width: 0; }
.map-unit-heading h3, .map-unit-heading p { margin: 0; overflow-wrap: anywhere; }
.map-unit-heading > div > span { color: var(--fb-muted); font-size: .72rem; font-weight: 750; }
.map-unit-summary { padding: 12px; border-radius: 10px; background: #f8fafc; }
.map-selection-close { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border: 1px solid #e2e8f0; border-radius: 50%; background: #fff; color: var(--fb-muted); font-size: 1.2rem; }
.read-only-field small { color: var(--fb-muted); }

.map-workspace.panel-collapsed {
  grid-template-columns: minmax(0, 1fr) 52px;
}

.map-workspace:fullscreen {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  margin: 0;
  border: 0;
  border-radius: 0;
}

.fleet-map {
  min-height: 620px;
  height: 100%;
}

.map-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  border-left: 1px solid var(--fb-border);
  background: var(--fb-surface-warm);
  overflow-y: auto;
}

.map-panel.is-collapsed {
  display: block;
  padding: 10px;
  overflow: hidden;
}

.map-panel.is-collapsed > :not(.surface-header),
.map-panel.is-collapsed .surface-header h2 {
  display: none;
}

.map-panel.is-collapsed .surface-header {
  justify-content: center;
}

.map-panel-toggle {
  width: 32px;
  height: 32px;
  border: 1px solid var(--fb-border);
  border-radius: 8px;
  background: white;
  color: var(--fb-navy);
  font-size: 1.25rem;
  line-height: 1;
}

.map-toolbar {
  display: grid;
  gap: 9px;
}

.map-check {
  margin: 0;
  font-size: 0.85rem;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--fb-muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.map-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #64748b;
}

.map-legend .status-assigned { background: #f59321; }
.map-legend .status-available { background: #15803d; }
.map-legend .status-charging { background: #2563eb; }
.map-legend .status-faulty { background: #dc2626; }
.map-legend .status-lost { background: #991b1b; }
.map-legend .status-retired { background: #64748b; }
.map-legend .status-unallocated { background: #0f766e; }
.map-legend .freshness-live { border: 2px solid #1c2c59; background: white; }
.map-legend .freshness-delayed { border: 2px solid #d97706; background: white; }
.map-legend .freshness-stale { border: 2px dashed #64748b; background: white; }

.map-panel-meta {
  color: var(--fb-muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.map-list {
  display: grid;
  gap: 8px;
}

.map-unit-group { display: grid; gap: 7px; padding: 8px; border: 1px solid #dbeafe; border-radius: 12px; background: #f8fafc; }
.map-unit-group-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 5px 4px 8px; border: 0; border-bottom: 1px solid #dbeafe; background: transparent; color: #2563eb; text-align: left; }
.map-unit-group-heading > span:first-child { display: grid; gap: 2px; }
.map-unit-group-heading strong { color: var(--fb-navy); font-size: .82rem; }
.map-unit-group-heading small { color: var(--fb-muted); font-size: .68rem; font-weight: 750; }
.map-unit-group-heading > span:last-child { flex: 0 0 auto; padding: 5px 7px; border-radius: 7px; background: #dbeafe; font-size: .68rem; font-weight: 850; }

.map-event-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--fb-border);
}
.map-event-heading a { color: #2563eb; font-size: .72rem; font-weight: 850; }

.map-event-heading h3 {
  margin: 0;
  color: var(--fb-navy);
  font-size: 0.9rem;
  font-weight: 850;
}

.geofence-event-list {
  display: grid;
  gap: 7px;
  max-height: 330px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 3px;
  scrollbar-gutter: stable;
}
.geofence-event-list:focus-visible { outline: 3px solid rgba(124,58,237,.22); outline-offset: 3px; }

.geofence-event-item {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid #ddd6fe;
  border-radius: 9px;
  background: #f5f3ff;
  color: var(--fb-text);
  text-align: left;
}

.geofence-event-item strong { color: #5b21b6; font-size: 0.8rem; }
.geofence-event-item span { color: var(--fb-muted); font-size: 0.74rem; }

.tracker-label-sheet { display: grid; place-items: center; padding: 30px; }
.tracker-label { display: grid; justify-items: center; gap: 5px; width: 72mm; padding: 7mm; border: 1px dashed #64748b; border-radius: 4mm; background: white; color: #111827; text-align: center; }
.tracker-label img { width: 42mm; height: 42mm; image-rendering: pixelated; }
.tracker-label code { color: #111827; font-size: 14pt; font-weight: 900; letter-spacing: 0.08em; }
.tracker-label-brand { color: var(--fb-navy); font-size: 18pt; }
.tracker-label span, .tracker-label small { max-width: 100%; overflow-wrap: anywhere; }
.tracker-details-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 18px; align-items: start; }
.tracker-identity-card, .tracker-qr-card { padding: 20px; }
.tracker-detail-list { display: grid; gap: 0; margin: 0; }
.tracker-detail-list div { display: grid; grid-template-columns: minmax(140px, .45fr) minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--fb-border-soft); }
.tracker-detail-list dt { color: var(--fb-muted); font-weight: 800; }
.tracker-detail-list dd { margin: 0; overflow-wrap: anywhere; font-weight: 800; }
.tracker-qr-card { display: grid; justify-items: center; gap: 12px; text-align: center; }
.tracker-qr-card img { width: min(100%, 280px); aspect-ratio: 1; image-rendering: pixelated; }
.tracker-qr-card code { color: var(--fb-navy); font-size: 1.05rem; font-weight: 900; letter-spacing: .06em; overflow-wrap: anywhere; }
.tracker-qr-card p { margin: 0; color: var(--fb-muted); }
.tracker-history-panel { margin-top: 18px; padding: 20px; }
@media (max-width: 760px) { .tracker-details-layout { grid-template-columns: 1fr; } .tracker-detail-list div { grid-template-columns: 1fr; gap: 4px; } }
@media print { header, footer, .no-print { display: none !important; } .app-container { max-width: none; padding: 0; } .tracker-label-sheet { padding: 0; } .tracker-label { break-inside: avoid; } }
.scan-workflow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; padding: 14px; border: 1px solid #fed7aa; border-radius: 11px; background: #fff7ed; }
.scan-input-row { display: flex; gap: 7px; }
.scan-result { display: block; margin-top: 5px; color: var(--fb-muted); font-weight: 700; }
.scan-result.is-success { color: #15803d; } .scan-result.is-error { color: #b91c1c; }
.camera-scanner { display: grid; grid-template-columns: minmax(0, 420px) minmax(180px, 1fr); gap: 12px; align-items: center; margin-bottom: 16px; padding: 12px; border: 1px solid var(--fb-border); border-radius: 11px; background: #111827; color: white; }
.camera-scanner[hidden] { display: none; } .camera-scanner video { width: 100%; min-height: 180px; border-radius: 8px; background: black; } .camera-scanner > div { display: grid; gap: 12px; }
.geofence-editor { width: 100%; min-height: 560px; border: 1px solid var(--fb-border); border-radius: 12px; overflow: hidden; }
.geofence-shape-summary { margin-top: 10px; padding: 10px 12px; border-radius: 9px; background: #f5f3ff; color: #5b21b6; font-weight: 800; }
.geofence-target-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.target-panel[hidden] { display: none; }
.target-search-results { display: grid; gap: 5px; margin-top: 5px; }
.target-search-results button { display: grid; gap: 2px; padding: 9px; border: 1px solid var(--fb-border); border-radius: 8px; background: white; color: var(--fb-text); text-align: left; }
.target-search-results button span { color: var(--fb-muted); font-size: 0.78rem; }
.geofence-snap-toggle { margin: 0; padding: 8px 10px; border: 1px solid var(--fb-border); border-radius: 9px; background: white; }
@media (max-width: 760px) { .scan-workflow, .camera-scanner, .geofence-target-grid { grid-template-columns: 1fr; } .scan-input-row { align-items: stretch; flex-direction: column; } .geofence-editor { min-height: 65vh; } }

.map-list-item {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--fb-border-soft);
  border-radius: 10px;
  background: #fff;
  color: var(--fb-text);
  text-align: left;
  transition: border-color 150ms ease, transform 150ms ease;
}

.map-list-item:hover,
.map-list-item:focus {
  border-color: var(--fb-orange);
  transform: translateY(-2px);
}

.map-list-item.is-active {
  border-color: var(--fb-navy);
  background: #ffedd5;
}

.map-list-item span {
  display: grid;
  gap: 2px;
}

.map-list-item strong {
  color: var(--fb-navy);
}

.map-list-item small {
  color: var(--fb-muted);
  font-weight: 800;
}

.replay-shell {
  height: clamp(620px, calc(100vh - 180px), 760px);
  min-height: 620px;
}

.replay-shell .map-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

.replay-shell .map-list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: auto;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.replay-controls {
  display: grid;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--fb-border-soft);
}

.replay-current {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--fb-border-soft);
  border-radius: 10px;
  background: #fff;
  color: var(--fb-navy);
  font-size: 0.88rem;
  font-weight: 850;
}

.replay-slider {
  width: 100%;
  accent-color: var(--fb-orange);
}

.replay-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(92px, 120px);
  gap: 10px;
  align-items: end;
}

.replay-actions .btn,
.replay-actions .form-select {
  width: 100%;
}

.replay-actions label {
  gap: 4px;
  font-size: 0.78rem;
}

.alert-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #14532d;
}

@media (max-width: 760px) {
  .map-selection:not([hidden]) { position: fixed; right: 10px; bottom: 10px; left: 10px; z-index: 1100; max-height: 55vh; overflow-y: auto; border-color: var(--fb-orange); box-shadow: 0 12px 36px rgba(15,23,42,.28); }
  .map-selection-actions { grid-template-columns: 1fr; }
  .tenant-account-row {
    grid-template-columns: 1fr;
  }

  .tenant-context-current div { display: grid; gap: 2px; }
  .tenant-context-toolbar, .tenant-context-card { grid-template-columns: 1fr; }
  .tenant-context-toolbar-meta { justify-content: space-between; }
  .tenant-context-card { min-height: 0; }
  .tenant-context-card .btn { width: 100%; }
  .command-centre-filter, .command-device-summary, .command-device-row { grid-template-columns: 1fr; }
  .command-category .surface-header { flex-direction: column; }
  .command-category .surface-header > span { max-width: none; text-align: left; }
  .command-action-card.is-mutation .command-parameter-fields { min-height: 0; }

  .tenant-account-side {
    text-align: left;
  }

  .tenant-account-actions .tenant-status-form {
    grid-template-columns: 1fr;
  }

  .page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .page-heading .btn,
  .form-actions .btn {
    width: 100%;
  }

  .heading-actions {
    justify-content: stretch;
  }

  .heading-actions .btn,
  .heading-actions form,
  .heading-actions form .btn {
    width: 100%;
  }

  .toolbar-row {
    justify-content: stretch;
  }

  .global-search {
    width: 100%;
    margin: 10px 0;
  }

  .tenant-pill {
    max-width: none;
    margin: 10px 0 0;
  }

  .global-search-results {
    right: auto;
    left: 0;
    width: 100%;
  }

  .dashboard-grid,
  .metric-grid,
  .dashboard-analysis-grid,
  .bulk-template-grid,
  .release-card,
  .release-stage-form,
  .bulk-import-form,
  .form-grid,
  .filter-grid,
  .authenticator-grid,
  .recovery-code-grid,
  .tenant-status-form,
  .swap-summary,
  .asset-row,
  .list-filter,
  .map-shell {
    grid-template-columns: 1fr;
  }

  .qr-frame {
    width: min(220px, 100%);
  }

  .fleet-map {
    min-height: 55vh;
  }

  .map-workspace {
    width: 100%;
    height: auto;
    min-height: 0;
    margin-left: 0;
  }

  .map-panel {
    max-height: 320px;
    border-top: 1px solid var(--fb-border);
    border-left: 0;
  }

  .replay-target-results-list {
    max-height: min(280px, 42vh);
  }

  .replay-shell {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .replay-shell .fleet-map {
    height: 55vh;
    min-height: 360px;
  }

  .replay-shell .map-panel {
    height: clamp(360px, 52vh, 520px);
    max-height: none;
    overflow: hidden;
  }

  .asset-side {
    text-align: left;
  }

  .small-action {
    justify-self: start;
  }

  .link-action {
    justify-self: start;
    text-align: left;
  }

  .filter-actions {
    align-items: stretch;
  }

  .filter-actions .btn,
  .toolbar-row .btn,
  .table-actions .btn {
    width: 100%;
  }

  .table-actions {
    align-items: stretch;
    flex-direction: column;
    min-width: 0;
  }

  .table-actions form {
    width: 100%;
  }

  .list-filter-actions,
  .pager {
    align-items: stretch;
    flex-direction: column;
  }

  .list-filter-actions { gap: 12px; }
  .list-filter-actions .btn { width: 100%; }
  .pager .pager-links { flex-direction: row; }

  .replay-actions {
    grid-template-columns: 1fr;
  }

  .surface,
  .form-card,
  .filter-panel {
    padding: 14px;
  }
}
.command-response-wrap {
    position: relative;
    min-width: 16rem;
    padding-top: 2.25rem;
}

.command-copy-button {
    position: absolute;
    top: 0;
    right: 0;
    border: 1px solid var(--color-border, #f4bd7a);
    border-radius: .5rem;
    background: #fff;
    color: var(--color-primary, #1e3568);
    padding: .35rem .7rem;
    font: inherit;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
}

.command-copy-button:hover,
.command-copy-button:focus-visible {
    background: #f7f9ff;
    outline: 2px solid #1e3568;
    outline-offset: 2px;
}

.command-copy-button.is-copied {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.command-category {
    margin-bottom: 1.25rem;
}

.command-action-card fieldset {
    border: 0;
    padding: 0;
    margin: 0;
}

.command-action-card legend {
    margin-bottom: .45rem;
    font-weight: 700;
}

.command-action-card .js-preflight-status {
    display: block;
    color: #64748b;
    line-height: 1.35;
}
