.server-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  min-width: 0;
}

.server-search {
  width: min(100%, 578px);
  margin-bottom: 1rem;
  padding: 0.5rem;
}

.server-search label {
  position: relative;
  display: flex;
  align-items: center;
}

.server-search label > i {
  position: absolute;
  left: 1rem;
  color: var(--muted);
}

.server-search input {
  width: 100%;
  min-height: 2.6rem;
  padding-block: 0.55rem;
  padding-left: 2.75rem;
}

.server-search-empty {
  padding: 2.5rem 1rem;
  text-align: center;
}

.server-search-empty > i {
  margin-bottom: 0.7rem;
  color: var(--primary);
  font-size: 2rem;
}

.server-grid .server-card {
  background: var(--surface);
  background: linear-gradient(145deg, #151515, #0a0a0a);
}

.server-card {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  transition: border-color 180ms ease;
}

.server-grid .server-card.is-blacklisted {
  border-color: rgba(239, 68, 68, 0.4);
  background: linear-gradient(145deg, rgba(69, 10, 10, 1), rgba(16, 16, 16, 1));
}

.server-card.is-blacklisted:hover {
  border-color: rgba(248, 113, 113, 0.5);
}

.server-card .blacklist-warning {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(248, 113, 113, 0.4);
  border-radius: 50%;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.72);
  cursor: help;
}

.server-card .blacklist-warning[data-tooltip]::after {
  top: calc(100% + 0.45rem);
  right: 0;
  bottom: auto;
  left: auto;
  transform: translateY(-0.2rem);
}

.server-card .blacklist-warning[data-tooltip]:hover::after {
  transform: translateY(0);
}

.server-card.is-blacklisted .server-card-head {
  padding-right: 2.75rem;
}

.server-card:hover {
  border-color: rgba(225, 29, 46, 0.35);
}

.server-card-body {
  min-width: 0;
  padding: 1.25rem;
}

.server-card-head {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.server-meta {
  min-width: 0;
}

.server-name {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-id,
.metric span {
  color: var(--muted);
}

.server-id {
  overflow-wrap: anywhere;
  margin: 0;
  font-size: 0.86rem;
}

.metric {
  margin: 1rem 0;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  transition: border-color 0.2s ease;
}

.server-card:hover .metric {
  border-color: rgba(225, 29, 46, 0.32);
}

.metric strong {
  display: block;
  margin-top: 0.18rem;
  color: var(--ink);
  font-size: 1.65rem;
  line-height: 1;
}

.server-card-actions {
  justify-content: space-between;
}

.server-section {
  margin-bottom: 2rem;
}

.server-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.server-section-header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}

.server-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.85rem;
}

.server-section-icon.ok {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.14);
}

.server-section-icon.warn {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
}

.server-section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.38rem 0.65rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 900;
}

.status.ok {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.14);
}

.status.warn {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
}

.status.blocked {
  gap: 0.4rem;
  color: #fecaca;
  background: rgba(239, 68, 68, 0.16);
}
