* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
  background: #f5f5f5;
  color: #333;
}

header h1 a {
  color: inherit;
  text-decoration: none;
}

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

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.9rem;
}

.btn-primary {
  background: #2563eb;
  color: white;
}

.btn-secondary {
  background: #6b7280;
  color: white;
}

.btn-danger {
  background: #dc2626;
  color: white;
}

.issues {
  list-style: none;
  padding: 0;
}

.issue-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: white;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.priority {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.priority-4 {
  background: #fee2e2;
  color: #991b1b;
}

.priority-3 {
  background: #ffedd5;
  color: #9a3412;
}

.priority-2 {
  background: #fef3c7;
  color: #92400e;
}

.priority-1 {
  background: #dbeafe;
  color: #1e40af;
}

.priority-0 {
  background: #e5e7eb;
  color: #374151;
}

.status {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

.status-open {
  background: #dcfce7;
  color: #166534;
}

.status-progress {
  background: #dbeafe;
  color: #1e40af;
}

.status-building {
  background: #fef3c7;
  color: #92400e;
}

.status-pr {
  background: #e0e7ff;
  color: #3730a3;
}

.status-closed {
  background: #e5e7eb;
  color: #374151;
}

.status-blocked {
  background: #fee2e2;
  color: #991b1b;
}

.issue-title {
  flex: 1;
  color: #1e40af;
}

.issue-form {
  max-width: 500px;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-row .form-group {
  flex: 1;
}

.form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.empty-state {
  color: #6b7280;
  font-style: italic;
}

/* Issue actions in list */
.issue-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.inline-form {
  display: inline;
}

.btn-build {
  background: #059669;
  color: white;
}

.btn-build:hover {
  background: #047857;
}

.btn-small {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  background: #6b7280;
  color: white;
}

.btn-pr {
  background: #7c3aed;
  color: white;
}

.btn-large {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* Issue detail page */
.issue-detail {
  max-width: 600px;
}

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

.issue-meta {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.issue-detail-title {
  margin: 0;
  font-size: 1.5rem;
}

.issue-description {
  margin-bottom: 1.5rem;
}

.issue-description h3 {
  margin: 0 0 0.5rem 0;
  font-size: 0.875rem;
  color: #6b7280;
  text-transform: uppercase;
}

.description-content {
  background: white;
  padding: 1rem;
  border-radius: 4px;
  white-space: pre-wrap;
  font-family: inherit;
  margin: 0;
}

.issue-info {
  margin-bottom: 1.5rem;
}

.issue-info dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
  margin: 0;
  background: white;
  padding: 1rem;
  border-radius: 4px;
}

.issue-info dt {
  color: #6b7280;
  font-size: 0.875rem;
}

.issue-info dd {
  margin: 0;
}

.issue-links {
  margin-bottom: 1.5rem;
}

.issue-links h3 {
  margin: 0 0 0.5rem 0;
  font-size: 0.875rem;
  color: #6b7280;
  text-transform: uppercase;
}

.link-list {
  display: flex;
  gap: 0.5rem;
}

.issue-actions-detail {
  display: flex;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

/* Navigation */
header nav {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

header nav a {
  color: #2563eb;
  text-decoration: none;
}

header nav a:hover {
  text-decoration: underline;
}

/* Scrum Master Dashboard */
.scrum-master {
  max-width: 600px;
}

.scrum-master-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.scrum-master-header h2 {
  margin: 0;
}

.status-badge {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.875rem;
}

.status-running {
  background: #dcfce7;
  color: #166534;
}

.status-stopped {
  background: #fee2e2;
  color: #991b1b;
}

.scrum-master-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat {
  background: white;
  padding: 1rem;
  border-radius: 4px;
  text-align: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e40af;
}

.stat-label {
  color: #6b7280;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.text-success {
  color: #166534;
}

.text-error {
  color: #991b1b;
}

.error-banner {
  background: #fee2e2;
  color: #991b1b;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.scrum-master-info {
  background: white;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.scrum-master-info p {
  margin: 0.25rem 0;
}

.scrum-master-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.scrum-master-description {
  background: white;
  padding: 1rem;
  border-radius: 4px;
}

.scrum-master-description h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
}

.scrum-master-description ul {
  margin: 0;
  padding-left: 1.5rem;
}

.scrum-master-description li {
  margin-bottom: 0.5rem;
  color: #4b5563;
}
