:root {
  /* Logo-driven palette: charcoal, flame orange, amber gold, warm cream */
  --rp-navy: #141210;
  --rp-navy-light: #241e18;
  --rp-navy-muted: #5c5348;
  --rp-accent: #e85d04;
  --rp-accent-hover: #c44d03;
  --rp-accent-soft: rgba(232, 93, 4, 0.14);
  --rp-gold: #f0b429;
  --rp-gold-soft: rgba(240, 180, 41, 0.18);
  --rp-cream: #f3eee4;
  --rp-success: #2d7a4f;
  --rp-danger: #b83a3a;
  --rp-crimson: #c44d03;
  --rp-crimson-bright: #e85d04;
  --rp-charcoal: #1a1612;
  --rp-bg: #e9e0d1;
  --rp-bg-subtle: #f7f2e9;
  --rp-panel: #fffefc;
  --rp-border: #d4c7b3;
  --rp-border-light: #e2d8c8;
  --rp-text: #1a1612;
  --rp-text-muted: #6b6258;
  --rp-muted: #6b6258;
  --rp-flame: #e85d04;
  --rp-shadow-sm: 0 1px 2px rgba(60, 45, 25, 0.08);
  --rp-shadow: 0 1px 3px rgba(60, 45, 25, 0.1), 0 8px 20px rgba(60, 45, 25, 0.1);
  --rp-shadow-lg: 0 12px 32px rgba(60, 45, 25, 0.16);
  --rp-radius: 0.75rem;
  --rp-radius-lg: 1rem;
  --rp-font: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --rp-font-brand: "Bebas Neue", "Arial Narrow", Impact, sans-serif;

  /* Per-module accents — each module owns a hue across icons, tabs, and card edges */
  --rp-mod-overview: #e85d04;
  --rp-mod-overview-soft: rgba(232, 93, 4, 0.12);
  --rp-mod-radio: #0f766e;
  --rp-mod-radio-soft: rgba(15, 118, 110, 0.12);
  --rp-mod-batteries: #a16207;
  --rp-mod-batteries-soft: rgba(161, 98, 7, 0.12);
  --rp-mod-channels: #7c3aed;
  --rp-mod-channels-soft: rgba(124, 58, 237, 0.12);
  --rp-mod-roster: #1d4ed8;
  --rp-mod-roster-soft: rgba(29, 78, 216, 0.12);
  --rp-mod-logs: #be123c;
  --rp-mod-logs-soft: rgba(190, 18, 60, 0.12);
  --rp-mod-people: #15803d;
  --rp-mod-people-soft: rgba(21, 128, 61, 0.12);
  --rp-mod-integrations: #0891b2;
  --rp-mod-integrations-soft: rgba(8, 145, 178, 0.12);
  --rp-mod-diagrams: #78350f;
  --rp-mod-diagrams-soft: rgba(120, 53, 15, 0.12);
}

/* Scope hook: any element tagged with a module gets --rp-mod-accent for free */
[data-mod="overview"] { --rp-mod-accent: var(--rp-mod-overview); --rp-mod-accent-soft: var(--rp-mod-overview-soft); }
[data-mod="radio"] { --rp-mod-accent: var(--rp-mod-radio); --rp-mod-accent-soft: var(--rp-mod-radio-soft); }
[data-mod="batteries"] { --rp-mod-accent: var(--rp-mod-batteries); --rp-mod-accent-soft: var(--rp-mod-batteries-soft); }
[data-mod="channels"] { --rp-mod-accent: var(--rp-mod-channels); --rp-mod-accent-soft: var(--rp-mod-channels-soft); }
[data-mod="roster"] { --rp-mod-accent: var(--rp-mod-roster); --rp-mod-accent-soft: var(--rp-mod-roster-soft); }
[data-mod="logs"] { --rp-mod-accent: var(--rp-mod-logs); --rp-mod-accent-soft: var(--rp-mod-logs-soft); }
[data-mod="people"] { --rp-mod-accent: var(--rp-mod-people); --rp-mod-accent-soft: var(--rp-mod-people-soft); }
[data-mod="integrations"] { --rp-mod-accent: var(--rp-mod-integrations); --rp-mod-accent-soft: var(--rp-mod-integrations-soft); }
[data-mod="diagrams"] { --rp-mod-accent: var(--rp-mod-diagrams); --rp-mod-accent-soft: var(--rp-mod-diagrams-soft); }

/* Inline SVG sprite icons — inherit color from their container */
.rp-icon {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  vertical-align: -0.125em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.rp-app {
  font-family: var(--rp-font);
  color: var(--rp-text);
  background: var(--rp-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

body.rp-app ::placeholder {
  color: #b0a89c;
  opacity: 1;
  font-style: italic;
}
body.rp-app ::-webkit-input-placeholder {
  color: #b0a89c;
  font-style: italic;
}
body.rp-app ::-moz-placeholder {
  color: #b0a89c;
  opacity: 1;
  font-style: italic;
}
body.rp-app :-ms-input-placeholder {
  color: #b0a89c;
  font-style: italic;
}

/* Ember glow over a flat base — a lightening gradient here would wash the page
   back toward the card color and erase the surface separation. */
body.rp-app:not(.rp-auth-page):not(.rp-map-page):not(.rp-error-page):not(.rp-public-page) {
  background:
    radial-gradient(ellipse 90% 55% at 50% -25%, rgba(232, 93, 4, 0.13), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 0%, rgba(240, 180, 41, 0.1), transparent 50%),
    var(--rp-bg);
}

/* ── Header / Nav ── */
.rp-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: var(--rp-shadow-sm);
}

.rp-header.has-subheader {
  box-shadow: var(--rp-shadow-sm);
}

.rp-subheader {
  background: #ded3c0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(36, 30, 24, 0.18);
}

.rp-subheader-inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 1rem;
  min-height: 2.05rem;
  padding: 0.25rem 0;
}

.rp-subheader-left {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
  min-width: 0;
  flex: 1 1 auto;
}

.rp-subheader-label {
  flex: 0 0 auto;
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rp-navy-muted);
  white-space: nowrap;
}

.rp-subheader-select {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: 22rem;
  padding-top: 0.12rem;
  padding-bottom: 0.12rem;
  font-size: 0.85rem;
  line-height: 1.3;
  background-color: #fff;
  border-color: rgba(36, 30, 24, 0.18);
  color: var(--rp-navy);
}

.rp-subheader-select:focus {
  background-color: #fff;
  border-color: var(--rp-gold);
  color: var(--rp-navy);
  box-shadow: 0 0 0 0.15rem var(--rp-gold-soft);
}

.rp-subheader-select option {
  color: #1a1510;
  background: #fff;
}

.rp-subheader-add {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0.12rem 0.65rem;
  font-size: 0.78rem;
  line-height: 1.35;
  min-height: 0;
  white-space: nowrap;
}

/* Gold wins over .btn-accent orange */
.rp-subheader .btn-accent.rp-subheader-add,
.rp-subheader .rp-subheader-add {
  background: var(--rp-gold);
  border-color: var(--rp-gold);
  color: #1a1510;
}

.rp-subheader .btn-accent.rp-subheader-add:hover,
.rp-subheader .btn-accent.rp-subheader-add:focus,
.rp-subheader .rp-subheader-add:hover,
.rp-subheader .rp-subheader-add:focus {
  background: #e0a61f;
  border-color: #e0a61f;
  color: #1a1510;
}

@media (max-width: 575.98px) {
  .rp-subheader-label {
    display: none;
  }
  .rp-subheader-select {
    max-width: none;
  }
}

.rp-navbar {
  background: linear-gradient(135deg, #0a0908 0%, var(--rp-navy-light) 55%, #2a1c12 100%);
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid rgba(232, 93, 4, 0.45);
}

.rp-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: #fff !important;
}

.rp-brand-logo {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.rp-brand-light .rp-brand-logo {
  width: 4rem;
  height: 4rem;
  box-shadow: none;
}

.rp-brand-text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }

.rp-brand-title {
  font-family: var(--rp-font-brand);
  font-weight: 400;
  font-size: 1.55rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.rp-brand-fireguy,
.rp-brand-pipe {
  color: var(--rp-cream);
}

.rp-brand-pipe {
  margin: 0 0.05em;
  font-weight: 400;
}

.rp-brand-product {
  color: var(--rp-gold);
}

.rp-brand-sub {
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(243, 238, 228, 0.62);
  letter-spacing: 0.02em;
}

.rp-brand-light .rp-brand-fireguy,
.rp-brand-light .rp-brand-pipe { color: var(--rp-cream); }

.rp-brand-light .rp-brand-product { color: var(--rp-gold); }

.rp-brand-light .rp-brand-title { font-size: 1.85rem; }

@media (max-width: 575.98px) {
  .rp-brand-sub { display: none; }
  .rp-brand-title { font-size: 1.35rem; }
  .rp-brand-logo { width: 2.6rem; height: 2.6rem; }
}

.rp-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: rgba(255, 255, 255, 0.78) !important;
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.5rem 0.85rem !important;
  border-radius: 0.5rem;
  transition: color 0.15s, background 0.15s;
}

.rp-nav-link .rp-icon {
  width: 1.05em;
  height: 1.05em;
  opacity: 0.62;
  transition: opacity 0.15s, color 0.15s;
}

.rp-nav-link:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.08);
}

.rp-nav-link:hover .rp-icon { opacity: 0.95; }

.rp-nav-link.active {
  color: #fff !important;
  background: rgba(232, 93, 4, 0.38);
  box-shadow: inset 0 0 0 1px rgba(240, 180, 41, 0.3);
}

.rp-nav-link.active .rp-icon {
  opacity: 1;
  color: var(--rp-gold);
}

.rp-nav-logout { opacity: 0.85; }

@media (max-width: 991.98px) {
  .rp-nav-link { width: 100%; }
}

/* ── Incident module mega panel ── */
.rp-incidents-nav {
  position: relative;
}

.rp-incidents-nav > .rp-nav-link.dropdown-toggle::after {
  margin-left: 0.15em;
  vertical-align: 0.15em;
  opacity: 0.6;
}

/* Top-nav Admin (Access / Integrations / Presets) */
.rp-admin-nav {
  position: relative;
}
.rp-admin-nav > .rp-nav-link.dropdown-toggle::after {
  margin-left: 0.15em;
  vertical-align: 0.15em;
  opacity: 0.6;
}
.rp-nav-admin-menu.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  margin: 0.4rem 0 0;
  min-width: 12.5rem;
  padding: 0.4rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(240, 180, 41, 0.3);
  background: #1c1814;
  box-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.5);
}
.rp-nav-admin-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 0.45rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.9rem;
  color: rgba(250, 246, 240, 0.92);
}
.rp-nav-admin-item .rp-icon {
  width: 1rem;
  height: 1rem;
  opacity: 0.8;
  flex-shrink: 0;
}
.rp-nav-admin-item:hover,
.rp-nav-admin-item:focus-visible {
  background: rgba(240, 180, 41, 0.14);
  color: #f0b429;
}
.rp-nav-admin-item.active {
  background: rgba(240, 180, 41, 0.2);
  color: #f0b429;
  font-weight: 600;
}

/* Pinned under the toggle — Popper must never reposition this panel */
.rp-incidents-nav > .rp-nav-panel.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  inset: auto;
  transform: none !important;
  margin: 0.4rem 0 0;
  padding: 0;
  width: 34rem;
  max-width: calc(100vw - 2rem);
  background: #1c1814;
  border: 1px solid rgba(240, 180, 41, 0.3);
  border-radius: 0.85rem;
  box-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.5);
  overflow: hidden;
  z-index: 1050;
}

.rp-nav-panel-head {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #2a1c12 0%, #1c1814 70%);
  border-bottom: 1px solid rgba(240, 180, 41, 0.22);
}

.rp-nav-panel-kicker {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rp-gold);
}

.rp-nav-panel-name {
  font-family: var(--rp-font-brand);
  font-size: 1.2rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--rp-cream);
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rp-nav-panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: start;
  gap: 0.15rem 0.6rem;
  padding: 0.75rem 0.85rem 0.25rem;
  max-height: min(74vh, 38rem);
  overflow-y: auto;
}

.rp-nav-group { align-self: start; }

/* Modules with no sub-views — compact chip row along the bottom */
.rp-nav-panel-flat {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.7rem 0.9rem 0.85rem;
  margin-top: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
}

.rp-nav-flat-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.rp-nav-flat-link .rp-icon {
  width: 1.05em;
  height: 1.05em;
  color: var(--rp-mod-accent, var(--rp-gold));
  filter: brightness(1.85) saturate(1.25);
}

.rp-nav-flat-link:hover,
.rp-nav-flat-link:focus-visible {
  background: var(--rp-mod-accent-soft, rgba(232, 93, 4, 0.18));
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  outline: none;
}

.rp-nav-group-row {
  display: flex;
  align-items: center;
}

.rp-nav-group-head {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.35rem 0.5rem;
  border-radius: 0.4rem;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  transition: background 0.15s, color 0.15s;
}

.rp-nav-group-head .rp-icon {
  width: 1.15em;
  height: 1.15em;
  /* Module hue, lightened so it reads on the dark panel */
  color: var(--rp-mod-accent, var(--rp-gold));
  filter: brightness(1.85) saturate(1.25);
}

.rp-nav-group-head:hover,
.rp-nav-group-head:focus-visible {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  outline: none;
}

.rp-nav-panel-list,
.rp-nav-panel-sublist {
  list-style: none;
  margin: 0 0 0.55rem;
  padding: 0 0 0 0.5rem;
}

.rp-nav-panel-sublist {
  margin: 0;
  padding-left: 0.85rem;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  margin-left: 0.85rem;
}

.rp-nav-panel-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.5rem;
  border-radius: 0.35rem;
  text-decoration: none;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.72);
  transition: background 0.15s, color 0.15s;
}

.rp-nav-panel-link .rp-icon {
  width: 0.95em;
  height: 0.95em;
  opacity: 0.5;
}

.rp-nav-panel-link:hover,
.rp-nav-panel-link:focus-visible {
  background: var(--rp-mod-accent-soft, rgba(232, 93, 4, 0.18));
  color: #fff;
  outline: none;
}

.rp-nav-panel-link:hover .rp-icon { opacity: 0.95; }

.rp-nav-panel-link.is-nested { font-size: 0.82rem; }

.rp-nav-group-toggle {
  flex: 0 0 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  border-radius: 0.35rem;
  cursor: pointer;
}

.rp-nav-group-toggle .rp-icon { transition: transform 0.15s ease; }

.rp-nav-group.open > .rp-nav-group-row > .rp-nav-group-toggle .rp-icon {
  transform: rotate(180deg);
}

/* Mobile / collapsed navbar: the panel stacks and groups collapse */
@media (max-width: 991.98px) {
  .rp-incidents-nav { width: 100%; }
  .rp-admin-nav { width: 100%; }

  .rp-incidents-nav > .rp-nav-panel.dropdown-menu {
    position: static;
    float: none;
    width: 100%;
    max-width: none;
    right: auto;
    left: auto;
    inset: auto;
    transform: none !important;
    margin: 0.25rem 0 0.5rem;
    box-shadow: none;
    border-radius: 0.5rem;
  }

  .rp-nav-admin-menu.dropdown-menu {
    position: static;
    float: none;
    width: 100%;
    margin: 0.25rem 0 0.5rem;
    box-shadow: none;
  }

  .rp-nav-panel-grid {
    grid-template-columns: 1fr;
    max-height: 55vh;
  }

  .rp-nav-group > .rp-nav-panel-list { display: none; }
  .rp-nav-group.open > .rp-nav-panel-list { display: block; }
}

/* Logout confirmation */
.rp-logout-modal {
  overflow: hidden;
  background: #fffdf9;
}
.rp-logout-modal-hero {
  position: relative;
  height: 72px;
  background:
    radial-gradient(ellipse 70% 120% at 50% 120%, rgba(232, 93, 4, 0.45), transparent 55%),
    linear-gradient(135deg, #0a0908 0%, #241e18 55%, #2a1c12 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.rp-logout-modal-wave {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(240, 180, 41, 0.55);
  animation: rp-logout-pulse 1.6s ease-out infinite;
}
.rp-logout-modal-wave:nth-child(2) {
  width: 22px;
  height: 22px;
  animation-delay: 0.2s;
  border-color: rgba(232, 93, 4, 0.65);
}
.rp-logout-modal-wave:nth-child(3) {
  width: 36px;
  height: 36px;
  animation-delay: 0.4s;
  border-color: rgba(243, 238, 228, 0.35);
}
@keyframes rp-logout-pulse {
  0% { transform: scale(0.85); opacity: 0.9; }
  70% { transform: scale(1.15); opacity: 0.25; }
  100% { transform: scale(1.25); opacity: 0; }
}
.rp-logout-modal-title {
  font-family: var(--rp-font-brand);
  font-size: 1.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rp-navy);
}
.rp-logout-modal-line {
  font-size: 1.05rem;
  color: var(--rp-text-muted);
}
.rp-logout-modal .modal-footer {
  background: transparent;
  gap: 0.5rem;
}

.rp-nav-toggle {
  border-color: rgba(255, 255, 255, 0.25);
  padding: 0.35rem 0.55rem;
}

.rp-incident-pill {
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--rp-gold-soft);
  border: 1px solid rgba(240, 180, 41, 0.4);
  color: #f5dfa0;
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.rp-incident-pill-mobile {
  display: flex;
  padding: 0.45rem 1rem;
  margin: 0;
  border-radius: 0;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.15);
  max-width: none;
}

/* ── Page layout ── */
.rp-main {
  flex: 1;
  padding: 1.5rem 0 2.5rem;
}

.rp-container,
.rp-container-wide {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 1.25rem;
}

@media (min-width: 1400px) {
  .rp-container,
  .rp-container-wide {
    padding: 0 1.75rem;
  }
}

.rp-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.rp-page-title {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--rp-navy);
  margin: 0 0 0.25rem;
  letter-spacing: -0.02em;
}

.rp-page-subtitle {
  color: var(--rp-text-muted);
  margin: 0;
  font-size: 1rem;
  max-width: 56rem;
}

/* ── Cards ── */
.rp-card {
  position: relative;
  background: var(--rp-panel);
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius-lg);
  box-shadow: var(--rp-shadow);
  overflow: hidden;
}

/* Module-tinted top rule — only appears inside a [data-mod] scope.
   Sits above the header, which is positioned so it can host its own overlays. */
.rp-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  z-index: 2;
  pointer-events: none;
  background: var(--rp-mod-accent, transparent);
  opacity: 0.9;
}

.rp-card-header {
  position: relative;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--rp-border-light);
  background: var(--rp-bg-subtle);
}

.rp-card-header h2,
.rp-card-header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--rp-navy);
  letter-spacing: -0.005em;
}

.rp-card-body { padding: 1.25rem; }

.rp-sidebar .card,
.rp-card {
  background: var(--rp-panel);
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius-lg);
  box-shadow: var(--rp-shadow);
}

/* ── Home hero ── */
.rp-hero {
  padding: 2.5rem 0 3rem;
}

.rp-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--rp-accent-soft);
  color: var(--rp-accent-hover);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.rp-hero-title {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--rp-navy);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
  max-width: none;
}

.rp-hero-lead {
  font-size: 1.1rem;
  color: var(--rp-text-muted);
  max-width: 52rem;
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.rp-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  font-size: 0.88rem;
  color: var(--rp-text-muted);
  margin-bottom: 2rem;
}

.rp-hero-meta a {
  color: var(--rp-accent);
  font-weight: 600;
  text-decoration: none;
}

.rp-hero-meta a:hover { text-decoration: underline; }

.rp-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}

.rp-feature-card {
  background: var(--rp-panel);
  border: 1px solid var(--rp-border-light);
  border-radius: var(--rp-radius);
  padding: 1.25rem;
  box-shadow: var(--rp-shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.rp-feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--rp-shadow);
}

.rp-feature-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.55rem;
  background: var(--rp-accent-soft);
  color: var(--rp-accent-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.rp-feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--rp-navy);
  margin-bottom: 0.35rem;
}

.rp-feature-card p {
  font-size: 0.88rem;
  color: var(--rp-text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ── Buttons ── */
.btn-accent,
.btn-primary,
.btn-outline-secondary,
.btn-outline-primary,
.btn-outline-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: 0.5rem;
  line-height: 1.4;
  padding: 0.5rem 1.1rem;
  min-height: calc(1.4em + 1rem + 2px);
  transition: background 0.15s, border-color 0.15s, transform 0.1s, color 0.15s;
}

.btn .rp-icon {
  width: 1.05em;
  height: 1.05em;
  margin-right: 0.4rem;
}

.btn .rp-icon:only-child { margin-right: 0; }

.btn-accent,
.btn-primary {
  background: var(--rp-accent);
  border-color: var(--rp-accent);
  color: #fff;
}

.btn-accent.btn-sm,
.btn-primary.btn-sm {
  padding: 0.28rem 0.7rem;
  font-size: 0.82rem;
  line-height: 1.4;
  border-radius: 0.45rem;
  min-height: calc(1.5em + 0.5rem + 2px);
}

.btn-outline-secondary.btn-sm,
.btn-outline-primary.btn-sm,
.btn-outline-danger.btn-sm {
  padding: 0.28rem 0.7rem;
  font-size: 0.82rem;
  line-height: 1.4;
  border-radius: 0.45rem;
  min-height: calc(1.5em + 0.5rem + 2px);
}

.btn-accent:hover,
.btn-primary:hover {
  background: var(--rp-accent-hover);
  border-color: var(--rp-accent-hover);
  color: #fff;
}

.btn-accent:active,
.btn-primary:active { transform: scale(0.98); }

.btn-outline-primary {
  color: var(--rp-accent);
  border-color: var(--rp-accent);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--rp-accent);
  border-color: var(--rp-accent);
  color: #fff;
}

.btn-outline-secondary {
  border-color: var(--rp-border);
  color: var(--rp-text-muted);
  background: transparent;
}

.btn-outline-secondary:hover {
  background: var(--rp-bg-subtle);
  border-color: var(--rp-navy-muted);
  color: var(--rp-navy);
}

/* ── Forms ── */
.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--rp-navy-muted);
  margin-bottom: 0.3rem;
}

/* Keep inputs in a Bootstrap row aligned even when some labels wrap (unit conversions). */
form.rp-form-units.row > [class*="col-"] {
  display: flex;
  flex-direction: column;
}

form.rp-form-units.row > [class*="col-"] > .form-label {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  align-content: flex-end;
  justify-content: space-between;
  gap: 0.15rem 0.45rem;
  min-height: 2.45rem;
  margin-bottom: 0.3rem;
  line-height: 1.2;
}

