* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f5f7fb;
  color: #172033;
  padding-bottom: 76px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

h1, h2, h3, h4 {
  margin-top: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.card {
  background: #ffffff;
  padding: 22px;
  border-radius: 14px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  margin-bottom: 20px;
}

input, select, button {
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  font-size: 16px;
  border-radius: 8px;
}

input, select {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #172033;
}

button {
  cursor: pointer;
  border: 0;
  background: #2563eb;
  color: white;
  font-weight: bold;
}

button:hover { background: #1d4ed8; }
button.secondary { background: #64748b; }
button.secondary:hover { background: #475569; }
button.danger { background: #dc2626; }
button.danger:hover { background: #b91c1c; }

.hidden {
  display: none !important;
}

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

.testItem, .sharedTestItem {
  border: 1px solid #dbe3ef;
  padding: 14px;
  border-radius: 10px;
  margin: 12px 0;
  background: #ffffff;
}
.sharedTestsScrollBox {
  max-height: 65vh;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px;
  background: #f8fafc;
  margin-top: 10px;
}

.sharedTestsScrollBox::-webkit-scrollbar {
  width: 8px;
}

.sharedTestsScrollBox::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 10px;
}

.sharedTestsScrollBox::-webkit-scrollbar-track {
  background: #e2e8f0;
}
table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: white;
  margin-top: 12px;
}

th, td {
  border: 1px solid #dbe3ef;
  padding: 9px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #eaf1ff;
}

.studentContainer {
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.studentContainer.answersHidden {
  grid-template-columns: minmax(0, 1fr) 0;
}

.questionCard {
  min-width: 0;
}

.studentInfoGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

#questionPaper {
  width: 100%;
}

/* One-page visible viewer */
.pdfScrollBox,
.imageScrollBox {
  width: 100%;
  height: 85vh;
  max-height: 900px;
  min-height: 520px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #e5e7eb;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px;
  scroll-behavior: smooth;
}

.mobilePdfNotice {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #7c2d12;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  line-height: 1.5;
}

.openPdfBtn {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 14px;
  background: #2563eb;
  color: #ffffff !important;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
}

#pdfPages {
  width: 100%;
}

.pdfPageWrap {
  width: 100%;
  background: #ffffff;
  margin-bottom: 18px;
  padding: 8px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
}

.pdfPageTitle {
  font-weight: bold;
  margin-bottom: 8px;
  color: #334155;
}

.pdfCanvas,
.paperImage {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  background: white;
}

.answerSidebar {
  position: sticky;
  top: 15px;
  height: calc(100vh - 30px);
  overflow-y: auto;
  background: white;
  padding: 16px;
  border-radius: 14px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.sidebarHidden {
  width: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

#toggleSidebarBtn {
  position: fixed !important;
  z-index: 2147483647 !important;
  min-width: 110px;
  width: auto !important;
}

#answerGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.answerItem {
  display: grid;
  grid-template-columns: 45px 1fr;
  gap: 8px;
  align-items: center;
  background: #f8fafc;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #dbe3ef;
}

/* #submitBtn {
  position: sticky;
  bottom: 0;
  z-index: 5;
} */
#submitBtn {
  position: fixed !important;
  right: 15px;
  bottom: 80px;
  z-index: 2147483647 !important;

  width: auto !important;
  min-width: 130px;

  padding: 12px 18px;
  border-radius: 999px;

  background: #16a34a;
  color: white;

  font-weight: bold;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}
@media (max-width: 600px) {
  #submitBtn {
    right: 12px;
    bottom: 90px;
    font-size: 14px;
    padding: 10px 14px;
  }
}
#resultBox {
  margin-top: 12px;
  padding: 8px;
  background: #f8fafc;
  border-radius: 8px;
}

@media (max-width: 850px) {
  .container {
    padding: 12px;
  }

  .studentContainer,
  .studentContainer.answersHidden {
    display: block;
  }

  .pdfScrollBox,
  .imageScrollBox {
    height: 72vh;
    min-height: 520px;
  }

  .answerSidebar {
    position: fixed;
    right: 8px;
    top: 55px;
    width: 310px;
    max-width: calc(100vw - 16px);
    height: calc(100dvh - 130px);
    z-index: 9998;
  }

  .sidebarHidden {
    transform: translateX(120%);
  }
}

