:root {
  --bg: #F5F2EC;
  --card: #FDFCF9;
  --ink: #1B1917;
  --muted: #6E6860;
  --line: rgba(35,30,24,.12);
  --blue: #1B1917;
  --blue-d: #111111;
  --green: #4E6F52;
  --red: #B4453C;
  --amber: #B5732C;
  --chip: #F1EBE1;
  --shadow: 0 1px 2px rgba(35,30,24,.04), 0 14px 32px -20px rgba(35,30,24,.30);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg); color: var(--ink);
  font-size: 17px; line-height: 1.5; -webkit-text-size-adjust: 100%;
}
a { color: var(--blue); text-decoration: none; }
.wrap { max-width: 960px; margin: 0 auto; padding: 12px 14px 60px; }
.topbar {
  position: sticky; top: 0; z-index: 20; background: var(--blue); color: #fff;
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  box-shadow: var(--shadow);
}
.topbar .title { font-size: 18px; font-weight: 700; flex: 1; }
.topbar .who { font-size: 14px; opacity: .95; }
.topbar button, .topbar a.btn {
  background: rgba(255,255,255,.10); color: #fff; border: 1px solid rgba(255,255,255,.16); border-radius: 999px;
  padding: 6px 10px; font-size: 14px; cursor: pointer;
}
.topbar .bell { position: relative; }
.topbar .bell .dot { position: absolute; top: -2px; right: -2px; background: #E8C9A0; color: #1B1917; border-radius: 999px; min-width: 16px; height: 16px; font-size: 11px; line-height: 16px; text-align: center; padding: 0 3px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 14px; margin: 12px 0; box-shadow: var(--shadow); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.tabs button {
  flex: 1; min-width: 90px; border: 1px solid var(--line); background: #FDFCF9; color: var(--ink);
  border-radius: 999px; padding: 10px; font-size: 16px; cursor: pointer;
}
.tabs button.active { background: var(--ink); color: #fff; border-color: var(--blue); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
label { font-size: 14px; color: var(--muted); display: block; margin: 8px 0 4px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid rgba(35,30,24,.14); border-radius: 12px;
  font-size: 16px; background: #FDFCF9; color: var(--ink); font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(27,25,23,.09); }
button.primary { background: var(--ink); color: #fff; border: 0; border-radius: 999px; font-weight: 700; padding: 11px 16px; font-size: 16px; cursor: pointer; }
button.primary:active { background: var(--blue-d); }
button.ghost { background: #F8F5EE; color: #3D3831; border: 1px solid rgba(35,30,24,.14); border-radius: 999px; padding: 10px 14px; font-size: 15px; cursor: pointer; }
button.danger { background: #FBEEEC; color: var(--red); border: 1px solid rgba(180,69,60,.32); border-radius: 999px; padding: 6px 10px; font-size: 14px; cursor: pointer; }
.muted { color: var(--muted); font-size: 14px; }
.center { text-align: center; }
.grid-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.grid-table th, .grid-table td { border: 1px solid var(--line); padding: 6px 4px; text-align: center; vertical-align: middle; }
.grid-table th { background: #F3EFE6; font-size: 14px; }
.grid-table td .subj { font-weight: 600; }
.grid-table td .cls { font-size: 12px; color: var(--muted); }
.cell-empty { color: #C9C2B6; }
.lesson-list { list-style: none; padding: 0; margin: 0; }
.lesson-list li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; margin: 8px 0; display: flex; justify-content: space-between; gap: 8px; }
.lesson-list li .when { font-weight: 700; color: #B25A3C; white-space: nowrap; }
.chip { display: inline-block; background: var(--chip); color: var(--blue-d); border-radius: 999px; padding: 2px 10px; font-size: 13px; margin: 2px; }
.chip.t1 { background: #EEF3EA; color: #3A5540; }
.chip.t2 { background: #F1EBE1; color: #3D3831; }
.chip.t3 { background: #FBF3E6; color: #8E5418; }
.chip.t4 { background: #F3EFE6; color: #6E6860; }
.cand { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin: 6px 0; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.cand-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sub-count { color: #8E5418; font-size: 13px; font-weight: 600; }
.cand:hover { border-color: var(--ink); background: #F8F5EE; }
.cand.sel { border-color: var(--ink); background: #F3EFE6; }
.sub-row { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin: 8px 0; }
.sub-row .h { font-weight: 700; }
.tag { font-size: 12px; padding: 1px 8px; border-radius: 6px; }
.tag.bing { background: #FBEEEC; color: #8F2F28; }
.tag.shi { background: #FBF3E6; color: #8E5418; }
.tag.gong { background: #EEF3EA; color: #3A5540; }
.tag.salary { background: #F7EBEE; color: #8A5563; }
.msg { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin: 8px 0; }
.msg.unread { background: #F8F5EE; border-color: rgba(35,30,24,.14); }
.msg .t { font-size: 13px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 24px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1B1917; color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 15px; z-index: 50; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: .95; }
.hidden { display: none !important; }
.banner { background: #FBF3E6; color: #8E5418; border-bottom: 1px solid rgba(181,115,44,.30); padding: 10px 14px; font-size: 14px; text-align: center; }
.banner a { color: #8E5418; font-weight: 600; text-decoration: underline; }
.modal-overlay { position: fixed; inset: 0; background: rgba(20,17,14,.52); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal { background: #FDFCF9; border-radius: 22px; padding: 20px; width: 100%; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.modal label { display: block; font-size: 14px; margin: 10px 0 4px; color: #3D3831; }
.modal input { width: 100%; padding: 10px 12px; border: 1px solid rgba(35,30,24,.20); border-radius: 12px; font-size: 16px; box-sizing: border-box; }
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.login-wrap { max-width: 380px; margin: 8vh auto 0; padding: 0 16px; }
.login-wrap .logo { text-align: center; font-size: 26px; font-weight: 800; color: var(--ink); margin-bottom: 6px; }
.login-wrap .sub { text-align: center; color: var(--muted); margin-bottom: 18px; }
.remember { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-top: 6px; }
.remember input { width: auto; }
.section-title { font-size: 17px; font-weight: 700; margin: 4px 0 10px; }
.kpi { display: flex; gap: 10px; flex-wrap: wrap; }
.kpi .box { flex: 1; min-width: 120px; background: #FDFCF9; border: 1px solid var(--line); border-radius: 16px; padding: 12px; text-align: center; }
.kpi .box .n { font-size: 26px; font-weight: 800; color: #B25A3C; }
.kpi .box .l { font-size: 13px; color: var(--muted); }
@media (max-width: 560px) {
  body { font-size: 16px; }
  .grid-table { font-size: 13px; }
  .topbar .title { font-size: 16px; }
  .tabs button { min-width: 70px; font-size: 15px; padding: 9px; }
}

/* ===== 统一外壳收尾（门户风格） ===== */
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  background:var(--bg);color:var(--ink)}
a{color:#B25A3C}
.topbar{background:var(--ink)!important;box-shadow:0 1px 0 rgba(0,0,0,.10)}
.card{box-shadow:0 1px 2px rgba(35,30,24,.04),0 14px 32px -20px rgba(35,30,24,.28)}
.grid-table th{color:var(--muted)}
.grid-table th,.grid-table td{border-color:rgba(35,30,24,.10)}
button.primary:active{background:#332E28}
.chip{color:#3D3831}
.section-title{letter-spacing:.01em}
/* 手机：顶栏标题不折行，按钮收紧 */
@media (max-width:560px){
  .topbar{gap:7px;padding:9px 11px}
  .topbar .title{white-space:nowrap;flex:0 0 auto}
  .topbar .who{flex:1;text-align:right;font-size:12.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .topbar button,.topbar a.btn{padding:5px 10px;font-size:13px;flex:none}
}
