:root {
  --bg: #0f1419;
  --card: #1a2332;
  --text: #e7ecf3;
  --muted: #8b9cb3;
  --accent: #5b9fd4;
  --border: #2a3544;
  --ok: #6bbf8a;
  --warn: #d4a35b;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.brand { color: var(--text); font-weight: 700; text-decoration: none; }
.muted { color: var(--muted); }

.container { max-width: 1100px; margin: 0 auto; padding: 1.5rem; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

label { display: block; margin-bottom: 1rem; }
input, textarea, select {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0d1218;
  color: var(--text);
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.checkbox { display: flex; align-items: center; gap: 0.5rem; }
.checkbox input { width: auto; }

.btn {
  border: 1px solid var(--border);
  background: #243044;
  color: var(--text);
  padding: 0.55rem 1rem;
  border-radius: 8px;
  cursor: pointer;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #081018; font-weight: 600; }
.btn.warn { border-color: var(--warn); color: var(--warn); }
.btn.small { padding: 0.35rem 0.7rem; font-size: 0.9rem; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.65rem 0.5rem; border-bottom: 1px solid var(--border); }
a { color: var(--accent); }

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #243044;
  font-size: 0.85rem;
}
.status-ready_for_review { background: #2d4a3a; color: var(--ok); }
.status-reviewed { background: #2a3d55; }
.status-error { background: #4a2d2d; color: #f0a0a0; }
.status-grading { background: #3d3a2a; color: var(--warn); }

.page-header { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.summary { display: flex; flex-direction: column; gap: 0.35rem; text-align: right; }
.filters { display: flex; gap: 0.75rem; margin-bottom: 1rem; align-items: center; }
.filters a { color: var(--muted); text-decoration: none; }
.filters a.active { color: var(--accent); font-weight: 600; }

.review-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
}
@media (max-width: 900px) {
  .review-grid, .row { grid-template-columns: 1fr; }
}

.criterion-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}
.criterion-card h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.pass-block pre {
  white-space: pre-wrap;
  font-size: 0.8rem;
  max-height: 240px;
  overflow: auto;
}
.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
.alert {
  background: #4a2d2d;
  border: 1px solid #6b3a3a;
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.alert.warn-banner {
  background: #3d3420;
  border-color: #6b5528;
  color: #f0d9a8;
}
.total-line { font-size: 1.1rem; }