.rp-unit-conv {
  font-weight: 500;
  font-size: 0.74rem;
  color: var(--rp-text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1.2;
}

.form-control,
.form-select {
  border-color: var(--rp-border);
  border-radius: 0.5rem;
  font-size: 0.92rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--rp-accent);
  box-shadow: 0 0 0 0.2rem var(--rp-accent-soft);
}

.form-text { font-size: 0.78rem; color: var(--rp-text-muted); }

.form-control-sm,
.form-select-sm {
  border-radius: 0.45rem;
  font-size: 0.88rem;
  min-height: calc(1.5em + 0.5rem + 2px);
}

/* ── Map page ── */
body.rp-map-page {
  background: var(--rp-bg);
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

body.rp-map-page .rp-header {
  flex-shrink: 0;
}

.rp-map-layout {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0.5rem 1.25rem 0.75rem;
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

.rp-map-row {
  flex: 1;
  min-height: 0;
  height: 100%;
  margin: 0;
  max-width: 100%;
  overflow: hidden;
}

.rp-sidebar {
  height: 100%;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.rp-sidebar-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.rp-sidebar-scroll {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  overscroll-behavior: contain;
}

.rp-map-column {
  height: 100%;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rp-map-workspace {
  flex: 1;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--rp-panel);
  border: 1px solid var(--rp-border-light);
  border-radius: var(--rp-radius-lg);
  box-shadow: var(--rp-shadow-lg);
}

.rp-map-tabs-bar {
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
  padding-right: 0.45rem;
  background: var(--rp-bg-subtle);
  border-bottom: 1px solid var(--rp-border-light);
  border-radius: var(--rp-radius-lg) var(--rp-radius-lg) 0 0;
  position: relative;
  /* Must clear the Leaflet stack and the Overlays toolbox (1000) or the Export
     menu opens behind the map — still below .rp-header (1030) so nav menus win. */
  z-index: 1020;
}

.rp-map-tabs-bar .rp-map-tabs {
  flex: 1;
  min-width: 0;
  border-bottom: none;
  background: transparent;
  border-radius: 0;
}

.rp-map-tabs-export {
  flex-shrink: 0;
  padding-bottom: 0.3rem;
  position: relative;
  z-index: 1;
}

.rp-map-tabs-export .dropdown-menu {
  z-index: 5;
}

.rp-map-tabs {
  flex-shrink: 0;
  margin: 0;
  padding: 0.25rem 0.45rem 0;
  gap: 0.2rem;
  border-bottom: 1px solid var(--rp-border-light);
  background: var(--rp-bg-subtle);
  border-radius: var(--rp-radius-lg) var(--rp-radius-lg) 0 0;
}

.rp-map-tabs .nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--rp-text-muted);
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 0.45rem 0.45rem 0 0;
  padding: 0.4rem 0.85rem;
  margin-bottom: -1px;
  background: transparent;
}

.rp-map-tabs .nav-link:hover {
  color: var(--rp-navy);
  border-color: transparent;
}

.rp-map-tabs .nav-link.active {
  color: var(--rp-navy);
  background: var(--rp-panel);
  border-color: var(--rp-border-light) var(--rp-border-light) var(--rp-panel);
}

.rp-map-tab-content {
  flex: 1;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rp-map-tab-content > .tab-pane {
  flex: 1;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  overflow: hidden;
  padding-top: 0;
}

.rp-map-tab-content > .tab-pane.show {
  display: flex !important;
  flex-direction: column;
}

.rp-map-pane {
  position: relative;
}

/* Floating overlay toolbox on the main map */
.rp-map-layers {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  max-width: min(16.5rem, calc(100% - 1.3rem));
  pointer-events: none;
}

.rp-map-layers > * {
  pointer-events: auto;
}

.rp-map-layers-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--rp-border);
  border-radius: 0.55rem;
  background: var(--rp-panel);
  color: var(--rp-text);
  font-family: var(--rp-font);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1;
  padding: 0.4rem 0.65rem;
  box-shadow: var(--rp-shadow-sm);
  cursor: pointer;
}

.rp-map-layers-toggle:hover {
  border-color: rgba(232, 93, 4, 0.45);
  color: var(--rp-accent);
}

.rp-map-layers-toggle[aria-expanded="true"] {
  border-color: rgba(232, 93, 4, 0.4);
  background: linear-gradient(180deg, #fffdf9 0%, #faf5ee 100%);
}

.rp-map-layers-toggle-icon {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 0.15rem;
  border: 2px solid currentColor;
  box-shadow: inset 0 0 0 2px var(--rp-panel), 0 0 0 1px currentColor;
  opacity: 0.85;
}

.rp-map-layers-panel {
  width: 100%;
  min-width: 14.5rem;
  max-height: min(70vh, 28rem);
  overflow-y: auto;
  padding: 0.55rem 0.65rem 0.6rem;
  border: 1px solid var(--rp-border);
  border-radius: 0.65rem;
  background: rgba(255, 253, 249, 0.96);
  box-shadow: var(--rp-shadow);
  backdrop-filter: blur(6px);
}

.rp-map-layers.is-collapsed .rp-map-layers-panel {
  display: none;
}

.rp-map-layers-section + .rp-map-layers-section {
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--rp-border-light);
}

.rp-map-layers-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  margin: 0;
  padding: 0.1rem 0;
  border: none;
  background: transparent;
  color: var(--rp-text-muted);
  font-family: var(--rp-font);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
}

.rp-map-layers-section-toggle:hover {
  color: var(--rp-accent);
}

.rp-map-layers-chevron {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  flex-shrink: 0;
  opacity: 0.75;
}

.rp-map-layers-section.is-collapsed .rp-map-layers-chevron {
  transform: rotate(-45deg);
}

.rp-map-layers-section.is-collapsed .rp-map-layers-section-body {
  display: none;
}

.rp-map-layers-section-body {
  margin-top: 0.35rem;
}

.rp-map-layers-empty {
  font-size: 0.75rem;
  color: var(--rp-text-muted);
  margin-bottom: 0.25rem;
}

.rp-map-layers-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.rp-map-layers-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.2rem;
}

.rp-map-layers-row + .rp-map-layers-row,
.rp-map-layers-site + .rp-map-layers-site {
  margin-top: 0.45rem;
}

.rp-map-layers-row .form-check-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rp-text);
}

.rp-map-layers-opacity {
  width: 100%;
  height: 0.9rem;
  padding: 0;
  margin: 0;
  accent-color: var(--rp-accent);
}

.rp-map-layers-opacity:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 575.98px) {
  .rp-map-layers {
    top: 0.45rem;
    right: 0.45rem;
  }

  .rp-map-layers-toggle-label {
    display: none;
  }

  .rp-map-layers-toggle {
    padding: 0.45rem;
  }
}

/* Basemap picker — square button in the map's top-left corner */
/* 30px matches the Leaflet zoom buttons this sits directly above. */
.rp-basemap {
  position: relative;
  width: 30px;
}

.rp-basemap-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--rp-border);
  border-radius: 0.55rem;
  background: var(--rp-panel);
  color: var(--rp-text);
  box-shadow: var(--rp-shadow-sm);
  cursor: pointer;
}

.rp-basemap-toggle:hover {
  border-color: rgba(232, 93, 4, 0.45);
  color: var(--rp-accent);
}

.rp-basemap.is-open .rp-basemap-toggle {
  border-color: rgba(232, 93, 4, 0.4);
  color: var(--rp-accent);
  background: linear-gradient(180deg, #fffdf9 0%, #faf5ee 100%);
}

/* Quartered square — reads as a map grid, distinct from the overlays glyph */
.rp-basemap-toggle-icon {
  width: 0.9rem;
  height: 0.9rem;
  border: 1.5px solid currentColor;
  border-radius: 0.15rem;
  background-image:
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor);
  background-size: 100% 1.5px, 1.5px 100%;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0.85;
}

/* Absolute so opening the picker never shifts the zoom control below it. */
.rp-basemap-panel {
  position: absolute;
  top: 0;
  left: calc(100% + 0.3rem);
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  width: max-content;
  min-width: 9.5rem;
  padding: 0.3rem;
  border: 1px solid var(--rp-border);
  border-radius: 0.65rem;
  background: rgba(255, 253, 249, 0.96);
  box-shadow: var(--rp-shadow);
  backdrop-filter: blur(6px);
}

.rp-basemap-panel[hidden] {
  display: none;
}

.rp-basemap-option {
  display: block;
  width: 100%;
  padding: 0.3rem 0.5rem;
  border: none;
  border-radius: 0.4rem;
  background: transparent;
  color: var(--rp-text);
  font-family: var(--rp-font);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.rp-basemap-option:hover {
  background: var(--rp-accent-soft);
  color: var(--rp-accent);
}

.rp-basemap-option.is-active {
  background: var(--rp-accent);
  color: #fff;
}

.rp-map-pane #map,
.rp-map-layout #map,
#map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: none;
  border-radius: 0 0 calc(var(--rp-radius-lg) - 1px) calc(var(--rp-radius-lg) - 1px);
  box-shadow: none;
  overflow: hidden;
}

.rp-map-pane #map .leaflet-container,
#map .leaflet-container {
  width: 100% !important;
  height: 100% !important;
}

.rp-link-pane {
  min-height: 0;
  min-width: 0;
  max-width: 100%;
}

.rp-link-results {
  flex: 1;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.45rem 0.75rem 0.7rem;
  background: var(--rp-panel);
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: auto;
  overflow-x: hidden;
}

.rp-link-results-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  min-width: 0;
}

.rp-link-quality {
  flex-shrink: 0;
  align-self: center;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.7rem;
  border-radius: var(--rp-radius);
  border: 1px solid transparent;
  line-height: 1.2;
}

.rp-link-quality-excellent {
  color: #0f5132;
  background: rgba(25, 135, 84, 0.14);
  border-color: rgba(25, 135, 84, 0.35);
}

.rp-link-quality-good {
  color: #3f6212;
  background: rgba(132, 204, 22, 0.16);
  border-color: rgba(101, 163, 13, 0.4);
}

.rp-link-quality-fair {
  color: #854d0e;
  background: rgba(234, 179, 8, 0.16);
  border-color: rgba(202, 138, 4, 0.4);
}

.rp-link-quality-marginal {
  color: #92400e;
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(217, 119, 6, 0.4);
}

.rp-link-quality-blocked {
  color: #7f1d1d;
  background: rgba(185, 28, 28, 0.12);
  border-color: rgba(185, 28, 28, 0.35);
}

.rp-link-quality-unknown {
  color: var(--rp-text-muted);
  background: var(--rp-bg-subtle);
  border-color: var(--rp-border-light);
}

.rp-link-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--rp-navy);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.rp-link-profile-block {
  flex-shrink: 0;
  min-width: 0;
  max-width: 100%;
  padding: 0.65rem 0.7rem 0.75rem;
  border: 1px solid var(--rp-border-light);
  border-radius: var(--rp-radius);
  background: var(--rp-bg-subtle);
  overflow: hidden;
}

.rp-link-profile-legend {
  width: min(12rem, 40%);
  flex-shrink: 1;
}

.rp-link-profile-legend .coverage-gradient-bar {
  height: 10px;
}

.rp-link-split {
  flex: 1 1 auto;
  min-height: 14rem;
  min-width: 0;
  max-width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.75rem;
}

.rp-link-minimap-col,
.rp-link-table-col {
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rp-link-minimap {
  flex: 1;
  min-height: 12rem;
  width: 100%;
  border: 1px solid var(--rp-border-light);
  border-radius: var(--rp-radius);
  overflow: hidden;
  background: #dfe8ef;
  position: relative;
}

.rp-link-table-wrap {
  flex: 1;
  min-height: 12rem;
  min-width: 0;
  overflow: auto;
  border: 1px solid var(--rp-border-light);
  border-radius: var(--rp-radius);
  background: #fff;
}

.rp-link-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  margin: 0;
  table-layout: fixed;
}

.rp-link-table + .rp-link-table {
  border-top: 1px solid var(--rp-border);
}

.rp-link-table th,
.rp-link-table td {
  padding: 0.4rem 0.65rem;
  border-bottom: 1px solid var(--rp-border-light);
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.rp-link-table thead th {
  background: var(--rp-bg-subtle);
  color: var(--rp-navy);
  font-weight: 700;
  text-align: left;
}

.rp-link-table tbody th {
  width: 42%;
  font-weight: 600;
  color: var(--rp-text-muted);
  background: transparent;
}

.rp-link-table tbody tr:nth-child(even) td,
.rp-link-table tbody tr:nth-child(even) th {
  background: rgba(247, 249, 251, 0.7);
}

.rp-link-table-sites th:not(:first-child),
.rp-link-table-sites td {
  text-align: left;
}

.rp-link-endpoint-marker {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--rp-navy);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--rp-shadow-sm);
  border: 2px solid #fff;
}
.rp-link-endpoint-marker.rp-link-endpoint-pin {
  background: #b45309;
}

.rp-point-check-pin {
  width: 28px;
  height: 36px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.35));
}
.rp-point-check-pin span {
  width: 24px;
  height: 24px;
  margin-top: 2px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: #b45309;
  border: 2px solid #fff;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.rp-point-check-pin .rp-pin-letter {
  transform: rotate(45deg);
  display: inline-block;
}

.link-good { color: var(--rp-success); font-weight: 700; }
.link-bad { color: var(--rp-danger); font-weight: 700; }

.rp-link-profile-canvas-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.link-profile-canvas {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 200px;
  border-radius: calc(var(--rp-radius) - 2px);
  background: #e8eef3;
  touch-action: pan-y;
}

.link-profile-canvas:focus-visible {
  outline: 2px solid var(--rp-accent);
  outline-offset: 1px;
}

.link-profile-canvas.is-pannable {
  cursor: grab;
}

.link-profile-canvas.is-panning {
  cursor: grabbing;
}

.link-profile-hover {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: 100%;
  height: 200px;
  pointer-events: none;
}

@media (max-width: 991.98px) {
  .rp-link-split {
    grid-template-columns: 1fr;
  }

  .rp-link-minimap {
    min-height: 12rem;
  }
}

.rp-map-toast {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 2000;
  background: var(--rp-navy);
  color: #fff;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--rp-shadow-lg);
  pointer-events: none;
}

/* Top-center overlay toast — does not push page content */
.rp-toast {
  position: fixed;
  top: 0.85rem;
  left: 50%;
  z-index: 2600;
  max-width: min(32rem, calc(100vw - 1.5rem));
  padding: 0.7rem 1.25rem;
  border-radius: 0 0 0.65rem 0.65rem;
  background: #1f6b3a;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
  box-shadow: var(--rp-shadow-lg);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -120%);
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.rp-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.rp-toast.is-error {
  background: #9b2c2c;
}

/* Keep the map interactive while editing a site so markers can be dragged. */
body.rp-site-edit-open .modal-backdrop {
  pointer-events: none;
  opacity: 0.18 !important;
}

body.rp-site-edit-open #siteModal {
  pointer-events: none;
  /* Stay above sticky header / incident menus while the map stays interactive. */
  z-index: 1200;
}

body.rp-site-edit-open #siteModal .modal-dialog {
  pointer-events: auto;
  margin: 0.75rem auto 0.75rem 0.75rem;
  /* Left-docked; leave most of the map free for pin drag. */
  max-width: min(38rem, calc(100vw - 1.5rem));
}

@media (min-width: 992px) {
  body.rp-site-edit-open #siteModal .modal-dialog {
    margin-left: 1rem;
    margin-right: auto;
  }
}

.leaflet-marker-draggable.site-marker-editing,
.leaflet-marker-icon.site-marker-editing {
  filter: drop-shadow(0 0 0.35rem rgba(232, 93, 4, 0.85));
  cursor: grab;
}

.leaflet-marker-draggable.site-marker-editing:active,
.leaflet-dragging .leaflet-marker-draggable.site-marker-editing {
  cursor: grabbing;
}

/* Active map click modes: site place / route & area draw */
.leaflet-container.rp-map-mode-place,
.leaflet-container.rp-map-mode-place.leaflet-grab,
.leaflet-container.rp-map-mode-place .leaflet-interactive {
  cursor: crosshair !important;
}
.leaflet-container.rp-map-mode-draw,
.leaflet-container.rp-map-mode-draw.leaflet-grab,
.leaflet-container.rp-map-mode-draw .leaflet-interactive {
  cursor: crosshair !important;
}
.leaflet-container.rp-map-mode-place.leaflet-dragging,
.leaflet-container.rp-map-mode-draw.leaflet-dragging {
  cursor: grabbing !important;
}

.rp-sidebar .card-body { padding: 1rem 1.1rem; }

.rp-sidebar .nav-tabs {
  border-bottom: 1px solid var(--rp-border-light);
  gap: 0.15rem;
}

.rp-sidebar .nav-tabs .nav-link {
  border: none;
  border-radius: 0.45rem 0.45rem 0 0;
  color: var(--rp-text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  padding: 0.5rem 0.5rem;
}

.rp-sidebar .nav-tabs .nav-link:hover {
  color: var(--rp-navy);
  background: var(--rp-bg-subtle);
}

.rp-sidebar .nav-tabs .nav-link.active {
  color: var(--rp-accent);
  background: var(--rp-accent-soft);
  border-bottom: 2px solid var(--rp-accent);
}

.tab-pane { padding-top: 0.35rem; }

.rp-sites-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rp-border-light);
}

.rp-sites-toolbar .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.rp-poi-item-head {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}
.rp-poi-item-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rp-poi-item-icon svg {
  display: block;
  width: 28px;
  height: 28px;
}

.rp-poi-marker {
  background: transparent;
  border: none;
}
.rp-poi-marker-pin {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}
.rp-poi-marker-pin svg {
  display: block;
  overflow: visible;
}

.rp-poi-symbol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
  gap: 0.4rem;
  max-height: 14rem;
  overflow: auto;
  padding: 0.15rem;
}
.rp-poi-symbol-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.3rem;
  border: 1px solid var(--rp-border-light);
  border-radius: var(--rp-radius, 0.4rem);
  background: #fff;
  cursor: pointer;
  text-align: center;
  min-height: 4.25rem;
}
.rp-poi-symbol-btn:hover {
  border-color: var(--rp-accent, #c45c26);
  background: var(--rp-accent-soft, rgba(196, 92, 38, 0.08));
}
.rp-poi-symbol-btn.is-selected {
  border-color: var(--rp-accent, #c45c26);
  box-shadow: 0 0 0 2px var(--rp-accent-soft, rgba(196, 92, 38, 0.35));
  background: var(--rp-accent-soft, rgba(196, 92, 38, 0.1));
}
.rp-poi-symbol-btn svg {
  display: block;
  width: 28px;
  height: 28px;
}
.rp-poi-symbol-label {
  font-size: 0.65rem;
  line-height: 1.15;
  color: var(--rp-navy, #1a2332);
}

@media (min-width: 992px) {
  body.rp-poi-edit-open #poiModal .modal-dialog {
    margin-left: 1rem;
    margin-right: auto;
  }
}

body.rp-poi-edit-open #poiModal {
  pointer-events: none;
}

body.rp-poi-edit-open #poiModal .modal-dialog {
  pointer-events: auto;
  margin: 0.75rem auto 0.75rem 0.75rem;
  max-width: min(34rem, calc(100vw - 1.5rem));
}

.rp-poi-vertex-handle {
  background: transparent;
  border: none;
}
.rp-poi-vertex-handle span {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f0b429;
  border: 2px solid #1a2332;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.rp-poi-import-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 16rem;
  overflow: auto;
  padding-right: 0.15rem;
}
.rp-poi-import-row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--rp-border-light);
  border-radius: var(--rp-radius, 0.4rem);
  background: #fff;
  cursor: pointer;
  margin: 0;
}
.rp-poi-import-row:hover {
  border-color: var(--rp-accent, #c45c26);
  background: var(--rp-accent-soft, rgba(196, 92, 38, 0.06));
}
.rp-poi-import-row .form-check-input {
  margin-top: 0.35rem;
  flex-shrink: 0;
}
.rp-channels-import-list {
  max-height: 22rem;
}
.rp-channels-import-row.is-warn {
  border-color: #d4a017;
  background: #fffbeb;
}
.rp-channels-import-row.is-low {
  border-color: #c45c26;
  background: #fff5f0;
}
.rp-channels-import-meta {
  font-size: 0.78rem;
  color: var(--rp-muted);
  line-height: 1.35;
}
.rp-channels-import-zone {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--rp-muted);
  margin: 0.55rem 0 0.2rem;
}
.rp-poi-form .form-control-color {
  min-height: 2rem;
  padding: 0.15rem;
}

.rp-analysis-accordion {
  --bs-accordion-border-radius: var(--rp-radius);
  --bs-accordion-inner-border-radius: calc(var(--rp-radius) - 1px);
  --bs-accordion-btn-padding-x: 0.85rem;
  --bs-accordion-btn-padding-y: 0.7rem;
  --bs-accordion-body-padding-x: 0.85rem;
  --bs-accordion-body-padding-y: 0.85rem;
  --bs-accordion-btn-focus-box-shadow: 0 0 0 0.2rem var(--rp-accent-soft);
  --bs-accordion-active-color: var(--rp-accent);
  --bs-accordion-active-bg: var(--rp-accent-soft);
  --bs-accordion-btn-color: var(--rp-navy);
  border: none;
}

.rp-analysis-accordion .accordion-item {
  border: 1px solid var(--rp-border-light);
  border-radius: var(--rp-radius);
  margin-bottom: 0.45rem;
  overflow: hidden;
  background: #fff;
}

.rp-analysis-accordion .accordion-button {
  font-size: 0.88rem;
  font-weight: 700;
}

.rp-analysis-accordion .accordion-button:not(.collapsed) {
  box-shadow: none;
}

.rp-analysis-accordion .accordion-body {
  font-size: 0.9rem;
  border-top: 1px solid var(--rp-border-light);
}

.rp-analysis-accordion .form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--rp-text-muted);
}

