/* Helix Dashboard Styles */

:root {
  --github-dark: #0d1117;
  --github-dark-bg: #161b22;
  --github-border: #30363d;
  --github-text: #c9d1d9;
  --github-text-secondary: #8b949e;
  --github-accent: #58a6ff;
  --github-success: #3fb950;
  --github-warning: #d29922;
  --github-danger: #f85149;
  --white: #ffffff;
  --radius: 6px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
  background: var(--github-dark-bg);
  color: var(--github-text);
  line-height: 1.6;
}

/* Header */
header {
  background: var(--github-dark);
  border-bottom: 1px solid var(--github-border);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--white);
}

header .user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

header .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--github-border);
}

/* Main Content */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Buttons */
button, .btn {
  background: var(--github-accent);
  color: var(--white);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.2s;
}

button:hover, .btn:hover {
  opacity: 0.85;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--github-dark-bg);
  border: 1px solid var(--github-border);
  color: var(--github-text);
}

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

/* Cards */
.card {
  background: var(--github-dark);
  border: 1px solid var(--github-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

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

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--white);
}

.card-meta {
  font-size: 0.875rem;
  color: var(--github-text-secondary);
  margin-bottom: 0.5rem;
}

/* Engagement Grid */
.engagement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.status-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-completed {
  background: rgba(63, 185, 80, 0.1);
  border-color: var(--github-success);
  color: var(--github-success);
}

.status-completed::before {
  background: var(--github-success);
}

.status-in-progress {
  background: rgba(210, 153, 34, 0.1);
  border-color: var(--github-warning);
  color: var(--github-warning);
}

.status-in-progress::before {
  background: var(--github-warning);
}

.status-pending {
  background: rgba(139, 148, 158, 0.1);
  border-color: var(--github-text-secondary);
  color: var(--github-text-secondary);
}

.status-pending::before {
  background: var(--github-text-secondary);
}

.status-dead-letter {
  background: rgba(248, 81, 73, 0.1);
  border-color: var(--github-danger);
  color: var(--github-danger);
}

.status-dead-letter::before {
  background: var(--github-danger);
}

/* Forms */
form {
  max-width: 600px;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--github-text);
}

label.required::after {
  content: ' *';
  color: var(--github-danger);
}

input[type="text"],
input[type="date"],
input[type="number"],
textarea,
select {
  width: 100%;
  background: var(--github-dark-bg);
  border: 1px solid var(--github-border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  color: var(--github-text);
  font-size: 0.875rem;
  font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--github-accent);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

input[type="range"] {
  flex: 1;
  height: 4px;
  background: var(--github-border);
  border-radius: 2px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--github-accent);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--github-accent);
  cursor: pointer;
  border: none;
}

.slider-value {
  min-width: 3rem;
  text-align: right;
  font-weight: 500;
  color: var(--github-accent);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--github-text-secondary);
  margin-top: 0.25rem;
}

.form-error {
  font-size: 0.75rem;
  color: var(--github-danger);
  margin-top: 0.25rem;
}

/* Phase Timeline */
.phase-timeline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0;
  overflow-x: auto;
  padding: 1rem 0;
}

.phase-step {
  flex: 1;
  min-width: 120px;
  text-align: center;
  position: relative;
}

.phase-step::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 60%;
  width: 100%;
  height: 2px;
  background: var(--github-border);
  z-index: -1;
}

.phase-step:last-child::after {
  display: none;
}

.phase-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--github-dark-bg);
  border: 2px solid var(--github-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.phase-step.completed .phase-icon {
  background: var(--github-success);
  border-color: var(--github-success);
}

.phase-step.in-progress .phase-icon {
  background: var(--github-warning);
  border-color: var(--github-warning);
}

.phase-step.dead-letter .phase-icon {
  background: var(--github-danger);
  border-color: var(--github-danger);
}

.phase-label {
  font-size: 0.75rem;
  color: var(--github-text-secondary);
}

.phase-step.completed .phase-label,
.phase-step.in-progress .phase-label {
  color: var(--github-text);
  font-weight: 500;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--github-dark);
  border: 1px solid var(--github-border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  margin-bottom: 1.5rem;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--white);
}

.modal-footer {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Loading Spinner */
.spinner {
  border: 3px solid var(--github-border);
  border-top-color: var(--github-accent);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

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

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--white);
}

.empty-state-text {
  color: var(--github-text-secondary);
  margin-bottom: 1.5rem;
}

/* Alert Messages */
.alert {
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  margin-bottom: 1rem;
}

.alert-success {
  background: rgba(63, 185, 80, 0.1);
  border-color: var(--github-success);
  color: var(--github-success);
}

.alert-error {
  background: rgba(248, 81, 73, 0.1);
  border-color: var(--github-danger);
  color: var(--github-danger);
}

.alert-warning {
  background: rgba(210, 153, 34, 0.1);
  border-color: var(--github-warning);
  color: var(--github-warning);
}

/* Utility Classes */
.hidden {
  display: none !important;
}

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

.text-muted {
  color: var(--github-text-secondary);
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

/* Responsive */
@media (max-width: 768px) {
  header {
    padding: 1rem;
  }

  main {
    padding: 1rem;
  }

  .engagement-grid {
    grid-template-columns: 1fr;
  }

  .phase-timeline {
    flex-direction: column;
    align-items: stretch;
  }

  .phase-step::after {
    display: none;
  }
}
