
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --lime: #84cc16;
  --lime-bright: #a3e635;
  --lime-light: #ecfccb;
  --dark: #26351d;
  --muted: #87917e;
  --background: #f8faf5;
  --white: #ffffff;
  --border: #edf0e8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--background);
  color: var(--dark);
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font: inherit;
}

.app {
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: 250px;
  height: 100vh;
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 30px 20px 22px;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  z-index: 10;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 0 0 55px 5px;
}

.brand-icon {
  background: var(--lime);
  color: white;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-size: 24px;
}

.brand-dot {
  color: var(--lime);
}

.menu-label {
  color: #a3aa9b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.3px;
  margin: 0 0 14px 10px;
}

.navigation {
  display: grid;
  gap: 7px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 14px;
  color: #858d7d;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  transition: .2s;
}

.nav-item:hover,
.nav-item.active {
  background: #f0f9df;
  color: #4d7c0f;
}

.nav-item.active {
  font-weight: 800;
}

.nav-icon {
  width: 20px;
  font-size: 19px;
  text-align: center;
}

.second-label {
  margin-top: 36px;
}

.sidebar-bottom {
  margin-top: auto;
}

.help-card {
  background: #f3f9e9;
  border-radius: 13px;
  padding: 17px;
  margin-bottom: 20px;
}

.help-icon {
  color: #65a30d;
  font-size: 22px;
  margin-bottom: 10px;
}

.help-card strong {
  font-size: 13px;
}

.help-card p {
  font-size: 11px;
  line-height: 1.7;
  color: #7d8871;
  margin-top: 6px;
}

.logout {
  display: block;
  padding: 12px;
  color: #909889;
  font-size: 13px;
  font-weight: 600;
}

/* MAIN */
.main-content {
  width: calc(100% - 250px);
  min-width: 0;
  margin-left: 250px;
  padding: 0 42px;
  box-sizing: border-box;
}

.topbar {
  min-height: 83px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  font-size: 12px;
  color: #9aa293;
}

.breadcrumb strong {
  color: #3c4834;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 23px;
}

.icon-button {
  width: 37px;
  height: 37px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: white;
  font-size: 19px;
  position: relative;
  cursor: pointer;
}

.notification-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  position: absolute;
  right: 8px;
  top: 7px;
}

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

.avatar {
  width: 39px;
  height: 39px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #d9f99d;
  color: #4d7c0f;
  font-weight: 800;
}

.profile strong,
.profile span {
  display: block;
}

.profile strong {
  font-size: 12px;
}

.profile span {
  color: #9aa293;
  font-size: 10px;
  margin-top: 3px;
}

.profile .dropdown {
  font-size: 17px;
  margin-left: 8px;
}