/* ── Site list ── */
.site-item {
  position: relative;
  border: 1px solid var(--rp-border-light);
  border-radius: var(--rp-radius);
  padding: 0.85rem;
  padding-right: 3.4rem;
  margin-bottom: 0.55rem;
  background: var(--rp-bg-subtle);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.site-item.is-sortable {
  padding-left: 1.85rem;
}

.site-item-handle {
  position: absolute;
  top: 50%;
  left: 0.35rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.6rem;
  padding: 0;
  border: none;
  border-radius: 0.3rem;
  background: transparent;
  color: var(--rp-text-muted);
  cursor: grab;
  touch-action: none;
}

.site-item-handle:hover {
  color: var(--rp-accent);
  background: var(--rp-accent-soft);
}

.site-item-handle:active,
.site-item.is-dragging .site-item-handle {
  cursor: grabbing;
}

.site-item-handle span {
  display: block;
  width: 0.5rem;
  height: 0.75rem;
  /* ASCII-only grip (no Unicode) so a non-UTF-8 stylesheet charset cannot break later CSS */
  background-image:
    radial-gradient(circle, currentColor 1.1px, transparent 1.25px),
    radial-gradient(circle, currentColor 1.1px, transparent 1.25px),
    radial-gradient(circle, currentColor 1.1px, transparent 1.25px),
    radial-gradient(circle, currentColor 1.1px, transparent 1.25px),
    radial-gradient(circle, currentColor 1.1px, transparent 1.25px),
    radial-gradient(circle, currentColor 1.1px, transparent 1.25px);
  background-size: 2.2px 2.2px;
  background-position: 0 0, 100% 0, 0 50%, 100% 50%, 0 100%, 100% 100%;
  background-repeat: no-repeat;
  opacity: 0.85;
}

.site-item.is-dragging {
  opacity: 0.45;
}

.site-item.is-drop-target {
  border-color: var(--rp-accent);
  box-shadow: 0 0 0 2px var(--rp-accent-soft);
}

.site-item:hover {
  border-color: var(--rp-border);
  background: #fff;
}

.site-item.selected {
  border-color: var(--rp-accent);
  background: #fff;
  box-shadow: 0 0 0 3px var(--rp-accent-soft);
}

.site-item-body .site-item-loc {
  font-weight: 400;
  color: var(--rp-text-muted);
}

.site-status-pill {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.15;
  border: 1px solid transparent;
  pointer-events: none;
}
.site-status-pill.is-live {
  background: rgba(21, 128, 61, 0.14);
  color: #15803d;
  border-color: rgba(21, 128, 61, 0.28);
}
.site-status-pill.is-plan {
  background: rgba(180, 83, 9, 0.14);
  color: #b45309;
  border-color: rgba(180, 83, 9, 0.3);
}

.site-actions .btn {
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.4rem;
}

.site-actions .site-role-active {
  background: var(--rp-accent);
  border-color: var(--rp-accent);
  color: #fff;
}

.site-actions .site-role-active:hover {
  background: var(--rp-accent-hover);
  border-color: var(--rp-accent-hover);
  color: #fff;
}

/* ── Status / analysis ── */
.rp-status {
  font-size: 0.85rem;
  border-radius: var(--rp-radius);
  padding: 0.85rem 1rem;
  background: var(--rp-bg-subtle);
  border: 1px solid var(--rp-border-light);
  line-height: 1.55;
}

.rp-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(3px);
}

.rp-loading-overlay.show { display: flex; }

.rp-loading-overlay.is-minimized {
  inset: auto;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
}

.rp-loading-overlay.is-minimized .rp-loading-dialog {
  display: none;
}

.rp-loading-overlay.is-minimized .rp-loading-dock {
  display: flex;
  pointer-events: auto;
}

body.rp-busy { overflow: hidden; }
body.rp-busy.rp-loading-minimized { overflow: auto; }

.rp-loading-dialog {
  position: relative;
  width: min(100%, 24rem);
  padding: 1.85rem 1.75rem 1.65rem;
  border: 1px solid var(--rp-border-light);
  border-radius: calc(var(--rp-radius) + 0.15rem);
  background: #fff;
  box-shadow: var(--rp-shadow-lg);
  text-align: center;
}

.rp-loading-minimize {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: 1px solid var(--rp-border-light);
  border-radius: 0.4rem;
  background: var(--rp-bg-subtle);
  color: var(--rp-navy);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.rp-loading-minimize:hover {
  border-color: var(--rp-border);
  background: #fff;
}
.rp-loading-minimize[hidden] {
  display: none !important;
}

.rp-loading-spinner {
  width: 2.35rem;
  height: 2.35rem;
  margin: 0 auto;
  border: 3px solid var(--rp-border);
  border-top-color: var(--rp-accent);
  border-radius: 50%;
  animation: rp-spin 0.75s linear infinite;
}

.rp-loading-title {
  margin-top: 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--rp-navy);
}

.rp-loading-message {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--rp-text-muted);
}

.rp-loading-progress {
  margin-top: 1.15rem;
  text-align: left;
}

.rp-loading-progress-track {
  height: 0.55rem;
  border-radius: 999px;
  background: var(--rp-bg-subtle);
  border: 1px solid var(--rp-border-light);
  overflow: hidden;
}

.rp-loading-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rp-accent), var(--rp-gold));
  transition: width 0.35s ease;
}

.rp-loading-progress.indeterminate .rp-loading-progress-bar {
  width: 35% !important;
  animation: rp-progress-indeterminate 1.4s ease-in-out infinite;
}

.rp-loading-progress-label {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--rp-text-muted);
  text-align: center;
}

.rp-loading-eta {
  margin-top: 0.2rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--rp-text-muted);
  text-align: center;
  opacity: 0.9;
  min-height: 1.1em;
}

.rp-loading-eta[hidden] {
  display: none !important;
}

.rp-loading-cancel {
  margin-top: 1.2rem;
  min-width: 7.5rem;
  padding: 0.45rem 1.1rem;
}

.rp-loading-dock {
  display: none;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.85rem;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #1a1612;
  color: #f5f0e8;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.28);
  text-align: left;
  cursor: pointer;
}
.rp-loading-dock[hidden] {
  display: none !important;
}
.rp-loading-dock:hover,
.rp-loading-dock:focus-visible {
  background: #221c17;
  outline: none;
}
.rp-loading-dock-spinner {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(245, 240, 232, 0.25);
  border-top-color: var(--rp-gold, #f0b429);
  border-radius: 50%;
  animation: rp-spin 0.75s linear infinite;
}
.rp-loading-dock-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.75rem;
}
.rp-loading-dock-title {
  font-size: 0.82rem;
  font-weight: 700;
}
.rp-loading-dock-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  font-size: 0.75rem;
  color: rgba(245, 240, 232, 0.82);
}
.rp-loading-dock-pct {
  font-weight: 700;
  color: var(--rp-gold, #f0b429);
}
.rp-loading-dock-eta[hidden] {
  display: none !important;
}
.rp-loading-dock-hint {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.55);
}

@keyframes rp-progress-indeterminate {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

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

.coverage-legend {
  font-size: 0.82rem;
  background: var(--rp-bg-subtle);
  border: 1px solid var(--rp-border-light);
  border-radius: var(--rp-radius);
  padding: 0.75rem 0.85rem;
}

/* On-map coverage HUD: vertical dBm key + Accuracy (bottom-left) */
.rp-coverage-hud {
  position: absolute;
  left: 0.65rem;
  bottom: 0.65rem;
  z-index: 900;
  pointer-events: none;
}

.rp-coverage-hud-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  pointer-events: none;
}

.rp-coverage-hud-stack > * {
  pointer-events: auto;
}

.rp-coverage-accuracy {
  position: relative;
  flex: 0 0 auto;
}

.rp-coverage-accuracy-btn {
  border: 1px solid var(--rp-border);
  border-radius: 0.55rem;
  background: rgba(255, 253, 249, 0.96);
  color: var(--rp-text);
  font-family: var(--rp-font);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1;
  padding: 0.4rem 0.65rem;
  box-shadow: var(--rp-shadow);
  cursor: pointer;
}

.rp-coverage-accuracy-btn:hover,
.rp-coverage-accuracy-btn[aria-expanded="true"] {
  border-color: rgba(232, 93, 4, 0.45);
  color: var(--rp-accent);
}

.rp-coverage-accuracy-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.4rem);
  width: min(22rem, calc(100vw - 2rem));
  max-height: min(70vh, 28rem);
  overflow: auto;
  padding: 0.75rem 0.85rem 0.85rem;
  border: 1px solid var(--rp-border);
  border-radius: 0.65rem;
  background: rgba(255, 253, 249, 0.98);
  box-shadow: var(--rp-shadow);
  backdrop-filter: blur(6px);
  color: var(--rp-text);
  font-size: 0.8rem;
  line-height: 1.45;
}

.rp-coverage-accuracy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.rp-coverage-accuracy-close {
  border: none;
  background: transparent;
  color: var(--rp-text-muted, #6c757d);
  font-size: 1.25rem;
  line-height: 1;
  padding: 0 0.15rem;
  cursor: pointer;
}

.rp-coverage-accuracy-body p {
  margin: 0 0 0.55rem;
}

.rp-coverage-accuracy-body ul {
  margin: 0 0 0.55rem;
  padding-left: 1.1rem;
}

.rp-coverage-accuracy-body li + li {
  margin-top: 0.35rem;
}

.rp-coverage-accuracy-note {
  margin-bottom: 0 !important;
  color: var(--rp-text-muted, #6c757d);
  font-size: 0.75rem;
}

.rp-coverage-key {
  width: 3.35rem;
  padding: 0.3rem 0.2rem 0.35rem;
  border: 1px solid var(--rp-border);
  border-radius: 0.45rem;
  background: rgba(255, 253, 249, 0.96);
  box-shadow: var(--rp-shadow);
  user-select: none;
  cursor: pointer;
}
.rp-coverage-key:hover {
  border-color: var(--rp-accent, #c45c26);
}
.rp-coverage-key:focus-visible {
  outline: 2px solid var(--rp-accent, #c45c26);
  outline-offset: 2px;
}

.rp-coverage-key-unit {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--rp-text);
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.rp-coverage-key-scale {
  position: relative;
  height: min(42vh, 17.5rem);
  min-height: 11rem;
}

.rp-coverage-key-bar {
  position: absolute;
  left: 0.15rem;
  top: 0;
  bottom: 0;
  width: 0.85rem;
  border-radius: 0.2rem;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: linear-gradient(
    to bottom,
    rgba(14, 110, 80, 0.95) 0%,
    rgba(42, 150, 62, 0.92) 18%,
    rgba(110, 175, 55, 0.9) 32%,
    rgba(230, 190, 45, 0.92) 48%,
    rgba(225, 150, 38, 0.92) 58%,
    rgba(195, 105, 32, 0.94) 68%,
    rgba(160, 55, 60, 0.92) 82%,
    rgba(72, 28, 55, 0.95) 100%
  );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.rp-coverage-key.is-clear-mode .rp-coverage-key-bar {
  /* Checkerboard under transparent end of the scale (set via JS layered backgrounds). */
  background-color: #ddd6c8;
}

.rp-coverage-key-bar::after {
  content: '';
  position: absolute;
  left: -2px;
  right: -2px;
  top: var(--rp-cov-thr-pct, 55%);
  height: 2px;
  margin-top: -1px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.rp-coverage-key-ticks {
  position: absolute;
  inset: 0 0 0 1.15rem;
  font-family: var(--rp-font);
  font-size: 0.62rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--rp-text);
}

.rp-coverage-key-tick {
  position: absolute;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  white-space: nowrap;
}

.rp-coverage-key-tick.is-threshold {
  font-weight: 700;
}

/* Coverage click inspect popup */
.leaflet-popup.rp-cov-leaflet-popup .leaflet-popup-content {
  margin: 0.65rem 0.75rem;
}

.rp-cov-popup {
  min-width: 12.5rem;
  max-width: 17rem;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--rp-text, #212529);
}

.rp-cov-popup-title {
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
}

.rp-cov-popup-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.15rem 0.45rem;
  border-radius: 0.35rem;
  margin-bottom: 0.4rem;
  border: 1px solid transparent;
}

.rp-cov-popup-status--blocked {
  color: #6b2140;
  background: rgba(115, 38, 68, 0.14);
  border-color: rgba(115, 38, 68, 0.3);
}

.rp-cov-popup-status--weak {
  color: #9a3412;
  background: rgba(195, 105, 32, 0.14);
  border-color: rgba(195, 105, 32, 0.35);
}

.rp-cov-popup-status--fair {
  color: #854d0e;
  background: rgba(230, 190, 45, 0.18);
  border-color: rgba(200, 150, 30, 0.4);
}

.rp-cov-popup-status--good {
  color: #166534;
  background: rgba(42, 150, 62, 0.14);
  border-color: rgba(42, 150, 62, 0.35);
}

.rp-cov-popup-note {
  margin: 0 0 0.55rem;
  color: var(--rp-text-muted, #5c6570);
  font-size: 0.78rem;
}

.rp-cov-popup-stats {
  display: grid;
  gap: 0.28rem;
  margin: 0;
}

.rp-cov-popup-stats > div {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  gap: 0.35rem;
  align-items: baseline;
}

.rp-cov-popup-stats dt {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--rp-text-muted, #6c757d);
}

.rp-cov-popup-stats dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.rp-cov-popup-compare {
  margin-top: 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.rp-cov-popup-compare-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--rp-text-muted, #6c757d);
  margin-bottom: 0.3rem;
}

.rp-cov-popup-compare-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}

.rp-cov-popup-compare-row + .rp-cov-popup-compare-row {
  margin-top: 0.2rem;
}

.rp-cov-popup-compare-row span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rp-map-layers-site .form-check-label {
  font-size: 0.72rem;
  line-height: 1.25;
  word-break: break-word;
}

@media (max-width: 576px) {
  .rp-coverage-hud {
    left: 0.4rem;
    bottom: 0.4rem;
  }

  .rp-coverage-key-scale {
    height: min(36vh, 14rem);
    min-height: 9.5rem;
  }

  .rp-coverage-accuracy-panel {
    width: min(20rem, calc(100vw - 1.2rem));
  }
}

.legend-swatch {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 0.15rem;
  margin-right: 0.35rem;
  vertical-align: -0.1rem;
}

.coverage-gradient-bar {
  height: 14px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: linear-gradient(
    to right,
    rgba(72, 28, 55, 0.95) 0%,
    rgba(170, 70, 55, 0.92) 16%,
    rgba(195, 105, 32, 0.94) 32%,
    rgba(225, 150, 38, 0.92) 48%,
    rgba(230, 190, 45, 0.92) 62%,
    rgba(95, 175, 55, 0.92) 78%,
    rgba(14, 110, 80, 0.95) 100%
  );
}

.coverage-gradient-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--rp-text-muted, #6c757d);
  margin-top: 0.35rem;
}

.legend-swatch.signal-green { background: rgba(46, 160, 65, 0.85); }
.legend-swatch.signal-yellow { background: rgba(255, 205, 45, 0.85); }
.legend-swatch.signal-clear { background: transparent; border: 1px dashed rgba(100, 100, 100, 0.5); }
.legend-swatch.strong { background: rgba(45, 122, 79, 0.8); }
.legend-swatch.good { background: rgba(101, 163, 13, 0.75); }
.legend-swatch.marginal { background: rgba(217, 119, 6, 0.75); }
.legend-swatch.none { background: rgba(61, 21, 21, 0.72); }
.legend-swatch.contour { background: transparent; border: 2px solid var(--rp-accent); width: 0.7rem; height: 0.7rem; }
.legend-swatch.fire-perimeter {
  background: transparent;
  border: 2px solid #8b2e0e;
}

.fire-legend {
  font-size: 0.82rem;
  background: var(--rp-bg-subtle);
  border: 1px solid var(--rp-border-light);
  border-radius: var(--rp-radius);
  padding: 0.75rem 0.85rem;
}

.rp-perimeters-panel {
  gap: 0.85rem;
}

.rp-perim-section {
  border: 1px solid var(--rp-border-light);
  border-radius: var(--rp-radius);
  padding: 0.7rem 0.75rem 0.8rem;
  background: var(--rp-bg-subtle);
}

.rp-perim-section-title {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rp-text-muted);
}

.fire-results {
  max-height: 14rem;
  overflow-y: auto;
}

.fire-results .geocode-result {
  margin-bottom: 0.35rem;
}

.fire-popup .fw-semibold {
  color: var(--rp-navy);
}

.leaflet-coverage-shade {
  pointer-events: none;
}

.placement-marker {
  background: var(--rp-navy);
  color: #fff;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: var(--rp-shadow-sm);
  text-align: center;
  line-height: 1.2;
}

.placement-marker-hub {
  background: #b45309;
  border-radius: 0.35rem;
  min-width: 2.4rem;
}

.rp-placement-data-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.rp-data-chip,
.rp-meta-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 0.35rem;
  background: var(--rp-bg-subtle);
  color: var(--rp-text-muted);
  border: 1px solid var(--rp-border-light);
}

.rp-data-chip.is-ready,
.rp-meta-chip.is-ready {
  color: #0f5132;
  background: #d1e7dd;
  border-color: #a3cfbb;
}

.rp-data-chip.is-missing,
.rp-meta-chip.is-missing {
  color: #842029;
  background: #f8d7da;
  border-color: #f1aeb5;
}

.rp-prior-badge {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #7c2d12;
  background: #ffedd5;
  border: 1px solid #fdba74;
  border-radius: 0.3rem;
  padding: 0.05rem 0.35rem;
  vertical-align: middle;
}

.rp-placement-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.rp-placement-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.rp-placement-section-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--rp-navy);
  margin-bottom: 0.35rem;
}

.rp-placement-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--rp-border-light);
  border-radius: var(--rp-radius);
  background: #fff;
  overflow: hidden;
}

.rp-placement-panel + .rp-placement-panel {
  margin-top: 0.65rem;
}

.rp-placement-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.55rem;
  border-bottom: 1px solid var(--rp-border-light);
}

.rp-placement-panel-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.rp-placement-panel-hint {
  font-size: 0.72rem;
  color: var(--rp-text-muted);
}

.rp-placement-panel-plans {
  border-left: 3px solid var(--rp-navy);
}

