* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  color: #1f2126;
  background: #f5f6f8;
}

/* ===== 登录页 ===== */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #d93b30, #ff7a45);
}
.login-card {
  width: 380px;
  padding: 40px 36px 32px;
  background: #fff;
  border-radius: 16px;
  text-align: center;
}
.login-logo {
  width: 56px; height: 56px; margin: 0 auto 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #d93b30, #ff7a45);
  color: #fff; font-size: 26px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.login-title { font-size: 20px; font-weight: 600; }
.login-sub { margin-top: 6px; font-size: 13px; color: #9a9a9a; }
.field { margin-top: 20px; text-align: left; }
.field label { display: block; margin-bottom: 8px; font-size: 13px; color: #5c626b; }
.field input {
  width: 100%; height: 44px; padding: 0 14px;
  border: 1px solid #e3e5e9; border-radius: 10px; font-size: 14px; outline: none;
}
.field input:focus { border-color: #d93b30; }
.login-err { margin-top: 14px; min-height: 18px; font-size: 13px; color: #d93b30; }
.login-btn {
  width: 100%; height: 46px; margin-top: 6px;
  border: none; border-radius: 23px;
  background: linear-gradient(135deg, #ff7a45, #d93b30);
  color: #fff; font-size: 16px; cursor: pointer;
}
.login-btn:disabled { opacity: .6; }
.login-tip { margin-top: 18px; font-size: 12px; color: #9a9a9a; }

/* ===== 布局 ===== */
.layout { display: flex; min-height: 100vh; }
.side {
  width: 200px; flex-shrink: 0;
  background: #fff; border-right: 1px solid #ececf0;
  display: flex; flex-direction: column;
}
.side-brand {
  padding: 20px 20px 18px; font-size: 16px; font-weight: 600;
  display: flex; align-items: center; gap: 10px;
}
.side-logo {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, #d93b30, #ff7a45);
  color: #fff; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.side-menu { flex: 1; padding: 8px 10px; }
.menu-item {
  display: block; padding: 12px 14px; margin-bottom: 4px;
  border-radius: 10px; font-size: 14px; color: #5c626b; cursor: pointer;
  text-decoration: none;
}
.menu-item:hover { background: #f5f6f8; }
.menu-item.active { background: #fff1f0; color: #d93b30; font-weight: 600; }
.side-foot {
  padding: 16px 20px; border-top: 1px solid #ececf0;
  font-size: 12px; color: #9a9a9a;
  display: flex; justify-content: space-between;
}
.side-foot a { color: #d93b30; text-decoration: none; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 64px; padding: 0 24px; background: #fff;
  border-bottom: 1px solid #ececf0;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar h1 { margin: 0; font-size: 18px; font-weight: 600; }
.ghost-btn {
  padding: 8px 16px; border: 1px solid #d93b30; border-radius: 20px;
  color: #d93b30; font-size: 13px; text-decoration: none;
}
.content { flex: 1; padding: 24px; overflow: auto; }

/* ===== 通用 ===== */
.card { background: #fff; border-radius: 14px; padding: 20px; margin-bottom: 20px; }
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
input, select, textarea {
  height: 40px; padding: 0 12px; border: 1px solid #e3e5e9;
  border-radius: 8px; font-size: 14px; outline: none; background: #fff;
}
textarea { height: auto; padding: 10px 12px; min-height: 70px; }
input:focus, select:focus, textarea:focus { border-color: #d93b30; }
.btn {
  height: 40px; padding: 0 20px; border: 1px solid #e3e5e9;
  border-radius: 20px; background: #fff; font-size: 14px; cursor: pointer;
}
.btn.primary { background: #d93b30; border-color: #d93b30; color: #fff; }
.btn.danger { color: #d93b30; border-color: #f3c2be; }
.btn.small { height: 32px; padding: 0 14px; font-size: 13px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 12px 10px; text-align: left; border-bottom: 1px solid #f0f1f3; }
th { color: #5c626b; font-weight: 500; background: #fafbfc; }
td .ops a { margin-right: 10px; color: #d93b30; cursor: pointer; text-decoration: none; }
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  font-size: 12px; background: #f0f1f3; color: #5c626b;
}
.tag.new { background: #fff1f0; color: #d93b30; }
.tag.rec { background: #fff7e6; color: #b26a00; }

.stats { display: flex; gap: 16px; flex-wrap: wrap; }
.stat {
  flex: 1; min-width: 150px; background: #fff; border-radius: 14px; padding: 22px;
}
.stat-num { font-size: 28px; font-weight: 600; color: #d93b30; }
.stat-label { margin-top: 6px; font-size: 13px; color: #5c626b; }

/* ===== 弹窗 ===== */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100; }
.modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 560px; max-width: 92vw; max-height: 86vh; overflow: auto;
  background: #fff; border-radius: 16px; z-index: 101;
}
.modal-head {
  padding: 18px 22px; border-bottom: 1px solid #ececf0;
  display: flex; justify-content: space-between; font-size: 16px; font-weight: 600;
}
.modal-head a { color: #9a9a9a; text-decoration: none; }
.modal-body { padding: 20px 22px; }
.modal-foot { padding: 14px 22px 20px; display: flex; justify-content: flex-end; gap: 12px; }
.form-item { margin-bottom: 16px; }
.form-item label { display: block; margin-bottom: 8px; font-size: 13px; color: #5c626b; }
.form-item input, .form-item select, .form-item textarea { width: 100%; }
.form-grid { display: flex; gap: 12px; }
.form-grid > div { flex: 1; }
.upload-line { display: flex; gap: 10px; align-items: center; }
.upload-line input[type=file] { flex: 1; height: auto; padding: 8px; border: none; }
.hint { font-size: 12px; color: #9a9a9a; margin-top: 6px; }
.empty { padding: 40px; text-align: center; color: #9a9a9a; font-size: 13px; }
