body {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  margin: 0;
}

.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

h1, h2, h3 {
  margin-top: 0;
}

.subtle {
  color: #94a3b8;
}

.card {
  background: #111827;
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 20px;
  margin: 20px 0;
}

.state-card {
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
  border-color: #475569;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: #93c5fd;
  margin: 0 0 8px;
}

.state-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.state-label {
  font-size: clamp(38px, 8vw, 68px);
  font-weight: 800;
  line-height: 0.95;
  margin: 8px 0 12px;
}

.state-summary {
  font-size: 18px;
  margin: 0 0 10px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.stat-card {
  border-radius: 14px;
  padding: 16px;
  background: #0b1220;
  border: 1px solid #334155;
}

.stat-card span {
  display: block;
  font-size: 12px;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-card strong {
  display: block;
  font-size: 30px;
  margin: 8px 0 6px;
}

.stat-card small {
  color: #94a3b8;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.dashboard-panel {
  margin-top: 20px;
  padding: 18px;
  border-radius: 12px;
  background: #0b1220;
  border: 1px solid #334155;
}

.evidence-gauges,
.source-breakdown {
  display: grid;
  gap: 12px;
}

.gauge-card,
.source-bar-row {
  display: grid;
  gap: 8px;
}

.gauge-header,
.source-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.gauge-track,
.source-bar {
  height: 10px;
  border-radius: 999px;
  background: #1e293b;
  overflow: hidden;
}

.gauge-track span,
.source-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8 0%, #3b82f6 45%, #a855f7 100%);
}

label {
  display: block;
  margin: 12px 0;
  font-size: 14px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row input {
  width: auto;
  margin: 0;
}

input, textarea, button, select {
  width: 100%;
  margin-top: 6px;
  border-radius: 10px;
  border: 1px solid #475569;
  padding: 10px 12px;
  box-sizing: border-box;
  background: #0b1220;
  color: #e2e8f0;
}

button {
  background: #2563eb;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

button:hover {
  background: #1d4ed8;
}

.secondary-button {
  background: #334155;
}

.secondary-button:hover {
  background: #475569;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
}

.hidden {
  display: none;
}

.session-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #334155;
}

.session-banner strong {
  display: block;
  font-size: 1.05rem;
}

#auth-shell.authenticated #auth-panel {
  display: none;
}

#auth-shell.authenticated {
  padding-bottom: 16px;
}

#auth-result:empty {
  display: none;
}

.alert-panel {
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  background: #1e293b;
  border: 1px solid #475569;
}

.action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.action-row > * {
  flex: 1 1 180px;
}

.entries {
  padding-left: 18px;
}

.entries li {
  margin: 10px 0;
}

.source-list {
  list-style: none;
  padding-left: 0;
}

.source-list li {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid #334155;
  border-radius: 12px;
  background: #0f172a;
}

.source-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.source-title-row strong {
  display: block;
  margin-bottom: 4px;
}

.source-url {
  word-break: break-all;
}

.source-status {
  color: #94a3b8;
  font-size: 0.95rem;
  margin-top: 6px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid #334155;
}

.status-chip.healthy {
  color: #86efac;
  border-color: #166534;
  background: rgba(22, 101, 52, 0.2);
}

.status-chip.empty {
  color: #fcd34d;
  border-color: #854d0e;
  background: rgba(133, 77, 14, 0.2);
}

.status-chip.failing {
  color: #fca5a5;
  border-color: #991b1b;
  background: rgba(153, 27, 27, 0.2);
}

.status-chip.paused {
  color: #cbd5e1;
  border-color: #475569;
  background: rgba(71, 85, 105, 0.2);
}

.source-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.source-actions button {
  margin-top: 0;
  width: auto;
  min-width: 110px;
}

@media (max-width: 720px) {
  .state-row {
    flex-direction: column;
  }

  .session-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .source-title-row {
    flex-direction: column;
  }
}
