:root {
  --bg: #eaf1ff;
  --card: rgba(255, 255, 255, 0.86);
  --line: #d7e1f5;
  --text: #101c37;
  --muted: #61708d;
  --brand: #11a592;
  --accent: #2f7ef1;
  --violet: #7b57f9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(99, 210, 193, 0.27) 0%, transparent 28%),
    radial-gradient(circle at 86% 6%, rgba(96, 134, 255, 0.2) 0%, transparent 29%),
    linear-gradient(180deg, #edf3ff 0%, #e7eefb 100%);
}

.top-strip {
  height: 8px;
  background: linear-gradient(90deg, var(--brand), var(--accent), var(--violet));
}

.wrap {
  width: min(1120px, 93vw);
  margin: 24px auto 42px;
}

.header {
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  padding: 18px;
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 30px rgba(37, 61, 111, 0.11);
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  font-size: 1.03rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(95deg, #2348e6, #6c4cff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-head {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.section-head h2 {
  font-size: 1.35rem;
}

.section-logo {
  font-size: 0.79rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #375286;
  border: 1px solid #c7d7f2;
  background: linear-gradient(140deg, #f7f9ff, #eff5ff);
  border-radius: 999px;
  padding: 4px 9px;
}

.panel-subtext {
  margin: 0 0 10px;
  color: #60739b;
  font-size: 0.85rem;
}

.format-chips {
  margin: 0 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.format-chips span {
  border-radius: 999px;
  border: 1px solid #c6d7f3;
  background: linear-gradient(140deg, #f6faff, #eff5ff);
  color: #486192;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 10px;
}

.header h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.header p {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 90ch;
  font-size: 0.92rem;
}

.stepper {
  margin-top: 14px;
  border-radius: 16px;
  background: linear-gradient(95deg, #2d72e9, #4964f7, #6f57f5);
  padding: 14px;
  box-shadow: 0 12px 26px rgba(59, 90, 200, 0.28);
}

.stepper-title {
  margin: 0 0 10px;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.92);
}

.stepper-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.step-box {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  padding: 10px;
  color: rgba(255, 255, 255, 0.76);
}

.step-box p {
  margin: 0;
}

.step-box .step-index {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: inline-grid;
  place-items: center;
  font-size: 0.72rem;
  margin-bottom: 6px;
}

.step-box .step-name {
  font-size: 0.84rem;
  font-weight: 700;
}

.step-box .step-note {
  margin-top: 2px;
  font-size: 0.72rem;
}

.step-box.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.26);
}

.layout {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 18px;
}

.card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(247, 251, 255, 0.84));
  border: 1px solid rgba(215, 225, 245, 0.95);
  border-radius: 20px;
  box-shadow:
    0 18px 36px rgba(19, 39, 84, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  padding: 22px;
  backdrop-filter: blur(10px);
}

.upload-panel {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.upload-panel::before {
  content: "";
  position: absolute;
  right: -90px;
  top: -90px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(83, 122, 255, 0.15), transparent 68%);
  pointer-events: none;
}

.upload-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, rgba(80, 147, 250, 0.45), rgba(35, 189, 167, 0.3), transparent 40%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.result-panel {
  min-height: 520px;
  position: relative;
  padding-top: 22px;
}

.card h2 {
  margin: 0 0 14px;
  font-size: 1.16rem;
  letter-spacing: 0.01em;
}

.field {
  margin-bottom: 15px;
  padding: 12px;
  border: 1px solid #d7e3f6;
  border-radius: 14px;
  background: linear-gradient(140deg, rgba(253, 255, 255, 0.94), rgba(246, 250, 255, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.field::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #3e82f1, #31b9a3);
  opacity: 0.65;
}

.field:hover {
  border-color: #b7cff2;
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 16px rgba(55, 99, 179, 0.08);
}

.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #2f446a;
  letter-spacing: 0.01em;
}

.field-status {
  margin-left: 6px;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 0.67rem;
  font-weight: 700;
  vertical-align: middle;
}

.field-status.pending {
  background: #f0f4ff;
  color: #536a95;
}

.field-status.uploaded {
  background: #e8fff6;
  color: #0f7b6b;
}

.fake-input,
.fake-file {
  width: 100%;
  min-height: 50px;
  border: 1px solid #bfd2f0;
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 255, 0.95));
  padding: 11px 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #485b7a;
  font-size: 0.9rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.fake-input::before,
.fake-file::before {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 9px;
  border: 1px solid #c6d8f2;
  background: linear-gradient(145deg, #f2f8ff, #ecf3ff);
  flex-shrink: 0;
}

.fake-input::after {
  content: "Aa";
  position: absolute;
}

.fake-file::after {
  content: "PDF";
  position: absolute;
}

.fake-input,
.fake-file {
  position: relative;
}

.fake-input::after,
.fake-file::after {
  left: 21px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #5a73a0;
  pointer-events: none;
}

.fake-input {
  padding-left: 49px;
}

.fake-file {
  padding-left: 49px;
}

.fake-input:hover,
.fake-file:hover {
  border-color: #9cbef2;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 18px rgba(42, 93, 183, 0.08);
  transform: translateY(-1px);
}

.fake-file strong {
  color: #1f3561;
  font-size: 1.01em;
}

.real-input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #c5d5ee;
  border-radius: 10px;
  background: #fcfdff;
  padding: 8px 10px;
  font-size: 0.82rem;
  color: #4a5e7f;
}

.prefix-display {
  width: 100%;
  min-height: 40px;
  border: 1px dashed #bed0ec;
  border-radius: 10px;
  background: #f7faff;
  padding: 9px 10px;
  font-size: 0.82rem;
  color: #5d7296;
  display: flex;
  align-items: center;
}

.real-input:focus {
  outline: none;
  border-color: #90b5ee;
  box-shadow: 0 0 0 3px rgba(84, 144, 242, 0.18);
}

.helper-text {
  margin: 6px 0 0;
  font-size: 0.74rem;
  color: #7787a5;
  line-height: 1.5;
}

.demo-warning {
  color: #b5474e;
  font-weight: 600;
}

.hidden-msg {
  display: none;
}

.upload-row span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.drop-hint {
  margin-left: auto;
  font-size: 0.67rem;
  color: #7990b8;
}

.upload-row {
  min-height: 46px;
  border: 1px dashed #b8cced;
  border-radius: 12px;
  background: linear-gradient(135deg, #fcfdff, #f3f8ff);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: #51627f;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.upload-row.has-file {
  border-color: #9fd9ce;
  background: linear-gradient(135deg, #f4fffc, #edf9ff);
}

.upload-row.is-success::after {
  content: "✓";
  margin-left: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f7a6d;
  background: #dff7ef;
  border: 1px solid #9edcc8;
}

.upload-row.is-dragover {
  border-color: #6ba8f7;
  background: linear-gradient(135deg, #eef5ff, #e7f2ff);
  box-shadow: 0 0 0 3px rgba(93, 151, 240, 0.18);
}

.upload-row:focus-within {
  border-color: #94b9f0;
  box-shadow: 0 0 0 3px rgba(94, 150, 240, 0.16);
}

.hidden-file-input {
  display: none;
}

.choose-btn {
  border: 0;
  border-radius: 999px;
  min-height: 32px;
  padding: 0 16px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(100deg, #11192e, #212f52);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.choose-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 14px rgba(7, 12, 22, 0.28);
}

.upload-row.has-file .choose-btn {
  background: linear-gradient(100deg, #0f8f7d, #2379d9);
}

.expert-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.expert-box {
  border: 1px solid #cdd9ef;
  border-radius: 14px;
  padding: 10px;
  background: linear-gradient(145deg, #ffffff, #f2f8ff);
  transition: border-color 0.2s ease, transform 0.2s ease;
  min-width: 0;
}

.expert-box:hover {
  border-color: #b9cff0;
  transform: translateY(-1px);
}

.expert-box p {
  margin: 0 0 8px;
  font-size: 0.86rem;
  color: #3d547b;
}

.upload-row.compact {
  min-height: 44px;
  justify-content: flex-start;
  min-width: 0;
}

.selected-files-list {
  margin-top: 9px;
  display: grid;
  gap: 8px;
}

.selected-file-item {
  border: 1px solid #c6d8f5;
  border-radius: 10px;
  background: linear-gradient(145deg, #f7fbff, #eef5ff);
  min-height: 36px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.selected-file-name {
  font-size: 0.76rem;
  color: #405576;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.remove-file-btn {
  border: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffeef0;
  color: #c53b49;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.remove-file-btn:hover {
  transform: scale(1.08);
  background: #ffdfe3;
}

.compact-file-name {
  font-size: 0.75rem;
  color: #667b9f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: none;
  width: 100%;
}

.upload-row.compact.is-success {
  justify-content: flex-start;
}

.selected-file-below {
  margin: 8px 0 0;
  font-size: 0.74rem;
  color: #5f7397;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.grade-cta {
  border: 0;
  border-radius: 999px;
  min-height: 42px;
  padding: 0 16px;
  font-size: 0.84rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(98deg, #16af93, #2e83e4 60%, #4d72f3);
  box-shadow: 0 12px 20px rgba(26, 131, 194, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.grade-cta:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(26, 131, 194, 0.32);
}

.grade-cta:not(:disabled) {
  animation: readyPulse 1.8s ease-in-out infinite;
}

.grade-cta.disabled,
.grade-cta:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.file-list {
  margin: 8px 0 0;
  border: 1px solid #d7e4f8;
  border-radius: 12px;
  background: linear-gradient(140deg, rgba(249, 252, 255, 0.95), rgba(244, 249, 255, 0.95));
  padding: 11px 13px;
  font-size: 0.79rem;
  color: #4e6080;
}

.file-list p {
  margin: 5px 0;
}

.btn {
  border: 0;
  min-height: 42px;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 700;
  font-size: 0.8rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
  color: #fff;
  background: linear-gradient(94deg, var(--brand), var(--accent));
  box-shadow: 0 12px 24px rgba(44, 123, 230, 0.31);
  letter-spacing: 0.01em;
}

.btn.primary:hover {
  transform: translateY(-1px);
}

.btn.disabled {
  opacity: 0.56;
}

.status-row {
  margin-top: 10px;
  font-size: 0.78rem;
  color: #586b8f;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-row::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7d8fb3;
}

.result-badge {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.result-badge.idle {
  background: #eef3ff;
  color: #3d5fa2;
}

.result-badge.processing {
  background: #eaf7ff;
  color: #1b6bc8;
  box-shadow: inset 0 0 0 1px rgba(27, 107, 200, 0.18);
}

.result-badge.done {
  background: #e9fff8;
  color: #0e7d6e;
}

.result-summary-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 10px;
  border: 1px solid #d5e0f5;
  border-radius: 12px;
  background: linear-gradient(135deg, #f7fbff, #eef4ff);
  padding: 10px;
}

.result-summary-card.hidden {
  display: none;
}

.summary-label {
  margin: 0;
  font-size: 0.72rem;
  color: #5e7090;
}

.summary-value {
  margin: 2px 0 0;
  font-size: 1rem;
  font-weight: 800;
  color: #21365a;
}

.progress-rail {
  position: static;
  margin: 0 0 10px auto;
  display: grid;
  gap: 6px;
  width: fit-content;
}

.rail-item {
  margin: 0;
  font-size: 0.67rem;
  border-radius: 999px;
  padding: 3px 8px;
  border: 1px solid #d3def1;
  color: #617496;
  background: #f6f9ff;
}

.rail-item.active {
  color: #145cc0;
  border-color: #bcd5ff;
  background: #e9f1ff;
}

.result-skeleton {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.result-skeleton span {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e5edf9, #f1f6ff, #e5edf9);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite linear;
}

.result-skeleton span:nth-child(2) {
  width: 85%;
}

.result-skeleton span:nth-child(3) {
  width: 70%;
}

.skeleton-note {
  margin: 0;
}

.result-table-head {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 40px;
  gap: 8px;
  border: 1px solid #d8e3f4;
  border-radius: 12px 12px 0 0;
  border-bottom: 0;
  padding: 10px 12px;
  background: #f6f9ff;
}

.result-table-head p {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: #495d80;
}

.progress-wrap {
  margin-top: 12px;
}

.progress-wrap p {
  margin: 0 0 6px;
}

.progress-bar {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: #d8e6fd;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #24a896, #327ff4);
}

.students-accordion {
  display: grid;
  gap: 10px;
}

.student-accordion {
  border: 1px solid #d8e3f4;
  background: #fbfdff;
  border-radius: 13px;
  overflow: hidden;
}

.student-accordion:first-child {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.student-accordion summary {
  list-style: none;
  padding: 12px;
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 40px;
  gap: 8px;
  align-items: center;
  cursor: pointer;
}

.student-accordion summary::-webkit-details-marker {
  display: none;
}

.student-accordion small {
  color: #6e7f9b;
  display: block;
  margin-top: 3px;
}

.student-meta {
  display: grid;
  gap: 2px;
}

.student-meta strong {
  font-size: 1rem;
  font-weight: 600;
  color: #253656;
}

.chevron {
  font-size: 0.72rem;
  color: #556786;
}

.question-count {
  font-size: 0.93rem;
  color: #26385c;
}

.student-body {
  border-top: 1px solid #e1e8f6;
  padding: 14px;
  background: #f8fbff;
}

.score-pill {
  border: 1px solid #bae4dc;
  background: #dff3ef;
  border-radius: 999px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #163f4d;
  margin-bottom: 14px;
}

.score-pill span {
  font-weight: 700;
}

.score-pill strong {
  font-size: 1.15rem;
}

.detail-block {
  margin-bottom: 14px;
}

.detail-block:last-child {
  margin-bottom: 0;
}

.detail-block h4 {
  margin: 0 0 6px;
  font-size: 0.98rem;
  color: #243758;
}

.detail-block p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.6;
  color: #3d516f;
}

.doc {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid #cdd9ef;
  display: grid;
  place-items: center;
}

.foot-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 13px;
  border-top: 1px solid #e0e8f6;
  padding-top: 12px;
}

.mini-btn {
  border: 1px solid #ccdaf2;
  border-radius: 999px;
  padding: 7px 12px;
  background: #f5f8ff;
  font-size: 0.74rem;
  color: #40506d;
}

.stage-footer {
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(214, 224, 243, 0.9);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.footer-note {
  margin: 0;
  font-size: 0.78rem;
  color: #5f6f8d;
}

@keyframes readyPulse {
  0%,
  100% {
    box-shadow: 0 12px 20px rgba(26, 131, 194, 0.24);
  }
  50% {
    box-shadow: 0 16px 28px rgba(26, 131, 194, 0.38);
  }
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (max-width: 900px) {
  .expert-upload-grid {
    grid-template-columns: 1fr;
  }

  .stepper-grid {
    grid-template-columns: 1fr;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .upload-panel,
  .result-panel {
    min-height: auto;
  }

  .header {
    padding: 15px;
  }

  .stage-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .card {
    padding: 16px;
  }

  .field {
    padding: 10px;
  }

  .choose-btn {
    min-height: 30px;
    padding: 0 12px;
    font-size: 0.74rem;
  }

  .grade-cta {
    width: 100%;
    justify-content: center;
  }

  .result-summary-card {
    grid-template-columns: 1fr;
  }

  .progress-rail {
    position: static;
    margin-bottom: 8px;
    grid-auto-flow: column;
    justify-content: flex-start;
  }

  .result-panel {
    padding-top: 16px;
  }
}
/* This specifically kills that annoying default dot/arrow in all browsers */
summary::-webkit-details-marker {
  display: none !important;
}

summary {
  list-style: none !important;
}
