.stats-modal{max-width:700px;max-height:calc(100vh - 40px);min-height:min(600px,calc(100vh - 40px));overflow:hidden;text-align:left;padding-top:var(--space-lg);padding-bottom:var(--space-md);display:flex;flex-direction:column}.stats-modal>h2,.stats-modal>.stats-activity-row,.stats-modal>.close-modal-btn{flex-shrink:0}.stats-modal>.close-modal-btn{z-index:10}.stats-modal>h2{padding-right:2.5rem}.stats-modal:before{display:none}#tableStudentsModal{z-index:1100}#studentStatsModal{z-index:1150}#tableDrilldownModal{z-index:1200}.stats-modal #closeStatsBtn{display:block;margin:10px auto 0}.stats-section{margin-bottom:12px;background:var(--seat-bg);border-radius:12px;padding:12px 16px;flex-shrink:0}.stats-section h3{margin:0 0 8px;font-size:1rem;color:var(--text-color-primary);font-weight:700;border-bottom:none;padding-bottom:0;letter-spacing:-.01em}#viewStatsBtn{background:linear-gradient(135deg,#9b59b6,#8e44ad);margin-bottom:10px;display:block;margin-left:auto;margin-right:auto}#viewStatsBtn:hover{background:linear-gradient(135deg,#a66bbe,#9b59b6)}#pupilViewStatsBtn{background:linear-gradient(135deg,#9b59b6,#8e44ad);margin-bottom:10px;display:block;margin-left:auto;margin-right:auto}#pupilViewStatsBtn:hover{background:linear-gradient(135deg,#a66bbe,#9b59b6)}.stats-tabs{display:flex;gap:0;margin-bottom:12px;flex-shrink:0;background:var(--seat-bg);border-radius:10px;padding:4px}.stats-tab{flex:1;padding:8px 16px;border:none;background:transparent;color:var(--text-color-secondary);font-size:.95rem;font-weight:600;cursor:pointer;border-radius:8px;transition:all .2s ease}.stats-tab:hover:not(.active){background:var(--border-color);color:var(--text-color-primary)}.stats-tab.active{color:#fff}.stats-tab.active[data-tab=practice],.stats-tab.active[data-tab=school-practice]{background:linear-gradient(135deg,var(--color-accent-success) 0%,#3ea55f 100%);box-shadow:0 2px 8px #4caf504d}.stats-tab.active[data-tab=test],.stats-tab.active[data-tab=school-test]{background:linear-gradient(135deg,#0793d1,#2980b9);box-shadow:0 2px 8px #0793d14d}.stats-tab.active[data-tab=mtc],.stats-tab.active[data-tab=school-mtc]{background:linear-gradient(135deg,#9c27b0,#7b1fa2);box-shadow:0 2px 8px #9c27b04d}.stats-tab-content{display:none}.stats-tab-content.active{display:flex;flex-direction:column;flex:1;min-height:0;overflow-y:auto;padding-top:4px}.stats-tab-content.active .stats-section:last-child{margin-bottom:0}.stats-modal .table-stat-label{font-size:.9rem;margin-bottom:3px}.stats-modal .table-stat-percent{font-size:1.05rem}.stats-modal .table-stat-time{font-size:.75rem;margin-top:2px;padding:1px 5px}.stats-activity-row{display:flex;justify-content:center;align-items:center;gap:16px;flex-wrap:wrap;padding:8px 12px;margin-bottom:12px;font-size:.85rem;background:var(--bg-color);border-radius:8px}.stats-last-activity{display:flex;align-items:center}.stats-total-activity{display:flex;align-items:center;gap:12px}.total-activity-item{display:flex;align-items:center}.total-activity-label{color:var(--text-color-secondary)}.total-activity-value{font-weight:600;margin-left:4px;color:var(--text-color)}.last-activity-label{color:var(--text-color-secondary)}.last-activity-value{font-weight:600;margin-left:4px}.last-activity-value.recent{color:#2ecc71}.last-activity-value.moderate{color:#f39c12}.last-activity-value.old{color:#e74c3c}.last-activity-value.never{color:var(--text-color-secondary)}.stats-pin-section{display:flex;justify-content:center;margin-bottom:12px}.stats-pin-row{display:flex;align-items:center;gap:12px;background:linear-gradient(135deg,#6c5ce726,#5b4cdb40);border:1px solid rgba(108,92,231,.4);padding:10px 16px;border-radius:8px}.stats-pin-label{color:var(--text-color-secondary);font-size:.9rem}.stats-pin-value{font-family:Courier New,monospace;font-size:1.3rem;font-weight:700;color:var(--text-color);letter-spacing:3px;background:var(--bg-color);padding:4px 12px;border-radius:6px;min-width:70px;text-align:center}.stats-pin-regenerate-btn{font-size:.8rem!important;padding:6px 12px!important;background:linear-gradient(135deg,#6c5ce7,#5b4cdb)!important}.stats-pin-regenerate-btn:hover{background:linear-gradient(135deg,#5b4cdb,#4a3bc9)!important}.stats-level-recommendation{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;padding:12px 16px;margin-bottom:12px;border-radius:8px;font-size:.9rem}.stats-level-recommendation.recommend-up{background:linear-gradient(135deg,#2ecc7126,#27ae6040);border:2px solid #2ecc71}.stats-level-recommendation.recommend-down{background:linear-gradient(135deg,#e74c3c26,#c0392b40);border:2px solid #e74c3c}.stats-level-recommendation.recommend-stay-high{background:linear-gradient(135deg,#f1c40f26,#f39c1240);border:2px solid #f1c40f}.stats-level-recommendation.recommend-stay{background:linear-gradient(135deg,#3498db26,#2980b940);border:2px solid #3498db}.stats-nearly-there{display:flex;align-items:center;gap:.75rem;padding:10px 14px;margin-bottom:12px;border-radius:8px;background:#3498db1a;border:1px solid rgba(52,152,219,.25);font-size:.9rem;line-height:1.4}.recommend-stay-high .recommendation-icon,.recommend-stay .recommendation-icon{color:#f39c12}.recommendation-icon{font-size:1.2rem;font-weight:700}.recommend-up .recommendation-icon{color:#2ecc71}.recommend-down .recommendation-icon{color:#e74c3c}.recommendation-text{font-weight:600;color:var(--text-color-primary)}.recommendation-reason{width:100%;text-align:center;font-size:.8rem;color:var(--text-color-secondary)}.recommendation-apply-btn{width:100%;margin-top:8px;padding:8px 16px;border:none;border-radius:6px;font-size:.85rem;font-weight:600;cursor:pointer;transition:all .2s ease}.recommend-up .recommendation-apply-btn{background:#2ecc71;color:#fff}.recommend-up .recommendation-apply-btn:hover{background:#27ae60;transform:translateY(-1px);box-shadow:0 2px 8px #2ecc7166}.recommend-down .recommendation-apply-btn{background:#e74c3c;color:#fff}.recommend-down .recommendation-apply-btn:hover{background:#c0392b;transform:translateY(-1px);box-shadow:0 2px 8px #e74c3c66}.recommendation-apply-btn:active{transform:translateY(0)}.recent-tests{display:flex;flex-direction:column;gap:5px}.recent-test-item{display:flex;align-items:center;justify-content:space-between;padding:7px 12px;background:var(--bg-color);border-radius:8px;font-size:.85rem}.recent-test-date{color:var(--text-color-secondary);font-size:.85rem;min-width:100px}.recent-test-score{font-weight:600;color:var(--text-color-primary);min-width:60px;text-align:center}.inactivity-flag{color:#f0ad4e;font-size:.85em;cursor:help}.recent-test-bar{flex:1;height:8px;background:var(--border-color);border-radius:4px;margin:0 12px;overflow:hidden}.recent-test-bar-fill{height:100%;border-radius:4px;transition:width .3s ease}.recent-test-bar-fill.excellent{background:linear-gradient(90deg,#2ecc71,#27ae60)}.recent-test-bar-fill.good{background:linear-gradient(90deg,#f1c40f,#f39c12)}.recent-test-bar-fill.needs-work{background:linear-gradient(90deg,#e74c3c,#c0392b)}.no-data{color:var(--text-color-secondary);font-style:italic;text-align:center;padding:10px}.table-stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin-bottom:8px}.table-stat-cell{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:6px 3px;border-radius:8px;background:var(--bg-color);transition:transform .2s ease,box-shadow .2s ease}.table-stat-cell:hover{transform:translateY(-2px);box-shadow:0 4px 12px #00000026}.table-stat-label{font-size:.75rem;font-weight:600;color:var(--text-color-secondary);margin-bottom:4px}.table-stat-percent{font-size:.85rem;font-weight:700}.table-stat-cell.strong{background:linear-gradient(135deg,#2ecc7133,#27ae604d);border:2px solid #2ecc71}.table-stat-cell.strong .table-stat-percent{color:#2ecc71}.table-stat-cell.ok{background:linear-gradient(135deg,#f1c40f33,#f39c124d);border:2px solid #f1c40f}.table-stat-cell.ok .table-stat-percent{color:#f39c12}.table-stat-cell.struggling{background:linear-gradient(135deg,#e74c3c33,#c0392b4d);border:2px solid #e74c3c}.table-stat-cell.struggling .table-stat-percent{color:#e74c3c}.table-stat-cell.no-data{background:var(--bg-color);border:2px dashed var(--border-color);opacity:.6}.table-stat-cell.no-data .table-stat-percent{color:var(--text-color-secondary)}.table-stat-time{font-size:.65rem;font-weight:500;margin-top:2px;padding:1px 4px;border-radius:3px}.table-stat-time.time-fast{color:#2ecc71;background:#2ecc7126}.table-stat-time.time-ok{color:#f39c12;background:#f39c1226}.table-stat-time.time-slow{color:#e74c3c;background:#e74c3c26}.stats-legend{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:6px 10px;font-size:.7rem;color:var(--text-color-secondary);margin-top:6px}.legend-item{display:flex;align-items:center;gap:5px}.legend-dot{width:12px;height:12px;border-radius:3px}.legend-dot.strong{background:#2ecc71}.legend-dot.ok{background:#f1c40f}.legend-dot.struggling{background:#e74c3c}.legend-dot.no-data{background:var(--border-color);border:1px dashed var(--text-color-secondary)}.legend-help-link{color:#5dade2;cursor:pointer;font-size:.75rem;font-weight:600;transition:all .2s ease;margin-left:4px;text-decoration:none}.legend-help-link:hover{color:#7ec8e3;text-decoration:underline}body.light-mode .legend-help-link{color:#2980b9}body.light-mode .legend-help-link:hover{color:#1a5276}#statsHelpModal{z-index:2000}.stats-help-modal{max-width:calc(100vw - 2rem);width:calc(100vw - 2rem);text-align:left;max-height:90vh;overflow-y:auto}.stats-help-modal:before{display:none}.stats-help-modal h2{margin-bottom:20px;font-size:1.3rem}.stats-help-section{margin-bottom:20px;padding-bottom:15px;border-bottom:1px solid var(--border-color)}.stats-help-section:last-of-type{border-bottom:none;margin-bottom:10px}.stats-help-columns{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.stats-help-columns .stats-help-section{margin-bottom:0;border-bottom:none;padding:12px;background:#ffffff08;border-radius:10px;border:1px solid var(--border-color)}body.light-mode .stats-help-columns .stats-help-section{background:#00000005}@media(max-width:768px){.stats-help-columns{grid-template-columns:1fr}}.stats-help-section h3{font-size:1rem;margin-bottom:10px;color:var(--text-color-primary)}.stats-help-section p{font-size:.9rem;color:var(--text-color-secondary);margin-bottom:10px;line-height:1.5}.stats-help-colors{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:15px 0}.stats-help-color-item{display:flex;align-items:center;gap:10px;padding:8px 12px;background:#ffffff08;border-radius:8px}.stats-help-color-item .legend-dot{width:16px;height:16px;flex-shrink:0}.stats-help-color-item div{display:flex;flex-direction:column}.stats-help-color-item strong{font-size:.85rem;color:var(--text-color-primary)}.stats-help-color-item span{font-size:.75rem;color:var(--text-color-secondary)}.stats-help-list{list-style:none;padding:0;margin:10px 0}.stats-help-list li{font-size:.85rem;color:var(--text-color-secondary);padding:5px 0 5px 20px;position:relative}.stats-help-list li:before{content:"\2022";position:absolute;left:5px;color:var(--primary-color)}.text-strong{color:#2ecc71;font-weight:600}.text-ok{color:#f1c40f;font-weight:600}.text-struggling{color:#e74c3c;font-weight:600}body.pupil-mode .legend-help-link{display:none}.mtc-overview-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:10px}.mtc-overview-stats .overview-stat{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:10px;padding:15px 10px;text-align:center}.mtc-overview-stats .overview-value{font-size:1.5rem;font-weight:700;color:var(--text-color-primary);margin-bottom:4px}.mtc-overview-stats .overview-label{font-size:.75rem;color:var(--text-color-secondary);text-transform:uppercase;letter-spacing:.5px}.mtc-overview-stats .overview-value.trend-up{color:#2ecc71}.mtc-overview-stats .overview-value.trend-down{color:#e74c3c}.mtc-overview-stats .overview-value.trend-neutral{color:#f39c12}.recent-mtc-item{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;padding:12px;background:#ffffff08;border:1px solid rgba(255,255,255,.08);border-radius:8px;transition:all .2s ease}.recent-mtc-item:hover{background:#ffffff0f;border-color:#ffffff26}.recent-mtc-date{font-size:.85rem;color:var(--text-color-secondary);white-space:nowrap}.recent-mtc-score-section{display:flex;flex-direction:column;gap:4px}.recent-mtc-score{font-size:1.1rem;font-weight:600}.recent-mtc-score.pass{color:#2ecc71}.recent-mtc-score.close{color:#f39c12}.recent-mtc-score.fail{color:#e74c3c}.recent-mtc-bar{height:6px;background:#ffffff1a;border-radius:3px;overflow:hidden;position:relative}.recent-mtc-bar-fill{height:100%;border-radius:3px;transition:width .3s ease}.recent-mtc-bar-fill.pass{background:linear-gradient(90deg,#2ecc71,#27ae60)}.recent-mtc-bar-fill.close{background:linear-gradient(90deg,#f1c40f,#f39c12)}.recent-mtc-bar-fill.fail{background:linear-gradient(90deg,#e74c3c,#c0392b)}.recent-mtc-bar-threshold{position:absolute;left:80%;top:0;bottom:0;width:2px;background:#fff6}.recent-mtc-struggled{font-size:.8rem;color:#e74c3c;text-align:right;max-width:150px}@media(max-width:600px){.mtc-overview-stats{grid-template-columns:repeat(2,1fr)}.recent-mtc-item{grid-template-columns:1fr;gap:8px}.recent-mtc-struggled{text-align:left;max-width:none}}.table-stat-cell.clickable{cursor:pointer}.table-stat-cell.clickable:hover{transform:translateY(-3px);box-shadow:0 6px 16px #0003}.table-stat-cell.clickable:after{content:"\203a";position:absolute;top:4px;right:6px;font-size:.7rem;opacity:.4;transition:opacity .2s}.table-stat-cell{position:relative}.table-stat-cell.clickable:hover:after{opacity:.8}.drilldown-modal{max-width:700px}.drilldown-subtitle{color:var(--text-color-secondary);font-size:.9rem;margin:-10px 0 15px;text-align:center}.drilldown-summary{display:flex;justify-content:space-around;gap:10px;margin-bottom:20px;padding:12px;background:var(--bg-color);border-radius:10px}.drilldown-summary-item{text-align:center}.drilldown-summary-value{font-size:1.4rem;font-weight:700;color:var(--text-color-primary);display:block}.drilldown-summary-value.strong{color:#2ecc71}.drilldown-summary-value.ok{color:#f39c12}.drilldown-summary-value.struggling{color:#e74c3c}.drilldown-summary-value.time-fast{color:#2ecc71}.drilldown-summary-value.time-ok{color:#f39c12}.drilldown-summary-value.time-slow{color:#e74c3c}.drilldown-summary-label{font-size:.75rem;color:var(--text-color-secondary);text-transform:uppercase;letter-spacing:.5px}.drilldown-grid-container{margin-bottom:15px}.drilldown-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.drilldown-cell{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:12px 8px;border-radius:8px;background:var(--bg-color);min-height:85px;box-sizing:border-box}.drilldown-cell.strong{background:linear-gradient(135deg,#2ecc7133,#27ae604d);border:2px solid #2ecc71}.drilldown-cell.ok{background:linear-gradient(135deg,#f1c40f33,#f39c124d);border:2px solid #f1c40f}.drilldown-cell.struggling{background:linear-gradient(135deg,#e74c3c33,#c0392b4d);border:2px solid #e74c3c}.drilldown-cell.no-data{background:var(--bg-color);border:2px dashed var(--border-color);opacity:.6}.drilldown-cell-label{font-size:.85rem;font-weight:600;color:var(--text-color-primary);margin-bottom:4px}.drilldown-cell-percent{font-size:1rem;font-weight:700}.drilldown-cell.strong .drilldown-cell-percent{color:#2ecc71}.drilldown-cell.ok .drilldown-cell-percent{color:#f39c12}.drilldown-cell.struggling .drilldown-cell-percent{color:#e74c3c}.drilldown-cell.no-data .drilldown-cell-percent{color:var(--text-color-secondary)}.drilldown-cell-attempts{font-size:.7rem;color:var(--text-color-secondary);margin-top:2px}.drilldown-cell-time{font-size:.65rem;font-weight:500;margin-top:3px;padding:1px 5px;border-radius:3px}.drilldown-cell-time.time-fast{color:#2ecc71;background:#2ecc7126}.drilldown-cell-time.time-ok{color:#f39c12;background:#f39c1226}.drilldown-cell-time.time-slow{color:#e74c3c;background:#e74c3c26}.drilldown-legend{margin-top:10px;margin-bottom:15px}@media(max-width:500px){.drilldown-grid{grid-template-columns:repeat(3,1fr);gap:8px}.drilldown-cell{min-height:75px;padding:10px 6px}}.stats-summary{display:flex;flex-direction:column;gap:10px}.summary-row{display:flex;justify-content:space-between;align-items:center;padding:8px 0;border-bottom:1px solid var(--border-color)}.summary-row:last-child{border-bottom:none}.summary-label{color:var(--text-color-secondary);font-size:.9rem}.summary-value{font-weight:600;color:var(--text-color-primary);font-size:.95rem}.summary-value.strong-text{color:#2ecc71}.summary-value.struggling-text{color:#e74c3c}.class-overview{display:flex;justify-content:space-around;gap:15px}.overview-stat{text-align:center;padding:15px;background:var(--bg-color);border-radius:10px;flex:1}.overview-value{font-size:1.8rem;font-weight:700;color:var(--text-color-primary);margin-bottom:5px}.overview-label{font-size:.8rem;color:var(--text-color-secondary);text-transform:uppercase;letter-spacing:.5px}.overview-value-compact{font-size:1rem;line-height:1.4}.practice-struggles-list{display:flex;flex-direction:column;gap:2px;text-align:center}.practice-struggle-item{font-size:.95rem;font-weight:600}.practice-struggle-item .struggle-table{color:var(--text-color-primary)}.practice-struggle-item .struggle-percent{font-weight:400;color:var(--text-color-secondary);font-size:.85rem}.practice-recommendation{font-size:1rem;color:var(--text-color-primary);text-align:center;line-height:1.5;padding:2px}.practice-recommendation .rec-label{font-size:.8rem;color:var(--text-color-secondary);margin-bottom:4px}.practice-recommendation .rec-table{font-weight:700;font-size:1.4rem;color:#9b59b6}.practice-recommendation .rec-stats{font-weight:500;font-size:.85rem;color:var(--text-color-secondary)}.practice-overview-section .class-overview{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.practice-overview-section .overview-stat{position:relative;padding:16px;border-radius:16px;background:linear-gradient(135deg,#ffffff0f,#ffffff05);border:1px solid rgba(255,255,255,.1);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;overflow:hidden;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px}.practice-overview-section .overview-stat:before{content:"";position:absolute;top:0;left:0;right:0;height:3px;border-radius:16px 16px 0 0;opacity:.9}.practice-overview-section .overview-stat:hover{transform:translateY(-2px);box-shadow:0 8px 24px #00000040;border-color:#fff3}.practice-overview-section .overview-stat:nth-child(1){background:linear-gradient(135deg,#0793d11f,#2980b914);border-color:#0793d140}.practice-overview-section .overview-stat:nth-child(1):before{background:linear-gradient(90deg,#0793d1,#2980b9)}.practice-overview-section .overview-stat:nth-child(1) .overview-value{color:#0793d1;font-size:1.8rem;font-weight:700}.practice-overview-section .overview-stat:nth-child(2){background:linear-gradient(135deg,#27ae601f,#2ecc7114);border-color:#27ae6040}.practice-overview-section .overview-stat:nth-child(2):before{background:linear-gradient(90deg,#27ae60,#2ecc71)}.practice-overview-section .overview-stat:nth-child(2) .overview-value{color:#2ecc71;font-size:1.8rem;font-weight:700}.practice-overview-section .overview-stat:nth-child(3){background:linear-gradient(135deg,#9b59b61f,#8e44ad14);border-color:#9b59b640}.practice-overview-section .overview-stat:nth-child(3):before{background:linear-gradient(90deg,#9b59b6,#8e44ad)}.practice-overview-section .overview-stat:nth-child(3) .overview-value{color:var(--text-color-primary);font-size:.9rem;font-weight:500}.practice-overview-section .overview-stat:nth-child(4){background:linear-gradient(135deg,#f39c120d,#f1c40f08);border-color:#f39c1266}.practice-overview-section .overview-stat:nth-child(4):before{background:linear-gradient(90deg,#f39c12,#f1c40f)}.practice-overview-section .overview-stat:nth-child(4) .overview-value{color:#f39c12;font-size:1.8rem;font-weight:700}.practice-overview-section .overview-label{font-size:.95rem;font-weight:600;color:#fffc;text-transform:uppercase;letter-spacing:.8px}.practice-overview-section .overview-sublabel{font-size:.7rem;font-weight:400;color:#ffffff80;text-transform:lowercase;margin-top:2px}body.light-mode .practice-overview-section .overview-stat{background:linear-gradient(135deg,#00000008,#00000003);border-color:#0000001a}body.light-mode .practice-overview-section .overview-stat:nth-child(1){background:linear-gradient(135deg,#0793d114,#2980b90d)}body.light-mode .practice-overview-section .overview-stat:nth-child(2){background:linear-gradient(135deg,#27ae6014,#2ecc710d)}body.light-mode .practice-overview-section .overview-stat:nth-child(3){background:linear-gradient(135deg,#9b59b614,#8e44ad0d)}body.light-mode .practice-overview-section .overview-stat:nth-child(4){background:linear-gradient(135deg,#f39c1214,#f1c40f0d)}body.light-mode .practice-overview-section .overview-label{color:#0009}@media(max-width:768px){.practice-overview-section .class-overview{grid-template-columns:1fr 1fr;gap:12px}}@media(max-width:480px){.practice-overview-section .class-overview{grid-template-columns:1fr;gap:12px}}.practice-level-spread{display:flex;flex-direction:column;gap:3px;text-align:center}.practice-level-band{font-size:.85rem;display:flex;justify-content:center;align-items:center;gap:6px}.practice-level-band .level-range{color:var(--text-color-secondary);font-weight:400;min-width:50px;text-align:right}.practice-level-band .level-count{font-weight:700;color:var(--text-color-primary);min-width:30px;text-align:left}
