@font-face {
  font-display: block;
  font-family: "bootstrap-icons";
  src: url("/fonts/bootstrap-icons.woff2") format("woff2"),
       url("/fonts/bootstrap-icons.woff") format("woff");
}

:root {
  --topbar-height: 70px; /* S008: used by topology canvas height calc */
  --color-brand: #328cb6;
  --color-brand-light: #3c9ed7;
  --color-brand-pale: #eaf4fb;
  --color-brand-border: #b8d9ec;
  --color-brand-dark: #1a5a7a;
  --color-warning: #e67e00;
  --color-badge: #ff5d48;

  /* Status colors */
  --status-normal:   #198754;
  --status-warning:  #e67e00;
  --status-critical: #dc3545;
  --status-silent:   #6c757d;

  /* Sensor identity colors */
  --sensor-temperature: #a855f7;
  --sensor-humidity:    #0ea5e9;
  --sensor-moisture:    #1d4ed8;
  --sensor-battery:     #6366f1;
  --sensor-freezing:    #22d3ee;
}

/* Sensor badge chips */
.sensor-badge-temperature { background: rgba(168,85,247,.1)  !important; color: #a855f7 !important; border: 1px solid rgba(168,85,247,.25) !important; }
.sensor-badge-humidity    { background: rgba(14,165,233,.1)  !important; color: #0ea5e9 !important; border: 1px solid rgba(14,165,233,.25)  !important; }
.sensor-badge-moisture    { background: rgba(29,78,216,.1)   !important; color: #1d4ed8 !important; border: 1px solid rgba(29,78,216,.25)   !important; }
.sensor-badge-battery     { background: rgba(99,102,241,.1)  !important; color: #6366f1 !important; border: 1px solid rgba(99,102,241,.25)  !important; }
.sensor-badge-freezing    { background: rgba(34,211,238,.1)  !important; color: #22d3ee !important; border: 1px solid rgba(34,211,238,.25)  !important; }

/* Sensor card tints (section headers in device detail) */
.sensor-card-temperature  { background: rgba(168,85,247,.05) !important; border: 1px solid rgba(168,85,247,.2) !important; }
.sensor-card-humidity     { background: rgba(14,165,233,.05) !important; border: 1px solid rgba(14,165,233,.2)  !important; }
.sensor-card-moisture     { background: rgba(29,78,216,.05)  !important; border: 1px solid rgba(29,78,216,.2)   !important; }
.sensor-card-battery      { background: rgba(99,102,241,.05) !important; border: 1px solid rgba(99,102,241,.2)  !important; }
.sensor-card-freezing     { background: rgba(34,211,238,.05) !important; border: 1px solid rgba(34,211,238,.2)  !important; }

/* Sensor text colors */
.sensor-text-temperature  { color: #a855f7 !important; }
.sensor-text-humidity     { color: #0ea5e9 !important; }
.sensor-text-moisture     { color: #1d4ed8 !important; }
.sensor-text-battery      { color: #6366f1 !important; }
.sensor-text-freezing     { color: #22d3ee !important; }

td {
  vertical-align: middle !important;
}

/* Warning color overrides */
.text-warning-emphasis {
  color: var(--color-warning) !important;
}
.bg-warning {
  background-color: var(--color-warning) !important;
}

/* Authentication */
.authentication-bg {
  background-color: var(--color-brand) !important;
}

/* Cards */
.account-card-box .card {
  border: 4px solid var(--color-brand);
}

/* Navbar */
.navbar-custom {
  background-color: #1c2333 !important;
  border-bottom: 1px solid rgba(255, 255, 255, .07) !important;
}
.navbar-custom i {
  color: #ffffff !important;
}
.navbar-custom a {
  color: #ffffff !important;
}
.navbar-custom .dropdown-menu a span,
.navbar-custom .dropdown-menu a i {
  color: #000000 !important;
}

/* Notification badges */
.left-side-menu .noti-icon-badge {
  display: inline-block !important;
  padding: 0 !important;
  height: 8px;
  width: 8px;
  background-color: var(--color-badge);
  border-radius: 50%;
  border: 2px solid #1c2333;
  position: absolute;
  top: 0;
  right: -2px;
}
/* Subtle 2-second pulse for downgrade-attention dots. Stays under WCAG
   2.2.2's 3Hz flash threshold and respects prefers-reduced-motion. */
.left-side-menu .noti-icon-badge--pulse {
  animation: noti-pulse 2s ease-in-out infinite;
}
@keyframes noti-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 93, 72, 0.6); }
  50%      { box-shadow: 0 0 0 6px rgba(255, 93, 72, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .left-side-menu .noti-icon-badge--pulse { animation: none; }
}
.navbar-custom .noti-icon-badge {
  display: inline-block !important;
  padding: 0 !important;
  height: 10px;
  width: 10px;
  background-color: var(--color-badge);
  border-radius: 50%;
  border: 2px solid #ffffff;
  position: absolute;
  top: 22px;
  left: 10px;
}

/* ─────────────────────────────────────────────────────────────────────────
   Page shell — replaces app.min.css layout skeleton
   ───────────────────────────────────────────────────────────────────────── */

#wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

.content-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  margin-left: 240px;
  overflow: hidden;
  padding: 0 15px 5px;
  margin-top: 70px;
}

.content-page > .content {
  flex: 1;
}

/* Topbar */
.navbar-custom {
  display: flex;
  align-items: center;
  padding: 0;
  position: fixed;
  left: 0;
  right: 0;
  height: 70px;
  z-index: 100;
}

.logo-box {
  height: 70px;
  width: 240px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-dark  { display: block; }

.topbar-left {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  padding-left: 1.25rem;
}

.topbar-account-name {
  color: rgba(255, 255, 255, .55);
  font-size: 1.1rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-toggle-btn {
  display: none;
  color: rgba(255, 255, 255, .75) !important;
  padding: 0 18px !important;
  height: 70px;
  align-items: center;
  flex-shrink: 0;
}
.sidebar-toggle-btn:hover {
  color: #ffffff !important;
}

.topnav-menu {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding-right: 20px;
}

.topnav-menu .nav-link {
  padding: 0 12px;
  min-width: 32px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topnav-menu .btn-link {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
}

.topnav-menu .nav-link:hover,
.topnav-menu .btn-link:hover {
  background: rgba(255, 255, 255, .07) !important;
}

/* Sidebar shell */
.left-side-menu {
  width: 240px;
  bottom: 0;
  padding: 20px 0;
  position: fixed;
  transition: width .2s ease-out;
  top: 70px;
  overflow-y: auto;
  z-index: 10;
}

.side-nav {
  padding: 0;
  margin: 0;
  list-style: none;
}

.side-nav li { list-style: none; }

/* Page title bar */
.page-title-box {
  background: linear-gradient(135deg, var(--color-brand-dark) 0%, var(--color-brand) 55%, #3cb6c8 100%);
  color: #fff;
  padding: 1rem 1.4rem;
  margin: 0 -15px 1.5rem;
  border-bottom-left-radius: .5rem;
  border-bottom-right-radius: .5rem;
  box-shadow: 0 4px 14px rgba(50, 140, 182, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
}

.page-title-box .page-title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0;
  color: #fff;
  line-height: 1.3;
}

.page-title-box .page-title-right {
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* Breadcrumb links re-styled for gradient banner */
.page-title-box .breadcrumb-link {
  color: #fff;
  opacity: .82;
  text-decoration: none;
  transition: opacity .15s ease;
}
.page-title-box .breadcrumb-link:hover {
  color: #fff;
  opacity: 1;
  text-decoration: underline;
}
.page-title-box .breadcrumb-sep {
  color: rgba(255, 255, 255, .5);
}

/* Outline buttons need white styling to be readable on the gradient */
.page-title-box .btn-outline-primary,
.page-title-box .btn-outline-secondary,
.page-title-box .btn-outline-danger,
.page-title-box .btn-outline-warning {
  color: #fff;
  border-color: rgba(255, 255, 255, .55);
  background: transparent;
}
.page-title-box .btn-outline-primary:hover,
.page-title-box .btn-outline-secondary:hover,
.page-title-box .btn-outline-danger:hover,
.page-title-box .btn-outline-warning:hover {
  background: rgba(255, 255, 255, .15);
  border-color: #fff;
  color: #fff;
}
.page-title-box .btn.disabled,
.page-title-box .btn:disabled {
  color: rgba(255, 255, 255, .55);
  border-color: rgba(255, 255, 255, .25);
  background: transparent;
}

/* Auth pages */
.account-card-box {
  background-color: #fff;
  padding: 7px;
  border-radius: 8px;
}

/* Mobile + tablet: sidebar becomes toggle-based overlay at ≤991px (S001) */
@media (max-width: 991.98px) {
  .content-page {
    margin-left: 0;
    padding: 0 10px;
  }
  .left-side-menu {
    display: none;
    z-index: 200;
  }
  .sidebar-enable .left-side-menu {
    display: block;
  }
  /* Logo shrinks to fit; hamburger stays fixed-size next to icons */
  .logo-box {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    padding: 0 1rem;
    overflow: hidden;
  }
  .logo-box img {
    max-width: 100%;
    height: auto;
  }
  .topbar-left {
    flex: 0 0 auto;
    padding-left: 0;
  }
  .sidebar-toggle-btn {
    display: flex !important;
  }
  .topbar-account-name {
    display: none;
  }
  .page-title-box .page-title-right {
    display: none;
  }
}

/* Stacked card layout for tables at xs — shared base class */
@media (max-width: 575.98px) {
  .stacked-table thead { display: none; }
  .stacked-table,
  .stacked-table tbody { display: block; }
  .stacked-table tbody tr {
    display: block;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin: 0 0 0.75rem;
    overflow: hidden;
    background: #fff;
  }
  .stacked-table tbody td {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border: none !important;
    border-top: 1px solid #f0f0f0 !important;
    padding: 7px 14px;
    font-size: 0.875rem;
  }
  .stacked-table tbody td[data-label]::before {
    content: attr(data-label);
    color: #adb5bd;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex-shrink: 0;
  }
}

/* records-table: shaded date header row + shaded View button footer row */
@media (max-width: 575.98px) {
  .records-table tbody td:first-child {
    background: #f8f9fa;
    border-top: none !important;
    font-size: 0.8rem;
    color: #6c757d;
    padding: 8px 14px;
  }
  .records-table tbody td:last-child {
    justify-content: flex-end;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6 !important;
    padding: 8px 14px;
  }
  .records-table tbody td:last-child::before { content: none; }
}

/* S018: list card rows — wrap name/meta above action cluster on xs */
@media (max-width: 575.98px) {
  .card.d-flex.flex-row.align-items-center.gap-3 {
    flex-wrap: wrap;
  }
  .card.d-flex.flex-row.align-items-center.gap-3 > .d-flex.gap-1.flex-shrink-0 {
    width: 100%;
    justify-content: flex-end;
    margin-top: .25rem;
  }
}

/* ─────────────────────────────────────────────────────────────────────────
   Sidebar — dark theme
   ───────────────────────────────────────────────────────────────────────── */

.left-side-menu {
  background: #1c2333 !important;
  border-right: 1px solid rgba(255, 255, 255, .05) !important;
}

.logo-box {
  background-color: #ffffff !important;
  border-bottom: none !important;
}

#sidebar-menu > ul > li > a {
  font-family: 'IBM Plex Sans', 'Roboto', sans-serif !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  letter-spacing: .01em !important;
  color: #a8b8cc !important;
  padding: 10px 10px 10px 20px !important;
  transition: color .15s ease, background .15s ease !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

#sidebar-menu > ul > li > a i {
  color: #a8b8cc !important;
  font-size: 17px !important;
  width: 20px !important;
  text-align: center !important;
  flex-shrink: 0 !important;
  transition: color .15s ease !important;
}

#sidebar-menu > ul > li > a:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, .07) !important;
  text-decoration: none !important;
}

#sidebar-menu > ul > li > a:hover i {
  color: #ffffff !important;
}

/* Active — pill style. Higher specificity (1-1-4) overrides inline brand style (1-1-3). */
body #sidebar-menu > ul > li > a.active {
  background-color: var(--color-brand) !important;
  box-shadow: 0 2px 10px rgba(50, 140, 182, .35) !important;
  color: #ffffff !important;
  border-left: none !important;
  border-radius: 8px !important;
  margin: 2px 10px !important;
  padding: 9px 10px 9px 10px !important;
}

body #sidebar-menu > ul > li > a.active i {
  color: #ffffff !important;
}

/* Section labels */
#sidebar-menu .menu-title {
  font-family: 'IBM Plex Sans', 'Roboto', sans-serif !important;
  color: #4a607a !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
  padding: 20px 20px 5px !important;
}

#sidebar-menu li.menu-title ~ li.menu-title {
  border-top: 1px solid rgba(255, 255, 255, .06) !important;
  margin-top: 4px !important;
}

/* Bundles & Add-ons — subtle upgrade CTA treatment */
#sidebar-menu > ul > li > a[href*="upgrade"] {
  color: var(--color-brand-light) !important;
}

#sidebar-menu > ul > li > a[href*="upgrade"] i {
  color: var(--color-brand-light) !important;
}

#sidebar-menu > ul > li > a[href*="upgrade"]:hover {
  background: rgba(50, 140, 182, .15) !important;
  color: #ffffff !important;
}

#sidebar-menu > ul > li > a[href*="upgrade"]:hover i {
  color: #ffffff !important;
}

/* Layout */
.content {
  margin-bottom: 1.5rem;
}
/* ─────────────────────────────────────────────────────────────────────────
   App footer — dark control-panel chrome
   ───────────────────────────────────────────────────────────────────────── */

.footer-app {
  background-color: #1c2333;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  margin-top: auto;
  /* break out of .content-page's 15px side padding and 5px bottom padding */
  margin-left: -15px;
  margin-right: -15px;
  margin-bottom: -5px;
}

.footer-app-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 1.25rem;
}

/* Brand block */
.footer-brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-shrink: 0;
}

