/* ==========================================================================
   Smart pi UI — DVA product layer
   Everything specific to this product, on top of the packaged smartpi-ui.css:
   Font Awesome icons in the nav/header, topbar meta chips, tables, the Status
   board, and migration helpers. Loaded AFTER the shared modules so these win.
   Keep new UI on --sp-* tokens only.

   Named per product (smartpi-dva.css) rather than per app role, so a combined
   UI can load each product's layer side by side without collision. Every
   selector here should be scoped to something DVA owns for that reason.
   ========================================================================== */

/* Apply the design-system font/background to the whole document, not just a
   wrapper, so every un-migrated screen inherits the dark base during rollout. */
html, body { background: var(--sp-bg); }

/* The shared account primitive renders DVA's existing POST logout action. The
   packaged `.sp-account__logout` is written for an <a>, so it sets no background
   or appearance; DVA submits a form instead, and an unreset <button> paints the
   platform ButtonFace behind it, against which the packaged light text washes
   out. Reset the button chrome so only the packaged styling shows, and leave the
   packaged hover (background #2a2d30, colour #f3833f) to do the rest. */
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; }

/* Selected-state harmonisation was removed here: SmartPi.UI 9704ed1 carries
   selection on the edge for option tiles and segmented controls, so the shared
   rules now match what this product wanted. */

/* Font Awesome is loaded as JS here (font-awesome/js/all.js), which rewrites
   every <i> into <svg class="svg-inline--fa">. The packaged topbar rules select
   the element name (.sp-topbar__status > i), so after the rewrite they stop
   matching: the icons lose their 17px column and their 5px gap and sit flush
   against the values. Restate them for the replacement node. */
.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;
}

/* The topbar account cluster is the packaged `.sp-account` primitive: a trigger
   that opens a menu holding sign-out. The DVA-only `.sp-topbar__identity` pill and
   sibling `.sp-topbar__logout` link that used to sit here were a different shape
   from the boilerplate - logout beside the user rather than inside the menu - and
   have been removed in favour of the shared one.

   The packaged trigger caps at 150px, which suits a short username; DVA signs in
   with full LDAP principals, so widen it before it ellipsises. The Font Awesome JS
   swap (see above) also replaces the avatar <i> with an <svg>, so the packaged
   `.sp-account__trigger > .fa-user` rule needs restating for the replacement node. */
.sp-account__trigger { max-width: 260px; }
.sp-account__trigger > svg.fa-user {
  width: 18px; height: 18px; padding: 3px; flex: 0 0 auto; box-sizing: content-box;
  border: 1px solid #45494c; border-radius: 50%; background: #242729; color: #cfd3d6; font-size: 10px;
}
.sp-account__trigger > .fa-user { box-sizing: content-box; }
.sp-account__logout > svg { width: 14px; text-align: center; }

/* DVA has more primary destinations than the starter. Keep only the product
   allocation and SVG placement; SmartPi.UI owns the footer presentation. */
.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; }

/* DVA's 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;
}

/* Product-only table exception; base table layout comes from SmartPi.UI. */
.sp-table td.is-num, .sp-table th.is-num { text-align: right; font-variant-numeric: tabular-nums; }

/* --- small layout helpers (allowed: not a framework) --------------------- */
.sp-row { display: flex; flex-wrap: wrap; gap: 12px; }
.sp-row--between { justify-content: space-between; align-items: center; }
.sp-muted { color: var(--sp-muted); }
.sp-mt { margin-top: 12px; }

