@media (min-width: 1101px) {
  .operational > #procesos {
    grid-column: 1;
    grid-row: 1;
  }

  .operational > .alerts {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .operational > .unit-stage-explorer {
    grid-column: 1;
    grid-row: 2;
  }
}

.unit-stage-explorer {
  min-width: 0;
}

.alerts .alert-panel.operational-alert-original {
  display: none;
}

.unit-stage-head h2 {
  margin: 2px 0 0;
}

.unit-stage-summary {
  color: #0b5b9d;
  font-size: 12px;
  text-align: right;
}

.unit-stage-body {
  padding: 14px;
}

.unit-stage-search,
.unit-stage-detail-search {
  align-items: center;
  background: #fff;
  border: 1px solid #cbdce9;
  border-radius: 10px;
  display: flex;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
}

.unit-stage-search:focus-within,
.unit-stage-detail-search:focus-within {
  border-color: #4e98cc;
  box-shadow: 0 0 0 3px rgba(38, 126, 185, .12);
}

.unit-stage-search > span,
.unit-stage-detail-search > span {
  color: #5f7d96;
  font-size: 18px;
}

.unit-stage-search input,
.unit-stage-detail-search input {
  background: transparent;
  border: 0;
  color: #153e61;
  font: inherit;
  font-size: 12px;
  min-width: 0;
  outline: 0;
  width: 100%;
}

.unit-stage-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  margin-top: 12px;
  max-height: 520px;
  overflow: auto;
  padding: 1px 4px 2px 1px;
}

