/* The fleet matrix is the visual anchor; reports and evidence stay quiet. */
body.dx-page {
  height: auto;
  min-height: 100vh;
  display: block;
  background: var(--bg-soft);
  color: var(--ink);
  font-family: "IBM Plex Sans", sans-serif;
}
.dx-page [hidden] {
  display: none !important;
}
.dx-wrap {
  max-width: 1380px;
  margin: auto;
  padding: 0 36px;
}
.dx-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
  gap: 20px;
}
.dx-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.dx-brand img {
  width: 28px;
  height: 28px;
}
.dx-header nav {
  display: flex;
  gap: 24px;
}
.dx-header nav a {
  color: var(--mid);
  text-decoration: none;
  padding: 10px 0;
}
.dx-header [aria-current] {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}
.dx-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 0 24px;
  gap: 12px;
}
.dx-title h1 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.8px;
  margin: 0;
}
.dx-title p {
  margin: 6px 0 0;
  color: var(--mid);
}
#dxRefreshState {
  font-size: 12px;
  color: var(--mid);
}
.dx-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
}
.dx-page button,
.dx-page select,
.dx-page input,
.dx-page textarea {
  font: inherit;
}
.dx-page button {
  cursor: pointer;
}
.dx-tabs button {
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 14px 20px;
  color: var(--mid);
  font-weight: 500;
}
.dx-tabs button[aria-current] {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
#dxReportCount:not(:empty) {
  margin-left: 6px;
  font-size: 12px;
  border-radius: 12px;
  padding: 1px 6px;
  background: var(--panel-sunken);
}
.dx-filters {
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 20px 0;
}
.dx-filters label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: var(--mid);
}
.dx-filters input,
.dx-filters select {
  height: 36px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 9px;
  color: var(--ink);
}
#dxDateFilters {
  display: flex;
  align-items: end;
  gap: 12px;
}
#dxDateFilters > span {
  font-size: 11px;
  padding-bottom: 10px;
  color: var(--mid);
}
.dx-filters button,
.dx-page .dx-button {
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--panel);
  color: var(--ink);
  padding: 8px 14px;
  text-decoration: none;
  font-size: 13px;
}
.dx-filters button[type="submit"] {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
#dxFilterMessage {
  font-size: 12px;
  color: var(--bad);
}
.dx-page :focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.dx-page button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.dx-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 18px;
  overflow: hidden;
}
.dx-section-head {
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.dx-section h2 {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
}
.dx-section-head p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--mid);
}
.dx-section-head a,
.dx-text-button {
  color: var(--accent);
  font-size: 13px;
}
.dx-text-button {
  border: 0;
  background: none;
  text-decoration: underline;
  padding: 4px;
}
.dx-empty {
  padding: 32px 22px;
  color: var(--mid);
  line-height: 1.6;
}
.dx-notice {
  padding: 12px 22px;
  background: var(--warn-bg);
  font-size: 13px;
  color: var(--ink);
  margin: 0;
}
.dx-muted {
  color: var(--mid);
  font-size: 12px;
}
.dx-scroll {
  overflow: auto;
}
.dx-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
.dx-table th {
  font-size: 12px;
  font-weight: 500;
  color: var(--mid);
  background: var(--panel-alt);
  padding: 12px 20px;
  white-space: nowrap;
}
.dx-table td {
  padding: 17px 20px;
  border-top: 1px solid var(--line-soft);
  vertical-align: middle;
}
.dx-table td small {
  display: block;
  margin-top: 4px;
  color: var(--mid);
  max-width: 320px;
}
.dx-table td:first-child {
  font-weight: 600;
}
.dx-sensor {
  color: var(--ink);
  font-weight: 600;
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
}
.dx-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--panel-alt);
  white-space: nowrap;
}
.dx-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dim);
}
.dx-working,
.dx-reachable,
.dx-sent {
  background: var(--good-bg);
  color: var(--good);
}
.dx-working::before,
.dx-reachable::before,
.dx-sent::before {
  background: var(--good);
}
.dx-down,
.dx-unreachable,
.dx-failed,
.dx-error,
.dx-critical {
  background: var(--bad-bg);
  color: var(--bad);
}
.dx-down::before,
.dx-unreachable::before,
.dx-failed::before,
.dx-error::before,
.dx-critical::before {
  background: var(--bad);
}
.dx-degraded,
.dx-warning,
.dx-pending,
.dx-settling {
  background: var(--warn-bg);
  color: #76530b;
}
.dx-degraded::before,
.dx-warning::before,
.dx-pending::before,
.dx-settling::before {
  background: var(--warn);
}
.dx-healthbar {
  display: flex;
  width: 110px;
  height: 5px;
  background: var(--line-soft);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 7px;
}
.dx-healthbar .good {
  background: var(--good);
}
.dx-healthbar .warn {
  background: var(--warn);
}
.dx-healthbar .bad {
  background: var(--bad);
}
.dx-notifications {
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  background: var(--accent-fade);
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 18px;
}
.dx-notifications strong {
  font-size: 13px;
}
.dx-notifications p {
  font-size: 12px;
  margin: 4px 0 0;
  color: var(--mid);
}
.dx-report {
  width: 100%;
  text-align: left;
  border: 0;
  border-top: 1px solid var(--line-soft);
  background: transparent;
  padding: 17px 22px;
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 18px;
  color: var(--ink);
}
.dx-report:hover {
  background: var(--panel-alt);
}
.dx-report strong {
  font-size: 13px;
  display: block;
  overflow-wrap: anywhere;
}
.dx-report p {
  font-size: 13px;
  margin: 5px 0;
  color: var(--mid);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 65ch;
}
.dx-report time,
.dx-report > span {
  font-size: 12px;
  color: var(--mid);
}
.dx-report > div {
  min-width: 0;
}
.dx-report-label {
  border-left: 3px solid var(--bad);
  padding-left: 10px;
}
.dx-pager {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 14px;
  padding: 16px 22px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
}
.dx-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 22px;
  font-size: 12px;
  color: var(--mid);
}
.dx-history {
  padding: 8px 22px 20px;
  overflow: auto;
}
.dx-history-row {
  min-width: 650px;
  margin-top: 20px;
}
.dx-history-row header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  gap: 16px;
}
.dx-strip {
  display: grid;
  gap: 3px;
  margin: 10px 0;
}
.dx-day {
  height: 28px;
  min-width: 4px;
  border: 0;
  border-radius: 2px;
  background: var(--panel-sunken);
  padding: 0;
}
.dx-day.working {
  background: var(--good);
}
.dx-day.down {
  background: var(--bad);
}
.dx-day.degraded {
  background: var(--warn);
}
.dx-day.silent {
  background: var(--dim);
}
.dx-day.gap {
  box-shadow: inset 0 -5px var(--imu);
}
.dx-day.manual {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}
.dx-day.partial {
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0 4px,
    #ffffff77 4px 6px
  );
}
.dx-axis {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--mid);
}
.dx-tools {
  display: flex;
  gap: 10px;
  padding: 14px 22px;
  align-items: center;
}
.dx-tools select {
  padding: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.dx-tools label {
  font-size: 12px;
  color: var(--mid);
}
.dx-log {
  padding: 13px 22px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  display: grid;
  grid-template-columns: 145px 85px 65px 1fr;
  gap: 12px;
  align-items: start;
}
.dx-log summary {
  cursor: pointer;
  overflow-wrap: anywhere;
}
.dx-log pre,
.dx-infra pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 330px;
  overflow: auto;
  font-size: 12px;
  background: var(--panel-alt);
  padding: 14px;
}
.dx-infra {
  padding: 18px 22px;
}
.dx-infra meter {
  width: 200px;
  margin: 10px;
}
.dx-footer {
  display: flex;
  justify-content: space-between;
  padding: 24px 0;
  color: var(--mid);
  font-size: 11px;
}
#dxDetail {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  width: min(760px, calc(100vw - 32px));
  max-height: 90vh;
  padding: 0;
}
#dxDetail::backdrop {
  background: #14171d80;
}
#dxDetail > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--panel);
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  z-index: 1;
}
#dxDetailTitle {
  font-size: 19px;
  margin: 0;
}
#dxClose {
  font-size: 26px;
  border: 0;
  background: none;
  padding: 0 8px;
}
#dxDetailBody {
  padding: 24px;
}
#dxDetailBody dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  font-size: 13px;
  gap: 10px;
}
#dxDetailBody dt {
  color: var(--mid);
}
#dxDetailBody dd {
  margin: 0;
  overflow-wrap: anywhere;
}
#dxDetailBody h3 {
  font-size: 15px;
  margin: 24px 0 12px;
}
.dx-error-detail {
  border-left: 3px solid var(--bad);
  padding: 4px 16px;
  margin: 20px 0;
}
.dx-error-detail p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.6;
}
.dx-note-form {
  display: grid;
  gap: 10px;
}
.dx-note-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: var(--mid);
}
.dx-note-form input,
.dx-note-form textarea,
.dx-note-form select {
  padding: 9px;
  border: 1px solid var(--line);
  background: var(--panel-alt);
  border-radius: 4px;
  color: var(--ink);
}
.dx-note-form textarea {
  min-height: 80px;
}
.dx-note-actions {
  display: flex;
  gap: 10px;
}
@media (max-width: 720px) {
  .dx-wrap {
    padding: 0 16px;
  }
  .dx-header {
    align-items: start;
    flex-direction: column;
    gap: 4px;
    padding: 14px 0;
  }
  .dx-brand {
    font-size: 13px;
  }
  .dx-header nav {
    gap: 22px;
    font-size: 13px;
  }
  .dx-title {
    padding: 24px 0 18px;
  }
  .dx-title h1 {
    font-size: 28px;
  }
  .dx-title p {
    font-size: 13px;
  }
  .dx-tabs {
    overflow: auto;
  }
  .dx-tabs button {
    padding: 12px;
    white-space: nowrap;
    font-size: 13px;
  }
  .dx-filters {
    flex-wrap: wrap;
    gap: 10px;
  }
  #dxDateFilters {
    order: 2;
    width: 100%;
  }
  .dx-filters input {
    max-width: 145px;
  }
  .dx-report {
    grid-template-columns: 80px 1fr;
    gap: 12px;
    padding: 16px;
  }
  .dx-report > span:last-child {
    grid-column: 2;
  }
  .dx-log {
    grid-template-columns: 1fr 1fr;
    font-size: 12px;
  }
  .dx-log details {
    grid-column: 1/-1;
  }
  .dx-notifications {
    align-items: start;
    flex-direction: column;
  }
  .dx-footer {
    gap: 12px;
    flex-wrap: wrap;
  }
  .dx-table td,
  .dx-table th {
    padding: 13px 14px;
  }
  #dxDetailBody {
    padding: 18px;
  }
  #dxDetailBody dl {
    grid-template-columns: 100px 1fr;
  }
  .dx-section-head {
    padding: 16px;
  }
  .dx-tools {
    flex-wrap: wrap;
  }
}

