.server-card {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.server-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--primary-color);
}

.server-card.online {
  border-top: 4px solid var(--success-color);
}

.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.5rem;
  cursor: grab;
  user-select: none;
}

.card-header:active {
  cursor: grabbing;
}

.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);
  box-shadow: 0 0 0 4px rgba(134, 239, 172, 0.2);
}

.status-online::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  animation: pulse 2s infinite;
  border: 1px solid var(--success-color);
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.5; }
  70% { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1); opacity: 0; }
}

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

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

.server-name {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-main);
}

.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: 1rem;
}

.metrics-grid-main {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.5rem 0;
}

.circular-progress-small {
  display: flex;
  align-items: center;
  justify-content: center;
}

.circular-progress-small .progress-ring-bg {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 6;
}

.circular-progress-small .progress-ring-circle {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease;
  transform: rotate(-90deg);
  transform-origin: center;
}

.circular-progress-small .progress-value-small {
  font-size: 14px;
  font-weight: 600;
  fill: var(--text-main);
}

.circular-progress-small .progress-label-small {
  font-size: 10px;
  fill: var(--text-secondary);
}

/* Info Grid */
.card-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-color);
  border-radius: var(--radius-md);
}

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

.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.75rem;
  padding: 0.75rem;
  background: var(--bg-color);
  border-radius: var(--radius-md);
}

.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: var(--primary-color);
  font-weight: 600;
  font-family: monospace;
  text-align: right;
}

/* Footer Info */
.card-footer-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--bg-color);
  border-radius: var(--radius-md);
  margin-top: 0.5rem;
}

.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: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  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: var(--bg-color);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

.card-footer {
  margin-top: auto;
}

.btn-detail {
  width: 100%;
  background: var(--surface-hover);
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-detail:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}
