:root{--bg:#f6f8fc;--panel:#fff;--text:#172033;--muted:#6b7280;--line:#e5e7eb;--blue:#2563eb;--blue2:#1d4ed8;--soft:#eff6ff;--green:#059669;--red:#dc2626;--amber:#d97706;--shadow:0 10px 30px rgba(15,23,42,.08)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,"Segoe UI","Noto Sans JP",sans-serif}button,input,select,textarea{font:inherit}button{cursor:pointer}.hidden{display:none!important}.brand{font-size:28px;font-weight:950}.brand span{color:var(--blue)}.brand.small{font-size:20px}
.login{min-height:100vh;display:grid;place-items:center;padding:22px;background:linear-gradient(145deg,#eaf2ff,#f8fafc 55%,#eef2ff)}.loginCard{width:min(460px,95vw);background:#fff;border-radius:22px;padding:28px;box-shadow:var(--shadow)}.loginSub{color:var(--muted);font-size:13px;margin:4px 0 18px}.field{display:grid;gap:6px;margin:11px 0}.field span,.field label{font-size:12px;font-weight:800;color:#4b5563}.field input,.field select,.field textarea{width:100%;border:1px solid var(--line);border-radius:10px;padding:11px 12px;background:#fff;outline:none}.field textarea{min-height:110px;resize:vertical}.field input:focus,.field select:focus,.field textarea:focus{border-color:#93c5fd;box-shadow:0 0 0 3px #dbeafe}.error{color:var(--red);font-size:12px;margin-top:9px}.textBtn{border:0;background:none;color:var(--blue);font-size:12px;font-weight:800;padding:14px 0 0}
.btn{border:0;border-radius:10px;padding:10px 13px;background:#eef2f7;color:#253047;font-weight:800}.btn.primary{background:var(--blue);color:white}.btn.primary:hover{background:var(--blue2)}.btn.ghost{background:#fff;border:1px solid var(--line)}.btn.warn{background:#fff7ed;color:var(--amber)}.btn.danger{background:#fee2e2;color:var(--red)}.btn.sm{padding:7px 9px;font-size:12px}.btn.wide{width:100%;margin-top:6px}.btn:disabled{opacity:.5;cursor:not-allowed}
.top{height:64px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 18px;position:sticky;top:0;z-index:20}.topActions{display:flex;align-items:center;gap:8px}.badge{padding:6px 10px;border-radius:999px;background:var(--soft);color:var(--blue);font-size:12px;font-weight:800}.layout{display:grid;grid-template-columns:250px 1fr;min-height:calc(100vh - 64px)}.side{background:#fff;border-right:1px solid var(--line);padding:15px;position:sticky;top:64px;height:calc(100vh - 64px);overflow:auto}.userBox{background:#f8fafc;border-radius:13px;padding:12px;margin-bottom:14px}.userBox strong{display:block}.muted{color:var(--muted);font-size:12px}.nav{display:grid;gap:6px}.nav button{border:0;background:transparent;border-radius:9px;text-align:left;padding:10px 11px;font-weight:800;color:#475569}.nav button.active,.nav button:hover{background:var(--soft);color:var(--blue)}
.main{min-width:0;padding:20px}.page{display:none}.page.active{display:block}.head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px}.head h1{font-size:23px;margin:0}.head p{color:var(--muted);font-size:12px;margin:5px 0 0}.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:14px}.card{background:#fff;border:1px solid var(--line);border-radius:15px;padding:15px}.stat .n{font-size:28px;font-weight:950}.stat .l{font-size:12px;color:var(--muted)}progress{width:100%;height:10px}
.threadList{display:grid;gap:9px}.thread{background:#fff;border:1px solid var(--line);border-radius:13px;padding:13px;display:grid;gap:6px}.thread:hover{border-color:#93c5fd}.threadTop{display:flex;gap:8px;justify-content:space-between;align-items:center}.threadTitle{font-weight:900}.meta{font-size:11px;color:var(--muted)}.pill{font-size:11px;border-radius:999px;padding:4px 8px;background:#f1f5f9;color:#475569;font-weight:800}.pill.open{background:#ecfdf5;color:#047857}.pill.closed{background:#f3f4f6;color:#6b7280}.empty{text-align:center;color:var(--muted);padding:30px 10px}.subjects{display:flex;gap:8px;flex-wrap:wrap}.subject{border:1px solid #cbd5e1;background:#fff;border-radius:999px;padding:9px 12px;font-weight:800}.subject.active{background:var(--blue);color:#fff;border-color:var(--blue)}
.chat{display:grid;grid-template-rows:auto 1fr auto;height:calc(100vh - 110px);background:#fff;border:1px solid var(--line);border-radius:15px;overflow:hidden}.chatHead{padding:12px 14px;border-bottom:1px solid var(--line);display:flex;gap:10px;align-items:center;justify-content:space-between}.messages{overflow:auto;padding:16px;background:#f8fafc;display:flex;flex-direction:column;gap:11px}.msg{max-width:min(78%,760px);display:grid;gap:4px}.msg.mine{align-self:flex-end}.bubble{padding:10px 12px;border:1px solid var(--line);background:#fff;border-radius:14px;white-space:pre-wrap;line-height:1.6}.msg.mine .bubble{background:#dbeafe;border-color:#bfdbfe}.quote{border-left:3px solid #94a3b8;padding-left:8px;color:#64748b;font-size:11px;margin-bottom:7px}.msgMeta{font-size:10px;color:#94a3b8}.linkBtn{border:0;background:transparent;color:var(--blue);font-size:11px;padding:0;font-weight:800;text-align:left}.attachment{display:block;margin-top:8px;padding:7px 9px;border-radius:8px;background:#f1f5f9;color:#334155;font-size:11px;text-decoration:none;word-break:break-all}.attachment img{max-width:220px;max-height:160px;border-radius:8px;display:block;margin-bottom:5px}.composer{border-top:1px solid var(--line);padding:10px;background:#fff}.replyBar{font-size:11px;background:#f8fafc;border-radius:8px;padding:7px 9px;margin-bottom:7px;display:flex;justify-content:space-between}.composeRow{display:flex;gap:7px;align-items:flex-end}.composeRow textarea{flex:1;min-height:48px;max-height:150px;border:1px solid var(--line);border-radius:10px;padding:9px;resize:vertical}.fileBtn{display:grid;place-items:center;width:44px;height:44px;border-radius:10px;background:#eef2f7;font-size:20px}.fileBtn input{display:none}.fileNames{font-size:10px;color:#64748b;margin-top:6px}
.tableWrap{overflow:auto}.table{width:100%;border-collapse:collapse;font-size:12px;min-width:900px}.table th,.table td{padding:9px 8px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}.table th{background:#f8fafc;color:#64748b}.actions{display:flex;gap:5px;flex-wrap:wrap}.urlBox{display:flex;gap:8px;align-items:center}.urlBox input{flex:1;border:1px solid var(--line);border-radius:10px;padding:10px;background:#f8fafc}
.modalBack{position:fixed;inset:0;background:rgba(15,23,42,.48);display:grid;place-items:center;padding:16px;z-index:50}.modal{width:min(700px,96vw);max-height:88vh;overflow:auto;background:#fff;border-radius:17px;padding:19px;box-shadow:var(--shadow)}.modal h2{margin:0 0 10px}.row{display:flex;gap:9px}.row>*{flex:1}.note{font-size:11px;color:#64748b;background:#f8fafc;border:1px solid var(--line);border-radius:9px;padding:9px}.toast{position:fixed;right:15px;bottom:15px;background:#111827;color:#fff;border-radius:11px;padding:10px 13px;font-size:12px;z-index:80}
@media(max-width:850px){.layout{grid-template-columns:1fr}.side{position:static;height:auto;border-right:0;border-bottom:1px solid var(--line);padding:9px}.nav{display:flex;overflow:auto}.nav button{white-space:nowrap}.main{padding:11px}.cards{grid-template-columns:1fr}.chat{height:calc(100vh - 175px)}.top{padding:0 10px}.brand.small{font-size:17px}.msg{max-width:90%}.row{display:grid}.row>*{width:100%}.topActions .badge{display:none}.urlBox{display:grid}.urlBox input{width:100%}}

.btn.line{background:#06c755;color:#fff}.btn.line:hover{filter:brightness(.96)}
.lineGate{display:flex;gap:10px;align-items:center;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:12px;padding:11px;margin:10px 0}.lineMark{background:#06c755;color:#fff;border-radius:8px;padding:8px 7px;font-weight:950;font-size:12px}
.lineOk{display:inline-block;background:#ecfdf5;color:#047857;border-radius:999px;padding:3px 7px;font-size:11px;font-weight:800}.checkSubjects{gap:6px}.checkSubject{border:1px solid #cbd5e1;border-radius:999px;padding:7px 10px;background:#fff;font-size:12px;font-weight:700}.checkSubject input{width:auto;margin-right:4px}
.monthBar{display:flex;align-items:center;justify-content:center;gap:14px;margin:0 0 14px}.monthBar strong{min-width:110px;text-align:center}.payrollNote{line-height:1.8;margin:8px 0 0}.payrollTable td:nth-child(n+3),.payrollTable th:nth-child(n+3){text-align:right}.adminTable{min-width:1250px}

/* ============================================================
   V6 - role login / LINE-like student UI / unanswered / payroll detail
   ============================================================ */
.roleSelectBlock{margin:14px 0 12px}.roleSelectLabel{font-size:12px;font-weight:900;color:#475569;margin-bottom:7px}.loginRoleTabs{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.loginRoleTab{border:1px solid var(--line);background:#fff;border-radius:13px;padding:10px 6px;display:grid;gap:4px;place-items:center;color:#475569;font-weight:800}.loginRoleTab .roleIcon{font-size:21px}.loginRoleTab.active{border-color:var(--blue);background:var(--soft);color:var(--blue);box-shadow:0 0 0 2px #dbeafe inset}.selectedRoleLabel{margin-top:12px;padding:8px 10px;background:#f8fafc;border-radius:9px;text-align:center;font-size:12px;font-weight:900;color:#334155}

.studentBottomNav{display:none}.studentHome{max-width:820px;margin:0 auto}.studentHero{display:flex;justify-content:space-between;align-items:center;gap:14px;background:linear-gradient(135deg,#06c755,#18b94d);color:#fff;border-radius:20px;padding:20px;margin-bottom:12px;box-shadow:0 10px 24px rgba(6,199,85,.18)}.studentHero h1{margin:3px 0 5px;font-size:24px}.studentHero p{margin:0;font-size:12px;opacity:.92}.studentGreeting{font-size:12px;font-weight:800;opacity:.9}.studentNewQ{border:0;background:#fff;color:#06a94a;border-radius:50%;width:52px;height:52px;font-size:28px;font-weight:700;box-shadow:0 4px 14px rgba(0,0,0,.12)}.studentNewQ.small{width:44px;height:44px;font-size:24px}.studentUsage{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:10px}.studentUsage span{background:#fff;border:1px solid #e7ece9;border-radius:14px;padding:12px;text-align:center}.studentUsage b{display:block;font-size:22px;color:#111827}.studentUsage small{display:block;color:#6b7280;font-size:10px;margin-top:3px}.studentProgress{background:#fff;border:1px solid #e7ece9;border-radius:14px;padding:12px;margin-bottom:14px}.studentProgress>div{display:flex;justify-content:space-between;font-size:11px;margin-bottom:7px}.studentProgress progress{accent-color:#06c755}.talkSectionHead,.studentListHead{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:14px 2px 8px}.talkSectionHead b,.studentListHead h1{font-size:20px;margin:0}.studentListHead p{margin:3px 0 0;color:#6b7280;font-size:11px}.talkSectionHead button{border:0;background:none;color:#06a94a;font-weight:900}.talkList{background:#fff;border-top:1px solid #edf0ee;border-bottom:1px solid #edf0ee}.talkRow{width:100%;border:0;border-bottom:1px solid #edf0ee;background:#fff;display:flex;align-items:center;gap:11px;padding:12px 6px;text-align:left}.talkRow:last-child{border-bottom:0}.talkRow:hover{background:#f8fbf9}.talkAvatar{width:48px;height:48px;border-radius:50%;background:#edf7f0;display:grid;place-items:center;font-size:23px;flex:0 0 auto}.talkBody{min-width:0;flex:1;display:grid;gap:4px}.talkTitle{font-weight:850;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.talkPreview{font-size:11px;color:#879089;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.talkRight{display:grid;justify-items:end;gap:7px;flex:0 0 auto}.talkRight time{font-size:10px;color:#9ca3af}.talkStatus{font-size:10px}.talkStatus.open{color:#06c755}.talkStatus.closed{color:#94a3b8}.studentEmpty{background:#fff;border-radius:16px;padding:34px 15px;display:grid;place-items:center;gap:6px;color:#6b7280}.studentEmptyIcon{font-size:34px}.studentEmpty b{color:#374151}.studentEmpty span{font-size:11px}

.studentMode{--blue:#06c755;--blue2:#05ad49;--soft:#effcf3}.studentMode .top{border-bottom-color:#dfe9e2}.studentMode .brand span{color:#06c755}.studentMode .badge{background:#effcf3;color:#079343}.studentMode .chat{border-radius:0;border-left:0;border-right:0}.studentMode .chatHead{background:#fff}.studentMode .messages{background:#8fb4cb;background-image:linear-gradient(rgba(255,255,255,.05),rgba(255,255,255,.05));padding:14px}.studentMode .bubble{border:0;box-shadow:0 1px 2px rgba(0,0,0,.08)}.studentMode .msg.mine .bubble{background:#9eea6a;border-color:transparent}.studentMode .msg:not(.mine) .bubble{background:#fff}.studentMode .msgMeta{color:rgba(20,35,45,.58);font-weight:700}.studentMode .linkBtn{color:#425b68}.studentMode .composer{background:#f7f7f7}.studentMode .composeRow textarea{border-radius:20px;background:#fff}.studentMode .fileBtn{border-radius:50%;background:#fff}.studentMode .btn.primary{background:#06c755}.studentMode .btn.primary:hover{background:#05ad49}

.unansweredCard{border-color:#fecaca;background:#fffafa}.adminSectionHead{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:10px}.adminSectionHead b{font-size:16px}.adminSectionHead p{margin:3px 0 0;color:#6b7280;font-size:11px}.unansweredCount{background:#fee2e2;color:#b91c1c;border-radius:999px;padding:5px 10px;font-size:12px;font-weight:900}.unansweredList{display:grid;gap:7px}.unansweredRow{border:1px solid #fee2e2;background:#fff;border-radius:11px;padding:10px;display:flex;align-items:center;gap:10px;text-align:left}.unansweredRow:hover{background:#fff7f7}.unansweredSubject{font-size:22px}.unansweredMain{display:grid;gap:4px;min-width:0;flex:1}.unansweredMain b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.unansweredMain small{color:#6b7280}.unansweredBadge{background:#ef4444;color:#fff;border-radius:999px;padding:4px 8px;font-size:10px;font-weight:900}.answeredAll{border-radius:10px;background:#f0fdf4;color:#047857;padding:13px;font-size:12px;font-weight:800}

.payDetailHead{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.payDetailHead span{font-size:11px;background:#f1f5f9;padding:4px 8px;border-radius:999px;color:#475569;font-weight:800}.payQuestionLink{border:0;background:none;color:#2563eb;text-align:left;padding:0;font-weight:800;text-decoration:underline;text-underline-offset:2px}.payDetailTable{min-width:850px}.adminPayDetail{min-width:980px}

@media(max-width:850px){
  .studentMode .top{height:54px;padding:0 12px}.studentMode .topActions .btn#refreshBtn{display:none}.studentMode .layout{display:block;min-height:calc(100vh - 54px)}.studentMode .side{display:none}.studentMode .main{padding:8px 8px 82px}.studentMode .studentBottomNav{display:grid;grid-template-columns:repeat(3,1fr);position:fixed;left:0;right:0;bottom:0;z-index:35;background:rgba(255,255,255,.97);border-top:1px solid #dfe5e1;padding:5px max(8px,env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));box-shadow:0 -3px 14px rgba(0,0,0,.06)}.studentBottomNav button{border:0;background:none;color:#7b8580;display:grid;place-items:center;gap:1px;font-size:19px;padding:4px}.studentBottomNav button b{font-size:9px}.studentBottomNav button.active{color:#06c755}.studentBottomNav [data-new-question] span{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#06c755;color:#fff;font-size:24px;line-height:1}.studentBottomNav [data-new-question] b{color:#06a94a}.studentHero{border-radius:16px;padding:16px}.studentHero h1{font-size:21px}.studentNewQ{width:46px;height:46px}.studentUsage{gap:5px}.studentUsage span{padding:10px 5px}.studentUsage b{font-size:19px}.talkList{margin:0 -8px}.talkRow{padding:12px 10px}.studentMode .chat{height:calc(100vh - 136px);margin:0 -8px}.studentMode .chatHead{padding:10px}.studentMode .messages{padding:10px}.studentMode .msg{max-width:86%}.loginRoleTab{padding:9px 3px}.loginRoleTab .roleIcon{font-size:19px}.unansweredRow{align-items:flex-start}.unansweredBadge{margin-left:auto}.adminSectionHead{align-items:center}
}
.payQuestionTitle{font-weight:750;color:#334155}
.payQuestionBody{margin-top:4px;font-size:11px;line-height:1.55;color:#64748b;white-space:normal;max-width:460px}

/* ========================= V7 ========================= */
.navUnread,.bottomUnread{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#ef4444;color:#fff;font-size:10px;font-weight:900;vertical-align:middle}.bottomUnread{position:absolute;top:2px;right:24%;border:2px solid #fff}.studentBottomNav button{position:relative}
.unreadDot{display:inline-block;width:9px;height:9px;border-radius:50%;background:#ef4444;margin-right:7px;box-shadow:0 0 0 3px #fee2e2}.unreadThread{border-color:#bfdbfe;background:#fbfdff;box-shadow:0 0 0 1px #dbeafe inset}.threadMetaRow{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.assignmentPill{display:inline-flex;align-items:center;gap:3px;border-radius:999px;padding:4px 8px;font-size:10px;font-weight:900}.assignmentPill.assigned{background:#eef2ff;color:#4338ca}.assignmentPill.unassigned{background:#fff7ed;color:#c2410c}.threadActions{display:flex;align-items:center;gap:8px;margin-top:4px}.claimBtn,.claimPrimary{border:0;border-radius:9px;background:#e8f7ee;color:#07883f;padding:7px 10px;font-size:11px;font-weight:900}.claimBtn:hover,.claimPrimary:hover{background:#d9f2e3}.myAssignment{font-size:11px;color:#07883f;font-weight:900}.otherAssignment{font-size:11px;color:#64748b}
.questionTabs{display:flex;gap:7px;flex-wrap:wrap;margin:0 0 14px}.questionTabs button{border:1px solid #dbe2ea;background:#fff;color:#475569;border-radius:999px;padding:8px 12px;font-size:12px;font-weight:850}.questionTabs button b{display:inline-grid;place-items:center;min-width:20px;height:20px;border-radius:999px;background:#f1f5f9;margin-left:4px;font-size:10px}.questionTabs button.active{background:#1f2937;color:#fff;border-color:#1f2937}.questionTabs button.active b{background:rgba(255,255,255,.18);color:#fff}.teacherMode .questionTabs button.active{background:#2563eb;border-color:#2563eb}.adminTabs button.active{background:#111827;border-color:#111827}
.teacherQuick{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px}.quickCard{border:1px solid var(--line);border-radius:14px;background:#fff;padding:14px;text-align:left;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px}.quickCard>span{font-size:22px}.quickCard>b{font-size:13px}.quickCard>small{font-size:11px;background:#f1f5f9;padding:4px 7px;border-radius:999px;color:#475569}.quickCard:hover{border-color:#93c5fd;background:#f8fbff}.urgentStat{border-color:#fecaca;background:#fffafa}.urgentStat .n{color:#dc2626}
.chatHeadV7{align-items:flex-start}.chatTitleArea{min-width:0}.chatAssignee{margin-top:6px;font-size:11px;color:#475569}.chatAssignee strong{color:#111827}.myTag{display:inline-block;margin-left:4px;background:#dcfce7;color:#15803d;padding:2px 6px;border-radius:999px;font-size:9px;font-weight:900}.chatHeadActions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.assignmentNotice{padding:9px 12px;background:#f8fafc;border-bottom:1px solid var(--line);font-size:11px;color:#475569}.assignmentNotice.openNotice{background:#f0fdf4;color:#166534}.lockedComposer{display:flex;align-items:center;justify-content:center;min-height:58px;color:#64748b;font-size:12px;background:#f8fafc}
.messageFooter{display:flex;align-items:center;gap:8px}.msg.mine .messageFooter{justify-content:flex-end}.readReceipt{font-size:10px;color:#64748b;font-weight:800}.studentMode .readReceipt{color:rgba(28,55,66,.65)}
.unreadTalk{background:#f8fff9}.unreadTalk .talkTitle{font-weight:950}.talkUnread{background:#06c755;color:#fff;border-radius:999px;padding:3px 7px;font-size:9px;font-weight:900}.unassignedCount{background:#ffedd5;color:#c2410c;border-radius:999px;padding:5px 10px;font-size:12px;font-weight:900}
.adminKpis,.teacherKpis{grid-template-columns:repeat(3,minmax(0,1fr))}
.studentMode .chatAssignee{color:#45606c}.studentMode .chatAssignee strong{color:#1f2937}.studentMode .talkUnread{background:#06c755}.studentMode .unreadTalk{background:#f4fff7}

@media(max-width:850px){
  .teacherQuick{grid-template-columns:1fr}.quickCard{padding:12px}.questionTabs{position:sticky;top:54px;z-index:8;background:var(--bg);padding:7px 0;margin-bottom:8px;overflow-x:auto;flex-wrap:nowrap}.questionTabs button{white-space:nowrap;flex:0 0 auto}.chatHeadV7{gap:7px}.chatHeadActions{max-width:44%}.chatAssignee{font-size:10px}.assignmentPill{font-size:9px}.threadMetaRow{align-items:flex-start}.adminKpis,.teacherKpis{grid-template-columns:repeat(3,1fr)}.adminKpis .card,.teacherKpis .card{padding:11px 6px;text-align:center}.adminKpis .stat .n,.teacherKpis .stat .n{font-size:22px}
  .studentMode .chatHeadActions #backList{font-size:0;width:36px;height:34px;padding:0}.studentMode .chatHeadActions #backList:after{content:'‹';font-size:24px;line-height:1}.studentMode .chatHeadV7{padding:9px 10px}.studentMode .chatAssignee{margin-top:4px}.studentMode .messages{background:#9bb8c9}.studentMode .msgMeta{font-size:9px}.studentMode .messageFooter{min-height:14px}
}


/* ========================= V8 ========================= */
.adminAssignBtn{border:1px solid #c7d2fe;background:#eef2ff;color:#4338ca;border-radius:9px;padding:7px 10px;font-size:11px;font-weight:900}.adminAssignBtn:hover{background:#e0e7ff}.assignQuestionSummary{display:flex;gap:10px;align-items:center;background:#f8fafc;border:1px solid var(--line);border-radius:12px;padding:11px;margin:8px 0 12px}.assignQuestionSummary>span{font-size:25px}.assignQuestionSummary>div{display:grid;gap:4px;min-width:0}.assignQuestionSummary b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.assignQuestionSummary small{color:#64748b}.warnNote{background:#fff7ed;border-color:#fed7aa;color:#9a3412}
.overdue30{border-color:#fca5a5!important;background:#fff7f7!important;box-shadow:0 0 0 1px #fee2e2 inset}.overdue30 .unansweredBadge{background:#b91c1c}.overdueStat{border-color:#fca5a5;background:#fff7f7}.overdueStat .n{color:#b91c1c}.adminKpisV8{grid-template-columns:repeat(4,minmax(0,1fr))}
.teacherBottomNav{--teacher-mobile:#2563eb}

@media(max-width:850px){
  .teacherMode .top{height:54px;padding:0 10px}.teacherMode .topActions #refreshBtn{display:none}.teacherMode .layout{display:block;min-height:calc(100vh - 54px)}.teacherMode .side{display:none}.teacherMode .main{padding:8px 8px 82px}.teacherMode .studentBottomNav.teacherBottomNav{display:grid;grid-template-columns:repeat(4,1fr);position:fixed;left:0;right:0;bottom:0;z-index:35;background:rgba(255,255,255,.98);border-top:1px solid #dbe2ea;padding:5px max(6px,env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));box-shadow:0 -3px 14px rgba(15,23,42,.08)}.teacherMode .teacherBottomNav button{color:#718096}.teacherMode .teacherBottomNav button.active{color:#2563eb}.teacherMode .teacherBottomNav button span{font-size:20px}.teacherMode .teacherBottomNav button b{font-size:9px}.teacherMode .teacherBottomNav .bottomUnread{right:16%;border-color:#fff}
  .teacherMode .head{margin-bottom:10px;align-items:center}.teacherMode .head h1{font-size:20px}.teacherMode .head p{font-size:10px;line-height:1.5}.teacherMode .teacherKpis{grid-template-columns:repeat(3,1fr);gap:6px}.teacherMode .teacherKpis .card{padding:10px 5px;text-align:center;border-radius:12px}.teacherMode .teacherKpis .n{font-size:23px}.teacherMode .teacherKpis .l{font-size:9px}.teacherMode .teacherQuick{grid-template-columns:repeat(3,1fr);gap:6px}.teacherMode .quickCard{padding:10px 5px;display:flex;flex-direction:column;justify-content:center;text-align:center;gap:3px;min-height:82px}.teacherMode .quickCard>span{font-size:23px}.teacherMode .quickCard>b{font-size:10px}.teacherMode .quickCard>small{font-size:9px;padding:2px 6px}
  .teacherMode .threadList{gap:7px}.teacherMode .thread{padding:11px 10px;border-radius:12px;box-shadow:0 2px 7px rgba(15,23,42,.04)}.teacherMode .threadTitle{font-size:13px;line-height:1.4}.teacherMode .meta{font-size:10px;line-height:1.45}.teacherMode .threadActions{margin-top:5px}.teacherMode .claimBtn{width:100%;padding:9px 10px;font-size:11px}.teacherMode .assignmentPill{font-size:9px;padding:3px 6px}
  .teacherMode .questionTabs{top:54px;padding:7px 0;background:rgba(246,248,252,.97);backdrop-filter:blur(7px)}.teacherMode .questionTabs button{padding:8px 11px}
  .teacherMode .chat{height:calc(100vh - 128px);margin:0 -8px;border-radius:0;border-left:0;border-right:0}.teacherMode .chatHeadV7{padding:9px 10px}.teacherMode .chatTitleArea>b{font-size:13px}.teacherMode .chatHeadActions{max-width:46%;gap:4px}.teacherMode .chatHeadActions .btn{padding:6px 7px;font-size:10px}.teacherMode .messages{padding:10px}.teacherMode .msg{max-width:88%}.teacherMode .bubble{font-size:13px}.teacherMode .composer{padding:8px}.teacherMode .composeRow textarea{min-height:44px;border-radius:16px}.teacherMode .fileBtn{width:42px;height:42px;border-radius:50%}
  .teacherMode .monthBar{position:sticky;top:54px;z-index:7;background:var(--bg);padding:7px 0}.teacherMode .payDetailTable{min-width:720px}.teacherMode .tableWrap{margin-left:-2px;margin-right:-2px}
  .adminKpisV8{grid-template-columns:repeat(2,1fr)}.adminKpisV8 .card{padding:10px}.adminKpisV8 .n{font-size:22px}.assignModal{padding:16px}.assignQuestionSummary{align-items:flex-start}.adminAssignBtn{padding:7px 8px}
}