.dx-page header {
  box-shadow: none;
}
.dx-history-row header {
  padding: 0;
  background: none;
  border: 0;
}
.dx-section-head {
  background: var(--panel-alt);
}

#dxDetailBody pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  margin: 12px 0;
}

/* A shared time axis makes simultaneous failures visible across the fleet. */
.dx-ranges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: -4px 0 20px;
  font-size: 12px;
  color: var(--mid);
}
.dx-ranges button {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  padding: 5px 10px;
  color: var(--ink);
}
.dx-ranges span:last-child {
  margin-left: auto;
}
.dx-connections {
  padding: 0 22px 22px;
}
.dx-timeline-axis {
  display: flex;
  justify-content: space-between;
  margin: 0 0 10px 180px;
  font-size: 11px;
  color: var(--mid);
}
.dx-connection-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 20px;
  padding: 15px 0;
  border-top: 1px solid var(--line-soft);
}
.dx-connection-name {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 8px;
  font-size: 13px;
}
.dx-connection-name span {
  font-size: 12px;
  color: var(--mid);
}
.dx-track {
  position: relative;
  height: 32px;
  background: var(--panel-sunken);
  border-radius: 4px;
}
.dx-period {
  position: absolute;
  height: 100%;
  border: 0;
  padding: 0;
  min-width: 1px;
  background: var(--dim);
}
.dx-period.reachable {
  background: var(--good);
}
.dx-period.unreachable {
  background: var(--bad);
}
.dx-period.unknown {
  background: repeating-linear-gradient(
    135deg,
    var(--line) 0 4px,
    var(--panel-alt) 4px 8px
  );
}
.dx-period:hover {
  outline: 2px solid var(--ink);
  z-index: 2;
}
.dx-event-mark {
  position: absolute;
  top: 33px;
  height: 4px;
  border-left: 2px solid var(--ink);
  pointer-events: none;
}
.dx-track-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 5px;
  font-size: 11px;
  color: var(--mid);
}
.dx-track-caption .dx-text-button {
  font-size: 11px;
}
.dx-transitions > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
}
.dx-transitions .dx-muted {
  grid-column: 2;
}
@media (max-width: 720px) {
  .dx-connection-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .dx-connection-name {
    flex-direction: row;
    justify-content: space-between;
  }
  .dx-timeline-axis {
    margin-left: 0;
  }
  .dx-connections {
    padding: 0 16px 16px;
  }
  .dx-ranges span:last-child {
    width: 100%;
    margin-left: 0;
  }
  #dxDateFilters {
    flex-wrap: wrap;
  }
  .dx-title {
    align-items: start;
  }
}
.dx-no-history {
  margin-top: 12px;
  font-size: 12px;
  color: var(--mid);
}
.dx-no-history summary {
  padding: 10px 0;
  cursor: pointer;
}
.dx-outage {
  display: flex;
  width: 100%;
  gap: 16px;
  text-align: left;
  padding: 12px;
  color: var(--ink);
  background: var(--panel-alt);
  border: 0;
  border-left: 3px solid var(--bad);
  margin-bottom: 6px;
  font-size: 12px !important;
}
.dx-outage strong {
  min-width: 45px;
}
.dx-evidence {
  margin-top: 20px;
}
.dx-evidence > summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 0;
}

