/* ============================================
   SUPERB TRACKING - App Styles (bereinigt v0.3)
   ============================================ */

   html, body {
    height: 100vh;       /* fallback for browsers without dvh */
    height: 100dvh;      /* dynamic viewport: tracks mobile browser toolbars */
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* App typeface: Inter (loaded from Google Fonts in index.html), with a system
   stack fallback so text still renders cleanly if the web font is unavailable. */
body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

#app-layout {
    height: 100vh;
    height: 100dvh;
    display: flex;
}

/* ============================================
   SIDEBAR
   ============================================ */
#sidebar {
    background: #0f172a;
    color: #e2e8f0;
    width: 260px;
    flex-shrink: 0;
    transition: width 0.3s ease;
    box-shadow: 4px 0 12px rgba(0,0,0,0.25);
}

#sidebar.collapsed {
    width: 72px !important;
}

#sidebar.collapsed .nav-link span {
    display: none;
}

/* ============================================
   SIDEBAR NAVIGATION (verbesserte Specificity)
   ============================================ */
   #sidebar #nav-menu .nav-link,
   #sidebar #nav-footer .nav-link {
    color: #cbd5e1;
    padding: 8px 12px;
    border-radius: 8px;
    margin: 0 6px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease;
    display: flex;
    align-items: center;
    text-decoration: none;
}

/* Hover */
#sidebar #nav-menu .nav-link:hover,
#sidebar #nav-footer .nav-link:hover {
    background-color: #1e2937;
    color: #ffffff;
}

/* Active state — subtle filled highlight (matches the reference design) */
#sidebar #nav-menu .nav-link.active,
#sidebar #nav-footer .nav-link.active {
    background-color: #24324a;
    color: #ffffff;
    font-weight: 600;
}

/* ============================================
   SIDEBAR SCROLL + MAP FILTER PANEL
   ============================================ */
   #sidebar {
    overflow-y: auto !important;
    max-height: 100vh;
    max-height: 100dvh;
}

/* ============================================
   MAP FILTER PANEL (directly below the Map link)
   ============================================ */
/* No scrolling of its own — the sidebar handles all of it */
#map-filter-panel {
    max-height: none;
    overflow-y: visible;
    overflow-x: hidden;
    padding: 12px 0 8px 0;
    border-top: 1px solid #334155;
    margin-top: 4px;
}

/* Slightly roomier filter container */
#sidebar-filters-container {
    padding-left: 12px;
    padding-right: 12px;
}


/* ============================================
   LOGOUT BUTTON — consistent & reliable
   ============================================ */
#btn-logout-sidebar,
.btn-logout {
    --bs-btn-bg: #3b82f6;
    --bs-btn-color: #ffffff;
    --bs-btn-border-color: #3b82f6;

    --bs-btn-hover-bg: #2563eb;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-border-color: #2563eb;

    --bs-btn-active-bg: #1e40af;
    --bs-btn-active-color: #ffffff;
    --bs-btn-active-border-color: #1e40af;

    font-weight: 600;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1 !important;
}

#btn-logout-sidebar i,
#btn-logout-sidebar span,
.btn-logout i,
.btn-logout span {
    color: inherit !important;
}

#btn-logout-sidebar:hover,
.btn-logout:hover {
    background-color: #2563eb !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.45);
}

#btn-logout-sidebar:active,
.btn-logout:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

#btn-logout-sidebar i {
    font-size: 1.15rem;
}

/* Collapsed Sidebar: Text ausblenden */
#sidebar.collapsed #btn-logout-sidebar span {
    display: none;
}

#sidebar.collapsed #btn-logout-sidebar {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

/* ============================================
   MAIN AREA + MAP
   ============================================ */
#main-area {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

#main-content,
#map-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    background: #f8fafc;
}

#map-wrapper:not(.d-none) {
    display: block;
}

#map {
    width: 100% !important;
    height: 100% !important;
}