.footer-brand-name {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #d0d8ea;
}

.footer-brand-sub {
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #7a93b5;
  padding-left: .4rem;
  border-left: 1px solid #3a4f6a;
}

/* Pulse indicator */
.footer-pulse {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #198754;
  box-shadow: 0 0 0 0 rgba(25, 135, 84, .6);
  animation: footer-pulse-ring 2.4s ease-out infinite;
  flex-shrink: 0;
}

@keyframes footer-pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(25, 135, 84, .6); }
  60%  { box-shadow: 0 0 0 6px rgba(25, 135, 84, 0); }
  100% { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0); }
}

/* Copyright */
.footer-copy {
  flex: 1;
  text-align: center;
}

.footer-copy-text {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: .67rem;
  color: #8ba4c2;
  letter-spacing: .03em;
  white-space: nowrap;
}

/* Maker */
.footer-maker {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-shrink: 0;
}

.footer-maker-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity .2s ease;
  opacity: .7;
}

.footer-maker-link:hover {
  opacity: 1;
}

.footer-logo-img {
  height: 22px;
  width: auto;
  /* render the dark SVG paths as white on the dark footer bg */
  filter: brightness(0) invert(1);
}

@media (max-width: 767.98px) {
  .footer-app {
    margin-left: -10px;
    margin-right: -10px;
  }
  .footer-app-inner {
    flex-direction: column;
    gap: .4rem;
    padding: .65rem 1rem;
    text-align: center;
  }
  .footer-brand-sub { display: none; }
  .footer-copy-text { white-space: normal; }
}

/* Misc */
div#toast-area {
  position: fixed;
  top: calc(70px + 1rem);
  right: 1rem;
  z-index: 1100;
}
div#admin-warning {
  position: fixed;
  left: 0px;
  top: 0px;
  z-index: 1000;
  width: 100%;
}

/* -------------------------------------------------------------------------
   Buttons — brand color
   ------------------------------------------------------------------------- */
.btn-primary {
  background-color: var(--color-brand) !important;
  border-color: var(--color-brand-dark) !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--color-brand-dark) !important;
  border-color: var(--color-brand-dark) !important;
}

/* ─────────────────────────────────────────────────────────────────────────
   Forms — modern global treatment
   ───────────────────────────────────────────────────────────────────────── */

/* Field labels — technical identifier style */
.form-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #3a5a72;
  margin-bottom: 0.35rem;
}

/* Base inputs — elevated, tinted, rounded */
.form-control,
.form-select {
  border: 1.5px solid #cdd9e3;
  border-radius: 8px;
  background-color: #f7fafc;
  color: #1a2a38;
  font-size: 0.9rem;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.1s ease;
}

.form-control::placeholder {
  color: #a0b8c8;
  font-size: 0.875rem;
}

/* Focus ring — crisp brand accent */
.form-control:focus,
.form-select:focus {
  border-color: var(--color-brand);
  background-color: #fff;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04), 0 0 0 3px rgba(50, 140, 182, 0.14);
  outline: none;
}

/* Textarea */

/* Hint text */
.form-text {
  font-size: 0.72rem;
  color: #7a9aaa;
  margin-top: 0.3rem;
  line-height: 1.45;
}

/* Input groups — consistent border weight + coordinated focus */
.input-group > .form-control,
.input-group > .form-select {
  border-width: 1.5px;
  border-color: #cdd9e3;
}

.input-group-text {
  background-color: var(--color-brand-pale);
  border: 1.5px solid var(--color-brand-border);
  color: var(--color-brand-dark);
  font-size: 0.875rem;
  font-weight: 500;
}

.input-group:focus-within .input-group-text {
  border-color: var(--color-brand);
}

.input-group > input[type="number"] {
  max-width: 5rem;
}

/* ── Threshold severity stack (vertical thermometer: high → low) ──────── */
.thr-stack {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  max-width: 32rem;
}

.thr-stack-row {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  align-items: center;
  gap: .75rem;
  padding: .45rem .65rem;
  border-radius: .4rem;
  border-left: 3px solid transparent;
}

.thr-stack-row--critical {
  background: #fef2f2;
  border-left-color: #fca5a5;
}

.thr-stack-row--warning {
  background: #fffbeb;
  border-left-color: #fde68a;
}

.thr-stack-label {
  display: flex;
  align-items: center;
  gap: .4rem;
}

.thr-stack-direction {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #94a3b8;
}

.thr-stack-input {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.thr-stack-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .35rem 0;
  position: relative;
}

.thr-stack-divider::before,
.thr-stack-divider::after {
  content: "";
  flex: 1;
  border-top: 1px dashed #cbd5e1;
}

.thr-stack-divider-label {
  padding: 0 .75rem;
  font-size: .7rem;
  font-weight: 600;
  color: #16a34a;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.thr-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 600;
  border: 1px solid;
  white-space: nowrap;
}

.thr-badge--critical {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.thr-badge--warning {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.thr-input--critical .form-control {
  border-color: #fca5a5 !important;
  border-width: 1px !important;
}

.thr-input--critical .form-control:focus {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,.12) !important;
}

.thr-input--warning .form-control {
  border-color: #fde68a !important;
  border-width: 1px !important;
}

.thr-input--warning .form-control:focus {
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 3px rgba(245,158,11,.12) !important;
}

.thr-input--critical .input-group-text.thr-unit,
.thr-input--warning .input-group-text.thr-unit {
  background: #ffffff !important;
  border-width: 1px !important;
  color: #64748b !important;
  font-size: .8rem !important;
  font-weight: 400 !important;
  min-width: 0;
  padding: .25rem .45rem;
}

.thr-input--critical .input-group-text.thr-unit { border-color: #fca5a5; }
.thr-input--warning .input-group-text.thr-unit  { border-color: #fde68a; }

.thr-hint {
  display: block;
  font-size: .65rem;
  color: #cbd5e1;
  margin-top: .18rem;
  text-align: right;
  cursor: help;
  transition: color .15s;
}

.thr-hint:hover,
.thr-hint:focus {
  color: #64748b;
  outline: none;
}

.thr-cell .input-group > input[type="number"] {
  max-width: none;
}

/* Validation states */
.form-control.is-invalid,
.form-select.is-invalid {
  border-width: 1.5px;
}

.form-control.is-valid,
.form-select.is-valid {
  border-width: 1.5px;
}


/* ─────────────────────────────────────────────────────────────────────────
   Entity hero panel (location/group/device show pages)
   ───────────────────────────────────────────────────────────────────────── */

.entity-hero {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
  overflow: hidden;
}

.entity-hero-body {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
}

.entity-hero-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--color-brand-pale);
  color: var(--color-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.entity-hero-info {
  flex: 1;
  min-width: 0;
}

.entity-hero-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1f2e;
  margin: 0 0 .25rem;
  line-height: 1.2;
}

.entity-hero-meta {
  color: #6c757d;
  font-size: .875rem;
  line-height: 1.55;
}

.entity-hero-parent-link {
  color: var(--color-brand);
  text-decoration: none;
  font-weight: 500;
}
.entity-hero-parent-link:hover {
  color: var(--color-brand-dark);
  text-decoration: underline;
}

.entity-hero-stats {
  display: flex;
  gap: 2rem;
  flex-shrink: 0;
  border-left: 1px solid #f0f2f5;
  padding-left: 1.5rem;
  margin-left: .5rem;
}

.entity-stat {
  text-align: center;
}

.entity-stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-brand);
  line-height: 1;
}

.entity-stat-label {
  display: block;
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #9aa5b4;
  margin-top: .3rem;
}

.entity-hero-notes {
  border-top: 1px solid #f0f2f5;
  padding: .75rem 1.5rem;
  color: #6c757d;
  font-size: .875rem;
  background: #fafbfc;
}

/* Section dividers */
.section-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.75rem 0 .75rem;
}

.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e9ecef;
}

/* Breadcrumb links */
.breadcrumb-link {
  color: var(--color-brand);
  text-decoration: none;
}
.breadcrumb-link:hover {
  color: var(--color-brand-dark);
  text-decoration: underline;
}
.breadcrumb-sep {
  color: #adb5bd;
}

