/* Modern Dashboard Styles 2025 */
:root {
  /* Primary Colors */
  --primary-blue: #0066ff;
  --primary-gradient: linear-gradient(135deg, #0066ff, #2e7cff);
  --secondary-blue: #2e7cff;
  --deep-blue: #012a67;
  --accent-blue: #5e97ff;
  
  /* Secondary Colors */
  --accent-purple: #7e5cef;
  --accent-teal: #00d0c0;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  
  /* Neutrals */
  --bg-dark: #0a1128;
  --bg-card-dark: #111c3a;
  --bg-card-hover: #1a2642;
  --border-dark: rgba(255, 255, 255, 0.1);
  --text-light: #e4ebff;
  --text-light-muted: rgba(228, 235, 255, 0.7);
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Effects */
  --shadow-subtle: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.15);
  --glow-blue: 0 0 15px rgba(0, 102, 255, 0.5);
  --glow-subtle: 0 0 5px rgba(94, 151, 255, 0.3);
  --border-radius-sm: 6px;
  --border-radius-md: 10px;
  --border-radius-lg: 16px;
  
  /* Animations */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease-in-out;
}

/* Base Styles */
body {
  font-family: var(--font-primary);
  margin: 0;
  padding: 0;
  background-color: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.5;
}

/* Layout */
.dashboard-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background-color: var(--bg-card-dark);
  border-right: 1px solid var(--border-dark);
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 100;
  box-shadow: var(--shadow-medium);
}

.logo {
  display: flex;
  align-items: center;
  padding: 0 24px;
  margin-bottom: 32px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-gradient);
  border-radius: 10px;
  margin-right: 12px;
  box-shadow: var(--glow-blue);
}

.logo h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light-muted);
  padding: 16px 24px 8px;
}

.nav-menu, .settings-menu {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 12px 24px;
  cursor: pointer;
  transition: background-color var(--transition-fast);
  position: relative;
  margin: 4px 12px;
  border-radius: var(--border-radius-md);
}

.nav-item i, .nav-icon i {
  font-size: 18px;
  margin-right: 12px;
  color: var(--text-light-muted);
  transition: color var(--transition-fast);
}

.nav-item span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  transition: color var(--transition-fast);
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.nav-item:hover i, .nav-item:hover span {
  color: var(--accent-blue);
}

.nav-item.active {
  background-color: rgba(0, 102, 255, 0.15);
}

.nav-item.active i, .nav-item.active span {
  color: var(--primary-blue);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary-gradient);
  border-radius: 0 4px 4px 0;
}

/* Settings Menu */
.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  color: var(--text-light);
  font-size: 14px;
  transition: background-color var(--transition-fast);
}

.setting-item:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

/* Toggle Switch */
.toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: var(--transition-fast);
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-light);
  transition: var(--transition-fast);
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary-blue);
}

input:checked + .slider:before {
  transform: translateX(20px);
  background-color: white;
}

/* Dropdown Menu */
.dropdown-menu {
  padding: 8px 0;
  margin: 0 24px;
  background-color: var(--bg-card-hover);
  border-radius: var(--border-radius-md);
  display: none;
}

.dropdown-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  color: var(--text-light);
  text-decoration: none;
  font-size: 13px;
  transition: background-color var(--transition-fast);
}

.dropdown-item i {
  margin-right: 10px;
  font-size: 14px;
  color: var(--text-light-muted);
}

.dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.dropdown-divider {
  height: 1px;
  background-color: var(--border-dark);
  margin: 8px 0;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 24px;
  background-color: var(--bg-dark);
  min-height: 100vh;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.header h1 {
  font-size: 24px;
  font-weight: 600;
  margin: 0;
  color: var(--text-light);
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Time Range Selector */
.time-range-selector {
  display: flex;
  align-items: center;
  background-color: var(--bg-card-dark);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-dark);
  overflow: hidden;
}

.time-range-btn {
  padding: 8px 16px;
  background: transparent;
  color: var(--text-light-muted);
  border: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.time-range-btn:hover {
  color: var(--text-light);
  background-color: rgba(255, 255, 255, 0.05);
}

.time-range-btn.active {
  background: var(--primary-gradient);
  color: white;
  box-shadow: var(--glow-subtle);
}

.last-updated {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-light-muted);
  font-size: 12px;
  margin-left: 12px;
}

.last-updated i {
  font-size: 10px;
}

/* Action Buttons */
.action-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: var(--bg-card-dark);
  border: 1px solid var(--border-dark);
  border-radius: var(--border-radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.action-button i {
  font-size: 14px;
}

.action-button:hover {
  background-color: var(--bg-card-hover);
  color: white;
}

.action-button.primary {
  background: var(--primary-gradient);
  border: none;
  color: white;
  box-shadow: var(--glow-subtle);
}

.action-button.primary:hover {
  filter: brightness(1.1);
  box-shadow: var(--glow-blue);
}

.action-button.secondary {
  background-color: rgba(126, 92, 239, 0.15);
  border: 1px solid rgba(126, 92, 239, 0.3);
  color: var(--accent-purple);
}

.action-button.secondary:hover {
  background-color: rgba(126, 92, 239, 0.25);
}

.action-button.danger {
  background-color: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--accent-red);
}

.action-button.danger:hover {
  background-color: rgba(239, 68, 68, 0.25);
}

.refresh-button i {
  transition: transform var(--transition-fast);
}

.refresh-button:hover i {
  transform: rotate(45deg);
}

/* Dashboard Cards */
.dashboard-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
  width: 100%;
}

.status-card {
  background-color: var(--bg-card-dark);
  border: 1px solid var(--border-dark);
  border-radius: var(--border-radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.status-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}

.status-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  font-size: 24px;
}