@media (max-width: 480px) {
  .card {
    padding: 14px;
  }

  input, select, button {
    font-size: 15px;
    padding: 10px;
  }

  .pdfScrollBox,
  .imageScrollBox {
    height: 68vh;
    min-height: 420px;
  }

  .answerSidebar {
    width: calc(100vw - 10px);
    right: 5px;
  }
}
/* Add this at the end of public/style.css */

.testActionGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.inlineReportBox {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #f8fafc;
  overflow-x: auto;
}

.reportHeader {
  margin-bottom: 10px;
}

.reportHeader h4 {
  margin-bottom: 4px;
}

.reportHeader p {
  margin-top: 0;
}

.reportTableWrap {
  overflow-x: auto;
}

.reportTable {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: white;
}

.reportTable th,
.reportTable td {
  border: 1px solid #dbe3ef;
  padding: 8px;
  vertical-align: top;
}

.reportTable th {
  background: #eaf1ff;
}
#dashboard .row button,
.logoutBtn {
  width: auto !important;
  min-width: 120px;
  padding: 10px 18px;
  margin: 0;
  flex: 0 0 auto;
}
.copiedBadge {
  display: inline-block !important;
  margin-left: 8px !important;
  padding: 4px 10px !important;
  background: #dcfce7 !important;
  color: #166534 !important;
  border: 1px solid #86efac !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: bold !important;
  vertical-align: middle;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.changePasswordToggleBtn,
.logoutBtn {
  width: auto !important;
  min-width: 140px;
  max-width: fit-content;
  padding: 10px 18px;
  margin: 0;
  display: inline-block;
  flex: 0 0 auto;
}
/* Add this at the end of public/style.css */

.dashboardTopRow {
  align-items: center;
}

.topButtonGroup {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.logoutBtn,
.changePasswordToggleBtn {
  width: auto !important;
  min-width: 130px;
  max-width: fit-content;
  padding: 10px 18px;
  margin: 0;
  display: inline-block;
  flex: 0 0 auto;
}

.changePasswordBox {
  margin: 12px 0;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
}

.orDivider {
  text-align: center;
  font-weight: bold;
  color: #475569;
  margin: 14px 0;
  position: relative;
}

.orDivider::before,
.orDivider::after {
  content: "";
  display: inline-block;
  width: 80px;
  height: 1px;
  background: #cbd5e1;
  vertical-align: middle;
  margin: 0 10px;
}

.clipboardQuestionBox {
  margin: 12px 0;
  padding: 16px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 12px;
}

.pasteArea {
  min-height: 110px;
  border: 2px dashed #fb923c;
  border-radius: 12px;
  background: #ffffff;
  color: #7c2d12;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  text-align: center;
  padding: 16px;
  margin: 10px 0;
  outline: none;
}

.pasteArea:focus {
  border-color: #ea580c;
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.25);
}

.questionCanvas {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid #fb923c;
  border-radius: 10px;
  background: white;
  margin-top: 12px;
}

.canvasActionGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.testActionGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.inlineReportBox {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #f8fafc;
  overflow-x: auto;
}

.reportTable {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: white;
}

.reportTable th,
.reportTable td {
  border: 1px solid #dbe3ef;
  padding: 8px;
  vertical-align: top;
}

.reportTable th {
  background: #eaf1ff;
}

.copiedBadge {
  display: inline-block !important;
  margin-left: 8px !important;
  padding: 4px 10px !important;
  background: #dcfce7 !important;
  color: #166534 !important;
  border: 1px solid #86efac !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: bold !important;
  vertical-align: middle;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
/* Add this at the end of public/style.css */

.pastedPreview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.pastedThumb {
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.pastedThumbTitle {
  font-weight: bold;
  font-size: 13px;
  color: #7c2d12;
  margin-bottom: 6px;
}

.pastedThumb img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: #f8fafc;
  border-radius: 6px;
}

.canvasActionGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.passwordBox {
  position: relative;
  width: 100%;
}

.passwordBox input {
  width: 100%;
  padding-right: 50px;
  box-sizing: border-box;
}

.eyeBtn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 20px;
  user-select: none;
  color: #64748b;
}

.eyeBtn:hover {
  color: #2563eb;
}
#rotateWarning {
  display: none;
  background: #fff3cd;
  color: #7a4b00;
  padding: 12px;
  text-align: center;
  font-weight: bold;
  position: sticky;
  top: 0;
  z-index: 999999;
}

