/* ============================================================
 * 绿色梦想计划 · 管理后台 样式
 * ============================================================ */
:root {
  --g-900: #0B3D2C;
  --g-800: #0E4A35;
  --g-700: #0E7A4A;
  --g-600: #1F8A57;
  --g-500: #3FA45B;
  --g-100: #E6F5EC;
  --g-50: #F0F8F3;
  --line: #E4EBE7;
  --text: #1F2A24;
  --text-2: #5B6A62;
  --text-3: #8C9A93;
  --bg: #F3F6F4;
  --amber: #B8720E;
  --amber-bg: #FFF5E6;
  --blue: #2D5BB9;
  --blue-bg: #EDF2FF;
  --violet: #6B4FBB;
  --violet-bg: #F2EFFC;
  --red: #B23B2E;
  --red-bg: #FDEDEB;
  --teal: #0F766E;
  --teal-bg: #E6F5F3;
  --gray: #64736B;
  --gray-bg: #EFF2F0;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(18, 44, 32, .06);
  --shadow-lg: 0 16px 48px rgba(11, 61, 44, .22);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", -apple-system, sans-serif;
  font-size: 13.5px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #CFDAD4; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------- 登录 ---------------------------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(900px 500px at 12% 8%, rgba(63, 164, 91, .28), transparent 60%),
    radial-gradient(700px 420px at 88% 92%, rgba(14, 122, 74, .22), transparent 62%),
    linear-gradient(140deg, #07281D 0%, #0B3D2C 46%, #10503A 100%);
  padding: 40px 20px;
}
.login-card {
  width: 940px; max-width: 100%; background: #fff; border-radius: 18px; overflow: hidden;
  display: flex; box-shadow: 0 30px 80px rgba(0, 0, 0, .38);
}
.login-left {
  width: 46%; padding: 42px 38px; color: #fff; position: relative;
  background: linear-gradient(160deg, #0E7A4A 0%, #17583E 100%);
}
.login-left::after {
  content: ""; position: absolute; right: -60px; bottom: -80px; width: 220px; height: 220px;
  border-radius: 50%; background: rgba(255, 255, 255, .07);
}
.login-brand { font-size: 12px; letter-spacing: 3px; opacity: .75; }
.login-title { font-size: 27px; font-weight: 700; margin-top: 14px; letter-spacing: 1px; }
.login-desc { font-size: 13px; line-height: 2; opacity: .82; margin-top: 16px; }
.login-points { margin-top: 30px; display: flex; flex-direction: column; gap: 12px; font-size: 12.5px; }
.login-points div { display: flex; align-items: center; gap: 9px; opacity: .9; }
.login-points i {
  width: 18px; height: 18px; border-radius: 50%; background: rgba(255, 255, 255, .18);
  display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-style: normal;
}
.login-right { flex: 1; padding: 42px 44px; }
.login-right h2 { font-size: 19px; }
.login-right p.hint { color: var(--text-3); font-size: 12.5px; margin-top: 6px; }
.role-list { margin-top: 26px; display: flex; flex-direction: column; gap: 12px; }
.role-item {
  display: flex; align-items: center; gap: 14px; padding: 15px 16px; border: 1px solid var(--line);
  border-radius: 12px; cursor: pointer; transition: .18s; background: #fff;
}
.role-item:hover { border-color: var(--g-500); background: var(--g-50); transform: translateY(-1px); box-shadow: var(--shadow); }
.role-icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--g-100); color: var(--g-700);
  display: flex; align-items: center; justify-content: center; font-size: 17px; flex: 0 0 auto;
}
.role-main { flex: 1; }
.role-name { font-size: 14.5px; font-weight: 600; }
.role-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.role-go { color: var(--text-3); font-size: 17px; }
.login-foot { margin-top: 24px; font-size: 11.5px; color: var(--text-3); line-height: 1.9; }