.status-icon.healthy {
  background-color: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.status-icon.warning {
  background-color: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.status-icon.error {
  background-color: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.status-details h3 {
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 8px;
  color: var(--text-light-muted);
}

.status-value {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--text-light);
}

.status-meta {
  font-size: 12px;
  color: var(--text-light-muted);
}

/* Dashboard Cards */
.dashboard-card {
  background-color: var(--bg-card-dark);
  border: 1px solid var(--border-dark);
  border-radius: var(--border-radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.dashboard-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}

.dashboard-card.full-width {
  grid-column: 1 / -1;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header h3 i {
  color: var(--primary-blue);
}

.card-actions {
  display: flex;
  gap: 8px;
}

.icon-button {
  background: none;
  border: none;
  color: var(--text-light-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  transition: var(--transition-fast);
  border-radius: 6px;
}

.icon-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
}

.chart-container {
  flex: 1;
  position: relative;
  min-height: 200px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-dark);
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.metric-label {
  font-size: 12px;
  color: var(--text-light-muted);
  margin-bottom: 4px;
}

.metric-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-light);
}

.metric-value.warning {
  color: var(--accent-amber);
}

/* Resources Grid */
.resources-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 16px 0;
}

.resource-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.resource-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 2px;
}

.progress-bar {
  height: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 4px;
  transition: width var(--transition-medium);
}

.progress-fill.memory {
  background: linear-gradient(to right, #7e5cef, #5e61ff);
}

.progress-fill.gpu {
  background: linear-gradient(to right, #00d0c0, #10b981);
}

.progress-fill.disk {
  background: linear-gradient(to right, #f59e0b, #f97316);
}

/* Table */
.table-container {
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid var(--border-dark);
  border-radius: var(--border-radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-dark);
}

.data-table th {
  color: var(--text-light-muted);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  background-color: rgba(255, 255, 255, 0.03);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.03);
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 6px;
}

.status-badge.success {
  background-color: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.status-badge.success::before {
  background-color: #10b981;
}

.status-badge.processing {
  background-color: rgba(126, 92, 239, 0.15);
  color: #7e5cef;
}

.status-badge.processing::before {
  background-color: #7e5cef;
}

.status-badge.error {
  background-color: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.status-badge.error::before {
  background-color: #ef4444;
}

/* Quick Actions */
.quick-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

/* Queue Status */
.queue-status-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.queue-card {
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: var(--border-radius-md);
  padding: 16px;
  border-left: 3px solid var(--primary-blue);
  transition: all var(--transition-fast);
}

.queue-card:hover {
  background-color: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.queue-card.status-active {
  border-left-color: var(--accent-green);
}

.queue-card.status-paused {
  border-left-color: var(--accent-amber);
}

.queue-card.status-error {
  border-left-color: var(--accent-red);
}

.queue-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.queue-title .status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--accent-green);
}

.queue-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.queue-stat {
  display: flex;
  flex-direction: column;
}

.queue-stat-label {
  font-size: 11px;
  color: var(--text-light-muted);
  margin-bottom: 4px;
}

.queue-stat-value {
  font-size: 14px;
  font-weight: 600;
}

.queue-progress {
  height: 6px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}

.queue-progress-bar {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 3px;
  transition: width var(--transition-medium);
}

/* Active Queues */
.active-queues-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.metric-grid-item {
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: var(--border-radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform var(--transition-fast);
}

.metric-grid-item:hover {
  transform: translateY(-2px);
  background-color: rgba(255, 255, 255, 0.05);
}

.metric-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 102, 255, 0.15);
  color: var(--primary-blue);
  font-size: 18px;
  margin-bottom: 12px;
}

.metric-value {
  font-size: 20px;
  font-weight: 600;
  margin: 8px 0 4px;
}

.metric-label {
  font-size: 12px;
  color: var(--text-light-muted);
}

/* Progress Bar Container */
.progress-bar-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  margin-top: 8px;
  overflow: hidden;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .dashboard-row {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

@media (max-width: 992px) {
  .sidebar {
    width: 220px;
  }
  
  .main-content {
    margin-left: 220px;
  }
  
  .nav-item {
    padding: 10px 20px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 70px;
    padding: 20px 0;
  }
  
  .main-content {
    margin-left: 70px;
    padding: 16px;
  }
  
  .logo {
    justify-content: center;
    padding: 0;
  }
  
  .logo h2 {
    display: none;
  }
  
  .section-label {
    text-align: center;
    padding: 12px 4px 8px;
  }
  
  .nav-item {
    padding: 12px;
    justify-content: center;
    margin: 4px 8px;
  }
  
  .nav-item i {
    margin-right: 0;
    font-size: 20px;
  }
  
  .nav-item span {
    display: none;
  }
  
  .setting-item {
    justify-content: center;
    padding: 10px;
  }
  
  .setting-item span {
    display: none;
  }
  
  .dropdown-menu {
    margin: 0 8px;
  }
  
  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .actions {
    width: 100%;
    flex-wrap: wrap;
  }
}

@media (max-width: 576px) {
  .main-content {
    padding: 12px;
  }
  
  .dashboard-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .actions {
    gap: 8px;
  }
  
  .time-range-selector {
    flex: 1;
  }
  
  .time-range-btn {
    flex: 1;
    text-align: center;
    padding: 8px 0;
  }
  
  .last-updated {
    display: none;
  }
  
  .card-footer {
    flex-direction: column;
    gap: 16px;
  }
  
  .metric-item {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
  }
  
  .table-container {
    overflow-x: auto;
  }
  
  .data-table th,
  .data-table td {
    padding: 10px 8px;
    font-size: 12px;
  }
}

/* Animations */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

.pulse {
  animation: pulse 1s infinite;
}