@media screen and (max-width: 850px) and (orientation: portrait) {
  #rotateWarning {
    display: block;
  }

  .studentContainer {
    display: block;
  }
}

@media screen and (orientation: landscape) {
  .studentContainer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
  }
}
.smallBtn {
  padding: 8px 14px;
  border: none;
  background: #2563eb;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 8px;
  margin-bottom: 8px;
  font-size: 14px;
}

.smallBtn:hover {
  background: #1d4ed8;
}

.hidden {
  display: none;
}

#subQuestionBox {
  background: #f8fafc;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #dbeafe;
  margin-top: 10px;
}

.helpText {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
}

#questionLabelPreview {
  margin-top: 10px;
  font-weight: bold;
  background: white;
  padding: 8px;
  border-radius: 8px;
}
.notificationCard {
  margin-top: 20px;
}

.notificationArea {
  height: 220px;
  overflow-y: auto;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px;
  outline: none;
}

.notificationArea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.notificationItem {
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-left: 5px solid #2563eb;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
}

.notificationItem a {
  color: #2563eb;
  word-break: break-all;
  font-weight: bold;
}
.countBadge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  margin-top: 8px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  border: 1px solid rgba(255,255,255,0.35);
  transition: transform 0.2s ease;
}

.countBadge:hover {
  transform: scale(1.03);
}

.answerBadge {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
}

.typeBadge {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: white;
}

.countIcon {
  font-size: 18px;
  display: flex;
  align-items: center;
}
.countNumber {
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  margin: 0 2px;
  display: inline-block;
}
.thumbActions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
  justify-content: center;
}

.dangerSmall {
  background: #dc2626;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.dangerSmall:hover {
  background: #b91c1c;
}
.drawEditor {
  position: fixed;
  inset: 20px;
  background: white;
  z-index: 99999;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  overflow: auto;
}

#drawCanvas {
  max-width: 100%;
  border: 2px solid #333;
  touch-action: none;
}

.drawTools {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.answerHotspot {
  position: absolute;
  z-index: 50;
  border: 2px solid transparent;
  background: rgba(37, 99, 235, 0.04);
  cursor: pointer;
}

.answerHotspot:hover {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.18);
}

.selectedHotspot {
  background: rgba(22, 163, 74, 0.85) !important;
  border-color: #15803d !important;
  color: white !important;
}
.mapPageWrap {
  position: relative;
  margin-bottom: 30px;
}

.mapCanvas {
  display: block;
  border: 1px solid #ccc;
}

.mapOverlay {
  position: absolute;
  left: 0;
  top: 60px;
  z-index: 20;
}
/* .mapOverlay {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 20;
} */
.dragSelection {
  position: absolute;
  border: 2px dashed red;
  background: rgba(255,0,0,0.15);
}

.savedSelection {
  position: absolute;
  border: 2px solid green;
  background: rgba(0,255,0,0.2);
  font-size: 12px;
  font-weight: bold;
  color: black;
}
.mapScrollBox {
  height: 75vh;
  overflow-y: auto;
  overflow-x: auto;
  border: 2px solid #d1d5db;
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
}

