/* Course views */
.stat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:12px 0 20px}
.stat-card{background:#f2f6fe;border:1px solid #dce6f7;border-radius:12px;padding:18px;display:flex;flex-direction:column;gap:3px;color:#315386}
.stat-card strong{font-size:2rem;line-height:1.1;color:#173b8b}
.compact-field{display:flex;align-items:center;gap:10px;font-size:.9rem;color:#50627e;font-weight:650}
.compact-field select{min-width:190px}.grow{flex:1;min-width:220px}.top-gap{margin-top:18px}
.inline-input{display:flex;gap:8px}.inline-input input{flex:1;min-width:100px}
.checkbox-line{display:flex;gap:9px;align-items:center;margin:12px 0 18px;color:#42536f}
.assignment-row{display:flex;align-items:center;gap:12px;border:1px solid #dce5f2;border-radius:11px;padding:13px 16px;cursor:pointer;background:#fff}
.assignment-row:hover{background:#f7faff;border-color:#9bb6e2}.assignment-row input{width:18px;height:18px;accent-color:#173b8b}
.selection-list{max-height:370px;overflow-y:auto;padding-right:4px}
.assignment-row small{display:block;color:#67768c;margin-top:2px}.test-case{border:1px solid #dce5f2;padding:16px;border-radius:12px;background:#fafcff}
.progress-track{background:#e5edf9;height:9px;border-radius:10px;overflow:hidden;min-width:120px;margin-bottom:6px}.progress-track span{display:block;height:100%;background:#067664}
.modal-overlay{position:fixed;inset:0;background:#10254499;z-index:40;display:flex;align-items:center;justify-content:center;padding:18px}
.modal-card{width:min(100%,480px);margin:0}.drop-zone{margin:15px 0}.drop-zone:focus-visible{outline:3px solid #82b8ff}
.topic-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px;margin:15px 0}
.topic-card{text-align:left;border:1px solid #d7e1ef;border-radius:12px;background:#fff;padding:20px;cursor:pointer;color:#173b8b}
.topic-card strong{display:block;font-size:1.1rem}.topic-card small{display:block;color:#61728b;margin-top:7px}.topic-card:hover,.topic-card.active{border-color:#3163b4;background:#eef4ff}
.student-layout{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(290px,.9fr);gap:16px;align-items:start}
.editor-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.editor-tools select{width:auto;min-width:125px}
.code-workspace .CodeMirror,.code-workspace textarea.code{min-height:340px;font-size:15px}
.io-panel{margin-top:15px}.io-panel textarea{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}
.result-matrix{min-width:max-content}.result-matrix th,.result-matrix td{min-width:140px;max-width:220px;white-space:normal}.result-matrix th:first-child{position:sticky;left:0;z-index:2;background:white;min-width:160px}.result-matrix thead th{vertical-align:bottom}.result-matrix .matrix-topic,.result-matrix small{display:block;color:#65738b;font-size:.8rem;font-weight:500;margin-bottom:4px}.result-matrix small{margin-top:5px;margin-bottom:0}.matrix-solved{color:#08725a;font-weight:700}.matrix-attempt{color:#875400}.matrix-empty{color:#65738b}
.console-title{margin:0 0 8px}.results{margin-top:16px}.rank-panels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.rank-list{padding-left:22px}.rank-list li{padding:7px 0;border-bottom:1px solid #e8edf6}.rank-list .own{font-weight:750;color:#067664}
@media(max-width:850px){.student-layout,.rank-panels{grid-template-columns:1fr}.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:550px){.stat-grid{grid-template-columns:1fr}.compact-field{width:100%}.compact-field select{flex:1;min-width:0}.inline-input{flex-direction:column}}