/* WELCOME */
.welcome-section {
  min-height: 195px;
  margin-top: 30px;
  background: #eff8df;
  border-radius: 17px;
  padding: 30px 38px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.eyebrow {
  color: #80a744;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}

.welcome-section h1 {
  font-size: 29px;
  letter-spacing: -1px;
  font-weight: 800;
}

.welcome-section h1 span {
  color: #84cc16;
}

.welcome-text {
  color: #7c8970;
  font-size: 12px;
  margin-top: 10px;
  line-height: 1.7;
  max-width: 440px;
}

.welcome-illustration {
  width: 240px;
  height: 145px;
  position: relative;
  display: grid;
  place-items: center;
}

.sun-shape {
  font-size: 100px;
  color: #bef264;
  position: absolute;
}

.book-shape {
  font-size: 65px;
  position: relative;
  z-index: 1;
}

.math-symbol {
  position: absolute;
  font-size: 25px;
  font-weight: 800;
  color: #65a30d;
}

.symbol-one {
  left: 20px;
  top: 12px;
}

.symbol-two {
  right: 15px;
  top: 25px;
}

.symbol-three {
  right: 28px;
  bottom: 0;
}

/* STATISTICS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-top: 23px;
}

.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 17px;
  display: flex;
  align-items: center;
  gap: 13px;
}

.stat-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 19px;
  font-weight: 800;
}

.stat-icon.lime {
  background: #ecfccb;
  color: #65a30d;
}

.stat-icon.green {
  background: #dcfce7;
  color: #16a34a;
}

.stat-icon.yellow {
  background: #fef9c3;
  color: #ca8a04;
}

.stat-icon.purple {
  background: #f3e8ff;
  color: #9333ea;
}

.stat-card p {
  color: #929a8a;
  font-size: 10px;
  margin-bottom: 5px;
}

.stat-card h2 {
  font-size: 23px;
  font-weight: 800;
}

.stat-card h2 small {
  font-size: 10px;
  color: #9ba394;
  font-weight: 500;
}

/* COURSE SECTION */
.content-section {
  margin-top: 42px;
}

.section-heading,
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-heading h2,
.panel-heading h2 {
  font-size: 20px;
  letter-spacing: -.5px;
}

.section-description {
  font-size: 11px;
  color: #929a8a;
  margin-top: 6px;
}

.see-all {
  font-size: 11px;
  font-weight: 700;
  color: #659d16;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.course-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 15px;
  overflow: hidden;
  transition: .2s;
}

.course-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px #25351b0c;
}

.course-art {
  height: 160px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.algebra-art {
  background: #e9f7c9;
}

.equation-art {
  background: #f1f0dc;
}

.course-tag {
  position: absolute;
  top: 15px;
  left: 16px;
  background: #ffffffb8;
  color: #5f8427;
  border-radius: 6px;
  padding: 6px 9px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
}

.algebra-equation {
  background: #ffffffbd;
  padding: 15px 28px;
  border-radius: 14px;
  color: #42651d;
  font-size: 31px;
  font-weight: 800;
  transform: rotate(-4deg);
  box-shadow: 0 10px 25px #48651b12;
}

.art-caption {
  position: absolute;
  bottom: 12px;
  right: 16px;
  color: #8da75d;
  font-size: 9px;
  letter-spacing: 2px;
  font-weight: 800;
}

.floating-shape {
  position: absolute;
  color: #84a94a;
  font-weight: 800;
}

.shape-a {
  font-size: 35px;
  top: 35px;
  right: 25px;
}

.shape-b {
  font-size: 35px;
  bottom: 22px;
  left: 30px;
}

.equation-balance {
  display: flex;
  align-items: center;
  gap: 15px;
  color: #697e3e;
  font-size: 23px;
  font-weight: 800;
}

.equation-balance span {
  background: #ffffffbd;
  padding: 13px;
  border-radius: 10px;
}

.shape-c {
  font-size: 30px;
  top: 20px;
  right: 30px;
}

.shape-d {
  font-size: 35px;
  bottom: 18px;
  left: 35px;
}

.course-info {
  padding: 19px;
}

.course-meta {
  display: flex;
  justify-content: space-between;
  color: #a1aa96;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .7px;
}

.course-info h3 {
  font-size: 16px;
  margin-top: 12px;
  min-height: 22px;
}

.course-info > p {
  color: #8d9685;
  font-size: 10px;
  line-height: 1.7;
  margin-top: 7px;
  min-height: 35px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  margin-top: 17px;
  font-size: 10px;
  color: #909989;
}

.progress-info strong {
  color: #5e8e1c;
}

.progress-track {
  height: 6px;
  background: #edf2e7;
  border-radius: 10px;
  margin-top: 8px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #84cc16;
  border-radius: 10px;
}

.course-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #84cc16;
  color: white;
  border-radius: 9px;
  padding: 11px 14px;
  font-size: 11px;
  font-weight: 700;
  margin-top: 18px;
  transition: .2s;
}

.course-button:hover {
  background: #65a30d;
}

.course-button span {
  font-size: 17px;
}

.secondary-button {
  background: #f0f5e8;
  color: #668d2c;
}

.secondary-button:hover {
  color: white;
}

/* LOWER PANELS */
.lower-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  margin-top: 25px;
}

.panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 21px;
}

.panel-heading h2 {
  font-size: 16px;
}

.panel-icon {
  color: #84cc16;
  font-size: 22px;
}

.next-lesson,
.score-row {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 20px;
}

.lesson-icon {
  flex-shrink: 0;
  width: 47px;
  height: 47px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #eff8df;
  color: #5e8c1e;
  font-weight: 800;
  font-size: 20px;
}

.lesson-detail {
  flex: 1;
}

.lesson-detail span {
  display: block;
  color: #9ca58f;
  font-size: 8px;
  font-weight: 800;
  margin-bottom: 6px;
}

.lesson-detail strong,
.score-detail strong {
  font-size: 11px;
}

.lesson-detail p,
.score-detail p {
  font-size: 9px;
  color: #98a08e;
  margin-top: 5px;
  line-height: 1.5;
}

.arrow-button {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #eff8df;
  color: #659d16;
}

.score-circle {
  width: 49px;
  height: 49px;
  border-radius: 50%;
  border: 4px solid #a3e635;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  color: #5e8c1e;
}

.score-detail {
  flex: 1;
}

.score-link {
  display: block;
  margin-top: 17px;
  font-size: 10px;
  font-weight: 700;
  color: #659d16;
}

.footer {
  display: flex;
  justify-content: space-between;
  color: #a1aa98;
  font-size: 9px;
  padding: 28px 0;
  margin-top: 12px;
}

