#moduleTableBody > tr.instrument-data-row {
  cursor: pointer;
}

#moduleTableBody > tr.instrument-detail-source {
  background: #d9f2f5;
  box-shadow: inset 4px 0 0 #078da4;
}

#moduleTableBody > tr.instrument-detail-row > td {
  padding: 0 !important;
  border-top: 0;
  background: #edf7fa;
}

.instrument-inline-panel {
  margin: 0 10px 10px;
  overflow: hidden;
  border: 1px solid #8fc8d7;
  border-radius: 0 0 14px 14px;
  background: #eef7f3;
  box-shadow: 0 12px 26px rgba(5, 55, 83, 0.13);
}

#moduleBody:has(> .instrument-top-panel) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#moduleBody:has(> .instrument-top-panel) #moduleTableWrap {
  flex: 1 1 auto;
  min-height: 0;
}

.instrument-inline-panel.instrument-top-panel {
  flex: 0 0 auto;
  width: 100%;
  margin: 0;
  border-width: 0 0 1px;
  border-radius: 0 0 14px 14px;
  transform-origin: top center;
  animation: instrument-panel-slide-down 240ms ease-out both;
}

@keyframes instrument-panel-slide-down {
  from {
    opacity: 0;
    transform: translateY(-22px) scaleY(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

.instrument-detail-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  position: relative;
  padding-right: 48px;
  background: #082f4b;
}

.instrument-detail-tab {
  min-height: 43px;
  border: 0;
  color: #fff;
  background: #0d4567;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.instrument-detail-tab:hover,
.instrument-detail-tab:focus-visible {
  color: #fff;
  background: #155b7d;
  outline: none;
}

.instrument-detail-tab.active {
  color: #fff;
  background: #087f95;
  box-shadow: inset 0 -3px 0 #7ce0e5;
}

.instrument-detail-close {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 36px;
  height: 33px;
  border: 1px solid #a9ccda;
  border-radius: 8px;
  color: #123f59;
  background: #fff;
  font-size: 1rem;
  cursor: pointer;
}

.instrument-detail-content {
  min-height: 150px;
  max-height: 270px;
  padding: 14px 16px 16px;
  overflow: auto;
  background: linear-gradient(135deg, #eef7f3 0%, #e8f4f7 100%);
}

.instrument-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
}

.instrument-detail-field {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #c9dfeb;
  border-radius: 10px;
  background: #fff;
}

.instrument-detail-field span {
  display: block;
  margin-bottom: 4px;
  color: #638099;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.instrument-detail-field strong {
  display: block;
  overflow: hidden;
  color: #102f49;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.instrument-detail-loading,
.instrument-detail-error,
.instrument-detail-empty {
  display: grid;
  min-height: 120px;
  place-items: center;
  color: #57748c;
  font-size: 0.8rem;
}

.instrument-detail-error {
  color: #b82f43;
}

.instrument-movement-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  color: #365c73;
  font-size: 0.7rem;
  font-weight: 800;
}

.instrument-movement-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.72rem;
}

.instrument-movement-table th,
.instrument-movement-table td {
  padding: 7px 9px;
  border-right: 1px solid #d0e1ea;
  border-bottom: 1px solid #d0e1ea;
  text-align: left;
  white-space: nowrap;
}

.instrument-movement-table th {
  position: sticky;
  top: -14px;
  color: #fff;
  background: #0d4567;
}

.instrument-movement-table td.numeric,
.instrument-movement-table th.numeric {
  text-align: right;
}

.instrument-movement-table tbody tr:nth-child(even) td {
  background: #eef6fa;
}

@media (max-width: 900px) {
  .instrument-detail-grid {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .instrument-detail-tab {
    padding-inline: 4px;
    font-size: 0.66rem;
  }
}