/* Reusable label style for table headers and card section titles */
.text-label {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Inline-style replacement utilities (CSP compliance) */
.text-xs   { font-size: .75rem; }
.text-70   { font-size: .7rem; }
.text-80   { font-size: .8rem; }
.icon-sm   { font-size: .85rem; }
.icon-34   { width: 34px; height: 34px; }
.icon-36   { width: 36px; height: 36px; }
.icon-40   { width: 40px; height: 40px; font-size: 1.1rem; }
.icon-52   { width: 52px; height: 52px; }
.icon-52-lg { width: 52px; height: 52px; font-size: 1.4rem; }
.icon-52-xl { width: 52px; height: 52px; flex-shrink: 0; font-size: 1.5rem; }
.topo-node-dot { width: 1.5rem; height: 1.5rem; }
.progress-label { height: 25px; font-size: .75rem; font-weight: bold; }
.progress-xl    { height: 36px; }
@media (max-width: 575.98px) {
  .progress-xl    { height: 20px; }
  .progress-xl .progress-bar { font-size: 0; }
  .threshold-values { font-size: 0.72rem; font-weight: 600; }
}
.progress-sm    { height: 4px; }
.progress-xs    { height: 3px; }
.mw-150    { max-width: 150px; }
.mw-200    { max-width: 200px; }
.mw-240    { max-width: 240px; }
.mw-email  { max-width: 200px; }

/* Confirmation-flow inputs (delete account, transfer ownership, export) */
.mw-otp     { max-width: 12rem; }   /* OTP code input */
.mw-confirm { max-width: 24rem; }   /* password / confirm-name input */
.mw-member  { max-width: 28rem; }   /* member-select on transfer */

/* Registration-code display (devices/index hero) */
.reg-code-dot  { font-size: 1.5rem; line-height: 1; }
.reg-code-pair { font-family: monospace; font-size: 2.5rem; letter-spacing: .1rem; }
.text-badge     { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.inherited-label { font-size: .75rem; text-transform: none; letter-spacing: 0; font-weight: normal; }
.toast-title    { font-size: 1.1rem; }
.chart-placeholder { min-height: 300px; display: flex; align-items: center; justify-content: center; }
.rank-num { font-size: .75rem; min-width: 1rem; }
.meta-row { background: rgba(0,0,0,.02); border: 1px solid rgba(0,0,0,.06); }

/* Admin identity card */
.brand-swatch { width: 20px; height: 20px; border-radius: 4px; border: 1px solid rgba(0,0,0,.1); flex-shrink: 0; }
.admin-identity-card { background: repeating-linear-gradient(45deg,#1c2333,#1c2333 14px,#232d41 14px,#232d41 28px); }
.admin-identity-icon { font-size: 2.5rem; opacity: .85; }

/* Admin layout hazard stripe and offset */
.hazard-stripe { height: 8px; background: repeating-linear-gradient(45deg, #000000, #000000 10px, #ffc107 10px, #ffc107 20px); }
body.admin .navbar-custom  { top: 8px !important; }
body.admin .content-page   { margin-top: 78px !important; }
body.admin .left-side-menu { top: 78px !important; }

/* Status tile backgrounds (dashboard stat cards) */
.stat-ok, .stat-warning, .stat-danger, .stat-silent { flex: 1 1 0; min-width: 0; padding-top: .5rem; padding-bottom: .5rem; }
.fleet-stat, .stat-tile { min-width: 0; padding-top: .5rem; padding-bottom: .5rem; }
@media (min-width: 768px) {
  .fleet-stat + .fleet-stat { border-left: 1px solid #e5e7eb; }
  .stat-tile + .stat-tile { border-left: 1px solid #e5e7eb; }
}
@media (max-width: 767.98px) {
  .fleet-stat { border-bottom: 1px solid #e5e7eb; }
  .fleet-stat:nth-child(odd) { border-right: 1px solid #e5e7eb; }
  .fleet-stat:last-child { border-bottom: none; }
  .stat-tile:nth-child(odd) { border-right: 1px solid #e5e7eb; }
  .stat-tile:not(:nth-last-child(-n+2)) { border-bottom: 1px solid #e5e7eb; }
}
.stat-ok       { background: rgba(25,135,84,.05);   border: 1px solid rgba(25,135,84,.15); }
.stat-warning  { background: rgba(255,193,7,.08);   border: 1px solid rgba(255,193,7,.3);  }
.stat-danger   { background: rgba(220,53,69,.06);   border: 1px solid rgba(220,53,69,.2);  }
.stat-silent   { background: rgba(108,117,125,.06); border: 1px solid rgba(108,117,125,.2); }

/* Topology detail panel — sensor row backgrounds by alert status */
.detail-row--critical { background: rgba(220,53,69,0.07); }
.detail-row--warning  { background: rgba(230,126,0,0.07); }
.detail-row--normal   { background: rgba(0,0,0,0.02); }

/* Incident state — device_offline uses purple, distinct from severity colors */
.bg-device-offline { background-color: #7c3aed !important; color: #fff !important; }

/* Topology — badge typography */
.badge-xs { font-size: 0.65rem; letter-spacing: 0.04em; }
.badge-sm { font-size: 0.7rem;  letter-spacing: 0.04em; margin-bottom: 4px; }

/* Topology — status text colors (map to ColorPalette) */

/* Topology — sensor icon colors (map to ColorPalette) */

/* Touch targets — icon-only btn-sm in entity list card action clusters */
@media (max-width: 767.98px) {
  .action-cluster .btn-sm {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }
}

/* ─────────────────────────────────────────────────────────────────────────
   Upgrade page
   ───────────────────────────────────────────────────────────────────────── */

#featureTabs .nav-link {
  color: color-mix(in srgb, var(--tab-color, #6c757d) 70%, #6c757d);
  border-bottom-color: transparent;
  transition: color .15s ease, border-color .15s ease;
}
#featureTabs .nav-link:hover:not(.active) {
  color: var(--tab-color, #495057);
  border-color: transparent;
  background: transparent;
}
#featureTabs .nav-link.active {
  color: var(--tab-color, #212529);
  border-bottom-color: var(--tab-color, #dee2e6) !important;
}

.upgrade-narrative {
  background: linear-gradient(135deg, var(--color-brand-dark) 0%, var(--color-brand) 60%, var(--color-brand-light) 100%);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  color: #fff;
}

.upgrade-narrative-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .01em;
  margin: 0 0 .2rem;
}

.upgrade-narrative-sub {
  font-size: .875rem;
  opacity: .88;
  margin: 0;
}

.bundle-card {
  margin-top: 1.6rem;
  transition: transform .18s ease, box-shadow .18s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,.06), 0 6px 20px rgba(0,0,0,.08) !important;
}
.bundle-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,.1), 0 20px 48px rgba(0,0,0,.08) !important;
}
.bundle-card-featured {
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,.07), 0 10px 32px var(--bundle-accent, rgba(0,0,0,.12)) !important;
}
.bundle-card-featured:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,.09), 0 24px 56px var(--bundle-accent, rgba(0,0,0,.16)) !important;
}

.bundle-featured-badge {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: var(--color-brand);
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .2rem .85rem;
  border-radius: 6px 6px 0 0;
  line-height: 1.6;
  text-align: center;
  white-space: nowrap;
}

.badge-savings {
  background: rgba(25, 135, 84, .1);
  border: 1px solid rgba(25, 135, 84, .25);
  color: #0d6e3d;
}

.bundle-price-display {
  display: inline-block;
  transition: opacity .15s ease;
}

.bundle-price-display.updating {
  opacity: 0;
}

.comparison-table td:first-child {
  max-width: 220px;
}
.comparison-table thead th {
  vertical-align: middle;
  border-bottom: none;
}
.comparison-tab-row,
.comparison-tab-row th {
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  vertical-align: bottom;
}
.comparison-table tfoot,
.comparison-table tfoot tr,
.comparison-table tfoot td {
  border: 0 !important;
  padding-top: .75rem;
  padding-bottom: .75rem;
}

@media (max-width: 767.98px) {
  /* Feature add-on cards: moderate gap, no forced equal heights */
  #featureTabsContent .row {
    --bs-gutter-x: 0;
    --bs-gutter-y: .75rem;
  }
  #featureTabsContent .row > .col { padding-left: 0; padding-right: 0; }
  #featureTabsContent .card {
    box-shadow: none !important;
    border: 1px solid #dee2e6 !important;
    height: auto !important;
  }
  #featureTabsContent .card-header {
    padding-top: .6rem !important;
    padding-bottom: .6rem !important;
  }

  /* Reformat tier table into stacked flex rows — no horizontal scroll */
  #featureTabsContent .table { display: block; }
  #featureTabsContent .table thead { display: none; }
  #featureTabsContent .table tbody { display: block; }
  #featureTabsContent .table tbody tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: .6rem .75rem;
    border-bottom: 1px solid rgba(0,0,0,.06);
  }
  #featureTabsContent .table tbody tr.table-primary {
    background-color: rgba(13,110,253,.08) !important;
  }
  #featureTabsContent .table tbody td {
    display: block;
    border: none !important;
    padding: 0;
    background-color: transparent !important;
  }
  /* Tier name — left, grows */
  #featureTabsContent .table tbody td:nth-child(1) { flex: 1 1 auto; order: 1; }
  /* Allowance — second line, full width, muted */
  #featureTabsContent .table tbody td:nth-child(2) {
    flex: 0 0 100%; order: 4;
    font-size: .78rem; color: #6c757d; padding-top: .15rem;
  }
  /* Price — right of tier name */
  #featureTabsContent .table tbody td:nth-child(3) {
    flex: 0 0 auto; order: 2;
    text-align: start; margin-right: .5rem;
  }
  /* Action button — rightmost */
  #featureTabsContent .table tbody td:nth-child(4) {
    flex: 0 0 auto; order: 3; text-align: start;
  }
}

.comparison-current-tab {
  display: block;
  color: white;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.85rem;
  border-radius: 6px 6px 0 0;
  line-height: 1.6;
  text-align: center;
}

#impersonation-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 36px;
  z-index: 9999;
  background: #f59e0b;
  color: #1c1917;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0 1rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

body.impersonating .navbar-custom  { top: 36px !important; }
body.impersonating .content-page   { margin-top: 106px !important; }
body.impersonating .left-side-menu { top: 106px !important; }
body.impersonating #toast-area     { top: calc(106px + 1rem) !important; }

@media (max-width: 575.98px) {
  #impersonation-banner {
    font-size: 0.75rem;
    padding: 0 0.625rem;
    justify-content: space-between;
    gap: 0.25rem;
  }
  #impersonation-banner .impersonation-email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }
  #impersonation-banner .btn {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
  }
  #dashboard-incidents .card-header {
    padding-top: 0.6rem !important;
    padding-bottom: 0.6rem !important;
  }
  #dashboard-incidents .card-header .fs-5 {
    font-size: 1rem !important;
  }
}

/* ─────────────────────────────────────────────────────────────────────────
   Admin — Account roster cards
   ───────────────────────────────────────────────────────────────────────── */

.account-roster-cards {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: .75rem 1rem;
}

.account-roster-card {
  border: 1px solid #e9ecef;
  border-left: 4px solid var(--color-brand);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  transition: box-shadow .15s ease;
}

.account-roster-card:hover {
  box-shadow: 0 3px 14px rgba(0, 0, 0, .07);
}

.account-roster-card--orphan {
  border-left-color: var(--color-warning);
}

.account-roster-main {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .875rem 1rem;
  flex-wrap: wrap;
}

.account-monogram {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: var(--color-brand-pale);
  border: 1.5px solid var(--color-brand-border);
  color: var(--color-brand-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -.01em;
  flex-shrink: 0;
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
}

.account-roster-card--orphan .account-monogram {
  background: rgba(230, 126, 0, .1);
  border-color: rgba(230, 126, 0, .25);
  color: var(--color-warning);
}

.account-roster-info {
  flex: 1;
  min-width: 160px;
}

.account-roster-name {
  font-size: .95rem;
  font-weight: 700;
  color: #1a2a38;
  line-height: 1.2;
}

.account-roster-owner {
  font-size: .76rem;
  color: #6c757d;
  margin-top: .2rem;
  display: flex;
  align-items: center;
  gap: .3rem;
}

.account-roster-orphan-label {
  font-size: .76rem;
  color: var(--color-warning);
  font-weight: 600;
  margin-top: .2rem;
  display: flex;
  align-items: center;
  gap: .3rem;
}

.account-roster-subs {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  margin-top: .4rem;
}

.account-sub-badge {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .2rem .55rem;
  border-radius: 4px;
  white-space: nowrap;
}

.account-sub-badge--bundle {
  background: var(--color-brand-pale);
  color: var(--color-brand-dark);
  border: 1px solid var(--color-brand-border);
}

.account-sub-badge--tier {
  background: rgba(99, 102, 241, .08);
  color: #4338ca;
  border: 1px solid rgba(99, 102, 241, .2);
}

.account-sub-badge--none {
  background: #f8f9fa;
  color: #adb5bd;
  border: 1px solid #e9ecef;
}

.account-roster-divider {
  width: 1px;
  align-self: stretch;
  background: #f0f2f5;
  flex-shrink: 0;
  margin: .25rem 0;
}

.account-roster-stats {
  display: flex;
  gap: 1.5rem;
  flex-shrink: 0;
}

.account-roster-stat {
  text-align: center;
  min-width: 32px;
}

.account-roster-stat-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-brand);
  line-height: 1;
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
}

.account-roster-stat-label {
  display: block;
  font-size: .58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #adb5bd;
  margin-top: .25rem;
}

.account-roster-tail {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .4rem;
}

.account-meta-chips {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .15rem;
}

.account-meta-chip {
  font-size: .68rem;
  color: #9aa5b4;
  display: flex;
  align-items: center;
  gap: .3rem;
  white-space: nowrap;
}

.account-roster-actions {
  display: flex;
  align-items: center;
  gap: .3rem;
}

.account-roster-actions form {
  display: inline-flex;
}

.account-roster-empty {
  padding: 3rem 1.5rem;
  text-align: center;
  color: #adb5bd;
}

