:root{--green:#166534;--blue:#2563eb;--slate:#0f172a;--muted:#64748b;--border:#e5e7eb;--bg:#f8fafc}*{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:var(--bg);color:#111827}.topbar{background:linear-gradient(90deg,#166534,#15803d);color:#fff;padding:14px 24px;display:flex;justify-content:space-between;align-items:center;box-shadow:0 2px 10px #0002}.brand{display:flex;gap:14px;align-items:center}.brand h1{font-size:22px;margin:0}.brand p{margin:0;color:#dcfce7}.logo{width:52px;height:52px;border-radius:50%;background:#fff;color:var(--green);display:grid;place-items:center;font-weight:800}.topbar a,.topbar span{color:#fff;margin-left:14px;text-decoration:none;font-weight:600}.container{max-width:1180px;margin:24px auto 80px;padding:0 16px}footer{position:fixed;left:0;right:0;bottom:0;background:#0f172a;color:#cbd5e1;text-align:center;padding:10px}.login-card{max-width:520px;margin:50px auto;background:#fff;border:1px solid var(--border);border-radius:20px;padding:28px;box-shadow:0 20px 50px #0001}.login-card h2{margin-top:0}.muted{color:var(--muted)}label{display:block;margin:14px 0 6px;font-weight:700}input,textarea,select{width:100%;border:1px solid #d1d5db;border-radius:12px;padding:12px;background:#fff}textarea{min-height:110px}button,.btn{display:inline-block;background:var(--blue);color:#fff;border:0;border-radius:10px;padding:11px 18px;margin-top:14px;text-decoration:none;cursor:pointer;font-weight:700}.page-title{background:#fff;border:1px solid var(--border);border-radius:16px;padding:18px;margin-bottom:18px}.page-title h2{margin:0 0 5px}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:20px}.card,.question-card{background:#fff;border:1px solid var(--border);border-radius:18px;overflow:hidden;box-shadow:0 10px 25px #00000010}.card-head{background:var(--blue);color:#fff;padding:10px 16px;font-weight:800}.card-body{padding:18px}.stats{display:flex;gap:12px;margin:18px 0}.stats span{background:#eef2ff;border-radius:10px;padding:10px;flex:1;text-align:center}.question-card{padding:18px;margin-bottom:16px}.question-head{display:flex;gap:14px;align-items:flex-start}.qno{min-width:36px;height:36px;border-radius:12px;background:linear-gradient(135deg,#6366f1,#9333ea);color:#fff;display:grid;place-items:center;font-weight:800}.question{font-weight:700;line-height:1.5}.options{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px;margin-top:16px}.option{border:1px solid var(--border);border-radius:14px;padding:12px;background:#f8fafc}.option.correct{background:#dcfce7;border-color:#86efac}.option.selected{outline:2px solid #2563eb}.option span{float:right;font-size:12px;background:#111827;color:#fff;border-radius:999px;padding:2px 8px;margin-left:6px}.result-line{display:flex;justify-content:space-between;align-items:center;margin-top:14px}.badge{display:inline-block;padding:5px 10px;border-radius:999px;background:#e0e7ff;color:#3730a3;font-weight:700}.badge.open{background:#dcfce7;color:#166534}.badge.closed{background:#fee2e2;color:#991b1b}.objection-box{margin-top:14px;border-top:1px solid var(--border);padding-top:12px}.table{width:100%;border-collapse:collapse;background:#fff;border-radius:14px;overflow:hidden}.table th,.table td{border-bottom:1px solid var(--border);padding:12px;text-align:left}.filters{display:flex;gap:10px;margin-bottom:18px}.admin-action{display:grid;gap:10px}.accept{background:#16a34a}.reject{background:#dc2626}.empty{background:#fff;border:1px dashed #cbd5e1;border-radius:16px;padding:25px;text-align:center;color:var(--muted)}.messages{margin-bottom:15px}.msg{padding:12px;border-radius:10px;margin:8px 0}.msg.error{background:#fee2e2;color:#991b1b}.msg.success{background:#dcfce7;color:#166534}@media(max-width:700px){.topbar{display:block}.filters{display:block}.result-line{display:block}.brand h1{font-size:18px}}

.login-page-wrap {
  max-width: 980px;
  margin: 28px auto 90px;
  padding: 0 16px;
}

.exam-title-box {
  text-align: center;
  margin-bottom: 18px;
}

.exam-title-box h1 {
  font-size: 22px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 4px;
}

.exam-title-box p {
  font-size: 15px;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 10px;
}

.exam-title-box span {
  font-size: 14px;
  color: #078036;
  font-weight: 600;
}

.advanced-login-card {
  max-width: 900px;
  margin: 0 auto;
  padding: 22px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  box-shadow: 0 25px 45px rgba(15, 23, 42, 0.12);
}

.login-step {
  display: none;
}

.login-step.active {
  display: block;
}

.step-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf2f7;
}