/* ---------------------------- 骨架 ---------------------------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 230px; flex: 0 0 230px; background: linear-gradient(180deg, #0B3D2C 0%, #0A3427 100%);
  color: #DCEAE2; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { padding: 20px 20px 18px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.brand h1 { font-size: 15.5px; color: #fff; letter-spacing: .5px; }
.brand span { font-size: 11px; opacity: .55; letter-spacing: 2px; }
.menu { padding: 12px 10px; flex: 1; overflow-y: auto; }
.menu-group { font-size: 10.5px; letter-spacing: 2px; opacity: .38; padding: 14px 12px 7px; }
.menu a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
  font-size: 13px; color: #C6D8CE; margin-bottom: 2px; transition: .15s; position: relative;
}
.menu a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.menu a.on { background: rgba(63, 164, 91, .22); color: #fff; font-weight: 500; }
.menu a.on::before {
  content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 3px 3px 0; background: #5FD08A;
}
.menu a .ico { width: 16px; text-align: center; opacity: .85; font-size: 13px; }
.menu a .badge {
  margin-left: auto; background: #C4442F; color: #fff; font-size: 10.5px; padding: 1px 6px;
  border-radius: 999px; font-weight: 600;
}
.side-foot { padding: 14px; border-top: 1px solid rgba(255, 255, 255, .07); }
.side-user { display: flex; align-items: center; gap: 10px; }
.side-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, .15);
  display: flex; align-items: center; justify-content: center; font-size: 13px; color: #fff;
}
.side-user .n { font-size: 12.5px; color: #fff; }
.side-user .r { font-size: 10.5px; opacity: .55; }
.side-out {
  margin-left: auto; font-size: 11px; opacity: .6; cursor: pointer; padding: 4px;
}
.side-out:hover { opacity: 1; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 58px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 24px; gap: 14px; position: sticky; top: 0; z-index: 20;
}
.crumb { font-size: 13px; color: var(--text-2); }
.crumb b { color: var(--text); font-weight: 600; }
.topbar .spacer { flex: 1; }
.top-chip {
  font-size: 12px; padding: 5px 11px; border-radius: 999px; background: var(--g-50);
  color: var(--g-700); border: 1px solid #CFE7DA;
}
.content { padding: 20px 24px 40px; }

/* ---------------------------- 通用 ---------------------------- */
.page-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.page-head h2 { font-size: 19px; letter-spacing: .3px; }
.page-head .sub { font-size: 12.5px; color: var(--text-3); margin-top: 5px; line-height: 1.7; }
.page-head .spacer { flex: 1; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head {
  padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px;
}
.card-head h3 { font-size: 14px; font-weight: 600; }
.card-head .spacer { flex: 1; }
.card-body { padding: 16px; }
.card-body.tight { padding: 0; }

.btn {
  height: 32px; padding: 0 14px; border-radius: 7px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-size: 12.5px; display: inline-flex;
  align-items: center; gap: 6px; transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: #C3D6CC; background: #FBFDFC; }
.btn.primary { background: var(--g-700); border-color: var(--g-700); color: #fff; }
.btn.primary:hover { background: var(--g-600); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); border-color: #F1D2CD; background: #fff; }
.btn.danger:hover { background: var(--red-bg); }
.btn.sm { height: 27px; padding: 0 10px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-link { color: var(--g-700); cursor: pointer; font-size: 12.5px; }
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--red); }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.input, .select, .textarea {
  width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 7px;
  padding: 0 11px; background: #fff; outline: none; transition: .15s;
}
.textarea { height: auto; padding: 9px 11px; min-height: 84px; resize: vertical; line-height: 1.7; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--g-500); box-shadow: 0 0 0 3px rgba(63, 164, 91, .12); }
.hint { font-size: 11.5px; color: var(--text-3); margin-top: 6px; line-height: 1.7; }

.tag {
  display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border-radius: 5px;
  font-size: 11.5px; white-space: nowrap;
}
.tag.gray { background: var(--gray-bg); color: var(--gray); }
.tag.amber { background: var(--amber-bg); color: var(--amber); }
.tag.blue { background: var(--blue-bg); color: var(--blue); }
.tag.green { background: var(--g-100); color: var(--g-700); }
.tag.teal { background: var(--teal-bg); color: var(--teal); }
.tag.violet { background: var(--violet-bg); color: var(--violet); }
.tag.red { background: var(--red-bg); color: var(--red); }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin-right: 5px; }

