body { margin:0; font-family: "Cairo", Tahoma, Arial, sans-serif; background:#f5f5f5; color:#222; }
.container { max-width: 980px; margin: 0 auto; padding: 16px; }
.top-header { background:#8b0d2e; color:#fff; padding: 18px 0; }
.app-title { margin:0; font-size: 20px; }
.app-subtitle { margin: 6px 0 0; opacity: .9; font-size: 14px; }
.main-card { background:#fff; border-radius: 14px; padding: 18px; margin-top: 14px; box-shadow: 0 8px 18px rgba(0,0,0,.06); }
.badge { display:inline-block; background:#f0f0f0; padding: 6px 10px; border-radius: 999px; font-size: 12px; }
.case-title { margin: 10px 0 6px; }
.case-meta { margin: 0 0 14px; color:#666; font-size: 13px; }
.section-title { margin: 0 0 10px; font-size: 16px; }
.story-box { background:#fafafa; border:1px solid #eee; padding: 14px; border-radius: 12px; line-height: 1.9; white-space: pre-wrap; }
.case-actions { display:flex; gap:10px; justify-content: space-between; margin-top: 16px; flex-wrap: wrap; }
.btn { border:none; padding: 10px 14px; border-radius: 10px; cursor:pointer; font-weight: 700; }
.btn.primary { background:#8b0d2e; color:#fff; }
.btn.secondary { background:#eee; }
.notice { margin-top: 14px; color:#666; font-size: 13px; }
.footer { text-align:center; padding: 14px 0; color:#777; }

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.evidence-card {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 12px;
}

.evidence-card h4 {
  margin: 0 0 6px;
  font-size: 14px;
}

.evidence-card p {
  margin: 0;
  font-size: 13px;
  color: #444;
  line-height: 1.7;
}


.question-block {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}

.question-block p {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 14px;
}

.question-block label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  cursor: pointer;
}

.question-block textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #ddd;
  padding: 8px;
  font-family: inherit;
  font-size: 13px;
}


.decision-section .question-block {
  border-left: 4px solid #8b0d2e;
}



.prompt-box {
  background: #fff7f7;
  border: 1px dashed #8b0d2e;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
}

.prompt-box p {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
}

.justification-section textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #ddd;
  padding: 10px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.7;
}


.summary-box {
  background: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 14px;
  line-height: 1.9;
  font-size: 14px;
}

.summary-box ul {
  margin: 0;
  padding-right: 18px;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.case-card {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.case-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.case-card p {
  margin: 0 0 12px;
  font-size: 13px;
  color: #555;
}

.case-card button {
  align-self: flex-start;
  border: none;
  background: #8b0d2e;
  color: #fff;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}

.intro-section {
  margin-bottom: 18px;
}

.intro-text {
  font-size: 14px;
  line-height: 1.9;
  color: #333;
}

.steps-list {
  padding-right: 18px;
  line-height: 1.9;
  font-size: 14px;
}

.case-actions.center {
  justify-content: center;
}

.reports-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.report-card {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 14px;
}

.report-card h3 {
  margin: 0 0 8px;
}

.report-card h4 {
  margin: 12px 0 6px;
  font-size: 14px;
}

.teacher-upload {
  margin-bottom: 16px;
}

.upload-hint {
  margin: 6px 0 10px;
  color: #555;
  font-size: 13px;
}

.teacher-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.tab-button {
  border: 1px solid #ddd;
  background: #f5f5f5;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}

.tab-button.active {
  background: #8b0d2e;
  color: #fff;
  border-color: transparent;
}

.tab-panel.hidden {
  display: none;
}

.table-wrapper {
  overflow-x: auto;
}

.reports-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.reports-table th,
.reports-table td {
  border: 1px solid #eee;
  padding: 10px;
  text-align: right;
  font-size: 13px;
  vertical-align: top;
}

.reports-table thead {
  background: #fafafa;
}

.status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f0f0f0;
  font-size: 12px;
}

.case-cards {
  display: grid;
  gap: 12px;
}

.case-accordion {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 10px 12px 14px;
}

.case-accordion summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  margin-bottom: 10px;
}

.case-accordion summary::-webkit-details-marker {
  display: none;
}

.case-type {
  display: block;
  color: #666;
  font-size: 12px;
  margin-top: 4px;
}

.note-input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #ddd;
  padding: 8px;
  font-family: inherit;
  font-size: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.modal-close {
  border: none;
  background: #f2f2f2;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

.detail-section {
  margin-bottom: 16px;
}

.answer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.answer-list li {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
}

.answer-text {
  margin-top: 6px;
  color: #444;
  font-size: 13px;
}

.justification-box {
  background: #fff7f7;
  border: 1px dashed #8b0d2e;
  border-radius: 12px;
  padding: 12px;
  line-height: 1.8;
  font-size: 13px;
}

.rubric-section {
  border-top: 1px solid #eee;
  padding-top: 12px;
}

.rubric-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.rubric-row select {
  border-radius: 8px;
  padding: 6px;
  border: 1px solid #ddd;
  font-family: inherit;
}

.rubric-total {
  font-weight: 700;
  margin: 10px 0;
}

@media (max-width: 640px) {
  .reports-table {
    min-width: 520px;
  }

  .modal-content {
    padding: 12px;
  }

  .rubric-row {
    grid-template-columns: 1fr;
  }
}