.step-header h2 {
  font-size: 20px;
  font-weight: 800;
  color: #1f2937;
  margin: 0;
}

.step-header p {
  font-size: 13px;
  color: #64748b;
  margin: 4px 0 0;
}

.step-pill {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.step-back {
  display: inline-flex;
  align-items: center;
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 12px;
}

.step-back:hover {
  color: #166534;
  text-decoration: underline;
}

.input-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #374151;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.label-icon {
  color: #14843b;
}

.login-input {
  width: 100%;
  height: 52px;
  border: 1px solid #dbe1ea;
  background: #f8fafc;
  border-radius: 14px;
  padding: 0 16px;
  font-size: 15px;
  outline: none;
  transition: 0.2s ease;
  box-sizing: border-box;
}

.login-input:focus {
  background: #ffffff;
  border-color: #15803d;
  box-shadow: 0 0 0 4px rgba(21, 128, 61, 0.12);
}

.input-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12) !important;
}

.password-field {
  position: relative;
}

.password-field .login-input {
  padding-right: 80px;
}

.password-field button {
  position: absolute;
  right: 10px;
  top: 9px;
  height: 34px;
  border: 0;
  background: #e2e8f0;
  color: #334155;
  border-radius: 10px;
  padding: 0 12px;
  font-weight: 700;
  cursor: pointer;
}

.password-field button:hover {
  background: #cbd5e1;
}

.candidate-preview {
  background: linear-gradient(135deg, #f0fdf4, #ecfeff);
  border: 1px solid #bbf7d0;
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 16px;
}

.candidate-preview small {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}

.candidate-preview strong {
  color: #064e3b;
  font-size: 15px;
}

.virtual-keyboard {
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 10px;
  margin-top: 16px;
  margin-bottom: 18px;
  box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.08);
}

.vk-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.vk-row:last-child {
  margin-bottom: 0;
}

.virtual-keyboard button {
  flex: 1;
  min-height: 46px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-bottom: 3px solid #cbd5e1;
  color: #0f172a;
  border-radius: 10px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
  transition: 0.12s ease;
}

.virtual-keyboard button:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
}

.virtual-keyboard button:active {
  transform: translateY(1px);
  border-bottom-width: 1px;
}

.virtual-keyboard .vk-special {
  flex: 1.1;
  background: #f8fafc;
  color: #166534;
}

.virtual-keyboard .vk-space {
  flex: 8;
}

