: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);
}

.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;
}

.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;
}

.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;
}

.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;
}

.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-copy {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--fb-muted);
  font-size: 1rem;
}

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

.surface {
  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 {
  min-height: 42px;
  border-radius: 10px;
  font-weight: 850;
}

.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);
}

.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; }
.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-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; }
.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)); } }
@media (max-width: 640px) { .battery-filters { 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: 4px;
  text-align: right;
}

.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;
}

.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;
}

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

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

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: 10px;
  padding-top: 4px;
}

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

.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 {
  flex-wrap: nowrap;
  padding-top: 0;
}

.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;
  gap: 14px;
}

.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;
}

.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;
}

.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; }
.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-popup-action { margin-top: 6px; padding: 5px 7px; border: 1px solid #bfdbfe; border-radius: 6px; background: #eff6ff; color: #1d4ed8; font-weight: 800; }

.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 .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-event-heading {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--fb-border);
}

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

.geofence-event-list {
  display: grid;
  gap: 7px;
}

.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; }

.tenant-status-form {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.tenant-status-form .form-select { min-width: 130px; }

.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; }
@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 {
  min-height: 620px;
}

.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) {
  .page-heading {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .dashboard-grid,
  .metric-grid,
  .dashboard-analysis-grid,
  .form-grid,
  .swap-summary,
  .asset-row,
  .list-filter,
  .map-shell {
    grid-template-columns: 1fr;
  }

  .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;
  }

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

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

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

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

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

  .surface {
    padding: 14px;
  }
}