.mapPageWrap {
  position: relative;
  margin: 0 auto 25px auto;
  width: fit-content;
  background: white;
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

.mapPageTitle {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #1e40af;
  color: white;
  font-weight: bold;
  padding: 8px 12px;
  border-radius: 6px 6px 0 0;
}

.mapCanvas {
  display: block;
}

.mapOverlay {
  position: absolute;
  left: 0;
  top: 34px;
  z-index: 20;
}


.answerHotspot {
  position: absolute;
  z-index: 100;
  cursor: pointer;
  border: 3px dashed #2563eb;
  background: rgba(37, 99, 235, 0.10);
  border-radius: 12px;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: all 0.2s ease;
}

.answerHotspot:hover {
  background: rgba(37, 99, 235, 0.22);
  border-color: #1d4ed8;
  transform: scale(1.03);
}

.answerBubble {
  width: 42px;
  height: 42px;
  border-radius: 50%;

  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 22px;
  font-weight: bold;

  box-shadow: 0 4px 12px rgba(0,0,0,0.25);

  animation: pulseAnswer 1.8s infinite;
}

.selectedHotspot {
  background: rgba(22, 163, 74, 0.18) !important;
  border-color: #16a34a !important;
}

.selectedHotspot .answerBubble {
  background: linear-gradient(135deg, #16a34a, #15803d);
}

@keyframes pulseAnswer {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.5);
  }

  70% {
    transform: scale(1.08);
    box-shadow: 0 0 0 12px rgba(37, 99, 235, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}
.answerHotspot {
  position: absolute;
  z-index: 100;
  cursor: pointer;

  border: 2px dashed rgba(37, 99, 235, 0.28);
  background: rgba(37, 99, 235, 0.04);
  border-radius: 10px;

  transition: all 0.2s ease;
}

.answerHotspot:hover {
  background: rgba(37, 99, 235, 0.10);
  border-color: rgba(37, 99, 235, 0.45);
}

.answerTag {
  position: absolute;
  left: -14px;
  top: 50%;
  transform: translateY(-50%);

  width: 30px;
  height: 30px;
  border-radius: 50%;

  background: rgba(37, 99, 235, 0.55);
  color: white;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 16px;
  font-weight: bold;

  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
/* .answerTag {
  opacity: 0;
}

.answerHotspot:hover .answerTag {
  opacity: 1;
} */
.selectedHotspot {
  border: 2px solid rgba(22, 163, 74, 0.7) !important;
  background: rgba(22, 163, 74, 0.08) !important;
}

.selectedHotspot .answerTag {
  background: rgba(22, 163, 74, 0.85) !important;
}

.savedSelection {
  position: absolute;
  border: 2px solid green;
  background: rgba(0,255,0,0.18);
  font-size: 12px;
  font-weight: bold;
  color: black;
}

.deleteMapBtn {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: #dc2626;
  color: white;
  font-weight: bold;
  cursor: pointer;
  line-height: 20px;
}

.deleteMapBtn:hover {
  background: #991b1b;
}
.savedSelection {
  position: absolute;
  border: 2px solid green;
  background: rgba(0, 255, 0, 0.18);
  font-size: 12px;
  font-weight: bold;
  color: black;
  z-index: 100;
  pointer-events: auto;
}

.deleteMapBtn {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: #dc2626;
  color: white;
  font-weight: bold;
  cursor: pointer;
  line-height: 22px;
  z-index: 9999;
  pointer-events: auto;
}

.deleteMapBtn:hover {
  background: #991b1b;
}
.successText {
  color: #15803d;
  font-weight: bold;
}

.dangerText {
  color: #dc2626;
  font-weight: bold;
}

.buttonLike {
  display: inline-block;
  padding: 9px 14px;
  border-radius: 8px;
  background: #2563eb;
  color: white;
  text-decoration: none;
  font-weight: bold;
}
.schoolSuggestions {
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  margin-top: 4px;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.schoolSuggestionItem {
  padding: 10px;
  cursor: pointer;
  border-bottom: 1px solid #e5e7eb;
}

.schoolSuggestionItem:hover {
  background: #eff6ff;
}

/* .supportChatBox {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 330px;
  z-index: 9999;
  font-family: Arial, sans-serif;
} */
.supportChatBox {
  position: fixed !important;
  right: 8px !important;
  bottom: 20px !important;
  width: 60px;
  height: 60px;
  z-index: 99999;
}

.chatBubbleIcon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #2563eb;
  color: white;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}
.chatBody {
  position: absolute;
  bottom: 75px;
  right: 0;
  width: 360px;
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}
.chatBody input,
.chatInputRow input {
  width: 100%;
  padding: 9px;
  margin-bottom: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.chatMessages {
  height: 220px;
  overflow-y: auto;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  padding: 8px;
  margin: 10px 0;
}

.chatMsg {
  background: white;
  margin-bottom: 8px;
  padding: 8px;
  border-radius: 8px;
  border-left: 4px solid #2563eb;
}

.chatInputRow {
  display: flex;
  gap: 6px;
}

.chatInputRow input {
  flex: 1;
}

.chatInputRow button {
  width: 70px;
}

.hidden {
  display: none;
}
#adminSupportChatBox {
  width: 380px;
}

#adminChatList {
  max-height: 140px;
  overflow-y: auto;
  margin-bottom: 8px;
}

#adminChatList .testItem {
  padding: 8px;
  margin-bottom: 6px;
}
.pasteToast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999999;

  background: #16a34a;
  color: white;
  padding: 12px 18px;
  border-radius: 10px;

  font-weight: bold;
  font-size: 15px;

  box-shadow: 0 8px 20px rgba(0,0,0,0.2);

  animation: toastFadeIn 0.2s ease;
}