table.tb { width: 100%; border-collapse: collapse; }
table.tb th {
  text-align: left; font-size: 11.5px; color: var(--text-3); font-weight: 500;
  padding: 10px 14px; background: #FAFCFB; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.tb td { padding: 11px 14px; border-bottom: 1px solid #F1F5F3; font-size: 13px; vertical-align: middle; }
table.tb tr:hover td { background: #F9FCFA; }
table.tb tr.sel td { background: var(--g-50); }
table.tb .num { color: var(--text-3); font-variant-numeric: tabular-nums; }
table.tb .strong { font-weight: 600; }
table.tb .muted { color: var(--text-3); font-size: 12px; }
table.tb td.right, table.tb th.right { text-align: right; }
.check { width: 15px; height: 15px; accent-color: var(--g-700); cursor: pointer; }

.empty { padding: 52px 0; text-align: center; color: var(--text-3); font-size: 13px; }
.empty .ico { font-size: 30px; opacity: .35; display: block; margin-bottom: 10px; }

.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.stat-card {
  background: #fff; border-radius: var(--radius); padding: 15px 16px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.stat-card .k { font-size: 12px; color: var(--text-3); }
.stat-card .v { font-size: 25px; font-weight: 700; margin-top: 6px; letter-spacing: .5px; }
.stat-card .u { font-size: 11.5px; color: var(--text-3); margin-left: 4px; font-weight: 400; }
.stat-card .bar { height: 3px; border-radius: 3px; background: var(--g-100); margin-top: 12px; overflow: hidden; }
.stat-card .bar i { display: block; height: 100%; background: var(--g-500); border-radius: 3px; }
.stat-card.clickable { cursor: pointer; transition: .16s; }
.stat-card.clickable:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(18, 44, 32, .1); }

.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; }
.mt-14 { margin-top: 14px; }
.mt-10 { margin-top: 10px; }

/* 过滤条 */
.filter-bar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 13px 16px; border-bottom: 1px solid var(--line); background: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
}
.filter-bar .input, .filter-bar .select { width: auto; height: 32px; font-size: 12.5px; }
.filter-bar .input { width: 220px; }

/* 批量条 */
.bulkbar {
  display: flex; align-items: center; gap: 12px; padding: 9px 16px; background: var(--g-50);
  border-bottom: 1px solid #DBEDE3; font-size: 12.5px; color: var(--g-700);
}
.bulkbar .spacer { flex: 1; }

