/* 少年智慧研学系统 v2.0 管理端样式（配色风格与演示版一致） */
:root {
  --orange: #FF7A00; --orange-d: #e86a00; --green: #34A853; --red: #E4393C;
  --side: #2B2F3A; --ink: #23272e; --sub: #8a909a; --line: #ececec; --bg: #f4f5f7;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "微软雅黑", sans-serif; background: var(--bg);
  color: var(--ink); font-size: 14px; }

/* ---------- 登录页 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ff9a3d, #ff7a00); position: relative; }
.login-box { width: 420px; background: #fff; border-radius: 18px; padding: 42px 40px 26px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .22); }
.login-box h1 { font-size: 22px; text-align: center; margin-bottom: 6px; color: var(--ink); }
.login-box .sub { text-align: center; font-size: 13px; color: var(--sub); margin-bottom: 26px; }
.login-box input { width: 100%; height: 42px; border: 1.5px solid #e0e0e0; border-radius: 8px;
  padding: 0 14px; font-size: 14px; margin-bottom: 16px; outline: none; }
.login-box input:focus { border-color: var(--orange); }
.login-box button { width: 100%; height: 44px; background: var(--orange); color: #fff; border: 0;
  border-radius: 8px; font-size: 15px; font-weight: 700; cursor: pointer; }
.login-box button:hover { background: var(--orange-d); }
.login-msg { color: var(--red); font-size: 12px; min-height: 18px; margin: -8px 0 8px; }
.copyright { text-align: center; font-size: 12px; color: #b5b5b5; margin-top: 22px;
  padding-top: 14px; border-top: 1px solid var(--line); }
.login-bg-mark { position: absolute; bottom: 24px; width: 100%; text-align: center;
  color: rgba(255, 255, 255, .8); font-size: 13px; }

/* ---------- 主框架 ---------- */
.topbar { height: 56px; background: #fff; display: flex; align-items: center; padding: 0 22px;
  box-shadow: 0 1px 4px rgba(0, 21, 41, .08); position: fixed; top: 0; left: 0; right: 0; z-index: 10; }
.topbar .logo { font-size: 17px; font-weight: 800; color: var(--orange); }
.topbar .sub2 { font-size: 12px; color: var(--sub); margin-left: 10px; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 13px; }
.topbar .logout { color: var(--red); cursor: pointer; }
.sidebar { position: fixed; top: 56px; bottom: 0; left: 0; width: 190px; background: var(--side);
  padding: 14px 10px; }
.sidebar .nav-item { padding: 12px 16px; border-radius: 9px; cursor: pointer; font-size: 14px;
  color: #c8ccd4; margin-bottom: 4px; }
.sidebar .nav-item:hover { background: #353a48; color: #fff; }
.sidebar .nav-item.active { background: var(--orange); color: #fff; font-weight: 700; }
.main { position: fixed; top: 56px; left: 190px; right: 0; bottom: 0; overflow-y: auto; padding: 20px; }
.version { position: fixed; left: 14px; bottom: 12px; font-size: 11.5px; color: #7d828d; z-index: 11; }

/* ---------- 通用组件 ---------- */
.card { background: #fff; border-radius: 12px; padding: 18px 20px; margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04); }
.card h3 { font-size: 15px; margin-bottom: 14px; color: var(--ink); }
.stat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.stat { background: #fff; border-radius: 12px; padding: 16px; text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04); }
.stat .num { font-size: 26px; font-weight: 800; color: var(--ink); }
.stat .lab { font-size: 12px; color: var(--sub); margin-top: 6px; }
.stat.orange { background: linear-gradient(120deg, #fff4e8, #ffe2c2); }
.stat.green { background: linear-gradient(120deg, #edf9f0, #d6f2de); }
.stat.blue { background: linear-gradient(120deg, #eef5ff, #d8e9ff); }
.stat.purple { background: linear-gradient(120deg, #f4efff, #e5d9ff); }
.tag { display: inline-block; padding: 2px 10px; border-radius: 4px; font-size: 12px; color: #fff; }
.tag-green { background: var(--green); }
.tag-gray { background: #a4abb6; }
.tag-orange { background: var(--orange); }
.tag-blue { background: #3b82f6; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th { background: #faf7f4; color: #666; font-weight: normal; text-align: left; }
table.tbl th, table.tbl td { padding: 10px 12px; border-bottom: 1px solid #f2f2f2; }
tr:hover td { background: #fffaf5; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs .tab { padding: 6px 16px; background: #fff; border: 1.5px solid #e0e0e0; border-radius: 18px;
  font-size: 13px; cursor: pointer; color: #666; }
.tabs .tab.active { background: var(--orange); color: #fff; border-color: var(--orange); font-weight: 700; }
.btn { display: inline-block; padding: 7px 16px; border-radius: 7px; border: 1px solid #ddd;
  background: #fff; font-size: 13px; cursor: pointer; }
.btn-primary { background: var(--orange); color: #fff; border-color: var(--orange); font-weight: 700; }
.btn-primary:hover { background: var(--orange-d); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin: 0 auto; }
.dot-g { background: var(--green); } .dot-r { background: #d8d8d8; }
.roster { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.roster .stu { background: #faf7f4; border-radius: 7px; padding: 7px 10px; font-size: 12.5px;
  display: flex; align-items: center; justify-content: space-between; }
.roster .stu .ck { color: var(--green); font-size: 11px; white-space: nowrap; }
.grid-heat { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; max-width: 560px; }
.grid-heat .cell { aspect-ratio: 1.6; border-radius: 7px; display: flex; align-items: center;
  justify-content: center; font-size: 12px; color: #fff; background: #f0f0f0; color: #b0b6bf;
  border: 1px solid rgba(0, 0, 0, .05); }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.bar-row .bar { height: 12px; border-radius: 6px; background: var(--orange); }
.modal-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); display: flex;
  align-items: center; justify-content: center; z-index: 99; }
.modal { background: #fff; border-radius: 14px; width: 560px; max-height: 84vh; overflow-y: auto; padding: 24px; }
.modal h3 { margin-bottom: 16px; }
.modal .frm label { display: block; font-size: 13px; color: #666; margin: 10px 0 5px; font-weight: 700; }
.modal .frm input, .modal .frm textarea, .modal .frm select { width: 100%; padding: 8px 11px;
  border: 1px solid #dcdfe5; border-radius: 7px; font-size: 13px; font-family: inherit; }
.modal .foot { text-align: right; margin-top: 18px; display: flex; gap: 10px; justify-content: flex-end; }
.page-title { font-size: 18px; font-weight: 800; margin-bottom: 16px; color: var(--ink); }
.muted { color: var(--sub); font-size: 12px; }
.photos img { width: 84px; height: 62px; object-fit: cover; border-radius: 6px; margin-right: 6px; }
.animal-wall { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.animal-card { background: #fafafa; border-radius: 10px; overflow: hidden; }
.animal-card img { width: 100%; height: 120px; object-fit: cover; background: #eee; }
.animal-card .bd { padding: 10px 12px; font-size: 12.5px; }
.animal-card .star { color: #f5a623; cursor: pointer; float: right; }
svg.chart { width: 100%; max-width: 760px; background: #fff; }