.rp-placement-panel-plans .rp-placement-panel-head {
  background: color-mix(in srgb, var(--rp-navy) 8%, #fff);
}

.rp-placement-panel-plans .rp-placement-panel-title {
  color: var(--rp-navy);
}

.rp-placement-panel-cands {
  border-left: 3px solid #6b7280;
}

.rp-placement-panel-cands .rp-placement-panel-head {
  background: #f3f4f6;
}

.rp-placement-panel-cands .rp-placement-panel-title {
  color: #4b5563;
}

.rp-item-kind {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.05rem 0.3rem;
  border-radius: 0.25rem;
  line-height: 1.2;
}

.rp-placement-item-plan .rp-item-kind {
  color: #fff;
  background: var(--rp-navy);
}

.rp-placement-item-cand .rp-item-kind {
  color: #374151;
  background: #e5e7eb;
}

.rp-item-rank {
  font-size: 0.82rem;
}

.rp-plan-item-top {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.4rem;
}

.rp-plan-item-top .rp-plan-cov {
  margin-left: auto;
}

.rp-plan-cov {
  font-weight: 700;
  color: var(--rp-navy);
}

.rp-plan-item-names {
  font-size: 0.88rem;
  margin-top: 0.15rem;
}

.rp-plan-item-meta {
  font-size: 0.75rem;
  color: var(--rp-text-muted);
  margin-top: 0.15rem;
}

.rp-plan-summary {
  margin-bottom: 0.65rem;
}

.rp-plan-summary-top {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.rp-plan-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  height: 1.4rem;
  padding: 0 0.35rem;
  border-radius: 0.3rem;
  background: var(--rp-navy);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.rp-plan-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  font-size: 0.82rem;
  color: var(--rp-text-muted);
}

.rp-plan-note {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: #9a3412;
}

.rp-site-cards {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.rp-site-card {
  border: 1px solid var(--rp-border-light);
  border-radius: var(--rp-radius);
  background: #fff;
  padding: 0.55rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.rp-site-card-hub {
  border-color: #f59e0b;
  background: #fffbeb;
}

.rp-site-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.rp-site-card-title {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}

.rp-site-card-meta {
  font-size: 0.78rem;
  color: var(--rp-text-muted);
}

.rp-placement-links summary {
  cursor: pointer;
  list-style: none;
}

.rp-placement-links summary::-webkit-details-marker {
  display: none;
}

.rp-placement-pane {
  min-height: 0;
  min-width: 0;
  max-width: 100%;
}

.rp-placement-results {
  flex: 1;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.45rem 0.75rem 0.7rem;
  background: var(--rp-panel);
  overflow: auto;
  overflow-x: hidden;
}

.rp-placement-split {
  flex: 1 1 auto;
  min-height: 14rem;
  min-width: 0;
  max-width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 0.75rem;
}

.rp-placement-list-col,
.rp-placement-detail-col {
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rp-placement-list-col {
  gap: 0;
}

.rp-placement-list {
  flex: 1 1 auto;
  overflow: auto;
  min-height: 4.5rem;
  max-height: 28vh;
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.rp-placement-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--rp-border-light);
  border-radius: 0.4rem;
  background: #fff;
  padding: 0.45rem 0.55rem;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.rp-placement-item:hover {
  border-color: color-mix(in srgb, var(--rp-navy) 35%, var(--rp-border-light));
}

.rp-placement-item-plan {
  background: color-mix(in srgb, var(--rp-navy) 4%, #fff);
}

.rp-placement-item-cand {
  background: #fafafa;
}

.rp-placement-item.selected {
  border-color: var(--rp-accent);
  background: var(--rp-accent-soft);
  box-shadow: inset 3px 0 0 var(--rp-accent);
}

.rp-placement-detail {
  border: 1px solid var(--rp-border-light);
  border-radius: var(--rp-radius);
  padding: 0.65rem 0.75rem;
  background: var(--rp-bg-subtle);
  color: var(--rp-text);
}

.rp-placement-matrix {
  overflow: auto;
  max-height: 10rem;
  border: 1px solid var(--rp-border-light);
  border-radius: var(--rp-radius);
  background: #fff;
}

.rp-placement-matrix-table {
  font-size: 0.82rem;
}

.rp-placement-matrix-table th,
.rp-placement-matrix-table td {
  padding: 0.3rem 0.45rem;
  white-space: nowrap;
}

.rp-margin-good { color: #0f5132; font-weight: 600; }
.rp-margin-ok { color: #3f6212; font-weight: 600; }
.rp-margin-bad { color: #b91c1c; font-weight: 600; }
.rp-margin-unknown { color: var(--rp-text-muted); }

.rp-placement-minimap {
  height: 14rem;
  min-height: 12rem;
  border: 1px solid var(--rp-border-light);
  border-radius: var(--rp-radius);
  background: var(--rp-bg-subtle);
  z-index: 0;
}

.rp-placement-minimap .leaflet-control-zoom {
  margin-top: 0.5rem;
  margin-left: 0.5rem;
}

@media (max-width: 991.98px) {
  .rp-placement-split {
    grid-template-columns: 1fr;
  }
}

.geocode-result {
  cursor: pointer;
  border: 1px solid var(--rp-border-light);
  border-radius: var(--rp-radius);
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.4rem;
  background: #fff;
  font-size: 0.88rem;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.geocode-result:hover {
  border-color: var(--rp-accent);
  background: var(--rp-accent-soft);
  transform: translateX(2px);
}

.saved-analyses {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.saved-section {
  border: 1px solid var(--rp-border-light);
  border-radius: var(--rp-radius);
  padding: 0.7rem 0.75rem 0.75rem;
  background: var(--rp-bg-subtle);
  min-width: 0;
}

.saved-section-title {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rp-text-muted);
}

.saved-item {
  min-width: 0;
}

.saved-item .geocode-result {
  margin-bottom: 0;
  width: 100%;
  min-width: 0;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

/* Keep Results rows stable — the generic geocode hover slide overlaps Delete */
.saved-item .geocode-result:hover {
  transform: none;
}

.saved-item-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.saved-load-badge {
  flex: 0 0 auto;
  align-self: center;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid transparent;
}

.saved-load-badge[data-state="visible"] {
  color: #0f5132;
  background: rgba(25, 135, 84, 0.14);
  border-color: rgba(25, 135, 84, 0.28);
}

.saved-load-badge[data-state="hidden"] {
  color: #6c757d;
  background: rgba(108, 117, 125, 0.12);
  border-color: rgba(108, 117, 125, 0.28);
}

.saved-load-badge[data-state="loaded"] {
  color: var(--rp-navy, #1b3a4b);
  background: rgba(27, 58, 75, 0.1);
  border-color: rgba(27, 58, 75, 0.22);
}

.saved-item-delete {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 650;
  align-self: stretch;
  padding-left: 0.55rem;
  padding-right: 0.55rem;
}

.saved-export-format {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0;
  padding: 0.4rem 0.5rem;
  border-radius: var(--rp-radius);
  max-width: 100%;
  min-width: 0;
  cursor: pointer;
}

.saved-export-format:hover {
  background: var(--rp-bg-subtle);
}

.saved-export-format-input {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin: 0.15rem 0 0;
  float: none;
  position: static;
}

.saved-export-format-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
  font-size: 0.9rem;
}

#savedExportModal .modal-dialog {
  max-width: 420px;
}

#savedExportModal .modal-body {
  overflow-x: hidden;
}

#savedExportModal #savedExportFormats {
  max-width: 100%;
}

#savedExportModal fieldset {
  min-width: 0;
  max-width: 100%;
}

#savedExportModal #savedExportTarget {
  max-width: 100%;
}

.rp-info-banner {
  border: 1px solid var(--rp-border-light);
  border-left: 4px solid var(--rp-accent);
  border-radius: var(--rp-radius);
  padding: 0.75rem 0.9rem;
  background: linear-gradient(90deg, var(--rp-accent-soft), transparent);
}

.rp-info-banner a {
  color: var(--rp-accent);
  font-weight: 600;
  text-decoration: none;
}

.rp-info-banner a:hover { text-decoration: underline; }

/* ── Lists / incidents ── */
.rp-list-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rp-border-light);
}

.rp-list-item:last-child { border-bottom: none; }

.rp-badge-active {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(45, 122, 79, 0.12);
  color: var(--rp-success);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ── Incidents landing ── */
.rp-landing-hero {
  position: relative;
  overflow: hidden;
  margin: 0 0 1.75rem;
  padding: 1.75rem 1.5rem;
  border-radius: var(--rp-radius-lg);
  background:
    linear-gradient(135deg, #0a0908 0%, #1a1612 48%, #2a1c12 100%);
  color: #f3eee4;
  box-shadow: var(--rp-shadow);
}
.rp-landing-hero-glow {
  position: absolute;
  inset: -40% -20% auto;
  height: 140%;
  background:
    radial-gradient(ellipse 55% 70% at 20% 40%, rgba(232, 93, 4, 0.35), transparent 60%),
    radial-gradient(ellipse 40% 50% at 85% 20%, rgba(240, 180, 41, 0.18), transparent 55%);
  pointer-events: none;
  animation: rp-landing-ember 8s ease-in-out infinite alternate;
}
@keyframes rp-landing-ember {
  from { transform: translate3d(0, 0, 0) scale(1); opacity: 0.85; }
  to { transform: translate3d(2%, -3%, 0) scale(1.06); opacity: 1; }
}
.rp-landing-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
}
.rp-landing-kicker {
  margin: 0 0 0.35rem;
  font-family: var(--rp-font-brand);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f0b429;
}
.rp-landing-title {
  margin: 0;
  font-family: var(--rp-font-brand);
  font-size: clamp(1.85rem, 3.5vw, 2.55rem);
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
  color: #f3eee4;
}
.rp-landing-hero-actions .btn-accent {
  box-shadow: 0 0 0 1px rgba(240, 180, 41, 0.25), 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* ── Dashboard summary tiles ── */
.rp-dash-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.rp-dash-tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  background: var(--rp-panel);
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius);
  box-shadow: var(--rp-shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
a.rp-dash-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--rp-shadow);
  border-color: var(--rp-mod-accent, var(--rp-accent));
}
.rp-dash-tile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 2.35rem;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.6rem;
  font-size: 1.15rem;
  background: var(--rp-mod-accent-soft, var(--rp-accent-soft));
  color: var(--rp-mod-accent, var(--rp-accent));
}
.rp-dash-tile-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.rp-dash-tile-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.05;
  color: var(--rp-navy);
}
.rp-dash-tile-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--rp-text-muted);
}
.rp-dash-tile.is-zero { opacity: 0.62; }
.rp-dash-tile.is-warn {
  border-color: rgba(232, 93, 4, 0.45);
  background: linear-gradient(180deg, #fff8f0 0%, var(--rp-panel) 100%);
}
.rp-dash-tile.is-warn .rp-dash-tile-value { color: var(--rp-accent-hover); }

/* ── Dashboard resume card ── */
.rp-dash-resume {
  margin-bottom: 1.5rem;
  padding: 1.1rem 1.25rem 1.25rem;
  background: var(--rp-panel);
  border: 1px solid var(--rp-border);
  border-left: 4px solid var(--rp-gold);
  border-radius: var(--rp-radius-lg);
  box-shadow: var(--rp-shadow);
}
.rp-dash-resume-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.9rem;
}
.rp-dash-resume-name {
  margin: 0;
  font-family: var(--rp-font-brand);
  font-size: 1.6rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--rp-navy);
  line-height: 1.1;
}
.rp-dash-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.rp-dash-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--rp-border);
  background: var(--rp-bg-subtle);
  color: var(--rp-text);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.rp-dash-shortcut .rp-icon {
  color: var(--rp-mod-accent, var(--rp-accent));
  width: 1.05em;
  height: 1.05em;
}
.rp-dash-shortcut:hover,
.rp-dash-shortcut:focus-visible {
  background: var(--rp-mod-accent-soft, var(--rp-accent-soft));
  border-color: var(--rp-mod-accent, var(--rp-accent));
  color: var(--rp-navy);
  outline: none;
}

.rp-landing-list {
  background: var(--rp-panel);
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius-lg);
  box-shadow: var(--rp-shadow);
  overflow: hidden;
}
.rp-landing-list-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--rp-border-light);
  background: var(--rp-bg-subtle);
}
.rp-landing-list-icon {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--rp-accent);
}
.rp-landing-list-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--rp-navy);
}
.rp-landing-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--rp-accent-soft);
  color: var(--rp-accent);
  font-size: 0.75rem;
  font-weight: 700;
}

.rp-landing-rows {
  display: flex;
  flex-direction: column;
}
.rp-landing-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  padding: 1.05rem 1.25rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--rp-border-light);
  border-left: 3px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.rp-landing-row:last-child { border-bottom: none; }
.rp-landing-row:hover {
  background: var(--rp-bg-subtle);
  border-left-color: var(--rp-accent);
  transform: translateX(2px);
}
.rp-landing-row.is-active {
  background: rgba(232, 93, 4, 0.06);
  border-left-color: var(--rp-gold);
}
.rp-landing-row-main { min-width: 0; flex: 1 1 14rem; }
.rp-landing-row-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}
.rp-landing-row-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--rp-navy);
}
.rp-landing-row-desc {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: var(--rp-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rp-landing-row-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.rp-landing-role {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.rp-landing-role-owner {
  background: rgba(240, 180, 41, 0.18);
  color: #8a5a00;
}
.rp-landing-role-editor {
  background: var(--rp-accent-soft);
  color: var(--rp-accent-hover);
}
.rp-landing-role-viewer {
  background: #e2d8c8;
  color: var(--rp-navy-muted);
}
.rp-landing-open {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--rp-accent);
}
.rp-landing-open .rp-icon {
  transition: transform 0.18s ease;
}
.rp-landing-row:hover .rp-landing-open .rp-icon {
  transform: translateX(3px);
}

.rp-landing-empty {
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.rp-landing-empty-title {
  margin: 0 0 0.35rem;
  font-family: var(--rp-font-brand);
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--rp-navy);
}
.rp-landing-empty-sub {
  margin: 0 0 1.1rem;
  color: var(--rp-text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .rp-landing-hero-glow,
  .rp-landing-row {
    animation: none;
    transition: none;
  }
}

/* ── Modal ── */
.modal-content {
  border: none;
  border-radius: var(--rp-radius-lg);
  box-shadow: var(--rp-shadow-lg);
}

.modal-header {
  background: var(--rp-bg-subtle);
  border-bottom: 1px solid var(--rp-border-light);
  padding: 1rem 1.25rem;
}

.modal-title {
  font-weight: 700;
  color: var(--rp-navy);
}

.modal-footer {
  background: var(--rp-bg-subtle);
  border-top: 1px solid var(--rp-border-light);
}

/* ── Auth pages ── */
.rp-auth-page {
  background: var(--rp-navy);
  min-height: 100vh;
}

.rp-auth-layout {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}

@media (min-width: 900px) {
  .rp-auth-layout { grid-template-columns: 1fr 1fr; }
}

.rp-auth-aside {
  display: none;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 42%, rgba(232, 93, 4, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 70% 80%, rgba(240, 180, 41, 0.12) 0%, transparent 50%),
    linear-gradient(165deg, #0a0908 0%, #1a1410 45%, #2a1a12 100%);
  padding: 3rem;
  color: #fff;
  align-items: center;
  justify-content: center;
}

@media (min-width: 900px) {
  .rp-auth-aside { display: flex; }
}

.rp-auth-aside-glow {
  position: absolute;
  inset: 20% 15% 30%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 93, 4, 0.28) 0%, transparent 70%);
  filter: blur(40px);
  animation: rp-auth-glow 8s ease-in-out infinite alternate;
  pointer-events: none;
}

.rp-auth-aside-mesh {
  position: absolute;
  inset: -10%;
  opacity: 0.18;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 27px,
      rgba(243, 238, 228, 0.07) 27px,
      rgba(243, 238, 228, 0.07) 28px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 27px,
      rgba(243, 238, 228, 0.05) 27px,
      rgba(243, 238, 228, 0.05) 28px
    );
  mask-image: radial-gradient(ellipse 65% 55% at 50% 45%, #000 20%, transparent 75%);
  animation: rp-auth-mesh 18s linear infinite;
  pointer-events: none;
}

@keyframes rp-auth-glow {
  from { opacity: 0.55; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1.08); }
}

@keyframes rp-auth-mesh {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-14px, -14px, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .rp-auth-aside-glow,
  .rp-auth-aside-mesh { animation: none; }
}

.rp-auth-aside-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 22rem;
}

.rp-auth-logo {
  margin-bottom: 0;
}

.rp-auth-logo-img {
  display: block;
  width: min(17.5rem, 100%);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.45));
  animation: rp-auth-logo-in 0.9s ease-out both;
}

@keyframes rp-auth-logo-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .rp-auth-logo-img { animation: none; }
}

.rp-auth-logo-mobile {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.rp-auth-logo-mobile .rp-auth-logo-img {
  width: 8.5rem;
  animation: none;
  filter: none;
}

@media (min-width: 992px) {
  .rp-auth-logo-mobile { display: none; }
}

.rp-auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  background: var(--rp-bg);
}

.rp-auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: var(--rp-radius-lg);
  padding: 2rem;
  box-shadow: var(--rp-shadow-lg);
  border: 1px solid var(--rp-border-light);
}

.rp-auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rp-navy);
  margin-bottom: 0.35rem;
}

.rp-auth-card:not(:has(.rp-auth-subtitle)) .rp-auth-title {
  margin-bottom: 1.5rem;
}

.rp-auth-subtitle {
  color: var(--rp-text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.rp-auth-footer {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--rp-text-muted);
}

.rp-auth-footer a {
  color: var(--rp-accent);
  font-weight: 600;
  text-decoration: none;
}

.rp-auth-footer a:hover { text-decoration: underline; }

/* ── Alerts ── */
.alert {
  border: none;
  border-radius: var(--rp-radius);
  font-size: 0.9rem;
}

.alert-danger {
  background: rgba(184, 58, 58, 0.1);
  color: var(--rp-danger);
}

.alert-info {
  background: rgba(42, 63, 74, 0.08);
  color: var(--rp-navy);
}

/* ── Footer ── */
.rp-footer {
  margin-top: auto;
  padding: 1.25rem 0;
  border-top: 1px solid var(--rp-border-light);
  background: rgba(255, 255, 255, 0.6);
}

.rp-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-size: 0.82rem;
  color: var(--rp-text-muted);
}

.rp-footer-inner a {
  color: var(--rp-accent);
  text-decoration: none;
  font-weight: 600;
}

.rp-footer-inner a:hover { text-decoration: underline; }

.rp-footer-sep { opacity: 0.4; }

.rp-footer-brand {
  font-family: var(--rp-font-brand);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rp-charcoal);
}

.rp-footer-brand .rp-brand-fireguy,
.rp-footer-brand .rp-brand-pipe {
  color: var(--rp-charcoal);
}

.rp-footer-brand .rp-brand-product {
  color: var(--rp-accent);
}

/* ── Section labels ── */
.rp-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rp-text-muted);
  margin-bottom: 0.5rem;
}

hr.rp-divider {
  border: none;
  border-top: 1px solid var(--rp-border-light);
  margin: 1rem 0;
  opacity: 1;
}

/* ── Preset list ── */
.rp-preset-list {
  display: flex;
  flex-direction: column;
}

.rp-preset-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--rp-border-light);
  transition: background 0.15s ease;
}

.rp-preset-item:last-child { border-bottom: none; }

.rp-preset-item:hover {
  background: rgba(232, 93, 4, 0.04);
}

.rp-preset-item.is-active {
  background: var(--rp-accent-soft);
  box-shadow: inset 3px 0 0 var(--rp-accent);
}

.rp-preset-item-main {
  min-width: 0;
  flex: 1;
}

.rp-preset-name {
  font-weight: 700;
  color: var(--rp-navy);
  margin-bottom: 0.35rem;
  line-height: 1.25;
}

.rp-preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
}

.rp-preset-chip {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--rp-navy-muted);
  background: var(--rp-cream);
  border: 1px solid var(--rp-border);
  border-radius: 0.35rem;
  line-height: 1.3;
}

.rp-preset-item.is-active .rp-preset-chip {
  background: #fffdf9;
  border-color: rgba(232, 93, 4, 0.25);
}

.rp-preset-notes {
  font-size: 0.82rem;
  color: var(--rp-text-muted);
  margin-bottom: 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rp-preset-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  font-size: 0.78rem;
  color: var(--rp-text-muted);
}

.rp-preset-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  flex-shrink: 0;
}

.rp-preset-actions form {
  margin: 0;
}

.rp-preset-delete {
  color: var(--rp-danger) !important;
  text-decoration: none;
  padding: 0.15rem 0.35rem;
}

.rp-preset-delete:hover {
  text-decoration: underline;
}

.rp-preset-empty {
  padding: 1.5rem 1.15rem;
  color: var(--rp-text-muted);
}

.rp-preset-hint-card {
  border-style: dashed;
  background: rgba(255, 253, 249, 0.7);
}

@media (max-width: 575px) {
  .rp-preset-item {
    flex-direction: column;
  }
  .rp-preset-actions {
    flex-direction: row;
    align-items: center;
    width: 100%;
  }
}

@media (max-width: 991px) {
  body.rp-map-page {
    height: auto;
    max-height: none;
    overflow: auto;
  }

  .rp-map-layout {
    overflow: visible;
  }

  .rp-sidebar {
    max-height: 45vh;
  }

  .rp-map-column {
    min-height: 50vh;
  }

  .rp-map-workspace {
    min-height: 50vh;
  }

  .rp-map-pane #map,
  .rp-map-layout #map,
  #map {
    position: absolute;
    inset: 0;
    min-height: 0;
  }

  .rp-map-pane {
    min-height: 50vh;
  }
}

/* ── Incident detail page ── */
body.rp-incident-page .rp-main {
  padding-top: 0.15rem;
  padding-bottom: 2rem;
}
.rp-incident-tabs {
  gap: 0.15rem;
  border-bottom: 1px solid var(--rp-border);
  margin-bottom: 0.65rem;
}
.rp-integrations-intro {
  max-width: 42rem;
  font-size: 0.9rem;
  line-height: 1.45;
  margin-top: 0.15rem;
}
.rp-incident-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--rp-text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0.5rem 0.5rem 0 0;
  padding: 0.6rem 0.85rem;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.rp-incident-tabs .nav-link .rp-icon {
  width: 1.1em;
  height: 1.1em;
  opacity: 0.55;
  transition: opacity 0.15s, color 0.15s;
}
.rp-incident-tabs .nav-link:hover {
  color: var(--rp-navy);
  background: var(--rp-mod-accent-soft, var(--rp-accent-soft));
  border-color: transparent;
}
.rp-incident-tabs .nav-link:hover .rp-icon {
  opacity: 1;
  color: var(--rp-mod-accent, var(--rp-accent));
}
.rp-incident-tabs .nav-link.active {
  color: var(--rp-mod-accent, var(--rp-flame));
  background: var(--rp-mod-accent-soft, var(--rp-accent-soft));
  border-bottom-color: var(--rp-mod-accent, var(--rp-flame));
}
.rp-incident-tabs .nav-link.active .rp-icon {
  opacity: 1;
  color: var(--rp-mod-accent, var(--rp-flame));
}

/* ── Segmented sub-view switchers ── */
.rp-seg {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  background: var(--rp-bg-subtle);
  border: 1px solid var(--rp-border);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(60, 45, 25, 0.06);
}
.rp-seg > .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: none;
  background: transparent;
  color: var(--rp-text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.32rem 0.8rem;
  min-height: 0;
  box-shadow: none;
  transition: background 0.15s, color 0.15s;
}

/* Undo Bootstrap's grouped-button seams — every pill is standalone here.
   Selectors are deliberately more specific than .btn-group's own radius rules. */
.rp-seg.btn-group > .btn,
.rp-seg.btn-group > .btn:not(:last-child):not(.dropdown-toggle),
.rp-seg.btn-group > .btn:nth-child(n + 3),
.rp-seg.btn-group > :not(.btn-check) + .btn {
  margin: 0;
  border-radius: 999px;
}
.rp-seg > .btn .rp-icon {
  width: 1.05em;
  height: 1.05em;
  margin-right: 0;
  opacity: 0.6;
}
.rp-seg > .btn:hover,
.rp-seg > .btn:focus-visible {
  background: var(--rp-mod-accent-soft, var(--rp-accent-soft));
  color: var(--rp-navy);
  outline: none;
}
/* Active thumb — covers both .active buttons and radio-driven (.btn-check) groups */
.rp-seg > .btn.active,
.rp-seg.btn-group > .btn.btn-outline-secondary.active,
.rp-seg.btn-group > .btn-check:checked + .btn {
  background: var(--rp-mod-accent, var(--rp-accent));
  color: #fff;
  box-shadow: var(--rp-shadow-sm);
}
.rp-seg > .btn.active .rp-icon { opacity: 1; }

.rp-seg.flex-wrap { flex-wrap: wrap; }

@media (max-width: 575.98px) {
  .rp-seg { border-radius: 0.75rem; flex-wrap: wrap; }
  .rp-seg > .btn { flex: 1 1 auto; justify-content: center; }
}
.rp-incident-table {
  font-size: 0.85rem;
}
.rp-incident-table th {
  white-space: nowrap;
  font-weight: 600;
  color: var(--rp-navy);
}
.rp-incident-table .btn-sm {
  vertical-align: middle;
}
.rp-checkout-kit-summary {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 0.75rem;
}
.rp-checkout-kit-summary .table {
  margin-bottom: 0;
}
.rp-checkout-quick-list .list-group-item {
  border-color: rgba(0, 0, 0, 0.08);
}
.rp-checkout-return-row {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 0.65rem;
  padding: 0.45rem 0.75rem;
}
.rp-checkout-return-title {
  line-height: 1.25;
  font-size: 0.95rem;
}
.rp-checkout-return-who {
  line-height: 1.25;
  font-size: 0.875rem;
  margin-bottom: 0.15rem;
}
.rp-checkout-return-who .text-muted {
  line-height: 1.2;
}
.rp-checkout-return-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  gap: 0.25rem;
}
.rp-checkout-return-btn {
  margin-top: auto;
  padding: 0.35rem 0.85rem;
  font-size: 0.95rem;
  line-height: 1.2;
}
.rp-checkout-return-bundle {
  border-left: 3px solid var(--rp-flame);
}
.rp-checkout-return-acc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}
.rp-checkout-return-acc-checks .form-check {
  padding-left: 1.6rem;
}
.rp-checkout-return-acc-checks .form-check-label {
  font-size: 0.9rem;
}
/* The whole pill returns the item, so it reads and behaves as one button. */
.rp-checkout-acc-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  min-width: 0;
  max-width: 100%;
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 0.35rem;
  background: rgba(0, 0, 0, 0.04);
  color: #4a453e;
  font-size: 0.8rem;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}
.rp-checkout-acc-pill:hover,
.rp-checkout-acc-pill:focus-visible {
  background: rgba(200, 90, 30, 0.1);
  border-color: var(--rp-flame);
}
.rp-checkout-acc-pill-main {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.3rem;
  line-height: 1.25;
}
.rp-checkout-acc-pill-type {
  color: #6d675e;
}
.rp-checkout-acc-pill-sub {
  color: #7a736a;
  font-size: 0.72rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
/* The cue only appears on hover so the list stays quiet at rest. */
.rp-checkout-acc-pill-act {
  margin-top: 0.1rem;
  color: var(--rp-flame);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0;
}
.rp-checkout-acc-pill:hover .rp-checkout-acc-pill-act,
.rp-checkout-acc-pill:focus-visible .rp-checkout-acc-pill-act {
  opacity: 1;
}
.rp-checkout-kit-band-header td {
  padding-top: 0.65rem !important;
  padding-bottom: 0.35rem !important;
  border-bottom: none;
  background: transparent;
}
.rp-checkout-kit-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #e8e2d8;
  color: #3a342c;
}
.rp-checkout-kit-band-a > td {
  background: rgba(60, 90, 70, 0.06);
}
.rp-checkout-kit-band-b > td {
  background: rgba(70, 90, 120, 0.06);
}
.rp-checkout-kit-band-a:hover > td,
.rp-checkout-kit-band-b:hover > td {
  filter: brightness(0.97);
}
#checkoutReturnSearch,
#checkoutOutSearch,
#issueSearch {
  font-size: 1.1rem;
}