.footer b {
  color: #84cc16;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  .main-content {
    padding: 0 25px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .course-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .sidebar {
    width: 70px;
    padding: 20px 10px;
    align-items: center;
  }

  .brand {
    margin: 0 0 45px;
  }

  .brand > span:last-child,
  .menu-label,
  .nav-item:not(.active),
  .nav-item.active {
    font-size: 0;
  }

  .navigation {
    width: 100%;
  }

  .nav-item {
    justify-content: center;
    padding: 13px 5px;
  }

  .nav-icon {
    font-size: 20px;
  }

  .second-label,
  .sidebar-bottom {
    display: none;
  }

  .main-content {
    margin-left: 70px;
    padding: 0 16px;
  }

  .welcome-section {
    padding: 25px 20px;
  }

  .welcome-section h1 {
    font-size: 23px;
  }

  .welcome-illustration {
    width: 100px;
    opacity: .7;
  }

  .stats-grid {
    gap: 9px;
  }

  .stat-card {
    padding: 12px;
    gap: 8px;
  }

  .stat-icon {
    width: 35px;
    height: 35px;
  }

  .stat-card h2 {
    font-size: 19px;
  }

  .lower-grid {
    grid-template-columns: 1fr;
  }

  .topbar-right {
    gap: 10px;
  }

  .profile > div:not(.avatar),
  .profile .dropdown {
    display: none;
  }
}

@media (max-width: 420px) {
  .welcome-illustration {
    display: none;
  }

  .section-heading h2 {
    font-size: 17px;
  }

  .course-art {
    height: 135px;
  }

  .footer {
    flex-direction: column;
    gap: 8px;
  }
}

/* MODAL TAMBAH BAB */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #fff;
    width: 100%;
    max-width: 500px;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

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

.modal-header button {
    border: none;
    background: none;
    font-size: 28px;
    cursor: pointer;
    color: #777;
}

.modal-description {
    color: #777;
    font-size: 14px;
    margin-bottom: 22px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #65a30d;
}

.form-group textarea {
    resize: vertical;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

.modal-actions button {
    padding: 11px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

#cancel-add-chapter {
    background: #f3f4f6;
    border: 1px solid #ddd;
    color: #444;
}
/* Area pilihan jawaban kuis */
.quiz-answer-area {
    margin-top: 20px;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Kartu setiap opsi */
.quiz-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid #dce8e2;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Radio button */
.quiz-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #398875;
    flex-shrink: 0;
}

/* Isi opsi */
.quiz-option-content {
    flex: 1;
    color: #31574b;
    line-height: 1.6;
}

/* Efek saat opsi dipilih */
.quiz-option:has(input:checked) {
    border-color: #398875;
    background: #edf7f3;
    box-shadow: 0 0 0 2px rgba(57, 136, 117, 0.08);
}

/* Efek saat diarahkan */
.quiz-option:hover {
    border-color: #8bb9a8;
    background: #f7fbf9;
}
/* Halaman pengerjaan kuis */
.quiz-player-container {
    width: min(900px, calc(100% - 32px));
    margin: 40px auto;
    padding-bottom: 50px;
}

/* Header kuis */
.quiz-header {
    background: #f0f7f4;
    border: 1px solid #e0ece6;
    border-radius: 18px;
    padding: 28px 32px;
    margin-bottom: 28px;
}

.quiz-header a {
    display: inline-block;
    color: #398875;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 22px;
}

.quiz-header h1 {
    color: #244b3f;
    font-size: 28px;
    margin: 0 0 10px;
}

.quiz-header p {
    color: #648078;
    margin: 0;
    line-height: 1.6;
}

/* Daftar soal */
#questionList {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.quiz-question-card {
    background: #ffffff;
    border: 1px solid #e3ebe7;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 14px rgba(36, 75, 63, 0.04);
}

.quiz-question-card h3 {
    color: #398875;
    font-size: 17px;
    margin: 0 0 18px;
}

.quiz-question-text {
    color: #294b40;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 14px;
}

.quiz-question-card small {
    display: block;
    color: #789087;
    margin-bottom: 18px;
}

@media (max-width: 600px) {
    .quiz-player-container {
        margin: 20px auto;
    }

    .quiz-header {
        padding: 22px;
    }

    .quiz-header h1 {
        font-size: 23px;
    }

    .quiz-question-card {
        padding: 18px;
    }
}
/* Tampilan rumus matematika pada halaman murid */
.quiz-question-text math-field,
.quiz-option-content math-field,
.quiz-drag-card math-field,
.quiz-drop-group-title math-field {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    pointer-events: none;
    --contains-highlight-background-color: transparent;
    --selection-background-color: transparent;
}
/* Area isian singkat murid */
.quiz-short-answer {
    margin-top: 20px;
    padding: 18px;
    background: #f7faf8;
    border: 1px solid #e1ebe5;
    border-radius: 16px;
    transition: 0.2s ease;
}

