/* Component Styles - Tables, badges, alerts, cards, notices, etc. */

/* Rainbow gradient border - reusable via background-clip technique */
.stat-card,
.metric-card {
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(
      135deg,
      rgba(99, 102, 241, 0.4),
      rgba(168, 85, 247, 0.4),
      rgba(236, 72, 153, 0.4),
      rgba(249, 115, 22, 0.4),
      rgba(234, 179, 8, 0.4),
      rgba(34, 197, 94, 0.4),
      rgba(6, 182, 212, 0.4),
      rgba(99, 102, 241, 0.4)
    ) border-box;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 20px;
}

/* Page Header */
.page-header {
  margin-bottom: 32px;
}

.page-header--article {
  margin-bottom: 48px;
}

.page-title {
  font-size: 32px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.page-title--article {
  font-size: 36px;
  margin-bottom: 12px;
}

.page-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
}

.page-subtitle--article {
  font-size: 16px;
}

/* Alert */
.alert {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--warning);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 32px;
}

.alert-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.alert-message {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.6;
}

/* Section/Card */
section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.section-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

td {
  padding: 16px 24px;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

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

.repo-name {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 14px;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid;
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

.badge-neutral {
  background: var(--surface);
  color: var(--text-secondary);
  border-color: var(--border);
}

/* Empty State */
.empty-state {
  padding: 80px 24px;
  text-align: center;
}

.empty-state-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.empty-state-text {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* Notice Box (docs, privacy) */
.notice {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 24px 0;
}

.notice--lg {
  padding: 20px 24px;
  margin: 32px 0;
}

.notice-warning {
  border-left: 3px solid var(--warning);
}

.notice-success {
  border-left: 3px solid var(--success);
}

.notice-primary {
  border-left: 3px solid var(--border-hover);
}

.notice-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.notice h3 {
  font-size: 16px;
  margin: 0 0 12px;
  color: var(--text-primary);
}

.notice p {
  margin-bottom: 0;
  font-size: 14px;
}

/* Steps (docs) */
.steps {
  counter-reset: step;
  margin: 32px 0;
}

.step {
  counter-increment: step;
  position: relative;
  padding-left: 48px;
  margin-bottom: 32px;
}

.step::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.step h4 {
  margin-top: 0;
}

/* Card (login, setup) */
.card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 48px 40px;
  text-align: center;
}

.card .logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px auto;
  object-fit: contain;
}

.card h1 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.card p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 15px;
  line-height: 1.6;
}

/* Status badges (setup) */
.status {
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: 13px;
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.status.success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

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

.status.pending {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
  .page-title {
    font-size: 24px;
  }

  .page-title--article {
    font-size: 28px;
  }

  table {
    font-size: 12px;
  }

  th, td {
    padding: 12px 16px;
  }

  .step {
    padding-left: 40px;
  }

  .step::before {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }
}
