/* Assessment lifecycle: clear staff steps and a read-only family view. */
.hsm-exams{--exam-ink:#172033;--exam-muted:#66738b;--exam-line:#e3e8f1;--exam-soft:#f6f8fc;--exam-primary:#3158d4;background:#fff;color:var(--exam-ink);border:1px solid var(--exam-line);border-radius:20px;padding:clamp(16px,3vw,30px);font:inherit}
.hsm-exams *,.hsm-exams *::before,.hsm-exams *::after{box-sizing:border-box}
.hsm-exams [hidden]{display:none!important}.hsm-exams h2,.hsm-exams h3,.hsm-exams h4{margin:0 0 7px}.hsm-exams p{line-height:1.9}.hsm-exams-hero{padding-bottom:18px;border-bottom:1px solid var(--exam-line)}.hsm-exams-hero p{margin:0;font-size:13px;color:var(--exam-muted)}.hsm-exams-eyebrow{font-size:12px!important;color:var(--exam-primary)!important}.hsm-exams-announcer:not(:empty){padding:12px;margin-top:12px;background:#edf8f2;border-radius:10px;color:#16714d}.hsm-exams-announcer.is-error{background:#fff0f0;color:#a22}
.hsm-exams [data-assessment-body]{padding-top:20px}.hsm-exams-empty{padding:24px;text-align:center;color:var(--exam-muted)}.hsm-exams-toolbar,.hsm-exams-actions,.hsm-exams-card-top,.hsm-exams-heading{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.hsm-exams-toolbar,.hsm-exams-heading{justify-content:space-between;margin-bottom:16px}.hsm-exams-button{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:9px 14px;border:1px solid var(--exam-line);border-radius:9px;background:#fff;color:var(--exam-primary);font:inherit;font-size:13px;text-decoration:none;cursor:pointer}.hsm-exams-button--primary{background:var(--exam-primary);border-color:var(--exam-primary);color:#fff}.hsm-exams-button--danger{color:#a22}.hsm-exams-button:disabled{opacity:.5;cursor:wait}.hsm-exams :focus-visible{outline:3px solid #8ba7fa;outline-offset:2px}
.hsm-exams-form,.hsm-exams-form-grid,.hsm-exams-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.hsm-exams-form>*{min-width:0}.hsm-exams .full{grid-column:1/-1}.hsm-exams label{display:grid;gap:6px;min-width:0;font-size:12px}.hsm-exams input,.hsm-exams select,.hsm-exams textarea{width:100%;min-width:0;max-width:100%;min-height:44px;padding:9px;border:1px solid #d5dce9;border-radius:9px;background:#fff;color:var(--exam-ink);font:inherit}.hsm-exams textarea{resize:vertical}.hsm-exams input[type=checkbox]{width:18px;min-height:18px;height:18px;flex-shrink:0}.hsm-exams small,.hsm-exams-help{font-size:12px;color:var(--exam-muted);line-height:1.8}.hsm-exams-filters{padding:14px;background:var(--exam-soft);border-radius:12px;margin-bottom:18px}.hsm-exams-filters .hsm-exams-search{grid-column:1/-1}
.hsm-exams-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:14px}.hsm-exams-card{padding:18px;border:1px solid var(--exam-line);border-radius:14px;overflow-wrap:anywhere}.hsm-exams-card>p{font-size:13px;color:var(--exam-muted);margin:8px 0}.hsm-exams-card h3{font-size:16px;margin-top:12px}.hsm-exams-badge{display:inline-flex;padding:4px 9px;border-radius:20px;background:#eef2f7;color:#5d6c84;font-size:11px}.hsm-exams-badge--success{background:#edf8f2;color:#16714d}.hsm-exams-badge--warning{background:#fff5dc;color:#8b6214}.hsm-exams-badge--danger{background:#fff0f0;color:#a22}.hsm-exams-card .hsm-exams-actions{margin-top:16px}
.hsm-exams-modal{position:fixed;z-index:100001;inset:0;display:grid;place-items:center;padding:16px;background:rgba(17,27,47,.48)}.hsm-exams-modal__dialog{background:#fff;width:min(820px,100%);max-height:94vh;overflow:auto;border-radius:18px;padding:22px;box-shadow:0 20px 60px #14244130}.hsm-exams-modal-open{overflow:hidden}.hsm-exams-modal-heading{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:14px}.hsm-exams-steps{list-style:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:0;margin:0 0 14px;font-size:12px;color:var(--exam-muted)}.hsm-exams-steps li{padding:9px 4px;border-bottom:3px solid var(--exam-line)}.hsm-exams-steps [aria-current=step]{font-weight:700;color:var(--exam-primary);border-color:var(--exam-primary)}.hsm-exams-wizard-actions{justify-content:flex-end;padding-top:12px;border-top:1px solid var(--exam-line)}.hsm-exams-optional{padding:12px;border:1px dashed var(--exam-line);border-radius:10px}.hsm-exams-optional>summary{cursor:pointer;line-height:1.8}.hsm-exams-optional .hsm-exams-form-grid{margin-top:12px}.hsm-exams-preview,.hsm-exams-preset{padding:13px;background:var(--exam-soft);border-radius:10px;line-height:1.9;font-size:13px;overflow-wrap:anywhere}.hsm-exams-preview p,.hsm-exams-announcement{white-space:pre-wrap}.hsm-exams-preview p{max-height:170px;overflow:auto}.hsm-exams-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:13px;border:1px solid var(--exam-line);border-radius:10px;min-width:0}.hsm-exams-choice{display:flex!important;align-items:center;gap:8px;line-height:1.8}
.hsm-exams-result-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:18px 0}.hsm-exams-result-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,310px),1fr));gap:14px}.hsm-exams-result-card{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:11px;padding:16px;border:1px solid var(--exam-line);border-radius:12px;background:#fff}.hsm-exams-result-card>header{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;gap:8px}.hsm-exams-result-card h4{font-size:14px;margin:0}.hsm-exams-result-value{padding:11px;background:#edf8f2;border-radius:10px;font-size:13px;line-height:1.8}.hsm-exams-result-value span{display:block}.hsm-exams-result-value p{white-space:pre-wrap;margin:7px 0}.hsm-exams-grade-footer{position:sticky;bottom:0;z-index:2;margin-top:16px;padding:14px;background:#fff;border:1px solid var(--exam-line);border-radius:12px;box-shadow:0 -5px 20px #24335009}.hsm-exams-grade-footer p{margin:5px 0 10px;font-size:12px;color:var(--exam-muted)}.hsm-exams-form-message{color:#a22;line-height:1.8}.hsm-exams-form-message:not(:empty){padding:10px;background:#fff0f0;border-radius:9px}.hsm-exams-category-settings{margin-top:22px;padding:14px;border:1px solid var(--exam-line);border-radius:12px}.hsm-exams-category-settings summary{cursor:pointer;font-weight:600}.hsm-exams-category-row{margin-top:14px;padding-top:14px;border-top:1px solid var(--exam-line)}
@media(min-width:1100px){.hsm-exams-filters{grid-template-columns:repeat(3,minmax(0,1fr))}.hsm-exams-filters .hsm-exams-search{grid-column:auto}}
@media(max-width:650px){.hsm-exams{padding:15px;border-radius:15px}.hsm-exams-form,.hsm-exams-form-grid,.hsm-exams-filters,.hsm-exams-result-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))}.hsm-exams-modal{padding:8px}.hsm-exams-modal__dialog{padding:14px}.hsm-exams-steps{font-size:11px;gap:3px}.hsm-exams-card,.hsm-exams-result-card{padding:13px}.hsm-exams-actions>.hsm-exams-button{flex:1;padding-inline:8px;font-size:12px}.hsm-exams-form label:has([data-hsm-jalali]),.hsm-exams-result-toolbar .hsm-exams-search{grid-column:1/-1}.hsm-exams-grade-footer{padding:10px}.hsm-exams-toolbar>.hsm-exams-button{width:100%}.hsm-exams-choices{gap:8px}}
/* Grade actions stay in the form flow so they never cover names or score fields. */
.hsm-exams-grade-footer{position:static}
.hsm-exams-announcement img,.hsm-exams-announcement video{max-width:100%;height:auto}
.hsm-exams-announcement table{display:block;max-width:100%;overflow:auto}
.hsm-exams-table-wrap{overflow:auto;max-width:100%;border:1px solid var(--exam-line);border-radius:12px;margin-top:16px}.hsm-exams-table{width:100%;border-collapse:collapse;font-size:13px;min-width:680px}.hsm-exams-table th{background:var(--exam-soft);font-weight:600}.hsm-exams-table th,.hsm-exams-table td{padding:12px;text-align:right;border-bottom:1px solid var(--exam-line);vertical-align:middle}.hsm-exams-table small{display:block;color:var(--exam-muted);margin-top:5px}.hsm-exams-table .hsm-exams-actions{flex-wrap:nowrap}.hsm-exams-table td:first-child{min-width:180px}.hsm-exams-table .hsm-exams-button{font-size:12px;white-space:nowrap}.hsm-exams-table tr[hidden]{display:none!important}
/* One pupil per compact row; optional feedback opens in place. */
.hsm-exams-grade-table-wrap{max-width:100%;overflow:auto;border:1px solid var(--exam-line);border-radius:12px}
.hsm-exams-grade-table{width:100%;border-collapse:collapse;font-size:13px;table-layout:fixed}
.hsm-exams-grade-table th,.hsm-exams-grade-table td{padding:10px;text-align:right;border-bottom:1px solid var(--exam-line);vertical-align:top;overflow-wrap:anywhere}
.hsm-exams-grade-table th{background:var(--exam-soft);font-weight:600}
.hsm-exams-grade-table thead th:first-child{width:20%}.hsm-exams-grade-table tr:last-child td{border-bottom:0}
.hsm-exams-grade-table .hsm-exams-result-grid{display:table-row-group}
.hsm-exams-grade-table label{font-size:11px}.hsm-exams-grade-table input,.hsm-exams-grade-table select{min-height:44px;padding:8px;font-size:13px}
.hsm-exams-student-cell h4{font-size:13px;margin:0;line-height:1.8}
.hsm-exams-feedback summary{min-height:44px;display:flex;align-items:center;cursor:pointer;color:var(--exam-primary);font-size:12px;line-height:1.6;list-style-position:inside}
.hsm-exams-feedback label{padding-top:8px}.hsm-exams-feedback p{max-height:180px;overflow:auto;font-size:12px;white-space:pre-wrap}
.hsm-exams-feedback[open]{min-width:180px}.hsm-exams-result-status .hsm-exams-button{padding:6px;margin-top:8px;font-size:11px}
.hsm-exams-cell-label{display:none}.hsm-exams-advanced{margin:-4px 0 16px}.hsm-exams-advanced>summary{min-height:44px;display:flex;align-items:center;color:var(--exam-muted);cursor:pointer;font-size:12px}
.hsm-exams-advanced .hsm-exams-form-grid{padding:12px;background:var(--exam-soft);border-radius:12px}
.hsm-exams-pagination{display:flex;justify-content:center;align-items:center;gap:12px;padding:14px 0 0}.hsm-exams-pagination small{min-width:130px;text-align:center}.hsm-exams-pagination .hsm-exams-button{min-height:44px}
.hsm-exams-information>summary{min-height:44px;display:flex;align-items:center;cursor:pointer;color:var(--exam-primary);font-size:12px}.hsm-exams-information p{font-size:12px;line-height:1.8}.hsm-exams-detail .hsm-exams-actions{margin-top:6px}
@media(min-width:1100px){.hsm-exams-filters{grid-template-columns:repeat(4,minmax(0,1fr))}.hsm-exams-filters .hsm-exams-search{grid-column:auto}}
@media(max-width:760px){
.hsm-exams-grade-table-wrap{overflow:visible;border:0}.hsm-exams-grade-table,.hsm-exams-grade-table .hsm-exams-result-grid{display:block}
.hsm-exams-grade-table thead{display:none}.hsm-exams-grade-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px;border:1px solid var(--exam-line);border-radius:12px;margin-bottom:10px}
.hsm-exams-grade-table td{padding:0;border:0;min-width:0}.hsm-exams-grade-table .hsm-exams-student-cell{grid-column:1/-1}
.hsm-exams-cell-label{display:block;color:var(--exam-muted);font-size:11px;margin-bottom:6px}.hsm-exams-feedback[open]{min-width:0}
.hsm-exams-grade-table .hsm-exams-feedback-cell:has(details[open]){grid-column:1/-1}.hsm-exams-grade-table .hsm-exams-result-status{display:flex;align-items:flex-start;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.hsm-exams-table-wrap{overflow:visible;border:0}.hsm-exams-table,.hsm-exams-table tbody{display:block;min-width:0}
.hsm-exams-table thead{display:none}.hsm-exams-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid var(--exam-line);border-radius:12px;padding:12px;gap:10px;margin-bottom:10px}
.hsm-exams-table td{padding:0;border:0;min-width:0}.hsm-exams-table td:first-child{grid-column:1/-1;min-width:0}.hsm-exams-table td:last-child{grid-column:1/-1}.hsm-exams-table td[data-label]::before{content:attr(data-label);display:block;font-size:11px;color:var(--exam-muted);margin-bottom:4px}
.hsm-exams-table .hsm-exams-actions{flex-wrap:wrap}.hsm-exams-result-toolbar .hsm-exams-search{grid-column:auto}
}