.quiz-short-answer:focus-within {
    background: #f2f8f5;
    border-color: #70a996;
    box-shadow: 0 0 0 3px rgba(57, 136, 117, 0.08);
}

.quiz-short-answer-header {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 13px;
    color: #398875;
    font-size: 14px;
    font-weight: 600;
}

.quiz-short-answer-header span:first-child {
    font-size: 19px;
}

.quiz-short-answer-input {
    display: block;
    width: 100%;
    min-height: 90px;
    padding: 14px 16px;
    resize: vertical;
    border: 1px solid #e1eae5;
    border-radius: 11px;
    outline: none;
    background: #ffffff;
    color: #31574b;
    font: inherit;
    font-size: 15px;
    line-height: 1.6;
    box-sizing: border-box;
    transition: 0.2s ease;
}

.quiz-short-answer-input::placeholder {
    color: #a0b3aa;
}

.quiz-short-answer-input:focus {
    border-color: #70a996;
    box-shadow: 0 0 0 2px rgba(57, 136, 117, 0.07);
}

/* AREA DRAG AND DROP KUIS */
.quiz-drag-drop {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 24px;
}

/* AREA KARTU JAWABAN */
.quiz-drag-drop-cards {
    padding: 20px;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.quiz-drag-drop-cards h4 {
    width: 100%;
    margin: 0 0 8px;
    color: #115e59;
}

/* KARTU YANG DISERET */
.quiz-drag-card {
    padding: 12px 18px;
    background: white;
    border: 1px solid #5eead4;
    border-radius: 12px;
    color: #134e4a;
    cursor: grab;
    box-shadow: 0 2px 6px rgba(15, 118, 110, 0.08);
    user-select: none;
}

.quiz-drag-card:active {
    cursor: grabbing;
}

.quiz-drag-card.dragging {
    opacity: 0.45;
}

/* AREA KELOMPOK */
.quiz-drag-drop-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.quiz-drop-group {
    padding: 16px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 16px;
}

.quiz-drop-group-title {
    margin-bottom: 14px;
    color: #115e59;
    font-weight: 700;
}

/* TEMPAT MELETAKKAN KARTU */
.quiz-drop-zone {
    min-height: 100px;
    padding: 12px;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 10px;
    background: #f9fafb;
    border: 2px dashed #99a1aa;
    border-radius: 12px;
    color: #9ca3af;
    font-size: 13px;
}

.quiz-drop-zone .quiz-drag-card {
    color: #134e4a;
    font-size: 14px;
}

.quiz-drop-zone.drag-over {
    background: #ccfbf1;
    border-color: #0d9488;
}

@media (max-width: 600px) {
    .quiz-drag-drop-groups {
        grid-template-columns: 1fr;
    }
}
.quiz-drop-zone.empty {
    color: #9ca3af;
}

.quiz-drop-zone:not(.empty) {
    color: transparent;
}
/* TOMBOL SELESAIKAN KUIS */
.quiz-submit-section {
    margin-top: 30px;
    padding: 24px 28px;
    background: #f0fdfa;
    border: 1px solid #d5eee7;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

#answerProgress {
    color: #648078;
    font-size: 13px;
    font-weight: 600;
}

#submitQuizBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 25px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #398875, #55aa96);
    color: white;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 12px rgba(57, 136, 117, 0.18);
    transition: all 0.25s ease;
}

#submitQuizBtn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(57, 136, 117, 0.25);
}

#submitQuizBtn:not(:disabled):active {
    transform: translateY(0);
}

#submitQuizBtn:disabled {
    background: #c9ded8;
    color: #829b93;
    box-shadow: none;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    .quiz-submit-section {
        flex-direction: column;
        align-items: stretch;
    }

    #submitQuizBtn {
        width: 100%;
    }
}

/* =====================================
   QUIZ REVIEW - MATHCADEMY LIME THEME
===================================== */

:root {
    --quiz-green: #84cc16;
    --quiz-green-dark: #4d7c0f;
    --quiz-green-soft: #f0f9df;
    --quiz-bg: #f8faf5;
    --quiz-text: #26351d;
    --quiz-muted: #87917e;
    --quiz-border: #e8eee0;
}

