/* ============ 通用 ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; font-size: 14px; color: #333; background: #f0f2f5; }
a { text-decoration: none; }
input, select, textarea { padding: 7px 10px; border: 1px solid #d0d5dd; border-radius: 6px; font-size: 13px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: #2d6cdf; }
label { display: block; margin: 10px 0 4px; font-weight: 600; font-size: 13px; }
.btn { padding: 7px 14px; border: 1px solid #d0d5dd; border-radius: 6px; background: #fff; cursor: pointer; font-size: 13px; }
.btn:hover { filter: brightness(.96); }
.btn-primary { background: #2d6cdf; border-color: #2d6cdf; color: #fff; }
.btn-ok { background: #16a34a; border-color: #16a34a; color: #fff; }
.btn-danger { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn-sm { padding: 3px 9px; font-size: 12px; margin: 0 2px; }
.btn-block { display: block; width: 100%; margin-top: 14px; padding: 11px; font-size: 15px; }
.muted { color: #98a2b3; font-size: 12px; }
.ok { color: #16a34a; }
.warn-text { color: #d97706; }
.empty { color: #98a2b3; text-align: center; padding: 18px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; background: #eef2f7; font-size: 12px; margin: 1px 2px; }
.badge-ok { background: #dcfce7; color: #15803d; }
.badge-warn { background: #fef3c7; color: #b45309; }
.badge-gray { background: #e5e7eb; color: #6b7280; }
.badge-add { background: #dbeafe; color: #1d4ed8; }
.badge-ret { background: #fee2e2; color: #b91c1c; }
.dot { display: inline-block; width: 8px; height: 8px; background: #dc2626; border-radius: 50%; margin-left: 4px; }
.alert { padding: 10px 14px; border-radius: 8px; margin-top: 10px; font-size: 13px; }
.alert-err { background: #fee2e2; color: #b91c1c; }
.alert-ok { background: #dcfce7; color: #15803d; }
.link-light { color: #a9c4e0; font-size: 13px; }

/* ============ 后台布局 ============ */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #1e3a5f; color: #fff; display: flex; flex-direction: column; flex-shrink: 0; }
.brand { font-size: 16px; font-weight: 700; padding: 20px 16px 2px; }
.brand-sub { font-size: 12px; color: #7fa3c8; padding: 0 16px 14px; border-bottom: 1px solid #2d5078; }
.nav-item { padding: 11px 18px; cursor: pointer; font-size: 14px; border-left: 3px solid transparent; }
.nav-item:hover { background: #2a4d75; }
.nav-item.active { background: #2d5a8b; border-left-color: #4da3ff; }
.sidebar-foot { margin-top: auto; padding: 16px; }
.main { flex: 1; min-width: 0; }
.topbar { background: #fff; padding: 14px 22px; font-size: 16px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.topbar-right { font-size: 12px; color: #98a2b3; font-weight: 400; }
#content { padding: 20px 22px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { background: #fff; border-radius: 10px; padding: 18px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.stat-num { font-size: 22px; font-weight: 700; }
.stat-card.warn .stat-num { color: #d97706; }
.stat-card.ok .stat-num { color: #16a34a; }
.stat-label { color: #98a2b3; font-size: 12px; margin-top: 4px; }

.panel { background: #fff; border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.panel-title { font-weight: 700; margin-bottom: 10px; }
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.filter-bar { background: #fff; border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

.tbl { width: 100%; border-collapse: collapse; background: #fff; }
.tbl th { background: #f7f9fc; text-align: left; padding: 9px 10px; font-size: 12px; color: #667085; border-bottom: 2px solid #eef2f7; white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid #f0f2f5; font-size: 13px; }
.tbl tr:hover td { background: #fafbfd; }
.row-disabled td { color: #b6bdc9; }
.row-total td { font-weight: 700; background: #f7f9fc; }
.app-row { padding: 10px 4px; border-bottom: 1px solid #f0f2f5; line-height: 1.9; }
.log-line { padding: 6px 2px; border-bottom: 1px dashed #eef2f7; font-size: 13px; }

.modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal { background: #fff; border-radius: 12px; padding: 22px; width: 100%; max-width: 440px; max-height: 88vh; overflow: auto; }
.modal-wide { max-width: 860px; }
.modal h3 { margin-bottom: 10px; }
.modal input, .modal select { width: 100%; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* ============ 班委手机端 ============ */
.m-body { background: #f0f2f5; }
.m-container { max-width: 480px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: #f0f2f5; }
.m-header { position: sticky; top: 0; z-index: 10; background: #1e3a5f; color: #fff; padding: 14px 16px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.m-user { font-size: 12px; font-weight: 400; color: #a9c4e0; }
#mContent { flex: 1; padding: 14px; padding-bottom: 20px; }
.m-tabbar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid #e5e7eb; display: flex; }
.m-tab { flex: 1; text-align: center; padding: 8px 0 6px; font-size: 11px; color: #98a2b3; cursor: pointer; }
.m-tab.active { color: #2d6cdf; font-weight: 700; }
.m-card { background: #fff; border-radius: 12px; padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.m-card h3 { margin-bottom: 10px; }
.m-card input, .m-card select { width: 100%; }
.m-stat-row { display: flex; justify-content: space-between; text-align: center; background: #f7f9fc; border-radius: 10px; padding: 14px 8px; margin: 10px 0; }
.m-money { font-size: 18px; font-weight: 700; margin-top: 4px; }
.tbl-m th, .tbl-m td { padding: 7px 6px; font-size: 12px; }

@media (max-width: 760px) {
  .admin-layout { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 8px; }
  .brand { padding: 6px 10px; }
  .brand-sub, .sidebar-foot { display: none; }
  .nav-item { padding: 8px 10px; font-size: 13px; border-left: none; border-radius: 6px; }
  .topbar-right { display: none; }
  #content { padding: 12px; overflow-x: auto; }
}
