/* ==========================================================================
   Smart pi UI — RTA product layer
   Everything specific to Smart pi RTA, on top of the shared SmartPi.UI
   stylesheets (smartpi-ui.css + the dashboard/config/configuration/logs
   modules). Loaded LAST, so these rules win. Uses the shared --sp-* tokens;
   never redefines them. Every selector is scoped to RTA-owned markup, the
   product's NonFactors MVC Grid integration, or its SweetAlert2 dialogs.
   ========================================================================== */


/* Apply the design-system background to the whole document, not just a wrapper. */
html, body { background: var(--sp-bg); }

/* --- shell: account menu, nav icons, drawer (matches the GTFS product layer) --- */
/* The account menu submits RTA's POST logout form, so its item is a button.
   Reset the button chrome so only the packaged .sp-account__logout styling shows. */
button.sp-account__logout {
  width: 100%;
  appearance: none;
  background: none;
  border: 0;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
button.sp-account__logout span { flex: 1 1 auto; }

/* Restated for an <svg> replacement node, so the status chips keep their icon
   column if Font Awesome is ever loaded in its JS (svg) flavour. */
.sp-topbar__status > i,
.sp-topbar__status > svg {
  flex: 0 0 17px;
  width: 17px;
  height: 15px;
  margin-right: 5px;
  color: #d9dcdf;
  font-size: 15px;
  text-align: center;
}

/* LDAP signs in with full principals, so widen the trigger before it ellipsises. */
.sp-account__trigger { max-width: 260px; }
.sp-account__trigger > .fa-user { box-sizing: content-box; }
.sp-account__logout > svg { width: 14px; text-align: center; }

/* Product allocation of the footer and the SVG nav icon; SmartPi.UI owns the rest. */
.footer-sticky {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  padding-inline: 8px;
}
.footer-primary-nav { min-width: 0; }
.footerNavIcon {
  flex: 0 0 auto; width: 24px; height: 24px;
  fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round;
}
.footer-sticky li a.is-active .footerNavIcon { color: #131313; }
.footer-status-slot { align-items: stretch; color: var(--sp-muted); font-size: 13px; }

/* Between tablet and small desktop seven destinations do not fit with labels,
   so the footer keeps the icons and the labels stay available to assistive tech. */
@media (min-width: 768px) and (max-width: 1199px) {
  .footer-primary-nav a { padding: 0 9px; }
  .footer-primary-nav a > span {
    clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden;
    position: absolute; white-space: nowrap; width: 1px;
  }
}

/* The nav list and custom SVG icon are product markup. */
.sp-drawer__nav { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.sp-drawer__nav li { margin: 0; padding: 0; }
.sp-drawer a .footerNavIcon { width: 22px; height: 22px; color: var(--sp-muted); }
.sp-drawer a.is-active .footerNavIcon { color: var(--sp-cyan); }
.sp-drawer__logout {
  margin-top: 14px; width: 100%;
  display: flex; align-items: center; gap: 10px; padding: 12px 10px;
  background: none; border: 1px solid var(--sp-border); border-radius: var(--sp-radius-control);
  color: var(--sp-text-dim); font: 500 14px var(--sp-font); cursor: pointer;
}

/* --- mobile fold: keep the topbar usable, hamburger always reachable ------ */
@media (max-width: 767px) {
  /* Low-value chrome yields width so the hamburger is never pushed off. */
  .sp-topbar__status { display: none; }
  .sp-topbar__meta { gap: 10px; justify-content: flex-end; }
  /* The drawer carries its own Logout, so the topbar account cluster would only
     squeeze the branding here. */
  .sp-account { display: none; }
  .sp-logo { max-width: 60vw; }
  /* The RTA wordmark is wider than the topbar slot left beside the hamburger, so
     scale it to the slot rather than letting the brand box clip its tail. */
  .sp-topbar__brand a { display: flex; max-width: 100%; }
  .sp-topbar__brand .sp-logo { height: auto; max-width: 100%; object-fit: contain; }

  /* Footer becomes an action bar; the primary nav moves into the drawer. */
  .footer-sticky { grid-template-columns: 1fr auto; }
  .footer-primary-nav { display: none; }
}

/* --- Scrollbars: brand orange (same as the GTFS and SIP products) --------- */
* {
  scrollbar-color: #e96225 #000;
  scrollbar-width: thin;
}
*::-webkit-scrollbar { height: 12px; width: 12px; }
*::-webkit-scrollbar-track { background: #000; }
*::-webkit-scrollbar-thumb {
  background: #e96225;
  border: 3px solid #000;
  border-radius: 1ex;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

/* --- status states: glow while running, red when failed (as in GTFS) ------ */
@keyframes sp-feed-glow {
  0%, 100% { box-shadow: 0 0 4px rgba(240,162,74,0.55); }
  50%      { box-shadow: 0 0 13px rgba(240,162,74,0.95); }
}
.config-extension-cell.is-starting .config-extension-number {
  background: linear-gradient(180deg, #6a4a1c 0%, #55380f 100%);
  border-color: #f0a24a; color: #fbe6cf;
  animation: sp-feed-glow 1.5s ease-in-out infinite;
}
.config-call-state.is-starting { color: #f2b263; font-weight: 600; }
.config-call-state.is-starting::before {
  background: #f0a24a;
  box-shadow: 0 0 6px rgba(240,162,74,0.9);
  animation: sp-feed-glow 1.5s ease-in-out infinite;
}
.config-extension-cell.is-failed .config-extension-number {
  background: linear-gradient(180deg, #7a2929 0%, #5d1f1f 100%);
  border-color: #e05b5b;
  color: #ffe2e2;
}
.config-call-state.is-failed { color: #ff8b87; font-weight: 600; }
.config-call-state.is-failed::before {
  background: #e05b5b;
  box-shadow: 0 0 5px rgba(224, 91, 91, 0.72);
}
.feed-status-log-link { text-decoration: none; width: fit-content; }
.feed-status-log-link:hover,
.feed-status-log-link:focus-visible { color: #ffb0ad; text-decoration: underline; outline: 0; }
@media (prefers-reduced-motion: reduce) {
  .config-extension-cell.is-starting .config-extension-number,
  .config-call-state.is-starting::before { animation: none; }
}

/* Realtime feeds, in cyan against the orange of GTFS timetable feeds. */
.config-connection-mode.mode-p2p {
  background: linear-gradient(180deg, #234149 0%, #1f3740 100%);
  border-color: rgba(0,199,238,0.52);
  color: #53d8ef;
}

/* Two-column overview (Feeds page: subscribed feeds + created feeds). */
.feeds-overview-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; align-content: start; }
.feeds-col-title { color: var(--config-text, #d6d8da); font-size: 14px; font-weight: 600; display: flex; align-items: center; }
@media (max-width: 991px) { .feeds-overview-columns { grid-template-columns: 1fr; } }
.feeds-overview-columns .extensions-config-grid .mvc-grid-table > table { min-width: 0; }
.feeds-overview-columns .config-grid-shell { border: 1px solid var(--config-border); border-radius: 6px; }
/* Grid items default to min-width:auto; let each column shrink to the screen. */
.feeds-overview-col { min-width: 0; }

/* Feed type chips: long types ("AIDX Schedule via REST Api") wrap inside the chip
   instead of overflowing the cell or widening the table. */
.extensions-config-grid:is(.feeds-data-grid, .ingest-jobs-grid) .config-connection-mode {
  height: auto;
  line-height: 1.25;
  max-width: 150px;
  min-height: 32px;
  padding: 4px 10px;
  text-align: center;
  white-space: normal;
}
@media (max-width: 767px) {
  .extensions-config-grid:is(.feeds-data-grid, .ingest-jobs-grid) .config-connection-mode { min-height: 22px; padding: 3px 8px; }
}

/* Long values (descriptions, error messages, timestamps) wrap inside their cells
   instead of widening the table past the page; only the action buttons stay on
   one line. */
.extensions-config-grid:is(.feeds-data-grid, .feeds-created-grid, .ingest-jobs-grid, .dp-jobs-grid) .mvc-grid-table td:not(.config-actions-cell) { white-space: normal; }
@media (min-width: 768px) {
  /* Timestamps are short and fixed-length; keep them on one line. */
  .ingest-jobs-grid .ingest-job-last-run-cell .config-cell-copy small { white-space: nowrap; }
}
.extensions-config-grid:is(.feeds-data-grid, .feeds-created-grid, .ingest-jobs-grid, .dp-jobs-grid) :is(.config-extension-cell, .config-cell-copy) { min-width: 0; }
.extensions-config-grid:is(.feeds-data-grid, .feeds-created-grid, .ingest-jobs-grid, .dp-jobs-grid) :is(.config-cell-copy strong, .config-cell-copy small, .config-call-state) {
  overflow: visible;
  overflow-wrap: break-word;
  text-overflow: clip;
  white-space: normal;
}
@media (max-width: 767px) {
  .extensions-config-grid:is(.feeds-data-grid, .feeds-created-grid, .ingest-jobs-grid, .dp-jobs-grid) .mvc-grid-table td { min-width: 0; }
  .extensions-config-grid:is(.feeds-data-grid, .feeds-created-grid, .ingest-jobs-grid, .dp-jobs-grid) :is(.config-cell-copy strong, .config-cell-copy small, .config-call-state) { overflow-wrap: anywhere; }
}
.sp-app .feeds-data-grid .mvc-grid-table :is(th,td):nth-child(2) { text-align: center; }

.config-actions-cell { text-align: center !important; vertical-align: middle !important; }
.sp-app .config-actions-cell .extension-row-actions { margin-inline: auto; }
.sp-app .extensions-config-grid .mvc-grid-table > table > thead > tr > th.config-actions-cell { text-align: center !important; }

/* --- shared helpers ------------------------------------------------------ */
.rta-text { color: #c9ccce; font-size: 12px; line-height: 1.5; margin: 0; }
.rta-error-detail { color: #d7d9da; font-size: 12px; margin: 0; overflow-wrap: anywhere; }
.rta-error-detail code,
.rta-error-detail pre { color: #f0a3a3; white-space: pre-wrap; }

/* --- dashboard ----------------------------------------------------------- */
.rta-dashboard-tile .dashboardDeviceHero strong { color: var(--sp-text-strong); }
.rta-dashboard-tile .dashboardDeviceHero strong.dashboardGood,
.rta-dashboard-tile .dashboardDeviceHero strong.dashboardWarning { font-size: 20px; font-weight: 600; }
.rta-dashboard-list {
  flex: 1 1 auto;
  list-style: none;
  margin: 0;
  min-height: 0;
  overflow: auto;
  padding: 3px 11px;
}
.rta-dashboard-list li {
  align-items: center;
  border-bottom: 1px solid rgba(72, 72, 72, 0.7);
  color: var(--sp-text-strong);
  display: flex;
  font-size: 12px;
  font-weight: 500;
  gap: 10px;
  min-height: 42px;
  padding: 7px 2px;
}
.rta-dashboard-list li:last-child { border-bottom: 0; }
.rta-dashboard-list li > i { color: var(--sp-cyan); flex: 0 0 16px; font-size: 12px; text-align: center; }
.rta-dashboard-list li > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rta-dashboard-pairs { min-height: 0; overflow: auto; }
.rta-dashboard-pairs dt { color: var(--sp-text-strong); font-size: 12px; font-weight: 500; }
.rta-dashboard-pairs dd { color: var(--sp-cyan); font-variant-numeric: tabular-nums; }
.rta-dashboard-tile .dashboardTileLink {
  box-sizing: border-box;
  flex: 0 0 46px;
  margin-top: auto;
  min-height: 46px;
}

/* --- list pages: toolbar -------------------------------------------------- */
.rta-toolbar--search { grid-template-columns: minmax(0, 520px); }
.extension-filter-field input.grid-search {
  background: #1e1e1e;
  border: 1px solid #404040;
  border-radius: 5px;
  color: var(--config-text, #d6d8da);
  font-size: 12px;
  height: 30px;
  padding: 0 8px;
  width: 100%;
}

/* --- MVC Grid --------------------------------------------------------------- */
.rta-grid .mvc-grid-table > table { min-width: 760px; width: 100%; }
.rta-ingest-grid .mvc-grid-table > table { min-width: 1180px; }
.rta-compact-grid .mvc-grid-table > table { min-width: 0; }
.rta-grid td.rta-col-primary { color: #e8eaeb; font-weight: 500; white-space: normal; }
.rta-grid td.rta-col-status { color: #9bd6e9; white-space: normal; }

.rta-grid th.config-actions-cell,
.rta-grid td.config-actions-cell { text-align: center; white-space: nowrap; width: 1%; }
.rta-grid .config-actions-cell .extension-row-actions { display: inline-flex; margin-inline: auto; }
.rta-grid .config-action { cursor: pointer; font-family: inherit; }
.rta-grid .config-action > i { font-size: 14px; line-height: 1; }
.rta-grid .config-action > span {
  clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden;
  position: absolute; white-space: nowrap; width: 1px;
}
.extensions-config-grid .rta-action-link { color: #5bcce2; }
.extensions-config-grid .rta-action-link:hover { background: rgba(0, 199, 238, 0.15); color: #72e1f5; }

/* Text row buttons used by the Data Processing source/agency selection grids. */
.rta-row-button {
  align-items: center;
  background: rgba(0, 199, 238, 0.12);
  border: 1px solid rgba(0, 199, 238, 0.45);
  border-radius: 5px;
  color: #8fe6f6 !important;
  display: inline-flex;
  font-size: 11px;
  font-weight: 600;
  height: 26px;
  justify-content: center;
  min-width: 64px;
  padding: 0 10px;
  text-decoration: none;
}
.rta-row-button:hover { background: rgba(0, 199, 238, 0.22); color: #fff !important; }
.rta-row-button--remove { background: rgba(224, 91, 91, 0.12); border-color: rgba(224, 91, 91, 0.5); color: #f0a3a3 !important; }
.rta-row-button--remove:hover { background: rgba(224, 91, 91, 0.22); }

/* NonFactors MVC Grid header controls on the dark theme. */
.sp-app .mvc-grid-sort {
  background: transparent;
  color: #8f9497;
  display: block;
  font-family: inherit;
}
.sp-app .mvc-grid-sort span { display: none; }
.sp-app .mvc-grid-sort::before,
.sp-app .mvc-grid-sort::after {
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  content: "";
  left: 50%;
  margin: 0;
  opacity: 0.28;
  position: absolute;
  transform: translateX(-50%);
}
.sp-app .mvc-grid-sort::before { border-bottom: 4px solid currentColor; top: calc(50% - 5px); }
.sp-app .mvc-grid-sort::after { border-top: 4px solid currentColor; bottom: calc(50% - 5px); }
.sp-app .mvc-grid-table .asc .mvc-grid-sort::before,
.sp-app .mvc-grid-table .desc .mvc-grid-sort::after { color: var(--sp-cyan); opacity: 1; }
.sp-app .rta-logs-page .mvc-grid-table th.sortable { cursor: pointer; padding-right: 24px; }
.sp-app .mvc-grid-filter { background: transparent; color: #8f9497; }
.sp-app .mvc-grid-filter::before {
  content: "\f0b0";
  font-family: "Font Awesome 6 Free";
  font-size: 11px;
  font-weight: 900;
}
.sp-app .mvc-grid-filter:hover,
.sp-app .mvc-grid-filter:focus { background: rgba(255, 255, 255, 0.06); color: #e1e3e4; }
.sp-app .mvc-grid-filter.applied { color: var(--sp-cyan); }
.sp-app .mvc-grid-empty-row td { color: var(--sp-muted); text-align: center; }
.sp-app .mvc-grid-table input[type="checkbox"] { accent-color: var(--sp-cyan); }

/* Column filter popup (rendered by mvc-grid.js at the end of <body>). */
.sp-app .mvc-grid-popup {
  background: #292b2c;
  border: 1px solid #46494b;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  color: #d7d9da;
  font-family: var(--sp-font);
  font-size: 13px;
}
.sp-app .mvc-grid-popup .popup-arrow { border-bottom-color: #292b2c; }
.sp-app .mvc-grid-popup .popup-arrow::after { border-bottom-color: #46494b; }
.sp-app .mvc-grid-popup .mvc-grid-value,
.sp-app .mvc-grid-popup .mvc-grid-method,
.sp-app .mvc-grid-popup .mvc-grid-operator {
  background: #1d1f20;
  border: 1px solid #4b4e50;
  border-radius: 5px;
  color: #e4e6e7;
  color-scheme: dark;
}
.sp-app .mvc-grid-popup .mvc-grid-apply,
.sp-app .mvc-grid-popup .mvc-grid-cancel { border-radius: 5px; font: 600 11px var(--sp-font); min-height: 30px; padding: 0 12px; }
.sp-app .mvc-grid-popup .mvc-grid-apply { background: linear-gradient(180deg, #1ed2ef 0%, #06a8c6 100%); border-color: #2cdbf6; color: #092229; }
.sp-app .mvc-grid-popup .mvc-grid-cancel { background: #343637; border-color: #54585b; color: #d7d9da; }

.mvc-grid-pager-mobile-label,
.mvc-grid-pager-mobile-page { display: none; }

/* --- detail / form pages -------------------------------------------------- */
.rta-detail-page .config-edit-tab-content { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
/* Grid items default to min-width:auto, so a wide child (the realtime sources table)
   would widen the whole form instead of scrolling inside its own wrapper. */
.rta-detail-page .config-edit-tab-content > *,
.rta-detail-page .config-edit-section,
.rta-grid-pair > *,
.rta-table-wrap { min-width: 0; }
.rta-detail-page .config-edit-save-row { margin-top: 4px; }
.rta-detail-page .config-edit-section .form-control { box-sizing: border-box; width: 100%; }
.rta-detail-page .config-edit-section select.form-control { color-scheme: dark; }
.rta-detail-page .config-edit-section input[type="time"],
.rta-detail-page .config-edit-section input[type="number"] { color-scheme: dark; }
.rta-detail-page .config-edit-section .form-control[readonly] { opacity: 0.7; }
.rta-field { display: grid; gap: 4px; min-width: 0; }
.rta-check { align-items: center; display: flex; gap: 10px; min-height: 34px; }
.rta-check input[type="checkbox"] { accent-color: var(--sp-cyan); cursor: pointer; height: 18px; margin: 0; width: 18px; }
.rta-inline-action { align-items: center; display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr) max-content; }
.rta-inline-action .usersubmit-secondary { min-height: 34px; }
.rta-detail-page .config-edit-section label.rta-feedtype-label { color: #f3a576 !important; font-size: 13px; font-weight: 600; }
.rta-listbox select.form-control { min-height: 180px; padding: 6px; }
.rta-listbox select.form-control option { border-radius: 4px; padding: 6px 8px; }
.rta-listbox select.form-control option:checked { background: rgba(0, 199, 238, 0.28); color: #fff; }

.rta-grid-pair { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rta-grid-panel {
  background: var(--sp-surface);
  border: 1px solid #46494b;
  border-radius: 8px;
  min-width: 0;
  overflow: hidden;
}
.rta-grid-panel .extension-filter-bar { --config-border: #46494b; --config-muted: #a0a0a0; --config-text: #d6d8da; grid-template-columns: minmax(0, 1fr) minmax(160px, 260px); }
.rta-grid-panel .config-grid-shell { border-radius: 0; }

.rta-table-wrap { overflow-x: auto; }
.rta-table { border-collapse: collapse; min-width: 560px; width: 100%; }
.rta-table th {
  background: linear-gradient(180deg, #252525 0%, #1c1c1c 100%);
  border-bottom: 2px solid #555;
  color: #dadddf;
  font-size: 12px;
  font-weight: 500;
  height: 40px;
  padding: 6px 10px;
  text-align: left;
}
.rta-table td {
  background: #2c2c2c;
  border-bottom: 1px solid rgba(82, 82, 82, 0.82);
  color: #cdd0d2;
  font-size: 12px;
  height: 42px;
  padding: 6px 10px;
}
.rta-table tbody tr:nth-child(even) td { background: #292b2c; }
.rta-table input[type="checkbox"] { accent-color: var(--sp-cyan); height: 16px; width: 16px; }

@media (max-width: 991px) {
  .rta-grid-pair { grid-template-columns: minmax(0, 1fr); }
}

/* Phones: the realtime source table becomes one card per source with labelled
   checkboxes. CSS only - the cells keep their order, which the save script reads. */
@media (max-width: 767px) {
  #tableRtSources { display: block; min-width: 0; }
  #tableRtSources thead { display: none; }
  #tableRtSources tbody { display: grid; gap: 8px; }
  #tableRtSources tbody tr { background: #2c2c2c; border: 1px solid #3a3d3f; border-left: 4px solid #00bddf; border-radius: 7px; display: grid; overflow: hidden; }
  #tableRtSources tbody td { align-items: center; background: transparent !important; border-bottom: 1px solid #414446; display: flex; gap: 12px; height: auto; justify-content: space-between; min-height: 44px; padding: 8px 12px; }
  #tableRtSources tbody td:nth-child(1) { color: #e8eaeb; font-weight: 600; overflow-wrap: anywhere; }
  #tableRtSources tbody td:nth-child(4) { border-bottom: 0; }
  #tableRtSources tbody td:nth-child(2)::before { content: "Include Service Alerts"; }
  #tableRtSources tbody td:nth-child(3)::before { content: "Include Trip Updates"; }
  #tableRtSources tbody td:nth-child(4)::before { content: "Include Vehicle Positions"; }
  #tableRtSources tbody td::before { color: #aeb2b4; font-size: 12px; }
  #tableRtSources input[type="checkbox"] { flex: 0 0 auto; height: 20px; width: 20px; }
}

/* --- logs ----------------------------------------------------------------- */
.rta-logs-page .logs-mvc-grid .mvc-grid-sort { display: block; }
.rta-logs-page .rta-logs-user-table { table-layout: fixed; }
.rta-logs-page .rta-logs-user-table th:nth-child(1) { width: 165px; }
.rta-logs-page .rta-logs-user-table th:nth-child(2) { width: 125px; }
.rta-logs-page .rta-logs-user-table th:nth-child(3) { width: 200px; }
.rta-logs-page .rta-logs-user-table th:nth-child(4) { width: 160px; }
.rta-logs-page .rta-logs-user-table th:nth-child(5) { width: auto; }

/* --- mobile ------------------------------------------------------------------ */
@media (max-width: 767px) {
  .rta-toolbar--search { grid-template-columns: minmax(0, 1fr); padding: 10px; }
  .extension-filter-field input.grid-search { font-size: 16px; height: 40px; }
  .rta-grid-panel .extension-filter-bar { grid-template-columns: minmax(0, 1fr); }

  .rta-grid .mvc-grid-table { overflow: visible; }
  .rta-grid .mvc-grid-table > table { display: block; min-width: 0 !important; width: 100%; }
  .rta-grid .mvc-grid-table > table > thead { display: none; }
  .rta-grid .mvc-grid-table > table > tbody { display: grid; gap: 8px; padding: 8px; }
  .rta-grid .mvc-grid-table > table > tbody > tr {
    background: #2c2c2c;
    border: 1px solid #3a3d3f;
    border-radius: 7px;
    box-shadow: inset 3px 0 0 #545454;
    display: grid;
    gap: 8px 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px 12px;
  }
  .rta-grid .mvc-grid-table > table > tbody > tr > td,
  .rta-grid .mvc-grid-table > table > tbody > tr:hover > td,
  .rta-grid .mvc-grid-table > table > tbody > tr:nth-child(even) > td,
  .rta-grid .mvc-grid-table > table > tbody > tr > td:first-child {
    background: transparent;
    border: 0;
    box-shadow: none;
    display: block;
    height: auto;
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 0;
    text-align: left;
    white-space: normal;
  }
  .rta-grid .mvc-grid-table > table > tbody > tr > td[data-label]::before {
    color: #8f959a;
    content: attr(data-label);
    display: block;
    font-size: 9px;
    letter-spacing: 0.05em;
    margin-bottom: 3px;
    text-transform: uppercase;
  }
  .rta-grid .mvc-grid-table > table > tbody > tr > td.config-actions-cell {
    border-top: 1px solid #414446;
    grid-column: 1 / -1;
    padding-top: 8px;
    width: auto;
  }
  .rta-grid .mvc-grid-table > table > tbody > tr > td.config-actions-cell::before { margin-bottom: 6px; }
  .rta-grid .config-actions-cell .extension-row-actions { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
  .rta-grid .config-action {
    border: 1px solid #4b4f51 !important;
    border-radius: 5px !important;
    flex: 1 1 calc(50% - 6px);
    gap: 6px;
    height: 36px;
  }
  .rta-grid .config-action > span {
    clip: auto; clip-path: none; font-size: 11px; font-weight: 600; height: auto;
    overflow: visible; position: static; width: auto;
  }
  .rta-grid .mvc-grid-empty-row { display: block; }
  .rta-grid .mvc-grid-empty-row > td { display: block; padding: 14px; }
  .rta-grid .mvc-grid-empty-row > td::before { display: none !important; }

  .sp-app .mvc-grid-pager.mvc-grid-pager--single { display: none !important; }
  .sp-app .rta-grid .mvc-grid-pager {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    height: auto;
    justify-content: center;
    min-height: 48px;
    padding: 6px 8px;
  }
  .sp-app .mvc-grid-pager .mvc-grid-pager-page,
  .sp-app .mvc-grid-pager .mvc-grid-page-sizes { display: none; }
  .sp-app .mvc-grid-pager :is(.mvc-grid-pager-first, .mvc-grid-pager-last) {
    align-items: center; display: inline-flex; flex: 0 0 40px; height: 40px;
    justify-content: center; line-height: 1; min-width: 40px; padding: 0;
  }
  .sp-app .mvc-grid-pager :is(.mvc-grid-pager-previous, .mvc-grid-pager-next) {
    align-items: center; display: inline-flex; gap: 5px; height: 40px;
    justify-content: center; line-height: 1; min-width: 50px; padding: 0 8px;
  }
  .mvc-grid-pager-mobile-label { display: inline; font-size: 9px; font-weight: 600; }
  .mvc-grid-pager-mobile-page {
    align-items: center;
    background: #202223;
    border: 1px solid #45494b;
    border-radius: 5px;
    color: #aeb3b6;
    display: inline-flex;
    flex: 1 1 auto;
    font-size: 10px;
    gap: 3px;
    height: 40px;
    justify-content: center;
    max-width: 110px;
    min-width: 84px;
    padding: 0 8px;
  }
  .mvc-grid-pager-mobile-page strong { color: #e5e7e8; font-weight: 600; }

  .rta-inline-action { grid-template-columns: minmax(0, 1fr); }
  .rta-detail-page .config-edit-save-row > * { flex: 1 1 auto; justify-content: center; text-align: center; }

  .rta-logs-page .logs-header-actions { flex-wrap: wrap; gap: 8px; }
  .rta-logs-page .logs-scope a { white-space: nowrap; }
  .rta-logs-page .rta-logs-user-table tbody td:nth-child(1) {
    color: #a9adb0; font-family: "SFMono-Regular", Menlo, Monaco, Consolas, monospace; font-size: 10px;
    grid-column: 2; grid-row: 1; justify-self: end; white-space: nowrap;
  }
  .rta-logs-page .rta-logs-user-table tbody td:nth-child(2) { grid-column: 1; grid-row: 1; }
  .rta-logs-page .rta-logs-user-table tbody td:nth-child(5) { grid-column: 1 / -1; grid-row: 2; }
  .rta-logs-page .rta-logs-user-table tbody td:nth-child(5) .log-message-content { overflow-wrap: anywhere; white-space: normal; }
  .rta-logs-page .rta-logs-user-table tbody td:nth-child(3) { color: #8f9497; font-size: 10px; grid-column: 1; grid-row: 3; }
  .rta-logs-page .rta-logs-user-table tbody td:nth-child(4) { color: #8f9497; font-size: 10px; grid-column: 2; grid-row: 3; justify-self: end; text-align: right; }
}

@media (max-width: 359px) {
  .sp-app .mvc-grid-pager { gap: 4px; padding-inline: 6px; }
  .sp-app .mvc-grid-pager :is(.mvc-grid-pager-first, .mvc-grid-pager-last, .mvc-grid-pager-previous, .mvc-grid-pager-next) {
    flex-basis: 36px; min-width: 36px; padding-inline: 0;
  }
  .sp-app .mvc-grid-pager :is(.mvc-grid-pager-previous, .mvc-grid-pager-next) .mvc-grid-pager-mobile-label { display: none; }
  .mvc-grid-pager-mobile-page { min-width: 82px; padding-inline: 6px; }
}


/* --- Ingest jobs: GTFS card layout, RTA columns (6 actions) ---------------- */
.ingest-overview-page .extensions-config-grid .mvc-grid-table :is(th,td):nth-child(2),
.ingest-overview-page .extensions-config-grid .mvc-grid-table :is(th,td):nth-child(5) { text-align:center; }
.ingest-overview-page .extensions-config-grid .mvc-grid-table td:nth-child(5) .config-integration-cell { align-items:center; }
.ingest-job-mobile-label,
.ingest-job-actions-cell .config-action > span { display:none; }

@media (max-width:767px) {
  .ingest-jobs-grid .mvc-grid-table { overflow:visible; }
  .ingest-jobs-grid .mvc-grid-table > table { min-width:0; table-layout:auto; width:100%; }
  .ingest-jobs-grid .mvc-grid-table > table > thead { display:none; }
  .ingest-jobs-grid .mvc-grid-table > table > tbody { display:grid; gap:10px; padding:10px; }
  .ingest-jobs-grid .mvc-grid-table > table > tbody > tr {
    align-items:stretch;
    background:#292b2c;
    border:1px solid #484b4d;
    border-left:4px solid #00bddf;
    border-radius:7px;
    display:grid;
    gap:0;
    grid-template-columns:repeat(2,minmax(0,1fr));
    overflow:hidden;
    padding:0;
  }
  .ingest-jobs-grid .mvc-grid-table > table > tbody > tr > td,
  .ingest-jobs-grid .mvc-grid-table > table > tbody > tr:hover > td,
  .ingest-jobs-grid .mvc-grid-table > table > tbody > tr:nth-child(even) > td {
    align-items:flex-start;
    background:transparent;
    border:0;
    box-shadow:none;
    box-sizing:border-box;
    display:flex;
    height:auto;
    min-height:0;
    min-width:0;
    text-align:left;
    width:auto;
  }
  .ingest-jobs-grid .ingest-job-identity-cell { border-bottom:1px solid #414446 !important; grid-column:1 / -1; padding:12px !important; }
  .ingest-job-identity-cell .config-extension-cell,
  .ingest-job-identity-cell .config-cell-copy { min-width:0; }
  .ingest-job-identity-cell .config-cell-copy strong { overflow-wrap:anywhere; white-space:normal; }
  .ingest-jobs-grid :is(.ingest-job-type-cell,.ingest-job-agencies-cell,.ingest-job-status-cell,.ingest-job-last-run-cell) {
    flex-direction:column;
    gap:5px;
    padding:10px 12px !important;
  }
  .ingest-jobs-grid :is(.ingest-job-type-cell,.ingest-job-status-cell) { border-right:1px solid #414446 !important; }
  .ingest-jobs-grid :is(.ingest-job-type-cell,.ingest-job-agencies-cell) { border-bottom:1px solid #414446 !important; }
  .ingest-jobs-grid .ingest-job-type-cell { grid-row:2; grid-column:1; }
  .ingest-jobs-grid .ingest-job-agencies-cell { grid-row:2; grid-column:2; }
  .ingest-job-mobile-label {
    color:#8f9497;
    display:block;
    font-size:9px;
    font-weight:700;
    letter-spacing:.06em;
    line-height:1.2;
    text-transform:uppercase;
  }
  .ingest-jobs-grid :is(.ingest-job-status-cell,.ingest-job-last-run-cell) .config-cell-copy { min-width:0; width:100%; }
  .ingest-jobs-grid :is(.ingest-job-status-cell,.ingest-job-last-run-cell) .config-cell-copy small { overflow-wrap:anywhere; white-space:normal; }
  .ingest-jobs-grid .ingest-job-agencies-cell .config-integration-cell { align-items:flex-start !important; }
  .ingest-jobs-grid .ingest-job-actions-cell { border-top:1px solid #414446 !important; grid-column:1 / -1; padding:8px !important; }
  .ingest-jobs-grid .ingest-job-actions-cell .extension-row-actions {
    background:#232526;
    border:1px solid #4b4f51;
    border-radius:6px;
    display:grid;
    gap:0;
    grid-template-columns:repeat(6,minmax(0,1fr));
    margin:0;
    min-width:0;
    overflow:hidden;
    width:100%;
  }
  .ingest-jobs-grid .ingest-job-actions-cell .config-action {
    align-items:center;
    border:0;
    border-radius:0;
    display:flex;
    flex-direction:column;
    gap:3px;
    height:50px;
    justify-content:center;
    padding:5px 2px;
    width:100%;
  }
  .ingest-jobs-grid .ingest-job-actions-cell .config-action + .config-action { border-left:1px solid #4b4f51; }
  .ingest-jobs-grid .ingest-job-actions-cell .config-action:hover,
  .ingest-jobs-grid .ingest-job-actions-cell .config-action:focus-visible { background:#303334; }
  .ingest-job-actions-cell .config-action > span { color:#cfd2d4; display:block; font-size:8px; font-weight:600; line-height:1; }
}

/* --- Data processing jobs: same card language as ingest --------------------- */
.dp-overview-page .extensions-config-grid .mvc-grid-table :is(th,td):nth-child(3) { text-align:center; }
.dp-job-mobile-label,
.dp-jobs-grid :is(.dp-job-actions-cell,.dp-job-feeds-cell) .config-action > span { display:none; }

@media (max-width:767px) {
  .dp-jobs-grid .mvc-grid-table { overflow:visible; }
  .dp-jobs-grid .mvc-grid-table > table { min-width:0; table-layout:auto; width:100%; }
  .dp-jobs-grid .mvc-grid-table > table > thead { display:none; }
  .dp-jobs-grid .mvc-grid-table > table > tbody { display:grid; gap:10px; padding:10px; }
  .dp-jobs-grid .mvc-grid-table > table > tbody > tr {
    align-items:stretch;
    background:#292b2c;
    border:1px solid #484b4d;
    border-left:4px solid #00bddf;
    border-radius:7px;
    display:grid;
    gap:0;
    grid-template-columns:repeat(2,minmax(0,1fr));
    overflow:hidden;
    padding:0;
  }
  .dp-jobs-grid .mvc-grid-table > table > tbody > tr > td,
  .dp-jobs-grid .mvc-grid-table > table > tbody > tr:hover > td,
  .dp-jobs-grid .mvc-grid-table > table > tbody > tr:nth-child(even) > td {
    align-items:flex-start;
    background:transparent;
    border:0;
    box-shadow:none;
    box-sizing:border-box;
    display:flex;
    height:auto;
    min-height:0;
    min-width:0;
    text-align:left;
    width:auto;
  }
  .dp-jobs-grid .dp-job-identity-cell { border-bottom:1px solid #414446 !important; grid-column:1 / -1; padding:12px !important; }
  .dp-job-identity-cell .config-extension-cell,
  .dp-job-identity-cell .config-cell-copy { min-width:0; }
  .dp-job-identity-cell .config-cell-copy strong { overflow-wrap:anywhere; white-space:normal; }
  .dp-jobs-grid :is(.dp-job-interval-cell,.dp-job-apikey-cell) { flex-direction:column; gap:5px; padding:10px 12px !important; }
  .dp-jobs-grid .dp-job-interval-cell { border-right:1px solid #414446 !important; }
  .dp-job-mobile-label {
    color:#8f9497;
    display:block;
    font-size:9px;
    font-weight:700;
    letter-spacing:.06em;
    line-height:1.2;
    text-transform:uppercase;
  }
  .dp-jobs-grid :is(.dp-job-actions-cell,.dp-job-feeds-cell) { border-top:1px solid #414446 !important; grid-column:1 / -1; padding:8px !important; }
  .dp-jobs-grid :is(.dp-job-actions-cell,.dp-job-feeds-cell) .extension-row-actions {
    background:#232526;
    border:1px solid #4b4f51;
    border-radius:6px;
    display:grid;
    gap:0;
    grid-template-columns:repeat(4,minmax(0,1fr));
    margin:0;
    min-width:0;
    overflow:hidden;
    width:100%;
  }
  .dp-jobs-grid .dp-job-feeds-cell .extension-row-actions { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .dp-jobs-grid :is(.dp-job-actions-cell,.dp-job-feeds-cell) .config-action {
    align-items:center;
    border:0;
    border-radius:0;
    display:flex;
    flex-direction:column;
    gap:3px;
    height:50px;
    justify-content:center;
    padding:5px 2px;
    width:100%;
  }
  .dp-jobs-grid :is(.dp-job-actions-cell,.dp-job-feeds-cell) .config-action + .config-action { border-left:1px solid #4b4f51; }
  .dp-jobs-grid :is(.dp-job-actions-cell,.dp-job-feeds-cell) .config-action:hover { background:#303334; }
  .dp-jobs-grid :is(.dp-job-actions-cell,.dp-job-feeds-cell) .config-action > span { color:#cfd2d4; display:block; font-size:8px; font-weight:600; line-height:1; }
}

/* --- Nodes: GTFS runtime-nodes table, RTA columns ---------------------------- */
.rta-nodes-table { border-collapse:separate; border-spacing:0; color:#cdd0d2; margin:0; min-width:880px; width:100%; }
.rta-nodes-table > thead > tr > th { background:linear-gradient(180deg,#252525 0%,#1c1c1c 100%); border:0; border-bottom:2px solid #555; color:#dadddf; font-size:13px; font-weight:500; height:44px; padding:7px 12px; vertical-align:middle; }
.rta-nodes-table > tbody > tr > td { background:#2c2c2c; border:0; border-bottom:1px solid rgba(82,82,82,.82); border-top:1px solid rgba(82,82,82,.82); color:#cdd0d2; font-size:12px; height:50px; padding:6px 12px; vertical-align:middle; }
.rta-nodes-table > tbody > tr > td:first-child { box-shadow:inset 3px 0 0 #545454; }
.sp-app .rta-nodes-table .rta-node-metric { font-variant-numeric:tabular-nums; text-align:center; }
.rta-nodes-table > tbody > tr:nth-child(even) > td { background:#292b2c; }
.rta-nodes-table > tbody > tr:hover > td { background:#353535; }
.rta-node-mobile-label { display:none; }

@media (max-width:767px) {
  .rta-nodes-grid .mvc-grid-table { overflow:visible; }
  .rta-nodes-table { min-width:0; table-layout:auto; width:100%; }
  .rta-nodes-table > thead { display:none; }
  .rta-nodes-grid .rta-nodes-table > tbody { display:grid; gap:10px; padding:10px; }
  .rta-nodes-table > tbody > tr[data-node-row] {
    align-items:stretch;
    background:#292b2c;
    border:1px solid #484b4d;
    border-left:4px solid #00bddf;
    border-radius:7px;
    display:grid;
    gap:0;
    grid-template-columns:repeat(2,minmax(0,1fr));
    overflow:hidden;
    padding:0;
    position:relative;
  }
  .rta-nodes-table > tbody > tr[data-node-row][data-node-status="offline"] { border-left-color:#6b6f72; }
  .rta-nodes-table > tbody > tr[data-node-row] > td,
  .rta-nodes-table > tbody > tr[data-node-row]:hover > td,
  .rta-nodes-table > tbody > tr[data-node-row]:nth-child(even) > td {
    align-items:flex-start;
    background:transparent;
    border:0;
    box-shadow:none;
    box-sizing:border-box;
    display:flex;
    flex-direction:column;
    gap:5px;
    height:auto;
    min-height:0;
    min-width:0;
    padding:10px 12px !important;
    text-align:left;
    width:auto;
  }
  .rta-nodes-table .rta-node-identity-cell { border-bottom:1px solid #414446 !important; grid-column:1 / -1; padding:12px !important; }
  .rta-node-identity-cell .config-extension-cell { min-width:0; width:100%; }
  .rta-node-identity-cell .config-cell-copy { min-width:0; }
  .rta-node-identity-cell .config-cell-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .rta-nodes-table :is(.rta-node-status-cell,.rta-node-user-cell,.rta-node-updated-cell,.rta-node-ingest-cell) { border-bottom:1px solid #414446 !important; }
  .rta-nodes-table :is(.rta-node-status-cell,.rta-node-updated-cell,.rta-node-jobs-cell) { border-right:1px solid #414446 !important; }
  .rta-nodes-table .rta-node-cpu-cell { grid-column:2; }
  .rta-node-mobile-label {
    color:#8f9497;
    display:block;
    font-size:9px;
    font-weight:700;
    letter-spacing:.06em;
    line-height:1.2;
    text-transform:uppercase;
  }
  .rta-node-updated-cell .config-cell-copy { align-items:flex-start; flex-direction:column; gap:2px; min-width:0; }
  .rta-nodes-table :is(.rta-node-updated-cell .config-cell-copy strong,.rta-node-metric strong,.rta-node-user-cell strong) {
    color:#e1e3e4;
    font-size:12px;
    font-variant-numeric:tabular-nums;
    font-weight:600;
    overflow-wrap:anywhere;
  }
  .rta-node-updated-cell .config-cell-copy small { color:#929799; font-size:10px; font-variant-numeric:tabular-nums; }
  .sp-app .rta-nodes-table .rta-node-metric { text-align:left; }
}

@media (max-width:340px) {
  .rta-nodes-table > tbody > tr[data-node-row] > td { padding-inline:8px !important; }
  .rta-nodes-table .rta-node-mobile-label { font-size:8px; letter-spacing:.04em; }
}

/* --- System: LDAP settings and LDAP groups (ported from the GTFS app stylesheet) --- */
.system-groups-page .ldap-groups-config-grid .mvc-grid-table > table > thead > tr > th {
  font-size:11px;
  font-weight:600;
  padding:10px 12px;
}
.system-groups-page .ldap-groups-config-grid .mvc-grid-table > table > tbody > tr > td {
  font-size:11px;
  padding:10px 12px;
}
.system-groups-page .config-grid-shell.system-groups-table-wrap {
  border:1px solid #45484a;
  border-radius:7px;
}
.system-groups-page .ldap-groups-config-grid .mvc-grid-table > table > thead > tr > th:nth-child(1) { width:20%!important; }
.system-groups-page .ldap-groups-config-grid .mvc-grid-table > table > thead > tr > th:nth-child(2) { width:35%!important; }
.system-groups-page .ldap-groups-config-grid .mvc-grid-table > table > thead > tr > th:nth-child(3) { width:auto!important; }
.system-groups-page .ldap-groups-config-grid .mvc-grid-table > table > thead > tr > th:nth-child(4) { width:116px!important; }

.status-component-list > .status-component:hover { border-color: #5a5e60; }
.status-component-list > .status-component .status-trip-detail { cursor: default; }

/* LDAP settings additions that are app-local rather than part of the packaged
   SmartPi.UI LDAP layout: the right-hand column that now stacks Directory above
   Verify, the Bind DN row, the lockout warning and the Test User result panel.
   All of these reuse the packaged .ldap-* type/colour scale so they read as one
   page with the sections the package already styles. */
.ldap-right-column { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ldap-connection-row--bind-dn { grid-template-columns: minmax(0,1fr); }
.ldap-field-grid--verify { gap: 10px; grid-template-columns: minmax(0,1fr); }

/* Sits under the enable toggle, so it uses the warning palette rather than the
   informational cyan of .ldap-compact-alert - enabling LDAP with a config that
   does not resolve is the one action on this page that can lock everyone out. */
.ldap-status-section small { color: #aeb2b4; display: block; font-size: 11px; line-height: 1.3; margin-top: 8px; }
.ldap-status-section small.ldap-lockout-warning {
	background: rgba(233,98,37,.08);
	border: 1px solid rgba(233,98,37,.3);
	border-radius: 5px;
	color: #f0b18d;
	padding: 7px 9px;
}
.ldap-status-section small.ldap-lockout-warning code { color: #f3935f; }

.ldap-test-user-detail { min-width: 0; }
.ldap-test-user-list {
	background: #1d1f20;
	border: 1px solid #4b4e50;
	border-radius: 5px;
	display: grid;
	font-size: 11px;
	gap: 4px 12px;
	grid-template-columns: max-content minmax(0,1fr);
	margin: 0;
	padding: 9px 10px;
}
.ldap-test-user-list dt { color: #8f9497; font-weight: 500; }
/* Group DNs and permission lists are long and arrive newline-separated from the
   lookup, so they wrap and break rather than forcing the panel to scroll. */
.ldap-test-user-list dd {
	color: #c8cbcd;
	margin: 0;
	min-width: 0;
	overflow-wrap: anywhere;
	white-space: pre-wrap;
}
.system-test-result--error { color: #f0b18d; }

/* LDAP directory pickers now use the shared .sp-directory-picker component from
   SmartPi.UI (smartpi-ui.css) instead of a local copy - see the "Add a shared
   .sp-directory-picker component" commit upstream. The shared component doesn't
   assume a grid ancestor, so the app has to span it across the field grid itself. */
#ldapBasePicker,
#ldapGroupPicker {
  grid-column: 1 / -1;

}

/* The shared ".app-breadcrumb + *" rule sets width:100%, which with the detail page margin
   overflows the content well by the margin width. Let the block size itself instead. */
.sp-content__well > .app-breadcrumb + .config-detail-page { width: auto; }

/* --- System > About ----------------------------------------------- */
.rta-about-page {
  --about-good: #31cc4b;
  --about-good-text: #8be39b;
  --about-warn: #e8a33a;
  --about-warn-text: #f2c46d;
  --about-bad: #e5484d;
  --about-bad-text: #ff8a8d;
  --about-idle: #7d8285;
}
.rta-about-sr {
  border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden;
  padding: 0; position: absolute; white-space: nowrap; width: 1px;
}
.rta-about-page .config-detail-header { align-items: center; display: flex; justify-content: space-between; gap: 10px; }
.rta-about-actions { flex-wrap: wrap; justify-content: flex-end; }
.rta-about-action {
  align-items: center; background: linear-gradient(180deg, #353535 0%, #242424 100%);
  border: 1px solid rgba(0, 0, 0, 0.72); border-radius: 6px; color: #f1f3f4; cursor: pointer;
  display: inline-flex; font-size: 12px; font-weight: 500; gap: 7px; min-height: 32px; padding: 6px 11px;
}
.rta-about-action:hover { background: #3c3c3c; }
.rta-about-action.is-done { color: var(--about-good-text); }
.rta-about-wide { grid-column: 1 / -1; }
.rta-about-page .config-edit-section-title { align-items: center; display: flex; gap: 10px; justify-content: space-between; }

/* State dots used by checks, badges and node rows. */
.rta-about-summary > i,
.rta-about-badge > i,
.rta-about-nodes li > i,
.rta-about-check > a > i,
.rta-about-check > div > i {
  background: var(--about-idle); border-radius: 50%; display: inline-block; flex: 0 0 auto; height: 8px; width: 8px;
}
.rta-about-page .rta-about-state-good i { background: var(--about-good); }
.rta-about-page .rta-about-state-warning i { background: var(--about-warn); }
.rta-about-page .rta-about-state-bad i { background: var(--about-bad); box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.2); }

.rta-about-summary { align-items: center; display: inline-flex; font-size: 11px; font-weight: 500; gap: 7px; }
.rta-about-summary.rta-about-state-good { color: var(--about-good-text); }
.rta-about-summary.rta-about-state-warning { color: var(--about-warn-text); }
.rta-about-summary.rta-about-state-bad { color: var(--about-bad-text); }

.rta-about-checks {
  display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); list-style: none; margin: 0; padding: 0;
}
.rta-about-check > a,
.rta-about-check > div {
  align-items: flex-start; background: #262626; border: 1px solid #3d4042; border-left-width: 3px;
  border-radius: 6px; box-sizing: border-box; color: inherit; display: flex; gap: 9px; height: 100%; padding: 8px 10px; text-decoration: none;
}
.rta-about-check > a:hover { background: #2f2f2f; }
.rta-about-check i { margin-top: 5px; }
.rta-about-check span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rta-about-check strong { color: #e0e2e3; font-size: 12px; font-weight: 600; }
.rta-about-check small { color: #9ba0a3; font-size: 11px; overflow-wrap: anywhere; }
.rta-about-check.rta-about-state-good > * { border-left-color: var(--about-good); }
.rta-about-check.rta-about-state-warning > * { border-left-color: var(--about-warn); }
.rta-about-check.rta-about-state-warning small { color: var(--about-warn-text); }
.rta-about-check.rta-about-state-bad > * { border-left-color: var(--about-bad); }
.rta-about-check.rta-about-state-bad small { color: var(--about-bad-text); }
.rta-about-check.rta-about-state-idle > * { border-left-color: var(--about-idle); }

/* Card hero: label on the left, big number on the right. */
.rta-about-hero {
  align-items: center; border-bottom: 1px solid #434648; display: flex; gap: 10px;
  justify-content: space-between; margin-bottom: 4px; padding: 2px 0 10px;
}
.rta-about-hero > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rta-about-hero-label { color: #92979a; font-size: 11px; }
.rta-about-hero-name { color: #f1f3f4; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.rta-about-hero-sub { color: #9ba0a3; font-size: 11px; }
.rta-about-page .system-info-list dd.rta-about-path { font-size: 11px; }
.rta-about-hero-value {
  align-items: flex-end; color: #f1f3f4; display: flex; flex-direction: column;
  font-size: 30px; font-variant-numeric: tabular-nums; font-weight: 600; line-height: 1; white-space: nowrap;
}
.rta-about-hero-value small { color: #92979a; font-size: 11px; font-weight: 400; margin-top: 4px; }

.rta-about-badge { align-items: center; display: inline-flex; font-weight: 500; gap: 7px; }
.rta-about-badge.rta-about-state-good { color: var(--about-good-text); }
.rta-about-badge.rta-about-state-warning { color: var(--about-warn-text); }
.rta-about-badge.rta-about-state-bad { color: var(--about-bad-text); }

.rta-about-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.rta-about-chip {
  background: rgba(233, 98, 37, 0.12); border: 1px solid rgba(233, 98, 37, 0.35); border-radius: 999px;
  color: #f28a59; display: inline-block; font-size: 10px; font-weight: 600; padding: 2px 8px;
}
.rta-about-chip-cyan { background: rgba(0, 199, 238, 0.1); border-color: rgba(0, 199, 238, 0.35); color: #5fd8f2; }

.rta-about-muted { color: #92979a; }
.rta-about-good { color: var(--about-good-text); }
.rta-about-warn { color: var(--about-warn-text); }
.rta-about-bad { color: var(--about-bad-text); }

.rta-about-nodes { display: flex; flex-direction: column; gap: 4px; list-style: none; margin: 8px 0 0; padding: 0; }
.rta-about-nodes li {
  align-items: center; background: #262626; border-radius: 5px; display: flex; font-size: 12px; gap: 8px; padding: 5px 8px;
}
.rta-about-nodes li span { color: #e0e2e3; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rta-about-nodes li em { color: #5fd8f2; font-size: 10px; font-style: normal; }
.rta-about-nodes li small { color: #92979a; font-size: 11px; margin-left: auto; }
.rta-about-link {
  align-items: center; color: #5fd8f2; display: inline-flex; font-size: 12px; gap: 6px; margin-top: 10px; text-decoration: none;
}
.rta-about-link:hover { color: #9be9fa; }
.rta-about-link i { font-size: 10px; }

.rta-about-feeds { border-collapse: collapse; font-size: 12px; margin-bottom: 6px; width: 100%; }
.rta-about-feeds th, .rta-about-feeds td { border-bottom: 1px solid #3a3d3f; padding: 5px 4px; text-align: right; }
.rta-about-feeds thead th { color: #92979a; font-size: 10px; font-weight: 500; text-transform: uppercase; }
.rta-about-feeds th[scope="row"], .rta-about-feeds thead th:first-child { color: #e0e2e3; font-weight: 500; text-align: left; }
.rta-about-feeds td { color: #c4c7c9; font-variant-numeric: tabular-nums; width: 38px; }
.rta-about-feeds tr.is-unlicensed th[scope="row"] { color: #7d8285; }
.rta-about-feeds th small { color: #7d8285; font-size: 10px; font-weight: 400; }

/* Validity bar (licence and HTTPS certificate): the filled part is the time left. */
.rta-about-validity { border-bottom: 1px solid #434648; padding: 8px 0 10px; }
.rta-about-validity-head { align-items: baseline; display: flex; font-size: 11px; justify-content: space-between; margin-bottom: 6px; }
.rta-about-validity-head span { color: #92979a; }
.rta-about-validity-head b { color: #e0e2e3; font-weight: 600; }
.rta-about-validity-bar { background: #1c1c1c; border: 1px solid #3d4042; border-radius: 999px; height: 8px; overflow: hidden; }
.rta-about-validity-bar span { background: var(--about-good); border-radius: 999px; display: block; height: 100%; min-width: 4px; }
.rta-about-validity.rta-about-state-warning .rta-about-validity-bar span { background: var(--about-warn); }
.rta-about-validity.rta-about-state-bad .rta-about-validity-bar span { background: var(--about-bad); }
.rta-about-validity.rta-about-state-warning .rta-about-validity-head b { color: var(--about-warn-text); }
.rta-about-validity.rta-about-state-bad .rta-about-validity-head b { color: var(--about-bad-text); }
.rta-about-validity-dates { color: #92979a; display: flex; font-size: 10px; gap: 8px; justify-content: space-between; margin-top: 5px; }
@media (max-width: 767px) {
  .rta-about-page .config-detail-header { align-items: flex-start; flex-direction: column; }
  .rta-about-actions { justify-content: flex-start; }
  .rta-about-checks { grid-template-columns: 1fr 1fr; }
  .rta-about-hero-value { font-size: 26px; }
}
@media (max-width: 420px) {
  .rta-about-checks { grid-template-columns: 1fr; }
  .rta-about-action-label { display: none; }
}

/* --- Top-bar licence and self-check badges ------------------------- */
.rta-topbar-badge {
  align-items: center; border: 1px solid transparent; border-radius: 999px; display: inline-flex;
  font-size: 12px; font-weight: 600; gap: 0; line-height: 1; padding: 5px 10px; text-decoration: none; white-space: nowrap;
}
.rta-topbar-badge[hidden] { display: none !important; }
.rta-topbar-badge i { font-size: 12px; margin-right: 6px; }
.rta-topbar-badge-label { white-space: pre; }
.rta-topbar-badge--warning { background: rgba(232, 163, 58, 0.14); border-color: rgba(232, 163, 58, 0.55); color: #f2c46d; }
.rta-topbar-badge--bad { background: rgba(229, 72, 77, 0.16); border-color: rgba(229, 72, 77, 0.6); color: #ff8a8d; }
.rta-topbar-badge--good, .rta-topbar-badge--idle { background: rgba(49, 204, 75, 0.12); border-color: rgba(49, 204, 75, 0.45); color: #8be39b; }
.rta-topbar-badge:hover { filter: brightness(1.15); }
/* The other top-bar items hide on phones; these stay, icon and count only. */
@media (max-width: 767px) {
  .rta-topbar-badge { font-size: 11px; padding: 4px 8px; }
}
/* Small phones: icon plus the number only ("12d", "4") so the badges never cover the logo. */
@media (max-width: 480px) {
  .rta-topbar-badge { padding: 4px 7px; }
  .rta-topbar-badge i { margin-right: 4px; }
  .rta-topbar-badge-label { display: none; }
  /* With both badges showing, give the logo slot a little less so they never overlap it. */
  .sp-topbar__inner:has(#topbarLicence:not([hidden])):has(#topbarHealth:not([hidden])) .sp-topbar__brand { max-width: calc(100vw - 205px); }
}

/* --- List insights: freshness bars, chips, history strips, meters ---- */
:root {
  --rta-ok: #31cc4b;
  --rta-ok-text: #8be39b;
  --rta-warn: #e8a33a;
  --rta-warn-text: #f2c46d;
  --rta-bad: #e5484d;
  --rta-bad-text: #ff8a8d;
  --rta-run: #00c7ee;
  --rta-idle: #5f6467;
}

/* Freshness / next-run / heartbeat bar with a short caption. */
.rta-fresh { display: flex; flex-direction: column; gap: 3px; margin-top: 5px; max-width: 190px; min-width: 0; }
.rta-fresh-bar { background: #1c1c1c; border: 1px solid #3d4042; border-radius: 999px; display: block; height: 6px; overflow: hidden; }
.rta-fresh-bar > span { background: var(--rta-ok); border-radius: 999px; display: block; height: 100%; transition: width .4s ease; }
.rta-fresh small { color: #9ba0a3; font-size: 10px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rta-fresh--good small { color: var(--rta-ok-text); }
.rta-fresh--warning .rta-fresh-bar > span { background: var(--rta-warn); }
.rta-fresh--warning small { color: var(--rta-warn-text); }
.rta-fresh--bad .rta-fresh-bar { border-color: rgba(229, 72, 77, .55); }
.rta-fresh--bad .rta-fresh-bar > span { background: var(--rta-bad); }
.rta-fresh--bad small { color: var(--rta-bad-text); font-weight: 600; }
.rta-fresh--idle .rta-fresh-bar > span { background: var(--rta-idle); }
.rta-fresh--next .rta-fresh-bar > span { background: var(--rta-run); }
.rta-fresh--next.rta-fresh--good small { color: #9ba0a3; }
.rta-fresh--compact { max-width: 150px; }

/* Small chips: deadline, backup, copy URL, API key. */
.rta-chip-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.rta-chip {
  align-items: center; background: #262626; border: 1px solid #404346; border-radius: 999px; color: #b9bdc0;
  display: inline-flex; font: 500 10px var(--sp-font, inherit); gap: 5px; line-height: 1; max-width: 100%;
  overflow: hidden; padding: 3px 8px; text-overflow: ellipsis; white-space: nowrap;
}
.rta-chip i { font-size: 10px; }
.rta-chip--time { border-color: rgba(0, 199, 238, .4); color: #5fd8f2; }
.rta-chip--backup { border-color: rgba(232, 163, 58, .45); color: var(--rta-warn-text); }
.rta-chip--lock { border-color: rgba(232, 163, 58, .45); color: var(--rta-warn-text); }
button.rta-chip { cursor: pointer; }
button.rta-chip:hover { border-color: rgba(0, 199, 238, .6); color: #9be9fa; }
button.rta-chip.is-copied { border-color: rgba(49, 204, 75, .6); color: var(--rta-ok-text); }
button.rta-chip.is-copied i::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; }

/* Status filter pills (Ingester). */
.rta-state-pills { display: inline-flex; flex-wrap: wrap; gap: 5px; margin-left: 12px; vertical-align: middle; }
.rta-state-pill {
  align-items: center; background: #262626; border: 1px solid #404040; border-radius: 999px; color: #a9abad; cursor: pointer;
  display: inline-flex; font: 500 11px var(--sp-font, inherit); gap: 6px; height: 26px; padding: 0 10px;
}
.rta-state-pill b { color: #e0e2e3; font-variant-numeric: tabular-nums; font-weight: 700; }
.rta-state-pill i { border-radius: 50%; display: inline-block; height: 7px; width: 7px; }
.rta-state-pill--good i { background: var(--rta-ok); }
.rta-state-pill--starting i { background: var(--rta-run); }
.rta-state-pill--bad i { background: var(--rta-bad); }
.rta-state-pill--idle i { background: var(--rta-idle); }
.rta-state-pill:hover { border-color: rgba(0, 199, 238, .55); color: #5bdcf5; }
.rta-state-pill.is-active { background: rgba(0, 199, 238, .12); border-color: rgba(0, 199, 238, .6); color: #5bdcf5; }
.rta-state-pill--bad b { color: var(--rta-bad-text); }

/* Merge history strip (Data Processing). */
.rta-history { display: flex; flex-direction: column; gap: 3px; margin-top: 5px; }
.rta-strip { align-items: flex-end; display: inline-flex; gap: 2px; height: 12px; }
.rta-strip > i { border-radius: 2px; display: inline-block; height: 12px; width: 6px; }
.rta-strip > i.is-ok { background: var(--rta-ok); opacity: .85; }
.rta-strip > i.is-failed { background: var(--rta-bad); }
.rta-strip > i:hover { opacity: 1; outline: 1px solid #fff; }
.rta-strip--empty small { color: #7d8285; font-size: 10px; }
.rta-strip-meta { color: #9ba0a3; font-size: 10px; }
.rta-strip-meta b { font-weight: 700; }
.rta-strip-meta b.is-ok { color: var(--rta-ok-text); }
.rta-strip-meta b.is-warn { color: var(--rta-warn-text); }
.rta-strip-meta b.is-failed { color: var(--rta-bad-text); }

/* CPU meter (Nodes). */
.rta-meter { align-items: flex-end; display: inline-flex; flex-direction: column; gap: 3px; min-width: 64px; }
.rta-meter-bar { background: #1c1c1c; border: 1px solid #3d4042; border-radius: 999px; display: block; height: 6px; overflow: hidden; width: 100%; }
.rta-meter-bar > span { background: var(--rta-ok); display: block; height: 100%; }
.rta-meter--warning .rta-meter-bar > span { background: var(--rta-warn); }
.rta-meter--bad .rta-meter-bar > span { background: var(--rta-bad); }
.rta-meter--bad strong { color: var(--rta-bad-text); }

/* Segmented bar (dashboard RTA tile). */
.rta-seg-cell { align-items: flex-end; display: flex; flex-direction: column; gap: 4px; }
.rta-seg { background: #1c1c1c; border-radius: 999px; display: flex; height: 6px; overflow: hidden; width: 120px; }
.rta-seg > i { display: block; min-width: 0; }
.rta-seg > i.is-ok { background: var(--rta-ok); }
.rta-seg > i.is-err { background: var(--rta-bad); }
.rta-seg > i.is-idle { background: var(--rta-idle); }

/* Logs: node dropdown, repeat badge, group toggle, copy button. */
.logs-controls label.logs-node-filter[hidden] { display: none; }
/* With the node dropdown showing, the filter grid gets one more column so the row does not wrap. */
@media (min-width: 1451px) {
  .rta-logs-page .logs-controls:has(.logs-node-filter:not([hidden])) { grid-template-columns: minmax(120px, 1fr) 150px 150px 108px 120px max-content; }
}
@media (max-width: 1450px) and (min-width: 768px) {
  .rta-logs-page .logs-controls:has(.logs-node-filter:not([hidden])) { grid-template-columns: minmax(160px, 1fr) 140px 140px 110px 130px max-content; }
}
@media (max-width: 1100px) and (min-width: 768px) {
  .rta-logs-page .logs-controls:has(.logs-node-filter:not([hidden])) { grid-template-columns: minmax(150px, 1fr) minmax(115px, 140px) minmax(115px, 140px) minmax(95px, 110px) minmax(110px, 130px); }
}
.logs-actions button#LogsGroupToggle.is-active { border-color: rgba(0, 199, 238, .55); color: #5bdcf5; background: rgba(0, 199, 238, .1); }
.log-repeat {
  background: rgba(232, 163, 58, .14); border: 1px solid rgba(232, 163, 58, .5); border-radius: 999px; color: var(--rta-warn-text);
  display: inline-block; font-size: 10px; font-weight: 700; line-height: 1; margin-right: 6px; padding: 2px 6px; vertical-align: middle;
}
.log-copy {
  background: #262626; border: 1px solid #404040; border-radius: 5px; color: #a9abad; cursor: pointer; display: inline-block;
  font: 500 10px var(--sp-font, inherit); margin-left: 8px; padding: 3px 8px; vertical-align: middle;
}
.log-copy:hover { border-color: rgba(0, 199, 238, .55); color: #5bdcf5; }

@media (max-width: 767px) {
  .rta-state-pills { margin: 6px 0 0; }
  .rta-fresh, .rta-fresh--compact { max-width: none; }
}

/* CPU load history: Nodes page View button and dialog, About page panel. */
.rta-node-cpu-cell .rta-meter { vertical-align: middle; }
.sp-app .rta-cpu-view-btn { background: #1c1c1c; border: 1px solid #3d4042; border-radius: 5px; color: #2cdbf6; cursor: pointer; font-size: 11px; font-weight: 600; height: 24px; line-height: 22px; margin-left: 8px; padding: 0 9px; vertical-align: middle; }
.sp-app .rta-cpu-view-btn:hover, .sp-app .rta-cpu-view-btn:focus-visible { border-color: #2cdbf6; color: #7debfb; outline: none; }
.sp-dialog.rta-cpu-dialog { width: min(820px, calc(100vw - 32px)); }
.rta-cpu-dialog__body { display: grid; gap: 14px; padding: 18px 20px 16px; }
.rta-cpu-dialog__head { align-items: flex-start; display: flex; gap: 12px; justify-content: space-between; }
.rta-cpu-dialog__head h2 { color: #f5f6f7 !important; font-size: 18px !important; font-weight: 600 !important; margin: 0 !important; }
.rta-cpu-dialog__head small { color: #9ba0a3; font-size: 12px; }
.rta-cpu-dialog__head form { margin: 0; }
.rta-cpu-close { background: transparent; border: 1px solid #46494b; border-radius: 5px; color: #c7cacc; cursor: pointer; font-size: 20px; height: 32px; line-height: 28px; width: 32px; }
.rta-cpu-close:hover, .rta-cpu-close:focus-visible { border-color: #2cdbf6; color: #f5f6f7; outline: none; }
.rta-cpu-panel { display: grid; gap: 10px; min-width: 0; }
.rta-cpu-stats { display: grid; gap: 8px; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.25fr); }
.rta-cpu-stat { background: #1f2122; border: 1px solid #3d4042; border-radius: 8px; display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 9px 11px; }
.rta-cpu-stat span { color: #9ba0a3; font-size: 11px; }
.rta-cpu-stat strong { color: #f5f6f7; font-size: 20px; font-variant-numeric: tabular-nums; font-weight: 600; }
.rta-cpu-stat small { color: #9ba0a3; font-size: 11px; min-height: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rta-cpu-stat strong.rta-cpu-stat-time { font-size: 15px; line-height: 24px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rta-cpu-maxima { display: grid; gap: 1px; list-style: none; margin: 1px 0 0; padding: 0; }
.rta-cpu-maxima li { align-items: baseline; display: grid; gap: 6px; grid-template-columns: 12px auto minmax(0, 1fr); }
.rta-cpu-maxima li.is-empty { color: #9ba0a3; display: block; }
.rta-cpu-maxima b { color: #f5a623; font-size: 11px; }
.rta-cpu-stat .rta-cpu-maxima strong { color: #f5a623; font-size: 14px; }
.rta-cpu-maxima li:first-child strong { font-size: 16px; }
.rta-cpu-stat .rta-cpu-maxima small { min-height: 0; }
.rta-cpu-max-label { fill: #f5a623; font-size: 10px; font-weight: 700; }
.rta-cpu-toolbar { align-items: center; display: flex; gap: 10px; justify-content: space-between; }
.rta-cpu-range { color: #9ba0a3; font-size: 12px; font-variant-numeric: tabular-nums; }
.rta-cpu-zoom { display: inline-flex; }
.sp-app .rta-cpu-zoom button { background: #1c1c1c; border: 1px solid #3d4042; color: #c7cacc; cursor: pointer; font-size: 11px; font-weight: 600; height: 26px; padding: 0 11px; }
.sp-app .rta-cpu-zoom button:first-child { border-radius: 5px 0 0 5px; }
.sp-app .rta-cpu-zoom button:last-child { border-left: 0; border-radius: 0 5px 5px 0; }
.sp-app .rta-cpu-zoom button.is-active { background: #0f3b44; border-color: #2cdbf6; color: #7debfb; }
.sp-app .rta-cpu-zoom button:focus-visible { outline: 1px solid #2cdbf6; outline-offset: 1px; }
.rta-cpu-plot { background: #1f2122; border: 1px solid #3d4042; border-radius: 8px; display: grid; grid-template-columns: 44px minmax(0, 1fr); overflow: hidden; }
.rta-cpu-yaxis { display: block; height: 240px; width: 44px; }
.rta-cpu-scroll { overflow-x: auto; overflow-y: hidden; scrollbar-color: #4a4e50 transparent; scrollbar-width: thin; }
.rta-cpu-chart { display: block; height: 240px; }
.rta-cpu-grid { stroke: #34383a; stroke-width: 1; }
.rta-cpu-grid--v { stroke: #2b2e30; }
.rta-cpu-axis { fill: #8e9396; font-size: 11px; }
.rta-cpu-empty { fill: #9ba0a3; font-size: 13px; }
.rta-cpu-avg { stroke: #9ba0a3; stroke-dasharray: 5 4; stroke-width: 1; }
.rta-cpu-line { fill: none; stroke: #2cdbf6; stroke-linejoin: round; stroke-width: 1.6; }
.rta-cpu-dot { fill: #2cdbf6; }
.rta-cpu-max { fill: none; stroke: #f5a623; stroke-width: 2; }
.rta-cpu-note { color: #9ba0a3; font-size: 11px; line-height: 1.4; margin: 0; }
@media (max-width: 760px) {
    .rta-cpu-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rta-cpu-stat--max { grid-column: 1 / -1; }
    .rta-cpu-dialog__body { padding: 14px 14px 12px; }
    .sp-app .rta-cpu-view-btn { margin: 6px 0 0; }
}

/* A setting that does not apply to this item (e.g. Processing Interval on a Falco transform job). */
.rta-field-unused .control-label, .sp-app .rta-field-unused > label, .rta-field-unused strong, .rta-field-unused small { color: #6f7477 !important; }
.sp-app .rta-field-unused input.form-control[readonly] { background: #1a1b1c; border-color: #34383a; color: #6f7477; cursor: not-allowed; opacity: .7; }
.rta-field-hint { color: #8e9396; font-size: 11px; line-height: 1.35; }
