/* ============ 全局 ============ */
:root {
    --primary: #3b6ef5;
    --primary-dark: #2e57cf;
    --gold: #f5b400;
    --green: #22c55e;
    --red: #ef4444;
    --gray-50: #f7f8fb;
    --gray-100: #eef0f6;
    --gray-200: #dfe2eb;
    --gray-400: #98a0b3;
    --gray-600: #5d6378;
    --gray-800: #232735;
    --bg-page: #f3f5fb;
    --shadow: 0 4px 14px rgba(28, 35, 64, .06);
    --shadow-lg: 0 12px 30px rgba(28, 35, 64, .12);
    --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg-page); color: var(--gray-800); }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; padding: 10px 12px; border: 1px solid var(--gray-200); border-radius: 8px; background: #fff; transition: border-color .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,110,245,.12); }

/* ============ 登录页 ============ */
.login-wrap {
    /* 侨外成长绿：登录页专属品牌色 */
    --brand-green: #2f9e44;
    --brand-green-dark: #247a35;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr min(452px, 94vw);
    align-items: center;
    position: relative;
    overflow: hidden auto;
    background: #eaf7d9;
}
/* 学校主题背景图：铺满视口，右侧留白区放登录卡片 */
.login-art {
    position: absolute;
    inset: 0;
    background: #eaf7d9 url('/static/images/login-bg.png') center center / cover no-repeat;
}
.login-art::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,.08) 40%,
        rgba(255,255,255,.45) 70%,
        rgba(255,255,255,.62) 100%);
}
.login-panel {
    position: relative;
    z-index: 1;
    grid-column: 2;
    justify-self: center;
    width: 100%;
    padding: 40px 24px 26px;
}
/* 毛玻璃卡片，让表单在背景图上依然清晰 */
.login-card {
    width: 100%;
    padding: 30px 32px 24px;
    border-radius: 22px;
    background: rgba(255,255,255,.90);
    border: 1px solid rgba(255,255,255,.85);
    box-shadow: 0 26px 60px rgba(24,74,42,.16), 0 2px 8px rgba(24,74,42,.06);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
}
.login-header { text-align: center; margin-bottom: 22px; }
.school-logo {
    width: 76px;
    height: 76px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 6px 18px rgba(24,74,42,.15);
}
.school-name { margin: 12px 0 2px; font-size: 14px; font-weight: 600; letter-spacing: 2px; color: #2f7a3f; }
.login-header h1 { font-size: 21px; margin: 2px 0 6px; letter-spacing: .5px; color: #1d3a24; }
.login-sub { margin: 0; font-size: 12.5px; letter-spacing: 1px; color: var(--gray-400); }
.login-copyright { margin: 14px 0 0; text-align: center; font-size: 12px; color: rgba(34,72,44,.68); text-shadow: 0 1px 0 rgba(255,255,255,.7); }
.muted { color: var(--gray-400); font-size: 13px; }
.center { text-align: center; }

.tab-bar { display: flex; background: var(--gray-100); border-radius: 10px; padding: 4px; margin-bottom: 18px; }
.tab { flex: 1; padding: 8px; border: 0; background: transparent; border-radius: 8px; color: var(--gray-600); font-size: 14px; }
.tab.active { background: #fff; color: var(--primary); box-shadow: var(--shadow); }

.form { display: none; }
.form.active { display: block; }
.form label { display: block; font-size: 12px; color: var(--gray-600); margin-bottom: 12px; }
.form input { width: 100%; margin-top: 4px; }
.row { display: flex; gap: 8px; align-items: center; }
.row.between { justify-content: space-between; }
.row > input, .row > select { flex: 1; }

.btn-primary, .btn-ghost { padding: 10px 18px; border-radius: 8px; font-size: 14px; border: 0; transition: all .15s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { background: var(--gray-200); color: var(--gray-400); cursor: not-allowed; }
.btn-ghost { background: var(--gray-100); color: var(--gray-600); }
.btn-ghost:hover { background: var(--gray-200); }
.btn-ghost.full { width: 100%; }

.tip, .footer-tip { margin-top: 14px; font-size: 12px; }
.footer-tip { text-align: center; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--gray-100); }

/* 登录页内使用成长绿主题，与校徽配色一致 */
.login-wrap .tab-bar { background: rgba(232,241,229,.92); }
.login-wrap .tab.active { color: var(--brand-green-dark); }
.login-wrap input:focus { border-color: var(--brand-green); box-shadow: 0 0 0 3px rgba(47,158,68,.15); }
.login-wrap .btn-ghost { background: #eef4ec; color: #31703d; }
.login-wrap .btn-ghost:hover { background: #e1ecde; }
.login-wrap .btn-primary {
    background: linear-gradient(135deg, #4caf50, var(--brand-green));
    box-shadow: 0 8px 18px rgba(47,158,68,.26);
}
.login-wrap .btn-primary:hover { background: linear-gradient(135deg, #3f9e45, var(--brand-green-dark)); }
.login-wrap .btn-primary:disabled { background: var(--gray-200); box-shadow: none; }
.login-wrap .form .btn-primary { width: 100%; margin-top: 4px; padding: 12px; font-size: 15px; font-weight: 600; letter-spacing: 2px; }
.login-wrap .tip { line-height: 1.7; }
.parent-entry { color: var(--brand-green-dark); font-weight: 600; }
.parent-entry:hover { color: var(--brand-green); text-decoration: underline; }

@media (max-width: 900px) {
    .login-wrap { grid-template-columns: 1fr; }
    .login-panel { grid-column: 1; padding: 24px 18px 20px; }
    /* 竖屏裁切时避开背景图上的标题文字，只留干净的画面 */
    .login-art { background-position: 76% center; }
    .login-art::after { background: linear-gradient(180deg, rgba(255,255,255,.30), rgba(255,255,255,.78) 60%); }
    .login-card { padding: 24px 20px 20px; background: rgba(255,255,255,.94); }
    .school-logo { width: 64px; height: 64px; }
    .login-header h1 { font-size: 19px; }
}

/* ============ 主框架 ============ */
.app-layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }

.sidebar { background: #1f2436; color: #c7cce0; padding: 22px 14px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; color: #fff; margin-bottom: 24px; padding: 0 8px; }
.brand .logo { font-size: 24px; }
/* 侧边栏品牌图标：换成校徽（深色底上加浅色圆底，保证辨识度） */
.brand .logo-img {
    width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%;
    object-fit: contain; background: #fff; padding: 2px;
}
.brand-name { letter-spacing: 1px; }

#nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: #c7cce0; font-size: 14px; transition: background .15s; cursor: pointer; }
/* 级长（老师身份）也能进「考勤总览」这类原本只给行政的栏目；
   用 body 上的类 + !important 覆盖 HTML 里的内联 display:none，避免和角色脚本抢执行顺序 */
body.is-grade-leader .nav-item.admin-only.leader-ok { display: block !important; }

.nav-item:hover { background: rgba(255,255,255,.06); }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-item .icon { width: 18px; text-align: center; }

.sidebar-footer { padding-top: 18px; border-top: 1px solid rgba(255,255,255,.06); }
.sidebar-footer .btn-ghost { background: rgba(255,255,255,.05); color: #c7cce0; }
.sidebar-footer .btn-ghost:hover { background: rgba(255,255,255,.12); }

.main { background: var(--bg-page); display: flex; flex-direction: column; min-width: 0; }
.topbar { background: #fff; padding: 16px 28px; border-bottom: 1px solid var(--gray-100); display: flex; justify-content: space-between; align-items: center; }
.topbar h2 { margin: 0; font-size: 18px; }
.topbar-right { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.badge { background: var(--primary); color: #fff; padding: 4px 10px; border-radius: 999px; font-size: 12px; }

.view { display: none; padding: 24px 28px; overflow-y: auto; flex: 1; }
.view.active { display: block; }
.panel { background: #fff; border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 16px; }
.panel h3 { margin: 0 0 12px; font-size: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.panel-head h3 { margin: 0; }

/* ============ 卡片 ============ */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 16px; }
.cards .card { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.cards .card .label { color: var(--gray-400); font-size: 13px; }
.cards .card .value { font-size: 28px; font-weight: 700; margin-top: 6px; color: var(--primary); }
.cards .card.gold .value { color: var(--gold); }
.cards .card.green .value { color: var(--green); }
.cards .card.red .value { color: var(--red); }

/* ============ 表格 ============ */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
table th, table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--gray-100); }
table th { color: var(--gray-600); font-weight: 500; background: var(--gray-50); }
table tr:hover td { background: var(--gray-50); }
.tag-pill { padding: 2px 8px; border-radius: 999px; background: var(--gray-100); font-size: 12px; }
.tag-pill.primary { background: rgba(59,110,245,.12); color: var(--primary); }
.tag-pill.green { background: rgba(34,197,94,.12); color: var(--green); }
.tag-pill.red { background: rgba(239,68,68,.12); color: var(--red); }
.tag-pill.gold { background: rgba(245,180,0,.12); color: var(--gold); }

/* ============ 评价项 ============ */
.items-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 12px; }
/* 评价类型（大类）按钮：排在学生名单下面，全部平铺，默认选中「作业情况」 */
.ev-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 12px; }
.ev-cat {
    padding: 7px 14px; border-radius: 999px; cursor: pointer; line-height: 1;
    border: 1px solid var(--gray-200); background: var(--gray-50); color: var(--gray-600);
    font-size: 13px;
}
.ev-cat:hover { border-color: var(--primary); color: var(--primary); }
.ev-cat.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.ev-item { position: relative; background: var(--gray-50); border: 1px solid var(--gray-100); border-radius: 10px; padding: 10px 12px; cursor: pointer; transition: all .15s; text-align: center; user-select: none; }
.ev-item:hover { border-color: var(--primary); }
/* 项目名是 14px 小字，用在白底上要够深才看得清：
   --green / --red 是给星星胶囊做底色的亮色，直接拿来写字发飘 */
.ev-item.positive { color: #15803d; }
.ev-item.negative { color: #cf2b1f; }
.ev-item.neutral { color: var(--gray-600); }
.ev-item .item-name { font-size: 14px; font-weight: 500; }
.ev-item .item-star { font-size: 18px; margin-top: 4px; }
/* 评价项图标：圆底（底色跟星色走）+ 星章图标 + 右下角加减分角标。
   电脑端卡片和手机端点评项共用这一套，两边看起来一模一样。 */
.ev-item .item-ico { display: flex; justify-content: center; margin-bottom: 6px; }
.ev-ico {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 50%; background: #eef0ff;
}
/* 减分 / 不计分的圆底统一暖红、浅蓝，加分才用星色 */
.ev-ico.st-neg   { background: #fee2e2; }
.ev-ico.st-zero  { background: #dbeafe; }
.ev-ico.st-green  { background: #dcfce7; }
.ev-ico.st-yellow { background: #fef3c7; }
.ev-ico.st-red    { background: #fee2e2; }
.ev-ico.st-blue   { background: #dbeafe; }
.ev-ico.st-purple { background: #ede9fe; }
.ev-ico.st-gold   { background: #fef3c7; }
.ev-ico-emoji { font-size: 22px; line-height: 1; }
.ev-ico-pt {
    position: absolute; right: -4px; bottom: -4px; box-sizing: border-box;
    min-width: 19px; height: 19px; padding: 0 4px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px; background: #fff; border: 1.5px solid currentColor;
    font-size: 11px; font-weight: 700; line-height: 1;
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ev-ico-pt.pos  { color: #15803d; }
.ev-ico-pt.neg  { color: #dc2626; }
.ev-ico-pt.zero { color: #7c8aa5; }

/* 选中：整块换成深一点的蓝色渐变 + 白字，右上角打勾。
   卡片里的「星章」「星色」小胶囊自带浅色底（半透明绿 / 浅绿），
   叠在蓝底上会糊成一片、字看不清 —— 选中时统一改成白底，保留各自文字色。 */
.ev-item.active {
    background: linear-gradient(160deg, #3567e8, #23429f);
    color: #fff !important;
    border-color: #23429f;
    box-shadow: 0 6px 16px rgba(35, 66, 159, .35);
    transform: translateY(-1px);
}
.ev-item.active .item-name { color: #fff; font-weight: 600; }
.ev-item.active .badge-chip,
.ev-item.active .star-badge {
    background: #fff !important;
    border-color: #fff !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .16);
}
.ev-item.active .star-neg { color: #dc2626; }        /* 减分数字照样标红 */
.ev-item.active .ev-item-tag { background: rgba(255, 255, 255, .92); color: var(--gray-600); }
.ev-item.active::after {
    content: '✓';
    position: absolute;
    top: 6px; right: 8px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #fff;
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

/* 老师自定义的评价项目：虚线边框 + 右上角编辑 / 停用 */
.ev-item.mine { border-style: dashed; border-color: var(--primary); }
.ev-item-ops { display: inline-flex; gap: 3px; margin-left: 6px; vertical-align: middle; }
.ev-mini-btn { border: 1px solid var(--gray-100); background: #fff; color: var(--gray-600);
    border-radius: 6px; width: 20px; height: 20px; line-height: 1; font-size: 12px;
    padding: 0; cursor: pointer; }
.ev-mini-btn:hover { border-color: var(--primary); color: var(--primary); }
.ev-mini-btn.danger:hover { border-color: var(--red); color: var(--red); }
.ev-item-tag { font-size: 11px; padding: 1px 6px; border-radius: 999px;
    background: var(--gray-100); color: var(--gray-400); }

#ev-selected { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.chip { background: var(--primary); color: #fff; padding: 4px 10px; border-radius: 999px; font-size: 12px; display: inline-flex; gap: 6px; align-items: center; }
.chip .x { cursor: pointer; opacity: .7; }
.chip.gold { background: var(--gold); }

/* ============ Modal ============ */
.overlay { position: fixed; inset: 0; background: rgba(28,35,64,.4); display: flex; align-items: center; justify-content: center; z-index: 999; }
.overlay.hidden { display: none; }
.modal { background: #fff; width: 480px; max-width: 92vw; max-height: 88vh; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.modal-head { padding: 14px 18px; border-bottom: 1px solid var(--gray-100); display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-head .btn-ghost { padding: 4px 10px; font-size: 18px; }
.modal-body { padding: 18px; overflow-y: auto; flex: 1; }
.modal-body label { display: block; font-size: 12px; color: var(--gray-600); margin-bottom: 10px; }
.modal-body input, .modal-body select, .modal-body textarea { width: 100%; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--gray-100); display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- 可搜索下拉（班主任选择等）：输入框 + 结果浮层 ---------- */
.combo { position: relative; }
/* 列表就撑在输入框下面（比浮动层稳：不会被弹窗的 overflow 裁掉，也不会压住底部按钮） */
.combo-list {
    display: none; max-height: 208px; overflow-y: auto;
    margin-top: 6px; padding: 4px;
    background: #fff; border: 1px solid var(--gray-200); border-radius: 10px;
    box-shadow: 0 6px 18px rgba(20, 30, 60, .10);
}
.combo-list.show { display: block; }
.combo-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13.5px;
}
.combo-item:hover { background: var(--gray-50, #f6f8fc); }
.combo-item.on { background: #eef3ff; }
.combo-main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.combo-main b { font-size: 13.5px; font-weight: 600; color: var(--gray-800); }
.combo-sub { font-size: 11.5px; color: var(--gray-400); }
.combo-phone { font-size: 12.5px; color: var(--gray-500); font-variant-numeric: tabular-nums; }
.combo-empty { padding: 10px; font-size: 12.5px; color: var(--gray-400); }

/* ============ 工具类 ============ */
.flex { display: flex; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.text-right { text-align: right; }
.hidden { display: none !important; }
.empty { padding: 28px; text-align: center; color: var(--gray-400); }

/* ============ 分页 ============ */
.pager { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 14px 4px 2px; }
.pager-info { color: var(--gray-400); font-size: 13px; margin-right: auto; }
.pager-btn { min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid var(--gray-200); background: #fff; border-radius: 6px; font-size: 13px; color: var(--gray-600); transition: all .15s; }
.pager-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pager-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pager-btn:disabled { opacity: .45; cursor: not-allowed; }
.pager-dots { color: var(--gray-400); padding: 0 2px; }
.pager .btn-ghost { padding: 4px 12px; font-size: 13px; }
.pager select { padding: 4px 8px; font-size: 13px; }

/* ============ 家长绑定 / 孩子切换 ============ */
.bind-list { max-height: 280px; overflow-y: auto; border: 1px solid var(--gray-200); border-radius: 10px; padding: 6px; margin-top: 10px; background: var(--gray-50); }
.bind-item { display: flex !important; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 13px; color: var(--gray-800); margin-bottom: 0 !important; cursor: pointer; }
.bind-item:hover { background: #fff; }
.bind-item input[type=checkbox] { width: auto; margin: 0; flex: none; }
.bind-item .bind-name { flex: 1; font-size: 14px; }
.child-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.child-bar select { min-width: 200px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 12px; }

/* 手机端（≤768px）适配统一写在**本文件末尾**的 @media 块里。
   放在末尾是因为同优先级下后定义的规则才生效，写在这里会被后面的样式覆盖。
   注意：早期版本这里是 `.sidebar { display: none }`，会导致手机上完全没有菜单，
   现已改为抽屉式导航（见文件末尾）。 */

/* 第二期新增 */
.thumb { max-width: 80px; max-height: 80px; border-radius: 4px; vertical-align: middle; border: 1px solid #e5e7eb; object-fit: cover; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid label { display: block; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; box-sizing: border-box; padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 4px; }
.btn-ghost.small { padding: 2px 8px; font-size: 12px; }
/* 操作列里并排两个小按钮（如「调整行政 / 编辑」）时留出间隙，否则会粘在一起 */
.btn-ghost + .btn-ghost { margin-left: 6px; }

/* ============ 班级学生管理（第三期新增） ============ */
/* 班级管理筛选行 */
.filter-row { padding: 0 0 12px; }
.filter-row select { flex: 0 0 180px; }
/* 筛选行里的开关式按钮（如「我任教的班级」）：点一下只留自己任教的班 */
.filter-chip {
    flex: 0 0 auto; align-self: center;
    padding: 7px 14px; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--gray-200); background: #fff; color: var(--gray-600);
    font-size: 13px; line-height: 1; white-space: nowrap;
}
.filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.filter-chip.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* 班级管理：选中行（点「学生」按钮后） */
#classes-table tr.selected { background: var(--primary-50, #eef2ff); }
#classes-table tr.selected td { background: rgba(79, 108, 255, .08); border-top-color: rgba(79, 108, 255, .25); border-bottom-color: rgba(79, 108, 255, .25); }
#classes-table tr.selected td:first-child { border-left: 3px solid var(--primary); }

/* ============ 导师中心（师生结对 + 3+1 工作） ============ */
.mt-note { color: var(--gray-600); font-size: 13px; margin: 0 0 12px; line-height: 1.6; }
.mt-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--gray-200); margin: 0 0 14px; }
.mt-tab { padding: 8px 14px; border: 0; background: transparent; color: var(--gray-600); font-size: 14px; border-radius: 8px 8px 0 0; }
.mt-tab:hover { background: var(--gray-100); }
.mt-tab.active { color: var(--primary); font-weight: 600; background: #fff; box-shadow: inset 0 -2px 0 var(--primary); }
.mt-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.mt-bar .spacer { flex: 1; }
.mt-bar .muted { font-size: 13px; }

/* 学生多选：卡片网格 + 已选 chips */
.mt-stu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 6px; max-height: 250px; overflow: auto; border: 1px solid var(--gray-200); border-radius: 8px; padding: 8px; background: var(--gray-50); }
.mt-stu-item { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; padding: 3px 4px; border-radius: 4px; }
.mt-stu-item:hover { background: var(--gray-100); }
.mt-stu-item input { width: auto; padding: 0; margin: 0; }
.mt-stu-item input:focus { box-shadow: none; }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; min-height: 26px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--gray-100); color: var(--gray-600); font-size: 12px; }
.chip .x { cursor: pointer; color: var(--gray-400); font-weight: 700; }
.chip .x:hover { color: var(--red); }
.mt-empty { padding: 22px; text-align: center; color: var(--gray-400); font-size: 13px; }
.mt-cell { max-width: 420px; white-space: pre-wrap; word-break: break-word; }

/* 3+1 完成情况：已录入绿色 ✓（多次显示次数），未录入灰色 ○ */
.mt-progress { white-space: nowrap; }
.mt-badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; margin-right: 5px; border-radius: 999px; font-size: 12px; background: var(--gray-100); color: var(--gray-400); }
.mt-badge.done { background: #e7f6ec; color: #17803d; font-weight: 600; }
/* 导师分配列表最左的序号列：窄、居中、灰一点，不抢导师/学生的注意力 */
.mt-idx { width: 52px; color: var(--gray-500); font-variant-numeric: tabular-nums; text-align: center; }
.mt-ops { white-space: nowrap; }
.mt-ops .btn-ghost + .btn-ghost { margin-left: 4px; }
.mt-summary { margin: 0 0 10px; font-size: 13px; color: var(--gray-600); }

/* 班级学生面板：范围标签 */
.scope-tag { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: normal; background: var(--gray-100); color: var(--gray-600); vertical-align: middle; }
.scope-tag.on { background: rgba(79, 108, 255, .12); color: var(--primary); }

/* 班级星星榜：汇总行 / 数值列 / 可排序表头 */
.mt-item { display: inline-block; margin-right: 18px; }
.mt-item b { color: var(--gray-800); }
.cs-table th:nth-child(n+3),
.cs-table td:nth-child(n+3) { text-align: center; }
.cs-num { display: inline-block; min-width: 44px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cs-num i { font-style: normal; font-size: 11px; margin-left: 3px; opacity: .7; }
.cs-num.plus { color: #17803d; }
.cs-num.minus { color: #d9363e; }
.cs-num.zero { color: var(--gray-400); font-weight: normal; }
.th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.th-sort:hover { color: var(--primary); }

/* 当天考勤：一行一组按钮 */
.att-table td { vertical-align: middle; }
.att-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.att-btn {
    padding: 5px 12px;
    font-size: 13px;
    color: var(--gray-600);
    background: #f5f6f8;
    border: 1px solid transparent;
    border-radius: 8px;
    transition: background .12s, color .12s, border-color .12s;
}
.att-btn:hover:not(:disabled) { background: #eceff5; }
.att-btn:disabled { opacity: .5; cursor: default; }
.att-btn.on.present { background: #e8f7ee; color: #17803d; border-color: #b7e4c7; font-weight: 600; }
.att-btn.on.late    { background: #fff5e6; color: #b45309; border-color: #fcd9a4; font-weight: 600; }
.att-btn.on.leave   { background: #eef2ff; color: #3b5bdb; border-color: #c5d0fa; font-weight: 600; }
.att-btn.on.absent  { background: #fdecec; color: #d9363e; border-color: #f7bcbf; font-weight: 600; }

.att-tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; }
.att-tag.present { background: #e8f7ee; color: #17803d; }
.att-tag.late    { background: #fff5e6; color: #b45309; }
.att-tag.leave   { background: #eef2ff; color: #3b5bdb; }
.att-tag.absent  { background: #fdecec; color: #d9363e; }

.att-table tr.att-unmarked td { background: #fcfcfd; }
.att-unchecked-row td { background: #fffdf5; }

/* 当天考勤的顶部概览：桌面端一行小字，手机端（见文件末尾 media）变成信息卡片 */
.att-hero {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    padding: 10px 14px; margin-bottom: 12px;
    border: 1px solid var(--gray-100); border-radius: 12px; background: #fff;
}
.att-hero-name { font-size: 14px; font-weight: 600; color: var(--gray-800); }
.att-hero-meta { display: flex; align-items: center; gap: 10px; margin-top: 2px;
    font-size: 12px; color: var(--gray-400); }
.att-state { padding: 1px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.att-state.todo { background: #fff5e6; color: #b45309; }
.att-state.done { background: #e8f7ee; color: #17803d; }
.att-hero-counts { display: flex; gap: 12px; font-size: 12px; color: var(--gray-600); }
.att-cnt b { font-size: 15px; margin-right: 2px; }
.att-cnt.present b { color: #17803d; }
.att-cnt.late b { color: #b45309; }
.att-cnt.leave b { color: #6366f1; }
.att-cnt.absent b { color: #d9363e; }

/* 请假名单：概览下面单独一条，把请假的孩子名字和假别列出来 */
.att-leave {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    margin: 0 0 12px; padding: 9px 14px;
    border: 1px solid #ffe2c6; border-radius: 12px;
    background: #fffaf3;
    font-size: 13px; color: var(--gray-600);
}
.att-leave-title { font-weight: 600; color: #b45309; white-space: nowrap; }
.att-leave-title b { font-size: 15px; margin: 0 2px; }
.att-leave-item {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px; border-radius: 999px;
    background: #fff; border: 1px solid #f2e2d0;
    font-size: 13px; font-weight: 600; color: var(--gray-800);
}
.att-leave-item i { font-style: normal; font-size: 12px; font-weight: normal; color: #b45309; }
/* 旷课的假别标红，跟事假 / 病假（橙）一眼分开 */
.att-leave-item i.absent { color: #b91c1c; font-weight: 600; }
.att-leave-empty { color: var(--gray-400); }

/* 手机端那套卡片列表与底部提交栏：桌面端一律不显示 */
.att-mobile { display: none; }
.att-savebar { display: none; }

/* 「学生」按钮：点击选中后高亮 */
.btn-students { padding: 4px 12px; border-radius: 6px; font-size: 12px; border: 1px solid var(--gray-200); background: #fff; color: var(--gray-600); cursor: pointer; transition: all .15s; }
.btn-students:hover { border-color: var(--primary); color: var(--primary); }
.btn-students.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* 级长设置：年级多选（每个年级可有多名级长） */
.gl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.gl-check { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.gl-check input { width: auto; padding: 0; margin: 0; }
.gl-check input:focus { box-shadow: none; }

/* 星星派发统计：列较多（班级 + 6 项 + 各星色），允许横向滚动 */
#ss-body { overflow-x: auto; }

/* 表格操作按钮：查看 / 班级呼叫 / 编辑 / 删除（移除） */
.btn-view, .btn-edit, .btn-del, .btn-call {
    display: inline-block; padding: 4px 12px; border-radius: 6px; font-size: 12px;
    border: 1px solid transparent; cursor: pointer; transition: all .15s; line-height: 1.4;
}
/* 班级呼叫：橙色，跟「查看」区分开，是这一行唯一会推送到一体机的操作 */
.btn-call { color: #c2410c; border-color: #fed7aa; background: #fff7ed; }
.btn-call:hover { background: #f97316; border-color: #f97316; color: #fff; }

/* 「最近班级呼叫」列表：发送者 / 班级 / 时间 / 内容 / 状态 */
.cb-hint { font-size: 12px; font-weight: 400; color: var(--gray-400); }
.rc-table { font-size: 13.5px; }
.rc-table th { padding: 8px 12px; background: #fffaf3; color: #9a3412; }
.rc-table td { padding: 9px 12px; vertical-align: top; }
.rc-table .rc-by { font-weight: 700; white-space: nowrap; }
.rc-table .rc-cls { white-space: nowrap; color: var(--gray-600); }
.rc-table .rc-time {
    color: #b45309;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.rc-table .rc-text { color: #57534e; word-break: break-word; }
.cr-badge {
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.cr-badge.wait { color: #92400e; background: #fef3c7; }   /* 等待教室接收 */
.cr-badge.recv { color: #1d4ed8; background: #dbeafe; }   /* 教室已收到 */
.cr-badge.done { color: #166534; background: #dcfce7; }   /* 学生已知晓 */
.btn-view { color: #2563eb; border-color: #bfdbfe; background: #eff6ff; }
.btn-view:hover { background: #2563eb; border-color: #2563eb; color: #fff; }
.btn-edit { color: #059669; border-color: #a7f3d0; background: #ecfdf5; }
.btn-edit:hover { background: #059669; border-color: #059669; color: #fff; }
.btn-del { color: #dc2626; border-color: #fecaca; background: #fef2f2; }
.btn-del:hover { background: #dc2626; border-color: #dc2626; color: #fff; }

/* ============ 任教科目设置弹窗：班级 / 任教学科 两列 + 删除 ============ */
.tc-note { font-size: 12.5px; line-height: 1.7; margin-bottom: 10px; }
.tc-head { display: flex; gap: 8px; font-size: 12px; padding: 0 2px 6px; }
.tc-head span:nth-child(1) { flex: 1; }
.tc-head span:nth-child(2) { width: 130px; }
.tc-head span:nth-child(3) { width: 52px; }
.tc-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.tc-row .tc-row-class { flex: 1; min-width: 0; }
.tc-row .tc-row-subject { width: 130px; }
.tc-row .tc-row-del { flex: none; padding: 5px 10px; border-radius: 6px; font-size: 12px; border: 1px solid #fecaca; background: #fef2f2; color: #dc2626; cursor: pointer; }
.tc-row .tc-row-del:hover { background: #dc2626; border-color: #dc2626; color: #fff; }

/* ============ 班级任课老师弹窗：科目 + 老师 两列（行政可编辑） ============ */
.ct-head { display: flex; gap: 8px; font-size: 12px; padding: 0 2px 6px; }
.ct-head span:nth-child(1) { width: 120px; }
.ct-head span:nth-child(2) { flex: 1; }
.ct-head span:nth-child(3) { width: 52px; }
.ct-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.ct-row select.ct-subject { width: 120px; flex: none; }
/* 老师选择框：输入框 + 可搜索下拉（姓名 / 手机号） */
.ct-pick { position: relative; flex: 1; min-width: 0; max-width: 380px; }
.ct-pick-input { width: 100%; box-sizing: border-box; }
.ct-pick-panel { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); max-height: 216px; overflow-y: auto; background: #fff; border: 1px solid var(--gray-100); border-radius: 8px; box-shadow: 0 8px 24px rgba(15, 23, 42, .12); padding: 4px; }
.ct-pick-panel.hidden { display: none; }
.ct-pick-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 9px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.ct-pick-item:hover, .ct-pick-item.active { background: #eff6ff; }
.ct-pick-item .pick-name { font-weight: 500; color: var(--gray-900); }
.ct-pick-item .pick-meta { font-size: 12px; color: var(--gray-500); }
.ct-row .ct-del { flex: none; padding: 5px 10px; border-radius: 6px; font-size: 12px; border: 1px solid #fecaca; background: #fef2f2; color: #dc2626; cursor: pointer; }
.ct-row .ct-del:hover { background: #dc2626; border-color: #dc2626; color: #fff; }
/* 手机端：科目和删除占一行，老师单独占一行，手机号才不会被截断 */
@media (max-width: 640px) {
    .ct-head { display: none; }
    .ct-row { flex-wrap: wrap; row-gap: 6px; }
    .ct-row select.ct-subject { flex: 1; width: auto; }
    .ct-row .ct-del { order: 2; }
    .ct-row .ct-pick { order: 3; flex: 1 1 100%; max-width: none; }
}

/* 星星类型徽章（绿/黄/红/蓝/紫/金） */
.star-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
/* 减分数字（负号 + 数字）标红（徽章内与纯文本形态统一） */
.star-neg { color: #dc2626; }

/* ============ 录入评价：学生卡片墙（多选） ============ */
.student-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; margin-bottom: 14px; min-height: 30px; }
.student-wall:empty { margin-bottom: 0; }

/* 录入评价的手机端结构（九宫格学生墙 / 底部点评栏 / 点评项弹层 / 发布结果页）：
   只在 ≤768px 打开，桌面端一律不参与布局 */
.ev-wall-mobile, .ev-bar, .ev-mask, .ev-sheet, .ev-done { display: none; }
.stu-card { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #fff; border: 1px solid var(--gray-100); border-radius: 10px; cursor: pointer; user-select: none; position: relative; transition: border-color .15s, box-shadow .15s; }
.stu-card:hover { border-color: var(--primary); }
.stu-card.selected { border-color: var(--primary); background: rgba(59,110,245,.06); box-shadow: 0 0 0 1px var(--primary) inset; }
.stu-avatar { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; color: #fff; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.stu-meta { min-width: 0; flex: 1; }
.stu-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stu-no { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stu-check { position: absolute; top: 4px; right: 6px; font-size: 11px; color: var(--primary); font-weight: 700; display: none; }
.stu-card.selected .stu-check { display: inline; }

/* ============ 联评总览 ============ */
.ov-totals { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ov-total-card { background: #fff; border: 1px solid var(--gray-100); border-radius: 10px; padding: 12px 14px; }
.ov-total-title { display: flex; gap: 6px; align-items: baseline; margin-bottom: 8px; }
.ov-total-title b { font-size: 14px; }
.ov-total-title .muted { font-size: 11px; }
.ov-total-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.ov-total-row .ov-num { font-size: 20px; font-weight: 600; line-height: 1.1; }
.ov-total-row .muted { font-size: 11px; }
#ov-table table { font-size: 13px; }
#ov-table table th { font-size: 12px; }

/* ============ 奖章评选 ============ */
.medal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(430px, 1fr)); gap: 14px; }
.medal-card { background: #fff; border: 1px solid var(--gray-100); border-radius: 12px; padding: 14px 16px; }
.medal-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.medal-head .medal-title { flex: 1; }
.medal-head h4 { margin: 0; font-size: 15px; }
.medal-head .muted { margin: 2px 0 0; font-size: 12px; }
.medal-emoji { font-size: 22px; line-height: 1; }
.medal-chip { flex-shrink: 0; display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.medal-card table { font-size: 13px; }
.medal-card tr.confirmed td { background: #f0fdf4; }
.medal-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 10px; flex-wrap: wrap; }
.medal-foot .muted { font-size: 12px; }
/* 「推荐到学校联评」列：表头文字可折行，勾选框不换行，给行内留出空间 */
.medal-rec { width: 1%; white-space: nowrap; text-align: center; }
.medal-card th.medal-rec { white-space: normal; min-width: 132px; }
.medal-rec input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; }
/* 核对 / 学校核对两列：都是短状态，宽度收到最小，勾选框垂直居中 */
.medal-check { width: 1%; white-space: nowrap; text-align: center; }
.medal-check input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; vertical-align: middle; }
/* 已通过学校核对的勾选框：禁用态，告诉用户这里不能改 */
.medal-check input[type=checkbox]:disabled { cursor: not-allowed; opacity: .55; }
.tag-done { font-size: 11px; color: #0f9d58; margin-left: 3px; }
.tag-done.blue { color: #3b6ef5; }
/* 推荐列里「勾选框 + 已推荐」并排，避免文字掉到下一行 */
.nom-cell { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.tag-pill.blue { background: rgba(59,110,245,.12); color: #3b6ef5; }

/* 查看学生：星星类型明细（绿/黄/红/蓝/紫/金） */
.star-type-list { list-style: none; margin: 6px 0 4px; padding: 0; }
.star-type-list li { display: flex; align-items: center; gap: 10px; padding: 4px 0; border-bottom: 1px dashed var(--gray-100); font-size: 13px; }
.star-type-list li:last-child { border-bottom: none; }
.star-type-list li.zero { opacity: .5; }
.star-chip { display: inline-block; min-width: 44px; text-align: center; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.star-type-list .star-cnt { color: var(--gray-600); min-width: 44px; }
.star-type-list .star-val { margin-left: auto; font-weight: 600; }
.rule-note { font-size: 12px; margin: 4px 0 12px; }

/* 星章 chip（评价项的二级归属，绿星下 5 章） */
.badge-chip { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 500; border: 1px solid transparent; line-height: 1.5; }
.badge-chip-lg { min-width: 64px; text-align: center; padding: 2px 10px; }
.item-badge { margin-left: 6px; vertical-align: middle; }

/* ============ 家长端（移动端优先） ============ */
/* 移动端登录 / 工作台共用的顶部栏与整体外观 */

.parent-shell { min-height: 100vh; background: linear-gradient(180deg, #fef8f0 0%, #fff7e8 60%, #fff 100%); display: flex; flex-direction: column; }
.parent-topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--gray-100); position: sticky; top: 0; z-index: 10; }
.parent-topbar .topbar-back { display: inline-flex; align-items: center; gap: 4px; color: var(--gray-600); font-size: 13px; padding: 6px 10px; border-radius: 999px; background: var(--gray-100); }
.parent-topbar .topbar-back .back-icon { font-size: 16px; line-height: 1; }
.parent-topbar .topbar-title { font-size: 15px; font-weight: 600; color: var(--gray-800); }
.parent-topbar .topbar-placeholder { width: 76px; }
.parent-topbar .topbar-action { color: var(--primary); font-size: 13px; padding: 6px 10px; border-radius: 999px; background: rgba(59,110,245,.08); }

.parent-hero { text-align: center; padding: 28px 24px 12px; }
.parent-hero .hero-emoji { font-size: 56px; line-height: 1; margin-bottom: 8px; }
.parent-hero .hero-title { font-size: 19px; font-weight: 600; margin: 0 0 4px; color: var(--gray-800); }
.parent-hero .hero-sub { font-size: 13px; color: var(--gray-600); margin: 0; }

.parent-card { background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); padding: 22px 20px; margin: 18px 16px 28px; flex: 0 0 auto; }
.parent-card .tab-bar { background: #f3f5fb; border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.parent-card .tab { padding: 10px 6px; font-size: 13px; }
.parent-card .tab-emoji { margin-right: 4px; }

.field { display: block; margin-bottom: 14px; }
.field-label { display: block; font-size: 12px; color: var(--gray-600); margin-bottom: 6px; }
.field-input { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--gray-200); font-size: 15px; }
.field-input.big { padding: 14px 16px; font-size: 16px; }
.code-row { display: flex; gap: 8px; }
.code-row .field-input { flex: 1; }
.code-btn { flex-shrink: 0; padding: 0 14px; font-size: 13px; border-radius: 10px; height: 48px; white-space: nowrap; }
.btn-primary.big-btn { width: 100%; padding: 14px 0; font-size: 16px; border-radius: 12px; margin-top: 6px; }

.form-tip { margin: 14px 0 0; font-size: 12px; color: var(--gray-400); text-align: center; }

.wx-qr { text-align: center; padding: 8px 0 16px; }
.qr-frame { width: 180px; height: 180px; margin: 0 auto 10px; border-radius: 14px; background: #f3f5fb; display: flex; align-items: center; justify-content: center; }
.qr-inner { font-size: 64px; }
.qr-hint { color: var(--gray-600); font-size: 13px; margin: 0; }

.parent-footer { text-align: center; padding: 18px 16px 28px; font-size: 12px; color: var(--gray-400); }
.parent-footer p { margin: 2px 0; }

/* 家长工作台（移动端单列布局） */
.parent-app { min-height: 100vh; background: var(--bg-page); display: flex; flex-direction: column; }
.parent-app .parent-topbar { position: sticky; }
.parent-content { flex: 1; padding: 14px 14px 86px; overflow-y: auto; }
.parent-content .panel { background: #fff; border-radius: 14px; padding: 16px 16px; box-shadow: var(--shadow); margin-bottom: 14px; }
.parent-content .panel h3 { font-size: 15px; margin: 0 0 12px; }
.parent-content .panel .panel-sub { font-size: 12px; color: var(--gray-400); margin: -4px 0 12px; }

.child-picker { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: thin; }
.child-picker::-webkit-scrollbar { display: none; }
.child-pill { flex-shrink: 0; padding: 8px 14px; border-radius: 999px; background: var(--gray-100); color: var(--gray-600); font-size: 14px; cursor: pointer; transition: all .15s; }
.child-pill.active { background: var(--primary); color: #fff; }

.summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.summary-card { background: linear-gradient(135deg, #f3f5fb, #fff); border-radius: 12px; padding: 12px 14px; border: 1px solid var(--gray-100); }
.summary-card .label { color: var(--gray-600); font-size: 12px; }
.summary-card .value { font-size: 22px; font-weight: 700; margin-top: 2px; color: var(--primary); }
.summary-card.green .value { color: var(--green); }
.summary-card.gold .value { color: var(--gold); }
.summary-card.purple .value { color: #7c3aed; }

.parent-tabbar { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: #fff; border-top: 1px solid var(--gray-100); padding: 6px 0 calc(env(safe-area-inset-bottom, 0px) + 6px); z-index: 9; }
.parent-tab-item { flex: 1; text-align: center; padding: 6px 0; color: var(--gray-600); font-size: 11px; }
.parent-tab-item .tab-icon { font-size: 22px; display: block; line-height: 1; margin-bottom: 2px; }
.parent-tab-item.active { color: var(--primary); }

.child-card { background: linear-gradient(135deg, #fef3c7, #fff); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); margin-bottom: 14px; }
.child-card .child-name { font-size: 17px; font-weight: 600; }
.child-card .child-meta { color: var(--gray-600); font-size: 12px; margin-top: 4px; }
.child-card .child-badge-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.child-badge { padding: 2px 10px; border-radius: 999px; background: rgba(59,110,245,.12); color: var(--primary); font-size: 12px; font-weight: 500; }
.child-badge.gold { background: rgba(245,180,0,.16); color: #b45309; }
.child-badge.green { background: rgba(34,197,94,.12); color: var(--green); }

.history-item { padding: 10px 0; border-bottom: 1px dashed var(--gray-100); font-size: 13px; }
.history-item:last-child { border-bottom: none; }
.history-item .hi-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.history-item .hi-body { color: var(--gray-600); margin-top: 4px; }
.history-item .hi-time { color: var(--gray-400); font-size: 12px; margin-left: auto; }
.history-item .hi-empty { color: var(--gray-400); text-align: center; padding: 12px; font-size: 13px; }

.honor-list .honor-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--gray-100); }
.honor-list .honor-item:last-child { border-bottom: none; }
.honor-list .honor-emoji { font-size: 22px; line-height: 1; }
.honor-list .honor-body { flex: 1; min-width: 0; }
.honor-list .honor-title { font-size: 14px; font-weight: 500; }
.honor-list .honor-sub { font-size: 12px; color: var(--gray-600); margin-top: 2px; word-break: break-all; }
.honor-list .honor-time { font-size: 11px; color: var(--gray-400); margin-top: 2px; }

.parent-empty { text-align: center; padding: 32px 16px; color: var(--gray-400); font-size: 13px; }
.parent-empty .emoji { font-size: 42px; display: block; margin-bottom: 6px; }

.parent-modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: center; z-index: 100; }
.parent-modal { background: #fff; width: 100%; max-width: 480px; border-radius: 18px 18px 0 0; padding: 16px 16px 24px; max-height: 80vh; overflow-y: auto; animation: parentSlideUp .2s ease; }
@keyframes parentSlideUp { from { transform: translateY(100%);} to { transform: translateY(0);} }
.parent-modal h4 { margin: 0 0 12px; font-size: 16px; }
.parent-modal .modal-close-btn { float: right; background: var(--gray-100); border: 0; width: 28px; height: 28px; border-radius: 50%; font-size: 16px; color: var(--gray-600); }

.parent-form .field-label { font-size: 13px; }
.parent-form textarea.field-input { min-height: 80px; }
.parent-form .file-row { display: flex; gap: 8px; align-items: center; }
.parent-form .file-row img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--gray-100); }
.parent-form .submit-row { margin-top: 8px; }

@media (min-width: 720px) {
    /* 平板及以上：把家长端的整体宽度居中，模仿手机壳外观 */
    .parent-shell, .parent-app { max-width: 480px; margin: 0 auto; box-shadow: var(--shadow-lg); border-radius: 24px; min-height: calc(100vh - 24px); margin-top: 12px; margin-bottom: 12px; }
    .parent-topbar { border-radius: 24px 24px 0 0; }
    .parent-tabbar { border-radius: 0 0 24px 24px; }
}

/* ============ 客服微信 ============ */
/* 后台上传入口（学校管理页） */
.cs-upload { display: flex; gap: 20px; align-items: flex-start; }
.cs-upload-preview { flex: 0 0 140px; }
.cs-upload-preview img {
    width: 140px; height: 140px; object-fit: contain;
    border: 1px solid var(--gray-100); border-radius: 10px; background: #fafafa;
}
.cs-upload-body { flex: 1; }
.cs-upload-body .muted { line-height: 1.8; }
.cs-upload-row { display: flex; gap: 10px; align-items: center; margin: 10px 0; flex-wrap: wrap; }

.cs-link {
    border: 0; background: none; padding: 0; cursor: pointer;
    color: var(--brand-green-dark); font-weight: 600; font-size: 13px;
}
.cs-link:hover { color: var(--brand-green); text-decoration: underline; }

/* ===== 客服入口：醒目按钮（带底色 + 图标）=====
   原来只是页脚一行纯文字链接，用户很难发现，这里改成实心按钮。 */
.btn-cs {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 20px; border: 0; border-radius: 999px;
    background: linear-gradient(135deg, #4caf50, var(--brand-green)); color: #fff;
    font-size: 13.5px; font-weight: 600; cursor: pointer;
    box-shadow: 0 6px 16px rgba(47, 158, 68, .28);
    transition: transform .12s, box-shadow .12s;
}
.btn-cs:hover { box-shadow: 0 8px 20px rgba(47, 158, 68, .36); }
.btn-cs:active { transform: translateY(1px); }
.btn-cs-icon { font-size: 15px; line-height: 1; }

/* 弹窗里的多选列表（设置某年级的级长 / 某学校的行政）：学校几百号老师，需要滚动 + 搜索 */
.pick-list {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    padding: 4px;
}
/* 注意要压过 .modal-body label 的 display:block / 字号缩小 */
.modal-body .pick-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 7px 10px;
    margin: 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13.5px;
    color: var(--gray-800, #1f2937);
}
.modal-body .pick-item:hover { background: var(--gray-50, #f8fafc); }
.modal-body .pick-item input[type=checkbox] {
    width: auto;
    margin: 0;
    flex: 0 0 auto;
    order: -1;
}
.pick-name { flex: 0 0 118px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.pick-meta { flex: 1; color: var(--text-muted, #6b7280); font-size: 12.5px; }

/* 名单类弹窗（如班级呼叫 40 多号人）：宽一点，一行能排更多名字，少滚动 */
.modal.wide { width: 760px; }

/* 班级呼叫（多选）：勾选名单 + 写留言 + 实时预览整句话 */
.cc-tip { font-size: 12.5px; color: var(--gray-600); margin-bottom: 8px; }
.cc-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cc-tools input { flex: 1; }
.cc-count { font-size: 12.5px; color: var(--primary); font-weight: 700; white-space: nowrap; }
.cc-list {
    display: grid;
    /* 名单密度：一行能塞几个塞几个，窄窗口自动往下排 */
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 4px 8px;
    max-height: 340px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    margin-bottom: 12px;
}
/* 一行一个同学：整行都能点，不必瞄准那个小方框 */
.cc-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13.5px;
}
.cc-item:hover { background: var(--gray-50, #f8fafc); }
.cc-item input[type=checkbox] { width: auto; margin: 0; padding: 0; flex: 0 0 auto; }
.cc-item b {
    min-width: 22px;
    margin-right: 4px;
    text-align: right;
    font-weight: 600;
    color: var(--gray-400, #9ca3af);
    font-variant-numeric: tabular-nums;
}
.cc-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 「留言」「学生看到的就是这一句」这种小标题：单独一行，别挤在框里当标签 */
.cc-label {
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--gray-600);
}
/* 留言框下面要跟「学生看到的就是这一句」，留出一点呼吸 */
.cc-tail-input { margin-bottom: 14px; }

/* 预览框放在最后：老师敲完留言，眼睛往下就核对整句话 */
.cc-preview {
    margin: 0;
    padding: 10px 12px;
    border: 1px dashed #fed7aa;
    background: #fffaf3;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.6;
    color: #9a3412;
}
/* 勾了人之后才点亮：灰着的句子就是在提醒还没选 */
.cc-preview.on { border-style: solid; border-color: #fb923c; font-weight: 600; }

/* 日期区间：在「开始日期」和「结束日期」之间画一条短横线，表示起止关系 */
.date-sep {
    display: inline-block;
    flex: 0 0 14px;
    width: 14px;
    height: 1px;
    background: var(--gray-400, #9ca3af);
    align-self: center;
}

/* 列表型面板（如行政设置）限高滚动：一个学校几百号老师，全铺开会把页面拉得很长 */
.scroll-box {
    max-height: 420px;
    overflow-y: auto;
    border-radius: 8px;
}
.scroll-box table thead th {
    position: sticky; top: 0; z-index: 1;
    background: var(--gray-50, #f8fafc);
}

/* 侧边栏里的客服按钮：底色比普通 ghost 按钮亮，放在「退出登录」上方 */
/* 注意 --brand-green 只在 .login-wrap 里定义，这里用全局绿色系 */
.sidebar-footer .btn-cs-sidebar {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    width: 100%; padding: 10px 14px; margin-bottom: 8px;
    border: 0; border-radius: 8px;
    background: #1fa855; color: #fff;
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: background .15s;
}
.sidebar-footer .btn-cs-sidebar:hover { background: #178a44; }

.cs-mask {
    position: fixed; inset: 0; z-index: 1000; padding: 20px;
    background: rgba(20, 32, 24, .48);
    display: flex; align-items: center; justify-content: center;
}
.cs-card {
    background: #fff; border-radius: 16px; padding: 22px 22px 18px;
    width: 320px; max-width: 90vw; text-align: center;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .22);
}
.cs-card h3 { margin: 0 0 4px; font-size: 16px; color: #1d3a24; }
.cs-card .cs-hint { margin: 0 0 14px; font-size: 12.5px; color: var(--gray-400); }
.cs-card img.cs-qr {
    width: 100%; max-width: 240px; border-radius: 10px; display: block;
    margin: 0 auto 14px; border: 1px solid var(--gray-100);
}
/* 图片缺失时用占位说明代替，避免出现裂图 */
.cs-card img.cs-qr.cs-broken { display: none; }
.cs-card img.cs-qr.cs-broken + .cs-missing { display: block; }
.cs-card .cs-missing {
    display: none; padding: 28px 12px; margin: 0 auto 14px;
    font-size: 12.5px; color: var(--gray-400);
    border: 1px dashed var(--gray-200); border-radius: 10px;
}

/* ==========================================================================
   手机端适配（≤768px）
   所有规则都限定在本块内，桌面端样式完全不受影响。
   放在文件末尾：同优先级下后定义的规则才生效，否则会被前面的样式覆盖。
   ========================================================================== */

/* 汉堡按钮与抽屉遮罩：桌面端一律不显示（手机端在下面的 @media 里打开） */
.menu-toggle { display: none; }
.nav-mask { display: none; }

@media (max-width: 768px) {
    /* --- 整体布局 --- */
    .app-layout { grid-template-columns: 1fr; }
    .view { padding: 12px 12px 28px; }

    /* --- 抽屉导航：侧边栏移出屏幕，点汉堡按钮滑入 --- */
    .sidebar {
        position: fixed; top: 0; bottom: 0; left: 0; z-index: 1001;
        width: 76vw; max-width: 300px; padding: 18px 12px;
        transform: translateX(-102%);
        transition: transform .22s ease;
        overflow-y: auto; -webkit-overflow-scrolling: touch;
        box-shadow: 2px 0 24px rgba(15, 20, 40, .32);
    }
    .sidebar.open { transform: translateX(0); }
    .nav-mask {
        display: block;
        position: fixed; inset: 0; z-index: 1000;
        background: rgba(15, 20, 40, .45);
        opacity: 0; pointer-events: none; transition: opacity .22s;
    }
    .nav-mask.show { opacity: 1; pointer-events: auto; }

    /* 汉堡按钮（仅手机显示） */
    .menu-toggle {
        display: inline-flex; align-items: center; justify-content: center;
        width: 40px; height: 40px; flex: 0 0 40px;
        border: 1px solid var(--gray-200); border-radius: 10px;
        background: #fff; color: var(--gray-800); font-size: 19px; line-height: 1;
    }
    .menu-toggle:active { background: var(--gray-100); }

    /* --- 顶栏 --- */
    .topbar { padding: 10px 14px; gap: 10px; }
    .topbar-title { flex: 1; min-width: 0; }
    .topbar h2 { font-size: 16px; }
    .topbar .muted { font-size: 12px; }
    .topbar-right { gap: 8px; font-size: 13px; }
    .topbar-right .badge { padding: 3px 8px; font-size: 11px; }
    #user-name { max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    /* --- 统计卡片：两列 --- */
    .cards { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; }
    .cards .card { padding: 13px; }
    .cards .card .value { font-size: 22px; }

    /* --- 面板与表格：单元格不换行，宽表格按内容自然撑开并横向滚动 --- */
    /* 不写死 min-width：窄表格（3 列）保持自适应，宽表格（12 列）自动变宽可滑动 */
    .panel { padding: 14px 12px; overflow-x: auto; }
    table th, table td { padding: 9px 10px; font-size: 13px; white-space: nowrap; }

    /* --- 触控友好：加大点击区域；输入框 16px 防止 iOS 聚焦时自动放大 --- */
    .nav-item { padding: 13px 14px; font-size: 15px; }
    .btn-primary, .btn-ghost { padding: 11px 16px; font-size: 14px; }
    input, select, textarea { font-size: 16px; padding: 11px 12px; }
    .ev-item { padding: 12px 10px; }
    .pager-btn { min-width: 38px; height: 38px; }

    /* --- 弹窗：接近全屏，底部按钮上下排列且全宽 --- */
    .modal { width: 96vw; max-width: 96vw; max-height: 92vh; }
    .modal-head { padding: 12px 14px; }
    .modal-body { padding: 14px; }
    .modal-foot { flex-direction: column-reverse; padding: 12px 14px; }
    .modal-foot .btn-primary, .modal-foot .btn-ghost { width: 100%; padding: 12px; }

    /* --- 多列网格在手机上排两列 --- */
    .items-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
    .mt-stu-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); max-height: 200px; }
    .form-grid { grid-template-columns: 1fr; }

    /* --- 工具条 / 筛选行：允许换行，下拉自适应宽度 --- */
    .filter-row { display: flex; flex-wrap: wrap; gap: 8px; }
    .filter-row select { flex: 1 1 130px; min-width: 0; }
    .mt-bar select, .mt-bar input, .child-bar select { flex: 1 1 130px; min-width: 0; }
    .panel-head { gap: 8px; }

    /* --- 客服二维码卡片 --- */
    .cs-card { width: 100%; max-width: 92vw; padding: 18px 16px 14px; }
    /* 手机上客服按钮撑满宽度，更好点 */
    .btn-cs { width: 100%; padding: 12px; font-size: 14px; }

    /* 抽屉里菜单很长，把客服/退出按钮吸在底部，滚动时也始终能看到 */
    .sidebar-footer {
        position: sticky; bottom: 0; z-index: 2;
        background: #1f2436;
        padding: 10px 0 4px;
    }

    /* --- 今日考勤：表格换成卡片式分组列表（请假 / 缺勤 / 出勤） --- */
    .view[data-view="attendance"] { padding-bottom: 96px; }   /* 给底部提交栏让位 */
    .view[data-view="attendance"] .panel { overflow: visible; padding: 14px 12px; }
    .view[data-view="attendance"] .panel-head { flex-direction: column; align-items: stretch; gap: 10px; }
    .view[data-view="attendance"] .panel-head .row { display: flex; gap: 8px; }
    .view[data-view="attendance"] .panel-head .row select { flex: 1 1 auto; min-width: 0; }
    /* 手机端只留班级下拉：标题看顶栏、日期在概览卡里，
       「全班出勤」挪到出勤名单右侧、「保存考勤」换成了底部提交栏，
       那段长说明在手机上太占地方，一并收起 */
    .view[data-view="attendance"] .panel-head h3,
    .view[data-view="attendance"] .panel-head .btn-ghost,
    .view[data-view="attendance"] .panel-head .btn-primary,
    .view[data-view="attendance"] .mt-note { display: none; }
    .att-desktop { display: none; }
    .att-mobile { display: block; }
    /* 手机端列表本来就按「请假名单 / 缺勤名单 / 出勤名单」分组，不再重复这条 */
    .att-leave { display: none; }

    /* 顶部概览：班级 + 人数 / 日期 / 状态，下边四个计数块 */
    .att-hero { flex-direction: column; align-items: stretch; gap: 10px; padding: 13px 14px; }
    .att-hero-name { font-size: 15.5px; }
    .att-hero-meta { flex-wrap: wrap; gap: 8px; margin-top: 5px; }
    .att-hero-counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
    .att-cnt { display: flex; flex-direction: column; align-items: center; gap: 1px;
        padding: 7px 4px; border-radius: 10px; background: var(--gray-50);
        font-size: 11.5px; color: var(--gray-600); }
    .att-cnt b { font-size: 17px; margin: 0; }

    /* 分组标题：左边一根竖条，右边可以挂「全部出勤」 */
    .att-sec { margin-bottom: 16px; }
    .att-sec-head { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 8px; }
    .att-sec-title { display: inline-flex; align-items: center; gap: 6px;
        font-size: 14px; font-weight: 600; color: var(--gray-800); }
    .att-sec-title::before { content: ''; width: 3px; height: 15px; border-radius: 2px; background: var(--primary); }
    .att-sec-title b { color: var(--primary); }
    /* 请假名单：标题、竖条、人数一起标红 */
    .att-sec-title.leave,
    .att-sec-title.leave b { color: #dc2626; }
    .att-sec-title.leave::before { background: #dc2626; }
    .att-all-btn { padding: 5px 12px; border-radius: 999px; font-size: 12.5px;
        border: 1px solid var(--gray-200); background: #fff; color: var(--gray-600); }
    .att-all-btn:active { background: var(--gray-100); }

    /* 学生卡：序号 + 头像 + 姓名学号，状态按钮在下面铺三列 */
    .att-row { display: grid; grid-template-columns: auto auto 1fr; align-items: center;
        column-gap: 9px; padding: 11px 12px; margin-bottom: 8px;
        border: 1px solid var(--gray-100); border-radius: 12px; background: #fff; }
    .att-row.has { border-color: #c5d0fa; box-shadow: 0 2px 8px rgba(59, 110, 245, .08); }
    .att-no { min-width: 14px; text-align: center; font-size: 12px; color: var(--gray-400); }
    .att-face { width: 36px; height: 36px; border-radius: 50%; color: #fff;
        font-size: 15px; font-weight: 600; display: inline-flex;
        align-items: center; justify-content: center; }
    .att-who { min-width: 0; }
    .att-name { font-size: 14.5px; font-weight: 600; color: var(--gray-800); }
    .att-sub { margin-top: 1px; font-size: 11.5px; color: var(--gray-400); }
    /* 状态按钮排成一行：5 项正好铺满一行，项目更多时横向滑动，不折成两行 */
    .att-opts { grid-column: 1 / -1; display: flex; gap: 6px; margin-top: 10px;
        overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .att-opts::-webkit-scrollbar { display: none; }
    .att-opt { flex: 1 1 auto; min-width: 0; padding: 8px 2px; border-radius: 8px;
        font-size: 12px; line-height: 18px; white-space: nowrap; text-align: center;
        border: 1px solid var(--gray-200); background: var(--gray-50);
        color: var(--gray-600); cursor: pointer; }
    .att-opt:disabled { opacity: .45; }
    .att-opt.on { font-weight: 600; }
    /* 四种状态各一个颜色，一眼能分清：出勤绿、迟到橙、请假靛、缺勤红 */
    .att-opt.on.present { background: #16a34a; border-color: #16a34a; color: #fff; }
    .att-opt.on.late    { background: #f59e0b; border-color: #f59e0b; color: #fff; }
    .att-opt.on.leave   { background: #6366f1; border-color: #6366f1; color: #fff; }
    .att-opt.on.absent  { background: #dc2626; border-color: #dc2626; color: #fff; }

    /* 底部提交栏：列表再长也不用翻回去找按钮 */
    .att-savebar { display: flex; align-items: center; gap: 10px;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .97); border-top: 1px solid var(--gray-100);
        box-shadow: 0 -6px 18px rgba(20, 30, 60, .08); }
    .att-savebar-info { flex: 1; min-width: 0; font-size: 12px; color: var(--gray-600); }
    .att-savebar-info b { color: var(--gray-800); }
    .att-savebar-warn { display: block; margin-top: 2px; font-size: 11.5px; color: #b45309; }
    .att-savebar-btn { flex: 0 0 auto; padding: 12px 24px; border: none; border-radius: 999px;
        background: var(--primary); color: #fff; font-size: 15px; font-weight: 600; }
    .att-savebar-btn:active { background: var(--primary-dark); }

    /* ---------- 录入评价：九宫格学生墙 ---------- */
    /* 桌面端一行行卡片在手机上太挤，改成 4 列头像：一眼看全班，点谁选谁 */
    .ev-wall-desktop { display: none; }
    .ev-wall-mobile {
        display: grid; grid-template-columns: repeat(4, 1fr);
        gap: 14px 4px; margin-bottom: 22px;
    }
    /* 顶部一句说明，占满整行 */
    .ev-tip {
        grid-column: 1 / -1; margin-bottom: 2px;
        font-size: 12px; line-height: 18px; color: var(--gray-400);
    }
    /* 学期 / 班级两个下拉在手机上各占一行，别横向挤出去 */
    section[data-view="evaluate"] .panel-head { flex-direction: column; align-items: stretch; gap: 8px; }
    section[data-view="evaluate"] .panel-head > .row { flex-wrap: wrap; gap: 8px; }
    section[data-view="evaluate"] .panel-head select { flex: 1 1 100%; width: 100%; }
    /* 分值胶囊向下探出头，姓名行多留一点距离 */
    .ev-stu { display: flex; flex-direction: column; align-items: center; gap: 10px; cursor: pointer; }
    .ev-stu-face {
        position: relative; width: 52px; height: 52px; border-radius: 50%;
        color: #fff; font-size: 20px; font-weight: 600;
        display: flex; align-items: center; justify-content: center;
        box-shadow: 0 2px 6px rgba(20, 30, 60, .10);
    }
    /* 选中：一圈白边 + 主色描边，和一整片头像里挑出来一样 */
    .ev-stu.on .ev-stu-face { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--primary); }
    /* 本学期分值：压在头像右下角的小胶囊（白描边，压住头像边缘） */
    .ev-stu-pt {
        position: absolute; right: -9px; bottom: -5px; min-width: 22px; height: 20px;
        padding: 0 6px; border-radius: 999px;
        background: #fff; border: 2px solid #fff; color: var(--gray-400);
        font-size: 11.5px; font-weight: 700; line-height: 16px; text-align: center;
        box-shadow: 0 1px 4px rgba(20, 30, 60, .18);
    }
    .ev-stu-pt.has { background: linear-gradient(180deg, #fdc048, #f5a623); color: #fff; }
    .ev-stu-pt.neg { background: linear-gradient(180deg, #fb8a8a, #ef5350); color: #fff; }
    /* 0 分：浅浅一颗灰，能看出「还没加分」，又不抢眼 */
    .ev-stu-pt.zero { background: #f1f3f8; border-color: #fff; color: var(--gray-400); }
    /* 选中对勾挪到右上角，把右下角留给分值 */
    .ev-stu-tick {
        display: none; position: absolute; top: -4px; right: -4px;
        width: 18px; height: 18px; border-radius: 50%;
        background: var(--primary); color: #fff; font-size: 10px; line-height: 18px; text-align: center;
        border: 2px solid #fff;
    }
    .ev-stu.on .ev-stu-tick { display: block; }
    .ev-stu-nm {
        max-width: 100%; font-size: 11.5px; line-height: 15px; color: var(--gray-600);
        text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .ev-stu.on .ev-stu-nm { color: var(--primary); font-weight: 600; }

    /* 桌面端的评价项 / 评语 / 提交，手机上收进弹层，页面只留学生墙 */
    #ev-items, #ev-category, #ev-item-new, #ev-stu-tools, #ev-note-panel,
    #ev-selected, #ev-stars-tip { display: none; }
    section.view[data-view="evaluate"] { padding-bottom: 96px; }

    /* ---------- 底部点评栏：全选 + 点评学生(n) ---------- */
    .ev-bar {
        display: flex; align-items: center; gap: 12px;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .97); border-top: 1px solid var(--gray-100);
        box-shadow: 0 -6px 18px rgba(20, 30, 60, .08);
    }
    .ev-bar.hidden { display: none; }
    .ev-bar-all {
        display: inline-flex; align-items: center; gap: 7px;
        border: none; background: none; padding: 0;
        font-size: 14px; color: var(--gray-600);
    }
    .ev-bar-tick {
        width: 19px; height: 19px; border-radius: 50%;
        border: 1.5px solid var(--gray-200); color: transparent;
        font-size: 11px; line-height: 17px; text-align: center;
    }
    .ev-bar-all.on { color: var(--primary); font-weight: 600; }
    .ev-bar-all.on .ev-bar-tick { background: var(--primary); border-color: var(--primary); color: #fff; }
    .ev-bar-go {
        flex: 1; padding: 13px 0; border: none; border-radius: 999px;
        background: var(--primary); color: #fff; font-size: 15.5px; font-weight: 600;
    }
    /* 没选学生时是「浅底灰字」，别用纯灰白成一团看不见 */
    .ev-bar-go:disabled { background: #e8edf7; color: var(--gray-400); }
    .ev-bar-go:active { background: var(--primary-dark); }

    /* ---------- 选择点评项：底部弹层 ---------- */
    .ev-mask {
        display: block; position: fixed; inset: 0; z-index: 1000;
        background: rgba(15, 20, 40, .45); opacity: 0; pointer-events: none; transition: opacity .2s;
    }
    .ev-mask.show { opacity: 1; pointer-events: auto; }
    .ev-sheet {
        display: flex; flex-direction: column;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1001;
        max-height: 92vh; background: #fff; border-radius: 18px 18px 0 0;
        transform: translateY(102%); transition: transform .24s ease;
    }
    .ev-sheet.show { transform: translateY(0); }
    .ev-sheet-head { display: flex; align-items: center; padding: 14px 16px 6px; }
    .ev-sheet-head b { flex: 1; font-size: 15px; color: var(--gray-800); }
    .ev-sheet-x { border: none; background: none; padding: 0 4px; font-size: 22px; line-height: 1; color: var(--gray-400); }
    .ev-sheet-tabs { padding: 0 12px 8px; border-bottom: 1px solid var(--gray-100); }
    .ev-sheet-kind { display: flex; gap: 20px; }
    .ev-kind {
        position: relative; border: none; background: none; padding: 4px 2px;
        font-size: 15px; color: var(--gray-400);
    }
    .ev-kind.on { color: var(--gray-800); font-weight: 700; }
    .ev-kind.on::after {
        content: ''; position: absolute; left: 50%; bottom: -7px; width: 22px; height: 3px;
        margin-left: -11px; border-radius: 2px; background: var(--primary);
    }
    /* 评价类型全部换行铺开（不再横向滑动），一眼看全 */
    .ev-sheet-cats { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 8px; }
    .ev-cat {
        flex: 0 0 auto; padding: 5px 12px; border-radius: 999px;
        border: 1px solid var(--gray-200); background: var(--gray-50);
        color: var(--gray-600); font-size: 12.5px;
    }
    .ev-cat.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
    /* 一个类型下的项目一次铺完：内容撑开、不内部滑动（万一超屏也只整体滚一点） */
    .ev-sheet-grid {
        flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
        display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 8px;
        padding: 14px 12px;
    }
    .ev-sheet-grid .empty { grid-column: 1 / -1; }
    .ev-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
    /* 圆圈图标和电脑端卡片同一个组件（.ev-ico），手机端只是放大到 52px */
    .ev-tile-ico { position: relative; display: flex; align-items: center; justify-content: center; }
    .ev-tile-ico .ev-ico { width: 52px; height: 52px; box-shadow: 0 2px 8px rgba(90, 70, 160, .12); }
    .ev-tile-ico .ev-ico-emoji { font-size: 26px; }
    .ev-tile-ico .ev-ico-pt { min-width: 21px; height: 21px; font-size: 11.5px; }
    .ev-tile.on .ev-ico { box-shadow: 0 0 0 2px var(--primary), 0 2px 8px rgba(90, 70, 160, .16); }
    .ev-tile-nm { font-size: 11.5px; line-height: 15px; color: var(--gray-600); text-align: center; }
    .ev-tile.on .ev-tile-nm { color: var(--primary); font-weight: 600; }
    .ev-sheet-foot {
        display: flex; gap: 10px;
        padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--gray-100);
    }
    .ev-sheet-foot .btn-ghost, .ev-sheet-foot .btn-primary {
        flex: 1; padding: 13px 0; border-radius: 999px; font-size: 15.5px;
    }
    /* 弹层底部：取消是白底描边，完成没选项目前是浅灰（选了才变实心蓝） */
    .ev-sheet-foot .btn-ghost { background: #fff; border: 1px solid var(--gray-200); color: var(--gray-600); }
    .ev-sheet-foot .btn-primary:disabled { background: #e8edf7; color: var(--gray-400); }

    /* ---------- 点评已发布（结果页） ---------- */
    .ev-done {
        display: flex; align-items: center; justify-content: center;
        position: fixed; inset: 0; z-index: 1100; padding: 24px;
        background: #f2f6ff; opacity: 0; pointer-events: none; transition: opacity .18s;
    }
    .ev-done.show { opacity: 1; pointer-events: auto; }
    .ev-done-card { width: 100%; max-width: 420px; text-align: center; }
    .ev-done-title {
        display: flex; align-items: center; justify-content: center; gap: 8px;
        font-size: 15px; font-weight: 600; color: #16a34a;
    }
    .ev-done-ok {
        width: 20px; height: 20px; border-radius: 50%;
        background: #16a34a; color: #fff; font-size: 13px; line-height: 20px;
    }
    .ev-done-emoji { margin: 26px 0 30px; font-size: 88px; line-height: 1; }
    .ev-done-list { font-size: 15px; line-height: 27px; color: var(--gray-800); }
    .ev-done-tip { margin-top: 12px; font-size: 12.5px; color: var(--gray-400); }
    .ev-done-btn {
        margin-top: 30px; width: 62%; max-width: 220px; padding: 13px 0;
        border: none; border-radius: 999px; background: #19b57f;
        color: #fff; font-size: 16px; font-weight: 600;
    }
    .ev-done-btn:active { background: #14a072; }
}

/* 超窄屏（≤380px）再压缩一点 */
@media (max-width: 380px) {
    .cards { grid-template-columns: repeat(2, 1fr); }
    .topbar-right #user-name { display: none; }
}

/* ============ 学校列表里展开的「级长设置」 ============ */
tr.gl-expand > td { padding: 0; background: var(--gray-50, #f8fafc); }
.gl-box { padding: 12px 14px 14px; border-left: 3px solid var(--primary); background: #fff; }
.gl-box-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.gl-box-head b { font-size: 13px; }
.gl-box-head .muted { font-size: 12px; }
.gl-box .mt-note { margin: 0 0 10px; font-size: 12px; }
.gl-box .empty { padding: 14px 0; }