/* Inventory — merged equipment list */
.rp-inv-name {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  min-width: 0;
}
.rp-inv-name-child {
  padding-left: 1.35rem;
}
.rp-inv-toggle {
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  line-height: 1;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 0.3rem;
  background: #fff;
  color: #3a342c;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
.rp-inv-toggle:hover {
  background: #f1ede6;
}
.rp-inv-toggle.is-open {
  background: #e8e2d8;
}
.rp-inv-toggle-spacer {
  flex: 0 0 auto;
  width: 1.35rem;
}
.rp-inv-row-kit > td {
  background: rgba(60, 90, 70, 0.05);
}
.rp-inv-row-child > td {
  background: rgba(0, 0, 0, 0.015);
}
.rp-inv-table tbody tr:hover > td {
  filter: brightness(0.98);
}
/* Rows open the item detail window; the action cell keeps its own cursor. */
.rp-inv-row[data-row-detail] {
  cursor: pointer;
}
.rp-inv-row[data-row-detail]:hover > td {
  background-color: rgba(60, 90, 70, 0.09);
}
.rp-inv-row[data-row-detail] > td:last-child {
  cursor: default;
}
.rp-inv-table th:last-child,
.rp-inv-table td.rp-inv-actions {
  text-align: right;
}
.rp-inv-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rp-text-muted, #6b6258);
  margin-bottom: 0.4rem;
}
.rp-inv-return-acc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.3rem 0;
}
.rp-inv-return-acc-child {
  padding-left: 0.85rem;
  border-left: 2px solid rgba(0, 0, 0, 0.08);
  margin-left: 0.15rem;
}
.rp-inv-acc-cond {
  width: auto;
  min-width: 7rem;
  flex: 0 0 auto;
}
.rp-inv-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.5rem 1rem;
  margin: 0;
}
.rp-inv-facts dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--rp-text-muted, #6b6258);
}
.rp-inv-facts dd {
  margin: 0;
  font-size: 0.95rem;
}
/* A long history scrolls on its own so it cannot stretch the detail window. */
.rp-inv-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  max-height: 16rem;
  overflow-y: auto;
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.4rem;
}
.rp-inv-timeline .rp-inv-event:last-child {
  border-bottom: none;
}
.rp-inv-event {
  display: flex;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}
.rp-inv-event:last-child {
  border-bottom: none;
}
.rp-inv-event-when {
  flex: 0 0 6.5rem;
  font-size: 0.8rem;
  color: var(--rp-text-muted, #6b6258);
  white-space: nowrap;
}
.rp-inv-event-body {
  min-width: 0;
  font-size: 0.9rem;
}

/* Inventory History */
.rp-hist-toolbar .rp-seg {
  flex-wrap: wrap;
}
.rp-hist-scroll {
  max-height: min(70vh, 40rem);
  overflow: auto;
}
.rp-hist-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--rp-panel, #fffefc);
  box-shadow: 0 1px 0 var(--rp-border-light);
}
.rp-hist-table tbody tr:hover > td {
  background: rgba(15, 118, 110, 0.05);
}
.rp-hist-empty {
  padding: 1.75rem 1rem;
  text-align: center;
  color: var(--rp-text-muted);
  font-size: 0.92rem;
}
.rp-hist-actions {
  flex-wrap: nowrap;
}
.rp-hist-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.2;
}
.rp-hist-pill.is-out {
  background: rgba(161, 98, 7, 0.14);
  color: #8a5406;
}
.rp-hist-pill.is-ok {
  background: rgba(45, 122, 79, 0.14);
  color: #1f6b42;
}
.rp-hist-pill.is-issue {
  background: rgba(184, 58, 58, 0.14);
  color: #8f2e2e;
}

/* Inventory Waybill */
.rp-waybill-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  align-items: start;
}
@media (min-width: 992px) {
  .rp-waybill-layout {
    grid-template-columns: minmax(14rem, 17.5rem) minmax(0, 1fr);
    gap: 1rem;
  }
}
.rp-waybill-list {
  max-height: min(70vh, 36rem);
  overflow: auto;
}
.rp-waybill-list-item {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "date dest"
    "meta meta";
  gap: 0.1rem 0.65rem;
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: none;
  border-bottom: 1px solid var(--rp-border-light);
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.rp-waybill-list-item:hover {
  background: rgba(15, 118, 110, 0.06);
}
.rp-waybill-list-item.is-active {
  background: rgba(15, 118, 110, 0.12);
  box-shadow: inset 3px 0 0 var(--rp-mod-radio);
}
.rp-waybill-list-date {
  grid-area: date;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--rp-navy-muted);
  white-space: nowrap;
}
.rp-waybill-list-dest {
  grid-area: dest;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.25;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rp-waybill-list-meta {
  grid-area: meta;
  font-size: 0.72rem;
  color: var(--rp-text-muted);
}
.rp-waybill-status-pill {
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
button.rp-waybill-status-pill {
  cursor: pointer;
}
.rp-waybill-status-pill.is-created { background: #6b7280; }
.rp-waybill-status-pill.is-shipped { background: #2563eb; }
.rp-waybill-status-pill.is-delivered { background: #15803d; }
.rp-waybill-status-pill.is-cancelled { background: #9a3412; }

.rp-line-order-row {
  cursor: pointer;
}
.rp-line-order-row:hover {
  background: color-mix(in srgb, var(--rp-accent, #c45c26) 6%, transparent);
}
.rp-line-order-status-pill {
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
button.rp-line-order-status-pill {
  cursor: pointer;
}
button.rp-line-order-status-pill:hover,
button.rp-line-order-status-pill:focus-visible {
  filter: brightness(1.08);
}
.rp-line-order-status-pill.is-new { background: #6b7280; }
.rp-line-order-status-pill.is-ordered { background: #2563eb; }
.rp-line-order-status-pill.is-delivered { background: #15803d; }
.rp-line-order-status-pill.is-cancelled { background: #9a3412; }
.rp-line-order-form .rp-kit-section {
  margin-bottom: 1rem;
}
.rp-waybill-list-empty {
  padding: 1.25rem 1rem;
  text-align: center;
  color: var(--rp-text-muted);
  font-size: 0.88rem;
}
.rp-waybill-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}
.rp-waybill-panel {
  border-radius: var(--rp-radius, 0.75rem);
  border: 1px solid var(--rp-border-light);
  background: var(--rp-panel, #fffefc);
  overflow: hidden;
  box-shadow: var(--rp-shadow-sm);
}
.rp-waybill-panel-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid rgba(26, 22, 18, 0.08);
}
.rp-waybill-panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.4rem;
  flex: 0 0 auto;
}
.rp-waybill-panel-icon .rp-icon {
  width: 1rem;
  height: 1rem;
}
.rp-waybill-panel-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 750;
}
.rp-waybill-panel-body {
  padding: 0.85rem;
}
.rp-waybill-panel .form-label {
  margin-bottom: 0.15rem;
  font-size: 0.75rem;
  font-weight: 650;
}
.rp-waybill-panel--ship {
  border-color: rgba(15, 118, 110, 0.28);
  border-left: 3px solid var(--rp-mod-radio);
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.06) 0%, rgba(255, 254, 252, 0.96) 4.5rem), var(--rp-panel);
}
.rp-waybill-panel--ship .rp-waybill-panel-head {
  background: rgba(15, 118, 110, 0.08);
}
.rp-waybill-panel--ship .rp-waybill-panel-icon {
  background: rgba(15, 118, 110, 0.16);
  color: #0f766e;
}
.rp-waybill-panel--ship .rp-waybill-panel-title {
  color: #0b5f58;
}
.rp-waybill-panel--recv {
  border-color: rgba(29, 78, 216, 0.22);
  border-left: 3px solid var(--rp-mod-roster);
  background: linear-gradient(180deg, rgba(29, 78, 216, 0.06) 0%, rgba(255, 254, 252, 0.96) 4.5rem), var(--rp-panel);
}
.rp-waybill-panel--recv .rp-waybill-panel-head {
  background: rgba(29, 78, 216, 0.07);
}
.rp-waybill-panel--recv .rp-waybill-panel-icon {
  background: rgba(29, 78, 216, 0.14);
  color: #1d4ed8;
}
.rp-waybill-panel--recv .rp-waybill-panel-title {
  color: #1e3a8a;
}
.rp-waybill-panel--hazmat {
  border-color: rgba(190, 18, 60, 0.22);
  border-left: 3px solid var(--rp-mod-logs);
  background: linear-gradient(180deg, rgba(190, 18, 60, 0.05) 0%, rgba(255, 254, 252, 0.96) 4.5rem), var(--rp-panel);
}
.rp-waybill-panel--hazmat .rp-waybill-panel-head {
  background: rgba(190, 18, 60, 0.07);
}
.rp-waybill-panel--hazmat .rp-waybill-panel-icon {
  background: rgba(190, 18, 60, 0.14);
  color: #be123c;
}
.rp-waybill-panel--hazmat .rp-waybill-panel-title {
  color: #9f1239;
}
.rp-waybill-panel--lines {
  border-color: rgba(161, 98, 7, 0.24);
  border-left: 3px solid var(--rp-mod-batteries);
  background: linear-gradient(180deg, rgba(161, 98, 7, 0.06) 0%, rgba(255, 254, 252, 0.96) 4.5rem), var(--rp-panel);
}
.rp-waybill-panel--lines .rp-waybill-panel-head {
  background: rgba(161, 98, 7, 0.08);
}
.rp-waybill-panel--lines .rp-waybill-panel-icon {
  background: rgba(161, 98, 7, 0.15);
  color: #8a5406;
}
.rp-waybill-panel--lines .rp-waybill-panel-title {
  color: #7a4a08;
}
.rp-waybill-lines-toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}
.rp-waybill-add {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.9rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid rgba(161, 98, 7, 0.2);
  border-radius: 0.55rem;
  background: rgba(161, 98, 7, 0.05);
}
.rp-waybill-add-head .form-label {
  margin-bottom: 0.25rem;
}
.rp-waybill-kit-picker {
  max-height: 11.5rem;
  overflow: auto;
  border: 1px solid var(--rp-border-light);
  border-radius: 0.45rem;
  background: var(--rp-panel, #fffefc);
}
.rp-waybill-kit-row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid rgba(26, 22, 18, 0.06);
  cursor: pointer;
}
.rp-waybill-kit-row:last-child {
  border-bottom: none;
}
.rp-waybill-kit-row:hover {
  background: rgba(15, 118, 110, 0.06);
}
.rp-waybill-kit-row.is-blocked {
  opacity: 0.72;
  cursor: not-allowed;
  background: rgba(180, 83, 9, 0.06);
}
.rp-waybill-kit-row.is-blocked:hover {
  background: rgba(180, 83, 9, 0.08);
}
.rp-waybill-kit-row.is-blocked .rp-waybill-kit-sub {
  color: #9a3412;
}
.rp-waybill-kit-row input {
  margin-top: 0.2rem;
  flex: 0 0 auto;
}
.rp-waybill-kit-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}
.rp-waybill-kit-name {
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.25;
}
.rp-waybill-kit-sub {
  font-size: 0.72rem;
  color: var(--rp-text-muted);
}
.rp-waybill-kit-empty {
  padding: 0.85rem 0.75rem;
  text-align: center;
  color: var(--rp-text-muted);
  font-size: 0.85rem;
}
.rp-waybill-lines-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
@media (min-width: 768px) {
  .rp-waybill-lines-toolbar {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr) auto;
    align-items: end;
  }
}
.rp-waybill-lines-table .rp-wb-nfes,
.rp-waybill-lines-table .rp-wb-prop {
  min-width: 4.25rem;
}
.rp-waybill-lines-table .rp-wb-desc {
  min-width: 8rem;
}
.rp-waybill-lines-table .rp-wb-qty {
  max-width: 4rem;
}
.rp-waybill-lines-table .rp-wb-ui {
  max-width: 3.5rem;
}
.rp-waybill-lines-table .rp-wb-wt {
  max-width: 4.5rem;
}
.rp-waybill-lines-table .rp-wb-num {
  width: 2rem;
  color: var(--rp-text-muted);
  font-variant-numeric: tabular-nums;
}

/* Radio log — operator + live */
.rp-radio-logs-table {
  table-layout: fixed;
  width: 100%;
}
.rp-radio-logs-table .rp-radio-col-when { width: 7.5rem; }
.rp-radio-logs-table .rp-radio-col-sta { width: 4.5rem; }
.rp-radio-logs-table .rp-radio-col-traffic { width: auto; }
.rp-radio-logs-table .rp-radio-col-code { width: 3.25rem; }
.rp-radio-logs-table .rp-radio-col-init { width: 3.25rem; }
.rp-radio-logs-table .rp-radio-col-actions { width: 7.5rem; }
.rp-radio-logs-table td.rp-radio-col-traffic {
  white-space: normal;
  word-break: break-word;
}
.rp-radio-audit-list {
  max-height: min(70vh, 32rem);
}
.rp-radio-audit-row {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.rp-radio-audit-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.1rem 0.4rem;
  border-radius: 0.25rem;
}
.rp-radio-audit-create { background: #e8f0e8; color: #2d5a2d; }
.rp-radio-audit-edit { background: #f5ecd8; color: #7a5a12; }
.rp-radio-audit-delete { background: #f5e0de; color: #8a2b22; }
.rp-radio-audit-traffic,
.rp-radio-audit-change {
  margin-top: 0.35rem;
  font-size: 0.9rem;
}
.rp-radio-audit-reason {
  margin-top: 0.35rem;
  font-size: 0.85rem;
}
.rp-radio-log-form [data-radio-code].active {
  background: var(--rp-navy, #1c2b3a);
  color: #fff;
  border-color: var(--rp-navy, #1c2b3a);
}
.rp-radio-log-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-height: 2.75rem;
}
.rp-radio-log-title {
  margin: 0;
  position: relative;
  z-index: 1;
}
.rp-radio-log-clock {
  position: relative;
  z-index: 1;
  margin-left: auto;
}
.rp-radio-iwi-timer {
  display: none;
  position: relative;
  z-index: 1;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  color: #9a1f1f;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.rp-radio-iwi-banner {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1;
  color: #9a1f1f;
  pointer-events: none;
  z-index: 0;
}
.rp-radio-iwi-notify {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  padding: 0.2rem 0.45rem;
  border-radius: 0.35rem;
  background: rgba(184, 58, 58, 0.18);
  border: 1px solid rgba(154, 31, 31, 0.35);
  color: #6b1f1f;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.rp-radio-iwi-notify.d-none {
  display: none !important;
}
.rp-radio-iwi-notify:not(.d-none) + .rp-radio-log-clock {
  margin-left: 0;
}
.rp-radio-iwi-notify-label {
  letter-spacing: 0.02em;
}
.rp-radio-iwi-notify .btn {
  padding: 0.1rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}
.rp-roster-iwi-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.35rem;
  border-radius: 0.25rem;
  background: rgba(184, 58, 58, 0.18);
  color: #8a2424;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  vertical-align: middle;
  line-height: 1.2;
}

.rp-roster-row {
  cursor: pointer;
}
.rp-roster-row:hover {
  background: rgba(232, 93, 4, 0.06);
}

.rp-roster-asg-pill,
.rp-roster-status-pill {
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  color: #fff;
}
button.rp-roster-status-pill {
  cursor: inherit;
  cursor: pointer;
}
button.rp-roster-status-pill:hover,
button.rp-roster-status-pill:focus-visible {
  filter: brightness(1.08);
  outline: none;
}

.rp-roster-asg-pill.tone-coml { background: #1f4e79; }
.rp-roster-asg-pill.tone-incm { background: #2f6f9f; }
.rp-roster-asg-pill.tone-comt { background: #3d6b4f; }
.rp-roster-asg-pill.tone-rado { background: #6b4f2a; }
.rp-roster-asg-pill.tone-h0 { background: #5a6a7a; }
.rp-roster-asg-pill.tone-h1 { background: #6a4c7a; }
.rp-roster-asg-pill.tone-h2 { background: #4a6b5c; }
.rp-roster-asg-pill.tone-h3 { background: #7a5a3a; }
.rp-roster-asg-pill.tone-h4 { background: #3a5a7a; }
.rp-roster-asg-pill.tone-h5 { background: #6a3a4a; }
.rp-roster-asg-pill.tone-none { background: #8a8680; }

.rp-roster-status-pill.is-ordered { background: #6b7280; }
.rp-roster-status-pill.is-enroute { background: #2563eb; }
.rp-roster-status-pill.is-arrived { background: #15803d; }
.rp-roster-status-pill.is-demobed { background: #9a3412; }

.rp-roster-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.75rem 1rem;
  margin: 0;
}
.rp-roster-detail-grid dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--rp-muted, #6b6560);
  margin: 0;
}
.rp-roster-detail-grid dd {
  margin: 0.15rem 0 0;
  font-weight: 600;
}
.rp-radio-log-header.is-iwi {
  background: linear-gradient(180deg, #f7d4d0 0%, #efc0bb 100%);
  border-bottom-color: rgba(154, 31, 31, 0.25);
}
.rp-radio-log-header.is-iwi .rp-radio-log-title {
  display: none;
}
.rp-radio-log-header.is-iwi .rp-radio-iwi-timer {
  display: block;
}
.rp-radio-log-header.is-iwi .rp-radio-iwi-banner {
  display: block;
}
.rp-radio-log-header.is-iwi .rp-radio-log-clock {
  color: #6b2a2a !important;
  font-weight: 600;
}
.rp-radio-iwi-live-banner {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: #9a1f1f;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
  max-width: calc(100% - 8rem);
  overflow: hidden;
  text-overflow: ellipsis;
}
.rp-radio-iwi-live-banner #radioLogLiveIwiDuration {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
}
.rp-radio-live-header.is-iwi {
  background: linear-gradient(180deg, #f7d4d0 0%, #efc0bb 100%) !important;
  border-bottom-color: rgba(154, 31, 31, 0.25) !important;
}
.rp-radio-live-header.is-iwi .rp-radio-live-title {
  visibility: hidden;
}
.rp-radio-live-header.is-iwi .rp-radio-iwi-live-banner {
  display: block;
}
.rp-radio-live-header.is-iwi .rp-radio-log-clock {
  color: #6b2a2a !important;
  font-weight: 600;
}
@media (max-width: 700px) {
  .rp-radio-iwi-live-banner {
    font-size: 0.95rem;
    white-space: normal;
    max-width: calc(100% - 5rem);
  }
}
.rp-radio-iwi-btn {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.4rem 0.95rem;
  line-height: 1.1;
  border-width: 2px;
  min-width: 3.75rem;
}
.rp-radio-iwi-btn.active,
.rp-radio-iwi-btn[aria-pressed="true"] {
  background: #b83a3a;
  border-color: #b83a3a;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(184, 58, 58, 0.25);
}
.rp-radio-when-iwi {
  display: inline-block;
  background: rgba(184, 58, 58, 0.28);
  color: #6b1f1f;
  font-weight: 600;
  border-radius: 0.25rem;
  padding: 0.12rem 0.4rem;
  line-height: 1.25;
}
.rp-radio-live-row.is-iwi .rp-radio-live-time {
  background: #7a1f1f;
  color: #ffc8c0;
  font-weight: 600;
  border-radius: 0.25rem;
  padding: 0.12rem 0.4rem;
}
.rp-radio-live-status.rp-radio-live-on {
  color: #b42318;
  font-weight: 600;
}
.rp-radio-live-status.rp-radio-live-on::before {
  content: '';
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.35rem;
  border-radius: 50%;
  background: #b42318;
  vertical-align: middle;
  animation: rp-radio-pulse 1.2s ease-in-out infinite;
}
@keyframes rp-radio-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.rp-radio-live-card .rp-card-body {
  background: #141210;
}
.rp-radio-live-feed {
  min-height: 22rem;
  max-height: min(70vh, 40rem);
  overflow: auto;
  padding: 0.75rem 1rem;
  font-family: "Consolas", "SFMono-Regular", Menlo, Monaco, monospace;
  font-size: 0.92rem;
  color: #f4f0e8;
}

/* Pop-out live window — mostly full screen, feed fills the viewport */
body.rp-radio-live-popout .rp-header,
body.rp-radio-live-popout .rp-subheader,
body.rp-radio-live-popout .rp-footer,
body.rp-radio-live-popout .rp-incident-tabs,
body.rp-radio-live-popout #incidentToast,
body.rp-radio-live-popout .alert,
body.rp-radio-live-popout #tab-logs > .rp-batt-toolbar {
  display: none !important;
}
body.rp-radio-live-popout .tab-content > .tab-pane {
  display: none !important;
}
body.rp-radio-live-popout .tab-content > #tab-logs {
  display: block !important;
  opacity: 1 !important;
}
body.rp-radio-live-popout #logsViewUnit,
body.rp-radio-live-popout #logsViewOrders,
body.rp-radio-live-popout #radioLogModeOperator {
  display: none !important;
}
body.rp-radio-live-popout #logsViewRadio,
body.rp-radio-live-popout #radioLogModeLive {
  display: block !important;
}
body.rp-radio-live-popout main,
body.rp-radio-live-popout .container-fluid,
body.rp-radio-live-popout .tab-content,
body.rp-radio-live-popout #tab-logs,
body.rp-radio-live-popout #logsViewRadio,
body.rp-radio-live-popout #radioLogModeLive,
body.rp-radio-live-popout .rp-radio-live-card {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
body.rp-radio-live-popout .rp-radio-live-card {
  border-radius: 0;
  border: none;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.rp-radio-live-popout .rp-radio-live-card .rp-card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
body.rp-radio-live-popout .rp-radio-live-feed {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  height: calc(100vh - 3.25rem);
  font-size: 1.05rem;
}
body.rp-radio-live-popout .rp-radio-live-row {
  grid-template-columns: 17.5ch 5.5rem minmax(0, 1fr) auto;
  padding: 0.45rem 0;
}
.rp-radio-live-empty {
  padding: 2rem 0.5rem;
  text-align: center;
}
.rp-radio-live-row {
  display: grid;
  grid-template-columns: 17.5ch 5rem minmax(0, 1fr) auto;
  gap: 0.5rem 0.85rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  align-items: baseline;
}
.rp-radio-live-time {
  color: #9a9286;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  line-height: 1.35;
}
.rp-radio-live-sta {
  color: #f0c674;
  font-weight: 600;
  text-align: center;
  justify-self: stretch;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rp-radio-live-info { color: #f4f0e8; word-break: break-word; min-width: 0; }
.rp-radio-live-meta { color: #8a8378; white-space: nowrap; }
.rp-radio-live-draft {
  background: rgba(240, 198, 116, 0.08);
  border-left: 3px solid #f0c674;
  padding-left: 0.5rem;
  margin-left: -0.35rem;
}
.rp-radio-live-draft .rp-radio-live-info {
  color: #f0c674;
  font-style: italic;
}
.rp-radio-live-caret {
  display: inline-block;
  width: 0.45rem;
  height: 1em;
  margin-left: 0.15rem;
  background: #f0c674;
  vertical-align: text-bottom;
  animation: rp-radio-pulse 0.9s step-end infinite;
}
@media (max-width: 767.98px) {
  .rp-radio-live-row {
    grid-template-columns: 17.5ch minmax(0, 1fr);
  }
  .rp-radio-live-sta { grid-column: 2; text-align: left; }
  .rp-radio-live-info { grid-column: 1 / -1; }
  .rp-radio-live-meta { grid-column: 1 / -1; }
}
.rp-incident-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.rp-incident-status-slot {
  display: flex;
  align-items: center;
  min-height: calc(1.5em + 0.5rem + 2px);
}
.rp-card-header .btn {
  align-self: center;
  white-space: nowrap;
}
.rp-form-action-label {
  visibility: hidden;
  user-select: none;
  pointer-events: none;
}
/* Incident inline forms: keep action buttons level with inputs in the same row. */
#peopleInviteForm > [class*="col-"],
#logForm > [class*="col-"] {
  justify-content: flex-end;
}
#peopleInviteForm .btn,
#logForm #logAddBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: calc(1.5em + 0.5rem + 2px);
}
#logForm .input-group {
  flex-wrap: nowrap;
  width: 100%;
}
#logForm .input-group > .form-control {
  min-width: 0;
  flex: 1 1 auto;
}
#logForm #logNowBtn {
  flex: 0 0 auto;
  width: auto;
  min-width: 2.1rem;
  min-height: calc(1.5em + 0.5rem + 2px);
  padding: 0.2rem 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.rp-incident-minimap {
  height: 100%;
  min-height: 220px;
  border-radius: var(--rp-radius, 10px);
  border: 1px solid var(--rp-border-light);
  overflow: hidden;
  background: var(--rp-bg-subtle);
}
.rp-incident-minimap.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
}
.rp-incident-minimap.is-empty::after {
  content: 'Set latitude / longitude to preview ICP on the map';
  color: var(--rp-text-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 0 1rem;
}
.rp-overdue td {
  background: rgba(185, 28, 28, 0.08);
}
.rp-overview-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.rp-overview-form.is-readonly input,
.rp-overview-form.is-readonly textarea,
.rp-overview-form.is-readonly select:not(#incStatusSelect),
.rp-overview-form.is-readonly button {
  background-color: rgba(247, 242, 233, 0.72);
  color: var(--rp-text);
  cursor: default;
  opacity: 1;
  pointer-events: none;
}
.rp-overview-form.is-readonly .rp-overview-name-input {
  background-color: rgba(255, 254, 252, 0.72);
}
.rp-overview-form.is-readonly .rp-overview-location-map {
  pointer-events: auto;
}
#tab-overview .rp-card-body {
  padding: 1rem 1.15rem 1.15rem;
}

/* Overview hero — identity strip */
.rp-overview-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--rp-radius, 0.75rem);
  border: 1px solid rgba(232, 93, 4, 0.28);
  background:
    linear-gradient(135deg, rgba(232, 93, 4, 0.16) 0%, rgba(240, 180, 41, 0.1) 42%, rgba(255, 254, 252, 0.92) 100%),
    var(--rp-panel, #fffefc);
  padding: 1rem 1.1rem 1.05rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.rp-overview-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--rp-mod-overview) 0%, var(--rp-gold) 100%);
}
.rp-overview-hero-main {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-left: 0.35rem;
}
.rp-overview-hero-label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--rp-navy-muted, #5c5348);
}
.rp-overview-name-input {
  font-size: 1.45rem !important;
  font-weight: 700;
  line-height: 1.25;
  padding: 0.45rem 0.7rem;
  border-color: rgba(232, 93, 4, 0.28);
  background: rgba(255, 254, 252, 0.88);
  color: var(--rp-text);
}
.rp-overview-name-input:focus {
  border-color: var(--rp-mod-overview);
  box-shadow: 0 0 0 0.2rem rgba(232, 93, 4, 0.18);
}
.rp-overview-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
}
.rp-overview-status {
  display: inline-flex;
  align-items: center;
  align-self: center;
  margin-bottom: 0.1rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
  border: 1px solid transparent;
}
.rp-overview-status.is-open {
  background: rgba(45, 122, 79, 0.16);
  color: #1f6b42;
  border-color: rgba(45, 122, 79, 0.28);
}
.rp-overview-status.is-closed {
  background: rgba(92, 83, 72, 0.14);
  color: #4a433c;
  border-color: rgba(92, 83, 72, 0.28);
}
.rp-overview-status.is-archived {
  background: rgba(37, 99, 235, 0.12);
  color: #1e40af;
  border-color: rgba(37, 99, 235, 0.28);
}
.rp-overview-status.is-test {
  background: rgba(146, 64, 14, 0.14);
  color: #9a3412;
  border-color: rgba(146, 64, 14, 0.28);
}
.rp-overview-status-select {
  display: inline-flex;
  align-self: center;
  margin-bottom: 0.1rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.1;
  border: 1px solid transparent;
  width: auto;
  min-width: 7.5rem;
  cursor: pointer;
  appearance: auto;
}
.rp-overview-status-select.is-open {
  background: rgba(45, 122, 79, 0.16);
  color: #1f6b42;
  border-color: rgba(45, 122, 79, 0.28);
}
.rp-overview-status-select.is-closed {
  background: rgba(92, 83, 72, 0.14);
  color: #4a433c;
  border-color: rgba(92, 83, 72, 0.28);
}
.rp-overview-status-select.is-archived {
  background: rgba(37, 99, 235, 0.12);
  color: #1e40af;
  border-color: rgba(37, 99, 235, 0.28);
}
.rp-overview-status-select.is-test {
  background: rgba(146, 64, 14, 0.14);
  color: #9a3412;
  border-color: rgba(146, 64, 14, 0.28);
}
.rp-overview-hero-id {
  flex: 1 1 12rem;
  min-width: 11rem;
  max-width: 18rem;
}
.rp-overview-hero-when {
  flex: 0 1 11rem;
  min-width: 9.5rem;
}

/* Quiet reference band under hero */
.rp-overview-meta {
  border-radius: var(--rp-radius, 0.75rem);
  border: 1px solid var(--rp-border-light);
  background: rgba(247, 242, 233, 0.65);
  padding: 0.7rem 0.85rem;
}
.rp-overview-meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem 0.75rem;
}
@media (min-width: 768px) {
  .rp-overview-meta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
  .rp-overview-meta-desc {
    grid-column: 1 / -1;
  }
}
.rp-overview-meta .form-label {
  margin-bottom: 0.15rem;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--rp-text-muted);
}

/* Agency + location accent panels */
.rp-overview-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  align-items: stretch;
}
@media (min-width: 992px) {
  .rp-overview-split {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.28fr);
    gap: 1rem;
  }
}
.rp-overview-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: var(--rp-radius, 0.75rem);
  border: 1px solid var(--rp-border-light);
  background: var(--rp-panel, #fffefc);
  overflow: hidden;
  box-shadow: var(--rp-shadow-sm);
}
.rp-overview-panel-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(26, 22, 18, 0.08);
}
.rp-overview-panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.45rem;
  flex: 0 0 auto;
}
.rp-overview-panel-icon .rp-icon {
  width: 1.05rem;
  height: 1.05rem;
}
.rp-overview-panel-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  color: var(--rp-text);
}
.rp-overview-panel-body {
  padding: 0.85rem;
  flex: 1 1 auto;
}
.rp-overview-panel .form-label {
  margin-bottom: 0.18rem;
  font-size: 0.75rem;
  font-weight: 650;
}

.rp-overview-panel--agency {
  border-color: rgba(15, 118, 110, 0.28);
  border-left: 3px solid var(--rp-mod-radio);
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.07) 0%, rgba(255, 254, 252, 0.96) 5.5rem),
    var(--rp-panel);
}
.rp-overview-panel--agency .rp-overview-panel-head {
  background: rgba(15, 118, 110, 0.08);
}
.rp-overview-panel--agency .rp-overview-panel-icon {
  background: rgba(15, 118, 110, 0.16);
  color: #0f766e;
}
.rp-overview-panel--agency .rp-overview-panel-title {
  color: #0b5f58;
}

.rp-overview-panel--location {
  border-color: rgba(29, 78, 216, 0.24);
  border-left: 3px solid var(--rp-mod-roster);
  background:
    linear-gradient(180deg, rgba(29, 78, 216, 0.07) 0%, rgba(255, 254, 252, 0.96) 5.5rem),
    var(--rp-panel);
}
.rp-overview-panel--location .rp-overview-panel-head {
  background: rgba(29, 78, 216, 0.07);
}
.rp-overview-panel--location .rp-overview-panel-icon {
  background: rgba(29, 78, 216, 0.14);
  color: #1d4ed8;
}
.rp-overview-panel--location .rp-overview-panel-title {
  color: #1e3a8a;
}

.rp-overview-location {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  align-items: stretch;
  height: 100%;
}
@media (min-width: 992px) {
  .rp-overview-location {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.95fr);
    gap: 1rem;
  }
  .rp-overview-location-map .rp-incident-minimap {
    min-height: 100%;
  }
}
.rp-overview-location-map {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  border-radius: 0.55rem;
  overflow: hidden;
  border: 1px solid rgba(29, 78, 216, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}
.rp-overview-location-map .rp-incident-minimap {
  flex: 1 1 auto;
  width: 100%;
  min-height: 260px;
}
@media (min-width: 992px) {
  .rp-overview-location-map {
    min-height: 320px;
  }
  .rp-overview-location-map .rp-incident-minimap {
    min-height: 320px;
  }
}
@media (max-width: 575px) {
  .rp-overview-name-input {
    font-size: 1.2rem !important;
  }
  .rp-overview-hero {
    padding: 0.85rem 0.85rem 0.9rem;
  }
}
.rp-dtmf {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: rgba(26, 22, 18, 0.07);
  padding: 0.15rem 0.4rem;
  border-radius: 0.35rem;
  color: var(--rp-navy);
}
.rp-dtmf-stack {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.25rem 0.65rem;
  align-items: center;
}
.rp-dtmf-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.rp-dtmf-lbl {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--rp-text-muted, #6b7280);
}
.rp-dtmf-temp {
  opacity: 0.85;
}
.rp-logs-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.rp-logs-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 0.75rem;
}
.rp-radio-logs-pager {
  margin-top: 0;
}
.rp-logs-page-label {
  font-size: 0.82rem;
  color: var(--rp-navy-muted, #5a6a7a);
  white-space: nowrap;
}
.rp-log-entry {
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--rp-border-light);
  border-radius: var(--rp-radius, 10px);
  background: var(--rp-bg-subtle);
}
.rp-log-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
}
.rp-log-when {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--rp-navy-muted);
  white-space: nowrap;
}
.rp-log-text {
  flex: 1 1 12rem;
  min-width: 0;
  white-space: pre-wrap;
  font-size: 0.9rem;
}
.rp-log-entry.is-oneline .rp-log-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rp-log-del {
  flex: 0 0 auto;
  margin-left: auto;
}
.rp-log-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
}
.rp-repeater-marker {
  background: transparent;
  border: none;
}
.rp-repeater-marker-pin {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}
.rp-repeater-marker-pin svg {
  display: block;
  overflow: visible;
}

.rp-icp-marker {
  background: transparent;
  border: none;
}
.rp-icp-marker-pin {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}
.rp-icp-marker-pin svg {
  display: block;
  overflow: visible;
}

/* Battery intelligence (Dragon Bravo sheet bands) */
.rp-batt-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

/* Overview ops strip — tiles share the Dashboard's .rp-dash-tile styling */
.rp-ops-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.65rem;
}
.rp-ops-loc-icon {
  background: transparent !important;
  border: none !important;
}
.rp-batt-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.rp-batt-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.12rem 0.45rem;
  border-radius: 0.3rem;
  background: rgba(26, 22, 18, 0.07);
  color: var(--rp-navy);
  white-space: nowrap;
}
.rp-batt-ok,
.rp-batt-v.rp-batt-ok {
  color: #1b6b3a;
  background: rgba(27, 107, 58, 0.12);
}
.rp-batt-watch,
.rp-batt-v.rp-batt-watch {
  color: #8a6d00;
  background: rgba(240, 234, 0, 0.35);
  font-weight: 700;
}
.rp-batt-critical,
.rp-batt-v.rp-batt-critical {
  color: #8b1a1a;
  background: rgba(139, 26, 26, 0.14);
  font-weight: 700;
}
.rp-batt-sla {
  color: #fff;
  background: #7a1f1f;
}
.rp-batt-visit {
  color: #1e3a6e;
  background: rgba(30, 58, 110, 0.16);
}
.rp-batt-swap {
  color: #c44d03;
  background: rgba(232, 93, 4, 0.16);
}
.rp-batt-flags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-right: 0.35rem;
  vertical-align: middle;
}
.rp-batt-notes-cell {
  max-width: 18rem;
}
.rp-batt-notes {
  font-size: 0.85rem;
  color: var(--rp-text-muted, #6b6258);
}
.rp-batt-v {
  display: inline-block;
  min-width: 2.6rem;
  text-align: center;
  padding: 0.05rem 0.3rem;
  border-radius: 999px;
  border: 3px solid transparent;
  box-sizing: border-box;
  font-variant-numeric: tabular-nums;
}
/* Reading flags: thick pill ring; fill stays the voltage band */
.rp-batt-v.rp-batt-flag-visit,
.rp-batt-pill.rp-batt-flag-visit {
  border: 3px solid #1e5aaa;
}
.rp-batt-v.rp-batt-flag-sla,
.rp-batt-pill.rp-batt-flag-sla {
  border: 3px solid #7a1f1f;
}
.rp-batt-v.rp-batt-flag-visit.rp-batt-flag-sla,
.rp-batt-pill.rp-batt-flag-visit.rp-batt-flag-sla {
  border: 3px solid #7a1f1f;
  box-shadow: 0 0 0 3px #1e5aaa;
}
.rp-batt-pill.rp-batt-flag-visit,
.rp-batt-pill.rp-batt-flag-sla {
  background: rgba(27, 107, 58, 0.12);
  color: #1b6b3a;
  border-radius: 999px;
}
.rp-batt-ok-cell { background: rgba(27, 107, 58, 0.06); }
.rp-batt-watch-cell { background: rgba(240, 234, 0, 0.18); }
.rp-batt-critical-cell { background: rgba(139, 26, 26, 0.1); }
.rp-batt-matrix-wrap {
  max-height: 70vh;
  overflow: auto;
}
.rp-batt-matrix {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 0;
}
.rp-batt-matrix th,
.rp-batt-matrix td {
  white-space: nowrap;
  font-size: 0.82rem;
  box-sizing: border-box;
  vertical-align: middle;
}
.rp-batt-matrix thead .rp-batt-kit-row th {
  background: var(--rp-bg-subtle);
  border-bottom: none;
  padding-bottom: 0.2rem;
}
.rp-batt-matrix thead .rp-batt-metric-row th {
  background: var(--rp-bg-subtle);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--rp-navy-muted, #4a5d73);
  padding-top: 0.15rem;
  border-top: none;
}
.rp-batt-kit-head {
  min-width: 6.4rem;
}
.rp-batt-kit-loc {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--rp-text-muted);
  margin-top: 0.1rem;
  text-transform: none;
  letter-spacing: 0;
}
.rp-batt-metric-head,
.rp-batt-col-solar,
.rp-batt-col-sla {
  width: 3.4rem;
  min-width: 3.4rem;
  max-width: 3.4rem;
  text-align: center;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}
