:root {
  --green: #11856c;
  --green-dark: #075f50;
  --ink: #061a34;
  --muted: #536177;
  --line: #cfdae8;
  --panel: #ffffff;
  --danger: #cf3337;
  --ok: #168a57;
  --shadow: 0 22px 50px rgba(35, 55, 85, .11);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(90deg, #dceff1 0%, #f6f8fb 54%, #f4f0e7 100%);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button, input, textarea, select { font: inherit; }

button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 700;
}

button:disabled { cursor: not-allowed; opacity: .55; }

.topbar {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 48px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid #d6e0e9;
}

.brand {
  color: var(--green-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 800;
  line-height: 1;
}

.admin-note { color: var(--muted); font-size: 14px; }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  position: relative;
  overflow: hidden;
  width: min(440px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 30px;
}


.landing-wrap {
  width: min(1020px, 100%);
  margin: 24px auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr);
  gap: 22px;
  align-items: stretch;
}

.hero-panel {
  min-height: 588px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  background: linear-gradient(90deg, rgba(13, 73, 68, .94), rgba(17, 133, 108, .82)), radial-gradient(circle at 75% 18%, rgba(255,255,255,.16), transparent 18%), linear-gradient(135deg, #183f45, #12906f);
  box-shadow: var(--shadow);
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(112deg, transparent 0 42%, rgba(255,255,255,.12) 43% 44%, transparent 45%), repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 2px, transparent 2px 54px);
  opacity: .35;
}

.hero-panel > * { position: relative; }

.hero-panel h1 {
  margin: 0 0 22px;
  max-width: 700px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(54px, 7vw, 88px);
  line-height: .95;
}

.hero-panel p {
  max-width: 660px;
  margin: 0 0 64px;
  color: #fff;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.42;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.hero-stat {
  min-height: 74px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255,255,255,.12);
}

.hero-stat b {
  display: block;
  color: #fff;
  font-size: 25px;
  line-height: 1.1;
}

.hero-stat span {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--green-dark), var(--green));
}

.login-card h1, .panel h1, .panel h2 { margin: 6px 0 18px; }
.login-card h1 { font-size: 32px; }
.panel h1 { font-size: 34px; }
.panel h2 { font-size: 30px; }

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  font-weight: 700;
}

.field input, .field textarea, .field select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  background: #fff;
  color: var(--ink);
}

.field textarea { min-height: 54px; resize: vertical; }

.primary { background: var(--green); color: #fff; }
.primary:hover { background: var(--green-dark); }
.danger { background: var(--danger); color: #fff; }
.ghost { background: #eef3f9; color: var(--ink); }
.light { background: #f2f5fa; color: #747b87; }
.wide { width: 100%; }

.link-button {
  display: inline-block;
  margin-top: 16px;
  color: var(--green-dark);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.error { min-height: 24px; color: var(--danger); font-weight: 700; }

.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 880px);
  gap: 18px;
  max-width: 1160px;
  margin: 26px auto;
  padding: 0 12px;
}

.wide-layout {
  grid-template-columns: 260px minmax(0, 1fr);
  max-width: 1240px;
}

.sidebar {
  display: grid;
  align-content: start;
  gap: 10px;
}

.nav-btn {
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}

.nav-btn.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.stat {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 16px;
  background: #f8fbfe;
}

.stat b {
  display: block;
  color: var(--green-dark);
  font-size: 32px;
}

.stat span, .muted { color: var(--muted); font-size: 14px; }

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th {
  background: #eaf1f4;
  text-align: left;
  font-size: 14px;
}

th, td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  vertical-align: top;
}

.mini-btn {
  min-height: 30px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 14px;
}

.test-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin: 14px 0 32px;
}

.pdf-badge {
  display: inline-block;
  border-radius: 8px;
  padding: 7px 11px;
  background: #eaf7f3;
  color: var(--green-dark);
  font-weight: 800;
}
.timer {
  min-width: 136px;
  min-height: 56px;
  display: grid;
  place-items: center;
  background: #0d303a;
  color: #fff;
  border-radius: 8px;
  font-size: 24px;
  font-weight: 800;
}

.question-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin-top: 14px;
}

.question-title {
  font-weight: 800;
  margin-bottom: 13px;
}

.options { display: grid; gap: 10px; }

.option {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  cursor: pointer;
}

.option.selected {
  border-color: var(--green);
  background: #ecfaf6;
}

.answer-correct {
  border-color: #38a169;
  background: #eafaf1;
}

.answer-wrong {
  border-color: #dd4b4f;
  background: #fff0f0;
}

.answer-mark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  margin-right: 7px;
  color: #fff;
  font-weight: 900;
}

.mark-ok { background: var(--ok); }
.mark-bad { background: var(--danger); }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}

.span-2 { grid-column: 1 / -1; }

.mcq-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 16px;
  padding: 14px;
}

.success-text { color: var(--ok); font-weight: 800; }
.danger-text { color: var(--danger); font-weight: 800; }
.pending-text { color: #8a6b12; font-weight: 800; }

.notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(5, 16, 34, .45);
  padding: 20px;
  z-index: 20;
}

.modal-card {
  width: min(900px, 100%);
  max-height: 86vh;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

@media (max-width: 820px) {
  .topbar { padding: 18px; align-items: flex-start; }
  .login-shell { padding: 0 12px 18px; }
  .landing-wrap { grid-template-columns: 1fr; }
  .hero-panel { min-height: auto; padding: 30px 22px; }
  .hero-panel p { margin-bottom: 28px; font-size: 18px; }
  .hero-stats { grid-template-columns: 1fr; }
  .layout, .wide-layout { grid-template-columns: 1fr; margin-top: 14px; }
  .cards, .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .row-between { align-items: flex-start; flex-direction: column; }
  .pager { flex-wrap: wrap; }
}


.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(17, 133, 108, .14); }



.id-page h1 {
  font-size: 38px;
  margin-bottom: 24px;
}

.id-card {
  width: min(430px, 100%);
  margin-top: 26px;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 22px 44px rgba(23, 53, 90, .16);
}

.id-card-head {
  padding: 22px 20px 18px;
  color: #fff;
  background: linear-gradient(90deg, #1459d8, #0aa36f);
}

.id-card-head h2 {
  margin: 0 0 6px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
}

.id-card-head p { margin: 0; font-weight: 700; }
.id-card-body { padding: 18px 20px 20px; }
.id-card-body h3 { margin: 0 0 4px; font-size: 22px; }

.id-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

.id-row span {
  color: #60728a;
  font-weight: 800;
}

.id-row b {
  text-align: right;
  word-break: break-word;
}

.id-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}
