@media (min-width: 1101px) {
  .operational {
    display: block;
    padding-right: calc(clamp(300px, 22%, 390px) + 14px);
    position: relative;
  }

  .operational > #procesos,
  .operational > .unit-stage-explorer,
  .operational > .commission-panel {
    margin-bottom: 14px;
  }

  .operational > .alerts {
    position: absolute;
    right: 0;
    top: 0;
    width: clamp(300px, 22%, 390px);
  }

  /* Mantiene el mapa de etapas en el carril central mientras la columna de
     alertas continúa a su derecha. Evita que las alertas cubran las últimas
     macroetapas sin introducir un espacio vertical entre paneles. */
  .stages {
    margin-right: calc(clamp(300px, 22%, 390px) + 14px);
  }
}

.commission-panel {
  min-width: 0;
}

.commission-head {
  align-items: flex-start;
}

.commission-head-actions {
  align-items: flex-end;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 9px;
}

.commission-summary {
  color: #0b5b9d;
  font-size: 11px;
  text-align: right;
}

.commission-body {
  padding: 14px;
}

.commission-tools {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

.commission-search {
  align-items: center;
  background: #fff;
  border: 1px solid #cbdce9;
  border-radius: 10px;
  display: flex;
  flex: 1 1 auto;
  gap: 8px;
  min-height: 42px;
  min-width: 230px;
  padding: 0 12px;
}

.commission-filter-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.commission-declaration-filter {
  align-items: center;
  background: #fff;
  border: 1px solid #9bcdbd;
  border-radius: 9px;
  color: #176a52;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-family: inherit;
  font-size: 9px;
  font-weight: 900;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
}

.commission-filter-check {
  align-items: center;
  background: #e8f5ef;
  border-radius: 50%;
  color: #17815f;
  display: inline-flex;
  font-size: 9px;
  height: 17px;
  justify-content: center;
  width: 17px;
}

.commission-declaration-filter:hover,
.commission-declaration-filter:focus-visible {
  background: #f0faf6;
  box-shadow: 0 0 0 3px rgba(21, 144, 108, .12);
  outline: 0;
}

.commission-declaration-filter.active {
  background: #168765;
  border-color: #168765;
  box-shadow: 0 3px 9px rgba(22, 135, 101, .22);
  color: #fff;
}

.commission-declaration-filter.active .commission-filter-check {
  background: #fff;
  color: #168765;
}

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

.commission-search span {
  color: #5f7d96;
  font-size: 18px;
}

.commission-search input {
  background: transparent;
  border: 0;
  color: #153e61;
  font: inherit;
  font-size: 11px;
  min-width: 0;
  outline: 0;
  width: 100%;
}

.commission-tabs {
  background: #edf4f9;
  border: 1px solid #d2e0ea;
  border-radius: 10px;
  display: flex;
  flex: 0 0 auto;
  gap: 3px;
  padding: 3px;
}

.commission-tabs button {
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: #557086;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  min-height: 32px;
  padding: 6px 10px;
}

.commission-tabs button.active {
  background: #fff;
  box-shadow: 0 2px 7px rgba(11, 64, 105, .13);
  color: #075d9d;
}

.commission-layout {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 170px;
  margin-top: 12px;
}

.commission-ranking-wrap {
  border: 1px solid #dbe6ee;
  border-radius: 11px;
  max-height: 540px;
  min-width: 0;
  overflow: auto;
}

.commission-ranking thead th {
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 1;
}

.commission-ranking-wrap > footer {
  align-items: center;
  background: #f8fafc;
  border-top: 1px solid #e4ebf1;
  color: #74889a;
  display: flex;
  font-size: 8px;
  gap: 12px;
  justify-content: space-between;
  padding: 8px 10px;
}

.commission-ranking-wrap > footer strong {
  color: #285778;
  white-space: nowrap;
}

.commission-ranking {
  font-size: 9px;
}

.commission-ranking th,
.commission-ranking td {
  padding: 9px 8px;
  vertical-align: middle;
}

.commission-ranking tbody {
  display: table-row-group;
}

.commission-ranking tbody tr {
  cursor: pointer;
}

.commission-ranking tbody tr:hover,
.commission-ranking tbody tr:focus-visible {
  background: #f1f7fb;
  outline: 0;
}

.commission-rank {
  align-items: center;
  background: #e8f1f8;
  border-radius: 50%;
  color: #075d9e;
  display: inline-flex;
  font-size: 9px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.commission-person {
  color: #173f63;
  font-weight: 800;
}

.commission-number {
  color: #075d9e;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.commission-number-muted {
  color: #617b90;
}

.commission-role {
  border-radius: 99px;
  display: inline-flex;
  font-size: 7px;
  font-weight: 850;
  margin: 1px 3px 1px 0;
  padding: 4px 6px;
  white-space: nowrap;
}

.commission-role.is-titular {
  background: #e6f6ef;
  color: #107159;
}

.commission-role.is-suplente {
  background: #fff0dc;
  color: #9b5b11;
}

.commission-role.is-integrante {
  background: #edf3f7;
  color: #526b81;
}

.commission-detail-link {
  background: transparent;
  border: 0;
  color: #0867aa;
  cursor: pointer;
  font-family: inherit;
  font-size: 8px;
  font-weight: 850;
  padding: 4px 0;
  white-space: nowrap;
}

.commission-detail-link:hover,
.commission-detail-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.commission-kpis {
  align-content: start;
  display: grid;
  gap: 8px;
}

.commission-kpi {
  background: #f6fafc;
  border: 1px solid #dce8f0;
  border-left: 4px solid #2b87be;
  border-radius: 9px;
  display: block;
  padding: 9px 10px;
}

.commission-kpi strong,
.commission-kpi small {
  display: block;
}

.commission-kpi strong {
  color: #155c8d;
  font-size: 19px;
}

.commission-kpi small {
  color: #6e8497;
  font-size: 8px;
  margin-top: 2px;
}

.commission-kpi.is-duration {
  border-left-color: #f28a2b;
}

.commission-kpi.is-duration-total {
  background: #fff9f1;
  border-color: #f4d4ad;
  border-left-color: #e97818;
}

.commission-kpi.is-duration-total strong {
  color: #aa4d0c;
}

.commission-kpi em {
  color: #6e8497;
  display: block;
  font-size: 7px;
  font-style: normal;
  line-height: 1.35;
  margin-top: 5px;
}

.commission-unknown-note {
  color: #7a8c9c;
  font-size: 8px;
  line-height: 1.4;
  margin: 1px 3px 0;
}

.commission-empty {
  color: #6e8193;
  padding: 24px !important;
  text-align: center;
}

body.commission-dialog-open {
  overflow: hidden;
}

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

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

.commission-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(1250px, 96vw);
}

.commission-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;
}

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

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

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

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

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

.commission-dialog-body {
  overflow: auto;
  padding: 16px;
}

.commission-detail-table-wrap {
  max-height: 68vh;
  overflow: auto;
}

.commission-detail-table {
  min-width: 980px;
}

.commission-detail-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

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

.commission-process-sgp:hover:not(:disabled),
.commission-process-sgp:focus-visible:not(:disabled) {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.commission-process-sgp:disabled {
  color: #74899a;
  cursor: default;
}

@media (max-width: 1100px) {
  .stages {
    margin-right: 0;
  }

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

  .operational > .alerts {
    order: 4;
  }
}

@media (max-width: 760px) {
  .commission-head,
  .commission-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .commission-head-actions {
    align-items: flex-start;
  }

  .commission-summary {
    text-align: left;
  }

  .commission-tabs {
    align-self: flex-start;
  }

  .commission-filter-actions {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .commission-layout {
    grid-template-columns: 1fr;
  }

  .commission-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .commission-ranking {
    min-width: 690px;
  }

  .commission-ranking-wrap {
    max-height: none;
    overflow: auto;
  }

  .commission-overlay {
    padding: 0;
  }

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

  .commission-dialog-head {
    padding: 14px;
  }

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

  .commission-person-download {
    display: none;
  }
}