.rp-batt-matrix .rp-batt-kit-sep {
  border-left: 1px solid rgba(92, 83, 72, 0.18);
}
.rp-batt-matrix thead .rp-batt-kit-sep {
  border-left-color: rgba(92, 83, 72, 0.22);
}
.rp-batt-corner,
.rp-batt-date {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--rp-bg-subtle);
  font-weight: 600;
  min-width: 7.25rem;
  width: 7.25rem;
  font-variant-numeric: tabular-nums;
}
.rp-batt-date {
  background: var(--rp-bg, #fff);
  z-index: 1;
}
.rp-batt-empty {
  background: rgba(0, 0, 0, 0.02);
}
.rp-batt-spark {
  width: 100%;
}
.rp-batt-chart {
  width: 100%;
}
.rp-batt-chart-empty {
  padding: 1.25rem 0.5rem;
  font-size: 0.9rem;
}
.rp-batt-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin-bottom: 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--rp-text-muted, #6b6258);
}
.rp-batt-chart-key {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.rp-batt-chart-key em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  color: var(--rp-text, #1a1612);
  font-weight: 700;
}
.rp-batt-chart-key::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  flex: 0 0 auto;
}
.rp-batt-chart-key-solar::before {
  background: #2f5d8a;
  box-shadow: 0 0 0 2px rgba(47, 93, 138, 0.2);
}
.rp-batt-chart-key-sla::before {
  background: #e85d04;
  box-shadow: 0 0 0 2px rgba(232, 93, 4, 0.2);
}
.rp-batt-chart-key-visit::before {
  background: #1e5aaa;
  border-radius: 2px;
  width: 0.35rem;
  height: 0.85rem;
}
.rp-batt-chart-key-powered::before {
  background: #7a1f1f;
  border-radius: 2px;
  width: 0.55rem;
  height: 0.55rem;
}
.rp-batt-chart-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 16rem;
}
.rp-batt-chart-compact .rp-batt-chart-svg {
  max-height: 10.5rem;
}
.rp-batt-chart-compact .rp-batt-chart-legend {
  font-size: 0.72rem;
  gap: 0.4rem 0.75rem;
  margin-bottom: 0.35rem;
}
.rp-batt-chart-frame {
  fill: #fffdf9;
  stroke: var(--rp-border-light);
  stroke-width: 1;
}
.rp-batt-chart-plot {
  fill: rgba(243, 238, 228, 0.55);
}
.rp-batt-chart-band-ok {
  fill: rgba(45, 122, 79, 0.07);
}
.rp-batt-chart-band-watch {
  fill: rgba(240, 180, 41, 0.12);
}
.rp-batt-chart-band-crit {
  fill: rgba(184, 58, 58, 0.1);
}
.rp-batt-chart-grid {
  stroke: rgba(36, 30, 24, 0.07);
  stroke-width: 1;
}
.rp-batt-chart-threshold {
  stroke: rgba(36, 30, 24, 0.22);
  stroke-width: 1;
  stroke-dasharray: 4 3;
}
.rp-batt-chart-ylabel,
.rp-batt-chart-xlabel {
  fill: var(--rp-text-muted, #6b6258);
  font-size: 10px;
  font-family: var(--rp-font, system-ui, sans-serif);
}
.rp-batt-chart-ylabel {
  text-anchor: end;
}
.rp-batt-chart-xlabel {
  text-anchor: middle;
}
.rp-batt-chart-line-solar,
.rp-batt-chart-line-sla {
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rp-batt-chart-line-solar {
  stroke: #2f5d8a;
}
.rp-batt-chart-line-sla {
  stroke: #e85d04;
}
.rp-batt-chart-dot-solar {
  fill: #fffdf9;
  stroke: #2f5d8a;
  stroke-width: 1.8;
}
.rp-batt-chart-dot-sla {
  fill: #fffdf9;
  stroke: #e85d04;
  stroke-width: 1.8;
}
.rp-batt-chart-mark-visit {
  stroke: rgba(30, 90, 170, 0.35);
  stroke-width: 1.5;
  stroke-dasharray: 3 3;
}
.rp-batt-chart-mark-visit-dot {
  fill: #1e5aaa;
}
.rp-batt-chart-mark-sla {
  stroke: rgba(122, 31, 31, 0.3);
  stroke-width: 1.5;
  stroke-dasharray: 3 3;
}
.rp-batt-chart-mark-sla-dot {
  fill: #7a1f1f;
}
.rp-batt-spark-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}
.rp-batt-spark-row > span {
  flex: 0 0 3rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--rp-navy-muted, #4a5d73);
}
.rp-batt-spark-svg {
  display: block;
}
.rp-batt-msg-list {
  padding-left: 1.1rem;
  font-size: 0.85rem;
  margin: 0;
}
.rp-batt-compare-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
.rp-batt-pick {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  cursor: pointer;
}
.rp-batt-compare-charts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1rem;
}
.rp-batt-compare-card {
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--rp-border-light);
  border-radius: var(--rp-radius, 10px);
  background: linear-gradient(180deg, var(--rp-panel) 0%, var(--rp-bg-subtle) 100%);
  box-shadow: var(--rp-shadow-sm);
}
.rp-batt-alert {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--rp-border-light);
  border-radius: var(--rp-radius, 10px);
  margin-bottom: 0.65rem;
  background: var(--rp-bg-subtle);
}
.rp-batt-alert-critical {
  border-color: rgba(139, 26, 26, 0.35);
  background: rgba(139, 26, 26, 0.06);
}
.rp-batt-alert-watch {
  border-color: rgba(180, 150, 0, 0.4);
  background: rgba(240, 234, 0, 0.12);
}

/* System diagrams — NIRSC SVG preview */
.rp-diagrams-preview {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow: auto;
  max-width: 100%;
  background: #fff;
  border: 1px solid var(--rp-border-light);
  border-radius: var(--rp-radius, 10px);
  padding: 0.5rem;
}
.rp-nirsc-page {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-bottom: 1px solid var(--rp-border-light);
  padding-bottom: 0.75rem;
  margin-bottom: 0.25rem;
}
.rp-nirsc-page:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.rp-nirsc-page-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--rp-text-muted, #6b655c);
  letter-spacing: 0.02em;
}
.rp-nirsc-svg {
  width: 100%;
  height: auto;
  min-height: 420px;
  display: block;
  background: #fff;
  overflow: visible;
}
.rp-nirsc-bolts,
.rp-nirsc-bolt {
  overflow: visible;
}

