.grades-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:7px 0 24px;border-bottom:1px solid #dce4d5;margin-bottom:22px}.grades-heading h2{font-size:30px;line-height:1.5;margin:7px 0}.grades-heading p:not(.eyebrow){font-size:13px;color:#6b806b;line-height:1.8}.grades-controls{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin:0 0 18px}.grades-controls label,.grades-history-filters label{display:flex;flex-direction:column;gap:7px;font-size:12px;color:#6d7e68;min-width:0;flex:1 1 170px}.grades-controls select,.grades-history-filters input,.grades-history-filters select{width:100%;min-width:0}.grades-source{font-size:12px;color:#788a70;margin:10px 0 20px;line-height:1.9}.grades-source summary{cursor:pointer;width:fit-content;padding:5px 0}.grades-source p{padding:10px 0;overflow-wrap:anywhere}.grades-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:20px 0 25px}.grades-metrics>div{border:1px solid #dce6d6;background:#fff;border-radius:14px;padding:18px 20px;min-width:0}.grades-metrics span{font-size:12px;color:#7b8e71;display:block}.grades-metrics strong{font-size:29px;font-weight:600;display:block;margin-top:10px;font-variant-numeric:tabular-nums}.grades-tabs{display:flex;gap:6px;border-bottom:1px solid #d5dfce;margin-bottom:20px;flex-wrap:wrap}.grades-tabs button{background:transparent;color:#7d8c74;padding:13px 20px;font-size:14px;border-bottom:3px solid transparent;line-height:1.6}.grades-tabs button[aria-selected=true]{border-bottom-color:#285e49;color:#285e49;font-weight:700}.grades-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.grades-student{display:flex;flex-direction:column;align-items:stretch;gap:12px;background:#fff;border:1px solid #dce5d5;border-radius:14px;padding:18px;text-align:start;color:#31503d;min-width:0;min-height:205px}.grades-student:hover{border-color:#729069;box-shadow:0 3px 14px #1c51300c}.grades-student-top{display:flex;justify-content:space-between;gap:8px;font-size:11px;color:#8a9780;flex-wrap:wrap}.grades-student>strong{font-size:20px;line-height:1.8;overflow-wrap:anywhere;unicode-bidi:plaintext}.grades-current{font-size:34px;line-height:1.25;font-weight:600;text-align:start;font-variant-numeric:tabular-nums;margin-top:auto}.grades-current small{font-size:15px;color:#9ca58e;font-weight:400}.grades-student-bottom{font-size:12px;color:#7e8e74;line-height:1.6}.grades-student.grades-low{background:#fff8ef;border-color:#e8d7bd}.grades-low .grades-current{color:#9a6d36}.grades-history-filters{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin:20px 0 15px}.grades-history-filters .grades-check{flex-direction:row;align-items:center;gap:9px;flex:1 1 220px;min-height:44px}.grades-check input{width:17px;min-height:17px;accent-color:#285e49}.grades-history .grades-reason{min-width:220px;max-width:420px;white-space:normal;line-height:1.8;overflow-wrap:anywhere}.grades-reason p{white-space:pre-wrap;font-size:12px;color:#829079;line-height:1.9;padding:8px 0}.grades-reason details{margin-top:8px;font-size:12px}.grades-reason summary{cursor:pointer;color:#7c8e70}.grades-history td{vertical-align:top}.grades-summary td{font-variant-numeric:tabular-nums}.grades-score-preview{display:flex;align-items:center;justify-content:center;gap:15px;padding:20px 15px;background:#eff4e9;border-radius:13px;margin:16px 0}.grades-score-preview strong{font-size:34px;line-height:1.25}.grades-score-preview span{font-size:18px;color:#a36c38}.grades-modal-name{font-size:21px!important;font-weight:600;color:#31533f!important;line-height:1.85!important}#modal select{width:100%;margin:7px 0 16px}#modal textarea{margin:7px 0 12px;min-height:100px}#modal label{display:block;font-size:13px;line-height:1.8}
@media(min-width:1550px){.grades-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1100px){.grades-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.grades-metrics>div{padding:16px}}
@media(max-width:650px){.grades-heading{align-items:flex-start;flex-wrap:wrap;gap:14px}.grades-heading h2{font-size:25px}.grades-heading>.button{width:100%;justify-content:center}.grades-controls label{flex-basis:calc(50% - 12px)}.grades-controls .button{flex:1 1 calc(50% - 12px);font-size:13px}.grades-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.grades-metrics strong{font-size:27px}.grades-tabs button{flex:1;padding:11px 9px;font-size:13px}.grades-history-filters label{flex-basis:calc(50% - 12px)}.grades-history-filters .grades-check{flex-basis:100%}}
@media(max-width:480px){.grades-grid{grid-template-columns:1fr}.grades-student{min-height:185px;padding:18px}.grades-student>strong{font-size:22px}.grades-current{font-size:36px}.grades-source{font-size:12px}.grades-history-filters .grades-check{font-size:13px}}
html[dir=rtl] .grades-student{text-align:right}html[dir=rtl] .grades-current{text-align:right}html[dir=rtl] .grades-student>strong{letter-spacing:0;line-height:1.9}html[dir=rtl] .grades-tabs button{font-size:15px}html[dir=rtl] .grades-reason{font-size:14px;line-height:2}

