* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f4f1ec;
  color: #2b2420;
}
#app { min-height: 100vh; }
.wrap { max-width: 720px; margin: 0 auto; padding: 24px 16px 80px; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: #c0392b; color: #fff;
}
.topbar .brand { font-weight: 700; }
.topbar button {
  background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.4);
  border-radius: 6px; padding: 6px 12px; cursor: pointer; font-size: 13px;
}
.topbar button:hover { background: rgba(255,255,255,.25); }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 19px; margin: 0 0 8px; }
p { line-height: 1.5; }
.card {
  background: #fff; border-radius: 10px; padding: 20px; margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.module-list-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-radius: 10px; background: #fff; margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); cursor: pointer;
}
.module-list-item:hover { outline: 2px solid #c0392b33; }
.module-list-item.locked { opacity: .55; cursor: default; }
.badge {
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: #eee; color: #555;
}
.badge.passed { background: #e3f3e6; color: #1f7a39; }
.badge.progress { background: #fdf0d5; color: #a8640f; }
progress { width: 100%; height: 8px; }
.btn {
  display: inline-block; background: #c0392b; color: #fff; border: none;
  padding: 10px 18px; border-radius: 8px; font-size: 15px; cursor: pointer;
}
.btn:disabled { background: #ccc; cursor: not-allowed; }
.btn.secondary { background: #e8e2d8; color: #2b2420; }
input[type="text"], input[type="email"], input[type="password"], textarea {
  width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 6px; font-size: 15px;
  font-family: inherit; margin-bottom: 10px;
}
textarea { min-height: 90px; resize: vertical; }
label { font-size: 14px; font-weight: 600; display: block; margin-bottom: 4px; }
.error-box { background: #fde8e6; color: #8a1f12; padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; font-size: 14px; }
.ok-box { background: #e3f3e6; color: #1f7a39; padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; font-size: 14px; }
.steps { display: flex; gap: 6px; margin-bottom: 16px; }
.steps span {
  flex: 1; text-align: center; font-size: 12px; padding: 6px 0; border-radius: 6px;
  background: #eee; color: #888;
}
.steps span.active { background: #c0392b; color: #fff; }
.steps span.done { background: #e3f3e6; color: #1f7a39; }
video { width: 100%; border-radius: 8px; background: #000; }
.quiz-q { margin-bottom: 18px; }
.quiz-opt { display: block; padding: 8px 10px; border: 1px solid #ddd; border-radius: 6px; margin-bottom: 6px; cursor: pointer; }
.quiz-opt input { margin-right: 8px; }
.roster-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.roster-list button {
  background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 8px 14px; cursor: pointer; font-size: 14px;
}
.roster-list button:hover { border-color: #c0392b; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tabs button { flex: 1; padding: 10px; border-radius: 8px; border: 1px solid #ddd; background: #fff; cursor: pointer; }
.tabs button.active { background: #c0392b; color: #fff; border-color: #c0392b; }
.certificate-canvas { width: 100%; max-width: 640px; border: 1px solid #ddd; border-radius: 8px; margin-bottom: 14px; }
.muted { color: #888; font-size: 13px; }
