.device-collection-page {
  padding: 20px 24px 28px;
  color: #172033;
  font-size: 13px;
}

.dc-page-header,
.dc-toolbar,
.dc-modal-header,
.dc-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dc-page-title {
  margin: 0;
  font-size: 22px;
  line-height: 30px;
}

.dc-page-subtitle {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 20px;
}

.dc-safety-note {
  margin-top: 14px;
  padding: 10px 13px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e4f8f;
  border-radius: 8px;
  line-height: 20px;
}

.dc-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.dc-summary-card {
  min-height: 78px;
  padding: 13px 14px;
  border: 1px solid #e3e9f2;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.dc-summary-card:hover,
.dc-summary-card.active {
  border-color: #93b4ee;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .08);
}

.dc-summary-card.alert:not(.zero) .dc-summary-value {
  color: #dc5a36;
}

.dc-summary-card.zero {
  color: #7b8798;
  background: #fafbfd;
}

.dc-summary-value {
  display: block;
  color: #1f5ec9;
  font-size: 24px;
  line-height: 30px;
  font-weight: 700;
}

.dc-summary-label {
  display: block;
  margin-top: 4px;
  font-weight: 600;
}

.dc-panel {
  margin-top: 16px;
  border: 1px solid #e3e9f2;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.dc-toolbar {
  padding: 12px 14px;
  border-bottom: 1px solid #e8edf4;
}

.dc-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dc-filter-tab {
  height: 30px;
  padding: 0 11px;
  border: 1px solid #dbe3ee;
  border-radius: 6px;
  background: #fff;
  color: #536176;
  cursor: pointer;
}

.dc-filter-tab.active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

.dc-table-wrap {
  overflow: auto;
}

.dc-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

.dc-table th {
  padding: 10px 12px;
  background: #f7f9fc;
  color: #607087;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.dc-table td {
  padding: 11px 12px;
  border-top: 1px solid #edf1f6;
  vertical-align: middle;
  line-height: 19px;
}

.dc-table tbody tr:hover {
  background: #fafcff;
}

.dc-muted {
  color: #7b8798;
}

.dc-strong {
  color: #172033;
  font-weight: 600;
}

.dc-status {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 1px 8px;
  border-radius: 5px;
  background: #eef2f7;
  color: #59677c;
  font-size: 12px;
  white-space: nowrap;
}

.dc-status.success {
  background: #eaf8f0;
  color: #087a46;
}

.dc-status.pending {
  background: #fff5e6;
  color: #a85d00;
}

.dc-status.danger {
  background: #fff0ed;
  color: #b8412c;
}

.dc-empty,
.dc-loading {
  padding: 48px 20px;
  color: #7b8798;
  text-align: center;
}

.dc-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, .42);
}

.dc-modal-overlay.active {
  display: flex;
}

.dc-modal {
  width: min(760px, 96vw);
  max-height: 92vh;
  overflow: auto;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .2);
}

.dc-modal.wide {
  width: min(1160px, 96vw);
}

.dc-modal-header {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 15px 18px;
  border-bottom: 1px solid #e8edf4;
  background: #fff;
}

.dc-modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.dc-modal-body {
  padding: 16px 18px;
}

.dc-modal-actions {
  position: sticky;
  bottom: 0;
  justify-content: flex-end;
  padding: 12px 18px;
  border-top: 1px solid #e8edf4;
  background: #fff;
}

.dc-close {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 22px;
  cursor: pointer;
}

.dc-form-grid,
.dc-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dc-form-group label {
  display: block;
  margin-bottom: 5px;
  color: #526176;
  font-size: 12px;
  font-weight: 600;
}

.dc-form-group input,
.dc-form-group select,
.dc-form-group textarea {
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #d9e2ee;
  border-radius: 7px;
  background: #fff;
  color: #172033;
  font: inherit;
  box-sizing: border-box;
}

.dc-form-group textarea {
  min-height: 180px;
  resize: vertical;
  font-family: Consolas, monospace;
  font-size: 12px;
}

.dc-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #edf1f6;
}

.dc-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.dc-section-title {
  margin: 0 0 9px;
  font-size: 15px;
}

.dc-info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 16px;
}

.dc-info-item {
  min-width: 0;
  padding: 6px 0;
}

.dc-info-label {
  color: #748197;
}

.dc-info-value {
  float: right;
  max-width: 66%;
  overflow: hidden;
  color: #172033;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dc-diff-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.dc-diff-table th,
.dc-diff-table td {
  padding: 8px 9px;
  border: 1px solid #e5eaf1;
  font-size: 12px;
  line-height: 18px;
  vertical-align: top;
  word-break: normal;
  overflow-wrap: anywhere;
}

.dc-diff-table th {
  background: #f7f9fc;
  color: #607087;
}

.dc-warning {
  margin-top: 7px;
  padding: 9px 10px;
  border-left: 3px solid #eaa43a;
  background: #fff8e9;
  color: #80520a;
  line-height: 19px;
}

.dc-warning.error {
  border-left-color: #dc5a36;
  background: #fff1ee;
  color: #a93624;
}

.dc-warning.info {
  border-left-color: #4d83d8;
  background: #eff6ff;
  color: #285a9d;
}

.dc-raw {
  max-height: 460px;
  overflow: auto;
  padding: 12px;
  border: 1px solid #dce4ee;
  border-radius: 7px;
  background: #f7f9fc;
  font: 12px/19px Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 1500px) {
  .dc-summary-grid {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }
}

@media (max-width: 900px) {
  .device-collection-page {
    padding: 16px;
  }
  .dc-page-header,
  .dc-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .dc-summary-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
  .dc-form-grid,
  .dc-detail-grid,
  .dc-info-list {
    grid-template-columns: 1fr;
  }
}