/* Ringkasan hasil kuis */
.quiz-result-summary {
    margin-top: 30px;
    padding: 28px;
    border: 1px solid #dcecc2;
    border-radius: 20px;
    background: linear-gradient(135deg, #f3fbe7, #ffffff);
    box-shadow: 0 8px 24px rgba(77, 124, 15, 0.07);
}

.quiz-result-summary h2 {
    color: var(--quiz-green-dark);
    font-size: 21px;
    font-weight: 800;
    margin-bottom: 8px;
}

.quiz-result-summary > p {
    color: #78856d;
    font-size: 13px;
    margin-top: 8px;
}

/* Kartu jawaban benar dan salah */
.quiz-result-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.quiz-result-summary h2,
.quiz-result-summary > p:first-of-type {
    grid-column: 1 / -1;
}

.quiz-result-summary > p:not(:first-of-type) {
    padding: 15px;
    margin: 8px 0 0;
    border-radius: 13px;
    background: #ffffff;
    border: 1px solid var(--quiz-border);
    color: var(--quiz-muted);
}

.quiz-result-summary > p:not(:first-of-type)::first-line {
    color: var(--quiz-green-dark);
    font-weight: 700;
}

/* Highlight pilihan jawaban */
.quiz-option.answer-correct {
    background: #f0f9df;
    border: 1.5px solid #84cc16;
}

.quiz-option.answer-wrong {
    background: #fff1f0;
    border: 1.5px solid #f2a5a0;
}

.quiz-option.answer-correct .quiz-option-content {
    color: #4d7c0f;
}

.quiz-option.answer-wrong .quiz-option-content {
    color: #b4534b;
}

/* Panel review setiap soal */
.quiz-question-review {
    margin-top: 20px;
    padding: 20px;
    border-radius: 15px;
    background: #fafcf7;
    border: 1px solid var(--quiz-border);
}

.quiz-question-review h4 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 800;
}

.review-correct {
    color: #65a30d;
}

.review-wrong {
    color: #dc6b63;
}

.quiz-review-explanation {
    color: #65715c;
    font-size: 13px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

/* Kotak jawaban benar */
.quiz-review-answer {
    margin-top: 18px;
    padding: 18px;
    border-radius: 14px;
    background: #f3fbe8;
    border: 1px solid #dcecc2;
}

.quiz-review-answer > strong {
    color: #4d7c0f;
    font-size: 13px;
}

.quiz-review-answer-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-top: 10px;
    color: #354c24;
    font-size: 14px;
    overflow-x: auto;
}

.review-math-field {
    display: inline-block;
    width: auto;
    min-width: 45px;
    max-width: 100%;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 2px 3px;
    vertical-align: middle;
    font-size: 1.15em;
    pointer-events: none;
}

