.dv-panel-section {
  padding: 16px 15px;
  border-bottom: 1px solid #dce6f2;
  min-width: 0;
}

.dv-panel-section h2,
.dv-view-header h2 {
  margin: 0;
  color: #25466d;
  font-size: 1rem;
  font-weight: 700;
}

.dv-properties {
  display: grid;
  grid-template-columns: minmax(4rem, auto) minmax(0, 1fr);
  gap: 7px 12px;
  font-size: .875rem;
  margin: 13px 0;
}

.dv-properties dt {
  color: #526982;
  white-space: nowrap;
}

.dv-properties dd {
  color: #203d5c;
  overflow-wrap: anywhere;
  margin: 0;
}

.dv-detail-actions,
.dv-wizard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.dv-source-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: #edf3fa;
  margin-bottom: 12px;
}

.dv-source-tabs button {
  flex: 1;
  padding: 7px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #4e6681;
  font-weight: 600;
  font-size: .875rem;
  white-space: nowrap;
  cursor: pointer;
}

.dv-source-tabs button[aria-selected=true] {
  background: #fff;
  color: #245a98;
  box-shadow: 0 1px 3px #203d5c24;
}

.dv-source-tabs button span {
  display: inline-block;
  margin-left: 3px;
  padding: 0 5px;
  background: #e2edfa;
  color: #376599;
  border-radius: 8px;
  font-size: .78rem;
}

.dv-search-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.dv-search {
  display: flex;
  align-items: center;
  flex: 1 1 13rem;
  gap: 8px;
  min-width: 0;
  border: 1px solid #d6e2ef;
  border-radius: 7px;
  background: #fff;
  padding: 0 9px;
  color: #58718e;
}

.dv-search:focus-within {
  border-color: #648ed7;
  outline: 2px solid #2865ba24;
}

.dv-search svg {
  flex: none;
}

.dv-search input {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 3px 0;
  background: none;
  border: 0;
  outline: 0;
  color: #264261;
  font: inherit;
  font-size: .875rem;
  box-shadow: none;
}

.dv-pool-card {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 7px 0;
  padding: 8px;
  background: #fff;
  border: 1px solid #dce6f2;
  border-radius: 8px;
  cursor: grab;
}

.dv-pool-card:active {
  cursor: grabbing;
}

.dv-pool-card:hover,
.dv-pool-selected {
  background: #f3f8ff;
  border-color: #9ebce4;
}

.dv-pool-icon {
  display: grid;
  flex: 0 0 35px;
  height: 35px;
  place-items: center;
  color: #fff;
  background: var(--device-color);
  border-radius: 7px;
  font-weight: 650;
  font-size: .75rem;
}

.dv-pool-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  color: #25466d;
  font-size: .875rem;
}

.dv-pool-text small,
.dv-catalog-entry small,
.dv-catalog li small,
.dv-table td small {
  display: block;
  margin-top: 3px;
  color: #536d89;
  font-size: .78rem;
}

.dv-pool-text small .dv-wire {
  display: flex;
  margin-top: 4px;
}

.dv-table th .dv-text-button {
  font-size: .875rem;
}

.dv-text-button {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: #245a98;
  font-family: inherit;
  font-size: inherit;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.dv-text-button:hover {
  text-decoration: underline;
}

.dv-drag-grip {
  align-self: center;
  color: #597796;
}

.dv-empty {
  margin: 10px 0;
  color: #607891;
  font-size: .875rem;
}

.dv-table-view {
  padding: 17px;
  min-width: 0;
  background: #fff;
  border-radius: 11px;
}

.dv-view-header,
.dv-section-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-bottom: 15px;
}

.dv-view-header h2,
.dv-section-heading h3 {
  margin-right: auto;
}

.dv-view-header h2 span {
  margin-left: 6px;
  color: #52708d;
  font-size: .8rem;
  font-weight: 500;
  white-space: nowrap;
}

.dv-view-header .dv-search {
  flex: 0 1 19rem;
}

.dv-batch-toolbar {
  margin-bottom: 10px;
  color: #405e7f;
  font-size: .875rem;
}

.dv-batch-toolbar [role="status"] {
  margin-right: 4px;
  white-space: nowrap;
}

.dv-table .dv-select-cell {
  width: 1%;
  text-align: center;
}

.dv-select-cell input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: #2865ba;
  vertical-align: middle;
}

.dv-table-scroll {
  overflow: auto;
  border: 1px solid #deE8f4;
  border-radius: 8px;
}

.dv-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  table-layout: auto;
}

.dv-table th,
.dv-table td {
  padding: 9px 11px;
  border-bottom: 1px solid #e4ecf5;
  vertical-align: middle;
  color: #2b4868;
  font-size: .875rem;
}

.dv-table td small.dv-port-cell {
  color: #245a98;
}

.dv-table thead th {
  color: #405e7f;
  background: #eef4fb;
  white-space: nowrap;
  font-weight: 650;
}

.dv-table tbody tr:last-child > * {
  border-bottom: 0;
}

.dv-table tr:hover > * {
  background: #f7faff;
}

.dv-table .dv-selected-row > * {
  background: #f0f6ff;
}

.dv-table .dv-table-empty {
  text-align: center;
  padding: 32px 12px;
  color: #57728d;
}

.dv-table-actions {
  white-space: nowrap;
}

.dv-wrap-cell {
  min-width: 8rem;
  max-width: 20rem;
  overflow-wrap: anywhere;
}

.dv-status,
.dv-recent {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 5px;
  background: #edf3f9;
  color: #45627e;
  font-size: .78rem;
  white-space: nowrap;
}

