/* Dashboard Styles - Postmania Content Manager */

:root {
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --info-color: #0ea5e9;
  --light-color: #f8fafc;
  --dark-color: #1e293b;
  --border-radius: 12px;
  --box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Base Styles */
body {
  background-color: #f8fafc;
  background-image: linear-gradient(135deg, #f0f4ff 0%, #f8fafc 100%);
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
}

/* Header Banner */
.welcome-banner {
  background-color: #2c3e50;
  background-image: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border-radius: var(--border-radius);
  padding: 30px;
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.welcome-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGRlZnM+CiAgICA8cGF0dGVybiBpZD0icGF0dGVybiIgeD0iMCIgeT0iMCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiBwYXR0ZXJuVW5pdHM9InVzZXJTcGFjZU9uVXNlIiBwYXR0ZXJuVHJhbnNmb3JtPSJyb3RhdGUoNDUpIj4KICAgICAgICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIGZpbGw9IiNmZmZmZmYiIGZpbGwtb3BhY2l0eT0iMC4wNSIvPgogICAgPC9wYXR0ZXJuPgo8L2RlZnM+CjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjcGF0dGVybikiLz4KPC9zdmc+');
  opacity: 0.2;
}

.welcome-content {
  position: relative;
  z-index: 10;
}

.welcome-banner h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
}

/* Navigation Tabs */
.dashboard-tabs {
  display: flex;
  background-color: white;
  border-radius: var(--border-radius);
  margin-bottom: 30px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.dashboard-tab {
  padding: 15px 20px;
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
}

.dashboard-tab:hover {
  color: var(--primary-color);
  background-color: rgba(59, 130, 246, 0.05);
}

.dashboard-tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  background-color: rgba(59, 130, 246, 0.1);
}

.dashboard-tab i {
  font-size: 18px;
}

/* Alert Boxes */
.alert-box {
  border-radius: var(--border-radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background-color: white;
  box-shadow: var(--box-shadow);
}

.alert-box.warning {
  border-left: 4px solid var(--warning-color);
}

.alert-box.danger {
  border-left: 4px solid var(--danger-color);
}

.alert-box.info {
  border-left: 4px solid var(--info-color);
}

.alert-box .alert-icon {
  font-size: 24px;
  color: var(--warning-color);
}

.alert-box.danger .alert-icon {
  color: var(--danger-color);
}

.alert-box.info .alert-icon {
  color: var(--info-color);
}

.alert-box .alert-content {
  flex: 1;
}

.alert-box .alert-title {
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--dark-color);
}

.alert-box .alert-text {
  color: var(--secondary-color);
  margin-bottom: 8px;
}

.alert-box .alert-actions {
  margin-top: 8px;
}

/* Section Styles */
.dashboard-section {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 24px;
  margin-bottom: 30px;
  box-shadow: var(--box-shadow);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.section-header-with-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--dark-color);
  margin: 0;
}

.section-header p, .section-header-with-btn p {
  color: var(--secondary-color);
  margin: 4px 0 0 0;
  font-size: 14px;
}

/* Status Cards */
.status-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.status-card {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--box-shadow);
  transition: transform 0.2s ease;
}

.status-card:hover {
  transform: translateY(-5px);
}

.status-card .status-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 24px;
  color: white;
}

.status-card .status-icon.running {
  background-color: var(--success-color);
}

.status-card .status-icon.stopped {
  background-color: var(--danger-color);
}

.status-card .status-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--dark-color);
}

.status-card .status-value {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--dark-color);
}

.status-card .status-label {
  font-size: 14px;
  color: var(--secondary-color);
}

/* Command Cards */
.command-card {
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: white;
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.command-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.command-card .card-header {
  background-color: #f9fafb;
  font-weight: 600;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.command-card .card-body {
  padding: 20px;
}

.command-card .card-text {
  color: var(--secondary-color);
  margin-bottom: 20px;
}

.command-card .badge {
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.command-card.border-primary {
  border-color: var(--primary-color);
}

.command-card.border-primary .card-header {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--primary-color);
}

/* Form Styling */
.form-option {
  margin-bottom: 16px;
}

.form-option label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--dark-color);
}

.form-option input[type="text"],
.form-option input[type="number"],
.form-option select,
.form-option textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.form-option input[type="text"]:focus,
.form-option input[type="number"]:focus,
.form-option select:focus,
.form-option textarea:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-option input[type="checkbox"] {
  margin-right: 8px;
}

/* Worker Status */
.worker-status {
  padding: 16px;
  border-radius: var(--border-radius);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.worker-status.running {
  background-color: #ecfdf5;
  color: #065f46;
  border-left: 4px solid var(--success-color);
}

.worker-status.stopped {
  background-color: #fef2f2;
  color: #991b1b;
  border-left: 4px solid var(--danger-color);
}

.worker-status .queue-name {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.worker-status .queue-name i {
  font-size: 18px;
}

.worker-status .queue-stats {
  display: flex;
  align-items: center;
  gap: 16px;
}

.worker-status .stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.worker-status .stat-value {
  font-weight: 700;
  font-size: 18px;
}

.worker-status .stat-label {
  font-size: 12px;
  opacity: 0.8;
}

/* Buttons */
.btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

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

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

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
}

.btn-success {
  background-color: var(--success-color);
  color: white;
}

.btn-warning {
  background-color: var(--warning-color);
  color: white;
}

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

.btn-outline-primary {
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  background-color: transparent;
}

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

/* Responsive Adjustments */
@media (max-width: 768px) {
  .status-cards {
    grid-template-columns: 1fr;
  }
  
  .section-header, .section-header-with-btn {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .section-header-with-btn .btn {
    margin-top: 16px;
  }
  
  .dashboard-tabs {
    flex-wrap: wrap;
  }
  
  .dashboard-tab {
    flex: 1 0 auto;
    text-align: center;
    justify-content: center;
  }
}
