:root {
  --brand: #1a5c3a;
  --brand-dark: #0f3d26;
  --bg: #f4f6f5;
  --card: #ffffff;
  --border: #dfe4e2;
  --text: #1f2a24;
  --muted: #6b7670;
  --danger: #b3261e;
  --ok: #1a7a35;
}
* { box-sizing: border-box; }
body {
  font-family: "Noto Sans Georgian", "DejaVu Sans", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
}
.header {
  background: var(--brand-dark);
  color: #fff;
  padding: 16px 24px;
  font-size: 18px;
  font-weight: 600;
}
.wrap {
  max-width: 760px;
  margin: 32px auto;
  padding: 0 16px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
h1 { font-size: 22px; margin: 0 0 6px; }
h2 { font-size: 18px; margin: 0 0 14px; }
p.muted, .muted { color: var(--muted); font-size: 14px; }
label { display:block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
input[type=text], input[type=tel], input[type=email], input[type=password] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
}
.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 12px 22px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
}
.btn:hover { background: var(--brand-dark); }
.btn.secondary { background: #55605a; }
.btn.danger { background: var(--danger); }
.error { color: var(--danger); background: #fbeceb; border: 1px solid #f0c9c6; padding: 10px 14px; border-radius: 6px; margin: 10px 0; }
.notice { color: var(--brand-dark); background: #eaf4ee; border: 1px solid #cfe6d8; padding: 10px 14px; border-radius: 6px; margin: 10px 0; }

/* --- Test page --- */
.timer-bar {
  position: sticky;
  top: 0;
  background: var(--brand-dark);
  color: #fff;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  font-size: 15px;
}
#timer { font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
#timer.low { color: #ffb4b4; }
.test-wrap { max-width: 820px; margin: 0 auto; padding: 20px 16px 80px; }
.question {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 16px;
}
.qnum { font-weight: 700; margin-right: 6px; }
.qtext { white-space: pre-line; margin-bottom: 10px; }
.qimage { display:block; max-width: 100%; margin: 10px auto; }
table.qtable { border-collapse: collapse; margin: 10px auto; }
table.qtable td, table.qtable th { border: 1px solid var(--border); padding: 6px 10px; text-align: center; font-size: 14px; }
.options label {
  display: block;
  font-weight: 400;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  margin: 2px 0;
}
.options label:hover { background: #f0f3f1; }
.options input { margin-right: 8px; }
.submit-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#autosave-status { font-size: 13px; color: var(--muted); }

.start-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 61, 38, 0.92);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.start-overlay-card {
  background: #fff;
  border-radius: 10px;
  padding: 32px;
  max-width: 440px;
  text-align: center;
}
.start-overlay-card h2 { margin-top: 0; }
.fs-warning {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff3cd;
  color: #7a5a00;
  border-bottom: 1px solid #f0d98c;
  padding: 10px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  font-size: 14px;
}

/* --- Admin --- */
table.admin { width: 100%; border-collapse: collapse; margin-top: 10px; background: #fff; }
table.admin th, table.admin td { border: 1px solid var(--border); padding: 8px 10px; font-size: 14px; text-align: left; }
table.admin th { background: #eef2ef; }
.pass { color: var(--ok); font-weight: 700; }
.fail { color: var(--danger); font-weight: 700; }
.recipients-list { list-style: none; padding: 0; }
.recipients-list li { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); }
.inline-form { display: flex; gap: 8px; margin-top: 10px; }
.inline-form input[type=email] { flex: 1; }
