:root {
  --blue: #1767a4;
  --blue-dark: #0d456e;
  --blue-soft: #eaf5fc;
  --gold: #e5a42f;
  --ink: #1d2c38;
  --muted: #6c7c88;
  --line: #dce7ee;
  --danger: #bd3434;
  --success: #19704c;
  --shadow: 0 18px 50px rgba(19, 69, 105, .12);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #f4f8fb; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font: 16px/1.65 "Microsoft YaHei", "PingFang SC", sans-serif;
  background:
    radial-gradient(circle at 8% 8%, rgba(79, 164, 211, .16), transparent 33rem),
    linear-gradient(155deg, #f9fcfe 0%, #eef6fb 100%);
}
a { color: inherit; }
button, input, select { font: inherit; }

.exam-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.exam-header {
  background: linear-gradient(110deg, #0d4d7b, #1778b4);
  color: #fff;
  box-shadow: 0 7px 24px rgba(5, 52, 85, .18);
}
.exam-header__inner { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.exam-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.exam-brand img { width: 68px; height: 68px; flex: 0 0 68px; object-fit: contain; }
.exam-brand strong { display: block; font-size: 21px; letter-spacing: .08em; }
.exam-brand span { display: block; opacity: .78; font-size: 13px; }
.exam-header__actions { display: flex; gap: 10px; align-items: center; }
.exam-header__actions a { padding: 8px 13px; border: 1px solid rgba(255,255,255,.4); border-radius: 9px; text-decoration: none; }

.exam-main { padding: 38px 0 58px; }
.exam-card { background: rgba(255,255,255,.96); border: 1px solid rgba(210,226,236,.9); border-radius: 18px; box-shadow: var(--shadow); }
.exam-card__head { padding: 22px 26px 16px; border-bottom: 1px solid var(--line); }
.exam-card__head h1, .exam-card__head h2 { margin: 0; font-size: 24px; }
.exam-card__head p { margin: 6px 0 0; color: var(--muted); }
.exam-card__body { padding: 26px; }

.login-page { display: grid; place-items: center; min-height: 100vh; padding: 28px 16px; }
.login-panel { width: min(520px, 100%); overflow: hidden; }
.login-hero { padding: 30px 32px 26px; color: #fff; background: linear-gradient(125deg, #0d4b76, #258fc6); }
.login-hero__brand { display: flex; gap: 15px; align-items: center; }
.login-hero img { width: 84px; height: 84px; flex: 0 0 84px; object-fit: contain; }
.login-hero h1 { margin: 0; font-size: 25px; }
.login-hero p { margin: 3px 0 0; color: rgba(255,255,255,.76); }
.login-form { padding: 30px 32px 34px; background: #fff; }
.login-query-button { margin-top: 12px; }

.score-query-panel { width: min(680px, 100%); overflow: hidden; }
.score-query-result { margin-top: 22px; padding: 22px; border-radius: 14px; }
.score-query-result h2 { margin: 0 0 8px; font-size: 24px; }
.score-query-result p { margin: 5px 0; }
.score-query-result--success { color: #175f43; background: #e8f8ef; border: 1px solid #b9e2ca; }
.score-query-result--waiting { color: #805513; background: #fff6df; border: 1px solid #edd9a7; }
.score-query-result--empty { color: #8c3434; background: #fff1f1; border: 1px solid #efcaca; }
.score-query-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(23, 95, 67, .18); }
.score-query-details div { min-width: 0; }
.score-query-details span { display: block; color: #668073; font-size: 13px; }
.score-query-details strong { display: block; margin-top: 2px; overflow-wrap: anywhere; }

.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 7px; color: #344955; font-weight: 700; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 13px; color: var(--ink); background: #fbfdfe;
  border: 1px solid #cbdce6; border-radius: 10px; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: #438fba; box-shadow: 0 0 0 3px rgba(48,135,183,.12); }
.captcha-row { display: grid; grid-template-columns: 1fr 110px; gap: 10px; align-items: end; }
.captcha-image { width: 110px; height: 46px; cursor: pointer; object-fit: fill; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.hint { color: var(--muted); font-size: 13px; }

.btn { display: inline-flex; min-height: 42px; padding: 9px 18px; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 10px; cursor: pointer; text-decoration: none; font-weight: 700; }
.btn-primary { color: #fff; background: linear-gradient(110deg, #1767a4, #278fc5); box-shadow: 0 8px 20px rgba(23,103,164,.2); }
.btn-secondary { color: var(--blue-dark); background: var(--blue-soft); border: 1px solid #c6e1ef; }
.btn-danger { color: #fff; background: var(--danger); }
.btn[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn-block { width: 100%; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.student-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.student-summary div { padding: 17px; border-radius: 12px; background: #f4f9fc; border: 1px solid #e0edf4; }
.student-summary span { display: block; color: var(--muted); font-size: 13px; }
.student-summary strong { display: block; margin-top: 3px; font-size: 17px; overflow-wrap: anywhere; }
.dashboard-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.profession-picker { max-width: 760px; }
.profession-match { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: -2px 0 20px; padding: 14px 16px; color: #31566b; background: #eef8fd; border: 1px solid #cce6f3; border-radius: 11px; }
.profession-match[hidden] { display: none; }
.profession-match span { font-size: 13px; }
.profession-match strong { color: var(--blue-dark); text-align: right; }
.status { display: inline-flex; padding: 3px 10px; border-radius: 20px; font-size: 13px; font-weight: 700; }
.status-waiting { color: #8b5812; background: #fff1d7; }
.status-running { color: #0e5e8e; background: #dff2fc; }
.status-done { color: var(--success); background: #dcf5e9; }

.exam-toolbar { position: sticky; top: 0; z-index: 5; padding: 14px 0; background: rgba(244,248,251,.93); backdrop-filter: blur(8px); }
.exam-toolbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px 18px; border-radius: 13px; background: #fff; border: 1px solid var(--line); box-shadow: 0 7px 24px rgba(19,69,105,.08); }
.progress { color: var(--blue-dark); font-weight: 700; }
.question-card { margin-bottom: 18px; padding: 24px 26px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 9px 27px rgba(19,69,105,.07); }
.question-title { display: flex; gap: 10px; align-items: flex-start; font-size: 18px; font-weight: 700; }
.question-index { flex: 0 0 auto; display: grid; place-items: center; width: 32px; height: 32px; color: #fff; background: var(--blue); border-radius: 50%; }
.question-type { margin-left: 7px; color: var(--blue); font-size: 13px; white-space: nowrap; }
.options { display: grid; gap: 10px; margin: 18px 0 0 42px; }
.option { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid #e0eaf0; border-radius: 10px; cursor: pointer; }
.option:hover { background: #f4f9fc; border-color: #b8d8e9; }
.option input { margin-top: 5px; }

.score-hero { padding: 34px; text-align: center; }
.score-number { color: var(--blue); font-size: 64px; font-weight: 800; line-height: 1; }
.score-number small { font-size: 20px; }
.score-pass { color: var(--success); }
.answer-result { padding: 17px 20px; border-bottom: 1px solid var(--line); }
.answer-result:last-child { border-bottom: 0; }
.answer-ok { border-left: 4px solid #2a9d6f; }
.answer-wrong { border-left: 4px solid #d54a4a; }
.empty { padding: 42px 20px; color: var(--muted); text-align: center; }

@media (max-width: 760px) {
  .exam-shell { width: min(100% - 20px, 1180px); }
  .exam-header__inner { min-height: 76px; }
  .exam-brand img { width: 56px; height: 56px; flex-basis: 56px; }
  .exam-brand strong { font-size: 17px; }
  .exam-brand span { display: none; }
  .exam-header__actions .user-name { display: none; }
  .exam-main { padding-top: 22px; }
  .grid-2, .student-summary { grid-template-columns: 1fr; }
  .exam-card__body, .question-card { padding: 19px 17px; }
  .login-form, .login-hero { padding-left: 22px; padding-right: 22px; }
  .login-hero img { width: 72px; height: 72px; flex-basis: 72px; }
  .login-hero h1 { font-size: 20px; }
  .score-query-details { grid-template-columns: 1fr; }
  .options { margin-left: 0; }
  .question-title { font-size: 16px; }
  .dashboard-actions .btn { flex: 1 1 140px; }
  .profession-match { align-items: flex-start; flex-direction: column; gap: 5px; }
  .profession-match strong { text-align: left; }
}