/* ============================================
   RESPONSIVE SIDEBAR (Mobile Drawer)
   ============================================ */
@media (min-width: 768px) {
    #sidebar {
        position: static !important;
        transform: none !important;
        width: 260px !important;
        visibility: visible !important;
        box-shadow: 4px 0 12px rgba(0,0,0,0.25);
    }
    /* Collapse fully hides the sidebar off-screen (not an icon rail). A handle
       on the left edge (#sidebar-reopen) brings it back. */
    #sidebar.collapsed {
        width: 0 !important;
        min-width: 0;
        overflow: hidden;
        box-shadow: none;
    }
    body.sidebar-collapsed .sidebar-reopen { display: flex; }
}

/* Left-edge handle to reopen a collapsed sidebar. Hidden unless collapsed (and
   desktop-only — mobile uses the hamburger drawer). */
.sidebar-reopen {
    display: none;
    position: fixed; top: 12px; left: 0; z-index: 1060;
    width: 26px; height: 46px;
    align-items: center; justify-content: center;
    border: none; border-radius: 0 8px 8px 0;
    background: #0f172a; color: #e2e8f0;
    box-shadow: 2px 0 8px rgba(0,0,0,0.3); cursor: pointer;
    transition: background-color 0.15s ease;
}
.sidebar-reopen:hover { background: #1e2937; color: #fff; }
@media (max-width: 767.98px) {
    .sidebar-reopen { display: none !important; }  /* mobile uses the hamburger */
}

@media (max-width: 767.98px) {
    #sidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        height: 100vh;
        height: 100dvh;
        width: 260px !important;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 4px 0 20px rgba(0,0,0,0.4);
        visibility: visible !important;
    }

    #sidebar.mobile-open {
        transform: translateX(0);
    }
}

/* ============================================
   TOAST CONTAINER
   ============================================ */
.toast-container {
    z-index: 1100;
}


/* AeroButton im Sidebar Footer anpassen */
#logout-button-container .aviation-btn {
    width: 100% !important;
    margin-top: 4px;
}


/* ============================================
   ASSET LAST POSITION POPOVER MAP
   ============================================ */
   .popover-asset-map {
    --bs-popover-max-width: 290px !important;
    max-width: 290px !important;
  }
  
  .popover-asset-map .popover-body {
    padding: 6px !important;
    margin: 0 !important;
  }
  
  .asset-map-wrapper {
    width: 265px;
    height: 195px;
    border-radius: 8px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
  }
  
  .asset-map-wrapper img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    border-radius: 6px;
  }

/* ============================================
   MAP (MapLibre) ASSET INFO POPUPS
   Make them wider and prevent button/text overflow
   ============================================ */