.virtual-keyboard.caps-on {
  border-color: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.primary-login-btn {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(90deg, #166534, #15803d);
  color: white;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(22, 101, 52, 0.22);
  transition: 0.2s ease;
}

.primary-login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(22, 101, 52, 0.28);
}

.primary-login-btn span {
  margin-left: 6px;
}

.alert-message {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 700;
}

.alert-message.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-message.success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

@media (max-width: 768px) {
  .advanced-login-card {
    padding: 14px;
    border-radius: 16px;
  }

  .exam-title-box h1 {
    font-size: 18px;
  }

  .virtual-keyboard button {
    min-height: 40px;
    font-size: 12px;
    border-radius: 8px;
  }

  .vk-row {
    gap: 5px;
  }

  .step-header {
    flex-direction: column;
  }
}

.password-step-top {
  margin-bottom: 16px;
}

.password-guide {
  width: 100%;
  min-height: 42px;
  background: #eef5ff;
  border: 1px solid #a9c9ff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  color: #123ead;
  box-sizing: border-box;
  margin-top: 10px;
}

.guide-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.guide-icon {
  width: 24px;
  height: 24px;
  background: #dbeafe;
  color: #2563eb;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.guide-left strong {
  font-size: 14px;
  font-weight: 800;
}

.guide-chevron {
  font-size: 22px;
  color: #2563eb;
  line-height: 1;
}

.password-label {
  margin-top: 14px;
}

.icon-password-field {
  position: relative;
  margin-bottom: 16px;
}

.icon-password-field .login-input {
  padding-right: 54px;
}

.password-eye-btn {
  position: absolute;
  right: 12px;
  top: 9px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 20px;
  cursor: pointer;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.password-eye-btn:hover {
  background: #f1f5f9;
  color: #166534;
}

.back-arrow {
  font-size: 24px;
  line-height: 1;
  margin-right: 8px;
}

.password-step-top .step-back {
  font-size: 14px;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 14px;
}

.dashboard-shell {
  width: 100%;
  padding: 20px 22px 80px;
  box-sizing: border-box;
}

.result-panel {
  background: #ffffff;
  border: 1px solid #edf0f4;
  border-radius: 8px;
  overflow: hidden;
  min-height: 620px;
}

.result-panel-header {
  background: #f3f4f6;
  padding: 14px 22px;
  border-bottom: 1px solid #edf0f4;
}

.result-panel-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: #374151;
}

.result-panel-body {
  background: #fbfcff;
  padding: 22px;
}

.exam-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(360px, 520px));
  gap: 24px;
  align-items: start;
}

.exam-result-card {
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.13);
  border: 1px solid #e5e7eb;
}

.exam-card-top {
  background: #2563eb;
  color: #ffffff;
  padding: 9px 18px;
  font-size: 18px;
  font-weight: 800;
  border-radius: 8px 8px 0 0;
}

.exam-image-wrap {
  position: relative;
  width: 100%;
  height: 190px;
  overflow: hidden;
  background: #e5e7eb;
}

.exam-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.published-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #fde68a;
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 10px;
  border-bottom-left-radius: 6px;
}

.exam-card-content {
  background: #ffffff;
}

.exam-info-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 8px 6px;
}

.exam-info-row h3 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 600;
}

.exam-info-row p {
  margin: 3px 0 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.1;
}

.organizer-box {
  text-align: left;
  min-width: 230px;
  padding-top: 4px;
}

.organizer-box small {
  display: block;
  font-size: 11px;
  color: #475569;
  line-height: 1;
}

.organizer-box strong {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: #374151;
  line-height: 1.15;
  font-weight: 800;
}

.thin-divider {
  height: 1px;
  background: #e5e7eb;
  width: 100%;
  margin: 6px 0;
}

.exam-time-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 8px 8px;
}

.exam-time-row div {
  flex: 1;
}

.exam-time-row div:nth-child(2) {
  text-align: center;
}

.exam-time-row div:nth-child(3) {
  text-align: right;
}

.exam-time-row small {
  display: block;
  font-size: 10px;
  color: #111827;
  font-weight: 800;
  line-height: 1;
}

.exam-time-row strong {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  color: #111827;
  font-weight: 800;
  line-height: 1;
}

.exam-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}

.stat-box {
  width: 31%;
  text-align: center;
  padding: 7px 6px;
  box-sizing: border-box;
}

