:root {
  --bg: #f5f7fb;
  --ink: #172033;
  --muted: #667085;
  --line: #d9e1ec;
  --panel: #ffffff;
  --blue: #2563eb;
  --green: #169b62;
  --yellow: #d69e2e;
  --red: #d64545;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
a { color: inherit; text-decoration: none; }
.topbar {
  min-height: 64px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #111827;
  color: white;
}
.brand { font-weight: 800; font-size: 22px; letter-spacing: 0; }
.topbar nav { display: flex; gap: 14px; flex-wrap: wrap; }
.topbar nav a { color: #dbeafe; font-size: 14px; }
.container { width: min(1180px, calc(100% - 32px)); margin: 28px auto; }
.footer { color: var(--muted); text-align: center; padding: 24px; font-size: 13px; }
.page-title, .table-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}
h1, h2, p { margin-top: 0; }
h1 { font-size: 30px; margin-bottom: 6px; }
h2 { font-size: 18px; margin-bottom: 16px; }
.eyebrow {
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .08em;
  margin-bottom: 8px;
}
.card, .panel, .metric, .empty {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
}
.panel, .empty { padding: 22px; margin-bottom: 20px; }
.login-panel {
  display: grid;
  grid-template-columns: 1.1fr 420px;
  align-items: center;
  gap: 34px;
  min-height: calc(100vh - 180px);
}
.form-card { padding: 24px; display: grid; gap: 16px; }
label { display: grid; gap: 8px; color: var(--muted); font-weight: 700; font-size: 14px; }
input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
  background: white;
}
button, .button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 10px 16px;
  background: var(--blue);
  color: white;
  font-weight: 800;
  cursor: pointer;
}
.secondary { background: #e8eef8; color: #1f2937; }
.danger { background: var(--red); color: white; }
.small { min-height: 32px; padding: 4px 10px; }
.error, .alert {
  padding: 12px 14px;
  border-radius: 6px;
  margin-bottom: 18px;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 700;
}
.alert { background: #dcfce7; color: #166534; }
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.metric { padding: 18px; }
.metric span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.metric strong { display: block; font-size: 24px; }
.big-callout {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 10px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.4fr .8fr;
  gap: 20px;
}
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pill { display: inline-flex; min-width: 76px; justify-content: center; border-radius: 999px; padding: 5px 9px; color: white; font-weight: 800; }
.pill.good { background: var(--green); }
.pill.warn { background: var(--yellow); }
.pill.bad { background: var(--red); }
.upload-grid { display: grid; gap: 18px; }
.dropzone {
  border: 1px dashed #9aa8bd;
  border-radius: 8px;
  padding: 22px;
  background: #f8fafc;
}
.target-input { max-width: 220px; margin-bottom: 18px; }
.health-list { display: grid; gap: 10px; }
.health-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.health-item span {
  min-width: 54px;
  text-align: center;
  color: white;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}
.health-item.ok span { background: var(--green); }
.health-item.fail span { background: var(--red); }

@media (max-width: 860px) {
  .login-panel, .dashboard-grid, .metric-grid { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; padding: 16px; gap: 12px; }
  .page-title, .table-actions { align-items: flex-start; flex-direction: column; }
}
