/* DASHBOARD SPECIFIC STYLES - SERVER CARDS */

.servers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.75rem;
}

.server-card {
  background: var(--bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.3);
  position: relative;
  height: 100%;
}

.server-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-blue);
  box-shadow: 0 12px 20px -10px rgba(30, 64, 175, 0.3);
}

.server-header {
  padding: 1.25rem;
  display: flex;
  align-items: center;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.03), transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  gap: 1.25rem;
}

.server-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), inset 0 2px 4px rgba(255, 255, 255, 0.05);
}

.server-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.server-header-info {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.server-name {
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

.plan-badge {
  font-size: 0.7rem;
  color: #60a5fa;
  background: rgba(30, 64, 175, 0.25);
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 800;
  width: fit-content;
  border: 1px solid rgba(30, 64, 175, 0.4);
}

.server-status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2);
}

.server-body {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.server-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-label-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  opacity: 0.7;
}

.info-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.info-value {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.85rem;
  font-family: 'JetBrains Mono', monospace;
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  text-align: center;
  min-width: 60px;
}

.info-value:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.server-quick-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.25rem;
  padding: 4px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.power-action-btn {
  flex: 1;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.power-action-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.power-action-btn.btn-start:hover:not(:disabled) {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.2);
}

.power-action-btn.btn-restart:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.2);
}

.power-action-btn.btn-stop:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}

.power-action-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.server-main-action {
  margin-top: 0.5rem;
  display: flex;
  gap: 1rem;
}

.btn-manage-compact {
  flex: 1;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border: none;
  border-radius: 12px;
  height: 46px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: all 0.3s;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  letter-spacing: 0.01em;
}

.btn-manage-compact:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
  filter: brightness(1.1);
}

.btn-billing-compact {
  width: 46px;
  height: 46px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.btn-billing-compact:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* Status Colors */
.status-dot-running, .status-dot-active { background-color: #10b981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.5); }
.status-dot-stopped, .status-dot-offline { background-color: #ef4444; box-shadow: 0 0 8px rgba(239, 68, 68, 0.5); }
.status-dot-starting, .status-dot-installing { background-color: #f59e0b; box-shadow: 0 0 8px rgba(245, 158, 11, 0.5); }
.status-dot-cancelled, .status-dot-suspended { background-color: #6b7280; }

.server-card[data-status="suspended"] {
  border-color: var(--danger);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.15);
}

.installing-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

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