@keyframes toastFadeIn {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.shareTestBtn {
  background: #16a34a !important;
  border-radius: 999px;
  font-weight: bold;
}

.doubtBtn {
  background: #7c3aed !important;
  border-radius: 999px;
}

.doubtBox,
.doubtPanel {
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  border-radius: 12px;
  padding: 12px;
  margin: 12px 0;
}

.doubtBox textarea {
  width: 100%;
  min-height: 90px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #c4b5fd;
}

.doubtItem {
  background: white;
  border-left: 5px solid #7c3aed;
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 8px;
}

.replyBox {
  background: #ecfdf5;
  border-left: 5px solid #16a34a;
  padding: 10px;
  margin-top: 8px;
  border-radius: 8px;
}

.doubtItem textarea {
  width: 100%;
  min-height: 70px;
  margin-top: 8px;
  padding: 10px;
}
#testDoubtBox {
  max-height: 320px;
  overflow-y: auto;
  padding-right: 8px;
}

#testDoubtBox::-webkit-scrollbar {
  width: 8px;
}

#testDoubtBox::-webkit-scrollbar-thumb {
  background: #a78bfa;
  border-radius: 10px;
}

#testDoubtBox::-webkit-scrollbar-track {
  background: #ede9fe;
}

.teacherMiniCanvasBox {
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  padding: 8px;
  margin-top: 8px;
}

.teacherReplyCanvas {
  width: 100%;
  max-width: 320px;
  height: 180px;
  background: white;
  border: 1px solid #94a3b8;
  border-radius: 8px;
  touch-action: none;
}

.canvasToolRow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 6px;
}

.canvasToolRow button {
  padding: 6px !important;
  font-size: 12px;
}

.studentReplyDrawing {
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  padding: 8px;
  margin-top: 8px;
}

.studentReplyDrawing img {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
}
.questionPaperTitleLink {
  color: #2563eb;
  cursor: pointer;
  text-decoration: underline;
}

.questionPaperTitleLink:hover {
  color: #1d4ed8;
}
.questionPaperPopup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.questionPaperPopupContent {
  width: 92vw;
  height: 90vh;
  background: white;
  border-radius: 14px;
  padding: 14px;
  position: relative;
  overflow: hidden;
}

.popupCloseBtn {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 36px !important;
  height: 36px;
  border-radius: 50%;
  background: #dc2626 !important;
  color: white;
  font-size: 22px;
  padding: 0 !important;
  z-index: 10;
}

.questionPaperIframe {
  width: 100%;
  height: calc(90vh - 70px);
  border: 1px solid #cbd5e1;
  border-radius: 10px;
}