/* Triage owns the first screen. Evidence opens in place at the sensor level. */
.dx-action-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 110px;
  width: 100%;
  gap: 22px;
  padding: 18px 22px;
  text-align: left;
  background: var(--panel);
  color: var(--ink);
  border: 0;
  border-top: 1px solid var(--line-soft);
}
.dx-action-row:hover,
.dx-pattern:hover {
  background: var(--panel-alt);
}
.dx-action-sensor {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.dx-action-row strong {
  font-size: 14px;
}
.dx-action-sensor span,
.dx-action-row p {
  font-size: 12px;
  color: var(--mid);
  margin: 5px 0;
}
.dx-action-go {
  align-self: center;
  color: var(--accent);
  font-size: 13px;
}
.dx-action-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dx-action-tags span {
  font-size: 11px;
  color: var(--mid);
  border: 1px solid var(--line);
  padding: 3px 6px;
  border-radius: 3px;
}
.dx-pattern {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px 225px;
  width: 100%;
  text-align: left;
  gap: 24px;
  padding: 20px 22px;
  background: var(--panel);
  color: var(--ink);
  border: 0;
  border-top: 1px solid var(--line-soft);
}
.dx-pattern strong {
  display: block;
  font-size: 14px;
  margin: 5px 0;
  overflow-wrap: anywhere;
}
.dx-pattern p {
  margin: 6px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--mid);
  font-size: 12px;
}
.dx-pattern > div {
  min-width: 0;
}
.dx-pattern-frequency small {
  font-size: 11px;
  font-weight: 400;
}
.dx-pattern-frequency > span {
  font-size: 11px;
  color: var(--mid);
}
.dx-pattern-times {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  color: var(--mid);
}
.dx-pattern-times strong {
  color: var(--accent);
  font-size: 12px;
  margin-top: auto;
}
.dx-spark {
  height: 27px;
  display: flex;
  gap: 2px;
  align-items: end;
  margin: 7px 0;
}
.dx-spark span {
  height: max(2px, var(--bar));
  flex: 1;
  min-width: 0;
  background: var(--bad);
}
.dx-pattern-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dx-pattern-summary strong {
  font-size: 23px;
}
.dx-pattern-summary span {
  color: var(--mid);
  font-size: 13px;
}
.dx-fleet-details {
  margin: 20px 0;
}
.dx-fleet-details > summary {
  cursor: pointer;
  color: var(--mid);
  font-size: 13px;
  padding: 12px 0;
}
.dx-investigation-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px;
}
.dx-investigation-head h2 {
  margin: 8px 0 0;
  font-size: 24px;
}
.dx-investigation-head h2 span {
  color: var(--mid);
  font-size: 15px;
  font-weight: 400;
}
.dx-sensor-now {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 14px;
}
.dx-sensor-now > div {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 8px;
  border-right: 1px solid var(--line-soft);
}
.dx-sensor-now > div:last-child {
  border-right: 0;
}
.dx-sensor-now > div > span:first-child,
.dx-sensor-now small {
  font-size: 12px;
  color: var(--mid);
}
.dx-investigation-reason {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--mid);
}
.dx-investigation-chart {
  padding: 18px 22px 0;
}
.dx-evidence-lane,
.dx-shared-axis,
.dx-date-buttons {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
}
.dx-evidence-lane > strong {
  font-size: 12px;
  font-weight: 500;
  color: var(--mid);
}
.dx-shared-axis > div {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--mid);
}
.dx-lane-cells,
.dx-date-buttons > div {
  display: grid;
  gap: 2px;
}
.dx-lane-cell {
  height: 30px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: var(--panel-alt);
  color: var(--ink);
  font-size: 11px !important;
  border-radius: 2px;
}
.dx-lane-cell.working {
  background: var(--good);
}
.dx-lane-cell.down {
  background: var(--bad);
}
.dx-lane-cell.degraded {
  background: var(--warn);
}
.dx-lane-cell.silent,
.dx-lane-cell.unknown {
  background: var(--dim);
}
.dx-lane-cell.note {
  color: var(--imu);
  background: var(--imu-bg);
}
.dx-lane-cell.error-count {
  background: linear-gradient(
    to top,
    var(--bad-bg) var(--bar),
    var(--panel-alt) var(--bar)
  );
  border-bottom: 2px solid var(--bad);
}
.dx-date-buttons button {
  min-width: 0;
  border: 0;
  padding: 4px 0;
  background: none;
  font-size: 11px;
  color: var(--mid);
}
.dx-lane-cell.selected,
.dx-date-buttons button.selected {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}
.dx-day-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  font-size: 12px;
  color: var(--mid);
  border-bottom: 1px solid var(--line-soft);
}
.dx-day-summary strong {
  color: var(--ink);
  font-size: 16px;
}
.dx-gap-label {
  color: var(--bad);
}
.dx-operator-note {
  padding: 15px 22px;
  background: var(--imu-bg);
  border-left: 3px solid var(--imu);
  font-size: 13px;
}
.dx-operator-note p {
  margin: 6px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.dx-evidence-event {
  display: grid;
  grid-template-columns: 85px 105px minmax(0, 1fr);
  gap: 16px;
  border: 0;
  border-top: 1px solid var(--line-soft);
  background: var(--panel);
  padding: 16px 22px;
  text-align: left;
  width: 100%;
  color: var(--ink);
  font-size: 13px !important;
}
button.dx-evidence-event:hover {
  background: var(--panel-alt);
}
.dx-evidence-event time,
.dx-evidence-source {
  font-size: 12px;
  color: var(--mid);
}
.dx-evidence-event > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-wrap: anywhere;
}
.dx-evidence-event > div > span {
  font-size: 12px;
  color: var(--mid);
}
@media (max-width: 900px) {
  .dx-pattern {
    grid-template-columns: minmax(0, 1fr) 180px;
  }
  .dx-pattern-times {
    grid-column: 1/-1;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .dx-pattern-times strong {
    margin: 0 0 0 auto;
  }
}
@media (max-width: 600px) {
  .dx-action-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 16px;
  }
  .dx-action-sensor {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  .dx-action-go {
    justify-self: end;
  }
  .dx-pattern {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }
  .dx-pattern-frequency {
    max-width: none;
  }
  .dx-pattern-times {
    flex-direction: column;
  }
  .dx-pattern-times strong {
    margin: 2px 0 0;
  }
  .dx-sensor-now {
    grid-template-columns: 1fr;
  }
  .dx-sensor-now > div {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
    padding: 12px 16px;
  }
  .dx-investigation-head {
    align-items: start;
  }
  .dx-investigation-head h2 span {
    display: block;
    margin-top: 5px;
  }
  .dx-investigation-chart {
    padding: 16px 12px 0;
  }
  .dx-evidence-lane,
  .dx-shared-axis,
  .dx-date-buttons {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 8px;
  }
  .dx-evidence-lane > strong {
    font-size: 10px;
  }
  .dx-shared-axis > div {
    font-size: 9px;
  }
  .dx-evidence-event {
    grid-template-columns: 65px minmax(0, 1fr);
    gap: 10px;
    padding: 14px 16px;
  }
  .dx-evidence-event > div {
    grid-column: 1/-1;
  }
  .dx-day-summary {
    padding: 16px;
    gap: 12px;
  }
}
.dx-lane-cell.delivery {
  background: var(--accent-soft);
}
.dx-lane-cell.delivery.gap {
  box-shadow: inset 0 -3px var(--bad);
}
.dx-lane-cell.manual {
  border: 2px solid var(--ink);
}
.dx-section-head > button {
  flex-shrink: 0;
  white-space: nowrap;
}
.dx-day-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--mid);
}
.dx-day-picker input {
  min-width: 0;
  max-width: 150px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: var(--panel);
}