.stat-box small {
  display: block;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.stat-box strong {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.stat-blue {
  background: #e0e7ff;
  color: #4338ca;
}

.stat-green {
  background: #d1fae5;
  color: #047857;
}

.stat-pink {
  background: #fce7f3;
  color: #be185d;
}

.exam-action-row {
  padding: 10px 14px 18px;
}

.view-answer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #3b82f6;
  color: #ffffff;
  padding: 9px 18px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.view-answer-btn:hover {
  background: #2563eb;
}

@media (max-width: 1100px) {
  .exam-card-grid {
    grid-template-columns: 1fr;
  }

  .exam-result-card {
    max-width: 560px;
  }
}

@media (max-width: 640px) {
  .dashboard-shell {
    padding: 12px 10px 80px;
  }

  .result-panel-body {
    padding: 12px;
  }

  .exam-card-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .exam-info-row {
    flex-direction: column;
    gap: 6px;
  }

  .organizer-box {
    min-width: 0;
  }

  .exam-image-wrap {
    height: 150px;
  }

  .exam-card-top {
    font-size: 16px;
  }
}

/* Dashboard result card refinement */
.exam-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(420px, 520px));
  gap: 22px;
  align-items: start;
}

.exam-result-card {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.exam-card-top {
  background: #2563eb;
  color: #ffffff;
  padding: 11px 18px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.exam-image-wrap {
  position: relative;
  height: 188px;
  background: #e5e7eb;
  overflow: hidden;
}

.exam-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.published-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #fde68a;
  color: #92400e;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  border-bottom-left-radius: 7px;
}

.exam-card-content {
  padding: 0;
  background: #ffffff;
}

.exam-info-row {
  display: grid;
  grid-template-columns: 1fr 1.12fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px 10px;
}

.exam-info-row h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #111827;
  line-height: 1.15;
}

.exam-info-row p {
  margin: 4px 0 0;
  font-size: 14px;
  color: #475569;
  line-height: 1.1;
}

.organizer-box {
  padding-top: 3px;
  text-align: left;
}

.organizer-box small {
  display: block;
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
  line-height: 1;
}

.organizer-box strong {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  color: #1f2937;
  font-weight: 800;
  line-height: 1.15;
}

.thin-divider {
  height: 1px;
  margin: 0;
  background: #e5e7eb;
}

.exam-time-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  padding: 12px 14px 10px;
}

.exam-time-row div {
  text-align: left;
}

.exam-time-row div:nth-child(2) {
  text-align: center;
}

.exam-time-row div:nth-child(3) {
  text-align: right;
}

.exam-time-row small {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}

.exam-time-row strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}

.exam-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 2px 14px 12px;
}

.stat-box {
  min-height: 42px;
  padding: 8px 8px;
  border-radius: 0;
  text-align: center;
  box-sizing: border-box;
}

.stat-box small {
  display: block;
  font-size: 11px;
  line-height: 1.1;
  font-weight: 800;
}

.stat-box strong {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
}

.exam-action-row {
  padding: 16px 14px 18px;
  background: #ffffff;
}

.view-answer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  height: 38px;
  background: #3b82f6;
  color: #ffffff;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 5px 12px rgba(59, 130, 246, 0.22);
}

.view-answer-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

@media (max-width: 1150px) {
  .exam-card-grid {
    grid-template-columns: 1fr;
  }

  .exam-result-card {
    max-width: 540px;
  }
}

@media (max-width: 600px) {
  .exam-info-row {
    grid-template-columns: 1fr;
  }

  .exam-time-row {
    gap: 4px;
  }

  .exam-stat-row {
    gap: 8px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .exam-image-wrap {
    height: 150px;
  }
}

.disabled-btn {
  opacity: 0.55;
  cursor: not-allowed;
  background: #94a3b8 !important;
  box-shadow: none !important;
}

.disabled-btn:hover {
  transform: none !important;
}

/* Better response page design */
.response-page {
  width: 100%;
  padding: 0 8px 80px;
  box-sizing: border-box;
}

.response-topbar {
  background: #3b82f6;
  color: #ffffff;
  min-height: 54px;
  padding: 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 24px;
  font-weight: 700;
  margin: 0 -8px 18px;
}

.response-close {
  color: #ffffff;
  text-decoration: none;
  font-size: 34px;
  line-height: 1;
  font-weight: 400;
}

.response-section {
  background: #ffffff;
  border-radius: 6px;
  margin-bottom: 18px;
  border: 1px solid #d8dee8;
  overflow: hidden;
}

.section-strip {
  height: 38px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
}

.pink-strip {
  background: #ec63ad;
}

.amber-strip {
  background: #fbbf24;
}

.basic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 80px;
  padding: 16px 12px 22px;
}