@media print {
  body.rp-printing-diagrams * {
    visibility: hidden !important;
  }
  body.rp-printing-diagrams #tab-diagrams,
  body.rp-printing-diagrams #tab-diagrams * {
    visibility: visible !important;
  }
  body.rp-printing-diagrams #tab-diagrams {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    display: block !important;
    opacity: 1 !important;
  }
  body.rp-printing-diagrams .rp-card-header .btn,
  body.rp-printing-diagrams #diagramsEmpty {
    display: none !important;
  }
  @page {
    size: landscape;
    margin: 0.25in;
  }
  .rp-nirsc-svg {
    width: auto !important;
    height: 7.6in !important;
    max-width: 100% !important;
    max-height: 7.6in !important;
    margin: 0 auto;
  }
  .rp-nirsc-page {
    page-break-after: always;
    break-after: page;
    page-break-inside: avoid;
    break-inside: avoid;
    overflow: hidden;
  }
  .rp-nirsc-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }
}

/* Radio System kit / channel modals */
.rp-kit-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.rp-kit-section {
  margin: 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--rp-border-light);
  border-radius: var(--rp-radius, 0.75rem);
  background: var(--rp-bg-subtle);
}
.rp-kit-section-title {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rp-navy-muted, #5c5348);
}

/* Per-band antenna cards on the site forms — a wash of colour over the cream
   palette so VHF and UHF read apart at a glance without shouting. */
.rp-kit-section--vhf {
  border-color: rgba(167, 68, 54, 0.28);
  border-left: 3px solid rgba(167, 68, 54, 0.55);
  background: rgba(167, 68, 54, 0.045);
}
.rp-kit-section--uhf {
  border-color: rgba(50, 92, 148, 0.28);
  border-left: 3px solid rgba(50, 92, 148, 0.55);
  background: rgba(50, 92, 148, 0.045);
}
.rp-kit-section--vhf .rp-kit-section-title {
  color: #8c3a2c;
}
.rp-kit-section--uhf .rp-kit-section-title {
  color: #2c5180;
}
.rp-band-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
}
.rp-band-card-head .form-check {
  margin-left: auto;
}
.rp-band-card [data-band-field="frequency_mhz"].is-invalid,
.rp-band-card [data-band-field="input_frequency_mhz"].is-invalid {
  border-color: var(--rp-danger, #842029);
}
.rp-band-card--off .rp-band-card-body {
  display: none;
}
.rp-band-card--idle [data-band-field="frequency_mhz"] {
  border-style: dashed;
}
.rp-kit-form .form-label {
  margin-bottom: 0.2rem;
  min-height: 0;
}
.rp-kit-form .row > [class*="col-"] {
  display: block;
}
.rp-kit-freq-grid {
  display: grid;
  grid-template-columns: 2.25rem 1fr 1fr;
  gap: 0.4rem 0.55rem;
  align-items: center;
}
.rp-kit-freq-grid-4 {
  grid-template-columns: 2.25rem 1.2fr 0.55fr 1fr;
}
.rp-kit-freq-head {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--rp-text-muted, #6b6258);
  line-height: 1.2;
}
.rp-kit-freq-side {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--rp-navy, #141210);
}
#kitModal .modal-body,
#channelModal .modal-body {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

/* Roster days-remaining badge */
.rp-roster-days {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  margin: 0 auto;
  border-radius: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: #fff;
  vertical-align: middle;
}
.rp-roster-days-cell {
  text-align: center;
  vertical-align: middle;
}
#rosterTable th.text-center {
  text-align: center;
}
.rp-roster-days-ok {
  background: #2d7a4f;
}
.rp-roster-days-watch {
  background: #c9a227;
  color: #1a1612;
}
.rp-roster-days-soon {
  background: #e07a2f;
}
.rp-roster-days-last {
  background: #b83a3a;
}
.rp-roster-days-past {
  background: #6b6258;
}

/* Demob glide path */
.rp-demob-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.rp-demob-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border-radius: 0.45rem;
  background: #f3f0ea;
  border: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.78rem;
  color: #3a342c;
}
.rp-demob-chip-n {
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.rp-demob-chip.tone-ok .rp-demob-chip-n { color: #2d7a4f; }
.rp-demob-chip.tone-watch .rp-demob-chip-n { color: #a48412; }
.rp-demob-chip.tone-soon .rp-demob-chip-n { color: #c45f18; }
.rp-demob-chip.tone-last .rp-demob-chip-n { color: #b83a3a; }
.rp-demob-chip.tone-past .rp-demob-chip-n { color: #6b6258; }
.rp-demob-chip.tone-none .rp-demob-chip-n { color: #8a8278; }

.rp-demob-section {
  margin-bottom: 0.85rem;
}
.rp-demob-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 0.4rem;
  color: #6b6258;
}
.rp-demob-section-title.tone-ok { color: #2d7a4f; }
.rp-demob-section-title.tone-watch { color: #a48412; }
.rp-demob-section-title.tone-soon { color: #c45f18; }
.rp-demob-section-title.tone-last { color: #b83a3a; }

.rp-demob-grid {
  display: grid;
  gap: 0.5rem;
}

.rp-demob-card {
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.65rem;
  padding: 0.55rem 0.75rem 0.6rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78)),
    #f7f4ef;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  overflow: hidden;
}
.rp-demob-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #a8a094;
}
.rp-demob-card.tone-ok::before { background: #2d7a4f; }
.rp-demob-card.tone-watch::before { background: #c9a227; }
.rp-demob-card.tone-soon::before {
  background: #e07a2f;
  box-shadow: 0 0 18px rgba(224, 122, 47, 0.35);
}
.rp-demob-card.tone-last::before {
  background: #b83a3a;
  box-shadow: 0 0 20px rgba(184, 58, 58, 0.4);
}
.rp-demob-card.tone-last {
  background:
    linear-gradient(180deg, rgba(255, 245, 243, 0.95), rgba(255, 255, 255, 0.82)),
    #fff5f3;
}
.rp-demob-card.tone-soon {
  background:
    linear-gradient(180deg, rgba(255, 248, 240, 0.95), rgba(255, 255, 255, 0.82)),
    #fff8f0;
}
.rp-demob-card.tone-past {
  opacity: 0.78;
}

.rp-demob-card-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.4rem;
}
.rp-demob-countdown {
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.55rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #6b6258;
  line-height: 1;
}
.rp-demob-card.tone-ok .rp-demob-countdown { background: #2d7a4f; }
.rp-demob-card.tone-watch .rp-demob-countdown { background: #c9a227; color: #1a1612; }
.rp-demob-card.tone-soon .rp-demob-countdown { background: #e07a2f; }
.rp-demob-card.tone-last .rp-demob-countdown {
  background: #b83a3a;
  animation: rp-demob-pulse 1.8s ease-in-out infinite;
}
.rp-demob-card.tone-none .rp-demob-countdown { background: #a8a094; }
.rp-demob-countdown-num {
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.rp-demob-countdown-lbl {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-top: 0.1rem;
}
@keyframes rp-demob-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.rp-demob-who { min-width: 0; flex: 1 1 8rem; }
.rp-demob-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1612;
  line-height: 1.15;
}
.rp-demob-meta {
  margin-top: 0.1rem;
  font-size: 0.74rem;
  color: #6b6258;
  line-height: 1.25;
}

.rp-demob-progress {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1 1 11rem;
  min-width: 10rem;
  max-width: 20rem;
}
.rp-demob-progress-date {
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #6b6258;
  white-space: nowrap;
  line-height: 1;
}
.rp-demob-track {
  position: relative;
  height: 0.55rem;
  flex: 1 1 auto;
  min-width: 3.5rem;
}
.rp-demob-track-rail {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
}
.rp-demob-track-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: #2d7a4f;
  transition: width 0.35s ease;
}
.rp-demob-track-fill.tone-watch { background: linear-gradient(90deg, #2d7a4f, #c9a227); }
.rp-demob-track-fill.tone-soon { background: linear-gradient(90deg, #2d7a4f, #c9a227, #e07a2f); }
.rp-demob-track-fill.tone-last { background: linear-gradient(90deg, #2d7a4f, #c9a227, #e07a2f, #b83a3a); }
.rp-demob-track-fill.tone-past { background: #6b6258; }
.rp-demob-track-mark {
  position: absolute;
  top: 50%;
  width: 0.65rem;
  height: 0.65rem;
  margin-left: -0.325rem;
  margin-top: -0.325rem;
  border-radius: 50%;
  background: #1a1612;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}

/* Shifts */
.rp-shifts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: nowrap;
}
.rp-shifts-toolbar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
  flex-wrap: nowrap;
}
.rp-shifts-date-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.rp-shifts-date-nav #shiftDate {
  width: 9.75rem;
  min-width: 9.75rem;
}
.rp-shift-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.rp-shift-pills > .d-inline-flex {
  border-radius: 0.55rem;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}
.rp-shift-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: none;
  border-radius: 0;
  padding: 0.45rem 0.7rem;
  font-size: 0.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: #fff;
  cursor: pointer;
}
.rp-shift-pill:hover,
.rp-shift-pill:focus-visible {
  filter: brightness(1.06);
  outline: 2px solid rgba(26, 22, 18, 0.35);
  outline-offset: 1px;
}
.rp-shift-pill-del {
  border: none;
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
  width: 1.7rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}
.rp-shift-pill-del:hover {
  background: rgba(0, 0, 0, 0.34);
}
.rp-shift-pill.tone-morning,
.d-inline-flex:has(.rp-shift-pill.tone-morning) .rp-shift-pill-del { background: #2f6f9f; }
.rp-shift-pill.tone-day { background: #c9a227; color: #1a1612; }
.d-inline-flex:has(.rp-shift-pill.tone-day) .rp-shift-pill-del { background: #a48412; color: #fff; }
.rp-shift-pill.tone-evening,
.d-inline-flex:has(.rp-shift-pill.tone-evening) .rp-shift-pill-del { background: #c45f18; }
.rp-shift-pill.tone-night,
.d-inline-flex:has(.rp-shift-pill.tone-night) .rp-shift-pill-del { background: #3d3a6b; }
.rp-shift-pill.tone-span,
.d-inline-flex:has(.rp-shift-pill.tone-span) .rp-shift-pill-del { background: #2d7a4f; }

.rp-shift-cal-label {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.55rem;
  color: var(--rp-ink, #1a1612);
}
.rp-shift-cal-head,
.rp-shift-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}
.rp-shift-cal-dow {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b6560;
  padding: 0.15rem 0;
}
.rp-shift-cal-cell {
  min-height: 5.5rem;
  border: 1px solid rgba(26, 22, 18, 0.12);
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.55);
  padding: 0.3rem 0.35rem 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  cursor: pointer;
}
.rp-shift-cal-cell.is-out {
  opacity: 0.45;
  background: rgba(0, 0, 0, 0.03);
}
.rp-shift-cal-cell.is-today {
  box-shadow: inset 0 0 0 1.5px rgba(47, 111, 159, 0.55);
}
.rp-shift-cal-cell.is-anchor {
  background: rgba(47, 111, 159, 0.08);
}
.rp-shift-cal-daynum {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  width: fit-content;
  padding: 0.05rem 0.2rem;
  border-radius: 0.25rem;
}
.rp-shift-cal-daynum:hover {
  background: rgba(26, 22, 18, 0.08);
}
.rp-shift-cal-chips {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-height: 0;
  overflow: hidden;
}
.rp-shift-cal-chip-wrap {
  position: relative;
}
.rp-shift-cal-chip {
  display: block;
  width: 100%;
  border: none;
  border-radius: 0.3rem;
  padding: 0.12rem 0.28rem;
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1.2;
  text-align: left;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.rp-shift-cal-chip:hover,
.rp-shift-cal-chip:focus-visible {
  filter: brightness(1.08);
  outline: 1px solid rgba(26, 22, 18, 0.35);
  outline-offset: 0;
  z-index: 1;
}
.rp-shift-cal-chip.tone-morning { background: #2f6f9f; }
.rp-shift-cal-chip.tone-day { background: #c9a227; color: #1a1612; }
.rp-shift-cal-chip.tone-evening { background: #c45f18; }
.rp-shift-cal-chip.tone-night { background: #3d3a6b; }
.rp-shift-cal-chip.tone-span { background: #2d7a4f; }
.rp-shift-cal-tip {
  display: none;
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.25rem);
  z-index: 20;
  min-width: 9rem;
  max-width: 14rem;
  padding: 0.4rem 0.5rem;
  border-radius: 0.4rem;
  background: #1a1612;
  color: #f5f1ea;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.35;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  white-space: normal;
}
.rp-shift-cal-chip-wrap:hover .rp-shift-cal-tip,
.rp-shift-cal-chip-wrap:focus-within .rp-shift-cal-tip {
  display: block;
}
.rp-shift-cal[data-view="week"] .rp-shift-cal-cell,
.rp-shift-cal.rp-shift-cal--week .rp-shift-cal-cell {
  min-height: 8.5rem;
}
.rp-shift-cal--week .rp-shift-cal-chip {
  font-size: 0.78rem;
  padding: 0.2rem 0.35rem;
}

@media (max-width: 900px) {
  .rp-shift-cal-cell {
    min-height: 4.25rem;
  }
  .rp-shift-cal-chip {
    font-size: 0.62rem;
  }
}

.rp-eval-ratings-table th,
.rp-eval-ratings-table td {
  vertical-align: middle;
}
.rp-eval-ratings-table select {
  min-width: 3.25rem;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

@media (max-width: 640px) {
  .rp-shifts-header {
    flex-wrap: wrap;
  }
  .rp-shifts-toolbar {
    width: 100%;
    justify-content: space-between;
  }
  .rp-demob-card-top {
    flex-wrap: wrap;
  }
  .rp-demob-progress {
    flex: 1 1 100%;
    max-width: none;
    margin-top: 0.15rem;
  }
}

.rp-demob-glide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(2.15rem, 1fr));
  gap: 0.2rem;
}
.rp-demob-cell {
  position: relative;
  min-height: 1.9rem;
  border-radius: 0.3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-variant-numeric: tabular-nums;
  background: rgba(0, 0, 0, 0.04);
  color: #8a8278;
  transition: transform 0.15s ease;
}
.rp-demob-cell-day {
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1;
}
.rp-demob-cell-mark {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  margin-top: 0.05rem;
}
.rp-demob-cell.tone-done {
  background: rgba(45, 122, 79, 0.18);
  color: #3d5c48;
}
.rp-demob-cell.tone-ok {
  background: #2d7a4f;
  color: #fff;
}
.rp-demob-cell.tone-watch {
  background: #c9a227;
  color: #1a1612;
}
.rp-demob-cell.tone-soon {
  background: #e07a2f;
  color: #fff;
}
.rp-demob-cell.tone-last {
  background: #b83a3a;
  color: #fff;
}
.rp-demob-cell.tone-demob {
  background: #4a3f8f;
  color: #fff;
}
.rp-demob-cell.tone-void {
  background: transparent;
  border: 1px dashed rgba(0, 0, 0, 0.1);
  color: #b0a89e;
}
.rp-demob-cell.is-today {
  box-shadow: 0 0 0 2px #1a1612;
  transform: translateY(-1px);
}
.rp-demob-cell.is-last {
  box-shadow: 0 0 0 2px rgba(184, 58, 58, 0.45);
}
.rp-demob-glide-empty {
  font-size: 0.8rem;
}
.rp-demob-legend {
  margin: 0.25rem 0 0;
  font-size: 0.72rem;
  color: #8a8278;
}

@media (min-width: 900px) {
  .rp-demob-grid {
    grid-template-columns: 1fr;
  }
}
#rosterModal .modal-body {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

/* Sortable roster headers */
.rp-th-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.rp-th-sort::after {
  content: "";
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  opacity: 0.35;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  translate: 0 -0.1rem;
}
.rp-th-sort.is-active {
  color: var(--rp-accent, #e85d04);
}
.rp-th-sort.is-active::after {
  opacity: 1;
}
.rp-th-sort.is-active[data-dir="asc"]::after {
  transform: rotate(-135deg);
  translate: 0 0.15rem;
}
.rp-th-sort.is-active[data-dir="desc"]::after {
  transform: rotate(45deg);
  translate: 0 -0.1rem;
}
#rosterTable th.text-center .rp-th-sort {
  width: 100%;
  justify-content: center;
}

/* Map site add/edit forms */
.rp-site-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.rp-site-form .form-label {
  margin-bottom: 0.2rem;
  min-height: 0;
}
.rp-height-presets .btn {
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
}
#addSiteModal .modal-body,
#siteModal .modal-body {
  padding-top: 0.85rem;
}

/* Admin */
.rp-admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 0.75rem;
}
.rp-admin-stat {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(36, 28, 22, 0.08);
  border-radius: 0.65rem;
  padding: 0.85rem 0.9rem;
  text-align: center;
}
.rp-admin-stat-value {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--rp-navy, #1c1612);
  line-height: 1.1;
}
.rp-admin-stat-label {
  margin-top: 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #6d645a;
}
.rp-admin-tab-count {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  font-size: 0.7rem;
  background: rgba(232, 93, 4, 0.12);
  color: var(--rp-flame);
  vertical-align: middle;
}
.rp-admin-incident-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.rp-admin-incident-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.rp-admin-unlink {
  padding: 0;
  font-size: 0.75rem;
  line-height: 1.2;
  color: #8a4b3a;
  text-decoration: none;
}
.rp-admin-unlink:hover {
  color: #6b2f22;
  text-decoration: underline;
}
#adminLinkForm .btn-accent {
  min-height: calc(1.5em + 0.75rem + 2px);
}

/* ZoneMap App status pill (Channels tab) */
.rp-zonemap-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.2;
}
.rp-zonemap-pill-unpublished {
  color: #6b5a2a;
  background: rgba(180, 150, 40, 0.18);
}
.rp-zonemap-pill-published {
  color: #1b6b3a;
  background: rgba(27, 107, 58, 0.14);
}
.rp-zonemap-pill-error {
  color: #8b1a1a;
  background: rgba(139, 26, 26, 0.14);
}
.rp-zonemap-body.is-published {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.25rem 1.75rem;
}
.rp-zonemap-body.is-published .rp-zonemap-creds {
  flex: 0 0 auto;
  min-width: 12rem;
}
.rp-zonemap-body.is-published .rp-zonemap-intro {
  flex: 1 1 16rem;
  min-width: 0;
  max-width: none;
}
.rp-zonemap-intro {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  max-width: 48rem;
}
.rp-zonemap-intro-brand {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  width: 5.5rem;
}
.rp-zonemap-intro-icon {
  display: block;
  line-height: 0;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.rp-zonemap-intro-icon:hover,
.rp-zonemap-intro-brand:hover .rp-zonemap-intro-icon {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.16);
}
.rp-zonemap-intro-icon img {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: cover;
}
.rp-zonemap-intro-site {
  display: block;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--rp-accent);
  text-decoration: none;
}
.rp-zonemap-intro-site:hover {
  text-decoration: underline;
  color: var(--rp-accent-hover);
}
.rp-zonemap-intro-copy {
  min-width: 0;
  flex: 1 1 auto;
}
.rp-zonemap-intro-copy p:last-child {
  margin-bottom: 0;
}
@media (max-width: 480px) {
  .rp-zonemap-intro {
    gap: 0.75rem;
  }
  .rp-zonemap-intro-brand {
    width: 4.5rem;
  }
  .rp-zonemap-intro-icon img {
    width: 56px;
    height: 56px;
  }
}

/* ── My Account ── */
.rp-account-hero {
  margin: 0 0 1.5rem;
  padding: 1.25rem 1.35rem;
  border-radius: var(--rp-radius-lg);
  border: 1px solid var(--rp-border);
  background:
    linear-gradient(135deg, rgba(232, 93, 4, 0.08), transparent 55%),
    var(--rp-panel);
  box-shadow: var(--rp-shadow-sm);
}
.rp-account-hero-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}
.rp-account-hero-title {
  margin: 0;
  font-family: var(--rp-font-brand);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rp-navy);
  line-height: 1.1;
}
.rp-account-hero-sub {
  margin: 0.2rem 0 0;
  color: var(--rp-text-muted);
  font-size: 0.95rem;
}
.rp-account-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.rp-account-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--rp-border);
  background: var(--rp-bg-subtle);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--rp-navy);
}
.rp-account-chip .rp-icon {
  width: 0.95em;
  height: 0.95em;
  color: var(--rp-accent);
}
.rp-account-card-icon {
  width: 1.15rem;
  height: 1.15rem;
  color: var(--rp-accent);
}
.rp-account-qual-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--rp-border-light);
  border-radius: var(--rp-radius);
  background: var(--rp-bg-subtle);
}
.rp-account-ec-card {
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--rp-border-light);
  border-radius: var(--rp-radius);
  background: var(--rp-bg-subtle);
}
@media (max-width: 575.98px) {
  .rp-account-qual-row {
    grid-template-columns: 1fr;
  }
}

/* Access tab — team profile peek under each member */
.rp-people-profile {
  margin-top: 0.35rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.45rem;
  background: var(--rp-bg-subtle);
  border: 1px solid var(--rp-border-light);
  font-size: 0.82rem;
}
.rp-people-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  color: var(--rp-text-muted);
  margin-bottom: 0.35rem;
}
.rp-people-qual-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.3rem;
}
.rp-people-qual-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: var(--rp-accent-soft);
  color: var(--rp-accent-hover);
}
.rp-people-qual-pill.is-trainee {
  background: rgba(29, 78, 216, 0.12);
  color: #1d4ed8;
}
.rp-people-ec-line {
  color: var(--rp-text-muted);
  font-size: 0.78rem;
}
.rp-people-ec-line + .rp-people-ec-line {
  margin-top: 0.1rem;
}

/* Permission group editor */
.rp-perm-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.rp-perm-pill {
  appearance: none;
  border: 1px solid var(--rp-border, #d8d4ce);
  background: transparent;
  color: var(--rp-text, #1a1612);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.rp-perm-pill:hover,
.rp-perm-pill:focus-visible {
  border-color: var(--rp-accent, #e85d04);
  color: var(--rp-accent-hover, #c24a03);
}
.rp-perm-pill.is-active {
  background: var(--rp-accent, #e85d04);
  border-color: var(--rp-accent, #e85d04);
  color: #fff;
}
.rp-perm-pill-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.75;
}
.rp-perm-pill.is-active .rp-perm-pill-tag {
  opacity: 0.9;
}

.rp-perm-editor-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rp-border, #d8d4ce);
}
.rp-perm-editor-name {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 10rem;
  flex: 1 1 12rem;
}
.rp-perm-editor-name .form-control.is-readonly,
.rp-perm-editor-name .form-control[readonly] {
  background: transparent;
  border-color: transparent;
  padding-left: 0;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: none;
  cursor: default;
}
.rp-perm-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.rp-perm-table-wrap {
  max-height: 26rem;
  overflow: auto;
}
.rp-perm-table-head,
.rp-perm-row {
  display: grid;
  grid-template-columns: minmax(8rem, 1.4fr) 2.5rem minmax(5.5rem, 7rem) minmax(5rem, 1fr);
  gap: 0.5rem 0.75rem;
  align-items: center;
}
.rp-perm-table-head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.35rem 0.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rp-text-muted, #6b6560);
  background: var(--rp-surface, #fff);
  border-bottom: 1px solid var(--rp-border, #d8d4ce);
}
.rp-perm-tree {
  display: flex;
  flex-direction: column;
}
.rp-perm-row {
  padding: 0.4rem 0.15rem;
  border-bottom: 1px solid rgba(26, 22, 18, 0.06);
  font-size: 0.875rem;
}
.rp-perm-row.is-module {
  margin-top: 0.35rem;
  font-weight: 700;
  background: rgba(26, 22, 18, 0.02);
}
.rp-perm-row.is-module:first-child {
  margin-top: 0;
}
.rp-perm-row.is-child .rp-perm-row-label {
  padding-left: 1rem;
  font-weight: 500;
  color: var(--rp-text, #1a1612);
}
.rp-perm-row[title],
.rp-perm-row-label[title],
.rp-perm-on[title],
.rp-perm-extra-check[title],
.rp-perm-level-select[title] {
  cursor: help;
}
.rp-perm-on,
.rp-perm-extra-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--rp-text-muted, #6b6560);
  font-weight: 500;
}
.rp-perm-on {
  justify-content: center;
}
.rp-perm-level-select {
  width: 100%;
  min-width: 0;
}
@media (max-width: 575.98px) {
  .rp-perm-table-head {
    display: none;
  }
  .rp-perm-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "label on"
      "level extra";
  }
  .rp-perm-row-label { grid-area: label; }
  .rp-perm-on { grid-area: on; }
  .rp-perm-row-level,
  .rp-perm-level-select { grid-area: level; }
  .rp-perm-row-extra { grid-area: extra; justify-self: end; }
  .rp-perm-row.is-child .rp-perm-row-label { padding-left: 0.5rem; }
}

/* ===== In-app Help ===== */
.rp-help-page {
  max-width: 1280px;
  margin: 0 auto 2.5rem;
}
.rp-help-hero {
  display: grid;
  gap: 1rem 1.5rem;
  margin-bottom: 1.25rem;
  padding: 1.25rem 1.35rem;
  border-radius: var(--rp-radius-lg);
  background:
    radial-gradient(ellipse 80% 120% at 100% 0%, rgba(232, 93, 4, 0.14), transparent 55%),
    linear-gradient(165deg, #fffefc 0%, #f7f2e9 100%);
  border: 1px solid var(--rp-border);
  box-shadow: var(--rp-shadow-sm);
}
@media (min-width: 768px) {
  .rp-help-hero {
    grid-template-columns: 1.4fr 1fr;
    align-items: end;
  }
}
.rp-help-hero-title {
  font-family: var(--rp-font-brand);
  font-size: clamp(1.85rem, 3vw, 2.45rem);
  letter-spacing: 0.03em;
  margin: 0 0 0.35rem;
  color: var(--rp-charcoal);
  line-height: 1.05;
}
.rp-help-hero-sub {
  margin: 0;
  color: var(--rp-text-muted);
  max-width: 38rem;
  font-size: 1.02rem;
}
.rp-help-hero-compact {
  padding: 1rem 1.2rem;
  align-items: center;
}
.rp-help-hero-compact .rp-help-hero-title {
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  margin: 0;
}
.rp-help-search-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
}
.rp-help-search {
  border-radius: 999px;
  border-color: var(--rp-border);
  padding-left: 1.1rem;
  padding-right: 1.1rem;
  min-height: 2.65rem;
  box-shadow: var(--rp-shadow-sm);
}
.rp-help-search:focus {
  border-color: var(--rp-accent);
  box-shadow: 0 0 0 0.2rem var(--rp-accent-soft);
}
.rp-help-search-results {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--rp-panel);
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius);
  box-shadow: var(--rp-shadow-lg);
  max-height: 18rem;
  overflow: auto;
  padding: 0.35rem;
}
.rp-help-search-hit {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.45rem;
  text-decoration: none;
  color: var(--rp-text);
}
.rp-help-search-hit:hover,
.rp-help-search-hit:focus {
  background: var(--rp-accent-soft);
  color: var(--rp-text);
}
.rp-help-search-hit span {
  font-size: 0.78rem;
  color: var(--rp-text-muted);
}
.rp-help-search-empty {
  margin: 0;
  padding: 0.75rem;
  color: var(--rp-text-muted);
  font-size: 0.92rem;
}
.rp-help-layout {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 992px) {
  .rp-help-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: start;
  }
}
.rp-help-sidebar {
  position: sticky;
  top: 0.75rem;
  z-index: 2;
}
.rp-help-sidebar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  justify-content: center;
  margin-bottom: 0.5rem;
  background: var(--rp-panel);
  border: 1px solid var(--rp-border);
  color: var(--rp-text);
}
.rp-help-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: var(--rp-panel);
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius);
  padding: 0.55rem;
  box-shadow: var(--rp-shadow-sm);
  max-height: min(78vh, 42rem);
  overflow: auto;
}
@media (max-width: 991.98px) {
  .rp-help-nav {
    display: none;
    max-height: none;
  }
  .rp-help-nav.is-open {
    display: flex;
  }
}
.rp-help-nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.48rem 0.6rem;
  border-radius: 0.45rem;
  color: var(--rp-text);
  text-decoration: none;
  font-size: 0.94rem;
  line-height: 1.25;
}
.rp-help-nav-link .rp-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--rp-mod-accent, var(--rp-navy-muted));
}
.rp-help-nav-link:hover {
  background: var(--rp-bg-subtle);
  color: var(--rp-text);
}
.rp-help-nav-link.active {
  background: var(--rp-mod-accent-soft, var(--rp-accent-soft));
  color: var(--rp-mod-accent, var(--rp-accent-hover));
  font-weight: 600;
}
.rp-help-nav-label {
  margin: 0.55rem 0.35rem 0.2rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--rp-border-light);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--rp-navy-muted);
}
.rp-help-nav-label:first-child {
  margin-top: 0.15rem;
  padding-top: 0;
  border-top: 0;
}
.rp-help-nav-link-child {
  padding-left: 0.85rem;
  font-size: 0.9rem;
}
.rp-help-refs {
  margin: 0.4rem 0 0;
  padding-left: 1.2rem;
}
.rp-help-refs a {
  color: var(--rp-accent-hover);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}
.rp-help-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0 1rem;
  font-size: 0.95rem;
}
.rp-help-table th,
.rp-help-table td {
  border: 1px solid var(--rp-border-light);
  padding: 0.45rem 0.55rem;
  text-align: left;
  vertical-align: top;
}
.rp-help-table th {
  background: var(--rp-bg-subtle);
  font-weight: 700;
}
.rp-help-main {
  min-width: 0;
}
.rp-help-article {
  background: var(--rp-panel);
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius-lg);
  box-shadow: var(--rp-shadow-sm);
  overflow: hidden;
}
.rp-help-article-head {
  padding: 0.95rem 1.2rem 0.7rem;
  border-bottom: 1px solid var(--rp-border-light);
  border-top: 3px solid var(--rp-mod-accent, var(--rp-accent));
  background: linear-gradient(180deg, var(--rp-mod-accent-soft, rgba(232, 93, 4, 0.08)), transparent 90%);
}
.rp-help-article-head h1 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--rp-charcoal);
}
.rp-help-article-body {
  padding: 1rem 1.2rem 1.35rem;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--rp-text);
}
.rp-help-article-body > p:first-child {
  margin-top: 0;
}
.rp-help-article-body h3 {
  margin: 1.35rem 0 0.45rem;
  font-size: 1.08rem;
  font-weight: 700;
}
.rp-help-steps {
  margin: 0.75rem 0 1rem;
  padding-left: 1.25rem;
}
.rp-help-steps li {
  margin: 0.45rem 0;
  padding-left: 0.25rem;
}
.rp-help-prose-list {
  margin: 0.5rem 0 1rem;
  padding-left: 1.2rem;
}
.rp-help-prose-list li {
  margin: 0.4rem 0;
}
.rp-help-callout {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  border-radius: var(--rp-radius);
  border: 1px solid var(--rp-border);
  background: var(--rp-bg-subtle);
}
.rp-help-callout-tip {
  border-left: 4px solid var(--rp-gold);
}
.rp-help-callout-note {
  border-left: 4px solid var(--rp-accent);
}
.rp-help-callout-title {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}
.rp-help-callout-body > p:last-child {
  margin-bottom: 0;
}
.rp-help-faq-item {
  border: 1px solid var(--rp-border-light);
  border-radius: var(--rp-radius);
  background: var(--rp-bg-subtle);
  padding: 0.35rem 0.85rem 0.55rem;
  margin: 0.55rem 0;
}
.rp-help-faq-item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.45rem 0;
  list-style: none;
}
.rp-help-faq-item summary::-webkit-details-marker {
  display: none;
}
.rp-help-faq-item summary::before {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.55rem;
  border-right: 2px solid var(--rp-accent);
  border-bottom: 2px solid var(--rp-accent);
  transform: rotate(-45deg);
  vertical-align: 0.15rem;
  transition: transform 0.15s ease;
}
.rp-help-faq-item[open] summary::before {
  transform: rotate(45deg);
  vertical-align: 0.05rem;
}
.rp-help-faq-item p {
  margin: 0 0 0.45rem;
  color: var(--rp-text);
}
.rp-help-trouble h3 {
  margin-top: 1.4rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--rp-border-light);
}
.rp-help-trouble h3:first-child {
  margin-top: 0.35rem;
  padding-top: 0;
  border-top: 0;
}