.map-popup .maplibregl-popup-content {
  min-width: 320px !important;
  max-width: 360px !important;
  padding: 8px 10px;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.map-popup .maplibregl-popup-content > div {
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Make the action buttons at the bottom more flexible */
.map-popup .maplibregl-popup-content .d-flex.gap-2 {
  gap: 6px !important;
  flex-wrap: wrap;
}

.map-popup .maplibregl-popup-content .btn {
  font-size: 0.8rem;
  padding: 4px 6px;
  min-width: 0;
  flex: 1 1 auto;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
}

/* ============================================
   MAP FLOATING ASSET INFO PANEL
   Docked top-left, decoupled from the marker so it stays put while the
   camera zooms out to fit the route.
   ============================================ */
.map-info-panel {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 6;
  width: 340px;
  max-width: calc(100% - 24px);
  max-height: calc(100% - 24px);
  overflow-y: auto;
  background: #fff;
  color: #111;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  padding: 12px 14px;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.map-info-panel-header {
  display: flex;
  align-items: center;
  gap: 6px;
}
.map-info-panel-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-info-panel-toggle,
.map-info-panel-close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1;
}
.map-info-panel-toggle:hover,
.map-info-panel-close:hover { background: #f1f5f9; color: #111; }

/* Collapsed: show only the header bar (frees the map on mobile). */
.map-info-panel.collapsed .map-info-panel-body { display: none; }

.map-info-panel-body { margin-top: 6px; }

.map-info-panel .js-sensor-badge:hover {
  background: #e0f2fe !important;
  border-color: #38bdf8 !important;
}

/* Footer status line (history loading etc.) — spinner only as tall as the row. */
.map-info-panel-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
  font-size: 1.05rem;
  color: #6b7280;
}
.map-info-panel-status[hidden] { display: none; }
.map-info-panel-status svg { display: block; flex: 0 0 auto; }

/* ============================================
   MAP CONTROL BAR — collapsible on mobile
   Desktop: arrow toggle hidden, controls always shown.
   Mobile: only the arrow shows; tapping it reveals the controls as a
   right-aligned column, which folds back up after any control is used.
   ============================================ */
.map-controls-toggle { display: none; }
.map-controls-row,
.map-controls-wrap {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

@media (max-width: 767.98px) {
  .map-controls {
    flex-direction: column;
    align-items: flex-end;
  }
  .map-controls-row { align-items: center; }
  .map-controls-toggle { display: flex; align-items: center; justify-content: center; }
  /* Collapsed = just the arrow. The selector unfolds to its left on expand, */
  .map-controls:not(.expanded) .map-layer-select { display: none; }
  .map-layer-select { max-width: 55vw; }
  /* and the icon buttons unfold into a narrow column below the arrow — pinned
     to button width so it never inherits the (wide) selector's width. */
  .map-controls .map-controls-wrap { display: none; }
  .map-controls.expanded .map-controls-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    align-self: flex-end;
    width: max-content;
  }
}

/* ============================================
   MAP SENSOR HISTORY SIDEBAR
   Slides in from the right, spans up to 50% of the map width.
   ============================================ */
.map-sensor-sidebar {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 50%;
  min-width: 320px;
  z-index: 7;
  display: none;            /* toggled to flex when opened */
  flex-direction: column;
  background: #ffffff;
  box-shadow: -6px 0 24px rgba(0, 0, 0, 0.22);
  box-sizing: border-box;
}

.map-sensor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 14px 8px;
  border-bottom: 1px solid #e5e7eb;
}

.map-sensor-close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 1.1rem;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1;
}
.map-sensor-close:hover { background: #f1f5f9; color: #111; }

.map-sensor-ranges {
  padding: 8px 14px;
}

.map-sensor-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 4px 14px 16px;
}

.map-sensor-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 12px;
  background: #fff;
}

/* Responsive grid of sensor charts — shared by the map sidebar and the
   asset detail page. Auto-fills columns: 1 in the narrow sidebar, several
   across the wide asset detail card. */
.sensor-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.sensor-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}

/* Subtle reload button overlaid in the corner of the asset detail mini-map */
.asset-map-reload {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.85);
  color: #334155;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  opacity: 0.65;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.asset-map-reload:hover { opacity: 1; }

.ssr-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 8px;
  margin-bottom: 6px;
}

.ssr-card-title { font-weight: 600; font-size: 0.9rem; }

