:root {
  --maroon: #6d1b2b;
  --maroon-dark: #4a1220;
  --gold: #c9a13b;
  --cream: #faf6ee;
  --ink: #2a1e1a;
  --line: #e3d9c6;
  --ok: #2f6b3f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Segoe UI", -apple-system, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

.topbar {
  background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-dark) 100%);
  color: #fff;
  padding: 28px 20px;
  text-align: center;
}

.topbar .eyebrow {
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 6px;
}

.topbar h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.topbar p {
  margin: 6px 0 0;
  font-size: 14px;
  color: #f1e6d8;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 20px;
  margin-bottom: 18px;
}

.role-choice {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.role-choice a {
  display: block;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--maroon);
  border-radius: 8px;
  padding: 18px 18px;
  color: var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
}

.role-choice a:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(74,18,32,.12);
}

.role-choice a strong {
  display: block;
  font-size: 16px;
  color: var(--maroon-dark);
  margin-bottom: 4px;
}

.role-choice a span {
  font-size: 13px;
  color: #6b5f56;
}

label.field-label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 14px;
}

input[type=text], input[type=number] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 15px;
  background: #fffdf9;
}

input:focus, textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 520px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.item .no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--maroon);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  margin-right: 8px;
}

.item p.statement {
  margin: 6px 0 12px;
  font-size: 15px;
}

.scale {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

@media (max-width: 480px) {
  .scale { grid-template-columns: repeat(2, 1fr); }
}

.scale label {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 8px;
  font-size: 13px;
  cursor: pointer;
  background: #fffdf9;
}

.scale input[type=radio] {
  accent-color: var(--maroon);
}

.scale label:has(input:checked) {
  border-color: var(--maroon);
  background: #fdf1ee;
  font-weight: 600;
}

textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  background: #fffdf9;
}

.submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--maroon);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
}

.submit-btn:hover { background: var(--maroon-dark); }

.note {
  font-size: 13px;
  color: #6b5f56;
}

.success-box {
  text-align: center;
  padding: 40px 20px;
}

.success-box .check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 28px;
}

.error-box {
  background: #fdeceb;
  border: 1px solid #e7a9a3;
  color: #8a2c22;
  padding: 12px 14px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 14px;
}

table.admin {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
}

table.admin th, table.admin td {
  border: 1px solid var(--line);
  padding: 6px 8px;
  text-align: left;
}

table.admin th {
  background: var(--maroon);
  color: #fff;
}

.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.admin-actions a, .admin-actions button {
  background: var(--maroon);
  color: #fff;
  border: none;
  padding: 9px 14px;
  border-radius: 6px;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 520px) {
  .stat-grid { grid-template-columns: 1fr; }
}

.stat-box {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  padding: 14px 16px;
}

.stat-box .num {
  font-size: 24px;
  font-weight: 700;
  color: var(--maroon-dark);
}

.stat-box .lbl {
  font-size: 12px;
  color: #6b5f56;
}