/* 进度条 */
.progress { height: 6px; background: #EDF2EF; border-radius: 99px; overflow: hidden; width: 130px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--g-500), var(--g-700)); border-radius: 99px; transition: width .3s; }

/* 抽屉 / 弹窗 */
.mask {
  position: fixed; inset: 0; background: rgba(10, 30, 22, .42); z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  backdrop-filter: blur(2px);
}
.modal {
  background: #fff; border-radius: 14px; width: 520px; max-width: 100%;
  box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .18s ease-out;
}
@keyframes pop { from { transform: translateY(8px) scale(.99); opacity: 0; } }
.modal.wide { width: 720px; }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal-head h3 { font-size: 15px; }
.modal-head .x { margin-left: auto; cursor: pointer; color: var(--text-3); font-size: 18px; line-height: 1; }
.modal-body { padding: 20px; max-height: 62vh; overflow-y: auto; }
.modal-foot { padding: 13px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 9px; background: #FCFDFC; }

/* toast */
.toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 9px 18px; border-radius: 8px; background: #16352A; color: #fff; font-size: 12.5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22); animation: pop .16s ease-out;
}
.toast.err { background: #8E2F24; }
.toast.ok { background: #14603F; }

/* 相册 */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 14px; }
.album-item { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid #EDF2EF; }
.album-item img { width: 100%; height: 132px; object-fit: cover; display: block; }
.album-meta { padding: 10px 12px; }
.album-meta .t { font-size: 12.5px; font-weight: 600; }
.album-meta .s { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }
.album-item .ops { display: flex; gap: 6px; padding: 0 12px 12px; }

/* 详情 */
.detail-hero { display: flex; gap: 16px; align-items: center; }
.detail-photo {
  width: 74px; height: 74px; border-radius: 12px; object-fit: cover; background: var(--g-100);
  display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--g-700); font-weight: 600;
}
.kv { display: grid; grid-template-columns: 92px 1fr; gap: 9px 14px; font-size: 13px; }
.kv dt { color: var(--text-3); font-size: 12.5px; }
.kv dd { color: var(--text); }

.timeline { position: relative; padding-left: 6px; }
.tl-item { position: relative; padding: 0 0 16px 18px; border-left: 1px solid var(--line); }
.tl-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -4.5px; top: 4px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--g-500);
}
.tl-item.warn::before { background: #E0A33C; }
.tl-item.bad::before { background: #C4442F; }
.tl-title { font-size: 13px; font-weight: 600; }
.tl-time { font-size: 11.5px; color: var(--text-3); margin-left: 8px; font-weight: 400; }
.tl-text { font-size: 12.5px; color: var(--text-2); line-height: 1.75; margin-top: 5px; }

.chip-row { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  font-size: 12px; padding: 5px 11px; border-radius: 999px; background: #fff;
  border: 1px solid var(--line); cursor: pointer; color: var(--text-2);
}
.chip.on { background: var(--g-700); border-color: var(--g-700); color: #fff; }

.pager { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 12px 16px; font-size: 12.5px; color: var(--text-3); }

.section-label { font-size: 12px; color: var(--text-3); letter-spacing: 1px; margin: 18px 0 8px; }
.section-label:first-child { margin-top: 0; }

.note {
  background: var(--g-50); border: 1px solid #DCEDE4; border-radius: 8px; padding: 11px 13px;
  font-size: 12px; color: var(--g-800); line-height: 1.8;
}
.note.warn { background: var(--amber-bg); border-color: #F5E1C0; color: #8A5A12; }

.flow { display: flex; align-items: center; gap: 0; flex-wrap: wrap; font-size: 11.5px; color: var(--text-3); }
.flow span { padding: 4px 9px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.flow span.on { background: var(--g-700); color: #fff; border-color: var(--g-700); }
.flow i { display: inline-block; width: 16px; height: 1px; background: #D8E3DC; margin: 0 2px; }

.split-line { height: 1px; background: var(--line); margin: 14px 0; }

/* ---------- 服务端连接标识 ---------- */
.backend-badge {
  position: fixed; right: 16px; bottom: 14px; z-index: 60;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(14,122,74,.92); color: #fff;
  font-size: 11.5px; letter-spacing: .3px;
  box-shadow: 0 6px 18px rgba(11,61,44,.24);
  pointer-events: none;
}

/* ---------- 免登录只读页 ---------- */
.guest-wrap {
  min-height: 100vh; background: linear-gradient(160deg, #EAF2ED 0%, #F4F7F5 40%, #EDF3EF 100%);
  padding: 34px 20px 60px;
}
.guest-inner { max-width: 660px; margin: 0 auto; }
.guest-foot {
  max-width: 660px; margin: 22px auto 0; text-align: center;
  font-size: 12px; color: #8C9A93;
}
.guest-hero {
  background: linear-gradient(135deg, #0E7A4A 0%, #3FA45B 100%);
  border-radius: 16px; padding: 26px 20px; color: #fff; text-align: center;
  box-shadow: 0 12px 30px rgba(14, 122, 74, .22); margin-bottom: 16px;
}
.guest-avatar {
  width: 66px; height: 66px; border-radius: 50%; background: rgba(255, 255, 255, .92);
  color: #0E7A4A; font-size: 27px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 12px;
}
.guest-name { font-size: 21px; font-weight: 700; letter-spacing: .5px; }
.guest-meta { font-size: 13px; opacity: .92; margin-top: 6px; }
.guest-school { font-size: 11.5px; opacity: .82; margin-top: 4px; }
.copy-box {
  background: #F4F8F5; border: 1px dashed #B9D3C5; border-radius: 9px;
  padding: 11px 13px; font-size: 12px; color: #17513A; word-break: break-all; line-height: 1.7;
  user-select: all;
}
.fb-item { padding: 10px 0; border-bottom: 1px dashed #EDF2EF; }
.fb-item:last-child { border-bottom: 0; }
.fb-head { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; }
.fb-body { font-size: 13px; line-height: 1.8; color: #34433C; }

/* ---- 登录：两个入口 + 账号密码 ---- */
.login-tabs { display: flex; gap: 8px; background: #F1F6F3; padding: 4px; border-radius: 10px; margin-bottom: 22px; }
.login-tab {
  flex: 1; height: 36px; border: 0; background: transparent; border-radius: 8px;
  font-size: 13.5px; color: #5B6A62; cursor: pointer; font-family: inherit; transition: .16s;
}
.login-tab:hover { color: #0E7A4A; }
.login-tab.on { background: #fff; color: #0E7A4A; font-weight: 600; box-shadow: 0 1px 3px rgba(20,40,30,.1); }
.login-field { margin-top: 14px; }
.login-field label { display: block; font-size: 12.5px; color: #7C8983; margin-bottom: 6px; }
.login-field .input { width: 100%; height: 42px; }
.login-err {
  margin-top: 12px; padding: 9px 12px; border-radius: 8px; font-size: 12.5px;
  background: #FCEFED; color: #A93D2F; border: 1px solid #F6D8D3;
}
.login-submit { width: 100%; height: 44px; margin-top: 18px; font-size: 15px; letter-spacing: 2px; }
.login-right .login-foot { margin-top: 18px; font-size: 11.5px; color: #9AA69F; line-height: 1.9; }
.login-right .login-foot b { color: #0E7A4A; font-weight: 600; }