.unit-stage-card {
  background: #fff;
  border: 1px solid #d6e3ed;
  border-radius: 11px;
  color: #173f61;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  text-align: left;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.unit-stage-card:hover,
.unit-stage-card:focus-visible {
  border-color: #75add5;
  box-shadow: 0 8px 24px rgba(10, 76, 126, .11);
  outline: 0;
  transform: translateY(-1px);
}

.unit-stage-card-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.unit-stage-card-head > b {
  font-size: 12px;
  line-height: 1.35;
}

.unit-stage-card-head > strong {
  align-items: center;
  background: #eaf3fa;
  border-radius: 9px;
  color: #075c9c;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 16px;
  justify-content: center;
  min-height: 32px;
  min-width: 32px;
  padding: 4px 7px;
}

.unit-stage-card-counts {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.unit-stage-card-count {
  background: #f7fafc;
  border-top: 3px solid var(--unit-stage);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 6px 4px;
  text-align: center;
}

.unit-stage-card-count small {
  color: #667d91;
  font-size: 8px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
}

.unit-stage-card-count b {
  color: #173f61;
  font-size: 13px;
}

.unit-stage-card-action {
  border-top: 1px dashed #d5e2ec;
  color: #0765aa;
  font-size: 9px;
  font-weight: 850;
  padding-top: 8px;
  text-align: right;
}

body.unit-stage-open {
  overflow: hidden;
}

.unit-stage-overlay[hidden] {
  display: none;
}

.unit-stage-overlay {
  align-items: center;
  background: rgba(11, 39, 64, .72);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 10040;
}

.unit-stage-dialog {
  background: #fff;
  border: 1px solid #c7d8e6;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(2, 33, 60, .3);
  display: flex;
  flex-direction: column;
  max-height: 92vh;
  overflow: hidden;
  width: min(1500px, 97vw);
}

.unit-stage-dialog-head {
  align-items: flex-start;
  background: linear-gradient(120deg, #064f88, #0b70b7);
  color: #fff;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 18px 20px;
}

.unit-stage-dialog-head small {
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .12em;
  opacity: .8;
}

.unit-stage-dialog-head h2 {
  color: #fff;
  font-size: 22px;
  margin: 4px 0 0;
}

.unit-stage-dialog-head p {
  font-size: 11px;
  margin: 5px 0 0;
  opacity: .9;
}

.unit-stage-close {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 9px;
  color: #fff;
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 26px;
  height: 42px;
  line-height: 1;
  width: 42px;
}

.unit-stage-dialog-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.unit-stage-close:hover,
.unit-stage-close:focus-visible {
  background: rgba(255, 255, 255, .24);
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.unit-stage-dialog-body {
  min-height: 300px;
  overflow: auto;
  padding: 16px;
}

.unit-stage-detail-tools {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.unit-stage-detail-search {
  flex: 1 1 auto;
  max-width: 800px;
}

.unit-stage-result-count {
  color: #37617f;
  flex: 0 0 auto;
  font-size: 11px;
}

.unit-stage-filters {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 14px 0;
}

.unit-stage-filter {
  align-items: center;
  background: #fff;
  border: 1px solid #d3e0ea;
  border-top: 4px solid var(--unit-stage);
  border-radius: 9px;
  color: #254d6d;
  cursor: pointer;
  display: flex;
  gap: 9px;
  justify-content: space-between;
  min-height: 52px;
  padding: 8px 10px;
  text-align: left;
}

.unit-stage-filter:hover,
.unit-stage-filter:focus-visible,
.unit-stage-filter.active {
  background: #edf6fc;
  border-color: #82b4d6;
  border-top-color: var(--unit-stage);
  outline: 0;
}

.unit-stage-filter small {
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
}

.unit-stage-filter strong {
  background: #e7f0f6;
  border-radius: 7px;
  color: #075b99;
  font-size: 16px;
  min-width: 29px;
  padding: 4px 6px;
  text-align: center;
}

.unit-stage-process-table-wrap {
  max-height: 55vh;
  overflow: auto;
}

.unit-stage-process-table {
  border-collapse: collapse;
  font-size: 10px;
  min-width: 1180px;
  width: 100%;
}

.unit-stage-process-table th,
.unit-stage-process-table td {
  border-bottom: 1px solid #e2eaf1;
  padding: 10px 9px;
  text-align: left;
  vertical-align: top;
}

.unit-stage-process-table th {
  background: #f5f8fb;
  color: #60768a;
  font-size: 9px;
  font-weight: 850;
  position: sticky;
  top: 0;
  z-index: 1;
}

.unit-stage-process-table tbody tr:hover {
  background: #f3f8fc;
}

.unit-process-sgp {
  background: transparent;
  border: 0;
  color: #0767ad;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  padding: 1px 0;
}

.unit-process-sgp:hover,
.unit-process-sgp:focus-visible {
  color: #004d89;
  outline: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.unit-stage-holder {
  color: #115f4d;
  font-weight: 800;
}

.unit-stage-empty {
  color: #6c8194;
  grid-column: 1 / -1;
  padding: 28px;
  text-align: center;
}

.operational-actions-wide {
  margin-top: 14px;
}

.operational-actions-head h3 {
  color: #173d63;
  margin: 0;
}

.operational-actions-wide-list {
  display: grid;
  gap: 0 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 500px;
  overflow: auto;
  padding: 4px 15px 10px;
}

.operational-action-item {
  align-items: flex-start;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #edf2f6;
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-width: 0;
  padding: 12px 0;
  text-align: left;
}

.operational-action-item:hover,
.operational-action-item:focus-visible {
  background: #f5f9fc;
  outline: 0;
}

.operational-action-content {
  display: block;
  min-width: 0;
}

.operational-action-content > * {
  display: block;
}

.operational-action-content b {
  color: #244d70;
  font-size: 11px;
}

.operational-action-content em {
  color: #657b90;
  font-size: 9px;
  font-style: normal;
  line-height: 1.45;
  margin-top: 4px;
}

.operational-action-content small {
  color: #91a0ae;
  font-size: 8px;
  margin-top: 5px;
}

.operational-action-badge {
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 8px;
  font-style: normal;
  font-weight: 850;
  padding: 5px 8px;
  white-space: nowrap;
}

.operational-action-badge.red {
  background: #ffe5e8;
  color: #b83244;
}

.operational-action-badge.orange {
  background: #fff0d8;
  color: #a05a08;
}

.operational-action-badge.blue {
  background: #e9f3ff;
  color: #175d98;
}

.operational-actions-empty {
  color: #6c8194;
  grid-column: 1 / -1;
  padding: 24px;
  text-align: center;
}

@media (max-width: 1100px) {
  .operational > #procesos {
    grid-column: 1;
    grid-row: auto;
    order: 1;
  }

  .operational > .unit-stage-explorer {
    grid-column: 1;
    grid-row: auto;
    order: 2;
  }

  .operational > .alerts {
    grid-column: 1;
    grid-row: auto;
    order: 3;
  }
}

@media (max-width: 760px) {
  .operational-actions-wide-list {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .unit-stage-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .unit-stage-summary {
    text-align: left;
  }

  .unit-stage-grid {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .unit-stage-card-counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .unit-stage-overlay {
    padding: 0;
  }

  .unit-stage-dialog {
    border: 0;
    border-radius: 0;
    max-height: 100vh;
    min-height: 100vh;
    width: 100%;
  }

  .unit-stage-dialog-head {
    padding: 15px;
  }

  .unit-stage-dialog-head h2 {
    font-size: 18px;
  }

  .unit-detail-download {
    display: none;
  }

  .unit-stage-dialog-body {
    padding: 12px;
  }

  .unit-stage-detail-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .unit-stage-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .unit-stage-process-table {
    min-width: 0;
  }

  .unit-stage-process-table thead {
    display: none;
  }

  .unit-stage-process-table tr {
    border: 1px solid #d7e3ec;
    border-radius: 10px;
    display: block;
    margin-bottom: 9px;
    padding: 7px;
  }

  .unit-stage-process-table td {
    border: 0;
    display: grid;
    gap: 7px;
    grid-template-columns: 108px minmax(0, 1fr);
    padding: 6px;
  }

  .unit-stage-process-table td::before {
    color: #6d8193;
    content: attr(data-label);
    font-size: 9px;
    font-weight: 800;
  }
}