/* Review drag and drop */
.quiz-drag-drop-review {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.drag-review-section {
    padding: 18px;
    border: 1px solid var(--quiz-border);
    border-radius: 15px;
    background: #ffffff;
}

.drag-review-section h4 {
    margin: 0 0 14px;
    color: var(--quiz-green-dark);
    font-size: 14px;
    font-weight: 800;
}

.drag-review-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.drag-review-groups .quiz-drop-group {
    padding: 14px;
    border: 1px solid var(--quiz-border);
    border-radius: 13px;
    background: #fbfdf8;
}

.drag-review-zone {
    min-height: 75px;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
    background: #f7faef;
    border: 1.5px dashed #c5d9a7;
    border-radius: 11px;
}

.drag-review-zone .quiz-drag-card {
    width: 100%;
    box-sizing: border-box;
    cursor: default;
    background: #ffffff;
    border: 1px solid #dcecc2;
    color: #405b28;
    box-shadow: none;
}

.drag-review-zone.empty {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #a0aa95;
}

/* Tampilan layar kecil */
@media (max-width: 600px) {
    .quiz-result-summary {
        padding: 20px;
        grid-template-columns: 1fr;
    }

    .quiz-result-summary h2,
    .quiz-result-summary > p:first-of-type {
        grid-column: auto;
    }

    .drag-review-groups {
        grid-template-columns: 1fr;
    }
}
/* ================================
   QUIZ RESULT CARDS
================================ */

/* =================================
   QUIZ RESULT - SOFT GREEN THEME
================================= */

.quiz-result-summary {
    margin: 32px 0;
    padding: 30px;
    border: 1px solid #dcebd2;
    border-radius: 24px;
    background: linear-gradient(145deg, #f4faef, #eaf5df);
    box-shadow: 0 8px 24px rgba(91, 125, 70, 0.08);
}

.quiz-result-summary h2 {
    margin: 0 0 26px;
    color: #45613b;
    font-size: 22px;
    font-weight: 750;
    text-align: center;
}

.quiz-result-cards {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 16px;
}

.quiz-result-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 145px;
    padding: 22px 16px;
    border: 1px solid #e1ecd9;
    border-radius: 19px;
    background: rgba(255, 255, 255, 0.88);
    text-align: center;
    box-shadow: 0 4px 14px rgba(91, 125, 70, 0.05);
}

.quiz-result-card .result-card-label {
    color: #71836a;
    font-size: 13px;
    font-weight: 650;
}

.quiz-result-card strong {
    color: #527b43;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
}

.quiz-result-card .result-card-caption {
    color: #9aa994;
    font-size: 11px;
}

/* Kartu nilai dibuat sedikit lebih menonjol */
.quiz-result-card.score-card {
    background: linear-gradient(145deg, #e5f2d9, #d8ebc8);
    border-color: #cfe2c0;
}

.quiz-result-card.score-card strong {
    color: #416b35;
    font-size: 38px;
}

.quiz-result-card.correct-card,
.quiz-result-card.wrong-card {
    background: #ffffff;
}

/* Tampilan layar kecil */
@media (max-width: 650px) {
    .quiz-result-summary {
        padding: 22px 16px;
    }

    .quiz-result-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .quiz-result-card {
        min-height: 115px;
    }
}

/* =========================================
   MATHCADEMY QUIZ PLAYER - SOFT LIME THEME
========================================= */

/* Latar halaman */
body:has(.quiz-player-container) {
    background: #f5f9ef;
    color: #35472b;
}

.quiz-player-container {
    max-width: 1160px;
}

/* Header kuis */
.quiz-header {
    background: linear-gradient(135deg, #e6f1d8, #f1f7e9);
    border: 1px solid #d7e6c8;
    border-radius: 22px;
}

.quiz-header a {
    color: #668d3c;
    font-weight: 600;
}

.quiz-header a:hover {
    color: #456b2e;
}

.quiz-header h1 {
    color: #3f5f31;
}

.quiz-header p {
    color: #718466;
}

/* Kartu soal */
.quiz-question-card {
    border-color: #e1ead8;
    border-radius: 20px;
    box-shadow: 0 5px 18px rgba(75, 105, 51, 0.05);
}

.quiz-question-card h3 {
    color: #668d3c;
}

.quiz-question-text {
    color: #3e5035;
}

.quiz-question-card small {
    color: #8b9a7e;
}

/* Pilihan jawaban */
.quiz-option {
    border-color: #e1ead8;
    background: #fff;
    color: #3e5035;
    border-radius: 15px;
}

.quiz-option-content {
    color: #405437;
}

.quiz-option input[type="radio"] {
    accent-color: #79a94b;
}

.quiz-option:hover {
    border-color: #b7d39b;
    background: #f8fbf4;
}

.quiz-option:has(input:checked) {
    border: 1.5px solid #8bb86a;
    background: #edf5e5;
    box-shadow: 0 0 0 3px rgba(139, 184, 106, 0.10);
}

/* Jawaban benar dan salah */
.quiz-option.answer-correct {
    background: #edf6e5;
    border: 1.5px solid #91b978;
}

.quiz-option.answer-wrong {
    background: #fff5ee;
    border: 1.5px solid #e9b99b;
}

.quiz-option.answer-correct .quiz-option-content {
    color: #527b3e;
}

.quiz-option.answer-wrong .quiz-option-content {
    color: #a96848;
}

/* Isian singkat */
.quiz-short-answer {
    background: #f8fbf4;
    border-color: #e1ead8;
}

.quiz-short-answer:focus-within {
    background: #f3f8ed;
    border-color: #a9c98d;
}

.quiz-short-answer-header {
    color: #668d3c;
}

.quiz-short-answer-input {
    border-color: #e1ead8;
    color: #405437;
}

.quiz-short-answer-input:focus {
    border-color: #91b978;
    box-shadow: 0 0 0 3px rgba(145, 185, 120, 0.10);
}

/* Drag and drop */
.quiz-drag-drop-cards {
    background: #f1f7e9;
    border-color: #d7e6c8;
}

.quiz-drag-drop-cards h4,
.quiz-drop-group-title {
    color: #527b3e;
}

.quiz-drag-card {
    border-color: #d7e6c8;
    color: #405b32;
    background: #fff;
    box-shadow: 0 3px 8px rgba(75, 105, 51, 0.06);
}

.quiz-drop-group {
    border-color: #e1ead8;
}

.quiz-drop-zone {
    background: #f8fbf4;
    border-color: #b8cfa4;
    color: #8b9a7e;
}

.quiz-drop-zone.drag-over {
    background: #eaf3df;
    border-color: #8bb86a;
}

.quiz-drop-zone .quiz-drag-card {
    color: #405b32;
    border-color: #d7e6c8;
}

/* Tombol dan progres pengerjaan */
.quiz-submit-section {
    background: #edf5e5;
    border-color: #dce9cf;
}

#answerProgress {
    color: #718466;
}

#submitQuizBtn {
    background: linear-gradient(135deg, #85ad5d, #6e984a);
    box-shadow: 0 5px 12px rgba(87, 125, 59, 0.15);
}

#submitQuizBtn:not(:disabled):hover {
    background: linear-gradient(135deg, #739c4b, #5d853c);
    box-shadow: 0 8px 18px rgba(87, 125, 59, 0.20);
}

#submitQuizBtn:disabled {
    background: #dce8d1;
    color: #849579;
}

/* =========================================
   HASIL KUIS
========================================= */

.quiz-result-summary {
    display: block;
    margin: 30px 0;
    padding: 30px;
    border: 1px solid #d7e6c8;
    border-radius: 22px;
    background: linear-gradient(145deg, #edf5e5, #f8fbf4);
    box-shadow: 0 7px 22px rgba(75, 105, 51, 0.07);
}

.quiz-result-summary h2 {
    display: block;
    margin: 0 0 24px;
    color: #456b35;
    font-size: 22px;
    font-weight: 800;
    text-align: left;
}

.quiz-result-cards {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 16px;
}

.quiz-result-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 9px;
    min-height: 145px;
    padding: 22px;
    border: 1px solid #e1ead8;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(75, 105, 51, 0.04);
}

.result-card-label {
    color: #788a6d;
    font-size: 13px;
    font-weight: 700;
}

.quiz-result-card strong {
    color: #527b3e;
    font-size: 34px;
    font-weight: 800;
}

.result-card-caption {
    color: #9aa891;
    font-size: 11px;
}

.quiz-result-card.score-card {
    background: linear-gradient(145deg, #dcebcf, #eaf3df);
    border-color: #cbdcba;
}

.quiz-result-card.score-card strong {
    color: #456b35;
    font-size: 40px;
}

.quiz-result-card.correct-card strong {
    color: #668d3c;
}

.quiz-result-card.wrong-card strong {
    color: #a87954;
}

/* Review jawaban */
.quiz-question-review {
    background: #f8fbf4;
    border-color: #e1ead8;
}

.review-correct {
    color: #668d3c;
}

.review-wrong {
    color: #b47b55;
}

.quiz-review-explanation {
    color: #687b5c;
}

.quiz-review-answer {
    background: #edf5e5;
    border-color: #d7e6c8;
}

.quiz-review-answer > strong {
    color: #527b3e;
}

.quiz-review-answer-content {
    color: #405437;
}

/* Review drag and drop */
.drag-review-section {
    border-color: #e1ead8;
    background: #fff;
}

.drag-review-section h4 {
    color: #527b3e;
}

.drag-review-groups .quiz-drop-group {
    border-color: #e1ead8;
    background: #f8fbf4;
}

.drag-review-zone {
    background: #f3f8ed;
    border-color: #c5d9b2;
}

.drag-review-zone .quiz-drag-card {
    border-color: #dce9cf;
    color: #405b32;
}

/* Tampilan HP */
@media (max-width: 650px) {
    .quiz-result-summary {
        padding: 22px 18px;
    }

    .quiz-result-cards {
        grid-template-columns: 1fr;
    }

    .quiz-result-card {
        min-height: 115px;
        align-items: center;
        text-align: center;
    }
}
/* QUIZ PLAYER - CLEARER COLOR CONTRAST */

/* Latar halaman dibuat lebih netral */
body:has(.quiz-player-container) {
    background: #f9faf6;
}

/* Header lebih terlihat dari latar */
.quiz-header {
    background: #e5f0d9;
    border: 1px solid #cfdfbf;
    box-shadow: 0 5px 16px rgba(65, 95, 47, 0.06);
}

/* Kartu soal putih bersih */
.quiz-question-card {
    background: #ffffff;
    border: 1px solid #dce6d3;
    box-shadow: 0 5px 18px rgba(65, 95, 47, 0.07);
}

/* Pilihan jawaban lebih tegas */
.quiz-option {
    background: #ffffff;
    border: 1px solid #dce6d3;
}

/* Pilihan aktif */
.quiz-option:has(input:checked) {
    background: #e7f2dc;
    border: 2px solid #82a968;
    box-shadow: 0 3px 10px rgba(82, 123, 62, 0.10);
}

/* Area tombol */
.quiz-submit-section {
    background: #ffffff;
    border: 1px solid #dce6d3;
    box-shadow: 0 5px 16px rgba(65, 95, 47, 0.05);
}

/* =================================
   HALAMAN PENGATURAN MATHCADEMY
================================= */

.settings-page {
    background: #f4f8f6;
    color: #263b35;
    line-height: 1.7;
}

.settings-page .dashboard-container {
    min-height: 100vh;
}

.settings-page .main-content {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 35px 40px;
    box-sizing: border-box;
}

/* Header halaman */
.settings-page .topbar {
    margin-bottom: 28px;
}

.settings-page .breadcrumb {
    margin-bottom: 8px;
    color: #789087;
    font-size: 13px;
}

.settings-page .breadcrumb a {
    color: #218a78;
    text-decoration: none;
}

.settings-page .breadcrumb a:hover {
    text-decoration: underline;
}

.settings-page .topbar h3 {
    font-size: 25px;
    margin: 0;
    color: #24483e;
}

/* Bagian sambutan */
.settings-page .progress-welcome {
    padding: 30px 34px;
    margin-bottom: 28px;
    border-radius: 18px;
    background: linear-gradient(120deg, #d9f2e9, #edf8f3);
}

.settings-page .progress-welcome h1 {
    color: #236b5b;
    font-size: 27px;
    margin: 0 0 8px;
}

.settings-page .progress-welcome p {
    color: #58766c;
    margin: 0;
    line-height: 1.8;
}

/* Kartu pengaturan */
.settings-page .progress-section {
    background: #ffffff;
    padding: 28px 32px;
    margin-bottom: 24px;
    border: 1px solid #e5eee9;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(35, 82, 65, 0.05);
}

.settings-page .progress-section h2 {
    color: #286b59;
    font-size: 19px;
    margin: 0 0 18px;
}

.settings-page .progress-section p {
    color: #64776f;
    line-height: 1.8;
    margin: 0 0 14px;
}

/* Form */
.settings-page .form-group {
    margin-bottom: 22px;
}

.settings-page .form-group label {
    display: block;
    margin-bottom: 9px;
    color: #354e44;
    font-size: 14px;
    font-weight: 600;
}

.settings-page .form-group input,
.settings-page .form-group select {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    box-sizing: border-box;
    border: 1px solid #d8e5de;
    border-radius: 9px;
    background: #fbfdfc;
    color: #344b41;
    font-size: 14px;
    outline: none;
    transition: 0.2s ease;
}

.settings-page .form-group input:focus,
.settings-page .form-group select:focus {
    border-color: #45a58d;
    box-shadow: 0 0 0 3px rgba(69, 165, 141, 0.12);
}

.settings-page .form-group input[readonly] {
    background: #f0f5f2;
    color: #718078;
}

/* Tombol */
.settings-page .btn-primary {
    padding: 12px 22px;
    border: none;
    border-radius: 9px;
    background: #278b75;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.settings-page .btn-primary:hover {
    background: #1e705e;
    transform: translateY(-1px);
}

.settings-page .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Pesan setelah menyimpan */
.settings-page #profileMessage,
.settings-page #passwordMessage,
.settings-page #textSizeMessage {
    margin-top: 13px;
    font-size: 13px;
}

/* Tampilan layar kecil */
@media (max-width: 700px) {
    .settings-page .main-content {
        padding: 22px 16px;
    }

    .settings-page .progress-welcome {
        padding: 24px 20px;
    }

    .settings-page .progress-welcome h1 {
        font-size: 23px;
    }

    .settings-page .progress-section {
        padding: 22px 18px;
    }
}
/* ==============================
   HALAMAN NILAI SAYA
============================== */

.my-scores-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
}

.my-scores-header {
    margin-bottom: 28px;
}

.my-scores-header h1 {
    color: #234e43;
    font-size: 28px;
    margin-bottom: 8px;
}

.my-scores-header p,
.section-heading p {
    color: #718078;
    font-size: 14px;
}

.score-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.score-card,
.chapter-scores,
.score-history {
    background: #ffffff;
    border: 1px solid #e4eee9;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(35, 78, 67, 0.04);
}

.score-card p {
    color: #718078;
    font-size: 14px;
    margin-bottom: 12px;
}

.score-card h2 {
    color: #247c68;
    font-size: 30px;
    margin-bottom: 8px;
}

.score-card span {
    color: #94a39b;
    font-size: 12px;
}

.chapter-scores,
.score-history {
    margin-bottom: 24px;
}

.section-heading {
    margin-bottom: 20px;
}

.section-heading h2,
.score-history h2,
.chapter-scores h2 {
    color: #234e43;
    font-size: 19px;
    margin-bottom: 7px;
}

.chapter-score-list {
    display: grid;
    gap: 14px;
}

.empty-score {
    color: #94a39b;
    text-align: center;
    padding: 22px;
}

.history-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

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

.history-table th,
.history-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #edf2ef;
    font-size: 13px;
}

.history-table th {
    color: #527267;
    background: #f3f8f5;
    font-weight: 600;
}

.history-table td {
    color: #53665e;
}

@media (max-width: 768px) {
    .my-scores-container {
        padding: 20px 15px;
    }

    .score-summary {
        grid-template-columns: 1fr;
    }
}
.back-dashboard-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 10px 18px;
    background: #e0f2f1;
    color: #0f766e;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: 0.2s ease;
}

.back-dashboard-btn:hover {
    background: #b2dfdb;
    transform: translateY(-2px);
}