/* base.css resets every margin, including the browser's dialog centering. */
#dxDetail {
  position: fixed;
  inset: 0;
  margin: auto;
  max-height: min(90vh, 900px);
  max-height: min(90dvh, 900px);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
#dxDetail[open] { display: flex; flex-direction: column; }
#dxDetail > header { position: relative; flex: 0 0 auto; gap: 20px; }
#dxDetailTitle { min-width: 0; overflow-wrap: anywhere; line-height: 1.35; }
#dxClose { flex-shrink: 0; width: 40px; height: 40px; border-radius: var(--r-md); cursor: pointer; }
#dxClose:hover { background: var(--panel-alt); }
#dxDetailBody { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.dx-detail-lead { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; line-height: 1.5; }
.dx-detail-lead p { flex: 1 1 240px; }
.dx-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 20px; }
a.dx-button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.dx-counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; border-block: 1px solid var(--line); padding: 20px 0; }
.dx-counts > div { display: flex; flex-direction: column; gap: 6px; }
.dx-counts strong { font-size: 24px; font-weight: 600; }
.dx-counts span { color: var(--mid); font-size: 12px; }
.dx-gap-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.dx-gap-action { flex: 1 1 220px; display: grid; grid-template-columns: auto 1fr; text-align: left; align-items: center; gap: 3px 12px; padding: 12px; background: var(--panel-alt); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-md); font: inherit; }
button.dx-gap-action { cursor: pointer; }
button.dx-gap-action:hover { border-color: var(--accent); }
.dx-gap-action strong { grid-row: span 2; font-size: 22px; }
.dx-gap-action small { color: var(--accent-strong); }
.dx-differences > .dx-muted { font-size: 12px; margin-bottom: 14px; }
.dx-difference { padding: 16px 0; border-bottom: 1px solid var(--line); scroll-margin: 12px; }
.dx-difference:focus { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: var(--r-md); }
.dx-difference-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.dx-difference-head p { margin-top: 5px; font-size: 12px; }
.dx-difference-head a { flex-shrink: 0; }
.dx-compare { display: grid; grid-template-columns: 1fr 1fr; margin: 14px 0 8px; background: var(--panel-alt); border-radius: var(--r-md); }
.dx-compare > div { display: flex; flex-direction: column; gap: 6px; padding: 12px; min-width: 0; overflow-wrap: anywhere; }
.dx-compare > div + div { border-left: 1px solid var(--line); }
.dx-compare span, .dx-compare small { font-size: 12px; color: var(--mid); }
.dx-difference > p { font-size: 12px; line-height: 1.5; }
.dx-note-editor { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px; }
.dx-note-editor > summary { cursor: pointer; font-weight: 600; }
.dx-note-editor[open] > summary { margin-bottom: 18px; }
.dx-note-form { grid-template-columns: 1fr 1fr; }
.dx-note-form > label:has(textarea), .dx-note-form > div, .dx-note-form > p { grid-column: 1 / -1; }
#dxDayEvidence > .dx-detail-actions, #dxDayEvidence > .dx-gap-actions, #dxDayEvidence > .dx-differences { margin-inline: 22px; }
#dxDayEvidence > .dx-differences { margin-bottom: 24px; }
@media (max-width: 600px) {
  #dxDetail { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
  #dxDetail > header { padding: 12px 16px; }
  #dxDetailTitle { font-size: 17px; }
  #dxDetailBody { padding: 16px; }
  .dx-counts { grid-template-columns: 1fr 1fr; }
  .dx-difference-head { flex-direction: column; }
}
.dx-difference-group { border-block-start: 1px solid var(--line); padding-block: 14px; }
.dx-difference-group > summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.dx-difference-group > summary span { float: right; color: var(--mid); }
.dx-difference-group > p { margin-top: 12px; font-size: 12px; line-height: 1.5; }
.dx-record-comparison { margin-top: 10px; }
.dx-record-comparison > summary { cursor: pointer; font-size: 12px; color: var(--mid); }
