.server-card {
  background: var(--surface-color);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border-radius: var(--radius-glass);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  min-height: 248px;
  height: auto;
}

.server-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 255, 255, 0.75);
  background: var(--surface-hover);
}

.server-card.online {
  border-top: 3px solid var(--primary-color);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.server-card.offline {
  border-top: 4px solid var(--text-light);
  opacity: 0.9;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.35rem;
}

.server-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  position: relative;
}

.status-online {
  background: var(--success-color);
}

.status-offline {
  background: var(--text-light);
}

.server-name-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.server-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.server-hostname {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 400;
}

.btn-remove {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-light);
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  line-height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-remove:hover {
  background: var(--danger-color);
  color: white;
}

/* Main Metrics */
.card-main-metrics {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card-stats-compact {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.45rem 0.55rem;
  background: rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.5);
  font-size: 0.78rem;
}

.stat-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}

.stat-k {
  color: var(--text-secondary);
  font-weight: 500;
  flex-shrink: 0;
}

.stat-v {
  color: var(--text-main);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  word-break: break-word;
}

.lat-good {
  color: var(--success-color);
}

.lat-mid {
  color: #fde047;
}

.lat-bad {
  color: #f87171;
}

/* Info Grid */
.card-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  padding: 0.45rem 0.5rem;
  background: rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.info-section {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
}

.info-label {
  color: var(--text-light);
  font-weight: 500;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  white-space: nowrap;
}

.info-value {
  color: var(--text-main);
  font-weight: 600;
  font-family: monospace;
  font-size: 0.7rem;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

/* Performance Grid */
.card-performance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  padding: 0.45rem 0.5rem;
  background: rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.performance-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.performance-header {
  margin-bottom: 0.25rem;
}

.performance-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.performance-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.performance-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
}

.performance-item-label {
  color: var(--text-light);
  font-weight: 500;
}

.performance-item-value {
  color: #0284c7;
  font-weight: 600;
  font-family: ui-monospace, monospace;
  text-align: right;
}

/* Footer Info */
.card-footer-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0.55rem;
  background: rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.45);
  margin-top: 0.15rem;
}

.footer-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.footer-label {
  color: var(--text-light);
  font-weight: 500;
}

.footer-value {
  color: var(--text-main);
  font-weight: 600;
  font-family: monospace;
}


/* Metrics List */
.metrics-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.metric-item {
  width: 100%;
}

.metric-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
}

.metric-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.metric-value {
  font-weight: 600;
  color: var(--text-main);
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: var(--bg-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-sm);
  transition: width 0.5s ease;
}

.uptime-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
}

.uptime-label {
  color: var(--text-light);
}

.uptime-value {
  color: var(--text-secondary);
  font-family: monospace;
}

.offline-state {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  margin-bottom: 0.65rem;
  padding: 0.65rem;
  color: var(--text-light);
  border: 1px dashed rgba(255, 255, 255, 0.55);
}

.offline-state.sync-pending {
  border: 1px dashed var(--primary-color);
  color: var(--text-secondary);
}

.card-footer {
  margin-top: 0.45rem;
}

.btn-detail {
  width: 100%;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--glass-border);
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-detail:hover {
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.85), rgba(196, 181, 253, 0.75));
  color: #0f172a;
  border-color: rgba(255, 255, 255, 0.65);
}