/* ── Public SEO landing (/) ── */
.rp-skip-link {
  position: absolute;
  left: -9999px;
  top: 0.75rem;
  z-index: 2000;
  padding: 0.5rem 0.85rem;
  background: var(--rp-gold);
  color: #141210;
  border-radius: 0.4rem;
  font-weight: 600;
}
.rp-skip-link:focus {
  left: 0.75rem;
}

/* Higher specificity than body.rp-app so the light app canvas wins over dark-theme leftovers */
body.rp-app.rp-public-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--rp-text);
  background:
    radial-gradient(ellipse 90% 55% at 50% -20%, rgba(232, 93, 4, 0.16), transparent 55%),
    radial-gradient(ellipse 55% 40% at 100% 0%, rgba(240, 180, 41, 0.12), transparent 50%),
    var(--rp-bg);
}

.rp-public-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  position: relative;
  z-index: 2;
  border-bottom: 1px solid rgba(240, 180, 41, 0.28);
  background: #141210;
  color: var(--rp-cream);
}
.rp-public-top .rp-brand-fireguy,
.rp-public-top .rp-brand-pipe { color: var(--rp-cream); }
.rp-public-top .rp-brand-product { color: var(--rp-gold); }

.rp-public-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}
.rp-public-brand img {
  border-radius: 0.45rem;
}
.rp-public-brand .rp-brand-text {
  display: none;
  flex-direction: column;
  line-height: 1;
  min-width: 0;
}
.rp-public-brand .rp-brand-title {
  font-size: 1.35rem;
  white-space: nowrap;
}
@media (min-width: 576px) {
  .rp-public-brand .rp-brand-text { display: flex; }
}

.rp-public-top-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.rp-public-top-nav .btn-outline-secondary {
  border-color: rgba(243, 238, 228, 0.4);
  color: var(--rp-cream);
}
.rp-public-top-nav .btn-outline-secondary:hover {
  background: rgba(243, 238, 228, 0.1);
  border-color: var(--rp-gold);
  color: var(--rp-gold);
}

.rp-public-hero {
  position: relative;
  min-height: calc(100vh - 4.25rem);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 2.5rem 1.25rem 3.5rem;
}

.rp-public-hero-glow {
  position: absolute;
  inset: -10% -5% auto;
  height: 65%;
  background:
    radial-gradient(ellipse at 35% 45%, rgba(232, 93, 4, 0.22), transparent 58%),
    radial-gradient(ellipse at 70% 35%, rgba(240, 180, 41, 0.16), transparent 52%);
  filter: blur(6px);
  animation: rp-public-ember 9s ease-in-out infinite alternate;
  pointer-events: none;
}
.rp-public-hero-mesh {
  display: none;
}
@keyframes rp-public-ember {
  from { transform: scale(1) translate(0, 0); opacity: 0.9; }
  to { transform: scale(1.06) translate(1.5%, -2%); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .rp-public-hero-glow { animation: none; }
}

.rp-public-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 40rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.rp-public-hero-mark {
  width: min(220px, 46vw);
  height: auto;
  filter: drop-shadow(0 14px 28px rgba(60, 45, 25, 0.28));
  animation: rp-public-mark-in 0.9s ease-out both;
}
@keyframes rp-public-mark-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.rp-public-hero-title {
  margin: 0;
  font-family: var(--rp-font-brand);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  letter-spacing: 0.02em;
  line-height: 1;
  animation: rp-public-mark-in 0.9s ease-out 0.08s both;
}
.rp-public-hero-title .rp-brand-fireguy { color: var(--rp-charcoal); }
.rp-public-hero-title .rp-brand-pipe { color: rgba(26, 22, 18, 0.4); margin: 0 0.12em; }
.rp-public-hero-title .rp-brand-product { color: var(--rp-accent-hover); }

.rp-public-hero-lead {
  margin: 0;
  max-width: 28rem;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.5;
  color: #3f372f;
  animation: rp-public-mark-in 0.9s ease-out 0.16s both;
}

.rp-public-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-top: 0.5rem;
  animation: rp-public-mark-in 0.9s ease-out 0.24s both;
}
.rp-public-hero-actions .btn-outline-secondary {
  border-color: rgba(26, 22, 18, 0.35);
  color: var(--rp-text);
  background: rgba(255, 254, 252, 0.65);
}
.rp-public-hero-actions .btn-outline-secondary:hover {
  background: #fffefc;
  border-color: var(--rp-accent);
  color: var(--rp-accent);
}

.rp-public-section {
  padding: 3rem 1.25rem;
  max-width: 40rem;
  margin: 0 auto;
  border-top: 1px solid var(--rp-border);
}
.rp-public-section h2 {
  font-family: var(--rp-font-brand);
  font-size: 1.85rem;
  letter-spacing: 0.03em;
  color: var(--rp-accent);
  margin: 0 0 0.55rem;
}
.rp-public-section p {
  margin: 0;
  color: var(--rp-text);
  font-size: 1.05rem;
  line-height: 1.55;
}

.rp-public-footer {
  margin-top: auto;
  padding: 1.5rem 1.25rem 2rem;
  text-align: center;
  border-top: 1px solid var(--rp-border);
  color: var(--rp-text-muted);
  font-size: 0.92rem;
  background: rgba(255, 254, 252, 0.45);
}
.rp-public-footer .rp-footer-brand .rp-brand-fireguy,
.rp-public-footer .rp-footer-brand .rp-brand-pipe { color: var(--rp-charcoal); }
.rp-public-footer .rp-footer-brand .rp-brand-product { color: var(--rp-accent); }
.rp-public-footer a {
  color: var(--rp-accent);
  text-decoration: none;
  font-weight: 600;
}
.rp-public-footer a:hover { text-decoration: underline; }
.rp-public-footer-meta {
  margin: 0.35rem 0 0;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}

/* ── Under-development notice strip ── */
.rp-dev-notice {
  background: linear-gradient(90deg, #f6e6d4 0%, #f3ead8 45%, #f7e8d0 100%);
  border-bottom: 1px solid rgba(196, 77, 3, 0.35);
  color: var(--rp-charcoal);
  font-size: 0.9rem;
  line-height: 1.35;
  box-shadow: 0 1px 0 rgba(255, 254, 252, 0.65) inset;
}
.rp-dev-notice-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.5rem 1.1rem;
}
.rp-dev-notice-text {
  margin: 0;
  text-align: center;
  color: var(--rp-charcoal);
}
.rp-dev-notice-label {
  font-weight: 700;
  color: #9a3c02;
  letter-spacing: 0.02em;
}
.rp-dev-notice-sep {
  margin: 0 0.35rem;
  color: rgba(26, 22, 18, 0.45);
}
.rp-dev-notice-link {
  font-weight: 700;
  color: #9a3c02;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}
.rp-dev-notice-link:hover { color: var(--rp-accent); }
.rp-dev-notice-close {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: rgba(26, 22, 18, 0.55);
  font-size: 1.25rem;
  line-height: 1;
  padding: 0 0.2rem;
  cursor: pointer;
  border-radius: 0.25rem;
}
.rp-dev-notice-close:hover {
  color: var(--rp-charcoal);
  background: rgba(26, 22, 18, 0.08);
}
body.rp-map-page .rp-dev-notice {
  flex-shrink: 0;
}

/* Auth + error: same solid light bar (readable on navy), pin above dark layout */
body.rp-auth-page {
  display: flex;
  flex-direction: column;
}
body.rp-auth-page .rp-auth-layout {
  flex: 1;
  min-height: 0;
}
body.rp-auth-page .rp-dev-notice,
body.rp-error-page .rp-dev-notice {
  flex-shrink: 0;
  position: relative;
  z-index: 5;
}
.rp-auth-shell-footer {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.85rem;
}
.rp-auth-shell-footer a {
  color: var(--rp-accent);
  text-decoration: none;
  font-weight: 600;
}
.rp-auth-shell-footer a:hover {
  color: var(--rp-accent-hover);
  text-decoration: underline;
}

/* ── Site status page ── */
body.rp-app.rp-status-page {
  background:
    radial-gradient(ellipse 90% 50% at 50% -15%, rgba(232, 93, 4, 0.12), transparent 55%),
    var(--rp-bg);
  color: var(--rp-text);
}
.rp-status-main {
  flex: 1;
  padding: 1.75rem 1.25rem 3rem;
}
.rp-status-article {
  max-width: 42rem;
  margin: 0 auto;
}
.rp-status-hero {
  margin-bottom: 2.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rp-border);
}
.rp-status-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rp-accent-hover);
}
.rp-status-hero h1 {
  margin: 0 0 0.85rem;
  font-family: var(--rp-font-brand);
  font-size: clamp(1.85rem, 4vw, 2.45rem);
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: var(--rp-charcoal);
  font-weight: 400;
}
.rp-status-lead {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.55;
  color: #3f372f;
  font-weight: 500;
}
.rp-status-section {
  margin-bottom: 2rem;
}
.rp-status-section h2 {
  margin: 0 0 0.75rem;
  font-family: var(--rp-font-brand);
  font-size: 1.55rem;
  letter-spacing: 0.03em;
  color: var(--rp-accent-hover);
  font-weight: 400;
}
.rp-status-section h3 {
  margin: 1.35rem 0 0.55rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--rp-charcoal);
}
.rp-status-section p {
  margin: 0 0 1rem;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--rp-text);
}
.rp-status-section p:last-child { margin-bottom: 0; }
.rp-status-section a {
  color: var(--rp-accent-hover);
  font-weight: 600;
}
.rp-status-section a:hover { color: var(--rp-accent); }
.rp-status-section code {
  font-size: 0.92em;
  padding: 0.08em 0.35em;
  border-radius: 0.3rem;
  background: rgba(26, 22, 18, 0.06);
  color: #3f372f;
}
.rp-status-method {
  padding: 1.35rem 1.25rem;
  border-radius: var(--rp-radius-lg);
  background: rgba(255, 254, 252, 0.72);
  border: 1px solid var(--rp-border-light);
  box-shadow: var(--rp-shadow-sm);
}
@media (min-width: 768px) {
  .rp-status-method { padding: 1.6rem 1.75rem; }
}

/* ── Legal pages (Terms / Privacy) — share status-page rhythm ── */
body.rp-app.rp-legal-page {
  background:
    radial-gradient(ellipse 90% 50% at 50% -15%, rgba(232, 93, 4, 0.12), transparent 55%),
    var(--rp-bg);
  color: var(--rp-text);
}
.rp-legal-main {
  flex: 1;
  padding: 1.75rem 1.25rem 3rem;
}
.rp-legal-article {
  max-width: 42rem;
  margin: 0 auto;
}
.rp-legal-hero {
  margin-bottom: 2.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rp-border);
}
.rp-legal-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rp-accent-hover);
}
.rp-legal-hero h1 {
  margin: 0 0 0.85rem;
  font-family: var(--rp-font-brand);
  font-size: clamp(1.85rem, 4vw, 2.45rem);
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: var(--rp-charcoal);
  font-weight: 400;
}
.rp-legal-lead {
  margin: 0 0 0.75rem;
  font-size: 1.12rem;
  line-height: 1.55;
  color: #3f372f;
  font-weight: 500;
}
.rp-legal-updated {
  margin: 0;
  font-size: 0.92rem;
  color: #6b5f52;
}
.rp-legal-section {
  margin-bottom: 2rem;
}
.rp-legal-section h2 {
  margin: 0 0 0.75rem;
  font-family: var(--rp-font-brand);
  font-size: 1.55rem;
  letter-spacing: 0.03em;
  color: var(--rp-accent-hover);
  font-weight: 400;
}
.rp-legal-section h3 {
  margin: 1.35rem 0 0.55rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--rp-charcoal);
}
.rp-legal-section p,
.rp-legal-section li {
  margin: 0 0 1rem;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--rp-text);
}
.rp-legal-section p:last-child,
.rp-legal-section li:last-child { margin-bottom: 0; }
.rp-legal-section ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}
.rp-legal-section li { margin-bottom: 0.45rem; }
.rp-legal-section a {
  color: var(--rp-accent-hover);
  font-weight: 600;
}
.rp-legal-section a:hover { color: var(--rp-accent); }
.rp-legal-section code {
  font-size: 0.92em;
  padding: 0.08em 0.35em;
  border-radius: 0.3rem;
  background: rgba(26, 22, 18, 0.06);
  color: #3f372f;
}

.rp-auth-legal {
  font-size: 0.88rem;
  line-height: 1.45;
  color: #6b5f52;
}
.rp-auth-legal a {
  color: var(--rp-accent-hover);
  font-weight: 600;
  text-decoration: none;
}
.rp-auth-legal a:hover { text-decoration: underline; }