.ssr-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.72rem;
  color: #475569;
}
.ssr-stat b { color: #111; }

.ssr-card-canvas {
  position: relative;
  height: 150px;
}

@media (max-width: 575.98px) {
  .map-sensor-sidebar { width: 100%; min-width: 0; }
}

/* ============================================
   DESIGN TOKENS (shell redesign)
   ============================================ */
:root {
  --brand-primary: #2563eb;
  --brand-primary-hover: #1d4ed8;
  --ink: #0f172a;
  --ink-soft: #475569;
  --line: #e5e7eb;
}

/* ============================================
   SIDEBAR — head, nav, footer, collapse
   ============================================ */
#sidebar { background: #0f172a; }

.sidebar-head {
  height: 68px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.sidebar-logo { height: 40px; width: auto; max-width: 180px; transition: max-width 0.2s ease; }

.sidebar-collapse-btn {
  width: 28px; height: 28px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: #cbd5e1;
  border-radius: 8px;
  align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}
.sidebar-collapse-btn:hover { background: #1e2937; color: #fff; }

.sidebar-nav { padding: 10px 8px; gap: 2px; }
.sidebar-nav-footer { padding: 2px 8px; }
.sidebar-footer { border-top: 1px solid rgba(255,255,255,0.08); padding: 4px 10px 6px; }

/* Collapsed sidebar */
#sidebar.collapsed .sidebar-logo { max-width: 40px; object-fit: cover; object-position: left; }
#sidebar.collapsed .sidebar-head { justify-content: center; }
#sidebar.collapsed .nav-link { justify-content: center; padding-left: 0; padding-right: 0; }
#sidebar.collapsed .nav-link i { margin-right: 0 !important; }
#sidebar.collapsed .nav-link .badge { display: none; }

/* ============================================
   TOPBAR
   ============================================ */
#topbar { min-height: 62px; gap: 12px; }
.min-w-0 { min-width: 0; }

.topbar-app-name {
  font-weight: 700; color: var(--ink); line-height: 1.1;
  font-size: 0.95rem; letter-spacing: 0.01em;
}

/* Breadcrumb */
.breadcrumb-bar {
  display: flex; align-items: center; flex-wrap: nowrap;
  gap: 6px; margin: 2px 0 0; font-size: 0.78rem; min-width: 0;
}
.breadcrumb-bar .bc-home { color: #94a3b8; display: inline-flex; }
.breadcrumb-bar .bc-home:hover { color: var(--brand-primary); }
.breadcrumb-bar .bc-sep { color: #cbd5e1; font-size: 0.6rem; }
.breadcrumb-bar .bc-link { color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.breadcrumb-bar .bc-link:hover { color: var(--brand-primary); text-decoration: underline; }
.breadcrumb-bar .bc-current { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Metric / Imperial toggle */
.unit-toggle {
  display: inline-flex; background: #f1f5f9; border: 1px solid var(--line);
  border-radius: 999px; padding: 2px; gap: 2px;
}
.unit-toggle .unit-opt {
  border: 0; background: transparent; color: var(--ink-soft);
  font-size: 0.78rem; font-weight: 600; padding: 4px 12px; border-radius: 999px;
  cursor: pointer; transition: all 0.15s ease; white-space: nowrap;
}
.unit-toggle .unit-opt.active {
  background: #fff; color: var(--brand-primary);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

/* Notification bell */
.topbar-icon-btn {
  position: relative; width: 40px; height: 40px;
  border: 1px solid var(--line); background: #fff; color: #475569;
  border-radius: 10px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.topbar-icon-btn:hover { background: #f8fafc; color: var(--ink); border-color: #cbd5e1; }
.topbar-badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 18px; height: 18px; padding: 0 4px;
  background: #ef4444; color: #fff; font-size: 0.62rem; font-weight: 700;
  border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}

/* User block */
.topbar-user-btn {
  display: inline-flex; align-items: center; gap: 10px;
  border: 0; background: transparent; cursor: pointer; padding: 4px 6px; border-radius: 10px;
  transition: background 0.15s ease;
}
.topbar-user-btn:hover { background: #f1f5f9; }
.topbar-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-primary), #1e40af);
  color: #fff; font-weight: 700; font-size: 0.82rem;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.topbar-user-meta { flex-direction: column; align-items: flex-start; line-height: 1.15; min-width: 0; }
.topbar-user-name { font-weight: 600; color: var(--ink); font-size: 0.82rem; white-space: nowrap; }
.topbar-user-role { color: #94a3b8; font-size: 0.7rem; white-space: nowrap; }
.topbar-user-caret { color: #94a3b8; font-size: 0.7rem; }

/* ============================================
   SOFT BADGE PILLS (status) — reusable
   ============================================ */
.badge-soft { font-weight: 600; border-radius: 999px; padding: 0.3em 0.7em; font-size: 0.72rem; }
.badge-soft-blue  { background: #e0edff; color: #1d4ed8; }
.badge-soft-green { background: #dcfce7; color: #15803d; }
.badge-soft-red   { background: #fee2e2; color: #b91c1c; }
.badge-soft-amber { background: #fef3c7; color: #b45309; }
.badge-soft-gray  { background: #f1f5f9; color: #475569; }

/* Map popup close button: MapLibre's default is ~16px — far too small a touch
   target on mobile (POI/asset popups). */
.maplibregl-popup-close-button {
  font-size: 22px;
  width: 36px;
  height: 36px;
  line-height: 36px;
  padding: 0;
}

/* App-wide help-text system (ui/help.js — see docs/help-text.md). The "?" icon
   and any hover-help target (e.g. a status pill) get a help cursor; the tooltip
   is wider than default and left-aligned so the example-led copy stays readable.
   .slot-help/.help-tip are kept as aliases for anything not yet migrated. */
.app-help-icon,
.help-tip,
[data-help].badge { cursor: help; }
.tooltip.app-help,
.tooltip.slot-help { --bs-tooltip-max-width: 360px; }
.tooltip.app-help .tooltip-inner,
.tooltip.slot-help .tooltip-inner {
  max-width: 360px;
  text-align: left;
  padding: 0.55rem 0.7rem;
  line-height: 1.4;
}
.app-help-inline { line-height: 1.35; }

/* ── Subscription plan / pricing page (features/subscription/*) ─────────────── */
.pricing-page { max-width: 1200px; }
.pricing-summary {
  background: #f8fafc;
  border: 1px solid #e5e9f0;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  position: sticky;
  top: 0;
}
.pricing-total {
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.1;
  color: #0d1b2a;
}
.pricing-total-unit { font-size: .9rem; font-weight: 500; color: #7b8794; margin-left: .25rem; }
.pricing-breakdown { max-height: 240px; overflow-y: auto; }
.pricing-row + .pricing-row { border-top: 1px dashed #eef1f4; }
.pricing-qty .pricing-input::-webkit-outer-spin-button,
.pricing-qty .pricing-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pricing-qty .pricing-input { -moz-appearance: textfield; }

/* Volume-tier comparison cards */
.pricing-tier-card {
  position: relative;
  border: 1px solid #e5e9f0;
  border-radius: 12px;
  padding: 1rem .9rem .9rem;
  background: #fff;
  transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}
.pricing-tier-card:hover { box-shadow: 0 4px 14px rgba(13,27,42,.08); }
.pricing-tier-card.active {
  border-color: var(--bs-primary, #0d6efd);
  box-shadow: 0 6px 20px rgba(13,110,253,.18);
  transform: translateY(-2px);
}
.pricing-tier-flag {
  position: absolute; top: -10px; right: 12px;
  background: var(--bs-primary, #0d6efd); color: #fff;
  font-size: .62rem; font-weight: 600; letter-spacing: .03em;
  padding: .12rem .5rem; border-radius: 999px;
}
.pricing-tier-name { font-size: 1.25rem; font-weight: 700; color: #0d1b2a; line-height: 1; }
.pricing-tier-from { margin: .35rem 0 .1rem; }
.pricing-tier-price { font-size: 1.15rem; font-weight: 700; color: var(--bs-primary, #0d6efd); }
.pricing-tier-yourfleet { margin: .5rem 0; padding-top: .5rem; border-top: 1px dashed #eef1f4; }
.pricing-tier-total { font-size: 1.05rem; font-weight: 700; color: #0d1b2a; line-height: 1.1; }
.pricing-tier-total .u { font-size: .7rem; font-weight: 500; color: #7b8794; margin-left: .15rem; }
.pricing-tier-feats { list-style: none; padding: 0; margin: .25rem 0 0; }
.pricing-tier-feats li {
  font-size: .74rem; color: #52616b; padding-left: 1.1rem; position: relative; margin-bottom: .15rem;
}
.pricing-tier-feats li::before {
  content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  position: absolute; left: 0; top: .05rem; color: var(--bs-success, #198754); font-size: .62rem;
}
.pricing-matrix tfoot .pricing-total-row td { border-top: 2px solid #d7dce3; background: #f8fafc; }
.pricing-matrix tfoot .pricing-total-row .pricing-col.active { background: rgba(13,110,253,.12); }

/* Per-product detail bullets in the configurator list */
.pricing-detail-list { list-style: none; padding: 0; margin: .3rem 0 0; }
.pricing-detail-list li {
  font-size: .74rem; color: #52616b; padding-left: 1.05rem; position: relative; margin-bottom: .12rem; line-height: 1.35;
}
.pricing-detail-list li::before {
  content: ""; position: absolute; left: .28rem; top: .5rem;
  width: 4px; height: 4px; border-radius: 50%; background: var(--bs-primary, #0d6efd); opacity: .55;
}
.pricing-details > summary {
  cursor: pointer; font-size: .72rem; color: var(--bs-primary, #0d6efd); font-weight: 600;
  margin-top: .3rem; width: fit-content; list-style: none;
}
.pricing-details > summary::-webkit-details-marker { display: none; }
.pricing-details > summary::after { content: " \f078"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: .6rem; margin-left: .3rem; }
.pricing-details[open] > summary::after { content: " \f077"; }
.pricing-details[open] > summary { margin-bottom: .1rem; }

/* POI overlay calibration panel + map pins (features/pois/poi-overlay-calibrator.js) */
.ov-cal-panel {
  position: fixed; top: 72px; left: 12px; width: 372px; max-width: calc(100vw - 24px);
  max-height: calc(100vh - 96px); overflow: auto; z-index: 2000;
  background: #fff; border: 1px solid #d7dce3; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(13, 27, 42, .22); padding: 12px 14px;
}
.ov-cal-canvas {
  width: 100%; border: 1px solid #dee2e6; border-radius: 6px;
  cursor: crosshair; touch-action: none; background: #eef2f7;
}
.ov-cal-marker {
  width: 24px; height: 24px; border-radius: 50%; background: #0d6efd; color: #fff;
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; cursor: grab;
}
.ov-cal-marker:active { cursor: grabbing; }

/* Full price matrix: highlight the active tier column */
.pricing-matrix th, .pricing-matrix td { white-space: nowrap; }
.pricing-matrix .pricing-cat-row td { background: #f8fafc; }
.pricing-matrix .pricing-col.active { background: rgba(13,110,253,.06); }
.pricing-matrix thead .pricing-col.active { background: rgba(13,110,253,.12); color: var(--bs-primary, #0d6efd); }

/* Sensor-history charts in fullscreen: give them a readable canvas rather than
   the browser's default black fullscreen background. */
#sensor-charts-section:fullscreen {
  background: #fff;
  padding: 24px;
  overflow: auto;
}

/* Demo mode (superadmin, modules/demo-mode.js): blur tenant names and
   tenant-capable filter inputs so the app can be shown over screen-share without
   exposing customer identities. Visual only — the DOM text is intact, so the
   operator can still type to filter. */
html.demo-mode .tenant-name { filter: blur(6px); user-select: none; }
html.demo-mode input.tenant-blur,
html.demo-mode select.tenant-blur { filter: blur(4px); }

/* Small demo toggle in the sidebar footer, tucked tight under the copyright. */
.demo-switch { padding-top: 2px; }
.demo-switch .form-check { min-height: auto; }
.demo-switch .form-check-input { width: 1.5em; height: 0.8em; margin-top: 0; cursor: pointer; }
.demo-switch .form-check-label {
  font-size: 0.56rem; cursor: pointer;
  color: rgba(255, 255, 255, 0.4);
}