/* ===== 小兔陪练 品牌主题：宝蓝 #2f54d8 + 暖橙 #ef8a1c ===== */
:root{
  --blue-900:#17338a; --blue-800:#1d3fb0; --blue-700:#2347c8; --blue-600:#2f54d8; --blue-500:#4a76e8;
  --orange-600:#e8831a; --orange-500:#f59a2e;
  --bg:#eef4fc; --blue-tint:#e7f0fc; --blue-tint2:#f2f7fe; --peach:#fdecd4; --peach-tint:#fff6ea;
  --ink:#20283f; --gray:#6a7288; --gray2:#98a0b3; --line:#e1e8f4; --red:#e04b4b;
}
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
body { font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif; background:var(--bg); color:var(--ink); font-size:15px; }
button { font-family:inherit; }

/* ===== 登录页 ===== */
.login-page { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px;
  background:linear-gradient(165deg,#1d3fb0 0%,#2f54d8 42%,#5b8bef 100%); position:relative; overflow:hidden; }
.login-page::before { content:""; position:absolute; width:340px; height:340px; border-radius:50%;
  background:rgba(255,255,255,.07); top:-120px; right:-90px; }
.login-page::after { content:""; position:absolute; width:240px; height:240px; border-radius:50%;
  background:rgba(245,154,46,.18); bottom:-90px; left:-70px; }
.login-card { background:#fff; border-radius:16px; padding:0 0 26px; width:100%; max-width:380px;
  box-shadow:0 20px 55px rgba(18,40,110,.35); text-align:center; position:relative; z-index:1; overflow:hidden; }
.login-brand { background:linear-gradient(135deg,var(--blue-800),var(--blue-600)); padding:26px 26px 22px; color:#fff; }
.login-brand .logo-svg { width:60px; height:60px; }
.login-brand h1 { font-size:24px; margin-top:8px; letter-spacing:2px; }
.login-brand .brand-en { font-size:11px; letter-spacing:3px; opacity:.85; margin-top:3px; }
.login-brand .subline { display:inline-block; margin-top:10px; font-size:12px; background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.35); border-radius:20px; padding:4px 14px; }
.login-body { padding:22px 26px 0; }
.tabs { display:flex; background:var(--blue-tint); border-radius:10px; padding:4px; margin-bottom:18px; }
.tab { flex:1; border:0; background:transparent; padding:9px; font-size:15px; border-radius:8px; color:var(--gray); cursor:pointer; }
.tab.active { background:#fff; color:var(--blue-700); font-weight:600; box-shadow:0 2px 8px rgba(35,71,200,.15); }
.login-card input { width:100%; padding:13px 14px; border:1px solid var(--line); border-radius:10px; font-size:15px; margin-bottom:12px; outline:none; background:#fbfdff; }
.login-card input:focus { border-color:var(--blue-500); box-shadow:0 0 0 3px rgba(47,84,216,.1); }
.btn-primary { background:linear-gradient(135deg,var(--blue-600),var(--blue-700)); color:#fff; border:0; border-radius:10px;
  padding:13px; font-size:16px; font-weight:600; width:100%; cursor:pointer; box-shadow:0 6px 16px rgba(47,84,216,.25); }
.btn-primary:active { opacity:.9; transform:translateY(1px); }
.btn-primary:disabled { opacity:.6; box-shadow:none; }
.err { color:var(--red); font-size:13px; min-height:18px; margin-top:8px; }
.foot-tip { color:var(--gray2); font-size:12px; margin:16px 26px 0; line-height:1.7; }
.mission { margin-top:12px; font-size:11.5px; color:var(--blue-800); letter-spacing:.5px; }

/* ===== 主框架 ===== */
.app-header { position:sticky; top:0; z-index:10; background:linear-gradient(135deg,var(--blue-800),var(--blue-600));
  display:flex; justify-content:space-between; align-items:center; padding:11px 16px;
  box-shadow:0 2px 12px rgba(20,45,130,.18); }
.app-title { display:flex; align-items:center; gap:8px; font-weight:700; font-size:17px; color:#fff; letter-spacing:1px; }
.app-title .logo-svg { width:30px; height:30px; }
.app-title .org { font-size:10px; font-weight:400; opacity:.85; letter-spacing:1px; display:block; line-height:1.2; }
.header-right { display:flex; align-items:center; gap:10px; font-size:13px; color:#dce7ff; }
.teacher-chip { background:rgba(255,255,255,.15); border-radius:20px; padding:3px 11px; }
.logout { color:#ffd9b0; cursor:pointer; font-size:13px; }
.content { padding:14px 14px 90px; max-width:640px; margin:0 auto; }
.page { animation:fade .2s; }
@keyframes fade { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:none} }
.field-label { display:block; font-size:13px; color:#48506a; margin:16px 0 7px; font-weight:600; }
select, textarea { width:100%; border:1px solid var(--line); border-radius:10px; padding:12px; font-size:15px;
  background:#fff; outline:none; font-family:inherit; color:var(--ink); }
select:focus, textarea:focus { border-color:var(--blue-500); box-shadow:0 0 0 3px rgba(47,84,216,.08); }
.row { display:flex; gap:10px; align-items:center; margin-top:8px; }
.row.gap { margin-top:10px; }
.row select { flex:1; }
.btn-ghost { background:#fff; border:1px solid #c9d6ee; color:var(--blue-700); border-radius:10px; padding:11px 16px;
  font-size:14px; cursor:pointer; white-space:nowrap; font-weight:500; }
.btn-ghost:active { background:var(--blue-tint2); }
.btn-primary.big { margin-top:16px; }

/* 上传区 */
.uploader { border:1.5px dashed #9db8ec; background:var(--blue-tint2); border-radius:12px; padding:24px;
  text-align:center; color:var(--blue-700); cursor:pointer; }
.uploader:active { background:var(--blue-tint); }
.uploader.pasted { border-color:var(--orange-500); background:var(--peach-tint); animation:pasteflash .9s ease-out; }
@keyframes pasteflash { 0% { box-shadow:0 0 0 0 rgba(245,154,46,.55); } 100% { box-shadow:0 0 0 16px rgba(245,154,46,0); } }
.upload-icon { width:40px; height:40px; margin:0 auto 6px; color:var(--orange-500); }
.uploader .up-hint { font-size:12.5px; color:var(--gray); margin-top:3px; }
.previews { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.previews img { width:74px; height:74px; object-fit:cover; border-radius:9px; border:1px solid var(--line); }
.pv-item { position:relative; }
.pv-x { position:absolute; top:-6px; right:-6px; background:var(--red); color:#fff; border-radius:50%;
  width:20px; height:20px; font-size:12px; display:flex; align-items:center; justify-content:center; cursor:pointer; }

/* ===== 结果分区卡片 ===== */
.result { margin-top:20px; display:flex; flex-direction:column; gap:12px; }
.rcard { background:#fff; border-radius:12px; border:1px solid var(--line); overflow:hidden; }
.rcard-head { display:flex; align-items:center; gap:7px; padding:10px 14px; font-size:13.5px; font-weight:600; }
.rcard-head .ic { width:17px; height:17px; flex:none; }
.rcard-head .spacer { flex:1; }
.rcard.is-parent .rcard-head { background:linear-gradient(135deg,var(--blue-700),var(--blue-600)); color:#fff; }
.rcard.is-check .rcard-head { background:var(--blue-tint); color:var(--blue-800); border-bottom:1px solid #d4e2f7; }
.rcard.is-record .rcard-head { background:#f4f6fa; color:#48506a; border-bottom:1px var(--line) solid; }
.rcard.is-warn { border-color:#f6c98f; }
.rcard.is-warn .rcard-head { background:var(--peach); color:#a55b08; border-bottom:1px solid #f3d6ab; }
.btn-copy { background:#fff; color:var(--blue-700); border:0; border-radius:7px; padding:5px 12px; font-size:12px;
  cursor:pointer; font-weight:600; }
.btn-copy:active { background:var(--blue-tint); }
.rcard-body { padding:13px 14px; }

/* 微信聊天气泡式家长反馈 */
.wx-row { display:flex; gap:9px; align-items:flex-start; }
.wx-avatar { width:36px; height:36px; border-radius:8px; flex:none; background:linear-gradient(135deg,var(--blue-700),var(--blue-500));
  display:flex; align-items:center; justify-content:center; }
.wx-avatar .logo-svg { width:24px; height:24px; }
.wx-meta { font-size:11.5px; color:var(--gray2); margin-bottom:4px; }
.wx-bubble { position:relative; background:var(--blue-tint2); border:1px solid #dbe6f8; border-radius:4px 10px 10px 10px;
  padding:11px 13px; font-size:15px; line-height:1.75; white-space:pre-wrap; color:#26304d; }
.wx-bubble::before { content:""; position:absolute; left:-6px; top:10px; border:6px solid transparent;
  border-top-color:#dbe6f8; border-left:0; border-bottom:0; }
.wx-foot { display:flex; align-items:center; gap:8px; margin-top:10px; font-size:11.5px; color:var(--gray2); }
.wx-foot .tag { background:var(--peach); color:#a55b08; border-radius:4px; padding:1px 7px; }

/* 核对表 */
.chk-wrap { overflow-x:auto; }
table.chk { width:100%; border-collapse:collapse; font-size:12.5px; }
table.chk th { background:var(--blue-700); color:#fff; padding:7px 9px; text-align:left; font-weight:600; white-space:nowrap; }
table.chk td { padding:6px 9px; border-bottom:1px solid #eef2f8; color:#39425c; vertical-align:top; }
table.chk tr:nth-child(even) td { background:#f7faff; }
.chk-self { margin-top:9px; font-size:12px; color:var(--gray); background:#f4f8ff; border-radius:8px; padding:8px 10px; line-height:1.6; }
.collapse-btn { background:none; border:0; color:var(--blue-600); font-size:12px; cursor:pointer; padding:2px 0; margin-top:8px; }
.rcard.is-check .rcard-body.collapsed .chk-wrap, .rcard.is-check .rcard-body.collapsed .chk-self { display:none; }

/* 学情记录行 */
.record-line { font-size:12.5px; line-height:1.8; color:#3a435c; white-space:pre-wrap; word-break:break-all; }
.warn-body { font-size:13.5px; line-height:1.7; color:#7a4407; white-space:pre-wrap; }

/* ===== 学生 / 记录页 ===== */
.page-title { font-size:18px; margin:4px 0 14px; color:var(--blue-900); display:flex; align-items:center; gap:8px; }
.page-title::before { content:""; width:4px; height:17px; background:var(--orange-500); border-radius:2px; }
.student-list { margin-bottom:16px; }
.stu-card { background:#fff; border-radius:12px; padding:13px 14px; margin-bottom:10px; display:flex;
  justify-content:space-between; align-items:center; border:1px solid var(--line); }
.stu-card:active { border-color:#bcd0f2; }
.stu-main { display:flex; gap:11px; align-items:center; min-width:0; }
.avatar { width:42px; height:42px; border-radius:11px; flex:none; display:flex; align-items:center; justify-content:center;
  font-size:17px; font-weight:600; color:#fff; background:linear-gradient(135deg,var(--blue-600),var(--blue-500)); }
.avatar.b { background:linear-gradient(135deg,var(--orange-600),var(--orange-500)); }
.stu-card .name { font-weight:700; font-size:16px; }
.stu-card .meta { color:var(--gray); font-size:12.5px; margin-top:3px; white-space:pre-wrap;
  overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.stu-card button { background:none; border:0; color:var(--blue-600); font-size:13px; cursor:pointer; flex:none; padding:6px; }

.modal { position:fixed; inset:0; background:rgba(16,30,70,.5); z-index:20; display:flex;
  align-items:center; justify-content:center; padding:20px; }
.modal-card { background:#fff; border-radius:14px; padding:20px; width:100%; max-width:460px; max-height:88vh; overflow:auto; }
.modal-card h3 { margin-bottom:12px; color:var(--blue-900); }
.modal-card input, .modal-card textarea { margin-bottom:10px; }
.btn-danger { width:100%; margin-top:10px; background:#fff; border:1px solid #f3b8b8; color:var(--red);
  border-radius:10px; padding:11px; cursor:pointer; }

.record-list .rec { background:#fff; border:1px solid var(--line); border-radius:12px; padding:13px; margin-bottom:10px; }
.rec .rec-head { display:flex; justify-content:space-between; align-items:center; font-size:12.5px; color:var(--gray);
  margin-bottom:8px; padding-bottom:8px; border-bottom:1px dashed #e7ecf5; }
.rec .kind-tag { background:var(--blue-tint); color:var(--blue-700); border-radius:5px; padding:1px 8px; font-size:11.5px; font-weight:600; }
.rec .kind-tag.weekly, .rec .kind-tag.monthly { background:var(--peach); color:#a55b08; }
.rec .rec-body { font-size:13px; line-height:1.75; max-height:200px; overflow:hidden; position:relative; color:#39425c; }
.rec .rec-body.expanded { max-height:none; }
.rec-body .sec-h { font-weight:700; color:var(--blue-800); margin:8px 0 4px; }
.rec-body .sec-h:first-child { margin-top:0; }
.rec-body table { border-collapse:collapse; width:100%; font-size:11.5px; margin:4px 0; }
.rec-body th { background:var(--blue-tint); color:var(--blue-800); padding:4px 6px; text-align:left; }
.rec-body td { border:1px solid #e7ecf5; padding:4px 6px; }
.rec .toggle { color:var(--blue-600); font-size:12.5px; margin-top:6px; cursor:pointer; }
.empty { color:var(--gray2); text-align:center; padding:44px 0; font-size:14px; }
.empty .ei { width:46px; height:46px; margin:0 auto 8px; color:#c3cde0; }

/* ===== 底部 tab ===== */
.tabbar { position:fixed; bottom:0; left:0; right:0; background:#fff; border-top:1px solid var(--line);
  display:flex; z-index:10; padding-bottom:env(safe-area-inset-bottom); box-shadow:0 -2px 12px rgba(30,60,140,.06); }
.tab-item { flex:1; text-align:center; padding:8px 0 9px; color:#a3abc0; cursor:pointer; position:relative; }
.tab-item svg { width:23px; height:23px; }
.tab-item span { display:block; font-size:11px; margin-top:2px; }
.tab-item.active { color:var(--blue-700); font-weight:600; }
.tab-item.active::before { content:""; position:absolute; top:0; left:50%; transform:translateX(-50%);
  width:26px; height:3px; border-radius:0 0 3px 3px; background:var(--orange-500); }

.brand-foot { text-align:center; font-size:11px; color:var(--gray2); padding:6px 0 2px; line-height:1.7; }