.basic-grid small,
.paper-grid small {
  display: block;
  color: #111827;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
}

.basic-grid strong,
.paper-grid strong {
  display: block;
  color: #111827;
  font-size: 20px;
  font-weight: 500;
}

.paper-box {
  padding: 10px 12px 18px;
}

.paper-box h3,
.answers-heading {
  color: #6b7280;
  font-size: 20px;
  margin: 0 0 14px;
  font-weight: 800;
}

.paper-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
}

.response-question-card {
  background: #ffffff;
  border: 1px solid #d8dee8;
  border-radius: 16px;
  margin-bottom: 18px;
  overflow: hidden;
}

.question-card-head {
  min-height: 66px;
  padding: 18px 16px 8px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.question-number {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, #6366f1, #9333ea);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.question-score-badges {
  display: flex;
  gap: 12px;
}

.score-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 3px;
  padding: 0 12px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.score-badge.allotted {
  background: #d97706;
}

.score-badge.negative {
  background: #ef4444;
}

.obtained-line {
  padding: 0 16px 18px;
}

.obtained-line span {
  display: inline-flex;
  background: #22c55e;
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 800;
}

.question-body {
  border-top: 1px solid #eef2f7;
  padding: 18px 24px;
}

.question-text-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.question-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #eef2ff;
  color: #7c3aed;
  border: 2px solid #7c3aed;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 12px;
  flex-shrink: 0;
}

.question-text-row p {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #111827;
  line-height: 1.5;
}

.question-image-box {
  margin-bottom: 16px;
}

.question-image-box img,
.option-image img {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.answer-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 16px;
}

.answer-option {
  position: relative;
  min-height: 48px;
  padding: 13px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #dfe5ee;
  box-sizing: border-box;
  color: #1f2937;
  transition: 0.15s ease;
}

.answer-option.correct-option {
  background: #d9fbe8;
  border-color: #86efac;
}

.answer-option.selected-option {
  border: 2px solid #2563eb;
}

.answer-option.selected-option.correct-option {
  background: #d9fbe8;
  border: 2px solid #2563eb;
}

.option-content {
  padding-right: 90px;
  font-size: 14px;
  line-height: 1.4;
}

.option-content strong {
  font-weight: 900;
  margin-right: 4px;
  color: #000000;
}

.option-badges {
  position: absolute;
  right: 10px;
  bottom: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mini-badge {
  background: #020617;
  color: #ffffff;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.answer-summary-box {
  background: #fbfcff;
  border-radius: 12px;
  margin-top: 18px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.answer-summary-box strong {
  font-size: 13px;
  color: #2563eb;
  margin-left: 8px;
}

.answer-summary-box p {
  display: inline-block;
  margin: 10px 0 0;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #dfe5ee;
  border-radius: 10px;
  font-size: 14px;
}

.dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 50%;
}

.blue-dot {
  background: #2563eb;
}

.green-dot {
  background: #16a34a;
}

.objection-panel {
  border-top: 1px solid #e5e7eb;
  padding: 12px 18px 18px;
}

.objection-panel summary {
  cursor: pointer;
  font-size: 16px;
  color: #111827;
}

.objection-panel textarea {
  margin-top: 12px;
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 12px;
  resize: vertical;
  box-sizing: border-box;
}

.objection-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}

.objection-actions button {
  background: #15803d;
  color: #ffffff;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 800;
  cursor: pointer;
}

.existing-objection {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  padding: 12px;
  border-radius: 10px;
  margin-top: 12px;
}

