:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --bg: #f4f5f7;
  --card-bg: #ffffff;
  --border: #e2e4e9;
  --text: #1f2430;
  --muted: #6b7280;
  --danger: #dc2626;
  --success: #16a34a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
}

.navbar .brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 1.1rem;
}

.navbar .brand img {
  height: 32px;
  width: 32px;
  object-fit: contain;
  border-radius: 4px;
}

.navbar nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.navbar .role-badge {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--primary-dark);
}

.container {
  max-width: 840px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

h1 { font-size: 1.6rem; margin-top: 0; }
h2 { font-size: 1.25rem; }

.flash {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.flash.success { background: #ecfdf5; color: var(--success); border: 1px solid #bbf7d0; }
.flash.error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }

form { display: flex; flex-direction: column; gap: 0.9rem; }

label { font-weight: 600; font-size: 0.9rem; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"],
select,
textarea {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
}

textarea { resize: vertical; min-height: 70px; }

.btn {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  border: none;
  background: var(--primary);
  color: white;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  text-align: center;
}
.btn:hover { background: var(--primary-dark); text-decoration: none; }
.btn.secondary { background: #e5e7eb; color: var(--text); }
.btn.secondary:hover { background: #d1d5db; }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #b91c1c; }
.btn.small { padding: 0.3rem 0.7rem; font-size: 0.85rem; }

.inline-form { display: inline; }

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}
.list-item:last-child { border-bottom: none; }

.badge {
  font-size: 0.75rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--muted);
}
.badge.active { background: #ecfdf5; color: var(--success); }
.badge.completed { background: #eef2ff; color: var(--primary-dark); }

.actions { display: flex; gap: 0.5rem; align-items: center; }

.muted { color: var(--muted); font-size: 0.9rem; }

.question-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.slide-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0.25rem;
}

.slide-progress {
  color: var(--muted);
  font-size: 0.85rem;
}

.slide-title {
  text-align: center;
}

.slide-title.slide-title-last {
  color: var(--success);
}

.auth-card {
  max-width: 420px;
  margin: 3rem auto;
}

.radio-row, .rating-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 400;
}

table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; }
th, td { text-align: left; padding: 0.5rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
