/* ============================================================
   树智云｜智慧校园评价管理系统 - 全局样式（浅色绿色主题）
   ============================================================ */
:root {
  /* 后台/通用变量 */
  --green: #2e7d32;
  --green-2: #43a047;
  --green-soft: #e8f5e9;
  --green-line: #c8e6c9;
  --warn: #e65100;
  --danger: #c62828;
  --blue: #1565c0;
  /* 公开门户变量（teal青绿主题） */
  --teal: #26A69A;
  --teal-dark: #00897B;
  --teal-light: #B2DFDB;
  --teal-bg: #E0F2F1;
  --gold: #FFD54F;
  --gold-light: #FFF8E1;
  /* 共享基础（门户值覆盖后台默认） */
  --ink: #1a2e28;
  --muted: #6b7c76;
  --bg: #f5f7f6;
  --card: #ffffff;
  --line: #dde4e0;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(26,46,40,.06), 0 4px 12px rgba(26,46,40,.04);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.6;
}
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-2); text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.35; }
h3 { font-size: 17px; margin-bottom: 10px; }
p { margin: 6px 0; }
.muted { color: var(--muted); font-size: 13px; }
.empty { padding: 30px 10px; text-align: center; }
.pos { color: #c62828; font-weight: 600; } /* 加分：红涨 */
.neg { color: #2e7d32; font-weight: 600; } /* 减分：绿跌（区域惯例） */
.warn-txt { color: var(--warn); font-size: 13px; }

/* ---------- 通用组件 ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 16px; }
.card.form { max-width: 720px; }
.btn {
  display: inline-block; border: 1px solid var(--green); color: var(--green);
  background: #fff; border-radius: 8px; padding: 6px 16px; cursor: pointer;
  font-size: 14px; line-height: 1.5; transition: all .15s;
}
.btn:hover { background: var(--green-soft); text-decoration: none; }
.btn.solid { background: var(--green); color: #fff; }
.btn.solid:hover { background: var(--green-2); }
.btn.ghost { border-color: var(--line); color: var(--ink); }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: #fdecea; }
.btn.mini { padding: 3px 10px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.badge { display: inline-block; font-size: 12px; padding: 1px 9px; border-radius: 999px; vertical-align: 1px; }
.badge.grey { background: #eceff1; color: #607d8b; }
.badge.blue { background: #e3f2fd; color: var(--blue); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.red { background: #fdecea; color: var(--danger); }
.badge.orange { background: #fff3e0; color: var(--warn); }
.badge.teal { background: #e0f2f1; color: #00897b; }
.badge.purple { background: #f3e5f5; color: #8e24aa; }
.badge.dark { background: #37474f; color: #fff; }
.chip { display: inline-block; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 14px; font-size: 13px; color: var(--ink); margin: 2px 4px 2px 0; }
.chip.on { background: var(--green); border-color: var(--green); color: #fff; }
.class-tabs { margin: 10px 0 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; background: #f8fbf8; }
.table-wrap { overflow-x: auto; }
tr:hover td { background: #fafcfa; }
form.inline, .inline-form { display: inline-flex; gap: 6px; align-items: center; }
form.inline-form { gap: 4px; }
.mini-input { border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; font-size: 13px; width: 130px; }
.mini-input.wide { width: 260px; }
.mini-input.num { width: 70px; }
select, textarea, input:not([type="checkbox"]):not([type="radio"]):not(.mini-input) {
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 14px;
  font-family: inherit; background: #fff; color: var(--ink);
}
textarea { width: 100%; min-height: 90px; resize: vertical; }
.form-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0; }
.form-row label { font-size: 13px; color: var(--muted); }
.check { display: inline-flex; gap: 4px; align-items: center; font-size: 13px; }
.page-head { margin: 4px 0 14px; }
.page-head h2 { font-size: 20px; margin-bottom: 6px; }
.page-head p { color: var(--muted); font-size: 13px; }
.danger-zone { border: 1px solid #ffcdd2; }
.pct-bar { position: relative; background: #eceff1; border-radius: 999px; height: 16px; min-width: 120px; overflow: hidden; }
.pct-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--green-2), var(--green)); border-radius: 999px; }
.pct-bar span { position: absolute; inset: 0; text-align: center; font-size: 11px; line-height: 16px; color: var(--ink); }
.score-grid td { border-bottom: 1px dashed var(--line); }

/* ---------- 系统内布局 ---------- */
body.app { background: var(--bg); }
.app-top { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 1px 4px rgba(36,50,44,.05); }
.app-top-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 18px; padding: 0 18px; height: 54px; }
.brand { display: inline-flex; align-items: center; gap: 6px; font-size: 18px; font-weight: 700; color: var(--green); }
.brand b { font-weight: 700; }
.brand:hover { text-decoration: none; }
.top-links { display: flex; gap: 14px; font-size: 14px; }
.top-links a { color: var(--ink); }
.top-links a:hover { color: var(--green); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.bell { position: relative; font-size: 17px; }
.bell .dot { display: none; position: absolute; top: -6px; right: -12px; background: var(--danger); color: #fff; border-radius: 999px; font-size: 10px; min-width: 16px; height: 16px; line-height: 16px; text-align: center; padding: 0 3px; }
.who { color: var(--muted); }
.app-body { max-width: 1280px; margin: 16px auto 40px; padding: 0 18px; display: flex; gap: 18px; align-items: flex-start; }
.sidebar { width: 170px; flex: none; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; position: sticky; top: 70px; }
.side-item { display: block; padding: 9px 12px; border-radius: 8px; font-size: 14px; color: var(--ink); margin-bottom: 2px; }
.side-item:hover { background: var(--green-soft); text-decoration: none; }
.side-item.on { background: var(--green); color: #fff; }
.side-item.locked { color: #aab4ae; cursor: not-allowed; }
.app-main { flex: 1; min-width: 0; }
@media (max-width: 900px) {
  .sidebar { display: none; }
  .top-links { display: none; }
}

/* ---------- 首页看板 ---------- */
.dash-hero { background: linear-gradient(135deg, #2e7d32 0%, #43a047 60%, #66bb6a 100%); color: #fff; border-radius: var(--radius); padding: 26px 28px; margin-bottom: 16px; box-shadow: var(--shadow); }
.dash-hero .dash-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.dash-hero p { color: #e8f5e9; font-size: 13px; }
.dash-stats { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.dash-stats .stat { background: rgba(255,255,255,.16); border-radius: 10px; padding: 8px 16px; font-size: 13px; }
.dash-stats .stat b { display: block; font-size: 20px; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.entry-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.entry-card .card-icon { font-size: 26px; }
.entry-card b { display: block; margin: 6px 0 4px; font-size: 15px; }
.entry-card p { color: var(--muted); font-size: 12.5px; }
.entry-card:hover { box-shadow: 0 4px 18px rgba(46,125,50,.16); }

/* ---------- 小树林 ---------- */
.forest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tree-box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; text-align: center; }
.tree-box .sztree-box { height: 130px; }
.tree-box.has-flag { outline: 2px solid var(--warn); }
.tree-name { font-size: 14px; font-weight: 600; margin-top: 4px; }
.tree-meta { font-size: 12px; color: var(--muted); }
.flag-line { margin: 14px 0; }
.class-hero { display: flex; gap: 20px; align-items: stretch; flex-wrap: wrap; }
.class-tree { flex: none; width: 100%; max-width: 420px; }
.class-tree .sztree-box { height: 46vh; min-height: 300px; }
.class-info { flex: 1; min-width: 240px; }
.class-info .dim { color: var(--muted); font-size: 13px; }
.seedling-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.seedling { background: #fff; border-radius: 10px; box-shadow: var(--shadow); padding: 10px 8px; text-align: center; }
.seedling .seedling-tree { height: 96px; }
.seedling .stu-name { font-size: 13.5px; font-weight: 600; }
.seedling .stu-pos { font-size: 12px; color: var(--muted); }
.sztree-box svg { max-width: 100%; height: 100%; display: block; margin: 0 auto; }
.stu-tree { height: 96px; }
.stu-tree .sztree-box { height: 100%; }

/* ---------- 巡查表单 ---------- */
.item-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.item-group { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.item-group > b { display: block; font-size: 14px; margin-bottom: 6px; color: var(--green); }
.item-list { display: flex; flex-wrap: wrap; gap: 6px; }
.item-list label { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 13px; cursor: pointer; }
.item-list label:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.comment-line textarea { min-height: 60px; }

/* ---------- 课堂表现（一体机大屏） ---------- */
.board-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.board-head h2 { font-size: 24px; }
.board-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: #fff; border-radius: 10px; padding: 10px 14px; box-shadow: var(--shadow); margin-bottom: 14px; }
.stu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stu-card { background: #fff; border-radius: 10px; box-shadow: var(--shadow); padding: 10px; text-align: center; font-size: 17px; font-weight: 600; cursor: pointer; border: 2px solid transparent; }
.stu-card.selectable:hover { border-color: var(--green-line); }
.stu-card.on { border-color: var(--green); background: var(--green-soft); box-shadow: 0 0 0 3px var(--green-line); }
.stu-card.on .stu-name { color: var(--green); }
.stu-card input { display: none; }
.eval-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.eval-btn { font-size: 18px; padding: 10px 22px; border-radius: 10px; border: 2px solid var(--green); background: #fff; color: var(--green); cursor: pointer; font-weight: 600; }
.eval-btn:hover { background: var(--green-soft); }
.board-foot .ok { color: var(--green); font-weight: 600; font-size: 16px; }

/* ---------- 五育评价 / 综合评价 ---------- */
.subject-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.subject-cell { display: flex; gap: 6px; align-items: center; }
.subject-cell input { width: 90px; }
.status-line .badge { margin-right: 6px; }
.export-line { margin-top: 10px; }

/* ---------- 家长端 ---------- */
.parent-wrap { max-width: 640px; margin: 0 auto; padding-bottom: 40px; }
body.parent { background: linear-gradient(180deg, #e8f5e9 0%, var(--bg) 240px); }
.parent-head { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 10px; }
.parent-title { font-size: 19px; font-weight: 700; }
.parent-links { font-size: 13px; }
.class-tag { font-size: 12px; background: var(--green-soft); color: var(--green); border-radius: 999px; padding: 1px 9px; vertical-align: 2px; }
.parent-intro { color: var(--muted); font-size: 13.5px; margin-bottom: 12px; text-align: center; }
.sapling-stage { text-align: center; position: relative; overflow: hidden; }
.sapling-tree { display: flex; justify-content: center; padding: 8px 0; }
.sapling-tree .sztree-box, #sapling { height: 42vh; min-height: 280px; }
.raindrop { position: relative; background: var(--green-soft); color: #1b5e20; border-radius: 999px; font-size: 13px; padding: 5px 14px; margin: 6px auto; width: fit-content; }
.sapling-stats { display: flex; justify-content: center; gap: 18px; font-size: 14px; margin-top: 10px; flex-wrap: wrap; }
.sapling-stats b { color: var(--green); font-size: 17px; }
.wu-branches { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.wu-branch { border: 1px solid var(--green-line); border-radius: 999px; padding: 2px 12px; font-size: 13px; color: var(--ink); }
.wu-branch i { font-style: normal; color: var(--green); font-weight: 700; margin-left: 3px; }
.wu-branch i.zero { color: #b9c4bd; font-weight: 400; }
.parent-foot { text-align: center; margin-top: 20px; font-size: 13px; }

/* 六年成长阶梯 */
.ladder-body { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.ladder-row { display: flex; gap: 10px; justify-content: center; }
.ladder-cell { flex: 1; max-width: 220px; display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; font-size: 13.5px; color: var(--ink); background: #fff; }
a.ladder-cell:hover { text-decoration: none; border-color: var(--green); }
.ladder-cell em { font-style: normal; font-size: 15px; }
.ladder-cell.lit { background: var(--green-soft); border-color: var(--green-line); }
.ladder-cell.lit em { color: var(--green); }
.ladder-cell.grey { background: #f1f3f1; color: #a3ada6; border-style: dashed; }
.ladder-cell.current { border: 2px solid var(--green); }
.ladder-cell.current em.cur { color: var(--warn); }
.ladder-cell.future { background: #fbfdfb; color: var(--muted); }
.ladder-note { font-size: 12.5px; color: var(--muted); }
.lit-demo { color: var(--green); }
.grey-demo { color: #a3ada6; }

/* 小日历 */
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
/* 翻月按钮：原为 href="#" 空锚点，改用 <button> 后重置浏览器默认外观，保持原有绿色链接观感 */
.cal-nav {
  background: none; border: 0; padding: 0 6px; margin: 0;
  font: inherit; font-size: 18px; line-height: 1;
  color: var(--green); cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.cal-nav:hover { color: var(--green-2); }
.cal-nav:focus-visible { outline: 2px solid var(--green-2); outline-offset: 2px; border-radius: 4px; }
.cal-wk, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-wk span { text-align: center; font-size: 12px; color: var(--muted); }
.cal-cell { text-align: center; font-size: 13px; padding: 6px 0; border-radius: 8px; background: #fafcfa; cursor: pointer; }
.cal-cell.has-sel { position: relative; }
.cal-cell.has-sel::after { content: "●"; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); font-size: 8px; color: var(--green); }
.cal-cell.today { outline: 1px solid var(--warn); color: var(--warn); }
.cal-cell.sel { background: var(--green); color: #fff; }
.cal-cell.sel.has-sel::after { color: #fff; }
.cal-cell.blank { background: transparent; cursor: default; }
.day-records { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.rec-item { display: flex; gap: 10px; align-items: baseline; padding: 7px 2px; border-bottom: 1px dashed var(--line); }
.rec-score { font-weight: 700; min-width: 46px; text-align: right; }
.rec-main { flex: 1; font-size: 14px; }
.rec-meta { font-size: 12px; color: var(--muted); }

/* 灰色空档 / 年轮 */
.grey-page { text-align: center; padding: 40px 20px; }
.grey-icon { font-size: 44px; }
.grey-page h3 { margin: 10px 0; }
.term-block { margin: 10px 0; }
.term-block b { display: block; font-size: 13px; color: var(--muted); margin-bottom: 3px; }
.teacher-msg { font-size: 15px; color: #1b5e20; }
.snap-stage { display: flex; justify-content: center; }
.snap-meta, .ring-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; justify-content: center; font-size: 13.5px; margin-top: 8px; align-items: center; }
.ring-card .ring-head { display: flex; gap: 10px; align-items: baseline; }
.ring-no { font-size: 12px; background: #efe7d7; color: #8d6e4a; border-radius: 999px; padding: 2px 10px; }
.ring-body { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.ring-tree { flex: none; }

/* 造型选择 */
.style-list { display: flex; flex-wrap: wrap; gap: 8px; }
.style-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 14px; font-size: 13.5px; cursor: pointer; }
.style-chip.on { border-color: var(--green); background: var(--green-soft); color: var(--green); font-weight: 600; }
.style-preview { width: 60px; }

/* ---------- 登录 / 二维码 / 身份点选 ---------- */
body.login-body, body.qr-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #1b5e20 0%, #2e7d32 45%, #66bb6a 100%); padding: 20px; }
.login-card, .qr-card { background: #fff; border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.22); padding: 30px 34px; width: 100%; max-width: 380px; text-align: center; }
.login-brand, .qr-card h1 { font-size: 21px; font-weight: 700; color: var(--green); margin-bottom: 4px; }
.login-card form { text-align: left; margin-top: 16px; }
.login-card input { width: 100%; margin: 8px 0; }
.login-tabs { display: flex; gap: 4px; background: #f1f3f1; border-radius: 999px; padding: 3px; margin: 12px 0; }
.login-tabs button { flex: 1; border: 0; background: transparent; border-radius: 999px; padding: 6px 0; font-size: 14px; cursor: pointer; color: var(--muted); }
.login-tabs button.on { background: #fff; color: var(--green); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.btn-login { width: 100%; margin-top: 10px; padding: 10px; font-size: 16px; }
.login-links { margin-top: 14px; font-size: 13px; }
.login-links a { margin: 0 6px; }
.role-grid { display: grid; gap: 10px; margin-top: 16px; }
.role-card { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-align: left; color: var(--ink); }
.role-card:hover { border-color: var(--green); background: var(--green-soft); text-decoration: none; }
.role-icon { font-size: 24px; }
.role-name { font-weight: 600; }
.role-desc { font-size: 12.5px; color: var(--muted); }
.qr-tip { color: var(--muted); font-size: 13.5px; margin: 8px 0 14px; }
.qr-status { margin: 12px 0 4px; font-size: 15px; color: var(--green); font-weight: 600; }
.qr-meta { color: var(--muted); font-size: 12px; }
.qr-confirm { text-align: left; }
.qr-confirm .btn-row { display: flex; gap: 10px; margin-top: 16px; }

/* ============================================================
   公开门户首页 — 按参考设计稿重做（青绿主题 + 几何Hero + 混合卡片）
   ============================================================ */
body.public { background: #eef4fa; }

/* ---------- 顶部导航栏 ---------- */
.pub-topnav {
  background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
}
.pub-nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 60px;
}
.pub-brand {
  display: flex; align-items: center; gap: 8px; text-decoration: none;
}
.pub-logo-icon {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #1565C0, #42A5F5);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; font-weight: 700;
}
.pub-school-name {
  font-size: 17px; font-weight: 700; color: var(--ink); letter-spacing: .5px;
}
.pub-nav-menu {
  display: flex; align-items: center; gap: 22px;
  margin: 0 auto; justify-content: center;
}
.pub-nav-menu a {
  color: #3a4a44; font-size: 14px; text-decoration: none;
  transition: color .15s;
}
.pub-nav-menu a:hover,
.pub-nav-menu a.on { color: var(--teal); }
.pub-btn-login {
  background: var(--teal) !important; color: #fff !important;
  padding: 6px 20px; border-radius: 999px; font-size: 13.5px !important;
  transition: background .15s;
}
.pub-btn-login:hover { background: var(--teal-dark) !important; }

/* ---------- 通栏 Banner（样式已内联于 app/Views/home/banner.php，自包含 <style>，此处不再保留旧 .pub-hero 规则） ---------- */

/* ---------- 内容卡片区域 ---------- */
.pub-cards-section {
  background: transparent; padding: 32px 24px 40px;
}
.pub-cards-inner {
  max-width: 1200px; margin: 0 auto;
}
.pub-row {
  display: grid;
  grid-template-columns: 200px 380px 1fr 180px;
  gap: 14px;
  margin-bottom: 14px;
}
.pub-row:last-child {
  grid-template-columns: 140px 1fr repeat(4, 120px);
}

/* 卡片基础 */
.pub-card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .18s, box-shadow .18s;
}
.pub-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26,46,40,.1);
}

/* 文字链接卡 */
.pub-card-links { padding: 18px 16px; }
.pub-card-title {
  font-size: 15px; font-weight: 400; color: var(--ink);
  margin-bottom: 12px;
}
.pub-link-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px;
}
.pub-link-grid a {
  font-size: 13px; color: #455A64; text-decoration: none;
  padding: 4px 0; border-bottom: 1px dashed transparent;
  transition: color .15s, border-color .15s;
}
.pub-link-grid a:hover {
  color: var(--teal); border-bottom-color: var(--teal);
}

/* 列表卡（条目行距与 portal.css 保持一致：单条 ≈31px，5 条不撑高卡片） */
.pub-card-list { padding: 18px 16px; }
.pub-bullet-list { list-style: none; padding: 0; margin: 0; }
.pub-bullet-list li {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; line-height: 1.4; padding: 5px 0;
  border-bottom: 1px dashed #CDEBDC;
}
.pub-bullet-list li:last-child { border-bottom: none; }
.pub-bullet-list li::before {
  content: "🌱"; position: static; flex: none; font-size: 13px;
}
.pub-bullet-list a {
  color: #37474F; text-decoration: none; font-weight: 400;
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pub-bullet-list a:hover { color: var(--teal); }
.pub-ext-tag { font-size: 11px; background: var(--green-soft); color: var(--green); border-radius: 999px; padding: 0 7px; margin-left: 6px; white-space: nowrap; }
.pub-muted { color: var(--muted) !important; }

/* 图片占位卡：固定宽高比，无论上传多大图片都不会撑破布局 */
.pub-card-photo { padding: 0; display: flex; flex-direction: column; }
/* 链接包裹层也参与 flex 拉伸，使内部占位层真正撑满卡片高度（修复轮播/小图卡高度塌陷） */
.pub-card-photo > a { flex: 1; display: flex; min-height: 0; color: inherit; text-decoration: none; }
.pub-photo-placeholder {
  position: relative; overflow: hidden;
  width: 100%; aspect-ratio: 16 / 9; min-height: 120px; max-height: 300px;
  background: linear-gradient(145deg, #eceff1, #cfd8dc);
  display: flex; align-items: center; justify-content: center;
}
.pub-card-sm {
  display: flex;
  flex-direction: column;
}
.pub-card-sm .pub-photo-placeholder {
  flex: 1;
  aspect-ratio: auto;
  min-height: 120px;
  max-height: none;
}
.pub-card-portrait .pub-photo-placeholder {
  aspect-ratio: 3 / 3.2; min-height: 150px; border-radius: var(--radius) var(--radius) 0 0;
}
.pub-photo-icon { font-size: 36px; opacity: .35; }
/* 学校风采轮播卡：与同行卡片等高，并加标题水印 */
.pub-card-carousel { display: flex; flex-direction: column; }
.pub-card-carousel .pub-photo-placeholder { flex: 1; min-height: 180px; aspect-ratio: auto; max-height: none; }
.pub-photo-cap {
  position: absolute; left: 12px; bottom: 12px; z-index: 3;
  background: rgba(26,46,40,.5); color: #fff; font-size: 13px; font-weight: 600;
  padding: 4px 14px; border-radius: 999px; backdrop-filter: blur(2px);
}
/* 占位卡内图片一律绝对定位铺满并裁剪（cover），杜绝按原始尺寸撑开
   Edge 兼容：用显式 top/right/bottom/left 替代 inset 简写，并显式 display:block */
.pub-photo-placeholder .pub-hicon {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%;
  display: block; object-fit: cover; object-position: center; max-width: none; max-height: none;
}

/* 首页图片轮播（后台可配 2-4 张；Edge 兼容见上） */
.pub-carousel { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border-radius: var(--radius); }
.pub-carousel-img {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%;
  display: block; object-fit: cover; object-position: center; opacity: 0; transition: opacity .8s ease;
}
.pub-carousel-img.on { opacity: 1; }
.pub-carousel-dots {
  position: absolute; bottom: 10px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 6px; z-index: 2;
}
.pub-carousel-dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: rgba(255,255,255,.6); cursor: pointer; transition: all .3s;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.pub-carousel-dot.on { background: #fff; width: 20px; }
.pub-badge-logo {
  width: 118px; height: 118px;
  border-radius: 50%; object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,.14);
  display: block; max-width: none;
}

/* 头像卡 */
.pub-card-avatar {
  padding: 12px; text-align: center;
}
.pub-avatar-placeholder {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(145deg, #eceff1, #cfd8dc);
  margin: 0 auto 8px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
/* 头像图片：铺满圆形框并圆形裁剪，固定 80px */
.pub-avatar-placeholder .pub-hicon {
  width: 100%; height: 100%; object-fit: cover;
  max-width: none; max-height: none; display: block;
  border-radius: 50%;
}
.pub-avatar-icon { font-size: 30px; opacity: .4; }
.pub-avatar-label {
  font-size: 13px; font-weight: 600; color: var(--ink);
}

/* 强调色卡片（青/金） */
.pub-card-accent {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 20px 14px; text-align: center;
}
.pub-card-teal {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--green-line);
}
.pub-card-teal .pub-card-title { color: var(--ink); font-size: 14px; margin-bottom: 10px; }
.pub-accent-icon { font-size: 42px; filter: none; }
/* 图标卡图片：统一固定尺寸，不随原图大小变化 */
.pub-accent-icon .pub-hicon {
  width: 56px; height: 56px; object-fit: contain;
  max-width: none; max-height: none; display: block; margin: 0 auto;
}

.pub-card-gold {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--green-line);
}
.pub-star-icon { font-size: 40px; margin-bottom: 6px; }
.pub-star-icon .pub-hicon {
  width: 56px; height: 56px; object-fit: contain;
  max-width: none; max-height: none; display: block; margin: 0 auto;
}
.pub-star-label { font-size: 13px; font-weight: 600; color: var(--ink); }

/* ---------- 中部行：学生阅读 + 校园新闻 ---------- */
.pub-row-mid {
  display: grid; grid-template-columns: 320px 1fr; gap: 14px; margin-bottom: 14px;
}
.pub-row-mid .pub-card-photo { display: flex; }
.pub-row-mid .pub-photo-placeholder { flex: 1; aspect-ratio: auto; min-height: 160px; max-height: none; }

/* ---------- 图标入口行：4 个横版图标卡单行排布（不换行），容器自适应保持 2:1 ---------- */
.pub-icons-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px;
}
.pub-ic {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 10px; padding: 18px 14px 16px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  text-decoration: none; color: var(--ink);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.pub-ic:hover { transform: none; box-shadow: var(--shadow); border-color: var(--teal-light); text-decoration: none; }
.pub-ic-box {
  /* 回滚单行布局：宽度=卡片内宽（桌面约 250px），自适应并保持 2:1 横版比例 */
  width: 100%;
  aspect-ratio: 2 / 1;
  height: auto;
  border-radius: 16px; overflow: hidden; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #E8F3FB, #D2E8F8);
}
@supports not (aspect-ratio: 1 / 1) {
  .pub-ic-box { height: 125px; }
}
.pub-ic-teal .pub-ic-box { background: linear-gradient(145deg, #E0F2F1, #B2DFDB); }
.pub-ic-gold .pub-ic-box { background: linear-gradient(145deg, #FFF8E1, #FFE9A8); }
.pub-ic-box .pub-hicon { width: 100%; height: 100%; object-fit: cover; object-position: center center; max-width: none; max-height: none; display: block; }
.pub-ic-box .emoji { font-size: 54px; line-height: 1; }
.pub-ic-label { font-size: 14px; font-weight: 600; color: var(--ink); }

/* ---------- 系统介绍横幅 ---------- */
.intro-band {
  max-width: 1200px; margin: 0 auto; padding: 28px 24px;
  text-align: center;
}
.intro-band h2 {
  font-size: 20px; color: var(--ink); margin-bottom: 10px;
}
.intro-band p {
  font-size: 16.5px; color: #4a5a54; max-width: 820px; margin: 0 auto;
  line-height: 1.85;
}

/* ---------- 页脚 ---------- */
.pub-footer {
  background: #263238; color: #b0bec5;
  padding: 24px 18px 28px; margin-top: 0;
}
.pub-footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.pub-footer-links {
  font-size: 13px; display: flex; align-items: center; flex-wrap: wrap;
}
.pub-footer-links a { color: #b0bec5; text-decoration: none; }
.pub-footer-links a:hover { color: #fff; }
.pub-sep { margin: 0 8px; color: #546e7a; }
.pub-copyright {
  font-size: 12px; color: #78909c; margin: 0;
}

/* ---------- 新闻详情 / 留言等子页面复用 ---------- */
.content { max-width: 1200px; margin: 0 auto; padding: 26px 24px; }
.sec-title { font-size: 20px; color: var(--teal); border-left: 4px solid var(--teal); padding-left: 10px; margin-bottom: 16px; }
.news-list { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px 18px; }
.msg-item { border-bottom: 1px dashed var(--line); padding: 12px 0; }
.msg-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.news-detail h1 { font-size: 22px; margin: 10px 0; }
.news-detail .meta { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.news-ext { border: 1px solid var(--green-line); border-radius: 10px; padding: 16px; margin: 8px 0; background: var(--green-soft); }
.news-ext-tip { font-size: 14px; font-weight: 600; color: var(--green); margin-bottom: 10px; }
.news-ext .btn.big { font-size: 16px; padding: 12px 22px; display: inline-block; }
.video-embed { margin-top: 10px; }
.msg-reply { background: var(--teal-bg); border-radius: 8px; padding: 8px 12px; font-size: 13.5px; margin-top: 6px; }

/* 公众号文章本地化正文 */
.news-rich { line-height: 1.9; font-size: 16px; color: var(--ink); word-break: break-word; }
.news-rich p { margin: 0 0 14px; }
.news-rich img { max-width: 100%; height: auto; border-radius: 8px; margin: 12px 0; box-shadow: 0 1px 6px rgba(0,0,0,.06); }
.news-rich section, .news-rich div { }
.news-rich a { color: var(--teal); }
.news-src { background: var(--green-soft); border: 1px solid var(--green-line); color: var(--green); padding: 8px 12px; border-radius: 8px; font-size: 13px; margin-top: 10px; }
/* 班级ID 徽标 */
code.cid { display: inline-block; background: var(--green-soft); color: var(--green); border: 1px solid var(--green-line); border-radius: 6px; padding: 1px 8px; font-size: 13px; font-family: ui-monospace, Menlo, Consolas, monospace; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .pub-row { grid-template-columns: 1fr 1fr 1fr 1fr !important; }
  .pub-row:last-child { grid-template-columns: repeat(3, 1fr) !important; }
  .pub-row-mid { grid-template-columns: 1fr 1fr !important; }
  .pub-icons-row { grid-template-columns: repeat(4, 1fr) !important; }
  /* sz-banner 响应式见 banner.php 内联 <style> */
  .pub-nav-menu { gap: 12px; }
  .pub-nav-menu a { font-size: 13px; }
}
@media (max-width: 720px) {
  .pub-row { grid-template-columns: 1fr 1fr !important; }
  .pub-row:last-child { grid-template-columns: repeat(2, 1fr) !important; }
  .pub-row-mid { grid-template-columns: 1fr !important; }
  .pub-icons-row { grid-template-columns: repeat(2, 1fr) !important; }
  .pub-nav-menu { display: none; } /* 移动端隐藏菜单，后续可加汉堡按钮 */
  /* sz-banner 响应式见 banner.php 内联 <style> */
  .pub-footer-inner { flex-direction: column; text-align: center; }
}

/* ---------- 管理后台 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; text-align: center; }
.stat-card b { display: block; font-size: 26px; color: var(--green); }
.stat-card span { font-size: 13px; color: var(--muted); }
.stat-card.green b { color: var(--green-2); }
.stat-card.warn b { color: var(--warn); }
a.stat-card.link { color: inherit; }
a.stat-card.link:hover { text-decoration: none; box-shadow: 0 6px 18px rgba(230,81,0,.18); }
.quick-links { display: flex; flex-wrap: wrap; gap: 8px; }
.audit-item { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: #fbfdfb; }
.audit-item.done { opacity: .75; }
.a-head { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; font-size: 14px; }
.a-content { margin: 6px 0; font-size: 14px; }
.a-actions { display: flex; gap: 8px; }
.a-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.a-reply { font-size: 13px; color: var(--muted); }
.flag-classes { display: flex; flex-wrap: wrap; gap: 10px; }
.flag-class { background: #fbfdfb; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; display: flex; gap: 8px; align-items: baseline; }
.flag-class.winner { border: 2px solid var(--warn); background: #fff8f1; }
.flag-ico { font-size: 18px; }
.flag-score { font-weight: 700; color: var(--green); }
.my-tag { font-size: 11px; background: #e3f2fd; color: var(--blue); border-radius: 999px; padding: 0 8px; }

/* ---------- 消息中心 ---------- */
.notify-item { display: flex; gap: 10px; align-items: flex-start; padding: 12px 6px; border-bottom: 1px dashed var(--line); }
.notify-item.read { opacity: .62; }
.n-dot { color: var(--warn); width: 14px; font-size: 12px; }
.n-main { flex: 1; }
.n-title { font-weight: 600; font-size: 14.5px; }
.n-content { font-size: 13.5px; color: var(--ink); }
.n-time { font-size: 12px; }

/* ---------- 错误页 ---------- */
.error-page { text-align: center; padding: 60px 20px; }
.error-page .err { font-size: 52px; font-weight: 800; color: var(--green-line); }

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .app-body { padding: 0 10px; }
  .card { padding: 14px; }
  .ladder-cell { max-width: none; }
  .stu-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}

/* ============================================================
   树智云 V2.11 优化 —— 视觉与易用性打磨
   ============================================================ */
/* ---------- 工作台 6 宫格功能入口（原 .entry 缺样式）---------- */
.entry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
.entry {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 16px 8px; border-radius: 12px; text-align: center;
  background: linear-gradient(160deg, #eef7ee, #e0f2e1);
  border: 1px solid var(--green-line); color: var(--ink);
  font-size: 14px; font-weight: 600; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.entry:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(46,125,50,.16); border-color: var(--green); }
.entry span { font-size: 13px; font-weight: 600; }
.entry.locked { color: #aab4ae; background: #f3f5f4; border-color: var(--line); cursor: not-allowed; }
.entry.locked:hover { transform: none; box-shadow: none; }
@media (max-width: 560px) { .entry-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 工作台数据概览 ---------- */
.dash-hero .dash-brand { font-size: 14px; opacity: .95; margin-bottom: 8px; }
.dash-hero .dash-title h2 { font-size: 24px; }
.dash-stats .stat { transition: transform .16s ease, background .16s ease; }
.dash-stats .stat:hover { transform: translateY(-2px); background: rgba(255,255,255,.26); text-decoration: none; }
.help-strip { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); margin: 0 0 16px; }
.help-strip a { color: var(--green); font-weight: 600; margin: 0 2px; }
.help-strip a:hover { text-decoration: underline; }

/* ---------- 公开首页：卡片描述、列表卡、占位图更致用 ---------- */
.pub-card-desc { color: #4a5a54; font-size: 15px; line-height: 1.7; margin: 2px 0 12px; }
.pub-card-list-mini { margin-top: 8px; }
.pub-card-list-mini li { padding: 6px 0; font-size: 13px; color: var(--muted); }
/* 移动端导航：由隐藏改为可横向滑动，保证所有入口可点 */
@media (max-width: 720px) {
  .pub-nav-menu { display: flex; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 16px; padding-bottom: 4px; }
  .pub-nav-menu::-webkit-scrollbar { height: 0; }
  .pub-nav-menu a { white-space: nowrap; }
}

/* ---------- 全站通用细节 ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--teal); outline-offset: 2px;
}
::selection { background: var(--teal-light); color: #1a2e28; }
.card { transition: box-shadow .2s ease; }
.tree-card, .stu-card, .seedling, .ladder-cell, .style-chip { transition: transform .16s ease, box-shadow .16s ease; }
.tree-card:hover, .seedling:hover, .stu-card:hover { transform: translateY(-2px); }

/* ---------- 空状态 & 引导 ---------- */
.empty-icon { font-size: 30px; display: block; margin-bottom: 6px; }
.hint-box {
  background: var(--teal-bg); border: 1px solid var(--teal-light); border-radius: 10px;
  padding: 10px 14px; font-size: 13px; color: #1a2e28; margin: 10px 0;
}
.hint-box b { color: var(--teal-dark); }

/* ---------- 值周巡查：学生多选 & 班级查询 ---------- */
.stu-pick { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; background: #fff; }
.stu-pick .mini-input.wide { width: 100%; max-width: 320px; margin-bottom: 8px; }
.stu-pick-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.stu-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 240px; overflow-y: auto; }
.stu-chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; font-size: 13px; cursor: pointer; background: #fff; user-select: none; }
.stu-chip:has(input:checked) { border-color: var(--green); background: var(--green-soft); font-weight: 600; }
.stu-chip input { margin: 0; }
.stu-query-row { align-items: stretch; }
.stu-query-res { margin-top: 10px; }
.stu-query-res table { width: 100%; border-collapse: collapse; font-size: 13px; }
.stu-query-res th, .stu-query-res td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.stu-query-res th { background: var(--teal-bg); color: var(--teal-dark); }

/* ---------- 登录页：标签为 <a>，需与 button 相同样式 ---------- */
.login-tabs a { flex: 1; text-align: center; border: 0; background: transparent; border-radius: 999px; padding: 6px 0; font-size: 14px; cursor: pointer; color: var(--muted); text-decoration: none; }
.login-tabs a.on { background: #fff; color: var(--green); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.login-brand .school-name { display: block; font-size: 13px; font-weight: 400; color: var(--muted); margin-top: 4px; }
.login-hint { font-size: 12.5px; color: var(--muted); margin-top: 10px; line-height: 1.7; }
.login-sub { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ---------- 每周荣誉：操行评定小红旗 / 读书之星 / 学习之星 ---------- */
.honor-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; font-size: 16px; font-style: normal;
  background: #fff; border: 1.5px solid var(--line); flex: none;
  box-shadow: 0 1px 3px rgba(26,46,40,.12);
}
.honor-chip.tiny { width: 20px; height: 20px; font-size: 12px; border-width: 1px; box-shadow: none; }
.honor-chip.hf-flag  { border-color: #e0574f; background: #fff2f0; }
.honor-chip.hf-read  { border-color: #e0a331; background: #fff8e8; }
.honor-chip.hf-study { border-color: #4a86c8; background: #eef5fd; }
.honor-chip.off { filter: grayscale(1); opacity: .32; }

/* 成长树右侧荣誉图标栏（本周获得的才显示） */
.honor-rail { position: absolute; display: flex; flex-direction: column; gap: 4px; z-index: 3; }
.honor-rail.mini .honor-chip { width: 20px; height: 20px; font-size: 11px; }
.stu-card, .seedling, .tree-card { position: relative; }
.stu-card .honor-rail, .seedling .honor-rail { top: 6px; right: 4px; }
.sapling-stage .honor-rail { top: 13%; right: 5%; }
.sapling-stage .honor-rail .honor-chip { width: 34px; height: 34px; font-size: 18px; }

/* 荣誉图例 / 按钮组 / 本周名单 */
.honor-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.honor-legend-item { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--ink); }
.honor-legend-item em { font-style: normal; font-size: 12px; font-weight: 400; color: var(--muted); }
.honor-legend-note { margin-left: auto; }
.honor-btns { display: flex; flex-wrap: wrap; gap: 14px; }
.honor-btn-group { display: flex; align-items: center; gap: 8px; border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px; }
.honor-btn-title { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 600; margin-right: 4px; }
.honor-roster-row { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.honor-roster-row:last-child { border-bottom: none; }
.honor-roster-head { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; min-width: 200px; }
.honor-roster-head em { font-style: normal; color: var(--muted); font-weight: 400; font-size: 12.5px; }
.honor-roster-names { flex: 1; font-size: 14px; line-height: 1.8; color: var(--ink); }
.honor-weeks { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* 家长端：每周荣誉 */
.honor-parent h3 { margin-bottom: 8px; }
.honor-parent-list { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.honor-parent-item { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.honor-parent-item em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.honor-parent-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.honor-term-cnt { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.honor-week-list { display: flex; flex-direction: column; }
.honor-week-row { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.honor-week-row:last-child { border-bottom: none; }
.honor-week-no { min-width: 120px; color: var(--muted); font-size: 13px; }
.honor-week-items { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.honor-chip-row { display: inline-flex; align-items: center; gap: 4px; }

/* 移动端：荣誉图标适当收小 */
@media (max-width: 560px) {
  .honor-roster-head { min-width: 0; }
  .honor-roster-row { flex-direction: column; gap: 4px; }
  .honor-parent-foot { flex-direction: column; align-items: flex-start; }
  .sapling-stage .honor-rail .honor-chip { width: 28px; height: 28px; font-size: 15px; }
}

/* ============================================================
   违纪记录安全管控 + 违纪申诉（两级审核）
   ============================================================ */

/* 录入端：内容规范提示 */
.viol-tip {
  background: #fff8e8; border: 1px dashed #e0a331; border-radius: 8px;
  padding: 8px 12px; font-size: 13px; line-height: 1.75; color: #7a5210;
}
.viol-tip b { color: #a5650a; }

/* 状态徽标 */
.ap-status {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap; border: 1px solid transparent;
}
.ap-s-pending { background: #fff8e8; color: #a5650a; border-color: #f0d59a; }
.ap-s-review  { background: #eaf3fd; color: #1565c0; border-color: #b6d4f2; }
.ap-s-pass    { background: #e8f5e9; color: #2e7d32; border-color: #c8e6c9; }
.ap-s-reject  { background: #fdeeee; color: #c62828; border-color: #f1c4c4; }
.ap-s-revoke  { background: #f2f4f3; color: #6b7c76; border-color: #dde4e0; }

.ap-statusbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.ap-overdue {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: #fdeeee; color: #c62828; border: 1px solid #f1c4c4;
}

/* 详情栅格 / 引文 */
.ap-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px 18px; margin: 10px 0 4px; }
.ap-detail-grid > div { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.ap-detail-grid span { color: var(--muted); font-size: 12.5px; }
.ap-detail-grid b { font-weight: 600; color: var(--ink); }
.ap-detail-grid i { font-style: normal; font-size: 12px; margin-left: 4px; }

.ap-quote { margin-top: 12px; padding: 10px 14px; background: #f7faf8; border-left: 3px solid var(--green-line); border-radius: 0 8px 8px 0; }
.ap-quote b { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.ap-quote p { margin: 0; font-size: 14.5px; line-height: 1.75; }

.ap-reason { font-size: 14.5px; line-height: 1.8; }
.ap-reason-cell { max-width: 320px; font-size: 13.5px; line-height: 1.6; }

/* 附件缩略图 */
.ap-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.ap-thumb {
  width: 108px; height: 108px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; display: block;
}

/* 操作按钮组 */
.ap-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }

/* 时间线 */
.ap-timeline { list-style: none; margin: 6px 0 0; padding: 0 0 0 6px; }
.ap-tl-item { position: relative; padding: 0 0 16px 22px; border-left: 2px solid var(--green-line); }
.ap-tl-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.ap-tl-dot {
  position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 2px solid var(--green);
}
.ap-tl-body b { font-size: 14.5px; margin-right: 8px; }
.ap-tl-body span { font-size: 12.5px; }
.ap-tl-body p { font-size: 13.5px; line-height: 1.7; margin: 4px 0 0; }

/* 管理员后台：统计 / 标签页 / 筛选 */
.ap-stats { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; font-size: 14px; }
.ap-stats b { font-size: 18px; margin-left: 4px; }
.ap-stats b.pos { color: var(--green); }
.ap-stats b.neg { color: var(--danger); }

.ap-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; }
.ap-tab {
  display: inline-block; padding: 7px 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: #fff; border: 1px solid var(--line); color: var(--ink);
}
.ap-tab:hover { text-decoration: none; border-color: var(--green-line); }
.ap-tab.on { background: var(--green); border-color: var(--green); color: #fff; }

.ap-filter { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 12px 0 4px; }
.ap-filter label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.ap-filter input, .ap-filter select { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-family: inherit; color: var(--ink); background: #fff; }

/* 家长端流程说明 */
.ap-steps { margin: 6px 0 0; padding-left: 20px; font-size: 14px; line-height: 1.85; }
.ap-steps li { margin-bottom: 2px; }
.ap-help { background: #f7faf8; }

@media (max-width: 560px) {
  .ap-detail-grid { grid-template-columns: 1fr; }
  .ap-filter { flex-direction: column; align-items: stretch; }
  .ap-thumb { width: 84px; height: 84px; }
  .ap-stats { gap: 14px; font-size: 13px; }
  .ap-stats b { font-size: 16px; }
}

/* ── 右上角头像 + 个人信息面板 ───────────────────── */
.user-menu { position: relative; }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff;
  background: var(--green); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
  box-shadow: 0 0 0 1px var(--green-line); transition: transform .12s ease;
}
.user-avatar:hover { transform: scale(1.06); }
.user-panel {
  position: absolute; top: 44px; right: 0; min-width: 188px; z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 28px rgba(26,46,40,.16);
  padding: 12px; text-align: left;
}
.user-panel[hidden] { display: none; }
.up-head { padding-bottom: 10px; border-bottom: 1px solid var(--bg); margin-bottom: 10px; }
.up-name { display: block; font-size: 15px; font-weight: 700; color: var(--ink); }
.up-badges { display: inline-block; margin-top: 4px; font-size: 12px; color: var(--green); }
.up-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── 通用弹窗（修改密码 / 账号重复提示，通用一套）─────────── */
/* 改动①：遮罩层用「显式四边 0」替代 inset:0 简写，兼容旧内核 / WebView；
   否则 inset 被忽略时 fixed 元素会落到文档流原位（页面左下角）。
   遮罩铺满整个视口，z-index 提到 1000 确保浮于顶栏与所有内容之上。 */
.modal-mask {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 1000;
  background: rgba(26,46,40,.42);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  overflow-y: auto;
}
.modal-mask[hidden] { display: none; }
.modal {
  /* 改动②：margin:auto 作为 flex 居中的兜底，确保任意内核下都水平+垂直居中 */
  margin: auto;
  width: 100%; max-width: 380px; background: #fff; border-radius: 14px; box-shadow: 0 18px 50px rgba(26,46,40,.28);
  overflow: hidden; animation: modalIn .18s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--bg); }
.modal-head h3 { margin: 0; font-size: 16px; color: var(--ink); }
.modal-close { border: none; background: none; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.modal-close:hover { color: var(--ink); }
.modal-body { padding: 16px 18px 18px; }
.modal-body .form-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.modal-body .form-row label { width: 84px; font-size: 13px; color: var(--muted); flex: none; }
.modal-body .pwd-hint { margin: 8px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

/* 账号重复校验提示 */
.acct-msg { margin: 0; font-size: 14px; line-height: 1.7; color: var(--ink); }
.acct-msg b { color: var(--danger); font-weight: 700; word-break: break-all; }

/* ── Toast 提示 ─────────────────────────────────── */
.toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  min-width: 180px; max-width: 80vw; padding: 10px 18px; border-radius: 10px; font-size: 14px; font-weight: 600; color: #fff;
  box-shadow: 0 8px 24px rgba(26,46,40,.22); opacity: 0; transform: translateY(-8px); transition: opacity .25s ease, transform .25s ease;
}
.toast.show { opacity: 1; transform: none; }
.toast.ok { background: var(--green); }
.toast.err { background: var(--danger); }