@media (max-width: 900px) {
  .basic-grid,
  .paper-grid,
  .answer-options-grid,
  .answer-summary-box {
    grid-template-columns: 1fr;
  }

  .question-card-head {
    flex-direction: column;
    gap: 12px;
  }

  .question-score-badges {
    flex-wrap: wrap;
  }

  .response-topbar {
    font-size: 18px;
    padding: 0 18px;
  }
}

.page-loader {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
}

.page-loader.active {
  display: flex;
}

.loader-card {
  width: 260px;
  min-height: 170px;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.loader-spinner {
  width: 54px;
  height: 54px;
  border: 5px solid #dcfce7;
  border-top-color: #15803d;
  border-radius: 50%;
  animation: loaderSpin 0.85s linear infinite;
}

.loader-title {
  margin-top: 18px;
  font-size: 17px;
  font-weight: 800;
  color: #111827;
}

.loader-subtitle {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

@keyframes loaderSpin {
  to {
    transform: rotate(360deg);
  }
}

.history-page {
  padding: 20px 18px 80px;
}

.history-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.history-header {
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-header h2 {
  margin: 0;
  color: #111827;
  font-size: 22px;
}

.history-header a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 700;
}

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

.history-table {
  width: 100%;
  border-collapse: collapse;
}

.history-table th {
  background: #f1f5f9;
  color: #334155;
  font-size: 13px;
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.history-table td {
  padding: 12px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: top;
  font-size: 14px;
}

.history-status {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-accepted {
  background: #dcfce7;
  color: #166534;
}

.status-rejected {
  background: #fee2e2;
  color: #991b1b;
}

.history-empty {
  text-align: center;
  color: #64748b;
  font-weight: 700;
}

/* Final dashboard card polish */
.exam-result-card {
  max-width: 560px;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dfe5ee;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.exam-result-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
}

.exam-card-top {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.2px;
}

.exam-image-wrap {
  height: 205px;
}

.exam-image-wrap img {
  transition: transform 0.25s ease;
}

.exam-result-card:hover .exam-image-wrap img {
  transform: scale(1.025);
}

.published-badge {
  top: 0;
  right: 0;
  padding: 9px 13px;
  background: #fde68a;
  color: #92400e;
  font-size: 12px;
  font-weight: 900;
  border-bottom-left-radius: 8px;
}

.exam-info-row {
  padding: 15px 16px 12px;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
}

.exam-info-row h3 {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 3px;
}

.exam-info-row p {
  font-size: 13px;
  color: #475569;
  font-weight: 500;
}

.organizer-box {
  padding-left: 14px;
  border-left: 1px solid #e5e7eb;
}

.organizer-box small {
  font-size: 11px;
  color: #64748b;
}

.organizer-box strong {
  font-size: 13px;
  color: #1f2937;
}

.exam-time-row {
  padding: 13px 16px 12px;
  background: #ffffff;
}

.exam-time-row small {
  font-size: 10px;
  color: #111827;
  font-weight: 900;
}

.exam-time-row strong {
  font-size: 14px;
  color: #020617;
}

.exam-stat-row {
  padding: 0 16px 15px;
  gap: 20px;
  align-items: stretch;
}

.stat-box {
  min-height: 58px;
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.stat-box small {
  font-size: 11px;
  line-height: 1.15;
}

.stat-box strong {
  font-size: 12px;
  margin-top: 4px;
}

.exam-action-row {
  padding: 16px 16px 18px;
  border-top: 1px solid #e5e7eb;
}

.view-answer-btn {
  min-width: 132px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.28);
  font-size: 14px;
  font-weight: 900;
}

.view-answer-btn:hover {
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  .exam-result-card {
    max-width: 100%;
  }

  .exam-image-wrap {
    height: 165px;
  }

  .exam-info-row {
    grid-template-columns: 1fr;
  }

  .organizer-box {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid #e5e7eb;
    padding-top: 10px;
  }

  .exam-stat-row {
    gap: 8px;
  }
}
.remarks-counter {
  margin-top: 6px;
  text-align: right;
  font-size: 12px;
  color: #64748b;
  font-weight: 700;
}

.remarks-count {
  color: #2563eb;
}