@media (max-width: 767.98px) {
  .account-roster-divider { display: none; }
  .account-roster-stats { gap: 1rem; }
  .account-roster-stat-value { font-size: .9rem; }
  .account-roster-tail {
    align-items: flex-start;
    padding-left: 0;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .account-meta-chips {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: .4rem;
  }
}

/* Location roster extensions */

.account-roster-card--default-loc {
  border-left-color: var(--status-normal);
}

.account-monogram--default {
  background: rgba(25, 135, 84, .1);
  border-color: rgba(25, 135, 84, .3);
  color: #0d6e3d;
}

.location-default-badge {
  display: inline-block;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .15rem .45rem;
  border-radius: 4px;
  background: rgba(25, 135, 84, .1);
  color: #0d6e3d;
  border: 1px solid rgba(25, 135, 84, .25);
  vertical-align: middle;
  margin-left: .35rem;
}

.location-roster-account {
  font-size: .76rem;
  color: #6c757d;
  margin-top: .15rem;
}

.location-account-link {
  color: var(--color-brand);
  text-decoration: none;
  font-weight: 500;
}

.location-account-link:hover {
  color: var(--color-brand-dark);
  text-decoration: underline;
}

.location-roster-address {
  font-size: .76rem;
  color: #9aa5b4;
  margin-top: .2rem;
  display: flex;
  align-items: center;
  gap: .3rem;
}

/* Device roster extensions */

.account-roster-card--critical { border-left-color: var(--status-critical); }
.account-roster-card--warning  { border-left-color: var(--status-warning); }
.account-roster-card--silent   { border-left-color: var(--status-silent); }

.account-monogram--critical {
  background: rgba(220, 53, 69, .1);
  border-color: rgba(220, 53, 69, .3);
  color: #dc3545;
}

.account-monogram--warning {
  background: rgba(230, 126, 0, .1);
  border-color: rgba(230, 126, 0, .3);
  color: var(--color-warning);
}

.account-monogram--silent {
  background: rgba(108, 117, 125, .08);
  border-color: rgba(108, 117, 125, .2);
  color: #6c757d;
}

.device-sensor-row {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  margin-top: .4rem;
}

.device-sensor-chip {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .18rem .45rem;
  border-radius: 4px;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
}

.device-sensor-chip--normal {
  background: rgba(25, 135, 84, .07);
  color: #198754;
  border: 1px solid rgba(25, 135, 84, .2);
}

.device-sensor-chip--warning {
  background: rgba(230, 126, 0, .1);
  color: var(--color-warning);
  border: 1px solid rgba(230, 126, 0, .3);
}

.device-sensor-chip--critical {
  background: rgba(220, 53, 69, .1);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, .25);
  font-weight: 800;
}

.device-last-seen--active  { color: #198754 !important; }
.device-last-seen--recent  { color: var(--color-warning) !important; }
.device-last-seen--silent  { color: var(--status-silent) !important; }
.device-last-seen--never   { color: #adb5bd !important; }

/* User roster extensions */

.account-monogram--admin-user {
  background: rgba(50, 140, 182, .15);
  border-color: var(--color-brand);
  color: var(--color-brand-dark);
}

.user-status-badge {
  display: inline-block;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .15rem .45rem;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: .35rem;
}

.user-status-badge--admin {
  background: rgba(50, 140, 182, .1);
  color: var(--color-brand-dark);
  border: 1px solid var(--color-brand-border);
}

.user-status-badge--locked {
  background: rgba(220, 53, 69, .1);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, .25);
}

.user-status-badge--unconfirmed {
  background: rgba(230, 126, 0, .1);
  color: var(--color-warning);
  border: 1px solid rgba(230, 126, 0, .25);
}

/* Threshold roster — sensor config strip */

.threshold-sensor-strip {
  border-top: 1px solid #f0f2f5;
  background: #fafbfc;
  padding: .5rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.threshold-sensor-block {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .22rem .55rem;
  border-radius: 6px;
  font-size: .72rem;
}

.threshold-sensor-block--off {
  opacity: .4;
}

.threshold-range-warn {
  color: var(--color-warning);
  font-weight: 600;
  font-size: .68rem;
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
}

.threshold-range-crit {
  color: #dc3545;
  font-weight: 600;
  font-size: .68rem;
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
}

.threshold-range-sep {
  color: #dee2e6;
  font-size: .7rem;
}

.threshold-safe-sep {
  color: #198754;
  font-size: .65rem;
  opacity: .5;
  padding: 0 .1rem;
}

.threshold-range-off {
  color: #adb5bd;
  font-size: .68rem;
}

.threshold-range-active {
  color: #198754;
  font-weight: 600;
  font-size: .68rem;
}

.threshold-beep-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-brand);
  flex-shrink: 0;
}

/* Brand roster card — dynamic accent color via CSS variable */
.account-roster-card--brand {
  border-left-color: var(--brand-accent, var(--color-brand));
}

.account-monogram--brand {
  background: var(--brand-accent, var(--color-brand));
  border-color: transparent;
  color: #fff;
}

.brand-logo-thumb {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  border: 1px solid #e9ecef;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-logo-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.brand-accent-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.brand-accent-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,.15);
  flex-shrink: 0;
}

/* Template roster cards */
.account-roster-card--template-text {
  border-left-color: #6c757d;
}

.template-monogram-html {
  background: var(--color-brand-pale);
  border-color: var(--color-brand-border);
  color: var(--color-brand-dark);
}

.template-monogram-text {
  background: #f1f3f5;
  border-color: #ced4da;
  color: #495057;
}

.template-partial-badge {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .1rem .45rem;
  border-radius: 4px;
  background: #f1f3f5;
  color: #6c757d;
  border: 1px solid #dee2e6;
  vertical-align: middle;
  margin-left: .35rem;
}

/* Site defaults roster cards */
.site-default-card--threshold {
  border-left-color: var(--status-warning);
}

.site-default-card--user {
  border-left-color: var(--status-normal);
}

.site-default-mono--threshold {
  background: #fff8ec;
  border-color: #fcd878;
  color: #b45309;
}

.site-default-mono--user {
  background: #edfaf3;
  border-color: #a3d9be;
  color: #166534;
}

.site-default-bool {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .8rem;
  font-weight: 700;
}

.site-default-bool--true  { color: var(--status-normal); }
.site-default-bool--false { color: var(--status-critical); }

/* ============================================================
   Plan Facts — nutrition-label-style card on /subscriptions
   ============================================================ */
.plan-facts-card {
  max-width: 520px;
  background: #ffffff;
  border: 2px solid var(--color-brand-dark);
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.plan-facts-header {
  padding: 0.75rem 1rem 0.6rem;
  border-bottom: 6px solid var(--color-brand-dark);
}
.plan-facts-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: 0.15rem;
}
.plan-facts-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--color-brand-dark);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.plan-facts-body {
  padding: 0 0.5rem;
}
.plan-facts-body .feat-matrix-table {
  white-space: normal;
  font-size: 0.82rem;
}
.plan-facts-body .feat-cat-row td {
  padding-top: 0.55rem;
  padding-bottom: 0.4rem;
  border-left: 3px solid var(--cat-color, #dee2e6);
}
.plan-facts-body .feat-data-row td {
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}
.plan-facts-body .feat-source-col-head,
.plan-facts-body .feat-col-th {
  display: none;
}

/* ============================================================
   Feature Matrix — Admin Account Show
   ============================================================ */
.feat-matrix-wrap {
  overflow-x: auto;
}

.feat-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  white-space: nowrap;
}

/* Feature name column header */
.feat-source-col-head {
  min-width: 12rem;
  padding: 0.38rem 0.75rem;
  text-align: left;
  vertical-align: bottom;
  font-size: 0.59rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #868e96;
  background: white;
  border-bottom: 2px solid #dee2e6;
  border-right: 1px solid #e9ecef;
}

/* Source / resolved column headers */
.feat-col-th {
  min-width: 90px;
  padding: 0.35rem 0.6rem;
  text-align: center;
  vertical-align: bottom;
  background: #f9fafb;
  border-left: 1px solid #e9ecef;
  border-bottom: 2px solid #dee2e6;
}

.feat-col-th--free {
  background: #fcfcfc;
}

.feat-col-th--free .feat-col-name {
  color: #868e96;
  font-style: italic;
}

.feat-col-th--resolved {
  background: #f5f8ff;
  border-left: 2px solid #dee2e6;
  border-bottom-color: #328cb6;
}

.feat-col-th--resolved .feat-col-name {
  font-size: 0.59rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #495057;
}

@media (max-width: 767.98px) {
  .feat-matrix-table { white-space: normal; }
  .feat-source-col-head { min-width: 0; }
  .feat-col-th { min-width: 0; }
}

.feat-col-name {
  display: block;
  font-size: 0.71rem;
  font-weight: 600;
  color: #343a40;
}

.feat-col-scope {
  display: block;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-size: 0.55rem;
  color: #adb5bd;
  margin-top: 0.15rem;
}