/* Test Order is a DVA diagnostic extension over shared overview/form cards. */
.test-order-page { min-height:0; }
.test-order-content { display:grid; gap:14px; grid-template-columns:minmax(0,1fr) minmax(250px,.34fr); min-height:0; overflow:auto; padding:14px 16px 24px; }
.test-order-selection { margin:0; min-width:0; }
.test-order-help { color:#929799; font-size:11px; line-height:1.45; margin:0 0 14px; }
.test-order-fields { display:grid; gap:12px; grid-template-columns:repeat(2,minmax(0,1fr)); }
.test-order-fields label { color:#f5f6f7; font-size:11px; margin:0; min-width:0; }
.test-order-fields label > span { display:block; margin-bottom:5px; }
.test-order-control { background:#1d1f20; border:1px solid #54585b; border-radius:5px; color:#e9ebec; font:inherit; font-size:11px; min-height:36px; padding:6px 10px; width:100%; }
.test-order-control:focus { border-color:#00b9db; box-shadow:0 0 0 1px rgba(0,194,230,.18); outline:none; }
.test-order-actions { align-items:center; display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.test-order-actions .usersubmit,.test-order-actions .usersubmit-secondary { align-items:center; border-radius:5px; cursor:pointer; display:inline-flex; font-family:inherit; font-size:11px; font-weight:600; justify-content:center; line-height:1.2; min-height:34px; min-width:112px; padding:8px 18px; text-decoration:none; }
.test-order-actions .usersubmit { background:linear-gradient(180deg,#20c8e5 0%,#08a9c6 100%); border:1px solid #35d5ef; color:#071519; }
.test-order-actions .usersubmit:hover { background:linear-gradient(180deg,#36d1eb 0%,#10b8d5 100%); }
.test-order-actions .usersubmit-secondary { background:#2d2f30; border:1px solid #505355; color:#d7d9da; }
.test-order-actions .usersubmit-secondary:hover { background:#36383a; border-color:#626668; color:#f0f1f2; }
.test-order-guidance { align-items:flex-start; align-self:start; background:#252728; border:1px solid #45484a; border-radius:7px; color:#929799; display:flex; gap:11px; padding:14px; }
.test-order-guidance-icon { align-items:center; background:rgba(0,199,238,.08); border:1px solid rgba(0,199,238,.32); border-radius:6px; display:flex; flex:0 0 34px; height:34px; justify-content:center; }
.test-order-guidance-icon svg { fill:none; height:19px; stroke:#56d9ef; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.7; width:19px; }
.test-order-guidance strong { color:#dadddf; display:block; font-size:12px; font-weight:600; }
.test-order-guidance > div > span { display:block; font-size:10px; line-height:1.45; margin-top:4px; }
.test-order-result { margin:0; max-height:55vh; overflow:auto; text-align:left; white-space:pre-wrap; }
@media (max-width:767px) {
  .test-order-content,.test-order-fields { grid-template-columns:1fr; }
  .test-order-content { padding:12px 10px 22px; }
  .test-order-actions > * { flex:1 1 auto; justify-content:center; text-align:center; }
}

/* DVA node runtime feedback extends the shared nodes/config presentation. */
.nodes-feedback { margin:0; padding:9px 12px; border-bottom:1px solid; font-size:11px; }
.nodes-feedback--error { border-color:rgba(224,91,91,.5); background:rgba(224,91,91,.1); color:#ff918d; }
.config-actions-cell { text-align:center!important; vertical-align:middle!important; }

/* NonFactors MVC Grid is a DVA integration rather than a SmartPi.UI asset.
   Keep its sorting behaviour, but render the indicator with CSS so product
   grids do not depend on the library's obsolete private glyph font. */
.sp-app .mvc-grid-sort {
  color:#8f9497;
  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:.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 { opacity:.9; }
.sp-app .config-actions-cell .extension-row-actions { margin-inline:auto; }
.mvc-grid-pager-mobile-label,
.mvc-grid-pager-mobile-page { display:none; }

@media (max-width:767px) {
  .sp-app .mvc-grid-pager.mvc-grid-pager--single { display:none !important; }
  .sp-app .mvc-grid-pager {
    align-items:center;
    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 { display:none; }
  .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; }
}

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

/* SmartPi.UI owns the descriptive header alignment. DVA maps only product
   columns whose numeric or control content intentionally remains centred. */
.sp-app .extensions-config-grid .mvc-grid-table > table > thead > tr > th.config-actions-cell { text-align:center!important; }

/* Realtime is descriptive data in DVA, so its stacked value follows the shared
   left-aligned header contract rather than the integration-cell default. */
.ingest-overview-page .extensions-config-grid .mvc-grid-table td:nth-child(4) .config-integration-cell { align-items:flex-start; }
.ingest-overview-page .extensions-config-grid .mvc-grid-table :is(th,td):nth-child(5) { text-align: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:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .ingest-jobs-grid :is(.ingest-job-status-cell,.ingest-job-last-run-cell) {
    flex-direction:column;
    gap:5px;
    padding:10px 12px !important;
  }
  .ingest-jobs-grid .ingest-job-status-cell { border-right:1px solid #414446 !important; }
  .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-realtime-cell {
    align-items:center !important;
    border-top:1px solid #414446 !important;
    flex-direction:row;
    grid-column:1 / -1;
    justify-content:space-between;
    padding:8px 12px !important;
  }
  .ingest-jobs-grid .ingest-job-realtime-cell .config-integration-cell {
    align-items:baseline !important;
    flex-direction:row;
    gap:6px;
  }
  .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(5,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;
  }
}

/* Feeds contains two different DVA product grids with different numeric
   columns, so keep their mappings explicit rather than relying on utilities. */
.sp-app .feeds-data-grid .mvc-grid-table :is(th,td):nth-child(2),
.sp-app .feeds-nodes-grid .mvc-grid-table :is(th,td):nth-child(2) { text-align:center; }

/* Ingest node assignment is a DVA workflow over the shared detail form. */
.ingest-assigned-summary {
  align-items:center;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:10px;
}
.ingest-node-picker {
  background:#262829;
  border:1px solid #46494b;
  border-radius:7px;
  overflow:hidden;
}
.ingest-node-picker-header {
  align-items:center;
  background:#202223;
  border-bottom:1px solid #46494b;
  color:#9ca1a4;
  display:grid;
  font-size:10px;
  font-weight:600;
  grid-template-columns:minmax(0,1fr) auto;
  letter-spacing:.04em;
  padding:8px 12px;
  text-transform:uppercase;
}
.ingest-node-picker-list { display:grid; gap:6px; padding:8px; }
.ingest-node-option {
  align-items:center;
  background:#2c2e2f;
  border:1px solid #484b4d;
  border-radius:6px;
  box-sizing:border-box;
  cursor:pointer;
  display:grid;
  gap:10px;
  grid-template-columns:32px minmax(0,1fr) 24px;
  margin:0;
  min-height:54px;
  padding:8px 10px;
  position:relative;
  width:100%;
}
.ingest-node-option:hover { background:#303334; border-color:#64686a; }
.ingest-node-option:focus-within { outline:2px solid #e6e6e6; outline-offset:1px; }
.ingest-node-option.is-selected { background:rgba(0,199,238,.08); border-color:rgba(0,199,238,.58); }
.ingest-node-option-input {
  height:1px;
  opacity:0;
  position:absolute;
  width:1px;
}
.ingest-node-option-icon,
.ingest-node-option-check {
  align-items:center;
  display:inline-flex;
  justify-content:center;
}
.ingest-node-option-icon {
  background:#222425;
  border:1px solid #505456;
  border-radius:5px;
  color:#b9bdc0;
  height:30px;
  width:30px;
}
.ingest-node-option-icon svg { fill:none; height:18px; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.7; width:18px; }
.ingest-node-option-check {
  border:1px solid #5a5e60;
  border-radius:50%;
  color:transparent;
  height:22px;
  width:22px;
}
.ingest-node-option-check svg { fill:none; height:14px; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:2.2; width:14px; }
.ingest-node-option.is-selected .ingest-node-option-check { background:#00c7ee; border-color:#00c7ee; color:#102126; }
.ingest-node-option-name strong,
.ingest-node-option-name small { overflow-wrap:anywhere; white-space:normal; }
.ingest-node-picker-empty { color:#8f9497; padding:18px 12px; text-align:center; }
.ingest-node-picker-help { color:#969b9e; display:block; margin-top:7px; }

/* The attached real-time grid contains long machine values. Give its actions
   a semantic wrapper at every size, then compose the row as a labelled card on
   phones so URLs and keys wrap within the panel instead of creating a nested
   horizontal scroller. */
.attached-source-actions { display:flex; gap:6px; }

@media (max-width: 575px) {
  .ingest-feed-form-page .config-edit-save-row {
    display:grid;
    gap:8px;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .ingest-feed-form-page .config-edit-save-row .ingest-add-source {
    grid-column:1 / -1;
    margin-right:0;
  }
  .ingest-feed-form-page .config-edit-save-row .usersubmit,
  .ingest-feed-form-page .config-edit-save-row .usersubmit-secondary {
    box-sizing:border-box;
    justify-content:center;
    min-width:0;
    width:100%;
  }

  .ingest-feed-form-page .ingest-attached-sources { padding:14px 10px; }
  .ingest-feed-form-page .ingest-attached-sources .config-grid-shell,
  .ingest-feed-form-page .ingest-attached-sources .mvc-grid,
  .ingest-feed-form-page .ingest-attached-sources .mvc-grid-table {
    box-sizing:border-box;
    max-width:100%;
    min-width:0;
    width:100%;
  }
  .ingest-feed-form-page .ingest-attached-sources .mvc-grid-table > table > tbody > tr {
    align-items:start;
    display:grid;
    gap:9px 12px;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    padding:12px;
  }
  .ingest-feed-form-page .ingest-attached-sources .mvc-grid-table > table > tbody > tr > td {
    box-sizing:border-box;
    min-width:0;
    width:100%;
  }
  .ingest-feed-form-page .attached-source-description,
  .ingest-feed-form-page .attached-source-url,
  .ingest-feed-form-page .attached-source-api-key,
  .ingest-feed-form-page .attached-source-actions-cell { grid-column:1 / -1; }
  .ingest-feed-form-page .attached-source-description {
    color:#eef0f1;
    font-size:13px;
    font-weight:600;
    padding-bottom:2px !important;
  }
  .ingest-feed-form-page :is(.attached-source-url,.attached-source-api-key,.attached-source-type,.attached-source-interval)::before {
    color:#8f9598;
    display:block;
    font-size:9px;
    font-weight:700;
    letter-spacing:.06em;
    line-height:1.2;
    margin-bottom:3px;
    text-transform:uppercase;
  }
  .ingest-feed-form-page .attached-source-url::before { content:"Feed URL"; }
  .ingest-feed-form-page .attached-source-api-key::before { content:"API key"; }
  .ingest-feed-form-page .attached-source-type::before { content:"Type"; }
  .ingest-feed-form-page .attached-source-interval::before { content:"Read interval"; }
  .ingest-feed-form-page :is(.attached-source-url,.attached-source-api-key) {
    color:#c7cbcd;
    font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
    font-size:10px;
    line-height:1.45;
    overflow-wrap:anywhere;
    word-break:break-word;
  }
  .ingest-feed-form-page :is(.attached-source-type,.attached-source-interval) {
    color:#d7dadb;
    font-size:11px;
  }
  .ingest-feed-form-page .attached-source-actions { gap:8px; }
  .ingest-feed-form-page .attached-source-actions .btn {
    align-items:center;
    display:inline-flex;
    justify-content:center;
    margin:0 !important;
    min-height:34px;
    min-width:72px;
  }
}

/* Timetable centred fields are explicit DVA column exceptions. */
.timetable-page .extensions-config-grid .mvc-grid-table :is(th,td).text-center { text-align:center; }

/* GTFS runtime nodes extend the shared config table presentation. */
.status-overview-icon {
  display:inline-flex; align-items:center; justify-content:center;
  width:34px; height:34px; flex:0 0 34px;
  color:#f2f5f6;
}
.status-overview-svg {
  width:32px; height:32px;
  display:block;
  stroke:currentColor; fill:none; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round;
}
.gtfs-nodes-table { border-collapse:separate; border-spacing:0; color:#cdd0d2; margin:0; min-width:880px; width:100%; }
.gtfs-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; }
.gtfs-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; }
.gtfs-nodes-table > tbody > tr > td:first-child { box-shadow:inset 3px 0 0 #545454; }
.sp-app .gtfs-nodes-table .gtfs-node-metric { font-variant-numeric:tabular-nums; text-align:center; }
.gtfs-nodes-table .config-actions-cell .extension-row-actions { margin-inline:auto; }
.gtfs-nodes-table > tbody > tr:nth-child(even) > td { background:#292b2c; }
.gtfs-nodes-table > tbody > tr:hover > td { background:#353535; }
.gtfs-nodes-table form { display:inline-flex; margin:0; }
.gtfs-nodes-table .config-action { margin:0; }
.gtfs-node-mobile-label,.gtfs-node-delete > span { display:none; }

@media (max-width:767px) {
  .gtfs-nodes-grid .mvc-grid-table { overflow:visible; }
  .gtfs-nodes-table { min-width:0; table-layout:auto; width:100%; }
  .gtfs-nodes-table > tbody { display:grid; gap:10px; padding:10px; }
  .gtfs-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;
  }
  .gtfs-nodes-table > tbody > tr[data-node-row] > td,
  .gtfs-nodes-table > tbody > tr[data-node-row]:hover > td,
  .gtfs-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;
    height:auto;
    min-height:0;
    min-width:0;
    padding:10px 12px;
    text-align:left;
    width:auto;
  }
  .gtfs-nodes-table .gtfs-node-identity-cell {
    border-bottom:1px solid #414446 !important;
    grid-column:1 / -1;
    padding:12px !important;
  }
  .gtfs-node-identity-cell .config-extension-cell { min-width:0; width:100%; }
  .gtfs-node-identity-cell .config-cell-copy { min-width:0; }
  .gtfs-node-identity-cell .config-cell-copy strong {
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .gtfs-nodes-table .gtfs-node-status-cell,
  .gtfs-nodes-table .gtfs-node-updated-cell,
  .gtfs-nodes-table .gtfs-node-feeds-cell,
  .gtfs-nodes-table .gtfs-node-cpu-cell {
    flex-direction:column;
    gap:5px;
    padding:10px 12px !important;
  }
  .gtfs-nodes-table .gtfs-node-status-cell,
  .gtfs-nodes-table .gtfs-node-updated-cell { border-bottom:1px solid #414446 !important; }
  .gtfs-nodes-table .gtfs-node-status-cell,
  .gtfs-nodes-table .gtfs-node-feeds-cell { border-right:1px solid #414446 !important; }
  .gtfs-node-mobile-label {
    color:#8f9497;
    display:block;
    font-size:9px;
    font-weight:700;
    letter-spacing:.06em;
    line-height:1.2;
    text-transform:uppercase;
  }
  .gtfs-node-updated-cell .config-cell-copy {
    align-items:flex-start;
    flex-direction:column;
    gap:2px;
    min-width:0;
  }
  .gtfs-node-updated-cell .config-cell-copy strong,
  .gtfs-node-feeds-cell strong,
  .gtfs-node-cpu-cell strong {
    color:#e1e3e4;
    font-size:12px;
    font-variant-numeric:tabular-nums;
    font-weight:600;
  }
  .gtfs-node-updated-cell .config-cell-copy small { color:#929799; font-size:10px; font-variant-numeric:tabular-nums; }
  .sp-app .gtfs-nodes-table .gtfs-node-metric { text-align:left; }
  .gtfs-nodes-table .gtfs-node-actions-cell {
    border-top:1px solid #414446 !important;
    grid-column:1 / -1;
    padding:8px !important;
  }
  .gtfs-nodes-table .gtfs-node-actions-cell .extension-row-actions {
    background:#232526;
    border:1px solid #4b4f51;
    border-radius:6px;
    display:block;
    margin:0;
    overflow:hidden;
    width:100%;
  }
  .gtfs-nodes-table .gtfs-node-actions-cell form { display:block; width:100%; }
  .gtfs-nodes-table .gtfs-node-delete {
    align-items:center;
    border:0;
    border-radius:0;
    display:flex;
    gap:7px;
    height:42px;
    justify-content:center;
    padding:6px 12px;
    width:100% !important;
  }
  .gtfs-nodes-table .gtfs-node-delete:hover,
  .gtfs-nodes-table .gtfs-node-delete:focus-visible { background:rgba(224,91,91,.1); }
  .gtfs-node-delete > span { color:#ff8f8a; display:inline; font-size:10px; font-weight:600; }
}

@media (max-width:340px) {
  .gtfs-nodes-table .gtfs-node-status-cell,
  .gtfs-nodes-table .gtfs-node-feeds-cell,
  .gtfs-nodes-table .gtfs-node-cpu-cell { padding-inline:8px !important; }
  .gtfs-nodes-table .gtfs-node-mobile-label { font-size:8px; letter-spacing:.04em; }
}

/* DVA node columns extend the packaged node overview with product connection
   data. Shared headers remain left-aligned; Channels and Actions are explicit
   product-level centred exceptions. */
.sp-app .dva-nodes-table .dva-node-channels { font-variant-numeric:tabular-nums; text-align:center; }
.dva-node-mobile-label,.dva-node-actions-cell .config-action > span { display:none; }

@media (max-width:767px) {
  .dva-nodes-grid .mvc-grid-table { overflow:visible; }
  .dva-nodes-table { min-width:0; table-layout:auto; width:100%; }
  .dva-nodes-table > tbody { display:grid; gap:10px; padding:10px; }
  .dva-nodes-table > tbody > tr[data-dva-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:minmax(82px,.55fr) minmax(0,1.45fr);
    overflow:hidden;
    padding:0;
  }
  .dva-nodes-table > tbody > tr[data-dva-node-row] > td,
  .dva-nodes-table > tbody > tr[data-dva-node-row]:hover > td,
  .dva-nodes-table > tbody > tr[data-dva-node-row]: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;
    padding:9px 12px;
    text-align:left;
    width:auto;
  }
  .dva-nodes-table .dva-node-identity-cell {
    border-bottom:1px solid #414446 !important;
    grid-column:1 / -1;
    padding-block:12px !important;
  }
  .dva-node-identity-cell .config-extension-cell,
  .dva-node-identity-cell .config-cell-copy { min-width:0; }
  .dva-node-identity-cell .config-cell-copy strong {
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .dva-nodes-table .dva-node-connection-cell {
    border-bottom:1px solid #414446;
    flex-direction:column;
    gap:5px;
    grid-column:1 / -1;
    padding:10px 12px !important;
  }
  .dva-node-connection-cell .config-cell-copy {
    align-items:baseline;
    flex-direction:row;
    flex-wrap:wrap;
    gap:5px;
    min-width:0;
    width:100%;
  }
  .dva-node-connection-cell .config-cell-copy small::before { content:"· "; }
  .dva-nodes-table .dva-node-mode-cell,
  .dva-nodes-table .dva-node-channels {
    flex-direction:column;
    gap:5px;
    padding:9px 12px !important;
  }
  .dva-nodes-table .dva-node-mode-cell { border-left:1px solid #414446; }
  .sp-app .dva-nodes-table .dva-node-channels { text-align:left; }
  .dva-node-mobile-label {
    color:#8f9497;
    display:block;
    font-size:9px;
    font-weight:700;
    letter-spacing:.06em;
    line-height:1.2;
    text-transform:uppercase;
  }
  .dva-node-channels > strong { color:#e1e3e4; font-size:12px; font-weight:600; }
  .dva-nodes-table .dva-node-actions-cell {
    border-top:1px solid #414446 !important;
    grid-column:1 / -1;
    padding:8px !important;
  }
  .dva-nodes-table .dva-node-actions-cell .extension-row-actions {
    background:#232526;
    border:1px solid #4b4f51;
    border-radius:6px;
    display:grid;
    gap:0;
    grid-template-columns:repeat(3,minmax(0,1fr));
    margin:0;
    min-width:0;
    overflow:hidden;
    width:100%;
  }
  .dva-node-actions-cell .config-action {
    align-items:center;
    border:0;
    border-radius:0;
    display:flex;
    gap:6px;
    height:42px;
    justify-content:center;
    padding:6px;
    width:100%;
  }
  .dva-node-actions-cell .config-action + .config-action { border-left:1px solid #4b4f51; }
  .dva-node-actions-cell .config-action:hover,
  .dva-node-actions-cell .config-action:focus-visible { background:#303334; }
  .dva-node-actions-cell .config-action > span {
    color:#cfd2d4;
    display:inline;
    font-size:10px;
    font-weight:600;
  }
}

/* Audio Library create/edit forms keep DVA fields inside the packaged two-panel
   editor composition. The product marker prevents the older flat audio-form
   grid contract from treating the panel collection and action footer as two
   peer columns. */
.sp-app .dva-audio-entry-editor-form {
  display:flex;
  flex-direction:column;
  gap:0;
}
.sp-app .dva-audio-entry-editor-form :is(.form-control,.custom-select) {
  box-sizing:border-box;
  width:100%;
}
.sp-app .dva-audio-entry-editor-form > .config-edit-save-row {
  align-items:center;
  align-self:stretch;
  flex:0 0 auto;
}

/* Orders are a DVA logging extension over the packaged SmartPi.UI log shell.
   The header colour and sort-control removal that used to be restated here are
   handled by the shared .logs-mvc-grid adapter as of SmartPi.UI 7d40215; both
   DVA grids carry that class. Only the cell alignment below is DVA's own. */
.application-logs-page .logs-mvc-grid .mvc-grid-table th,
.application-logs-page .logs-mvc-grid .mvc-grid-table td,
.order-logs-page .order-logs-grid .mvc-grid-table th,
.order-logs-page .order-logs-grid .mvc-grid-table td { vertical-align:middle; }
.order-cell-copy { min-width:0; display:flex; flex-direction:column; gap:3px; }
.order-cell-copy strong,.order-cell-copy small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.order-cell-copy strong { color:#dadddf; font-size:12px; font-weight:500; }
.order-cell-copy small { color:#85898c; font-size:9px; }
.order-summary-content { display:flex; flex-direction:column; gap:2px; min-width:0; }
.order-summary-content > span { display:block; overflow-wrap:anywhere; white-space:normal; }
.order-dva-content { align-items:flex-start; margin-inline:auto; width:max-content; max-width:100%; text-align:left; }
.order-files-content { align-items:flex-start; margin-inline:auto; width:max-content; max-width:100%; text-align:left; }
.order-files-content > strong { max-width:100%; text-align:left; }
.order-file-list { counter-reset:order-file; display:flex; flex-direction:column; gap:2px; margin:2px 0 0; padding:0; color:#85898c; font-size:9px; list-style:none; }
.order-file-list li { counter-increment:order-file; display:grid; grid-template-columns:16px minmax(0,1fr); overflow-wrap:anywhere; }
.order-file-list li::before { content:counter(order-file) "."; }
.order-logs-grid [data-log-time] { white-space:nowrap; }
.order-priority { min-width:28px; padding:3px 7px; display:inline-flex; justify-content:center; border:1px solid rgba(0,199,238,.38); border-radius:11px; background:rgba(0,199,238,.09); color:#75dff2; font-size:10px; font-weight:600; }
@media (min-width:768px) {
  .order-logs-grid .mvc-grid-table > table { min-width:1120px; table-layout:fixed; }
  .order-logs-page .order-logs-grid .mvc-grid-table th:nth-child(1){width:7%}.order-logs-page .order-logs-grid .mvc-grid-table th:nth-child(2){width:15%}.order-logs-page .order-logs-grid .mvc-grid-table th:nth-child(3){width:6%}.order-logs-page .order-logs-grid .mvc-grid-table th:nth-child(4){width:7%}.order-logs-page .order-logs-grid .mvc-grid-table th:nth-child(5){width:22%}.order-logs-page .order-logs-grid .mvc-grid-table th:nth-child(6){width:16%}.order-logs-page .order-logs-grid .mvc-grid-table th:nth-child(7){width:8%}.order-logs-page .order-logs-grid .mvc-grid-table th:nth-child(8){width:6%}.order-logs-page .order-logs-grid .mvc-grid-table th:nth-child(9){width:13%}
  .order-logs-grid th:nth-child(2),.order-logs-grid td:nth-child(2),
  .order-logs-grid th:nth-child(7),.order-logs-grid th:nth-child(8),.order-logs-grid th:nth-child(9),
  .order-logs-grid td:nth-child(7),.order-logs-grid td:nth-child(8) { text-align:center; }
}
@media (max-width:767px) {
  .order-cell-copy strong,.order-cell-copy small { overflow:visible; text-overflow:clip; white-space:normal; }
  .order-dva-content,
  .order-files-content { margin-inline:0; width:100%; }
}

/* DVA channel/rule assignment extends shared config/grid primitives. */
.dva-rule-restart-notice { justify-content:flex-start; }
.dva-rule-restart-notice strong { color:#ff8b86; text-transform:uppercase; }
.dva-channel-editor { display:grid; gap:12px; grid-template-columns:repeat(4,minmax(0,1fr)); padding:12px; border:1px solid #46494b; border-radius:7px; background:#2d2f30; }
.dva-channel-editor label { margin-bottom:5px; color:#f5f6f7; font-size:11px; }
.dva-channel-editor .nodes-field > :is(input,select) { min-height:34px; border:1px solid #54585b; border-radius:5px; background:#1d1f20; color:#e9ebec; font-size:11px; }
.dva-channel-select { grid-column:1 / -1; max-width:420px; }
.dva-channel-actions { display:flex; align-items:end; gap:8px; }
.dva-rule-mobile-tabs { display:none; }
.dva-rule-columns { display:grid; gap:12px; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); margin-top:14px; }
.dva-rule-column { min-width:0; }
.dva-rule-column .extension-filter-bar { grid-template-columns:minmax(130px,1fr) minmax(190px,260px); }
.dva-rule-grid .mvc-grid-table > table { width:100%; min-width:0; table-layout:fixed; }
.dva-rule-column--available .dva-rule-grid :is(th,td):nth-child(1) { width:38%; }
.dva-rule-column--available .dva-rule-grid :is(th,td):nth-child(3) { width:82px; }
.dva-rule-column--available .dva-rule-grid :is(th,td):nth-child(4) { width:68px; }
.dva-rule-column--current .dva-rule-grid :is(th,td):nth-child(1) { width:30%; }
.dva-rule-column--current .dva-rule-grid :is(th,td):nth-child(3) { width:82px; }
.dva-rule-column--current .dva-rule-grid :is(th,td):nth-child(4) { width:148px; }
.dva-rule-grid tbody td { overflow:hidden; text-overflow:clip; }
.dva-rule-grid tbody td:nth-child(2) { height:auto; overflow:visible; white-space:normal; }
.dva-rule-grid .config-cell-copy { display:block; width:100%; }
.dva-rule-grid .config-cell-copy strong,.dva-rule-grid .config-cell-copy small { display:block; line-height:1.35; overflow-wrap:anywhere; white-space:normal; }
.dva-rule-grid .extension-row-actions { max-width:100%; }
.dva-rule-grid .priority-input { width:68px!important; height:31px; min-height:31px!important; padding:4px 7px!important; border:1px solid #54585b; background:#1d1f20; color:#e9ebec; font-size:11px; }

/* DVA node rule-priority visualisation */
.dva-viz-filter-bar { align-items:center; display:flex; flex-wrap:wrap; gap:12px 16px; }
.dva-viz-filter-bar .extension-filter-presets { align-items:center; flex:0 0 auto; }
.dva-viz-filter-bar .extension-filter-field-search { flex:0 1 320px; margin-left:auto; width:auto; }
.dva-viz-count { color:#9aa0a3; font-size:11px; line-height:1; margin-left:10px; position:relative; top:1px; }
.dva-viz-toggle { align-items:center; color:#d4d7d9; display:inline-flex; flex:0 0 auto; font-size:11px; gap:6px; user-select:none; white-space:nowrap; }
.dva-viz-toggle input { accent-color:#00c7ee; height:14px; width:14px; }
.dva-viz-expand-all {
  appearance:none; background:#2c2c2c; border:1px solid #4a4d4f; border-radius:6px; color:#d4d7d9;
  cursor:pointer; flex:0 0 auto; font-size:11px; font-weight:600; height:30px; padding:0 12px; white-space:nowrap;
}
.dva-viz-expand-all:hover { background:#34373a; border-color:#5a5d60; }
.dva-viz-legend { color:#9aa0a3; display:flex; flex-wrap:wrap; font-size:10.5px; gap:16px; margin:10px 0 14px; padding:0 14px; }
.dva-viz-legend-item { align-items:center; display:inline-flex; gap:6px; }
.dva-viz-legend-swatch { background:#4c5866; border-radius:3px; display:inline-block; height:8px; width:14px; }
.dva-viz-legend-swatch--low { background:#4c5866; }
.dva-viz-legend-swatch--mid { background:#7891a3; }
.dva-viz-legend-swatch--high { background:#a9bfcf; }
.dva-viz-legend-swatch--top { background:#2c2c2c; border:1.5px solid #e0b04a; box-shadow:0 0 4px rgba(224,176,74,.6); }
.dva-viz-legend-swatch--disabled { background:#5a5f61; }
.dva-viz-grid { display:grid; gap:12px; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); padding:0 14px 14px; }
.dva-viz-channel { background:#343638; border:1px solid #585b5f; border-radius:10px; display:flex; flex-direction:column; min-width:0; overflow:hidden; }
.dva-viz-channel[hidden] { display:none; }
.dva-viz-channel--empty { opacity:.55; }
.dva-viz-channel--disabled { border-color:#5c4230; }
.dva-viz-channel-head {
  align-items:center; background:#2a2c2e; border:0; border-bottom:1px solid #484b4e; cursor:pointer;
  display:flex; font:inherit; gap:9px; padding:10px 12px; text-align:left; width:100%;
}
.dva-viz-channel-head:hover { background:#2f3134; }
.dva-viz-channel-num { align-items:center; background:#1d1f20; border:1px solid #54585b; border-radius:6px; color:#00c7ee; display:inline-flex; flex:0 0 26px; font-size:11px; font-weight:700; height:26px; justify-content:center; width:26px; }
.dva-viz-channel-meta { min-width:0; }
.dva-viz-channel-meta strong { color:#edf0f1; display:block; font-size:12px; line-height:1.3; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dva-viz-channel-meta small { color:#9aa0a3; display:block; font-size:10px; line-height:1.3; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dva-viz-channel-flag { background:rgba(224,91,91,.16); border-radius:3px; color:#ff8b86; flex-shrink:0; font-size:9px; font-weight:700; letter-spacing:.04em; margin-left:auto; padding:2px 6px; text-transform:uppercase; }
.dva-viz-channel-count { background:#1d1f20; border:1px solid #454a4c; border-radius:10px; color:#9aa0a3; flex-shrink:0; font-size:10px; font-weight:700; margin-left:auto; padding:2px 8px; }
.dva-viz-channel-flag + .dva-viz-channel-count { margin-left:0; }
.dva-viz-channel-toggle { align-items:center; color:#9aa0a3; display:inline-flex; flex-shrink:0; height:20px; justify-content:center; width:16px; }
.dva-viz-channel-toggle svg { display:block; fill:none; height:13px; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:2; transition:transform .15s ease; width:13px; }
.dva-viz-channel--open .dva-viz-channel-toggle svg { transform:rotate(180deg); }
.dva-viz-rules { display:flex; flex-direction:column; gap:6px; padding:10px 12px 12px; }
.dva-viz-rules[hidden] { display:none; }
.dva-viz-channel-empty-note { color:#75797b; font-size:10.5px; font-style:italic; }
.dva-viz-rule {
  align-items:center;
  background:#1d1f20;
  border-left:3px solid transparent;
  border-radius:5px;
  color:inherit;
  display:flex;
  gap:8px;
  height:30px;
  padding:0 9px;
  text-decoration:none;
  transition:background .12s ease, box-shadow .12s ease, transform .12s ease;
}
.dva-viz-rule-heat { align-items:flex-end; display:inline-flex; flex-shrink:0; gap:2px; }
.dva-viz-rule-heat i { background:#3a3d3e; border-radius:1px; display:block; width:3px; }
.dva-viz-rule-heat i:nth-child(1) { height:6px; }
.dva-viz-rule-heat i:nth-child(2) { height:9px; }
.dva-viz-rule-heat i:nth-child(3) { height:12px; }
.dva-viz-rule-name { color:#e5e8e9; flex:1 1 auto; font-size:10.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dva-viz-rule-priority { background:#33383a; border-radius:4px; color:#c6cacc; flex-shrink:0; font-size:10.5px; font-weight:800; padding:2px 7px; }
.dva-viz-rule:hover,
.dva-viz-rule:focus-visible { background:#26292a; outline:0; transform:translateX(1px); }

/* Low tier: dim slate */
.dva-viz-rule--low { border-left-color:#4c5866; }
.dva-viz-rule--low .dva-viz-rule-heat i:nth-child(1) { background:#4c5866; }
.dva-viz-rule--low .dva-viz-rule-priority { background:#2c343c; color:#a8b3bd; }

/* Mid tier: mid slate-blue */
.dva-viz-rule--mid { border-left-color:#7891a3; }
.dva-viz-rule--mid .dva-viz-rule-heat i:nth-child(1),
.dva-viz-rule--mid .dva-viz-rule-heat i:nth-child(2) { background:#7891a3; }
.dva-viz-rule--mid .dva-viz-rule-priority { background:#334452; color:#c6d6e0; }

/* High tier: pale slate-blue */
.dva-viz-rule--high { border-left-color:#a9bfcf; }
.dva-viz-rule--high .dva-viz-rule-heat i { background:#a9bfcf; }
.dva-viz-rule--high .dva-viz-rule-priority { background:#405264; color:#dce8f0; }

/* Highest priority on the channel: gold ring, wins on conflict */
.dva-viz-rule--top { background:#332b1c; box-shadow:inset 0 0 0 1px #e0b04a, 0 0 10px rgba(224,176,74,.15); }
.dva-viz-rule--top .dva-viz-rule-name { color:#ffe9b8; font-weight:600; }
.dva-viz-rule--top .dva-viz-rule-priority { background:#e0b04a; color:#2e2005; }
.dva-viz-rule--top:hover,
.dva-viz-rule--top:focus-visible { background:#3d3220; box-shadow:inset 0 0 0 1px #edc064, 0 0 12px rgba(224,176,74,.25); }
.dva-viz-no-matches { color:#9aa0a3; font-size:12px; padding:24px 0; text-align:center; }
@media (max-width:767px) {
  .dva-viz-filter-bar { align-items:stretch; flex-direction:column; }
  .dva-viz-filter-bar .extension-filter-field-search { flex:0 0 auto; margin-left:0; width:100%; }
  .dva-viz-grid { grid-template-columns:1fr; }
}

/* DVA retains an AJAX MVC Grid for LDAP groups; align its table typography
   with the packaged LDAP Groups starter table without changing shared CSS. */
.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:30%!important; }
.system-groups-page .ldap-groups-config-grid .mvc-grid-table > table > thead > tr > th:nth-child(3) { width:30%!important; }
.system-groups-page .ldap-groups-config-grid .mvc-grid-table > table > thead > tr > th:nth-child(4) { width:auto!important; }
.system-groups-page .ldap-groups-config-grid .mvc-grid-table > table > thead > tr > th:nth-child(5) { width:116px!important; }
.ldap-members-unavailable { color:#8f9497; }

/* Product timetable screens no longer depend on Bootstrap's grid utilities. */
.timetable-summary { padding:12px 16px; color:#8f9497; border-bottom:1px solid #44484a; }
.timetable-query { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)) auto; gap:12px; align-items:end; padding:14px 16px; border-bottom:1px solid #44484a; }
.timetable-query label { display:grid; gap:6px; margin:0; color:#d7d9da; }
.timetable-query-actions { display:flex; gap:8px; align-items:center; }
.timetable-query-actions .usersubmit,.timetable-query-actions .usersubmit-secondary { align-items:center; border-radius:5px; cursor:pointer; display:inline-flex; font-family:inherit; font-size:11px; font-weight:600; justify-content:center; line-height:1.2; min-height:38px; min-width:104px; padding:8px 18px; text-decoration:none; }
.timetable-query-actions .usersubmit { background:linear-gradient(180deg,#1ed2ef 0%,#06a8c6 100%); border:1px solid #2cdbf6; color:#092229; }
.timetable-query-actions .usersubmit:hover { background:linear-gradient(180deg,#34dcf5 0%,#0db4d2 100%); }
.timetable-query-actions .usersubmit-secondary { background:#2d2f30; border:1px solid #46494b; color:#d7d9da; }
.timetable-query-actions .usersubmit-secondary:hover { background:#36383a; border-color:#5a5d60; color:#f0f1f2; }
.timetable-page .timetable-choose-action { align-items:center; background:#2d2f30; border:1px solid #00a9c8; border-radius:5px; color:#72e1f5; display:inline-flex; font-size:11px; font-weight:600; justify-content:center; min-height:32px; min-width:76px; padding:6px 12px; text-decoration:none; }
.timetable-page .timetable-choose-action:hover,.timetable-page .timetable-choose-action:focus-visible { background:rgba(0,199,238,.15); border-color:#00c7ee; color:#b9f4ff; }
.business-rule-editor-form { width:100%; }
@media(max-width:900px) { .timetable-query { grid-template-columns:1fr 1fr; } }
@media(max-width:600px) { .timetable-query { grid-template-columns:1fr; } .timetable-query-actions>* { flex:1 1 0; } }

/* Disabled business rules retain fully usable actions, while their data cells
   visibly recede from active rules. */
.business-rules-grid tbody tr:has(.is-rule-disabled) > td:not(.config-actions-cell) {
  background:#27292a;
  color:#8d9295;
}
.business-rules-grid tbody tr:has(.is-rule-disabled) > td:not(.config-actions-cell) .config-cell-copy,
.business-rules-grid tbody tr:has(.is-rule-disabled) > td:not(.config-actions-cell) .config-connection-mode {
  filter:saturate(.45);
  opacity:.62;
}
.business-rules-grid .is-rule-disabled .config-extension-number {
  background:#292b2c;
  border-color:#484b4d;
  color:#8f9497;
}
.business-rules-grid tbody tr:has(.is-rule-disabled) > td:first-child {
  box-shadow:inset 3px 0 0 #555a5d;
}
.business-rule-mobile-label,
.business-rule-row-actions-cell .config-action > span { display:none; }

@media (max-width:767px) {
  .business-rules-grid .mvc-grid-table { overflow:visible; }
  .business-rules-grid .mvc-grid-table > table { min-width:0; table-layout:auto; width:100%; }
  .business-rules-grid .mvc-grid-table > table > thead { display:none; }
  .business-rules-grid .mvc-grid-table > table > tbody {
    display:grid;
    gap:10px;
    padding:10px;
  }
  .business-rules-grid .mvc-grid-table > table > tbody > tr {
    align-items:stretch;
    background:#292b2c;
    border:1px solid #484b4d;
    border-left:4px solid #31cc4b;
    border-radius:7px;
    display:grid;
    gap:0;
    grid-template-columns:repeat(2,minmax(0,1fr));
    overflow:hidden;
    padding:0;
  }
  .business-rules-grid .mvc-grid-table > table > tbody > tr:has(.is-rule-disabled) {
    border-left-color:#555a5d;
  }
  .business-rules-grid .mvc-grid-table > table > tbody > tr > td,
  .business-rules-grid .mvc-grid-table > table > tbody > tr:hover > td,
  .business-rules-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;
  }
  .business-rules-grid .business-rule-identity-cell {
    border-bottom:1px solid #414446 !important;
    grid-column:1 / -1;
    padding:12px !important;
  }
  .business-rule-identity-cell .config-extension-cell,
  .business-rule-identity-cell .config-cell-copy { min-width:0; }
  .business-rule-identity-cell .config-cell-copy strong {
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .business-rules-grid :is(.business-rule-scope-cell,.business-rule-assigned-actions-cell) {
    border-bottom:1px solid #414446 !important;
    flex-direction:column;
    gap:5px;
    grid-column:1 / -1;
    padding:10px 12px !important;
  }
  .business-rule-mobile-label {
    color:#8f9497;
    display:block;
    font-size:9px;
    font-weight:700;
    letter-spacing:.06em;
    line-height:1.2;
    text-transform:uppercase;
  }
  .business-rules-grid :is(.business-rule-scope-cell,.business-rule-evaluation-cell,.business-rule-assigned-actions-cell) .config-cell-copy {
    min-width:0;
    width:100%;
  }
  .business-rules-grid :is(.business-rule-evaluation-cell,.business-rule-time-cell) {
    flex-direction:column;
    gap:5px;
    padding:10px 12px !important;
  }
  .business-rules-grid .business-rule-evaluation-cell { border-right:1px solid #414446 !important; }
  .business-rules-grid .business-rule-time-cell .config-connection-mode { align-self:flex-start; }
  .business-rules-grid .business-rule-state-cell,
  .business-rules-grid .business-rule-channels-cell {
    align-items:center !important;
    border-top:1px solid #414446 !important;
    flex-direction:row;
    grid-column:1 / -1;
    justify-content:space-between;
    padding:8px 12px !important;
  }
  .business-rules-grid .business-rule-assigned-actions-cell .business-rule-actions-cell small {
    display:-webkit-box;
    line-clamp:2;
    overflow:hidden;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
  }
  .business-rules-grid .business-rule-channels-cell .config-cell-copy {
    align-items:flex-end;
    min-width:0;
  }
  .business-rules-grid .business-rule-channels-cell .config-cell-copy strong {
    overflow-wrap:anywhere;
    text-align:right;
  }
  .business-rules-grid .business-rule-row-actions-cell {
    border-top:1px solid #414446 !important;
    grid-column:1 / -1;
    padding:8px !important;
  }
  .business-rules-grid .business-rule-row-actions-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%;
  }
  .business-rules-grid .business-rule-row-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%;
  }
  .business-rules-grid .business-rule-row-actions-cell .config-action + .config-action { border-left:1px solid #4b4f51; }
  .business-rules-grid .business-rule-row-actions-cell .config-action:hover,
  .business-rules-grid .business-rule-row-actions-cell .config-action:focus-visible { background:#303334; }
  .business-rule-row-actions-cell .config-action > span {
    color:#cfd2d4;
    display:block;
    font-size:8px;
    font-weight:600;
    line-height:1;
  }
}

/* Audio Library is a DVA product catalogue over the packaged config/list shell. */
.audio-library-filter-bar { grid-template-columns:minmax(160px,1fr) minmax(260px,38%); }
.audio-library-grid-shell { min-height:0; }
.audio-library-grid .mvc-grid-table > table { min-width:980px; table-layout:fixed; }
.audio-library-grid .mvc-grid-table th,
.audio-library-grid .mvc-grid-table td { vertical-align:middle; }
.audio-library-grid .mvc-grid-sort { display:none; }
.sp-app .audio-library-grid .mvc-grid-table :is(th,td):nth-child(1) { width:30%; }
.sp-app .audio-library-grid .mvc-grid-table :is(th,td):nth-child(2) { width:12%; }
.sp-app .audio-library-grid .mvc-grid-table :is(th,td):nth-child(3) { width:8%; text-align:center; }
.sp-app .audio-library-grid .mvc-grid-table :is(th,td):nth-child(4) { width:15%; }
.sp-app .audio-library-grid .mvc-grid-table :is(th,td):nth-child(5) { width:13%; }
.sp-app .audio-library-grid .mvc-grid-table :is(th,td):nth-child(6) { width:12%; text-align:center; }
.sp-app .audio-library-grid .mvc-grid-table :is(th,td):nth-child(7) { width:10%; text-align:center; }
.sp-app .audio-library-grid .mvc-grid-table th:nth-child(3) .mvc-grid-title,
.sp-app .audio-library-grid .mvc-grid-table th:nth-child(6) .mvc-grid-title,
.sp-app .audio-library-grid .mvc-grid-table th:nth-child(7) .mvc-grid-title { display:block; width:100%; }
.sp-app .audio-library-grid .mvc-grid-table th:nth-child(3),
.sp-app .audio-library-grid .mvc-grid-table th:nth-child(6),
.sp-app .audio-library-grid .mvc-grid-table th:nth-child(7) { padding-inline:8px; }
.audio-library-grid .mvc-grid-table td:first-child .config-extension-cell,
.audio-library-grid .mvc-grid-table td:first-child .config-cell-copy { min-width:0; }
.audio-library-grid .mvc-grid-table td:first-child .config-cell-copy strong {
  line-height:1.35;
  overflow-wrap:anywhere;
  white-space:normal;
}
.audio-priority { display:inline-block; min-width:2ch; color:#dadddf; font-variant-numeric:tabular-nums; }
.audio-inflection { color:#aeb2b4; }
.audio-library-grid .extension-row-actions { justify-content:center; }
/* The Audio Library section switcher now uses the packaged `.sp-section-nav`
   primitive (SmartPi.UI `423c2c1`/`b344034`), which carries the selector styling
   and folds the desktop tab strip via `.config-tabs-shell:has(.sp-section-nav)`.
   The DVA copy that used to live here is gone; `_SystemSubNav` moved across at
   the same time rather than relying on the retained `.system-mobile-nav` alias. */
@media (max-width:767px) {
  .dva-channel-editor,.dva-rule-columns { grid-template-columns:1fr; }
  .dva-channel-select { grid-column:1; }
  .dva-rule-mobile-tabs {
    background:#202223;
    border:1px solid #45494b;
    border-radius:7px;
    display:grid;
    gap:4px;
    grid-template-columns:repeat(2,minmax(0,1fr));
    margin-top:14px;
    padding:4px;
  }
  .dva-rule-mobile-tab {
    appearance:none;
    background:transparent;
    border:1px solid transparent;
    border-radius:5px;
    color:#aeb3b6;
    cursor:pointer;
    font-family:inherit;
    font-size:11px;
    font-weight:700;
    min-height:38px;
    padding:6px 8px;
  }
  .dva-rule-mobile-tab.is-active {
    background:rgba(0,199,238,.1);
    border-color:rgba(0,199,238,.5);
    color:#7ce0f2;
  }
  .dva-rule-mobile-tab:focus-visible { outline:2px solid #e6e6e6; outline-offset:1px; }
  .dva-rule-columns { margin-top:8px; }
  .dva-rule-column[hidden] { display:none; }
  .dva-rule-column .extension-filter-bar {
    display:block;
    padding:10px 12px;
  }
  .dva-rule-column .extension-filter-presets { display:none; }
  .dva-rule-column .extension-filter-field-search,
  .dva-rule-column .extension-filter-field-search input {
    box-sizing:border-box;
    max-width:100%;
    min-width:0;
    width:100%;
  }
  .dva-rule-column .config-grid-shell,
  .dva-rule-column .dva-rule-grid,
  .dva-rule-column .mvc-grid,
  .dva-rule-column .mvc-grid-table { max-width:100%; min-width:0; width:100%; }
  .dva-rule-column .dva-rule-grid :is(th,td):nth-child(n) { width:auto; }
  .dva-rule-grid .mvc-grid-table > table { table-layout:auto; }
  .dva-rule-grid .mvc-grid-table tbody tr {
    align-items:end;
    display:grid;
    gap:6px 10px;
    grid-template-columns:minmax(0,1fr) auto;
    padding:10px 12px;
  }
  .dva-rule-grid .mvc-grid-table tbody td { min-width:0; width:auto; }
  .dva-rule-grid .dva-rule-name-cell,
  .dva-rule-grid .dva-rule-description-cell { grid-column:1 / -1; }
  .dva-rule-grid .dva-rule-description-cell { color:#aeb3b6; }
  .dva-rule-grid .dva-rule-priority-cell {
    align-items:center;
    display:flex !important;
    gap:7px;
  }
  .dva-rule-grid .dva-rule-priority-cell::before {
    color:#8f9598;
    content:"Priority";
    font-size:9px;
    font-weight:700;
    letter-spacing:.05em;
    text-transform:uppercase;
  }
  .dva-rule-grid .dva-rule-actions-cell { justify-self:end; }
  .dva-rule-grid .priority-input { width:58px!important; }
  .dva-rule-grid .config-rule-button { min-height:34px; }
  .audio-library-filter-bar { grid-template-columns:1fr; }

  /* The shared fold turns every .extensions-config-grid row into a card, but the
     desktop table sizing above (min-width + fixed layout + % columns) lives in
     this app layer, which loads last — so it has to stand down here or the card
     stays 820px wide and everything past the title is clipped off-screen. */
  .audio-library-grid .mvc-grid-table > table { min-width:0; table-layout:auto; width:100%; }
  .sp-app .audio-library-grid .mvc-grid-table :is(th,td):nth-child(n) { width:auto; }
  .audio-library-grid .mvc-grid-table tbody tr { gap:6px 10px; }

  /* Card: title on its own line, meta line (updated · priority · inflection),
     legacy name below it, then the playback + row actions control line. */
  .audio-library-grid .mvc-grid-table tbody td:nth-child(1) { flex:1 1 100%; order:1; }
  .audio-library-grid .mvc-grid-table tbody td:nth-child(2) { order:2; }
  .audio-library-grid .mvc-grid-table tbody td:nth-child(3) { order:3; }
  .audio-library-grid .mvc-grid-table tbody td:nth-child(5) { order:4; }
  .audio-library-grid .mvc-grid-table tbody td:nth-child(4) { flex:1 1 100%; order:5; }
  .audio-library-grid .mvc-grid-table tbody td:nth-child(6) { order:6; }
  .audio-library-grid .mvc-grid-table tbody td.config-actions-cell { margin-left:auto; order:7; }

  .audio-library-grid .mvc-grid-table tbody td:nth-child(2) .config-cell-copy {
    align-items:baseline;
    flex-direction:row;
    gap:5px;
  }
  .audio-library-grid .mvc-grid-table tbody td:nth-child(3) .audio-priority::before {
    color:#8f9497;
    content:"Priority ";
    font-weight:500;
  }
  .audio-library-grid .mvc-grid-table tbody td:nth-child(3) .audio-priority,
  .audio-library-grid .mvc-grid-table tbody td:nth-child(5) .audio-inflection { font-size:11px; }
  .audio-library-grid .mvc-grid-table tbody td:nth-child(6) .audio-container { justify-content:flex-start; min-height:0; }
  /* 35 entries page 10 at a time; the shared fold hides the pager (the logs page
     substitutes its own "show more"), which would strand every later entry. */
  .audio-library-grid .mvc-grid-pager { display:flex; padding:10px 12px; }
  .audio-library-grid .mvc-grid-pager ul { flex-wrap:wrap; justify-content:center; }
}
/* Dashboard tiles live in smartpi-dashboard.css (adopted from the SIP server). */
/* Config/list-page system lives in smartpi-config.css (adopted from the SIP). */

/* Two-column overview (e.g. Feeds page: feeds grid + nodes grid). */
.feeds-overview-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: 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; } }
/* The SIP grid forces min-width:1120px (full-width single table). In the Feed
   page's two half-width columns that clips the last column, so let these grids
   size to their own (fewer) columns instead. */
.feeds-overview-columns .extensions-config-grid .mvc-grid-table > table { min-width: 0; }
/* Frame each half-width grid on all sides (no orange header caps them here, so
   the SIP's open left/right edges would otherwise read as unclosed). */
.feeds-overview-columns .config-grid-shell { border: 1px solid var(--config-border); border-radius: 6px; }

/* --- feed "starting/in-progress" status: glow instead of grey ------------ */
@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; }
}

/* --- 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; }

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

/* --- Status: carry the flex chain across DVA's live-region wrapper -------- */
/* SmartPi.UI `e5fa936` gives `.status-component-list` its own `flex: 1 1 auto;
   min-height: 0; overflow-y: auto`, so the list scrolling is no longer ours.
   What stays here is DVA-specific: `[data-status-live-region]` is a wrapper the
   five-second refresh replaces wholesale, and it sits between the overview frame
   and the list. Without it participating in the flex column the list has no
   bounded ancestor, so the packaged `overflow-y` never engages. Upstream cannot
   own this rule - the wrapper is a DVA construct it has never seen.
   Not media-scoped, matching the packaged list rule: on mobile the list is the
   scrolling region too. */
.status-overview-page [data-status-live-region] {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

/* --- Scrollbars: brand orange, ported from the SIP server ----------------- */
/* SIP styles these globally (local.css "SCROLL BAR" block, line ~246): an orange
   thumb on a black track, the thumb inset by a black border so it reads as a
   floating bar rather than filling the gutter. Two declarations there are
   invalid and ignored by every browser -- `scrollbar-width: 10px` (only
   auto/thin/none are legal) and `background-color: linear-gradient(...)` -- so
   only what actually renders is carried across. `height` is added alongside
   SIP's `width` so horizontal scrollbars (grids, wide tables) match too. */
* {
  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: feed tag, row expansion and trip detail ---------------------- */
/* The packaged status stylesheet predates these, so they live in the app layer.
   Colours are taken from the same palette it uses. */

/* Feed filter is a DVA-only addition to the packaged toolbar, so the packaged
   3-column grid (filters / search / live state) is widened here for the extra
   column rather than touched upstream. Live state stays last in both the
   markup and this column order, so it keeps sitting at the far right. */
.status-toolbar { grid-template-columns: minmax(300px,auto) minmax(160px,auto) minmax(200px,1fr) auto; }

/* Styled to match .status-search's input exactly, so the two controls read as
   one filter row rather than two different components stitched together. */
.status-feed-filter { color: #999ea1; display: flex; flex-direction: column; font-size: 9px; gap: 4px; text-transform: uppercase; }
.status-feed-filter select {
  background: #1d1f20;
  border: 1px solid #505355;
  border-radius: 5px;
  box-sizing: border-box;
  color: #e5e7e8;
  font: 400 11px "IBM Plex Sans",sans-serif;
  height: 34px;
  padding: 0 10px;
  width: 100%;
}
.status-feed-filter select:focus { border-color: #00b9db; box-shadow: 0 0 0 1px rgba(0,194,230,.18); outline: 0; }

@media (max-width: 900px) {
  .status-toolbar { grid-template-columns: repeat(2,minmax(160px,1fr)); }
  .status-live-state { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
  .status-toolbar { grid-template-columns: 1fr; }
}
/* Plain class selector: SmartPi.UI fd21a8f scopes the identity's display:block to
   direct children, so nested inline content is no longer flattened and this does
   not need to out-specify anything. */
.status-feed-tag {
  background: rgba(0, 199, 238, .1);
  border: 1px solid rgba(0, 168, 199, .55);
  border-radius: 4px;
  color: #63d8eb;
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  margin-left: 7px;
  padding: 1px 6px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Line badge: background/text colour set inline per row from the feed's GTFS
   route_color/route_text_color (see StatusController.NormalizeHexColor), this only
   supplies the shape. Falls back to a neutral grey via the same inline style when a
   feed does not publish a route colour. */
.status-line-badge {
  border-radius: 4px;
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  padding: 1px 6px;
  vertical-align: middle;
  white-space: nowrap;
}
.status-component-identity .status-line-badge { margin-right: 6px; }

/* The badge and the service name it labels need to share a middle baseline, not the
   inline-content default (text sits on its own baseline, a touch below an inline-block
   badge's). Same specificity as SmartPi.UI fd21a8f's ".status-component-identity > strong
   { display: block }" (see the .status-feed-tag note above) - this file loads after it,
   so flex wins on source order rather than needing to out-specify it. */
.status-component-identity > strong { align-items: center; display: flex; min-width: 0; }
.status-service-name { display: block; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-trip-route-fact dd { align-items: flex-start; display: flex; gap: 8px; }
.status-trip-route-fact .status-line-badge { flex-shrink: 0; margin-top: 1px; }
.status-trip-route-label { min-width: 0; }

/* The flex:0 0 auto that kept an expanded row from being squashed back to its
   min-height now ships in SmartPi.UI fd21a8f. */

/* The icon becomes the disclosure control; it keeps the icon's grid slot so the
   row layout defined by the packaged stylesheet is untouched. */
.status-component-toggle {
  background: none;
  border: 0;
  cursor: pointer;
  display: block;
  padding: 0;
}

/* Open state reads as a pressed control -- the vehicle glyph stays upright, since
   rotating the subject of the icon looks playful rather than functional. */
.status-component-toggle .status-component-icon {
  transition: background-color .15s ease, border-color .15s ease;
}

.status-component-toggle:hover .status-component-icon { border-color: #6a6e70; }

.status-component.is-expanded .status-component-toggle .status-component-icon {
  background: #14343c;
  border-color: #00a8c7;
}

.status-component-toggle:focus-visible { outline: 2px solid #00b9db; outline-offset: 2px; }

/* DVA-specific status state: a timetable-only trip is healthy but not realtime-backed,
   so it uses the same calm treatment as operational while remaining independently
   filterable in the page model. */
.status-component--scheduled { border-left-color: #31cc4b; }
.status-component--scheduled .status-component-icon { color: #92979a; }
.status-component--scheduled .status-component-state strong { color: #72dd84; }
.status-component--scheduled .status-component-state strong i { background: #31cc4b; }

.status-trip-detail {
  border-top: 1px solid #424547;
  grid-column: 1 / -1;
  margin-top: 11px;
  padding-top: 11px;
}

.status-trip-detail[hidden] { display: none; }

.status-trip-facts {
  display: grid;
  gap: 8px 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 0 0 11px;
}

.status-trip-facts dt { color: #858b8e; font-size: 9px; text-transform: uppercase; }
.status-trip-facts dd { color: #d3d6d8; font-size: 11px; margin: 2px 0 0; }

/* The line badge plus full service name ("Berowra and Hornsby to North Shore via
   Strathfield and City") routinely needs more room than the other facts, which
   are all a word or two - double its track so it wraps far less often. */
.status-trip-route-fact { grid-column: span 2; }

.status-trip-detail-note { color: #92979a; font-size: 10px; margin: 0 0 11px; }
.status-trip-detail-empty { color: #92979a; font-size: 11px; margin: 0; }

/* The announcements table is the stops table with a different payload, so it shares
   the type scale and rules rather than restating them. */
.status-trip-stops,
.status-trip-announcements { border-collapse: collapse; font-size: 11px; width: 100%; }
.status-trip-stops th,
.status-trip-announcements th {
  border-bottom: 1px solid #424547;
  color: #858b8e;
  font-size: 9px;
  font-weight: 600;
  padding: 0 8px 5px 0;
  text-align: left;
  text-transform: uppercase;
}
.status-trip-stops td,
.status-trip-announcements td { border-bottom: 1px solid #333637; color: #d3d6d8; padding: 5px 8px 5px 0; }
.status-trip-stops tr.is-passed td { color: #7c8285; }
.status-trip-stop-time { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* Heads each block inside an expanded trip. Both the announcements and the stops
   get one: they are separate tables with different columns, and the stops table
   gains a leading # column when the feed supplies sequences, so they can never be
   made to align. Labelling both stops them reading as one misaligned table. */
.status-trip-section-title {
  color: #858b8e;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .05em;
  margin: 16px 0 6px;
  text-transform: uppercase;
}
.status-trip-section-title:first-of-type { margin-top: 14px; }

/* Announcements are usually one or two rows, so the columns are pinned rather than
   left to size themselves off the longest rule name - otherwise the block reflows
   every time a different rule fires. */
.status-trip-announcements { table-layout: fixed; }
.status-trip-announcements th:nth-child(1),
.status-trip-announcements td:nth-child(1) { width: 36%; }
.status-trip-announcements th:nth-child(2),
.status-trip-announcements td:nth-child(2) { width: 18%; }
.status-trip-announcements th:nth-child(3),
.status-trip-announcements td:nth-child(3) { width: 28%; }
.status-trip-announcements th:nth-child(4),
.status-trip-announcements td:nth-child(4) { width: 18%; }
.status-trip-announcements td:nth-child(1),
.status-trip-announcements td:nth-child(3) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Channel number next to the DVA node name in the "Played on" column - same shape
   as the line badge's sibling styling, just neutral since there is no brand colour
   for a channel. */
.status-trip-channel {
  color: #858b8e;
  font-size: 9px;
  margin-left: 4px;
  white-space: nowrap;
}

/* Exact issue timestamp under the relative "When" label - relative text is fine for
   scanning the list live, but it goes stale the moment you look away, and isn't enough
   to correlate an announcement against a downstream DVA/audio log after the fact. */
.status-trip-when-exact {
  color: #858b8e;
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  margin-top: 2px;
}

/* "Played on" column when the rule fired but the order never reached the DVA (e.g. an
   empty stopping pattern) - the same attention colour as an off-schedule trip elsewhere
   on this page, so it reads as a caution rather than a normal delivery. */
.status-trip-announcement-failed { color: #f26729; font-style: italic; }

.status-list-note { color: #92979a; font-size: 10px; padding: 6px 4px 2px; text-align: center; }

/* The banner metrics now live in the header actions slot, matching the SIP status
   page; keep them from stretching to the full banner width. */
.status-overview-header .config-header-actions.status-summary { align-self: center; flex: 0 0 auto; }

/* Mobile: the row folds to a card, so facts retain two compact columns and the
   detail tables become labelled records instead of clipped desktop columns. */
@media (max-width: 767px) {
  .status-trip-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .status-trip-facts dd,
  .status-trip-route-label { overflow-wrap:anywhere; }
  .status-trip-stops,
  .status-trip-announcements { display:block; table-layout:auto; white-space:normal; }
  .status-trip-stops thead,
  .status-trip-announcements thead { display:none; }
  .status-trip-stops tbody,
  .status-trip-announcements tbody { display:grid; gap:0; }
  .status-trip-stops tr,
  .status-trip-announcements tr {
    border-bottom:1px solid #3b3e40;
    display:grid;
    min-width:0;
    padding:8px 0;
  }
  .status-trip-stops td,
  .status-trip-announcements td {
    border:0;
    box-sizing:border-box;
    min-width:0;
    padding:0;
    width:auto !important;
  }
  .status-trip-stops tr {
    gap:5px 10px;
    grid-template-columns:24px minmax(0,1fr) auto;
  }
  .status-trip-stops td[data-label="#"] {
    align-items:center;
    background:#343738;
    border:1px solid #4a4e50;
    border-radius:4px;
    display:flex;
    grid-column:1;
    grid-row:1 / span 2;
    height:24px;
    justify-content:center;
    width:24px !important;
  }
  .status-trip-stops td[data-label="Stop"] {
    color:#d8dbdc;
    font-weight:500;
    grid-column:2 / -1;
    grid-row:1;
    overflow-wrap:anywhere;
  }
  .status-trip-stops td[data-label="Time"] { grid-column:2; grid-row:2; }
  .status-trip-stops td[data-label="Delay"] { grid-column:3; grid-row:2; text-align:right; }
  .status-trip-stops td[data-label="State"] { grid-column:2 / -1; grid-row:3; }
  .status-trip-stops td[data-label="Time"],
  .status-trip-stops td[data-label="Delay"],
  .status-trip-stops td[data-label="State"] {
    align-items:baseline;
    display:flex;
    gap:5px;
  }
  .status-trip-stops td[data-label="Delay"] { justify-content:flex-end; }
  .status-trip-stops td[data-label="Time"]::before,
  .status-trip-stops td[data-label="Delay"]::before,
  .status-trip-stops td[data-label="State"]::before,
  .status-trip-announcements td::before {
    color:#7f8588;
    content:attr(data-label);
    font-family:"IBM Plex Sans","Segoe UI",sans-serif;
    font-size:8px;
    font-weight:600;
    letter-spacing:.05em;
    text-transform:uppercase;
  }
  .status-trip-announcements tr {
    gap:7px 12px;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .status-trip-announcements td {
    display:flex;
    flex-direction:column;
    gap:3px;
    overflow:visible !important;
    text-overflow:clip !important;
    white-space:normal !important;
  }
  .status-trip-announcements td:first-child { grid-column:1 / -1; }
}

@media (max-width: 380px) {
  /* The Status screen nests the live list and each trip card inside the shared
     page well. Reclaim a little of that repeated gutter at phone minimum width
     so exact times and delays remain comfortably readable. */
  .status-overview-page .status-component-list { padding-inline:6px; }
  .status-overview-page .status-component { padding-inline:9px; }
}

.status-trip-detail-warning { color: #f4a170; }

/* --- Status: compact rows ------------------------------------------------
   The packaged row is sized for a handful of fixed components (72px min-height,
   34px icon, 10/13px padding). This board lists hundreds of trips and each row
   now expands for detail, so the collapsed state is tightened to fit roughly a
   third more on screen. Type sizes drop by a point at most -- the stop name and
   delay still have to be readable at a glance from across a room. */
.status-component-list > .status-component {
  gap: 12px;
  min-height: 0;
  padding: 7px 12px;
}

.status-component-list .status-component-icon {
  font-size: 13px;
  height: 28px;
  width: 28px;
}

.status-component-list .status-component-identity strong { font-size: 12px; }
.status-component-list .status-component-identity span { color: #b7bbbd; font-size: 9.5px; margin-top: 2px; }

/* SmartPi.UI's ".status-component-identity span { color: #92979a }" is a plain
   descendant selector, so it also dims .status-service-name even though it lives
   inside <strong> - it needs its own colour rather than inheriting the muted one. */
.status-component-identity strong .status-service-name { color: inherit; font-size: inherit; font-weight: inherit; }

/* The trip id is the one thing on the row you actually search and cross-reference
   by, but as plain prose text it read as just more grey noise next to the feed
   tag. Monospacing it (like every other id/code value in this app - see
   .status-trip-stop-time) and brightening it a step past the muted line colour
   makes it scan as an id rather than blend into the sentence around it. */
.status-trip-id {
  color: #d3d6d8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 600;
  letter-spacing: .01em;
}
.status-component-list .status-component-field span { margin-bottom: 2px; }
.status-component-list .status-component-field strong { font-size: 11px; }
.status-component-list .status-component-state strong { gap: 6px; }
.status-component-list .status-component-state strong i { height: 6px; width: 6px; }

/* The feed tag sat on its own line once the identity block tightened. */
.status-component-identity .status-feed-tag { font-size: 8.5px; margin-left: 6px; padding: 0 5px; }

/* Expanded detail keeps its own breathing room -- only the collapsed row shrinks. */
.status-component.is-expanded { padding-bottom: 12px; }

/* The DVA-only cache/feed line under the shared live indicator. SmartPi.UI
   fd21a8f now spans appended children across both columns and keeps the
   container colour neutral, so only the smaller type is left to set. */
.status-live-meta { font-size: 9px; }

/* The whole row is the toggle, so it advertises itself as clickable and lifts
   slightly under the pointer. The open detail keeps a normal cursor: it is
   content to read, not another control. */
.status-component-list > .status-component { cursor: pointer; }
.status-component-list > .status-component:hover { border-color: #5a5e60; }
.status-component-list > .status-component .status-trip-detail { cursor: default; }

/* LDAP settings additions that are DVA-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; }

/* --- Realtime feed type pill ---------------------------------------------- */
/* Realtime feeds, in cyan against the orange of GTFS. Built the same way as the
   packaged .mode-server: tinted dark gradient, the accent at 52% for the border,
   a lightened accent for the text. */
.config-connection-mode.mode-p2p {
  background: linear-gradient(180deg, #234149 0%, #1f3740 100%);
  border-color: rgba(0,199,238,0.52);
  color: #53d8ef;
}

/* 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 DVA has to span it across the field grid itself. */
#ldapBasePicker,
#ldapGroupPicker {
  grid-column: 1 / -1;
}

/* --- Rule action editor: one add button, per-row remove -------------------- */
/* Overrides the packaged .rule-action-row's 3-column layout (main | +/- pair |
   params) from smartpi-config.css. Adding a row is a page-level action (one
   "Add Action" button below the list, using the standard .config-add-extension
   pill); removing is per-row (a small x pinned to the row's corner), so the two
   opposite actions no longer sit side by side in a spot easy to mis-click. */
.rule-actions-list { display: grid; gap: 10px; }

/* Shows which business rule these actions belong to, since the page otherwise
   only carries a numeric id in its title. Clicking it opens that rule's editor. */
.rule-actions-context {
  align-items: center;
  background: #252829;
  border: 1px solid #4b4f51;
  border-radius: 8px;
  color: inherit;
  display: flex;
  gap: 14px;
  margin-bottom: 12px;
  padding: 10px 14px;
  text-decoration: none;
  transition: background .12s ease, border-color .12s ease;
}
.rule-actions-context:hover,
.rule-actions-context:focus-visible { background: #2b2f31; border-color: #5b5f61; outline: 0; }
.rule-actions-context-copy { flex: 0 1 auto; min-width: 0; }
.rule-actions-context-copy strong { color: #edf0f1; display: block; font-size: 13px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rule-actions-context-copy small { color: #9aa0a3; display: block; font-size: 11px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rule-actions-context-facts { align-items: center; color: #c6cacc; display: flex; flex: 1 1 auto; flex-wrap: wrap; font-size: 11px; gap: 6px 16px; margin-left: auto; }
.rule-actions-context-facts em { color: #7d8286; display: block; font-size: 9px; font-style: normal; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.rule-actions-context-status { border-radius: 4px; flex-shrink: 0; font-size: 10px; font-weight: 700; padding: 3px 8px; text-transform: uppercase; }
.rule-actions-context-status.is-enabled { background: rgba(49,204,75,.16); color: #7be392; }
.rule-actions-context-status.is-disabled { background: rgba(224,91,91,.16); color: #ff8b86; }
@media (max-width: 700px) {
  .rule-actions-context { flex-wrap: wrap; }
  .rule-actions-context-facts { margin-left: 0; }
}

/* Compact, live summary of the announcement assembled by the rows below it.
   It scrolls horizontally rather than wrapping so execution order always reads
   as one uninterrupted left-to-right sequence. */
.rule-action-preview {
  background: #252829;
  border: 1px solid #4b4f51;
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 10px 12px 8px;
}
.rule-action-preview-header { align-items: center; display: flex; gap: 12px; justify-content: space-between; margin-bottom: 8px; }
.rule-action-preview-title { align-items: center; color: #e7e9eb; display: flex; font-size: 12px; font-weight: 650; gap: 7px; }
.rule-action-preview-title svg { fill: none; height: 15px; stroke: #f06424; stroke-linecap: round; stroke-width: 2; width: 15px; }
.rule-action-preview-meta { color: #92989b; font-size: 10px; white-space: nowrap; }
.rule-action-preview-scroll { min-width: 0; overflow: hidden; padding: 1px; width: 100%; }
.rule-action-preview-track {
  display: grid;
  grid-template-columns: repeat(var(--rule-action-count, 1), minmax(0,1fr));
  list-style: none;
  margin: 0;
  min-width: 0;
  padding: 0;
  width: 100%;
}
.rule-action-preview-item { display: flex; min-width: 0; overflow: visible; }
.rule-action-preview-step {
  align-items: center;
  appearance: none;
  background: #303435;
  border: 1px solid #555a5c;
  border-right: 0;
  color: inherit;
  cursor: pointer;
  display: flex;
  flex: 1 1 auto;
  font: inherit;
  gap: 6px;
  min-height: 88px;
  min-width: 0;
  overflow: visible;
  padding: 32px 11px 32px 6px;
  position: relative;
  text-align: left;
  width: 100%;
}
.rule-action-preview-item:first-child .rule-action-preview-step { border-radius: 6px 0 0 6px; }
.rule-action-preview-item:last-child .rule-action-preview-step { border-radius: 0 6px 6px 0; border-right: 1px solid #555a5c; }
.rule-action-preview-item:not(:last-child) .rule-action-preview-step::after {
  background: #303435;
  border-right: 1px solid #555a5c;
  border-top: 1px solid #555a5c;
  content: "";
  height: 15px;
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 15px;
  z-index: 2;
}
.rule-action-preview-step:hover { background: #383c3d; }
.rule-action-preview-step:focus-visible { box-shadow: inset 0 0 0 2px #00c7ee; outline: 0; z-index: 4; }
.rule-action-preview-index {
  align-items: center;
  background: #1d2021;
  border: 1px solid #656a6d;
  border-radius: 50%;
  color: #c8ccce;
  display: flex;
  flex: 0 0 20px;
  font-size: 9px;
  font-weight: 700;
  height: 20px;
  justify-content: center;
  position: relative;
  width: 20px;
  z-index: 3;
}
.rule-action-preview-copy {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding-top: 0;
  position: static;
}
.rule-action-preview-kind {
  color: #6fd8ef;
  display: block;
  font-size: 8px;
  font-weight: 700;
  left: 32px;
  letter-spacing: .07em;
  line-height: 1.1;
  position: absolute;
  text-transform: uppercase;
  top: 11px;
  white-space: nowrap;
}
.rule-action-preview-label {
  color: #edf0f1;
  display: block;
  font-size: 10px;
  line-height: 1.2;
  overflow-wrap: anywhere;
  white-space: normal;
}
.rule-action-preview-step[data-type="audio"] .rule-action-preview-index { border-color: #00c7ee; color: #00c7ee; }
.rule-action-preview-step[data-type="data"] .rule-action-preview-index { border-color: #f06424; color: #f06424; }
.rule-action-preview-step[data-type="pause"] .rule-action-preview-index { border-color: #d3a64a; color: #e0b75f; }
.rule-action-preview-step[data-type="audio"] .rule-action-preview-kind { color: #4fd6f2; }
.rule-action-preview-step[data-type="data"] .rule-action-preview-kind { color: #ff8a5c; }
.rule-action-preview-step[data-type="pause"] .rule-action-preview-kind { color: #f2c36e; }
.rule-action-preview-step[data-state="missing"] { background: #3a3026; border-color: #8d6935; }
.rule-action-preview-step[data-state="missing"]::after { background: #3a3026; border-color: #8d6935; }
.rule-action-preview-step[data-state="missing"] .rule-action-preview-label,
.rule-action-preview-warning { color: #f2c36e; }
.rule-action-preview-warning { display: block; font-size: 8px; line-height: 1.1; margin-top: 2px; }
.rule-action-row.is-preview-target { animation: rule-action-preview-target 1.4s ease-out; }
@keyframes rule-action-preview-target {
  0%, 35% { border-color: #00c7ee; box-shadow: 0 0 0 2px rgba(0,199,238,.2); }
  100% { box-shadow: none; }
}

.rule-action-row {
  grid-template-columns: minmax(260px,1fr) minmax(300px,1.2fr);
  padding-left: 44px;
  padding-right: 44px;
  position: relative;
  transition: opacity 120ms ease;
}
.rule-action-row.is-dragging { opacity: .4; }
.rule-action-remove {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #8b9093;
  display: inline-flex;
  height: 26px;
  justify-content: center;
  position: absolute;
  right: 10px;
  top: 10px;
  width: 26px;
}
.rule-action-remove svg { fill: none; height: 14px; stroke: currentColor; stroke-linecap: round; stroke-width: 2; width: 14px; }
.rule-action-remove:hover,
.rule-action-remove:focus-visible { background: rgba(255,107,102,0.14); border-color: rgba(255,107,102,0.4); color: #ff6b66; }
.rule-action-add { margin-top: 2px; }

/* Drag handle - a small grip pinned opposite the remove button. The dots are
   filled (unlike the app's usual stroked icon style) because a filled grip is
   the more universally recognised drag affordance. */
.rule-action-drag {
  align-items: center;
  color: #8b9093;
  cursor: grab;
  display: inline-flex;
  height: 26px;
  justify-content: center;
  left: 10px;
  position: absolute;
  top: 10px;
  width: 26px;
}
.rule-action-drag:hover { color: #cfd2d3; }
.rule-action-drag:active { cursor: grabbing; }
.rule-action-drag svg { fill: currentColor; height: 16px; stroke: none; width: 16px; }

/* Business-rule comparators are not meaningful for triggers whose evaluation
   is fixed by the trigger itself. Make the existing disabled state unmistakable
   instead of relying on the browser's very subtle native select treatment. */
.business-rule-field.is-unavailable .form-control:disabled {
  background: #242627;
  border-color: #3f4345;
  color: #777d80;
  cursor: not-allowed;
  opacity: 1;
}
.business-rule-field-help { color: #8f9598; display: block; font-size: 10px; line-height: 1.25; margin-top: 5px; }

/* Trip-transformation trigger tiles declare `border: 1px solid` structurally,
   so without an explicit neutral they inherit the near-white text colour.
   Keep quiet options in the standard dark-panel border range; the packaged
   checked selector remains cyan and has higher specificity. */
.business-rule-editor-page .tt-map-header { min-height: 50px; }
.business-rule-editor-page .tt-map-title { font-size: 16px; font-weight: 400; }
.business-rule-editor-page .tt-map-subtitle { font-size: 10px; font-weight: 500; }
.business-rule-editor-page .tt-map-copy-mobile { display:none; }

@media (max-width:600px) {
  .business-rule-editor-page .tt-map-header {
    gap:10px;
    min-height:0;
    padding:10px;
  }
  .business-rule-editor-page .tt-map-title-wrap {
    align-items:flex-start;
    gap:8px;
    min-width:0;
    width:100%;
  }
  .business-rule-editor-page .tt-header-icon {
    flex-basis:30px;
    height:30px;
    width:30px;
  }
  .business-rule-editor-page .tt-map-title-wrap > div { min-width:0; }
  .business-rule-editor-page .tt-map-title { font-size:14px; line-height:1.2; }
  .business-rule-editor-page .tt-map-subtitle { font-size:9.5px; line-height:1.35; margin-top:2px; }
  .business-rule-editor-page .tt-map-copy-desktop { display:none; }
  .business-rule-editor-page .tt-map-copy-mobile { display:inline; }
  .business-rule-editor-page .tt-map-counters {
    display:grid;
    gap:4px;
    grid-template-columns:repeat(5,minmax(0,1fr));
    width:100%;
  }
  .business-rule-editor-page .tt-counter-pill {
    gap:1px 3px;
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-rows:18px auto;
    height:42px;
    min-width:0;
    padding:3px 4px;
  }
  .business-rule-editor-page .tt-counter-pill i {
    font-size:11px;
    grid-column:1;
    grid-row:1;
  }
  .business-rule-editor-page .tt-counter-pill strong {
    font-size:14px;
    grid-column:2;
    grid-row:1;
  }
  .business-rule-editor-page .tt-counter-pill span {
    font-size:7px;
    grid-column:1 / -1;
    grid-row:2;
    letter-spacing:.02em;
    overflow:hidden;
    text-align:center;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .business-rule-editor-page .tt-map-body { padding:10px; }
  .business-rule-editor-page .tt-info-strip,
  .business-rule-editor-page .tt-validation-line {
    align-items:flex-start;
    font-size:11px;
    gap:7px;
    line-height:1.4;
    padding:9px;
  }
  .business-rule-editor-page .tt-info-strip i,
  .business-rule-editor-page .tt-validation-line i { margin-right:2px; margin-top:2px; }
  .business-rule-editor-page .tt-add-leg-btn { justify-content:center; width:100%; }
  .business-rule-editor-page .tt-leg-header {
    align-items:stretch;
    display:grid;
    gap:10px;
    padding:10px;
  }
  .business-rule-editor-page .tt-leg-title-area {
    align-items:center;
    display:grid;
    gap:7px 8px;
    grid-template-columns:minmax(0,1fr) auto;
    width:100%;
  }
  .business-rule-editor-page .tt-leg-title {
    font-size:12px;
    grid-column:1;
    line-height:1.3;
    min-width:0;
  }
  .business-rule-editor-page .tt-role-badge-wrap { grid-column:2; justify-self:end; }
  .business-rule-editor-page .tt-mode-badge { grid-column:1 / -1; justify-self:start; }
  .business-rule-editor-page .tt-leg-summary {
    grid-column:1 / -1;
    line-height:1.4;
    max-width:none;
    overflow:visible;
    overflow-wrap:anywhere;
    text-overflow:clip;
    white-space:normal;
  }
  .business-rule-editor-page .tt-leg-actions {
    display:grid;
    gap:8px;
    grid-template-columns:repeat(2,minmax(0,1fr));
    width:100%;
  }
  .business-rule-editor-page .tt-toggle-leg,
  .business-rule-editor-page .tt-remove-leg {
    justify-content:center;
    min-height:36px;
    width:100%;
  }
  .business-rule-editor-page .tt-leg-card { overflow-x:clip; }
  .business-rule-editor-page .tt-leg-body {
    gap:8px;
    grid-template-columns:minmax(0,1fr);
    min-width:0;
    padding:8px;
  }
  .business-rule-editor-page .tt-section {
    min-width:0;
    padding:8px;
    width:100%;
  }
  .business-rule-editor-page .tt-section-title,
  .business-rule-editor-page .tt-match-box-title { flex-wrap:wrap; line-height:1.3; }
  .business-rule-editor-page .tt-identity-grid,
  .business-rule-editor-page .tt-trip-match-row,
  .business-rule-editor-page .tt-alt-toolbar,
  .business-rule-editor-page .tt-trigger-grid {
    grid-template-columns:minmax(0,1fr);
    min-width:0;
  }
  .business-rule-editor-page .tt-match-box {
    min-width:0;
    padding:8px;
    width:100%;
  }
  .business-rule-editor-page .tt-platform-row {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    min-width:0;
  }
  .business-rule-editor-page .tt-refresh-platforms { width:100%; }
  .business-rule-editor-page .tt-trip-toolbar {
    align-items:flex-start;
    flex-direction:column;
    min-width:0;
  }
  .business-rule-editor-page .tt-trip-results,
  .business-rule-editor-page .tt-trigger-group,
  .business-rule-editor-page .tt-trigger-group-body,
  .business-rule-editor-page .tt-alt-list { max-width:100%; min-width:0; }
  .business-rule-editor-page .tt-trigger-group-title {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto auto;
    min-width:0;
  }
  .business-rule-editor-page .tt-trigger-group-title > span:first-child { min-width:0; overflow-wrap:anywhere; }
  .business-rule-editor-page .tt-trigger-group-body { padding:8px; }
  .business-rule-editor-page .tt-trigger-group-actions { display:block; }
  .business-rule-editor-page .tt-group-toggle { justify-content:center; width:100%; }
  .business-rule-editor-page .tt-trigger-chip,
  .business-rule-editor-page .tt-alt-card { min-width:0; width:100%; }
  .business-rule-editor-page .tt-trigger-chip > span,
  .business-rule-editor-page .tt-alt-card > span,
  .business-rule-editor-page .tt-trip-choice > span { min-width:0; overflow-wrap:anywhere; }
  .business-rule-editor-page .tt-trip-choice.tt-select-all-row {
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
  }
  .business-rule-editor-page .tt-trip-choice.tt-select-all-row .tt-help { grid-column:2; margin-top:0; }
  .business-rule-editor-page .tt-selected-trip-tag {
    border-radius:6px;
    max-width:100%;
    overflow-wrap:anywhere;
  }
  .business-rule-editor-page .tt-selected-trip-tag button { flex:0 0 auto; }
  .business-rule-editor-page .tt-rule-meta { margin-left:0; overflow-wrap:anywhere; }
}

/* The partial's legacy ID-scoped label rule otherwise wins over the shared
   business-rule form contract (11px/400) and makes every mapping choice bold. */
.business-rule-editor-page #TripTransformationMappingPanel label { color: #c9ccce; font-size: 11px; font-weight: 400; }
.business-rule-editor-page .tt-trigger-chip,
.business-rule-editor-page .tt-alt-card { font-size: 11px; font-weight: 400; }
.business-rule-editor-page .tt-alt-card {
  align-items:center;
  display:grid;
  gap:8px;
  grid-template-columns:16px minmax(220px,.65fr) minmax(0,1fr);
}
.business-rule-editor-page .tt-alternative-rule {
  height:14px;
  margin:0;
  width:14px;
}
.business-rule-editor-page .tt-alt-card-content {
  display:contents;
}
.business-rule-editor-page .tt-alt-rule-name {
  min-width:0;
  overflow-wrap:anywhere;
}
.business-rule-editor-page .tt-rule-meta {
  align-items:center;
  display:grid;
  gap:8px 24px;
  grid-template-columns:repeat(2,minmax(0,1fr));
  margin:0;
  min-width:0;
}
.business-rule-editor-page .tt-rule-meta > span {
  min-width:0;
  overflow-wrap:anywhere;
}
.business-rule-editor-page .tt-rule-meta b { color:#c9ccce; font-weight:600; }
@media (max-width:600px) {
  .business-rule-editor-page .tt-alt-card {
    align-items:flex-start;
    grid-template-columns:16px minmax(0,1fr);
  }
  .business-rule-editor-page .tt-alt-card-content {
    display:grid;
    gap:5px;
    grid-template-columns:minmax(0,1fr);
  }
  .business-rule-editor-page .tt-rule-meta { align-items:flex-start; flex-direction:column; gap:3px; }
}
.business-rule-editor-page .tt-trigger-chip:not(:has(input:checked)),
.business-rule-editor-page .tt-alt-card:not(:has(input:checked)) { border-color: #55595b; color: #c9ccce; }
.business-rule-editor-page .tt-trigger-chip:not(:has(input:checked)):hover,
.business-rule-editor-page .tt-trigger-chip:not(:has(input:checked)):focus-within,
.business-rule-editor-page .tt-alt-card:not(:has(input:checked)):hover,
.business-rule-editor-page .tt-alt-card:not(:has(input:checked)):focus-within { border-color: #73787b; }

/* One brand-coloured 1px edge is the current SmartPi.UI selectable-tile cue.
   The packaged mapper adds a second 1px ring, producing the heavy edge reported
   here; cancel only that ring without changing the selected border colour. */
.business-rule-editor-page .tt-trigger-chip:has(input:checked),
.business-rule-editor-page .tt-alt-card:has(input:checked) { box-shadow: none; }

/* Compact mapper actions should not fall through to the browser's light-grey
   button chrome. These values mirror SmartPi.UI's compact config rule buttons. */
.business-rule-editor-page .tt-mini-btn {
  background: rgba(0,199,238,.08);
  border-color: rgba(0,199,238,.45);
  color: #82dfef;
  font-size: 10px;
  font-weight: 600;
}
.business-rule-editor-page .tt-remove-leg { background: rgba(224,91,91,.08); border-color: rgba(224,91,91,.45) !important; color: #ff9d99; }
.business-rule-editor-page .tt-remove-leg:hover,
.business-rule-editor-page .tt-remove-leg:focus-visible { background: rgba(224,91,91,.15); border-color: #e05b5b !important; color: #ffc0bd; }
.business-rule-editor-page .tt-pattern-case-note,
.business-rule-editor-page .tt-pattern-warning { font-size: 11px; line-height: 1.4; }

@media (max-width: 900px) {
  .rule-action-row { grid-template-columns: 1fr; }
  .rule-action-preview-meta { display: none; }
}

/* A horizontal sequence stops being legible on phones once several actions are
   present. Mobile therefore presents the same ordered, clickable actions as a
   vertical timeline; desktop retains the compact equal-column band. */
@media (max-width: 600px) {
  .rule-action-preview { padding: 10px; }
  .rule-action-preview-track {
    display: grid;
    gap: 7px;
    grid-template-columns: minmax(0,1fr);
  }
  .rule-action-preview-item { min-width: 0; position: relative; }
  .rule-action-preview-step,
  .rule-action-preview-item:first-child .rule-action-preview-step,
  .rule-action-preview-item:last-child .rule-action-preview-step {
    border: 1px solid #555a5c;
    border-radius: 6px;
    gap: 10px;
    min-height: 52px;
    padding: 8px 10px;
  }
  .rule-action-preview-item:not(:last-child) .rule-action-preview-step::after {
    background: #555a5c;
    border: 0;
    bottom: -8px;
    height: 8px;
    left: 20px;
    right: auto;
    top: auto;
    transform: none;
    width: 1px;
  }
  .rule-action-preview-copy { align-items: baseline; align-self: auto; display: grid; gap: 2px 8px; grid-template-columns: max-content minmax(0,1fr); justify-content: stretch; padding-top: 0; width: 100%; }
  .rule-action-preview-kind { position: static; }
  .rule-action-preview-kind { margin: 0; }
  .rule-action-preview-label { font-size: 11px; line-height: 1.3; }
  .rule-action-preview-warning { grid-column: 2; margin-top: 0; }
}

/* --- Order log: failed/delivered status ------------------------------------ */
/* Adds a red variant to the shared .status-badge (SmartPi.UI only ships
   --enabled/green and --disabled/grey) for the order log's per-row delivery
   status, and highlights the "Failed only" filter toggle to match when active. */
.status-badge--failed { background: rgba(255,107,102,0.12); border-color: rgba(255,107,102,0.4); color: #ffb0ac; }
#OrderOnlyFailedToggle[aria-pressed="true"] { background: rgba(255,107,102,0.14); border-color: rgba(255,107,102,0.55); color: #ffb0ac; }
#OrderOnlyFailedToggle[aria-pressed="true"]:hover { background: rgba(255,107,102,0.18); border-color: rgba(255,107,102,0.68); color: #ffc4c1; }

/* --- Live Status: announcement-in-progress indicator ------------------------ */
/* Server-rendered only while RulesProcessor has an order for this trip in
   flight (see RulesProcessor.IsTripAnnouncing), so it appears and disappears
   with the page's normal 5s row refresh - no separate polling of its own.
   Absolutely positioned in the corner of the "Last seen" field rather than
   flowed alongside its text: .status-component uses CSS grid with
   align-items:center (SmartPi.UI), so every field centres within the row's
   height - a field made taller by the icon+DVA/channel stack would drag every
   *other* field's shorter content down with it as the row grew to fit it.
   Taking the group out of flow keeps the field's own box (and so the row) the
   same height as any other row, and the group just overlays its corner. */
.status-component-updated { position: relative; }
/* Specificity, not source order, decides this fight: SmartPi.UI's blanket
   ".status-component-identity > strong,...,.status-component-field > span
   { display: block }" is a compound selector (2 classes + a type = 0,2,1)
   and .status-announcing-group is a direct child of .status-component-field
   (a span), so a bare ".status-announcing-group { display: flex }" (0,1,0)
   loses regardless of which stylesheet loads last - it silently falls back
   to block, and the icon and DVA/channel label end up flowing inline side
   by side instead of stacking. Scoping under the compound parent selector
   (0,3,0) is what actually outranks it. */
.status-component-field.status-component-updated .status-announcing-group {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: absolute;
  right: 0;
  top: 0;
}
.status-announcing-detail {
  color: #858b8e;
  font-size: 8px;
  font-weight: 500;
  max-width: 70px;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Sized to sit fully within the row's own content height (min-height 72px minus
   its 10px top/bottom padding, so ~52px) alongside the icon+label stack above,
   rather than the 34px vehicle-icon size, which pushed the label past that and
   made the group read as oversized next to the row's other fields. Scoped under
   .status-component-updated rather than bare .status-announcing: the shared
   .status-component-field span rule (color:#858b8e) outranks a single class on
   specificity alone regardless of load order, and was winning.
   The glyph itself (icon, sound-wave pulse, reduced-motion handling) is now
   SmartPi.UI's shared .sp-live-speaker component - this is just the tile
   around it, matching the vehicle icon's dark-fill/border treatment. Its
   default margin-left (for sitting inline next to text elsewhere) is zeroed
   here since it needs to sit centred alone in the tile instead. */
.status-component-updated .status-announcing {
  align-items: center;
  background: #1c2e20;
  border: 1px solid rgba(49,204,75,0.5);
  border-radius: 6px;
  display: inline-flex;
  flex: 0 0 24px;
  height: 24px;
  justify-content: center;
  width: 24px;
}
/* Same trap as the note above, biting the icon itself now: .sp-live-speaker's
   own "color: var(--sp-green)" (a single class, 0,1,0) loses to
   .status-component-field span's "color: #858b8e" (a class + element, 0,1,1)
   regardless of which stylesheet loads last, so the icon rendered grey
   instead of green. Two ancestor classes here (0,3,0) is what actually wins. */
.status-component-updated .status-announcing .sp-live-speaker { color: var(--sp-green); margin-left: 0; }
