:root { --ink:#1d2a35; --blue:#1f5f8b; --blue-dark:#17496b; --line:#d6dee5; --bg:#f3f5f7; --muted:#657786; --warn:#9b641a; --good:#26734d; }
* { box-sizing: border-box; }
body { min-height:100vh; margin:0; display:grid; place-items:center; background:var(--bg); color:var(--ink); font:14px/1.5 "PingFang SC","Microsoft YaHei",Arial,sans-serif; }
.login { width:min(680px,calc(100% - 32px)); background:#fff; border:1px solid var(--line); border-radius:6px; box-shadow:0 10px 32px rgba(24,43,58,.09); padding:30px; }
.admin-page { min-width:1100px; place-items:start center; background:linear-gradient(rgba(31,95,139,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(31,95,139,.025) 1px,transparent 1px),var(--bg); background-size:32px 32px; }
.admin-shell { width:min(1200px,calc(100% - 48px)); min-height:calc(100vh - 56px); margin:28px 0; padding:30px 34px 38px; }
.login h1 { font-size:24px; letter-spacing:.02em; margin:0; color:#152b3a; }
.login h2 { font-size:17px; margin:26px 0 5px; color:#1a3448; }
.login h3 { font-size:14px; margin:20px 0 9px; color:#2a526e; }
.login p { margin:4px 0 16px; color:var(--muted); }
label { display:block; font-size:13px; margin-top:14px; color:#405361; }
input,textarea,select { width:100%; border:1px solid #bdc9d2; border-radius:3px; margin-top:5px; padding:9px 10px; font:inherit; color:var(--ink); background:#fff; }
input:focus,textarea:focus,select:focus { outline:2px solid #cce0ed; border-color:var(--blue); }
input,select { height:42px; }
textarea { min-height:96px; resize:vertical; }
button { width:100%; min-height:42px; border:1px solid var(--blue); border-radius:3px; background:var(--blue); color:#fff; font:inherit; font-weight:700; margin-top:22px; cursor:pointer; }
button:hover { background:var(--blue-dark); border-color:var(--blue-dark); }
.compact { width:auto; min-height:auto; margin:0; padding:7px 12px; }
.error { min-height:20px; color:#a33b3b; font-size:13px; margin:8px 0 0; }
.teacher { display:block; text-align:center; color:var(--blue); text-decoration:none; font-size:13px; margin-top:18px; }

/* Student login landing page */
.login-page {
  min-width:1080px;
  padding:44px;
  background:
    linear-gradient(rgba(31,95,139,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31,95,139,.035) 1px, transparent 1px),
    #edf2f5;
  background-size:32px 32px;
}
.login-shell {
  width:1000px;
  min-height:600px;
  display:grid;
  grid-template-columns:1.08fr .92fr;
  overflow:hidden;
  background:#fff;
  border:1px solid #cfdbe3;
  box-shadow:0 22px 60px rgba(29,58,78,.14);
}
.login-brand {
  position:relative;
  display:flex;
  flex-direction:column;
  padding:44px 48px 38px;
  overflow:hidden;
  color:#17354a;
  background:linear-gradient(145deg, rgba(255,255,255,.96), rgba(228,240,247,.95)), #edf6fa;
  border-right:1px solid #d6e2e9;
}
.login-brand::before {
  content:"";
  position:absolute;
  width:360px;
  height:360px;
  right:-190px;
  top:78px;
  border:70px solid rgba(31,95,139,.055);
  border-radius:50%;
}
.login-brand::after {
  content:"";
  position:absolute;
  right:40px;
  bottom:37px;
  width:92px;
  height:92px;
  border-right:2px solid rgba(31,95,139,.13);
  border-bottom:2px solid rgba(31,95,139,.13);
}
.brand-mark { position:relative; z-index:1; display:grid; place-items:center; width:38px; height:38px; color:#fff; background:var(--blue); font-size:14px; font-weight:700; letter-spacing:.04em; box-shadow:8px 8px 0 #cde0eb; }
.brand-copy { position:relative; z-index:1; margin:auto 0; }
.brand-copy h1 { margin:0; color:#17354a; font-size:46px; line-height:1.18; letter-spacing:-.04em; }

.login-panel { display:flex; flex-direction:column; justify-content:center; padding:62px 58px 48px; background:#fff; }
.login-heading h2 { margin:0; color:#1a3345; font-size:30px; line-height:1.2; }
.student-login-form { margin-top:32px; }
.student-login-form label { margin-top:18px; color:#304958; font-size:13px; font-weight:700; }
.student-login-form input { height:48px; margin-top:8px; padding:0 14px; border-color:#c8d4dc; border-radius:4px; background:#fbfcfd; font-size:14px; transition:border-color .16s, box-shadow .16s, background .16s; }
.student-login-form input::placeholder { color:#9aa9b4; }
.student-login-form input:focus { background:#fff; outline:0; border-color:var(--blue); box-shadow:0 0 0 3px rgba(31,95,139,.11); }
.student-login-form button { position:relative; height:48px; margin-top:25px; border-radius:4px; box-shadow:0 8px 18px rgba(31,95,139,.18); transition:background .16s, transform .16s, box-shadow .16s; }
.student-login-form button:hover { transform:translateY(-1px); box-shadow:0 10px 22px rgba(31,95,139,.23); }
.student-login-form button:disabled { cursor:wait; opacity:.72; transform:none; box-shadow:none; }
.login-error { min-height:21px; margin:9px 0 0; }
.teacher-access { margin-top:30px; padding-top:20px; border-top:1px solid #e1e7eb; }
.teacher-access a { display:inline-flex; align-items:center; color:#315f7d; font-size:13px; font-weight:700; text-decoration:none; }
.teacher-access a:hover { color:var(--blue); }

.admin-head { display:flex; align-items:center; justify-content:space-between; gap:20px; padding-bottom:22px; border-bottom:1px solid var(--line); }
.admin-head h1 { margin:0; font-size:26px; }
.admin-head a { padding:7px 11px; border:1px solid #b9c7d0; color:#496273; font-size:12px; text-decoration:none; }
.teacher-login { width:430px; margin:74px auto 0; padding:28px 30px; border:1px solid var(--line); background:#f9fbfc; }
.teacher-login h2 { margin:0 0 5px; font-size:20px; }
.teacher-login p { margin:0; }
.admin-nav { display:flex; gap:4px; margin:22px 0 20px; padding:5px; background:#eef3f6; border:1px solid #dce4e9; }
.admin-nav button { width:auto; min-height:38px; margin:0; padding:0 18px; border:0; background:transparent; color:#526978; font-size:13px; font-weight:600; box-shadow:none; }
.admin-nav button:hover { border:0; background:#f7fafb; color:#244b65; }
.admin-nav button.active { background:#fff; color:#1e557a; box-shadow:0 2px 7px rgba(25,57,78,.09); }
.admin-result { margin:0 0 12px; }
.admin-section { min-height:480px; padding:24px; border:1px solid var(--line); background:#fff; }
.admin-section > .section-head { margin-bottom:20px; padding-bottom:16px; border-bottom:1px solid #e2e8ec; }
.admin-section > .section-head h2 { font-size:21px; }
.admin-section > .section-head p { margin:5px 0 0; }
.module-list { border:1px solid var(--line); }
.module-list .module { padding:13px 15px; }
.material-admin-form { display:grid; grid-template-columns:repeat(2,1fr); gap:2px 18px; max-width:900px; }
.material-admin-form .wide-field { grid-column:1/-1; }
.material-admin-form button { width:180px; grid-column:1/-1; }
.record-block { margin-top:18px; padding:18px; border:1px solid var(--line); background:#fafcfd; }
.record-block h3 { margin:0 0 4px; }
.record-block > p { margin:0 0 12px; }
.student-classroom-result { margin:10px 0; padding:12px 14px; border:1px solid #dce5ea; background:#fff; }
.student-classroom-result > summary { cursor:pointer; font-weight:700; }
.student-classroom-result > h4 { margin:18px 0 7px; font-size:14px; }
.student-result-stage { margin:6px 0; padding:9px 11px; border-left:3px solid #d8e5ec; background:#f8fafb; }
.student-result-stage > summary { cursor:pointer; color:#38576c; font-size:13px; }
.student-result-stage p { margin:7px 0; color:#536b7a; font-size:12px; line-height:1.65; white-space:pre-wrap; overflow-wrap:anywhere; }
.student-result-stage small { display:block; margin-top:7px; color:#7a8b96; font-size:11px; }
.review-highlight { padding:1px 3px; border-radius:3px; background:#fff0a8; color:#634d00; box-decoration-break:clone; -webkit-box-decoration-break:clone; }
.draw-result { min-height:20px; color:#285873 !important; font-weight:700; }
.random-draw-target { outline:3px solid #64a7cb; outline-offset:2px; background:#f1faff !important; }
.issue-summary { display:flex; flex-wrap:wrap; gap:7px; margin:0 0 12px; }
.issue-summary span { padding:5px 8px; border:1px solid #d2dde4; background:#fff; color:#536b7a; font-size:11px; }
.issue-summary b { margin-left:4px; color:#1f5f8b; }
.classroom-review-block > .section-head { align-items:center; flex-wrap:wrap; }
.review-actions { display:flex; gap:8px; flex-wrap:wrap; }
.review-actions button { width:auto; min-height:34px; margin:0; padding:6px 11px; }
.review-actions button:disabled { opacity:.55; cursor:not-allowed; }
.review-meta,.review-caveat { color:#647987; font-size:12px; line-height:1.6; }
.review-stat-grid { display:grid; grid-template-columns:repeat(4,minmax(115px,1fr)); gap:8px; margin:14px 0; }
.review-stat { padding:10px 12px; border:1px solid #d8e2e8; background:#fff; }
.review-stat b { display:block; color:var(--blue); font-size:23px; line-height:1.2; }
.review-stat span { display:block; margin-top:3px; color:#607684; font-size:12px; }
.review-section { margin-top:12px; padding:11px 13px; border:1px solid #dce4e9; background:#fff; }
.review-section > summary { cursor:pointer; color:#29495d; font-size:14px; font-weight:700; }
.review-section h4 { margin:13px 0 6px; color:#334f61; font-size:13px; }
.review-section p,.review-section li { color:#536b7a; font-size:12px; line-height:1.65; white-space:pre-wrap; overflow-wrap:anywhere; }
.review-table-wrap { display:grid; grid-template-columns:minmax(280px,1fr) minmax(200px,.8fr); gap:12px; margin:12px 0; overflow-x:auto; }
.review-table { width:100%; border-collapse:collapse; background:#fff; font-size:12px; }
.review-table th,.review-table td { padding:8px 9px; border:1px solid #e0e7eb; text-align:left; vertical-align:top; }
.review-table th { background:#f0f5f7; color:#405b6c; }
.review-plan { min-width:780px; }
.review-plan td:first-child { min-width:92px; white-space:nowrap; color:#34566b; font-weight:700; }
.review-plan td:nth-child(2) { min-width:340px; }
.review-plan td:nth-child(3) { min-width:250px; }
.review-findings { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; margin-top:10px; }
.review-finding { min-width:0; padding:10px 11px; border:1px solid #e1e7eb; background:#fbfcfd; }
.review-finding h4 { margin-top:0; }
.review-finding h4 small { display:block; margin-top:3px; color:#70838f; font-size:11px; font-weight:400; }
.review-finding p { margin:6px 0; }
.review-finding ul { padding-left:18px; }
.review-finding li { margin:5px 0; }
.review-all-candidates { margin-top:8px; border-top:1px solid #e3eaee; padding-top:8px; }
.review-all-candidates summary { cursor:pointer; color:#285873; font-size:12px; }
.stage-student-grid { display:grid; grid-template-columns:repeat(10,minmax(0,1fr)); gap:7px; margin-top:12px; }
.stage-student-card { min-width:0; border:1px solid #dce5ea; background:#fff; }
.stage-student-card summary { padding:8px 6px; cursor:pointer; list-style:none; }
.stage-student-card summary::-webkit-details-marker { display:none; }
.stage-student-card summary b,.stage-student-card summary small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.stage-student-card summary b { color:#35566b; font-size:12px; }
.stage-student-card summary small { margin-top:3px; font-size:10px; }
.stage-student-card .has-work { color:#287050; }
.stage-student-card .not-started { color:#8a969d; }
.stage-student-content { min-width:260px; padding:9px 10px; border-top:1px solid #e2e9ed; background:#f8fafb; }
.stage-student-content p,.stage-student-material p { margin:6px 0; color:#536b7a; font-size:12px; line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; }
.stage-student-material { margin:6px 0; padding:7px; border-left:3px solid #d8e5ec; background:#fff; }
.stage-student-material summary { cursor:pointer; color:#38576c; font-size:12px; }
.qwen-review-output { margin:12px 0 16px; padding:15px 17px; border:1px solid #cbdde7; background:#f5fafc; color:#304c5e; font-size:13px; line-height:1.8; white-space:pre-wrap; overflow-wrap:anywhere; }
.day-review { margin:15px 0; padding:18px; border:1px solid #d9e5eb; border-radius:12px; background:#f9fcfd; }
.day-review h4 { margin:0 0 10px; font-size:18px; }
.day-review p { line-height:1.75; }
.day-review-materials { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:10px; margin:12px 0; }
.day-review-materials details { padding:12px; border:1px solid #d8e4ea; border-radius:9px; background:#fff; }
.day-review-materials summary { cursor:pointer; font-weight:600; }
.danger-button { color:#8a3e3e !important; border-color:#cdaaaa !important; background:#fff !important; }
.danger-button:hover { background:#fff5f5 !important; }
.teacher-entry { min-height:260px; margin:0; padding:42px; align-items:center; background:linear-gradient(135deg,#f6fafc,#eaf3f8); border-radius:5px; }
.teacher-entry h2 { margin:0; font-size:25px; }
.teacher-entry a { padding:12px 22px; }
.import-panel { width:620px; margin:44px auto 0; padding:28px; border:1px solid var(--line); background:#f9fbfc; }
.import-panel h2 { margin:0 0 7px; }
.import-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:18px; }
.import-actions button { width:auto; min-width:120px; margin:0; }
.secondary-action { background:#fff; color:#405866; border-color:#aebdc6; }
.secondary-action:hover { background:#edf2f5; color:#2c495b; border-color:#8da1ad; }

@media (max-width: 760px) {
  .review-stat-grid { grid-template-columns:repeat(2,minmax(100px,1fr)); }
  .review-table-wrap,.review-findings { grid-template-columns:1fr; }
  .stage-student-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .classroom-review-block > .section-head { align-items:flex-start; }
}

.module { display:flex; align-items:center; gap:9px; border-bottom:1px solid var(--line); padding:10px 0; }
.module b { flex:1; }
.module span { font-size:12px; color:#5f7483; }
.module button { width:auto; height:auto; min-height:0; margin:0; padding:6px 10px; }
.overview { margin-top:20px; padding:20px; border:1px solid var(--line); background:#f8fafb; }
.section-head { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; }
.section-head h2 { margin:0; font-size:20px; }
.section-head p { margin-bottom:0; }
.overview-cards { display:grid; grid-template-columns:repeat(5,1fr); gap:10px; margin-top:17px; }
.metric { background:#fff; border:1px solid var(--line); padding:12px; min-height:88px; }
.metric b { display:block; font-size:28px; line-height:1.1; color:var(--blue); }
.metric span { display:block; font-size:12px; color:#647987; margin-top:6px; }
.topic-progress { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.topic-card { background:#fff; border:1px solid var(--line); padding:12px; }
.topic-card b { display:block; font-size:13px; color:#223c4e; }
.topic-card span { display:block; color:#687d8b; font-size:12px; margin-top:5px; }
.bar { height:5px; background:#e4e9ed; margin-top:10px; overflow:hidden; }
.bar i { display:block; height:100%; background:var(--blue); }
.attention-list { border:1px solid var(--line); background:#fff; }
.student-row { display:grid; grid-template-columns:1.2fr 1.3fr .65fr .65fr 1.2fr; gap:8px; padding:10px 12px; border-bottom:1px solid #e5eaee; align-items:center; font-size:12px; }
.student-row:last-child { border:0; }
.student-row.head { background:#eef3f6; color:#445a69; font-weight:700; }
.student-row small { display:block; color:#718694; margin-top:2px; }
.state-warn { color:var(--warn); font-weight:700; }
.state-good { color:var(--good); font-weight:700; }
.empty { padding:10px; }
details { border-bottom:1px solid var(--line); padding:9px 0; color:#243b4a; }
details p { white-space:pre-wrap; }
.admin-shell > section > button { width:auto; margin-right:8px; padding:0 15px; }
.admin-shell > section > button#resetDemo { background:#8b4d4d; border-color:#8b4d4d; }
.teacher-entry { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-top:20px; padding:18px 20px; border:1px solid #bfd4e1; background:#f3f8fb; }
.teacher-entry h2 { margin:0 0 4px; }
.teacher-entry p { margin:0; }
.teacher-entry a { flex:0 0 auto; padding:10px 16px; border-radius:3px; background:var(--blue); color:#fff; font-weight:700; text-decoration:none; }
.feedback-list { display:grid; gap:10px; margin-top:18px; }
.feedback-item { padding:16px 18px; border:1px solid var(--line); background:#fff; }
.feedback-item.new { border-left:4px solid #b46a26; }
.feedback-item.reviewing { border-left:4px solid #3979a2; }
.feedback-item.resolved { border-left:4px solid #4f8b67; }
.feedback-item h3 { margin:0; color:#223c4e; font-size:15px; }
.feedback-meta { margin:6px 0 10px; color:#687d8b; font-size:12px; }
.feedback-item p { margin:0; white-space:pre-wrap; color:#405866; line-height:1.65; }
.feedback-controls { display:grid; grid-template-columns:150px 1fr auto; gap:9px; align-items:end; margin-top:13px; }
.feedback-controls label { margin:0; font-size:11px; }
.feedback-controls input,.feedback-controls select { margin-top:4px; padding:7px 8px; font-size:12px; }
.feedback-controls button { width:auto; min-height:0; margin:0; padding:8px 11px; }
.personal-work-fields p { white-space:pre-wrap; overflow-wrap:anywhere; }
.work-review-actions { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0; }
.work-review-actions button { width:auto; min-height:0; margin:0; padding:7px 11px; }
.work-review-output { max-height:500px; overflow:auto; padding:13px; border:1px solid #d7e3e9; background:#f7fafc; color:#29485a; white-space:pre-wrap; overflow-wrap:anywhere; font-family:inherit; font-size:12px; line-height:1.6; }
