.hardware-masonry {
  --bs-gutter-x: 1rem;
  --bs-gutter-y: 1rem;
  width: 100%;
  margin-right: 0;
  margin-left: 0;
}

.hardware-masonry > .hardware-card {
  min-width: 0;
  padding-right: calc(var(--bs-gutter-x) * 0.5);
  padding-left: calc(var(--bs-gutter-x) * 0.5);
}

.hardware-card .card {
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.875rem;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  background: var(--bs-body-bg);
}

.hardware-card .card:hover {
  transform: translateY(-3px);
  border-color: rgba(13, 110, 253, 0.38);
  box-shadow: 0 0.75rem 1.75rem rgba(30, 64, 175, 0.12) !important;
}

.hardware-card .card-header {
  min-height: 6.25rem;
  align-items: center;
  border-bottom: 1px solid var(--bs-border-color);
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.055), rgba(13, 202, 240, 0.025));
}

.hardware-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 11.5rem;
  overflow: hidden;
  padding: 2rem 2.25rem;
  border: 1px solid rgba(13, 110, 253, 0.18);
  border-radius: 1rem;
  background:
    radial-gradient(circle at 85% 20%, rgba(13, 202, 240, 0.13), transparent 24rem),
    linear-gradient(135deg, var(--bs-body-bg), rgba(13, 110, 253, 0.055));
  box-shadow: 0 0.5rem 1.5rem rgba(30, 64, 175, 0.07);
}

.hardware-hero::after {
  content: "";
  position: absolute;
  right: -3.5rem;
  bottom: -6.5rem;
  width: 15rem;
  height: 15rem;
  border: 1px solid rgba(13, 110, 253, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 2.25rem rgba(13, 110, 253, 0.025),
    0 0 0 4.5rem rgba(13, 110, 253, 0.018);
}

.hardware-hero-copy {
  position: relative;
  z-index: 1;
}

.hardware-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  color: #0d6efd;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hardware-hero h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.hardware-hero p {
  margin: 0;
  color: var(--bs-secondary-color);
}

.hardware-hero-total {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 7.25rem;
  min-height: 7.25rem;
  margin-left: 1.5rem;
  border: 1px solid rgba(13, 110, 253, 0.16);
  border-radius: 50%;
  background: var(--bs-body-bg);
  box-shadow: 0 0.75rem 2rem rgba(30, 64, 175, 0.1);
}

.hardware-total-number {
  color: #0d6efd;
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1;
}

.hardware-total-label {
  margin-top: 0.25rem;
  color: var(--bs-secondary-color);
  font-size: 0.75rem;
}

.hardware-toolbar {
  position: relative;
  max-width: 38rem;
}

.hardware-search-label {
  position: absolute;
  z-index: 2;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bs-secondary-color);
}

.hardware-search {
  width: 100%;
  height: 3.25rem;
  padding: 0.7rem 1rem 0.7rem 2.85rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  box-shadow: 0 0.25rem 1rem rgba(30, 64, 175, 0.055);
}

.hardware-search:focus {
  outline: 0;
  border-color: rgba(13, 110, 253, 0.65);
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.12);
}

.hardware-card-heading {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.85rem;
}

.hardware-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.75rem;
  color: #fff;
  background: linear-gradient(135deg, #0d6efd, #20b8cd);
  box-shadow: 0 0.5rem 1.25rem rgba(13, 110, 253, 0.18);
}

.hardware-card-heading h2 {
  overflow: hidden;
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hardware-card-subtitle {
  margin: 0.25rem 0 0;
  color: var(--bs-secondary-color);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.hardware-card-type {
  display: block;
  color: #0d6efd;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hardware-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.5rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(25, 135, 84, 0.18);
  border-radius: 999px;
  color: #198754;
  background: rgba(25, 135, 84, 0.07);
  font-size: 0.72rem;
  font-weight: 700;
}

.hardware-status-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #20c997;
  box-shadow: 0 0 0 0.18rem rgba(32, 201, 151, 0.12);
}

.hardware-status-inactive {
  border-color: rgba(108, 117, 125, 0.22);
  color: var(--bs-secondary-color);
  background: rgba(108, 117, 125, 0.08);
}

.hardware-status-inactive .hardware-status-dot {
  background: #6c757d;
  box-shadow: 0 0 0 0.18rem rgba(108, 117, 125, 0.12);
}

.hardware-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bs-border-color);
}

.hardware-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.25rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(13, 110, 253, 0.18);
  border-radius: 0.55rem;
  color: #0d6efd;
  background: rgba(13, 110, 253, 0.045);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.hardware-card-link:hover,
.hardware-card-link:focus {
  border-color: rgba(13, 110, 253, 0.38);
  background: rgba(13, 110, 253, 0.09);
  color: #0a58ca;
}

.hardware-storage-rows {
  padding: 0.25rem;
}

.hardware-storage-row {
  padding: 0.75rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  background: var(--bs-tertiary-bg);
}

.hardware-storage-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0.35rem 0.35rem 0;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  background: var(--bs-tertiary-bg);
  font-size: 0.78rem;
  white-space: nowrap;
}

.hardware-storage-badge span {
  color: #0d6efd;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hardware-card.d-none {
  display: none !important;
}

.hardware-spec-list {
  display: block;
  padding-left: 0;
  margin-bottom: 0;
}

.hardware-spec-row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 38%) minmax(0, 1fr);
  align-items: start;
  gap: 0.75rem;
  padding: 0.7rem 0.15rem;
  border-bottom: 1px solid var(--bs-border-color);
}

.hardware-spec-row:last-child {
  border-bottom: 0;
}

.hardware-spec-list dt {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
}

.hardware-spec-list dt i {
  width: 1rem;
  color: #6c86a7;
  text-align: center;
}

.hardware-spec-list dd {
  min-width: 0;
  margin: 0;
  color: var(--bs-secondary-color);
  overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {
  .hardware-hero {
    min-height: auto;
    align-items: flex-start;
    padding: 1.35rem;
  }

  .hardware-hero-total {
    min-width: 5.25rem;
    min-height: 5.25rem;
    margin-left: 0.75rem;
  }

  .hardware-total-number {
    font-size: 1.75rem;
  }

  .hardware-card .card-header {
    min-height: 5.5rem;
  }

  .hardware-icon {
    width: 2.75rem;
    height: 2.75rem;
  }

  .hardware-status {
    max-width: 7.5rem;
  }

  .hardware-spec-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
