/* ============================================================
   教师工作台 v3 样式
   ============================================================ */

.nav-badge.teacher { background: linear-gradient(135deg,#26A69A,#4DB6AC); color: #fff; text-decoration: none; }
.nav-badge.teacher:hover { filter: brightness(1.1); }

/* ---------- 工作台 Hero ---------- */
.tch-hero { background: linear-gradient(135deg,#26A69A,#4DB6AC 55%,#80CBC4); border-radius: 20px; padding: 30px 32px; color: #fff; margin-bottom: 24px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; position: relative; overflow: hidden; }
.tch-hero::after { content: "👨‍🏫"; position: absolute; right: 6%; top: 50%; transform: translateY(-50%); font-size: 110px; opacity: .16; }
.tch-hero .th-emoji { font-size: 58px; line-height: 1; }
.tch-hero .th-main { flex: 1; min-width: 220px; position: relative; z-index: 1; }
.tch-hero .th-role { font-size: 13px; opacity: .92; letter-spacing: 2px; }
.tch-hero .th-name { font-size: 24px; font-weight: 800; margin: 2px 0 6px; }
.tch-hero .th-tip { font-size: 13px; opacity: .95; }
.tch-stats { display: flex; gap: 26px; position: relative; z-index: 1; }
.tch-stats .ts { text-align: center; }
.tch-stats .ts b { display: block; font-size: 26px; }
.tch-stats .ts span { font-size: 12px; opacity: .9; }

/* ---------- 班级卡片 ---------- */
.tch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.tch-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 20px 22px; box-shadow: var(--shadow); transition: all .25s; display: block; text-decoration: none; }
.tch-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(38,166,154,.18); border-color: #26A69A; }
.tch-card .cc-head { display: flex; align-items: center; justify-content: space-between; }
.tch-card .cc-name { font-weight: 800; color: #0d7377; font-size: 16px; }
.tch-card .cc-code { background: #e4f6f4; color: #0d7377; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 12px; letter-spacing: 1px; }
.tch-card .cc-meta { color: #8aa; font-size: 13px; margin: 10px 0 4px; }
.tch-card .cc-meta span { margin-right: 14px; }
.tch-card .cc-desc { color: #667; font-size: 12.5px; line-height: 1.6; }
.tch-card .cc-foot { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #dfeef0; display: flex; gap: 10px; }
.tch-btn { display: inline-block; border: 1px solid #bfe3e0; background: #f0fbfa; color: #0d7377; border-radius: 16px; padding: 6px 16px; font-size: 13px; text-decoration: none; transition: all .2s; cursor: pointer; font-family: inherit; }
.tch-btn:hover { background: #26A69A; color: #fff; border-color: #26A69A; }
.tch-btn.solid { background: linear-gradient(135deg,#26A69A,#4DB6AC); color: #fff; border-color: transparent; box-shadow: 0 3px 10px rgba(38,166,154,.3); }
.tch-btn.solid:hover { transform: translateY(-1px); }
.tch-btn.danger { border-color: #f0c0c0; background: #fff5f5; color: #c0392b; }
.tch-btn.danger:hover { background: #e74c3c; color: #fff; border-color: #e74c3c; }
.tch-btn.warn { border-color: #f0d9a8; background: #fffbf0; color: #a06a00; }
.tch-btn.warn:hover { background: #f39c12; color: #fff; border-color: #f39c12; }

/* ---------- 班级详情 ---------- */
.tch-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px; margin-bottom: 18px; box-shadow: var(--shadow); }
.tch-toolbar .tb-info { flex: 1; min-width: 200px; }
.tch-toolbar .tb-title { font-weight: 800; color: #0d7377; font-size: 16px; }
.tch-toolbar .tb-sub { color: #8aa; font-size: 12.5px; margin-top: 2px; }
.tch-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; font-size: 13.5px; }
.tch-table th, .tch-table td { padding: 11px 14px; border-bottom: 1px solid #eef2f5; text-align: left; }
.tch-table th { background: #f0fbfa; color: #0d7377; font-weight: 700; }
.tch-table tr:last-child td { border-bottom: none; }
.tch-table tr:hover td { background: #f7fdfc; }
.tch-table .role-tag { font-size: 11px; background: #e4f6f4; color: #0d7377; padding: 1px 8px; border-radius: 10px; }
.mini-bar { height: 8px; background: #eef2f5; border-radius: 5px; overflow: hidden; min-width: 120px; }
.mini-bar i { display: block; height: 100%; background: linear-gradient(90deg,#26A69A,#4DB6AC); border-radius: 5px; }

/* ---------- 单学生画像 ---------- */
.tch-portrait-hero { background: linear-gradient(135deg,#5C6BC0,#7986CB 55%,#9FA8DA); border-radius: 18px; padding: 26px 28px; color: #fff; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-bottom: 20px; }
.tch-portrait-hero .ph-avatar { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; font-size: 30px; }
.tch-portrait-hero .ph-main { flex: 1; min-width: 200px; }
.tch-portrait-hero .ph-name { font-size: 22px; font-weight: 800; }
.tch-portrait-hero .ph-sub { font-size: 13px; opacity: .92; margin-top: 2px; }
.tch-portrait-hero .ph-stats { display: flex; gap: 22px; }
.tch-portrait-hero .ph-stats b { display: block; font-size: 22px; }
.tch-portrait-hero .ph-stats span { font-size: 12px; opacity: .9; }
.cat-prog { display: flex; flex-direction: column; gap: 10px; }
.cat-prog .cp-row { display: flex; align-items: center; gap: 12px; }
.cat-prog .cp-name { width: 130px; font-weight: 700; color: #55606e; font-size: 13px; flex-shrink: 0; }
.cat-prog .cp-bar { flex: 1; height: 12px; background: #eef2f5; border-radius: 6px; overflow: hidden; }
.cat-prog .cp-bar i { display: block; height: 100%; background: linear-gradient(90deg,#5C6BC0,#7986CB); border-radius: 6px; }
.cat-prog .cp-pct { width: 60px; text-align: right; font-size: 12.5px; color: #667; font-weight: 700; }
.lesson-grid-t { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px; }
.lesson-chip { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; background: #fff; }
.lesson-chip.done { border-color: #bfe8c8; background: #f0fbf2; color: #1d7a34; }
.lesson-chip.locked { opacity: .6; }
.lesson-chip .lc-no { min-width: 26px; height: 26px; border-radius: 50%; background: #eef2f5; color: #667; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.lesson-chip.done .lc-no { background: #27ae60; color: #fff; }

/* ---------- 深色适配 ---------- */
body.dark .tch-card, body.dark .tch-toolbar, body.dark .tch-table, body.dark .lesson-chip { background: var(--card-bg); color: var(--text-main); }
body.dark .tch-table th { background: #1c2b3d; color: #7FC4F5; }
body.dark .tch-table td { border-bottom-color: #2a3a4e; }
body.dark .tch-table tr:hover td { background: #182536; }
body.dark .tch-card .cc-name, body.dark .tch-toolbar .tb-title { color: #7FD0C8; }
body.dark .tch-btn { background: #182536; border-color: #2a3a4e; color: #7FD0C8; }
body.dark .lesson-chip { border-color: #2a3a4e; }
body.dark .mini-bar, body.dark .cat-prog .cp-bar { background: #2a3a4e; }