/* Individual history and one-record rewards, including Arabic and mobile layouts. */
.grades-student-hint{font-size:12px;color:var(--accent,#8a5d20);line-height:1.7}
#modal:has(.grades-personal-history){max-width:620px;max-height:calc(100dvh - 32px);overflow:auto;padding:24px}
.grades-personal-history{margin:20px 0;border:1px solid #e1e5dc;border-radius:13px;padding:16px;background:#fafbf8}
.grades-personal-history h3,.grades-bonus-preview h3{font-size:16px;line-height:1.8}.grades-personal-history h3 small{font-size:12px;margin-inline-start:8px}
.grades-personal-history>p{font-size:12px;margin:5px 0 12px}
.grades-personal-scroll{max-height:260px;overflow-y:auto;overscroll-behavior:contain;padding-inline-end:7px;scrollbar-gutter:stable}
.grades-personal-record{border-top:1px solid #e1e5dc;padding:12px 0}.grades-personal-record:first-child{border-top:0;padding-top:0}
.grades-personal-meta{display:flex;gap:7px 14px;flex-wrap:wrap;color:#728075;font-size:11px;line-height:1.8}
.grades-personal-record-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:7px 0;font-size:12px}.grades-personal-record-title>strong{font-size:21px;color:#9d5a29}
.grades-personal-record p{font-size:14px;line-height:1.8;margin:6px 0;white-space:pre-wrap;overflow-wrap:anywhere}.grades-personal-record .data-note{font-size:12px}
.grades-plus,.grades-personal-record-title>strong.grades-plus{color:#226c50}.grades-offset-tag{background:#e0f0e8;color:#226c50}
.grades-bonus-preview{padding:16px;background:#eef7f1;border:1px solid #cce1d4;border-radius:13px;margin:18px 0 24px}.grades-bonus-preview p{color:#3c6650;font-size:13px;margin:8px 0;overflow-wrap:anywhere}.grades-bonus-preview bdi{font-size:22px;font-weight:600}.grades-bonus-preview .data-note{font-size:12px}
#modal .button.grades-bonus-button{background:#226c50;color:white}#modal:has(.grades-personal-history) .modal-actions{position:sticky;bottom:-24px;z-index:2;background:#fff;border-top:1px solid #e1e5dc;padding:14px 0 4px;gap:8px;flex-wrap:wrap}
#modal:has(.grades-personal-history) .modal-actions .button{flex:1 1 auto;font-size:13px}
@media(max-width:520px){#modal:has(.grades-personal-history){padding:18px;width:calc(100% - 20px);border-radius:14px}#modal:has(.grades-personal-history) .modal-actions{bottom:-18px}.grades-personal-history{padding:12px}.grades-personal-scroll{max-height:220px}#modal:has(.grades-personal-history) .modal-actions .grades-bonus-button{flex-basis:100%;order:-1}}
html[dir=rtl] .grades-personal-record p{line-height:2}html[dir=rtl] .grades-personal-meta{font-size:12px}