.dv-status-racked,
.dv-recent {
  background: #e7f1ff;
  color: #225b9e;
}

.dv-status-invalid {
  background: #fff1dc;
  color: #85420e;
}

.dv-recent {
  padding: 1px 5px;
  margin-left: 3px;
}

.dv-wire {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.dv-wired {
  color: #1f744a;
}

.dv-unwired {
  color: #8b4e19;
}

.dv-disconnect {
  width: 15px;
  height: 15px;
}

.dv-form-section,
.dv-endpoint-form,
.dv-catalog section {
  margin: 10px 0 16px;
  padding: 12px;
  border: 1px solid #dce6f2;
  border-radius: 9px;
  background: #f9fbfe;
}

.dv-form-section h3,
.dv-endpoint-form h3,
.dv-catalog h3 {
  margin: 0 0 8px;
  color: #315374;
  font-size: .925rem;
}

.dv-catalog .dv-section-heading h3 {
  margin: 0 auto 0 0;
}

.dv-catalog .dv-section-heading {
  margin: 0 0 5px;
}

.dv-port-table ul,
.dv-catalog ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dv-port-table {
  max-height: min(29vh, 245px);
  overflow-y: auto;
  padding-right: 4px;
}

.dv-port-table li,
.dv-catalog li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid #e5edf6;
  overflow-wrap: anywhere;
}

.dv-catalog li:last-child,
.dv-port-table li:last-child {
  border-bottom: 0;
}

.dv-port-table li span:first-child,
.dv-catalog li div:first-child {
  flex: 1;
  min-width: 0;
}

.dv-catalog-entry {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.dv-catalog-entry .dv-type-color {
  flex: 0 0 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 3px;
  background: var(--device-color);
}

.dv-generate {
  align-self: end;
}

.dv-form-preview {
  margin: 8px 0;
  font-size: .875rem;
  color: #46678c;
  overflow-wrap: anywhere;
}

.dv-form-preview:empty {
  display: none;
}

.dv-form-error,
.dv-danger {
  color: #a32b39;
}

.dv-template-delete {
  margin: 12px 0 2px;
}

.dv-wizard {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 7px 15px;
  margin: 0 0 9px;
  padding: 9px 12px;
  background: #eaf3ff;
  border: 1px solid #c2d9f6;
  border-radius: 8px;
  color: #285a94;
  font-size: .875rem;
}

.dv-wizard p {
  margin: 3px 0 0;
}

.dv-connection-summary {
  display: grid;
  gap: 8px;
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 8px;
  color: #274d78;
  background: #edf5ff;
}

.dv-connection-summary div {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 7px;
  overflow-wrap: anywhere;
}

.dv-context-menu {
  position: fixed;
  z-index: 1000;
  min-width: 10rem;
  padding: 5px;
  background: #fff;
  border: 1px solid #d8e4f3;
  border-radius: 8px;
  box-shadow: 0 8px 28px #1a3b622e;
}

.dv-context-menu button {
  display: block;
  width: 100%;
  color: #2b496c;
  background: transparent;
  padding: 7px 9px;
  border: 0;
  border-radius: 5px;
  font: inherit;
  font-size: .875rem;
  text-align: left;
  cursor: pointer;
}

.dv-context-menu button:hover,
.dv-context-menu button:focus-visible {
  background: #edf4ff;
}

.dv-context-menu button.dv-danger {
  color: #a32b39;
}

.dv-cable-type-row { display: flex; gap: 6px; min-width: 0; }
.dv-cable-type-row[hidden], .dv-peer-options[hidden] { display: none; }
.dv-cable-type-row > :is(input, select) { flex: 1; min-width: 0; }
.dv-cable-type-row > button { flex: none; white-space: nowrap; }
.dv-device-picker { position: relative; }
.dv-peer-options {
  position: absolute;
  z-index: 3;
  inset: 100% 0 auto;
  max-height: 12rem;
  overflow: auto;
  background: white;
  border: 1px solid #cad8e7;
  border-radius: 6px;
  box-shadow: 0 8px 18px #1a3b6226;
}
.dv-peer-options > div { padding: 8px 10px; overflow-wrap: anywhere; }
.dv-peer-options [role="option"] { cursor: pointer; }
.dv-peer-options [role="option"]:hover,
.dv-peer-options .active,
.dv-peer-options [aria-selected="true"] { background: #edf4ff; }
.dv-peer-empty { color: #536d89; }
.dv-cable-layout { margin-top: 12px; }
.dv-cable-layout summary { cursor: pointer; font-size: .875rem; font-weight: 650; color: var(--blue); }
.dv-cable-layout .fields { margin-block: 8px; }

.dv-label-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.dv-table td.dv-label-text { min-width: 13rem; white-space: pre-wrap; }
.dv-label-pair + .dv-label-pair { margin-top: .75rem; }
.dv-label-number { display: block; margin-bottom: .25rem; }
.dv-label-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.dv-label-card { padding: .5rem .65rem; border: 1px solid #cad8e7; border-radius: 4px; }
.dv-label-card strong { display: block; margin-bottom: .25rem; }
.dv-wire-print { display: none; }

@media print {
  body:has(> .dv-wire-print) { background: white; }
  body:has(> .dv-wire-print) > :not(.dv-wire-print) { display: none !important; }
  .dv-wire-print { display: block; color: black; font-size: 10pt; }
  .dv-wire-print .dv-label-pair { break-inside: avoid; }
  .dv-wire-print .dv-label-card { border-color: #444; }
  .dv-wire-print .dv-label-number, .dv-wire-print .dv-label-card strong { display: none; }
}

@media (max-width: 750px) {
  .dv-table-view {
    padding: 11px;
  }
}
