:root {
  --navy: #0D1B2A;
  --royal: #2563EB;
  --dark-gray: #374151;
  --med-gray: #6B7280;
  --light-gray: #E5E7EB;
  --white: #FFFFFF;
  --success: #15803D;
  --error: #B91C1C;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  color: var(--dark-gray);
  background: #F9FAFB;
}

.topbar {
  background: var(--navy);
  color: var(--white);
  padding: 0 24px;
}
.topbar-inner {
  max-width: 960px;
  margin: 0 auto;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { font-weight: 700; font-size: 18px; }
.brand-accent { color: var(--royal); }
.user-box { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.hidden { display: none !important; }

.btn-link {
  background: none;
  border: none;
  color: var(--white);
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

h1 { font-weight: 700; color: var(--navy); margin: 0 0 4px; }
h2 { font-weight: 600; color: var(--navy); font-size: 18px; margin: 0 0 16px; }
.muted { color: var(--med-gray); margin-top: 0; }
.muted.small { font-size: 13px; }

.card {
  background: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
}
.card-narrow { max-width: 440px; margin: 40px auto; }

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
}

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--dark-gray);
  margin-bottom: 14px;
}
input, select, textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--light-gray);
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  color: var(--dark-gray);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--royal);
}

.btn-primary {
  background: var(--royal);
  color: var(--white);
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.btn-primary:hover { background: #1d4ed8; }

.btn-back {
  background: none;
  border: none;
  color: var(--royal);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  margin-bottom: 16px;
}

.error { color: var(--error); font-size: 13px; margin-bottom: 12px; }
.success { color: var(--success); font-size: 13px; margin-bottom: 12px; }
.msg { font-size: 13px; margin-bottom: 12px; }
.msg.error { color: var(--error); }
.msg.success { color: var(--success); }

table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--light-gray);
  font-size: 14px;
}
th { color: var(--med-gray); font-weight: 500; font-size: 13px; }

.student-row {
  cursor: pointer;
}
.student-row:hover { background: #F3F4F6; }

.badge-pill {
  display: inline-block;
  background: #EFF6FF;
  color: var(--royal);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  margin: 2px 4px 2px 0;
}

.badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.cert-link {
  background: none;
  border: none;
  color: var(--royal);
  font-family: inherit;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.empty-note { color: var(--med-gray); font-size: 14px; }
