
/* GlobalHub 0.9.20.0 — EquipmentCatalog linked-revision materials */
.ecat-materials-card {
  margin: 0 0 14px;
  padding: 16px;
  border: 1px solid rgba(144, 184, 226, .17);
  border-radius: 16px;
  background:
    radial-gradient(circle at 92% 0, rgba(69, 184, 255, .08), transparent 32%),
    rgba(10, 24, 41, .72);
}

.ecat-materials-card.muted-card,
.ecat-materials-card.pending-card {
  background: rgba(255, 255, 255, .022);
}

.ecat-materials-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.ecat-materials-head h4 {
  margin: 3px 0 0;
  font-size: 16px;
}

.ecat-materials-eyebrow {
  color: #79cfff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.ecat-materials-head-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ecat-materials-badge {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid rgba(144, 184, 226, .18);
  border-radius: 999px;
  color: #b1c2d3;
  font-size: 10px;
  white-space: nowrap;
}

.ecat-materials-badge.ok {
  border-color: rgba(84, 227, 182, .26);
  background: rgba(84, 227, 182, .07);
  color: #a9efd7;
}

.ecat-materials-badge.warn,
.ecat-materials-badge.pending {
  border-color: rgba(255, 196, 92, .28);
  background: rgba(255, 196, 92, .07);
  color: #ffe0a4;
}

.ecat-materials-badge.danger {
  border-color: rgba(255, 126, 126, .28);
  background: rgba(255, 126, 126, .07);
  color: #ffc2c2;
}

.ecat-materials-card > p {
  margin: 10px 0 0;
  color: var(--muted, #8fa4bb);
  line-height: 1.5;
}

.ecat-materials-policy {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 13px;
}

.ecat-materials-policy span {
  padding: 4px 7px;
  border: 1px solid rgba(84, 227, 182, .14);
  border-radius: 999px;
  color: #91cdb7;
  font-size: 9px;
}

.ecat-materials-message {
  margin-top: 12px;
  padding: 9px 11px;
  border-left: 3px solid #45b8ff;
  border-radius: 7px;
  background: rgba(69, 184, 255, .055);
  color: #bfd4e7;
  font-size: 11px;
}

.ecat-materials-message.warn {
  border-left-color: #ffc45c;
  background: rgba(255, 196, 92, .05);
}

.ecat-materials-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}

.ecat-materials-counts > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(144, 184, 226, .11);
  border-radius: 11px;
  background: rgba(255, 255, 255, .02);
}

.ecat-materials-counts span,
.ecat-materials-counts b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ecat-materials-counts span {
  color: var(--muted, #8fa4bb);
  font-size: 9px;
}

.ecat-materials-counts b {
  margin-top: 4px;
  font-size: 12px;
}

.ecat-materials-section {
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px solid rgba(144, 184, 226, .12);
}

.ecat-materials-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 9px;
}

.ecat-materials-section-head h5 {
  margin: 0;
  font-size: 13px;
}

.ecat-materials-section-head span {
  min-width: 25px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(69, 184, 255, .08);
  color: #92d4f7;
  font-size: 9px;
  text-align: center;
}

.ecat-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.ecat-photo-card,
.ecat-svg-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(144, 184, 226, .12);
  border-radius: 13px;
  background: rgba(255, 255, 255, .02);
}

.ecat-photo-preview,
.ecat-svg-preview {
  min-height: 145px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(69, 184, 255, .06), rgba(255, 255, 255, .015));
  color: #758ca2;
  font-size: 10px;
  text-align: center;
}

.ecat-photo-preview img,
.ecat-svg-preview img {
  width: 100%;
  height: 100%;
  min-height: 145px;
  max-height: 260px;
  display: block;
  object-fit: contain;
}

.ecat-photo-info,
.ecat-svg-info {
  padding: 10px;
}

.ecat-photo-info b,
.ecat-photo-info small,
.ecat-svg-info b,
.ecat-svg-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ecat-photo-info b,
.ecat-svg-info b {
  font-size: 11px;
}

.ecat-photo-info small,
.ecat-svg-info small {
  margin-top: 4px;
  color: var(--muted, #8fa4bb);
  font-size: 9px;
}

.ecat-primary-mark,
.ecat-svg-validation {
  display: inline-flex;
  margin-top: 7px;
  padding: 3px 6px;
  border: 1px solid rgba(84, 227, 182, .18);
  border-radius: 999px;
  color: #99dfc5;
  font-size: 8px;
}

.ecat-document-grid {
  display: grid;
  gap: 7px;
}

.ecat-document-card {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(144, 184, 226, .11);
  border-radius: 11px;
  background: rgba(255, 255, 255, .018);
}

.ecat-document-symbol {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(69, 184, 255, .07);
  color: #79cfff;
  font-size: 16px;
}

.ecat-document-info {
  min-width: 0;
}

.ecat-document-info b,
.ecat-document-info small,
.ecat-document-info code {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ecat-document-info b {
  font-size: 11px;
}

.ecat-document-info small,
.ecat-document-info code {
  margin-top: 3px;
  color: var(--muted, #8fa4bb);
  font-size: 9px;
}

.ecat-svg-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.ecat-material-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.ecat-materials-empty {
  padding: 16px;
  border: 1px dashed rgba(144, 184, 226, .12);
  border-radius: 11px;
  color: var(--muted, #8fa4bb);
  font-size: 10px;
  text-align: center;
}

.ecat-materials-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid rgba(144, 184, 226, .12);
  color: var(--muted, #8fa4bb);
  font-size: 9px;
}

.ecat-materials-inline-status {
  min-height: 18px;
  margin-top: 8px;
  color: #91cdb7;
  font-size: 9px;
}

.ecat-materials-inline-status.error {
  color: #ffb8b8;
}

.ecat-materials-card.loading-card {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--muted, #8fa4bb);
}

.ecat-materials-card.loading-card b,
.ecat-materials-card.loading-card span {
  display: block;
}

.ecat-materials-card.loading-card span {
  margin-top: 3px;
  font-size: 10px;
}

.ecat-materials-loader {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 3px solid rgba(69, 184, 255, .13);
  border-top-color: #45b8ff;
  border-radius: 50%;
  animation: ecat-material-spin .8s linear infinite;
}

@keyframes ecat-material-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 980px) {
  .ecat-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ecat-materials-counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .ecat-materials-head,
  .ecat-materials-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .ecat-materials-head-badges {
    justify-content: flex-start;
  }

  .ecat-photo-grid,
  .ecat-svg-grid,
  .ecat-materials-counts {
    grid-template-columns: 1fr;
  }

  .ecat-document-card {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .ecat-document-card .ecat-material-actions {
    grid-column: 2;
  }
}