.questionPaperPopupImage {
  width: 100%;
  height: calc(90vh - 70px);
  object-fit: contain;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
}
.clearStudentInfoBtn {
  background: #64748b !important;
}




.pdfPageWrap {
  position: relative;
  display: inline-block;
}

.hotspotLayer {
  position: absolute;
  left: 0;
  top: 28px;   
  z-index: 9999;
  pointer-events: auto;
}

.answerHotspot {
  position: absolute;
  border: 2px solid #2563eb;
  background: rgba(37, 99, 235, 0.18);
  cursor: pointer;
  z-index: 10000;
}



.pdfPageWrap {
  position: relative !important;
  display: block !important;
  padding: 8px !important;
}

.pdfCanvasBox {
  position: relative !important;
  width: 100% !important;
}

.pdfCanvas {
  width: 100% !important;
  height: auto !important;
  display: block !important;
}

.hotspotLayer {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 9999 !important;
  pointer-events: auto !important;
}

/* .answerHotspot {
  position: absolute !important;
  z-index: 10000 !important;
  pointer-events: auto !important;
} */
.answerHotspot {
  position: absolute;
  z-index: 10000;
  cursor: pointer;

  border: 1px dashed rgba(37, 99, 235, 0.08);
  background: rgba(37, 99, 235, 0.015);

  transition: all 0.2s ease;
}
.answerHotspot:hover {
  border: 2px solid rgba(37, 99, 235, 0.25);
  background: rgba(37, 99, 235, 0.06);
}
.testTitleRow {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}

.testTitle {
  font-weight: bold;
  font-size: 16px;
  word-break: break-word;
}

.editTitleBtn {
  width: 22px;
  height: 22px;

  border: none;
  background: transparent;

  cursor: pointer;

  font-size: 13px;
  padding: 0;

  opacity: 0.7;

  display: flex;
  align-items: center;
  justify-content: center;
}

.editTitleBtn:hover {
  opacity: 1;
  transform: scale(1.15);
}
.certificateBtn {
  background: #9333ea !important;
  border-radius: 999px;
  font-weight: bold;
}
.testTitleBuilder {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}
.pdfCanvas {
  width: 100%;
  height: auto;
  display: block;
}
.viewExplanationBtn{
  display:inline-block;
  margin-top:12px;
  padding:10px 16px;
  background:#2563eb;
  color:#fff;
  text-decoration:none;
  border-radius:8px;
}

.studentExplanationImage{
  max-width:100%;
  margin-top:10px;
  border:1px solid #ccc;
}
.explanationSection {
  margin-top: 15px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
}

.studentExplanationImage {
  width: 100%;
  max-width: 900px;
  margin: 10px 0;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.viewExplanationBtn {
  display: inline-block;
  padding: 10px 14px;
  background: #2563eb;
  color: white;
  border-radius: 8px;
  text-decoration: none;
}
.imgModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.9);
  z-index: 99999;

  display: flex;
  justify-content: center;
  align-items: center;
}

.modalImg {
  max-width: 98vw;
  max-height: 95vh;
}

.closeImgModal {
  position: absolute;
  top: 15px;
  right: 20px;
  color: white;
  font-size: 30px;
  cursor: pointer;
}
.replyFileHint {
  font-size: 12px;
  color: #b45309;
  margin-top: 4px;
  font-style: italic;
}
.adminDangerActions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.danger {
  background: #dc2626;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.danger:hover {
  background: #b91c1c;
}
#testList {
  max-height: 600px;
  overflow-y: auto;
  padding-right: 8px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

/* Create MCQ Test area */
.createTestSection {
  background: #eef6ff;
  border: 2px solid #2563eb;
  border-radius: 12px;
  padding: 15px;
  margin: 15px 0;
}

/* Shared Tests area */
.sharedTestSection {
  background: #f0fdf4;
  border: 2px solid #16a34a;
  border-radius: 12px;
  padding: 15px;
  margin: 15px 0;
}

/* Your Tests area */
.yourTestSection {
  background: #fff7ed;
  border: 2px solid #f97316;
  border-radius: 12px;
  padding: 15px;
  margin: 15px 0;
}