/* Category separator rows */
.feat-cat-row td {
  padding: 0.25rem 0.75rem;
  font-size: 0.59rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cat-color, #6c757d);
  background: color-mix(in srgb, var(--cat-color, #6c757d) 8%, #f8f9fa);
  border-top: 1px solid color-mix(in srgb, var(--cat-color, #6c757d) 15%, #e9ecef);
  border-bottom: 1px solid color-mix(in srgb, var(--cat-color, #6c757d) 10%, #f0f0f0);
}

/* Feature name cells */
.feat-name-cell {
  padding: 0.42rem 0.75rem;
  background: #fafafa;
  border-right: 1px solid #e9ecef;
  border-left: 3px solid var(--cat-color, #dee2e6);
}

/* Data rows */
.feat-data-row {
  border-bottom: 1px solid #f1f3f5;
}

.feat-data-cell {
  padding: 0.38rem 0.5rem;
  text-align: center;
  vertical-align: middle;
  border-left: 1px solid #f5f5f5;
}

.feat-data-cell--winning {
  background: color-mix(in srgb, var(--cat-color, #198754) 6%, white);
}

.feat-data-cell--muted {
  background: #fcfcfc;
  opacity: 0.75;
}

.feat-data-cell--resolved {
  background: #f5f8ff;
  border-left: 2px solid #dee2e6;
}

/* Value chips */
.feat-bool {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.67rem;
  font-weight: 600;
  padding: 0.15em 0.55em;
  border-radius: 999px;
  border: 1px solid transparent;
  letter-spacing: 0.02em;
}

.feat-bool--sm {
  font-size: 0.62rem;
  padding: 0.1em 0.45em;
}

.feat-bool--on {
  background: rgba(25, 135, 84, 0.08);
  color: #198754;
  border-color: rgba(25, 135, 84, 0.22);
}

.feat-bool--off {
  background: rgba(108, 117, 125, 0.07);
  color: #868e96;
  border-color: rgba(108, 117, 125, 0.18);
}

.feat-bool__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.feat-bool--on .feat-bool__dot {
  background: #198754;
  box-shadow: 0 0 5px rgba(25, 135, 84, 0.55);
}

.feat-bool--off .feat-bool__dot {
  background: #ced4da;
}

.feat-val {
  display: inline-flex;
  align-items: baseline;
  gap: 0.15em;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-size: 0.79rem;
  font-weight: 700;
  color: #1c2333;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  padding: 0.1em 0.4em;
}

.feat-val--resolved {
  background: color-mix(in srgb, var(--cat-color, #328cb6) 8%, #f8f9fa);
  border-color: color-mix(in srgb, var(--cat-color, #328cb6) 22%, #e9ecef);
}

.feat-val__unit {
  font-size: 0.57rem;
  font-weight: 400;
  color: #868e96;
}

.feat-empty {
  color: #ced4da;
  font-size: 0.8rem;
}

/* Contact channel verification indicator */
.contact-unverified-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--status-warning);
  flex-shrink: 0;
  vertical-align: middle;
}

/* ── Admin Account Infrastructure Snapshot ─────────────────────────── */
@keyframes stat-tile-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.acct-infra-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .625rem;
}

@media (max-width: 1199px) {
  .acct-infra-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 575px) {
  .acct-infra-grid { grid-template-columns: repeat(2, 1fr); }
}

.acct-stat-tile {
  position: relative;
  padding: .875rem 1rem .875rem 1.125rem;
  border-radius: .5rem;
  background: #f8f9fa;
  border-left: 3px solid transparent;
  animation: stat-tile-in .3s ease both;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.acct-stat-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,.07);
  background: #fff;
}

.acct-stat-tile--locations  { border-left-color: #0d6efd; }
.acct-stat-tile--groups     { border-left-color: #6f42c1; }
.acct-stat-tile--devices    { border-left-color: var(--color-brand); }
.acct-stat-tile--thresholds { border-left-color: #fd7e14; }
.acct-stat-tile--contacts   { border-left-color: #198754; }

.acct-stat-icon {
  font-size: .8rem;
  margin-bottom: .375rem;
}

.acct-stat-tile--locations .acct-stat-icon  { color: #0d6efd; }
.acct-stat-tile--groups .acct-stat-icon     { color: #6f42c1; }
.acct-stat-tile--devices .acct-stat-icon    { color: var(--color-brand); }
.acct-stat-tile--thresholds .acct-stat-icon { color: #fd7e14; }
.acct-stat-tile--contacts .acct-stat-icon   { color: #198754; }

.acct-stat-num {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1;
  color: #212529;
  font-variant-numeric: tabular-nums;
  margin-bottom: .25rem;
  letter-spacing: -.02em;
}

.acct-stat-label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #6c757d;
  font-weight: 600;
}

.acct-stat-status {
  margin-top: .5rem;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
}

.acct-stat-pip {
  display: inline-flex;
  align-items: center;
  font-size: .6rem;
  font-weight: 700;
  padding: .15em .55em;
  border-radius: 999px;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.acct-stat-pip--critical { background: rgba(220,53,69,.1);   color: var(--status-critical); }
.acct-stat-pip--warning  { background: rgba(230,126,0,.1);   color: var(--status-warning);  }
.acct-stat-pip--silent   { background: rgba(108,117,125,.1); color: var(--status-silent);   }
.acct-stat-pip--ok       { background: rgba(25,135,84,.1);   color: var(--status-normal);   }
.acct-stat-pip--account  { background: rgba(13,110,253,.1);  color: #0d6efd; }
.acct-stat-pip--user     { background: rgba(25,135,84,.1);   color: #198754; }
.acct-stat-pip--device   { background: rgba(50,140,182,.1);  color: var(--color-brand); }

/* ── Admin Search ───────────────────────────────────────────────────── */
.srch-filter-label {
  cursor: pointer;
  user-select: none;
}

.srch-sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.srch-sortable:hover { background: rgba(0,0,0,.03); }

.srch-sortable::after { content: " ⇅"; opacity: .25; font-size: .7em; }
.srch-sortable[data-dir="asc"]::after  { content: " ↑"; opacity: .7; }
.srch-sortable[data-dir="desc"]::after { content: " ↓"; opacity: .7; }

.srch-mac {
  font-size: .75rem;
  background: #f1f3f5;
  padding: .1em .4em;
  border-radius: .25rem;
  letter-spacing: .03em;
}

/* ── Records & Notifications tables ────────────────────────────────── */
.rec-th {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #6c757d;
}

.rec-indicator {
  width: 3px !important;
  padding: 0 !important;
}

.rec-indicator--none     { background: transparent; }
.rec-indicator--warning  { background: var(--status-warning); }
.rec-indicator--critical { background: var(--status-critical); }

.rec-path {
  font-size: .72rem;
  color: #6c757d;
  margin-top: .1rem;
}

.rec-path-link {
  color: #6c757d;
  text-decoration: none;
}

.rec-path-link:hover {
  color: #0d6efd;
  text-decoration: underline;
}

.rec-path-sep {
  margin: 0 .2rem;
  opacity: .35;
}

.rec-readings {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem;
}

.rec-chip {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  font-size: .68rem;
  font-weight: 500;
  padding: .15em .45em;
  border-radius: .25rem;
  white-space: nowrap;
}

.rec-chip--normal   { background: #f1f3f5; color: #495057; }
.rec-chip--warning  { background: rgba(230,126,0,.1);  color: var(--status-warning);  }
.rec-chip--critical { background: rgba(220,53,69,.1);  color: var(--status-critical); }

.notif-channels {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-top: .25rem;
}

.notif-channel-badge {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  font-size: .68rem;
  font-weight: 500;
  white-space: nowrap;
}

.notif-sent   { color: var(--status-normal);   }
.notif-queued { color: var(--status-warning);  }
.notif-failed { color: var(--status-critical); }
.notif-plan   { color: #6c757d; }
.notif-na     { color: #adb5bd; }

/* =========================================================================
   Signal Path — node hierarchy rendered as a circuit-trace diagram.
   Used by app/views/nodes/index.html.erb + _node_row.html.erb.
   ========================================================================= */

.signal-page-header {
  margin-bottom: 1.5rem;
}

.signal-page-header-overline {
  display: inline-block;
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--color-brand-dark);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.signal-page-header-overline::before {
  content: "// ";
  color: var(--color-brand);
  opacity: 0.7;
}

.signal-page-header-title {
  font-family: 'IBM Plex Sans', 'Roboto', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #1c2333;
  margin: 0;
  font-size: 1.85rem;
}

.signal-page-header-subtitle {
  margin-top: 0.25rem;
  max-width: 48ch;
  color: #64748b;
}

.signal-cta {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 500;
  letter-spacing: 0.01em;
  background: var(--color-brand);
  border: 1px solid var(--color-brand);
  color: #fff;
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 0 rgba(26, 90, 122, 0.1);
}

.signal-cta:hover {
  background: var(--color-brand-dark);
  border-color: var(--color-brand-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(50, 140, 182, 0.18);
}

.signal-cta i {
  font-size: 0.95em;
}

/* === Frame === */

.signal-frame {
  --trace: #cbd5e1;
  --trace-active: var(--color-brand);
  --grid-dot: rgba(50, 140, 182, 0.09);

  background-color: #fff;
  background-image:
    radial-gradient(circle, var(--grid-dot) 1px, transparent 1.2px);
  background-size: 14px 14px;
  background-position: 8px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.signal-frame-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1.25rem;
  background: linear-gradient(180deg, #f8fafc 0%, rgba(248, 250, 252, 0) 100%);
  border-bottom: 1px solid #e2e8f0;
  background-color: #fff;
}

.signal-frame-tag {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--color-brand-dark);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.signal-frame-tag-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.95rem;
  height: 0.95rem;
  border: 1px solid var(--color-brand);
  border-radius: 50%;
  position: relative;
  background: #fff;
}

.signal-frame-tag-glyph::after {
  content: "";
  position: absolute;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--color-brand);
}

.signal-frame-stat-group {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
}

.signal-frame-stat {
  font-family: 'IBM Plex Mono', monospace;
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-feature-settings: "tnum";
}

.signal-frame-stat-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1c2333;
}

.signal-frame-stat-label {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
}

.signal-frame-stat-cap {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  color: #94a3b8;
  text-transform: uppercase;
}

.signal-frame-stat-divider {
  color: #cbd5e1;
  font-size: 0.85rem;
}

/* === Tree === */

.signal-tree {
  list-style: none;
  margin: 0;
  padding: 0.5rem 1.25rem 1.25rem 1.25rem;
  position: relative;
}

.signal-tree-branch {
  list-style: none;
  margin: 0;
  /* Indent enough that the trace can drop from the parent's junction
     icon (which sits at row_x + 2.125rem, after the caret + gap) and
     still leave a visible 0.875rem horizontal tap to the child row. */
  padding-left: 3rem;
  position: relative;
}

.signal-node {
  position: relative;
}

/* vertical trace running alongside this node — only inside nested branches
   (top-level nodes in .signal-tree have no parent above them, so no trunk) */
.signal-tree-branch > .signal-node::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -0.875rem;
  width: 1px;
  background: var(--trace);
  pointer-events: none;
}

/* trim vertical at last sibling */
.signal-tree-branch > .signal-node:last-child::after {
  bottom: auto;
  height: 1.15rem;
}

/* horizontal tap into the row — only inside nested branches */
.signal-tree-branch > .signal-node > details > summary.signal-row::before,
.signal-tree-branch > .signal-node > .signal-row::before,
.signal-tree-branch > .signal-leaf > details > summary.signal-row::before,
.signal-tree-branch > .signal-leaf > .signal-row::before {
  content: "";
  position: absolute;
  left: -0.875rem;
  top: 1.15rem;
  width: 0.875rem;
  height: 1px;
  background: var(--trace);
  transition: background-color 0.15s ease;
}

/* === Row === */

.signal-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.45rem 0.6rem 0.45rem 0;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}

.signal-row:hover {
  background: rgba(50, 140, 182, 0.05);
}

.signal-row:hover::before {
  background: var(--trace-active);
}

/* Junction (PCB via) */
.signal-junction {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
}

.signal-junction-marker {
  display: block;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  border: 1.5px solid var(--trace);
  background: #fff;
  position: relative;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.signal-junction-marker::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--trace);
  transition: width 0.15s ease, height 0.15s ease, background-color 0.15s ease;
}

.signal-row:hover .signal-junction-marker {
  border-color: var(--trace-active);
  box-shadow: 0 0 0 3px rgba(50, 140, 182, 0.12);
}

.signal-row:hover .signal-junction-marker::after {
  width: 5px;
  height: 5px;
  background: var(--trace-active);
}

.signal-meta {
  flex: 1 1 auto;
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  min-width: 0;
}

.signal-name {
  font-family: 'IBM Plex Sans', 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 0.97rem;
  color: #1c2333;
  text-decoration: none;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s ease;
}

.signal-row:hover .signal-name {
  color: var(--color-brand-dark);
}

.signal-subtree {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--color-brand);
  background: var(--color-brand-pale);
  border: 1px solid var(--color-brand-border);
  padding: 0.05rem 0.4rem;
  border-radius: 3px;
  font-feature-settings: "tnum";
  flex-shrink: 0;
}

/* Inline glanceable counts (child nodes / direct devices) */
.signal-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  background: rgba(15, 23, 42, 0.04);
  color: #64748b;
  border: 1px solid rgba(15, 23, 42, 0.06);
  font-feature-settings: "tnum";
  flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.signal-row:hover .signal-stat-pill {
  background: var(--color-brand-pale);
  border-color: var(--color-brand-border);
  color: var(--color-brand-dark);
}

.signal-stat-pill-value {
  font-weight: 600;
  color: #334155;
}

.signal-row:hover .signal-stat-pill-value {
  color: var(--color-brand-dark);
}

.signal-stat-pill i {
  font-size: 0.85em;
  opacity: 0.65;
}

.signal-row:hover .signal-stat-pill i {
  opacity: 0.95;
  color: var(--color-brand);
}

.signal-stat-pill-cap {
  opacity: 0.5;
  font-weight: 400;
}

.signal-stat-pill-label {
  font-size: 0.68rem;
  font-weight: 500;
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-stat-pill--inherited {
  opacity: 0.65;
  font-style: italic;
}

.signal-name--account {
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.signal-row--root {
  /* left padding shifts the junction so its center sits on the tree's
     vertical trace column at 2.125rem (matches .signal-tree-branch trace) */
  padding: 0.6rem 0.85rem 0.6rem 1.425rem;
  background: rgba(15, 23, 42, 0.015);
  border-radius: 0;
}

.signal-row--root .signal-junction {
  width: 1.4rem;
  height: 1.4rem;
}

.signal-row--root .signal-junction-marker {
  width: 0.95rem;
  height: 0.95rem;
  border-color: var(--color-brand, #3b82f6);
}

.signal-row--root .signal-junction-marker::after {
  width: 5px;
  height: 5px;
  background: var(--color-brand, #3b82f6);
}

/* Trunk: drop a vertical trace from the account-root junction down into
   the children's tree, so the root visually anchors the hierarchy. */
.signal-node--root > .signal-row--root::after {
  content: "";
  position: absolute;
  top: 1.85rem;
  bottom: -0.25rem;
  left: 2.125rem;
  width: 1px;
  background: var(--trace);
  pointer-events: none;
}

/* The account-root <li> is the only top-level item in .signal-tree, so it
   doesn't need (or want) the .signal-tree's default vertical padding above
   the row — let the row sit flush at the top of the frame. */
.signal-tree:has(> .signal-node--root) {
  padding-top: 0;
}

.signal-meta-empty {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #cbd5e1;
}

/* Readout (device count) */
.signal-readout {
  font-family: 'IBM Plex Mono', monospace;
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  flex-shrink: 0;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.025);
  transition: background-color 0.15s ease;
}

.signal-row:hover .signal-readout {
  background: rgba(50, 140, 182, 0.08);
}

.signal-readout-value {
  font-size: 0.92rem;
  font-weight: 600;
  color: #1c2333;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.signal-row:hover .signal-readout-value {
  color: var(--color-brand-dark);
}

.signal-readout-label {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 500;
}

.signal-readout--zero .signal-readout-value {
  color: #94a3b8;
}

/* === Empty state === */

.signal-empty {
  background-color: #fff;
  background-image:
    radial-gradient(circle, var(--grid-dot, rgba(50, 140, 182, 0.09)) 1px, transparent 1.2px);
  background-size: 14px 14px;
  border: 1px dashed var(--color-brand-border);
  border-radius: 10px;
  padding: 3rem 1.5rem;
  text-align: center;
  position: relative;
}

.signal-empty::before,
.signal-empty::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--color-brand-border);
  border-radius: 50%;
  background: #fff;
}

.signal-empty::before { top: -8px; left: 24px; }
.signal-empty::after  { top: -8px; right: 24px; }

.signal-empty-icon {
  font-size: 2.4rem;
  display: block;
  margin-bottom: 0.85rem;
  color: var(--color-brand);
  opacity: 0.45;
}

.signal-empty-title {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: #1c2333;
  margin: 0 0 0.4rem 0;
}

.signal-empty-overline {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-brand-dark);
  display: block;
  margin-bottom: 0.6rem;
}

.signal-empty-body {
  font-family: 'IBM Plex Sans', sans-serif;
  color: #64748b;
  font-size: 0.9rem;
  margin: 0 auto;
  max-width: 44ch;
}

/* === Disclosure (expand/collapse) === */

.signal-disclosure {
  position: relative;
}

.signal-disclosure > summary {
  list-style: none;
  cursor: pointer;
}

.signal-disclosure > summary::-webkit-details-marker { display: none; }
.signal-disclosure > summary::marker { content: ""; }

.signal-disclosure-caret {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.75rem;
  transition: transform 0.18s ease, color 0.15s ease;
  margin-right: -0.35rem;
}

.signal-disclosure[open] > summary .signal-disclosure-caret {
  transform: rotate(90deg);
  color: var(--color-brand);
}

.signal-row--toggle:hover .signal-disclosure-caret {
  color: var(--color-brand);
}

/* hide the branch's connector lines when the parent is collapsed */
.signal-disclosure:not([open]) > .signal-tree-branch {
  display: none;
}

/* === Device leaf === */

.signal-leaf {
  position: relative;
}

.signal-tree-branch > .signal-leaf::after {
  content: "";
  position: absolute;
  left: -0.875rem;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--trace);
  pointer-events: none;
}

.signal-tree-branch > .signal-leaf:last-child::after {
  bottom: auto;
  height: 1.15rem;
}

.signal-row--device {
  padding: 0.35rem 0.6rem 0.35rem 0;
  gap: 0.7rem;
}

.signal-junction--device {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-brand);
  background: var(--color-brand-pale);
  border: 1px solid var(--color-brand-border);
  border-radius: 50%;
  font-size: 0.65rem;
  flex-shrink: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.signal-row--device:hover .signal-junction--device {
  background: var(--color-brand);
  color: #fff;
  border-color: var(--color-brand);
}

.signal-name--device {
  font-size: 0.92rem;
  color: #334155;
}

.signal-row--device:hover .signal-name--device {
  color: var(--color-brand-dark);
}

.signal-device-model {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.04);
  padding: 0.05rem 0.35rem;
  border-radius: 3px;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* === Capability chips === */

.signal-chips {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
  flex-shrink: 0;
  margin-left: auto;
  margin-right: 0.5rem;
}

.signal-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.72rem;
  line-height: 1;
  border: 1px solid transparent;
  font-family: 'IBM Plex Mono', monospace;
  font-feature-settings: "tnum";
}

.signal-chip i { font-size: 0.85em; }

.signal-chip-threshold {
  background: rgba(15, 23, 42, 0.04);
  color: #475569;
  border-color: rgba(15, 23, 42, 0.08);
  padding: 0.2rem 0.45rem;
  gap: 0.25rem;
}

.signal-chip-threshold .signal-chip-text {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
}

.signal-chip-inherit {
  color: var(--color-brand);
  font-size: 0.95em;
  margin-left: -0.1rem;
}

/* === Action cluster (shared between node + leaf rows) === */

.signal-actions {
  display: inline-flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.signal-action {
  width: 1.85rem;
  height: 1.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: #94a3b8;
  border: 1px solid transparent;
  background: transparent;
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
  opacity: 0;
  transform: translateX(-2px);
}

.signal-row:hover .signal-action,
.signal-row:focus-within .signal-action {
  opacity: 1;
  transform: translateX(0);
}

.signal-action:hover {
  color: var(--color-brand-dark);
  border-color: var(--color-brand-border);
  background: #fff;
}

.signal-action--peek {
  color: var(--color-brand);
}

.signal-action--peek:hover {
  color: var(--color-brand-dark);
  border-color: var(--color-brand-border);
  background: var(--color-brand-pale);
}

@media (max-width: 575px) {
  .signal-action {
    opacity: 1;
    transform: none;
  }
}

/* === Node show page extensions === */

.signal-cta--outline {
  background: transparent;
  border-color: var(--color-brand-border);
  color: var(--color-brand-dark);
  box-shadow: none;
}

.signal-cta--outline:hover {
  background: var(--color-brand-pale);
  border-color: var(--color-brand);
  color: var(--color-brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(50, 140, 182, 0.12);
}

.signal-cta--danger {
  background: transparent;
  border-color: #fca5a5;
  color: #dc2626;
  box-shadow: none;
}

.signal-cta--danger:hover {
  background: #fef2f2;
  border-color: #f87171;
  color: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.1);
}

.signal-cta--sm {
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
}

.signal-ancestor-link {
  color: var(--color-brand);
  text-decoration: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
}

.signal-ancestor-link:hover {
  color: var(--color-brand-dark);
  text-decoration: underline;
}

.signal-panel-empty {
  padding: 1.75rem 1.25rem;
  text-align: center;
}

.signal-panel-body {
  padding: 0.9rem 1.25rem;
}

.signal-panel-body--details {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.signal-panel-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.signal-inherit-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

.signal-inherit-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: var(--color-brand-pale);
  border-bottom: 1px solid var(--color-brand-border);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.83rem;
  color: var(--color-brand-dark);
}

.signal-inherit-banner i {
  color: var(--color-brand);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.signal-inherit-banner strong {
  font-weight: 600;
}

.signal-inherit-note {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.78rem;
  color: #64748b;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
}

.signal-action--destructive {
  color: #ef4444;
}

.signal-action--destructive:hover {
  color: #dc2626;
  border-color: #fca5a5;
  background: #fef2f2;
}

.signal-row--threshold {
  padding: 0.35rem 0.6rem 0.35rem 0;
  gap: 0.7rem;
}

.signal-junction--threshold {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d97706;
  background: #fef9ee;
  border: 1px solid #fde68a;
  border-radius: 50%;
  font-size: 0.65rem;
  flex-shrink: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.signal-row--threshold:hover .signal-junction--threshold {
  background: #d97706;
  color: #fff;
  border-color: #d97706;
}

.signal-inherit-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--color-brand-dark, #1e40af);
  background: var(--color-brand-pale, rgba(59, 130, 246, 0.1));
  border: 1px solid var(--color-brand-border, rgba(59, 130, 246, 0.25));
  padding: 0.05rem 0.4rem 0.05rem 0.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.signal-inherit-tag:hover {
  background: var(--color-brand, #3b82f6);
  border-color: var(--color-brand, #3b82f6);
  color: #fff;
  transform: translateY(-1px);
}

.signal-inherit-tag i {
  font-size: 0.95rem;
  line-height: 1;
}

.signal-junction--contact {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  font-size: 0.65rem;
  flex-shrink: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.signal-row--device:hover .signal-junction--contact {
  background: #334155;
  color: #fff;
  border-color: #334155;
}

.signal-contact-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 1.25rem 0.75rem;
}

.signal-contact-list .signal-row::before {
  display: none;
}

.signal-contact-meta {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.signal-contact-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.signal-contact-detail {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.signal-verified   { color: var(--status-normal); }
.signal-unverified { color: var(--status-warning); }

.signal-attach-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.signal-attach-icon {
  color: #94a3b8;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.signal-attach-select {
  flex: 1;
  max-width: 240px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.83rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  color: #1c2333;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  appearance: auto;
}

.signal-attach-select:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px var(--color-brand-pale);
}

.signal-detail-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.signal-detail-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.signal-detail-value {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.9rem;
  color: #334155;
  line-height: 1.55;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DESIGN SYSTEM — canonical components
   See DESIGN.md for usage rules. Every pattern below is the official form;
   ad-hoc reimplementations in views should be migrated to use these classes.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Dashboard tab chrome ─────────────────────────────────────────────────────
   Use for primary in-page tab navigation (e.g. admin dashboard, account
   settings sub-tabs, anywhere you'd reach for Bootstrap nav-tabs).
   Markup: <ul class="nav dash-tabs"> with <button class="nav-link"
   data-bs-toggle="tab" data-bs-target="#pane-x">…</button>
   ─────────────────────────────────────────────────────────────────────────── */
.dash-tabs {
  border-bottom: 2px solid rgba(50, 140, 182, 0.14);
  gap: .15rem;
  margin-bottom: 1.25rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.dash-tabs::-webkit-scrollbar { display: none; }
.dash-tabs .nav-link {
  border: none;
  border-radius: .35rem .35rem 0 0;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -2px;
  color: #8a95a3;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .5rem .85rem;
  white-space: nowrap;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
  background: transparent;
}
.dash-tabs .nav-link:hover { color: var(--color-brand); background: rgba(50,140,182,.04); }
.dash-tabs .nav-link.active {
  color: var(--color-brand-dark);
  border-bottom-color: var(--color-brand);
  background: rgba(50,140,182,.05);
}
.dash-tabs .nav-link .bi { font-size: .8rem; opacity: .7; }
.dash-tabs .nav-link.active .bi { opacity: 1; }

/* Pulsing red dot used inside .dash-tabs nav-links to flag urgent items */
.dash-tab-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--status-critical);
  margin-left: 4px;
  margin-bottom: 3px;
  vertical-align: middle;
  animation: dash-dot-pulse 2s ease-in-out infinite;
}
@keyframes dash-dot-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .35; }
}

/* ── Attention / all-clear banners ───────────────────────────────────────────
   Use at the top of dashboards / overview tabs to surface urgent items
   (or, when nothing is wrong, confirm "all systems nominal"). Pair with
   .attention-chip for click-through links to the relevant detail tab.
   ─────────────────────────────────────────────────────────────────────────── */
.attention-banner {
  background: linear-gradient(135deg, #fff8f0 0%, #fff3e8 100%);
  border: 1.5px solid rgba(220,53,69,.18);
  border-radius: .5rem;
  padding: .875rem 1.25rem;
}
.all-clear-banner {
  background: linear-gradient(135deg, #f0faf4 0%, #e8f5ee 100%);
  border: 1.5px solid rgba(25,135,84,.2);
  border-radius: .5rem;
  padding: .875rem 1.25rem;
}
.attention-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .7rem;
  border-radius: 2rem;
  font-size: .73rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid;
  text-decoration: none;
  transition: opacity .15s;
}
.attention-chip:hover { opacity: .8; }
.attention-chip--error {
  background: rgba(220,53,69,.08);
  border-color: rgba(220,53,69,.3);
  color: #b02a37;
}
.attention-chip--warn {
  background: rgba(230,126,0,.08);
  border-color: rgba(230,126,0,.3);
  color: #a8590a;
}

/* ── Placeholder / coming-soon cards ─────────────────────────────────────────
   For UI sections that are intentionally not yet wired up. Reads as
   "coming soon" not "broken / forgot to finish". Pair the dashed
   placeholder card with .ph-ghost-row / .ph-ghost-stat / .ph-ghost-label
   to render skeleton content.
   ─────────────────────────────────────────────────────────────────────────── */
.ph-coming-soon {
  background: linear-gradient(135deg, var(--color-brand-dark) 0%, var(--color-brand) 55%, #3cb6c8 100%);
  border-radius: .5rem;
  color: #fff;
  padding: 1.1rem 1.4rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.ph-coming-soon-icon {
  font-size: 2rem;
  opacity: .85;
  flex-shrink: 0;
}
.ph-placeholder-card {
  border: 1.5px dashed rgba(50,140,182,.28) !important;
  background: rgba(50,140,182,.025) !important;
}
.ph-ghost-row {
  height: 1.6rem;
  border-radius: .3rem;
  background: linear-gradient(90deg, rgba(50,140,182,.1) 0%, rgba(50,140,182,.04) 60%, transparent 100%);
  margin-bottom: .65rem;
}
.ph-ghost-row:last-child { margin-bottom: 0; }
.ph-ghost-stat {
  width: 3rem; height: 2.2rem;
  border-radius: .3rem;
  background: rgba(50,140,182,.1);
}
.ph-ghost-label {
  height: .65rem; width: 3.5rem;
  border-radius: .2rem;
  background: rgba(50,140,182,.08);
  margin-top: .4rem;
}
.ph-section-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #adb5bd;
  margin-bottom: .75rem;
}

/* ── Empty state: radar pulse + dot grid + teaser chips ──────────────────────
   THE canonical "first-time / zero-data" empty state. Use whenever a user
   lands on a feature that has no data yet AND we want to teach them what
   they'll see once it's populated. (For "no results matched filter" use
   the simpler centered-icon-in-card pattern instead.)

   Markup:
     <div class="pulse-empty-scene">
       <div class="pulse-empty-rings">
         <div class="pulse-empty-ring"></div>
         <div class="pulse-empty-ring"></div>
         <div class="pulse-empty-ring"></div>
         <div class="pulse-empty-icon"><i class="bi bi-broadcast"></i></div>
       </div>
       <p class="pulse-empty-headline">Headline</p>
       <p class="pulse-empty-sub">One-line explainer.</p>
       <div class="pulse-empty-teasers">
         <div class="pulse-empty-teaser">
           <i class="bi bi-x"></i>
           <div>
             <div class="pulse-empty-teaser-label">Title</div>
             <div class="pulse-empty-teaser-detail">Description</div>
           </div>
         </div>
         <!-- 2-4 teasers -->
       </div>
       <div class="pulse-empty-cta"><!-- buttons --></div>
     </div>
   ─────────────────────────────────────────────────────────────────────────── */
.pulse-empty-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4rem 1rem 3rem;
  background-image: radial-gradient(circle, var(--color-brand-border) 1px, transparent 1px);
  background-size: 24px 24px;
  background-color: #fff;
  border-radius: 12px;
  border: 1px solid #e9eef2;
  margin-top: 1.5rem;
}
.pulse-empty-rings {
  position: relative;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2.5rem;
}
.pulse-empty-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid var(--color-brand);
  opacity: 0;
  animation: pulse-empty-ring 3s ease-out infinite;
}
.pulse-empty-ring:nth-child(1) { width:  96px; height:  96px; animation-delay: 0s;   }
.pulse-empty-ring:nth-child(2) { width: 130px; height: 130px; animation-delay: 0.7s; }
.pulse-empty-ring:nth-child(3) { width: 164px; height: 164px; animation-delay: 1.4s; }
@keyframes pulse-empty-ring {
  0%   { transform: scale(.55); opacity: .6; }
  80%  { opacity: 0; }
  100% { transform: scale(1);   opacity: 0; }
}
.pulse-empty-icon {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-brand-dark) 0%, var(--color-brand) 60%, var(--color-brand-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(50, 140, 182, .35);
}
.pulse-empty-icon i { font-size: 1.85rem; color: #fff; }
.pulse-empty-headline {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a2b38;
  letter-spacing: -.01em;
  margin-bottom: .5rem;
  text-align: center;
}
.pulse-empty-sub {
  color: #64808f;
  font-size: .9375rem;
  margin-bottom: 2rem;
  text-align: center;
  max-width: 640px;
}
.pulse-empty-teasers {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2.25rem;
}
.pulse-empty-teaser {
  background: var(--color-brand-pale);
  border: 1px solid var(--color-brand-border);
  border-radius: 10px;
  padding: .75rem 1.1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  min-width: 160px;
  max-width: 190px;
}
.pulse-empty-teaser i {
  font-size: 1.25rem;
  color: var(--color-brand);
  flex-shrink: 0;
}
.pulse-empty-teaser-label  { font-size: .78rem; font-weight: 600; color: var(--color-brand-dark); line-height: 1.3; }
.pulse-empty-teaser-detail { font-size: .72rem; color: #64808f;                                    line-height: 1.3; }
.pulse-empty-cta {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Usage progress bars ─────────────────────────────────────────────────────
   Color-stepped progress bar tied to a usage percentage. Replaces the
   inline `style="background:#ef4444"`-style bars duplicated across
   home/index, contacts/index, thresholds/index, users/index. Apply the
   ramp by setting a state class on the bar fill: .usage-bar__fill--ok,
   --warn, --high, --critical. CSS-only — no JS color picking.

   Markup:
     <div class="usage-bar">
       <div class="usage-bar__fill usage-bar__fill--<%= state %>"
            style="width: <%= pct %>%;"></div>
     </div>
   ─────────────────────────────────────────────────────────────────────────── */
.usage-bar {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: rgba(0, 0, 0, .06);
  overflow: hidden;
}
.usage-bar__fill {
  height: 100%;
  border-radius: 3px;
  transition: width .3s ease;
}
.usage-bar__fill--ok       { background: var(--status-normal); }
.usage-bar__fill--warn     { background: #eab308; }
.usage-bar__fill--high     { background: var(--status-warning); }
.usage-bar__fill--critical { background: var(--status-critical); }

/* Variant: bar with tick marks at 75% and 90% (used for SMS quota etc.) */
.usage-bar--with-ticks {
  height: 6px;
  border-radius: 3px;
}
.usage-bar--with-ticks::before,
.usage-bar--with-ticks::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: rgba(0, 0, 0, .12);
  z-index: 1;
}
.usage-bar--with-ticks::before { left: 75%; }
.usage-bar--with-ticks::after  { left: 90%; }

/* Brand-color text utility (Bootstrap's .text-primary uses #0d6efd, not the
   brand blue). Use .text-brand when you want a link/text in the brand palette. */
.text-brand        { color: var(--color-brand) !important; }
.text-brand:hover  { color: var(--color-brand-dark) !important; }

/* Tabular numerals — numbers align in columns regardless of digit width. */
.tabular-nums { font-variant-numeric: tabular-nums; }

/* Cursor utilities */
.cursor-grab    { cursor: grab; }
.cursor-grab:active,
.cursor-grabbing { cursor: grabbing; }

/* Hero icon circle — tinted-brand round icon used on entity show pages
   (admin/accounts/show, admin/brands/show, admin/devices/show, etc.).
   Replaces the 7-place duplicate `bg-primary bg-opacity-10 text-primary
   rounded-circle ... icon-52` markup. */
.entity-hero-circle {
  background: var(--color-brand-pale);
  color: var(--color-brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Bundle accent-color swatch — small colored square showing a bundle's
   accent color. Set the swatch color via inline `style="background:..."`
   (it's bundle-specific data). Border is fixed. */
.bundle-swatch {
  display: inline-block;
  border-radius: .15rem;
  border: 1px solid rgba(0, 0, 0, .12);
  flex-shrink: 0;
  vertical-align: middle;
}
.bundle-swatch--xs { width: .65rem;  height: .65rem;  }
.bundle-swatch--sm { width: .7rem;   height: .7rem;   }
.bundle-swatch--md { width: .85rem;  height: .85rem;  }
.bundle-swatch--lg { width: 1.25rem; height: 1.25rem; border-radius: .25rem; }

/* Brand logo preview — used on admin/brands/show to display the uploaded
   logo at a larger inline size than the .brand-logo-thumb 40px treatment. */
.brand-logo-preview { max-height: 60px; width: auto; }

/* Compact form-field widths — for short numeric inputs (display_order),
   percent selects (discount), and color pickers in admin forms. Replaces
   one-off `style="width:Xrem"` on form controls. */
.fc-w-5    { width: 5rem; }
.fc-w-7    { width: 7rem; }
.fc-w-80   { width: 80px; }
.fc-color  { width: 3rem; height: 2.25rem; padding: .25rem; }

/* Subscription projection tile (admin/subscriptions/index revenue cards).
   Left accent bar + bottom progress bar showing how far the projection
   extends into the year. Set `--bar-pct: <pct>%` inline. */
.subs-projection-tile {
  position: relative;
  overflow: hidden;
  padding: 1.1rem 1.25rem 1.35rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: .375rem;
}
.subs-projection-tile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: var(--status-normal);
  opacity: .5;
}
.subs-projection-tile::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  width: var(--bar-pct, 0%);
  background: var(--status-normal);
  opacity: .25;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE-SPECIFIC STYLES
   Page-bound visual systems that don't generalize to canonical patterns.
   Promoted out of inline `<style>` blocks so views stay clean and styles are
   discoverable in one place. New work should NOT add to these — propose a
   canonical pattern via /design-update instead.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Webhooks (.wdl-* shared chrome + .whi-* index-specific) ────────────────
   Used by app/views/webhooks/index.html.erb and webhooks/deliveries.html.erb.
   Theme exception per DESIGN.md.
   ─────────────────────────────────────────────────────────────────────────── */
.wdl-header {
  background: #f6f8fb;
  border: 1px solid #e3e8f0;
  border-radius: 10px;
  padding: 1.1rem 1.4rem;
  margin-bottom: 1.25rem;
}
.wdl-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1c2333;
  letter-spacing: -0.01em;
}
.wdl-meta { font-size: 0.75rem; color: #8492a6; }

.wdl-health-bar {
  height: 4px;
  border-radius: 2px;
  background: #e3e8f0;
  overflow: hidden;
  width: 120px;
}
.wdl-health-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--status-normal);
  transition: width 0.4s ease;
}
.wdl-health-fill.degraded { background: var(--color-warning); }
.wdl-health-fill.down     { background: var(--status-critical); }

.wdl-card {
  border: 1px solid #e3e8f0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(28,35,51,.06), 0 4px 16px rgba(28,35,51,.04);
}
.wdl-card .table { margin-bottom: 0; }
.wdl-card thead th {
  background: #f6f8fb;
  border-bottom: 1px solid #e3e8f0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8492a6;
  padding: 0.6rem 0.85rem;
  white-space: nowrap;
}
.wdl-card thead th.ps-status { padding-left: 1.25rem; }

.wdl-row {
  border-bottom: 1px solid #f0f3f8;
  border-left: 3px solid transparent;
  transition: background 0.12s ease, border-left-color 0.12s ease;
}
.wdl-row:last-child { border-bottom: none; }
.wdl-row:hover { background: #f8fafd; }
.wdl-row.ok     { border-left-color: var(--status-normal); }
.wdl-row.fail   { border-left-color: var(--status-critical); }
.wdl-row.neterr { border-left-color: var(--color-warning); }
.wdl-row td {
  padding: 0.55rem 0.75rem;
  vertical-align: middle !important;
  font-size: 0.8rem;
}
.wdl-row td.ps-status { padding-left: 1.25rem; }

.wdl-time {
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, monospace;
  font-size: 0.73rem;
  color: #8492a6;
  white-space: nowrap;
}

.wdl-endpoint {
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, monospace;
  font-size: 0.75rem;
  color: #3a4a5c;
  text-decoration: none;
  max-width: 200px;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
.wdl-endpoint:hover { color: var(--color-brand); text-decoration: underline; }

.wdl-event-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, monospace;
  font-size: 0.72rem;
  background: rgba(50, 140, 182, 0.08);
  color: var(--color-brand-dark);
  border: 1px solid rgba(50, 140, 182, 0.2);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  white-space: nowrap;
}
.wdl-event-chip .ev-ns { color: #8492a6; font-size: 0.68rem; }

.wdl-device-link {
  font-size: 0.78rem;
  color: #3a4a5c;
  text-decoration: none;
  font-weight: 500;
}
.wdl-device-link:hover { color: var(--color-brand); text-decoration: underline; }

.wdl-status-ok,
.wdl-status-fail,
.wdl-status-neterr {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
}
.wdl-status-ok     { color: var(--status-normal); }
.wdl-status-fail   { color: var(--status-critical); }
.wdl-status-neterr { color: var(--color-warning); }
.wdl-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.wdl-error {
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, monospace;
  font-size: 0.71rem;
  color: var(--status-critical);
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wdl-empty {
  padding: 3.5rem 1rem;
  text-align: center;
  color: #b0bac8;
}
.wdl-empty-icon {
  font-size: 2.5rem;
  opacity: 0.25;
  display: block;
  margin-bottom: 0.75rem;
}
.wdl-empty p {
  font-size: 0.85rem;
  margin: 0;
  color: #8492a6;
}

.wdl-pagination { margin-top: 1rem; }
.wdl-pagination .pagination { justify-content: center; gap: 2px; }
.wdl-pagination .page-link {
  border-radius: 6px !important;
  font-size: 0.78rem;
  border-color: #e3e8f0;
  color: #3a4a5c;
  padding: 0.3rem 0.65rem;
}
.wdl-pagination .page-item.active .page-link {
  background: var(--color-brand);
  border-color: var(--color-brand);
}

/* Webhook index rows (.whi-*) */
.whi-row {
  border-bottom: 1px solid #f0f3f8;
  border-left: 3px solid transparent;
  transition: background 0.12s ease;
}
.whi-row:last-child { border-bottom: none; }
.whi-row:hover { background: #f8fafd; }
.whi-row.enabled  { border-left-color: var(--color-brand); }
.whi-row.disabled { border-left-color: #c8d0dc; }
.whi-row td {
  padding: 0.75rem 0.85rem;
  vertical-align: middle !important;
  font-size: 0.82rem;
}

.whi-url {
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, monospace;
  font-size: 0.78rem;
  color: #1c2333;
  text-decoration: none;
  font-weight: 500;
}
.whi-url:hover { color: var(--color-brand); text-decoration: underline; }
.whi-url-path {
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, monospace;
  font-size: 0.73rem;
  color: #8492a6;
}

.whi-enabled-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.whi-enabled-dot.on  { background: var(--status-normal); box-shadow: 0 0 0 2px rgba(25,135,84,.15); }
.whi-enabled-dot.off { background: #c8d0dc; }

.whi-last-delivery {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
}
.whi-last-delivery .whi-status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.whi-last-delivery.ok   .whi-status-dot { background: var(--status-normal); }
.whi-last-delivery.fail .whi-status-dot { background: var(--status-critical); }
.whi-last-delivery.warn .whi-status-dot { background: var(--color-warning); }
.whi-last-delivery .whi-ago { color: #8492a6; }
.whi-last-delivery .whi-code {
  font-family: ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 600;
}
.whi-last-delivery.ok   .whi-code { color: var(--status-normal); }
.whi-last-delivery.fail .whi-code { color: var(--status-critical); }
.whi-last-delivery.warn .whi-code { color: var(--color-warning); }

.whi-actions { white-space: nowrap; }
.whi-actions .btn {
  padding: 0.2rem 0.45rem;
  font-size: 0.75rem;
  border-radius: 5px;
  border-color: #e3e8f0;
  color: #5a6a80;
  background: #fff;
}
.whi-actions .btn:hover { border-color: var(--color-brand); color: var(--color-brand); background: rgba(50,140,182,.04); }
.whi-actions .btn.danger:hover { border-color: var(--status-critical); color: var(--status-critical); background: rgba(220,53,69,.04); }

/* Webhook empty state */
.whi-empty { padding: 4rem 1rem; text-align: center; }
.whi-empty-icon {
  font-size: 2.8rem;
  color: var(--color-brand);
  opacity: 0.18;
  display: block;
  margin-bottom: 1rem;
}
.whi-empty h6 { font-size: 0.9rem; font-weight: 700; color: #1c2333; margin-bottom: 0.35rem; }
.whi-empty p {
  font-size: 0.8rem;
  color: #8492a6;
  margin-bottom: 1.25rem;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}

/* Feature-locked upgrade prompt — used on any page where the current account
   is not entitled to the feature (webhooks, api keys, node hierarchy, etc.).
   Two-band card: tinted banner with icon + headline + description on top, and
   a white body with feature chips + CTA on the bottom. See DESIGN.md. */
.feature-upgrade {
  border: 1px solid #e3e8f0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(28,35,51,.06), 0 4px 16px rgba(28,35,51,.04);
}
.feature-upgrade-banner {
  background: linear-gradient(135deg, #1a5a7a 0%, #328cb6 60%, #3c9ed7 100%);
  padding: 2.5rem 2rem 2rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.feature-upgrade-banner::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  pointer-events: none;
}
.feature-upgrade-banner::after {
  content: '';
  position: absolute;
  bottom: -60px; right: 60px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  pointer-events: none;
}
.feature-upgrade-icon {
  font-size: 2rem;
  color: rgba(255,255,255,.9);
  display: inline-block;
  margin-right: 0.6rem;
  margin-bottom: 0;
  vertical-align: -3px;
}
.feature-upgrade-banner h5 {
  color: #fff;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0;
  display: inline-block;
  vertical-align: middle;
}
.feature-upgrade-banner p {
  color: rgba(255,255,255,.85);
  font-size: 1rem;
  margin-top: 0.6rem;
  margin-bottom: 0;
  max-width: none;
  white-space: nowrap;
}
.feature-upgrade-cta {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.5rem 1.25rem;
  background: #fff;
  color: var(--color-brand-dark);
  border-radius: 0.375rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid #fff;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.feature-upgrade-cta:hover,
.feature-upgrade-cta:focus {
  background: var(--color-brand-pale);
  color: var(--color-brand-dark);
  text-decoration: none;
  transform: translateY(-1px);
}
.feature-upgrade-body {
  background: #fff;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  border-top: 1px solid #e3e8f0;
}
.feature-upgrade-body > .d-flex { justify-content: center; }
.feature-upgrade-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: #3a4a5c;
}
.feature-upgrade-feature i { color: var(--color-brand); margin-top: 1px; flex-shrink: 0; }

/* ── Topology view (force-directed graph chrome) ────────────────────────────
   Used by app/views/topology/index.html.erb. Self-contained page chrome
   for the D3 force-directed fleet topology canvas.
   ─────────────────────────────────────────────────────────────────────────── */
#topo-wrapper {
  width: 100%;
  height: calc(100vh - var(--topbar-height) - 118px);
  background: #f5f7f9;
  border-radius: 0.5rem;
  position: relative;
  overflow: hidden;
  border: 1px solid #dee2e6;
}
#topo-svg { width: 100%; height: 100%; display: block; }

#topo-loading {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center;
  background: #f5f7f9; z-index: 20;
}

#topo-empty {
  position: absolute; inset: 0; display: none;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 10px;
  color: #adb5bd;
}
#topo-empty i { font-size: 2.5rem; }
#topo-empty p { font-size: 0.875rem; margin: 0; }

#topo-tooltip {
  position: fixed; pointer-events: none; display: none;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 7px; padding: 10px 13px;
  font-size: 0.8rem;
  z-index: 9999; max-width: 230px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}
.tt-type { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.09em; color: #adb5bd; margin-bottom: 2px; }
.tt-name { font-weight: 600; color: #212529; margin-bottom: 5px; font-size: 0.875rem; }
.tt-caps { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }
.tt-cap  { padding: 2px 7px; border-radius: 10px; font-size: 0.69rem; font-weight: 500; }
.tt-meta { margin-top: 6px; color: #adb5bd; font-size: 0.69rem; }

#topo-detail {
  position: absolute; top: 14px; right: 14px; width: 272px;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 9px; padding: 18px;
  z-index: 10; display: none;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}
#topo-detail-close {
  position: absolute; top: 8px; right: 10px;
  background: none; border: none; color: #adb5bd;
  cursor: pointer; transition: color 0.15s;
  min-width: 44px; min-height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; padding: 0;
}
#topo-detail-close:hover { color: #495057; }
.detail-type-label {
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.09em;
  color: #adb5bd; margin-bottom: 4px;
}
.detail-name { font-size: 1rem; font-weight: 700; color: #212529; line-height: 1.25; margin-bottom: 10px; }
.detail-divider { border: none; border-top: 1px solid #f0f0f0; margin: 12px 0; }
.detail-section-label {
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.09em;
  color: #adb5bd; margin-bottom: 7px;
}
.detail-sensor-row {
  display: flex; align-items: center; justify-content: space-between;
  border-radius: 6px; padding: 5px 9px; margin-bottom: 4px; font-size: 0.8rem;
}
.detail-sensor-name { color: #495057; display: flex; align-items: center; gap: 6px; }
.detail-sensor-status { font-size: 0.69rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.detail-meta { font-size: 0.8rem; color: #6c757d; margin-bottom: 12px; }
.detail-lastseen { font-size: 0.75rem; color: #adb5bd; margin-bottom: 12px; }
.detail-view-link {
  display: block; text-align: center;
  padding: 6px 12px; border-radius: 6px;
  font-size: 0.8rem; font-weight: 600;
  text-decoration: none; transition: opacity 0.15s;
}
.detail-view-link:hover { opacity: 0.85; }

#topo-cache-note {
  position: absolute; bottom: 14px; right: 14px;
  font-size: 0.7rem; color: #e67e00;
  background: rgba(255,255,255,0.92);
  border: 1px solid #e67e00; border-radius: 6px;
  padding: 5px 10px;
  backdrop-filter: blur(4px);
}
#topo-legend {
  position: absolute; bottom: 14px; left: 14px;
  background: rgba(255,255,255,0.92);
  border: 1px solid #dee2e6; border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.72rem; color: #6c757d;
  backdrop-filter: blur(4px);
}
.legend-title {
  font-size: 0.6rem; text-transform: uppercase;
  letter-spacing: 0.09em; color: #adb5bd; margin-bottom: 8px;
}
.legend-grid { display: flex; flex-direction: row; gap: 14px; }
.legend-item { display: flex; align-items: center; gap: 6px; color: #495057; }
.legend-hint {
  margin-top: 8px; padding-top: 7px; border-top: 1px solid #f0f0f0;
  font-size: 0.65rem; color: #ced4da;
}

@keyframes criticalPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
.pulse-critical { animation: criticalPulse 1.8s ease-in-out infinite; }

@media (max-width: 575.98px) {
  #topo-detail { left: 10px; right: 10px; width: auto; top: 10px; }
  #topo-legend, #topo-cache-note { display: none; }
}

/* ── Devise auth-page bottom nav links ───────────────────────────────────────
   Plain text links with icons, shown beneath the Devise card on auth pages.
   ─────────────────────────────────────────────────────────────────────────── */
.auth-nav-link {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: .85rem;
  white-space: nowrap;
  transition: opacity .15s;
}
.auth-nav-link:hover,
.auth-nav-link:focus {
  color: #fff;
  text-decoration: underline;
}

/* "or" divider beneath the passkey button on the sign-in page.
   Renders a horizontal rule with a centered label sitting on top of it. */
.auth-divider {
  position: relative;
  text-align: center;
  color: var(--bs-secondary-color, #6c757d);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 1px solid var(--bs-border-color, #dee2e6);
}
.auth-divider span {
  position: relative;
  background: #fff;
  padding: 0 .75rem;
}

