/* GPU Monitor Custom Styles */

/* CSS Reset and Base Styles */
:root {
  --primary-color: #3498db;
  --secondary-color: #2ecc71;
  --warning-color: #f39c12;
  --danger-color: #e74c3c;
  --info-color: #1abc9c;
  --dark-color: #2c3e50;
  --light-color: #ecf0f1;
  --gray-color: #95a5a6;
  --card-bg: #ffffff;
  --body-bg: #f5f7fa;
  --text-color: #34495e;
  --border-radius: 8px;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-color);
  background-color: var(--body-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 600px), 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

/* Header */
.header {
  background-color: var(--dark-color);
  color: white;
  padding: var(--spacing-md) 0;
  box-shadow: var(--shadow);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.status {
  font-size: 0.9rem;
}

.status.connected {
  color: var(--secondary-color);
}

.status.disconnected {
  color: var(--danger-color);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
  font-size: 0.9rem;
  font-family: var(--font-family);
}

.btn-outline {
  background: transparent;
  border: 1px solid currentColor;
}

.btn-light {
  color: white;
}

.btn-light:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Alerts */
.alert {
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-md);
  font-weight: 500;
}

.alert-warning {
  background-color: rgba(243, 156, 18, 0.2);
  color: var(--warning-color);
  border: 1px solid var(--warning-color);
}

.alert-danger {
  background-color: rgba(231, 76, 60, 0.2);
  color: var(--danger-color);
  border: 1px solid var(--danger-color);
}

.hidden {
  display: none;
}

/* Cards */
.card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.card-header {
  padding: var(--spacing-md);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: var(--primary-color);
  color: white;
}

.card-body {
  padding: var(--spacing-md);
}

.card-section {
  margin-bottom: var(--spacing-lg);
}

.card-section:last-child {
  margin-bottom: 0;
}

.card-section-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

/* Metrics */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.metric {
  margin-bottom: var(--spacing-md);
}

.metric-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.progress-container {
  height: 8px;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: var(--spacing-xs);
}

.progress-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-bar-primary {
  background-color: var(--primary-color);
}

.progress-bar-success {
  background-color: var(--secondary-color);
}

.progress-bar-warning {
  background-color: var(--warning-color);
}

.progress-bar-info {
  background-color: var(--info-color);
}

.progress-bar-danger {
  background-color: var(--danger-color);
}

.metric-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--gray-color);
}

/* Temperature color coding */
.temperature-cool {
  background-color: var(--secondary-color);
}

.temperature-warm {
  background-color: var(--warning-color);
}

.temperature-hot {
  background-color: var(--warning-color);
}

.temperature-critical {
  background-color: var(--danger-color);
}

/* Chart */
.chart-container {
  position: relative;
  height: 180px;
  width: 100%;
  margin-bottom: var(--spacing-md);
}

/* Table */
.table-container {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th,
.table td {
  padding: var(--spacing-sm);
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.table th {
  font-weight: 600;
}

.table tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.table-center {
  text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .metrics-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .chart-container {
    height: 150px;
  }
  
  .card-body {
    padding: var(--spacing-sm);
  }
}

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);
  }
  
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
} 