/* Hoạt động nhóm — dùng chung biến màu/phông của style.css */
.gm-main { max-width: 1200px; }
.gm-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.gm-toast { padding: 6px 12px; border-radius: 999px; background: #d7f7e1; color: #1c7a41; font-weight: 700; }
.gm-toast.bad { background: #fde0de; color: #a3251b; }
.gm-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0; }
.gm-hint { color: #5a6c85; font-size: 0.88rem; margin: 6px 0; }
.gm-box { border: 1px solid #cfe3f7; border-radius: 12px; padding: 8px 14px; margin: 12px 0; }
.gm-tab h2 { font-size: 1.15rem; color: var(--color-primary); }
.gm-main select, .gm-main input:not([type=checkbox]) { font-family: inherit; font-size: 0.95rem; padding: 6px 10px; border: 1px solid #b7cee6; border-radius: 8px; background: #fff; }

.gm-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.gm-group { background: #f4faff; border: 2px solid #cfe3f7; border-radius: 14px; padding: 10px; }
.gm-group.pool { background: #fff8e7; border-color: #f1c40f; }
.gm-group h3 { margin: 0 0 8px; font-size: 1rem; }
.gm-group-head { display: flex; align-items: center; gap: 6px; }
.gm-group-head h3 { flex: 1; }
.gm-student { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 4px 0; border-top: 1px dashed #d5e4f3; font-size: 0.93rem; }
.gm-student select { max-width: 120px; font-size: 0.8rem; padding: 3px 4px; }
.gm-mini { font-family: inherit; font-size: 0.8rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; border: 1px solid #b7cee6; background: #fff; color: var(--color-primary); cursor: pointer; }
.gm-mini.danger { color: #a3251b; border-color: #f0b3ae; }

.gm-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.gm-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 0.88rem; }
.gm-form .full { grid-column: 1 / -1; }
.gm-act { border: 1px solid #cfe3f7; border-radius: 12px; padding: 10px 14px; margin: 10px 0; background: #fff; }
.gm-badge { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; color: #fff; background: #94a3b8; }
.gm-badge.st-open, .gm-badge.st-running { background: #2563eb; }
.gm-badge.st-finished { background: #16a34a; }
.gm-badge.st-expired, .gm-badge.st-closed { background: #e67e22; }
.gm-badge.st-ended { background: #475569; }
.gm-badge.st-stopped { background: #dc2626; }
.gm-res { border: 1px solid #cfe3f7; border-radius: 14px; padding: 12px; margin: 14px 0; background: #fff; }
.gm-res-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.gm-score { margin-left: auto; font-weight: 700; color: var(--color-primary); }
.gm-table-wrap { overflow-x: auto; }
.gm-table { border-collapse: collapse; width: 100%; font-size: 0.9rem; margin-top: 8px; }
.gm-table th, .gm-table td { border: 1px solid #e2e8f0; padding: 5px 8px; text-align: center; }
.gm-table td:first-child, .gm-table th:first-child { text-align: left; white-space: nowrap; }
.cell.ok { background: #d7f7e1; color: #1c7a41; font-weight: 700; }
.cell.bad { background: #fde0de; color: #a3251b; font-weight: 700; }
.cell.none { color: #94a3b8; }

/* ---------- Trang học sinh ---------- */
.gs-wrap { max-width: 980px; margin: 0 auto; padding: 18px 16px 60px; }
.gs-card { background: #ffffffee; border-radius: var(--radius); box-shadow: 0 8px 24px rgba(30,80,150,0.12); padding: 18px; margin-bottom: 16px; }
/* ---------- Danh sách hoạt động (trang chủ học sinh) ---------- */
.gs-home-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.gs-home-head h2 { margin: 0; }
.gs-home-count { font-size: 0.9rem; font-weight: 600; color: #5a6c85; }
.gs-act-list { display: flex; flex-direction: column; gap: 16px; }
.gs-empty { text-align: center; color: #5a6c85; padding: 28px 18px; }

.gs-act {
    --st: #2d7dd2; --st-soft: #eaf3fd;
    position: relative; display: flex; flex-direction: column; gap: 14px;
    background: #fff; border: 1px solid #dbe6f3; border-radius: 18px; padding: 20px 22px 18px 26px;
    box-shadow: 0 1px 2px rgba(20,50,90,.06), 0 8px 24px rgba(30,80,150,.08);
    cursor: pointer; overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.gs-act::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--st); }
.gs-act:hover { transform: translateY(-2px); border-color: var(--st); box-shadow: 0 2px 4px rgba(20,50,90,.06), 0 14px 32px rgba(30,80,150,.14); }
.gs-act:focus-visible { outline: 3px solid var(--st); outline-offset: 3px; }
.gs-act.st-open    { --st: #2d7dd2; --st-soft: #eaf3fd; }
.gs-act.st-running { --st: #e08a1e; --st-soft: #fdf3e4; }
.gs-act.st-done    { --st: #1f9d5a; --st-soft: #e7f7ee; }
.gs-act.st-closed, .gs-act.st-ended, .gs-act.st-nogroup { --st: #8a97a8; --st-soft: #f1f4f8; }
.gs-act.st-closed .gs-act-title, .gs-act.st-ended .gs-act-title { color: #4a5a70; }

.gs-act-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.gs-act-titles { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gs-act-title { margin: 0; font-size: 1.4rem; line-height: 1.25; color: #16263f; text-wrap: balance; }

.gs-status { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; color: var(--st); background: var(--st-soft); }
.gs-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.gs-status.st-running .gs-dot { animation: gs-blink 1.4s ease-in-out infinite; }
@keyframes gs-blink { 50% { opacity: .25; } }

.gs-cta { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: 0.95rem; color: #fff; background: var(--st); transition: gap .15s ease; }
.gs-act:hover .gs-cta { gap: 10px; }
.gs-act.st-closed .gs-cta, .gs-act.st-ended .gs-cta { background: #eef1f5; color: #6b7a8f; }
.gs-act.st-nogroup .gs-cta { background: #eef1f5; color: #34465f; }

.gs-ico { display: inline-flex; width: 18px; height: 18px; flex: none; }
.gs-ico svg { width: 100%; height: 100%; }

.gs-act .gs-topics { gap: 8px; }
.gs-act .gs-topic { background: var(--st-soft); border-color: transparent; color: #1d3a63; font-weight: 600; }

.gs-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.gs-stat { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #f6f9fc; border: 1px solid #e6edf6; }
.gs-stat .gs-ico { width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: #fff; color: var(--st); box-shadow: 0 1px 2px rgba(20,50,90,.08); }
.gs-stat-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.gs-stat-text strong { font-size: 1rem; color: #16263f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-stat-text small { font-size: 0.78rem; color: #6b7a8f; }

.gs-progress { display: flex; flex-direction: column; gap: 6px; }
.gs-progress-label { display: flex; justify-content: space-between; font-size: 0.85rem; color: #6b5a3a; }
.gs-progress-label strong { color: #9a5b0c; }
.gs-progress-track { height: 8px; border-radius: 999px; background: #f6e7cf; overflow: hidden; }
.gs-progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--st); }
.gs-result { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; background: var(--st-soft); color: #165c37; font-size: 0.92rem; }
.gs-result .gs-ico { color: var(--st); }

.gs-act-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding-top: 12px; border-top: 1px dashed #dbe6f3; font-size: 0.88rem; color: #5a6c85; }
.gs-foot-item { display: inline-flex; align-items: center; gap: 6px; }
.gs-foot-item strong { color: #16263f; }
.gs-foot-item .gs-ico { width: 16px; height: 16px; color: #8a97a8; }

@media (max-width: 600px) {
    .gs-act { padding: 16px 16px 14px 20px; }
    .gs-act-title { font-size: 1.2rem; }
    .gs-act-head { gap: 10px; }
    .gs-cta { padding: 7px 12px; font-size: 0.88rem; }
    .gs-stats { gap: 6px; }
    .gs-stat { flex-direction: column; align-items: flex-start; gap: 6px; padding: 8px; }
    .gs-stat .gs-ico { width: 28px; height: 28px; padding: 6px; }
}
@media (prefers-reduced-motion: reduce) {
    .gs-act, .gs-cta { transition: none; }
    .gs-status.st-running .gs-dot { animation: none; }
}
.gs-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.gs-group { border: 3px solid #cfe3f7; background: #f4faff; border-radius: 16px; padding: 14px; cursor: pointer; font-family: inherit; text-align: left; }
.gs-group:hover:not(:disabled) { border-color: var(--color-primary); }
.gs-group.mine { border-color: var(--color-accent); }
.gs-group.done { background: #eefaf1; border-color: #9ad8ae; }
.gs-group h3 { margin: 0 0 6px; }
.gs-members { font-size: 0.88rem; color: #5a6c85; margin: 6px 0 0; }
.gs-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.gs-pill { background: var(--color-primary); color: #fff; font-weight: 700; border-radius: 999px; padding: 4px 14px; font-size: 0.9rem; }
.gs-pill.timer.low { background: var(--color-failed); }
.gs-pill.score { background: var(--color-accent); }
.gs-modes { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.gs-modes button { font-family: inherit; font-weight: 700; padding: 8px 14px; border-radius: 999px; border: 2px solid #cfe3f7; background: #fff; cursor: pointer; }
.gs-modes button.on { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.gs-prompt { font-size: 1.3rem; font-weight: 700; line-height: 1.45; margin: 10px 0 16px; white-space: pre-line; }
.gs-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .gs-options { grid-template-columns: 1fr; } }
.gs-opt { font-family: inherit; text-align: left; border: 3px solid #cfe3f7; background: #f4faff; border-radius: 14px; padding: 12px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; min-height: 84px; font-size: 1.05rem; font-weight: 600; }
.gs-opt:disabled { cursor: default; }
.gs-opt.active { border-color: var(--color-primary); background: #e3f0ff; box-shadow: 0 0 0 3px rgba(45,125,210,.25); }
.gs-opt.correct { background: #d7f7e1; border-color: var(--color-passed); }
.gs-opt.wrong { background: #fde0de; border-color: var(--color-failed); }
.gs-opt-letter { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 50%; background: var(--color-primary); color: #fff; font-weight: 700; margin-right: 8px; flex-shrink: 0; }
.gs-opt-line { display: flex; align-items: center; }
.gs-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gs-chip { font-family: inherit; font-size: 0.9rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; border: 2px solid #b7cee6; background: #fff; cursor: pointer; color: #24324a; }
.gs-chip.assigned { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.gs-chip.ok { background: #16a34a; border-color: #16a34a; color: #fff; cursor: default; }
.gs-chip.bad { background: #e74c3c; border-color: #e74c3c; color: #fff; cursor: default; }
.gs-pool { margin-top: 14px; padding: 12px; border-radius: 14px; background: #fff8e7; border: 2px dashed #f1c40f; }
.gs-pool p { margin: 0 0 8px; font-weight: 700; }
.gs-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.gs-feedback { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: #f4faff; font-weight: 600; line-height: 1.45; white-space: pre-line; }
.gs-feedback + .gs-feedback { margin-top: 8px; }
.gs-table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.gs-table th, .gs-table td { border: 1px solid #e2e8f0; padding: 8px; text-align: center; }
.gs-table td:first-child, .gs-table th:first-child { text-align: left; }
.gs-present-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 14px 0 10px; }
.gs-present-count { font-weight: 700; color: #1f6f43; background: #e6f7ee; border-radius: 999px; padding: 4px 12px; font-size: 0.92rem; }
.gs-present-actions { display: flex; gap: 6px; }
.gs-link { background: none; border: 0; color: var(--color-primary); font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.gs-link:hover { background: #eaf3fd; }
.gs-link:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 1px; }

.gs-present { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin: 0 0 18px; }
.gs-person { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 2px solid #d9e6f5; border-radius: 14px; background: #fff; cursor: pointer; user-select: none; transition: border-color .15s, background-color .15s, opacity .15s, transform .1s; }
.gs-person:hover { border-color: #a9c8ec; }
.gs-person:active { transform: scale(0.98); }
.gs-person input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.gs-person:has(input:focus-visible) { outline: 3px solid var(--color-primary); outline-offset: 2px; }
.gs-avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 1.1rem; color: #fff; }
.gs-avatar.c0 { background: #2d7dd2; } .gs-avatar.c1 { background: #e07a2f; } .gs-avatar.c2 { background: #2f9e62; }
.gs-avatar.c3 { background: #8a5cd1; } .gs-avatar.c4 { background: #d1477a; } .gs-avatar.c5 { background: #1c8f9e; }
.gs-person-name { flex: 1; min-width: 0; font-size: 1.02rem; font-weight: 600; color: #1d2b44; line-height: 1.3; }
.gs-person-state { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #b9c7d8; display: grid; place-items: center; font-size: 0.85rem; font-weight: 700; color: #fff; }

.gs-person:has(input:checked) { border-color: #2f9e62; background: #effaf3; }
.gs-person:has(input:checked) .gs-person-state { background: #2f9e62; border-color: #2f9e62; }
.gs-person:has(input:checked) .gs-person-state::after { content: ''; width: 6px; height: 11px; border: solid #fff; border-width: 0 3px 3px 0; transform: translateY(-1px) rotate(45deg); }
.gs-person:not(:has(input:checked)) { background: #f6f7f9; border-style: dashed; }
.gs-person:not(:has(input:checked)) .gs-avatar { filter: grayscale(1); opacity: 0.55; }
.gs-person:not(:has(input:checked)) .gs-person-name { color: #8a96a8; text-decoration: line-through; }

@media (max-width: 520px) {
    .gs-present { grid-template-columns: 1fr 1fr; gap: 8px; }
    .gs-person { padding: 8px; gap: 8px; }
    .gs-avatar { width: 32px; height: 32px; font-size: 0.95rem; }
    .gs-person-state { display: none; }
}
.gs-review summary { cursor: pointer; font-weight: 700; padding: 6px 0; }

.gs-visual { margin: 10px 0 14px; display: flex; justify-content: center; overflow-x: auto; }
.gs-visual .exercise-canvas { max-width: 100%; height: auto; border-radius: 12px; }

/* ---- Giáo viên: hộp xem câu hỏi & ��áp án ---- */
.gm-noscroll { overflow: hidden; }
.gm-qov { position: fixed; inset: 0; z-index: 900; background: rgba(20, 28, 50, 0.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.gm-qmodal { background: #fff; border-radius: 18px; width: min(860px, 100%); max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); }
.gm-qmodal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 20px; border-bottom: 2px solid #eef1f8; }
.gm-qmodal-head h2 { margin: 0 0 4px; font-size: 1.15rem; }
.gm-qmodal-body { overflow-y: auto; padding: 14px 20px 20px; }
.gm-qlist { display: grid; gap: 14px; margin-top: 10px; }
.gm-qcard { border: 2px solid #e1e8f5; border-radius: 14px; padding: 12px 14px; background: #fff; }
.gm-qcard.is-open { border-style: dashed; background: #fffdf5; }
.gm-qhead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.gm-qprompt { font-weight: 700; margin: 4px 0 8px; line-height: 1.45; }
.gm-qopts { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.gm-qopt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: #f4f6fb; }
.gm-qopt.correct { background: #eafcf1; outline: 2px solid #3bb273; }
.gm-qletter { width: 26px; height: 26px; border-radius: 50%; background: #2d7dd2; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.85rem; flex: none; }
.gm-qopt.correct .gm-qletter { background: #3bb273; }
.gm-qtext { flex: 1 1 160px; }
.gm-qtick { color: #1f8a56; font-weight: 800; font-size: 0.85rem; }
.gm-qwho { color: #5b6b86; font-style: italic; font-size: 0.88rem; flex-basis: 100%; padding-left: 34px; }
.gm-qexp { margin-top: 8px; padding: 8px 10px; background: #fff7e0; border-radius: 10px; font-size: 0.92rem; }
.gm-qcard .gs-visual { margin: 6px 0 10px; }

/* ---- Giáo viên: chọn nhiều chủ đề (node) ---- */
.gm-nodepick { border: 1px solid #cfe3f7; border-radius: 12px; padding: 8px 14px 12px; margin: 0; min-width: 0; }
.gm-nodepick legend { font-weight: 700; font-size: 0.88rem; padding: 0 6px; }
.gm-nodepick-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0 8px; }
.gm-nodepick-bar input[type=search] { flex: 1 1 220px; }
.gm-nodecount { font-weight: 700; color: var(--color-primary); font-size: 0.88rem; }
.gm-nodechips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.gm-nodechips:empty { display: none; }
.gm-nodechip { display: inline-flex; align-items: center; gap: 4px; background: #e3f0ff; color: #1d4f8c; border: 1px solid #b7cee6; border-radius: 999px; padding: 3px 6px 3px 12px; font-size: 0.82rem; font-weight: 700; }
.gm-nodechip button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 0.8rem; padding: 0 4px; line-height: 1; border-radius: 50%; }
.gm-nodechip button:hover { background: #cfe3f7; }
.gm-nodelist { max-height: 300px; overflow-y: auto; border: 1px solid #e2e8f0; border-radius: 10px; background: #fbfdff; padding: 6px 10px; }
.gm-nodeterm + .gm-nodeterm { border-top: 1px dashed #d5e4f3; margin-top: 6px; padding-top: 6px; }
.gm-nodeterm-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; position: sticky; top: -6px; background: #fbfdff; padding: 4px 0; font-size: 0.88rem; z-index: 1; }
.gm-nodeitems { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2px 12px; }
.gm-form .gm-nodeitem { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 500; font-size: 0.9rem; padding: 4px 4px; border-radius: 6px; cursor: pointer; }
.gm-form .gm-nodeitem:hover { background: #eef6ff; }
.gm-form .gm-nodeitem.child { padding-left: 20px; }
.gm-nodeitem input { margin-top: 3px; flex: none; }
.gm-nodeitem input:disabled + span { color: #94a3b8; }
.gm-nodeitem[hidden], .gm-nodeterm[hidden] { display: none; }
.gm-badge-topic { background: #7c5cc4; margin-left: 0; }

/* ---- Học sinh: chủ đề của hoạt động / câu hỏi ---- */
.gs-topics { display: flex; flex-wrap: wrap; gap: 6px; }
.gs-topic { display: inline-block; background: #eef4fb; color: #1d4f8c; border: 1px solid #cfe3f7; border-radius: 999px; padding: 3px 12px; font-size: 0.85rem; font-weight: 700; }

/* ---- Học sinh: xem lại từng câu (dạng tab) ---- */
.gs-rv { --rv-ok: #1f9d55; --rv-ok-bg: #e8f7ee; --rv-bad: #d64545; --rv-bad-bg: #fdeeee; --rv-mid: #d98b1c; --rv-mid-bg: #fff4e2; }
.gs-rv-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.gs-rv-head h3 { margin: 0; font-size: 1.2rem; }
.gs-rv-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.85rem; font-weight: 600; color: #475569; }
.gs-rv-dot { display: inline-flex; align-items: center; gap: 6px; }
.gs-rv-dot::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.gs-rv-dot.is-ok::before { background: var(--rv-ok); }
.gs-rv-dot.is-partial::before { background: var(--rv-mid); }
.gs-rv-dot.is-bad::before { background: var(--rv-bad); }

.gs-rv-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; border-bottom: 1px solid #e2e8f0; scrollbar-width: thin; }
.gs-rv-tab { flex: none; position: relative; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 12px; border: 2px solid transparent; font: inherit; font-weight: 800; font-size: 1rem; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.gs-rv-tab.is-ok { background: var(--rv-ok-bg); color: var(--rv-ok); }
.gs-rv-tab.is-partial { background: var(--rv-mid-bg); color: var(--rv-mid); }
.gs-rv-tab.is-bad { background: var(--rv-bad-bg); color: var(--rv-bad); }
.gs-rv-tab:hover { transform: translateY(-1px); }
.gs-rv-tab:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
.gs-rv-tab.is-active { border-color: currentColor; box-shadow: 0 4px 10px rgba(15, 40, 80, 0.15); }
.gs-rv-tab.is-active::after { content: ""; position: absolute; left: 50%; bottom: -12px; width: 18px; height: 3px; margin-left: -9px; border-radius: 3px; background: currentColor; }

.gs-rv-panel { padding-top: 16px; outline: none; }
.gs-rv-qhead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gs-rv-qnum { font-weight: 800; color: var(--color-primary); }
.gs-rv-status { border-radius: 999px; padding: 3px 12px; font-size: 0.82rem; font-weight: 700; }
.gs-rv-status.is-ok { background: var(--rv-ok-bg); color: var(--rv-ok); }
.gs-rv-status.is-partial { background: var(--rv-mid-bg); color: var(--rv-mid); }
.gs-rv-status.is-bad { background: var(--rv-bad-bg); color: var(--rv-bad); }
.gs-rv-points { margin-left: auto; font-weight: 700; color: #334155; font-size: 0.9rem; }
.gs-rv .gs-prompt { font-size: 1.15rem; margin: 12px 0 14px; }

.gs-rv-opts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.gs-rv-opt { border: 2px solid #e2e8f0; border-radius: 12px; padding: 10px 14px; background: #fff; }
.gs-rv-opt.is-correct { border-color: var(--rv-ok); background: var(--rv-ok-bg); }
.gs-rv-opt.is-wrong { border-color: #f3b4b4; background: var(--rv-bad-bg); }
.gs-rv-opt-main { display: flex; align-items: center; gap: 12px; }
.gs-rv-letter { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: #eef2f7; color: #475569; }
.gs-rv-opt.is-correct .gs-rv-letter { background: var(--rv-ok); color: #fff; }
.gs-rv-opt.is-wrong .gs-rv-letter { background: var(--rv-bad); color: #fff; }
.gs-rv-opt-text { flex: 1; font-weight: 600; line-height: 1.4; white-space: pre-line; }
.gs-rv-tag { flex: none; font-size: 0.78rem; font-weight: 800; border-radius: 999px; padding: 3px 10px; }
.gs-rv-tag.is-correct { background: var(--rv-ok); color: #fff; }
.gs-rv-tag.is-wrong { background: #fff; color: var(--rv-bad); border: 1px solid #f3b4b4; }
.gs-rv-who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0 44px; }
.gs-rv-who-label { font-size: 0.82rem; color: #64748b; font-weight: 600; }
.gs-rv-student { background: #fff; border: 1px solid #cbd5e1; border-radius: 999px; padding: 2px 10px; font-size: 0.82rem; font-weight: 600; color: #334155; }
.gs-rv-note { margin: 8px 0 0 44px; font-size: 0.88rem; color: #7f1d1d; line-height: 1.45; white-space: pre-line; }
.gs-rv-unanswered { margin: 10px 0 0; font-size: 0.88rem; color: #64748b; font-style: italic; }
.gs-rv-explain { margin-top: 14px; border-left: 4px solid var(--color-primary); background: #eef6ff; border-radius: 0 10px 10px 0; padding: 10px 14px; }
.gs-rv-explain strong { color: var(--color-primary); font-size: 0.9rem; }
.gs-rv-explain p { margin: 4px 0 0; line-height: 1.5; white-space: pre-line; }
.gs-rv-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.gs-rv-nav .btn:disabled { opacity: .45; cursor: not-allowed; }

@media (max-width: 560px) {
    .gs-rv-points { margin-left: 0; width: 100%; }
    .gs-rv-who, .gs-rv-note { margin-left: 0; }
    .gs-rv-opt-main { flex-wrap: wrap; }
}

/* ---- Câu hỏi lấy từ ngân hàng: ảnh / video minh họa, ảnh đáp án ---- */
.gs-visual.gs-media { flex-direction: column; align-items: center; gap: 12px; }
.gs-media-img { max-width: 100%; max-height: 360px; object-fit: contain; border-radius: 12px; border: 2px solid #cfe3f7; background: #fff; }
.gs-media-video { width: min(640px, 100%); aspect-ratio: 16 / 9; border: 0; border-radius: 12px; background: #000; }
.gs-opt-img { max-width: 100%; max-height: 160px; object-fit: contain; align-self: center; border-radius: 10px; background: #fff; }
.gs-rv-opt-img { display: block; max-width: 220px; max-height: 140px; object-fit: contain; margin: 6px 0 0 36px; border-radius: 8px; }
.gm-qopt-img { display: block; max-width: 180px; max-height: 120px; object-fit: contain; border-radius: 8px; flex-basis: 100%; margin-left: 34px; }

/* ---- Chọn nguồn câu hỏi của hoạt động (nhom_giaovien.php) ---- */
.gm-source { border: 1px solid #cfe3f7; border-radius: 12px; padding: 8px 14px 12px; margin: 0; min-width: 0; }
.gm-source legend { font-weight: 700; font-size: 0.88rem; padding: 0 6px; }
.gm-source-opts { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.gm-radio { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.gm-nodepick[hidden], .gm-bankpick[hidden] { display: none; }
.gm-bankpick { border: 1px solid #cfe3f7; border-radius: 12px; padding: 8px 14px 12px; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.gm-bankpick legend { font-weight: 700; font-size: 0.88rem; padding: 0 6px; }
.gm-bankcol { display: flex; flex-direction: column; gap: 6px; }
.gm-banklist { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto; padding: 4px; border: 1px solid #e3ecf7; border-radius: 10px; background: #fafcff; }
.gm-bankitem { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.gm-bankitem:hover { background: #eef5ff; }
.gm-bankitem small { color: #6b7a99; margin-left: auto; white-space: nowrap; }
.gm-bankitem.is-disabled { opacity: 0.55; cursor: not-allowed; }
.gm-banksum { font-weight: 600; }
.gm-banksum.bad { color: #c0392b; }
.gm-qpick-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.gm-qpick-tools input[type=search] { flex: 1 1 220px; min-width: 0; }
.gm-qpick-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border-radius: 10px; border: 1px solid #e3ecf7; margin-bottom: 8px; cursor: pointer; background: #fff; }
.gm-qpick-row.is-disabled { background: #f4f6fb; opacity: 0.7; cursor: not-allowed; }
.gm-qpick-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; }
.gm-qpick-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; font-size: 0.82rem; color: #6b7a99; }
.gm-qpick-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 2px solid #eef1f8; flex-wrap: wrap; }
.gm-qpick-pager { display: flex; align-items: center; gap: 8px; }
