/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: #f3f7fb;
  color: #16325c;
  min-height: 100vh;
  padding: 2rem 1rem;
}

/* ── Layout ── */
.container {
  max-width: 760px;
  margin: 0 auto;
}

header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

header svg { flex-shrink: 0; }

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #032d60;
}

.subtitle {
  font-size: 0.9rem;
  color: #54698d;
  margin-top: 0.15rem;
}

.intro {
  font-size: 0.9rem;
  color: #444;
  line-height: 1.6;
  margin-bottom: 1.75rem;
  padding: 1rem 1.25rem;
  background: #fff;
  border-radius: 8px;
  border-left: 4px solid #00A1E0;
}

/* ── Results list ── */
.results {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.test-card {
  background: #fff;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  border: 1px solid #e0e5ee;
  display: grid;
  grid-template-columns: 1.75rem 1fr auto;
  align-items: start;
  gap: 0 0.75rem;
  transition: border-color 0.2s;
}

.test-card.pass  { border-left: 4px solid #2e844a; }
.test-card.fail  { border-left: 4px solid #ba0517; }
.test-card.warn  { border-left: 4px solid #dd7a01; }
.test-card.running { border-left: 4px solid #00A1E0; }
.test-card.pending { border-left: 4px solid #c9d3e0; }

.test-icon {
  font-size: 1.1rem;
  line-height: 1.4;
  grid-row: 1 / 3;
  align-self: center;
}

.test-name {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
}

.test-badge {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  text-transform: uppercase;
  align-self: center;
}

.badge-pass    { background: #e3f5e9; color: #2e844a; }
.badge-fail    { background: #fce9ea; color: #ba0517; }
.badge-warn    { background: #fef4e0; color: #916100; }
.badge-running { background: #e5f5fd; color: #005fb2; }
.badge-pending { background: #f3f7fb; color: #7a8caa; }

.test-detail {
  grid-column: 2 / 4;
  font-size: 0.83rem;
  color: #54698d;
  margin-top: 0.3rem;
  line-height: 1.5;
}

.test-detail strong { color: #ba0517; }

/* Spinner */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid #c9d3e0;
  border-top-color: #00A1E0;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}

/* ── Summary banner ── */
.summary {
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}
.summary.all-pass { background: #e3f5e9; color: #2e844a; border: 1px solid #b0dfc0; }
.summary.has-fail { background: #fce9ea; color: #ba0517; border: 1px solid #f5bec1; }
.summary.has-warn { background: #fef4e0; color: #916100; border: 1px solid #f8d89a; }

/* ── Actions ── */
.actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn-primary {
  background: #0176d3;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.65rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary:hover  { background: #005ba1; }
.btn-primary:active { background: #032d60; }
.btn-primary:disabled { background: #c9d3e0; cursor: not-allowed; }

footer {
  margin-top: 2.5rem;
  font-size: 0.8rem;
  color: #7a8caa;
  text-align: center;
}
