/* 学习后台 (teacher dashboard) — builds on site.css tokens */
.tch .top{gap:12px}
.tch-sub{white-space:nowrap}
.tch-spacer{flex:1}
.tch-main{padding:24px clamp(16px,3vw,36px) 64px;max-width:1360px;margin:0 auto}
.tch-input{width:100%;min-height:44px;padding:0 14px;border-radius:12px;border:1.5px solid var(--line);background:#fff;font:inherit}
.tch-input:focus{outline:3px solid #ffc93c66;border-color:var(--ink)}
.tch-login{max-width:420px;margin:8vh auto;display:flex;flex-direction:column;gap:12px;padding:28px;border-radius:22px;background:#fff;box-shadow:var(--shadow)}
.tch-login h1{margin:0}
.tch-err{color:#9b1c1c;min-height:1.4em;margin:0}

.tch-grid{display:grid;grid-template-columns:280px 1fr;gap:24px;align-items:start}
.tch-side{position:sticky;top:84px;display:flex;flex-direction:column;gap:10px}
.tch-side h2{margin:0 0 4px;font-size:15px;color:var(--muted)}
.tch-stu{display:flex;flex-direction:column;gap:4px;padding:12px 14px;border-radius:16px;background:#fff;border:1.5px solid var(--line);text-decoration:none;color:inherit}
.tch-stu:hover{border-color:var(--ink)}
.tch-stu.on{border-color:var(--review);box-shadow:0 0 0 3px #5b5bd622}
.tch-stu.off{opacity:.6}
.tch-mini{display:flex;flex-wrap:wrap;gap:6px}
.tch-mini span{font-size:12px;padding:2px 8px;border-radius:99px;background:var(--bg)}
.tch-add{display:flex;flex-direction:column;gap:8px;padding:14px;border-radius:16px;border:1.5px dashed var(--line)}
.tch-add h3{margin:0;font-size:15px}

.tch-detail{min-width:0;display:flex;flex-direction:column;gap:18px}
.tch-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.tch-head h1{margin:0;font-size:clamp(26px,3vw,36px)}
.tch-head p{margin:4px 0 0}
.tch-empty{padding:32px;border-radius:22px;background:#fff;box-shadow:var(--shadow)}
.tch-link{display:flex;flex-direction:column;gap:8px;padding:16px;border-radius:18px;background:#fff8e1;border:1.5px solid #ffc93c}
.tch-link p{margin:0}

.tch-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.tch-card{display:flex;flex-direction:column;gap:4px;padding:16px 18px;border-radius:18px;background:#fff;box-shadow:var(--shadow);border-top:5px solid var(--line)}
.tch-card b{font-size:26px}
.tch-card.basics{border-top-color:var(--basics)} .tch-card.practice{border-top-color:#e8a317} .tch-card.review{border-top-color:var(--review)}

.tch-sec{padding:18px 20px;border-radius:20px;background:#fff;box-shadow:var(--shadow)}
.tch-sec h2{margin:0 0 12px;font-size:19px}
.tch-att{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:6px}
.tch-att li{padding:8px 12px;border-radius:12px;background:var(--bg)}
.tch-att li::before{margin-right:8px}
.tch-att li.wrong{background:#fde8e8} .tch-att li.wrong::before{content:"✗"}
.tch-att li.help{background:#fff4cc} .tch-att li.help::before{content:"?"}
.tch-att li.delay{background:#e3f6f2} .tch-att li.delay::before{content:"⏱"}
.tch-att li.todo::before{content:"○"}

.tch-table-wrap{overflow-x:auto}
.tch-table{width:100%;border-collapse:collapse;font-size:14px}
.tch-table th{text-align:left;font-size:12px;color:var(--muted);font-weight:700;padding:6px 8px;border-bottom:1.5px solid var(--line);white-space:nowrap}
.tch-table td{padding:10px 8px;border-top:1px solid var(--line);vertical-align:top}
.tch-table tr.none td{color:var(--muted)}
.tch-table .tch-sub-row td{border-top:0;padding-top:0}
.tch-prompt{max-width:340px;min-width:180px}
.tch-table td:nth-child(n+3){white-space:nowrap}
.tch-table td:nth-child(2){min-width:120px}
.tch-res{display:inline-block;padding:2px 8px;border-radius:8px;white-space:nowrap}
.tch-res.ok{background:#e3f6f2;color:#0b6b60} .tch-res.no{background:#fde8e8;color:#9b1c1c}
.tch-res small{font-size:11px}
.tch-help{color:#6b4e00;font-size:12px}
.tch-hist{margin:6px 0;padding-left:20px;font-size:13px}
.tch-list{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:10px}
.tch-levels{margin:0;padding:0;list-style:none;display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
.tch-levels li{display:flex;gap:10px;align-items:flex-start;padding:8px 10px;border-radius:12px;background:var(--bg)}
.tch-levels li .n{flex:none;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:#fff;font-size:12px;font-weight:800}
.tch-levels li.done .n{background:var(--review);color:#fff}
.tch-levels li.started .n{border:2px solid var(--review)}
.tch-game-stat{display:block;color:var(--muted)}
.tch-note{padding:10px 12px;border-radius:12px;background:var(--bg);margin-bottom:8px}
.tch-note p{margin:4px 0 0;white-space:pre-wrap}
.tch-act{margin:0;padding-left:18px}
.tch-manage .row{flex-wrap:wrap}

@media (max-width: 1100px){
  .tch-grid{grid-template-columns:1fr}
  .tch-side{position:static;display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}
  .tch-side h2{grid-column:1/-1}
}
@media (max-width: 760px){
  .tch-cards{grid-template-columns:1fr}
  .tch-levels{grid-template-columns:1fr}
  .tch-sub{display:none}
}
.tch-head .btn{white-space:nowrap;flex:none}
