/* 后台样式 —— 浅色 Ant Design 风格 */
* { box-sizing: border-box; }
body {
  margin: 0; background: #f5f5f5; color: #262626;
  font: 14px/1.5715 -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}
a { color: #1677ff; text-decoration: none; }
a:hover { color: #4096ff; }

/* ---------- 顶栏 ---------- */
.topbar {
  height: 56px; background: #fff; border-bottom: 1px solid #f0f0f0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; color: #262626; }
.brand .mark {
  width: 24px; height: 24px; flex: 0 0 24px; border-radius: 5px; background: #1677ff;
  position: relative;
}
.brand .mark::after {
  content: ""; position: absolute; inset: 6px; background: #fff;
  transform: rotate(45deg); border-radius: 1px;
}
.topbar .who { color: #8c8c8c; font-size: 14px; display: flex; align-items: center; gap: 14px; }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: calc(100vh - 56px); align-items: stretch; }
.sider {
  width: 196px; flex: 0 0 196px; background: #fff; border-right: 1px solid #f0f0f0;
  padding: 12px 0; position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto;
}
.menu, .submenu { list-style: none; margin: 0; padding: 0; }
.menu > li > a, .menu > li > .grp {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px 0 24px;
  color: #262626; cursor: pointer; user-select: none; transition: background .15s, color .15s;
}
.menu > li > a:hover, .menu > li > .grp:hover { color: #1677ff; }
.menu .ico { width: 16px; flex: 0 0 16px; text-align: center; color: #8c8c8c; font-style: normal; font-size: 14px; }
.menu > li > a.on { background: #e6f4ff; color: #1677ff; font-weight: 500; }
.menu > li > a.on .ico { color: #1677ff; }
.grp .caret { margin-left: auto; color: #bfbfbf; font-size: 12px; transition: transform .2s; }
.submenu li a {
  display: block; height: 40px; line-height: 40px; padding: 0 16px 0 50px;
  color: #595959; transition: background .15s, color .15s;
}
.submenu li a:hover { color: #1677ff; }
.submenu li a.on { background: #e6f4ff; color: #1677ff; font-weight: 500; }

.main { flex: 1; min-width: 0; padding: 24px; }
.page-title { font-size: 20px; font-weight: 500; margin: 0 0 20px; color: #262626; }
.card { background: #fff; border: 1px solid #f0f0f0; border-radius: 8px; padding: 24px; }

/* ---------- 数据大盘 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 24px; }
.stat { background: #fff; border: 1px solid #f0f0f0; border-radius: 8px; padding: 20px 24px; }
.stat .k { color: #8c8c8c; font-size: 14px; margin-bottom: 10px; }
.stat .v { font-size: 30px; line-height: 1.2; color: #262626; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 14px; color: #8c8c8c; margin-left: 4px; }

/* ---------- 表单控件 ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
input[type=text], input[type=password], input[type=date], input[type=tel], select, textarea {
  height: 32px; padding: 4px 11px; border: 1px solid #d9d9d9; border-radius: 6px;
  font-size: 14px; color: #262626; background: #fff; transition: .2s; font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: 0; border-color: #4096ff; box-shadow: 0 0 0 2px rgba(5,145,255,.1);
}
input[readonly] { background: #f5f5f5; }
.btn {
  height: 32px; padding: 0 15px; border: 1px solid #d9d9d9; border-radius: 6px;
  background: #fff; color: #262626; cursor: pointer; font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px; transition: .2s; font-family: inherit;
}
.btn:hover { color: #4096ff; border-color: #4096ff; }
.btn-primary { background: #1677ff; border-color: #1677ff; color: #fff; }
.btn-primary:hover { background: #4096ff; border-color: #4096ff; color: #fff; }
.btn-link { border: 0; background: none; color: #1677ff; padding: 0 4px; height: auto; }
.radio-row { display: flex; align-items: center; gap: 20px; height: 32px; }
.radio-row label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }

/* ---------- 表格 ---------- */
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th {
  background: #fafafa; text-align: left; font-weight: 500; color: #262626;
  padding: 12px 10px; border-bottom: 1px solid #f0f0f0; white-space: nowrap;
}
table.grid td { padding: 10px; border-bottom: 1px solid #f0f0f0; }
table.grid tbody tr:hover { background: #fafafa; }
table.grid .photo { width: 44px; height: 56px; object-fit: cover; border-radius: 4px; border: 1px solid #f0f0f0; }
.empty { text-align: center; color: #bfbfbf; padding: 48px 0; }
.ops { white-space: nowrap; }
.tag {
  display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 12px;
  border: 1px solid; line-height: 20px;
}
.tag-0 { color: #d46b08; background: #fff7e6; border-color: #ffd591; }  /* 未处理 */
.tag-1 { color: #0958d9; background: #e6f4ff; border-color: #91caff; }  /* 已联系 */
.tag-2 { color: #389e0d; background: #f6ffed; border-color: #b7eb8f; }  /* 已报名 */

/* ---------- 分页 ---------- */
.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.pager .total { color: #595959; margin-right: auto; }
.pager a, .pager span.cur, .pager span.gap {
  min-width: 32px; height: 32px; padding: 0 6px; border: 1px solid #d9d9d9; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center; color: #262626; background: #fff;
}
.pager span.cur { border-color: #1677ff; color: #1677ff; }
.pager span.gap { border: 0; }
.pager a:hover { border-color: #1677ff; color: #1677ff; }
.pager .disabled { color: #bfbfbf; background: #f5f5f5; }

/* ---------- 编辑表单 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px 32px; max-width: 900px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { color: #262626; }
.field label i { color: #ff4d4f; font-style: normal; margin-right: 4px; }
.field .hint { color: #8c8c8c; font-size: 12px; }
.form-actions { margin-top: 28px; padding-top: 20px; border-top: 1px solid #f0f0f0; display: flex; gap: 12px; }
.section-title { font-size: 16px; font-weight: 500; margin: 0 0 20px; }

.uploader { display: flex; align-items: flex-start; gap: 16px; }
.preview {
  width: 100px; height: 130px; border: 1px dashed #d9d9d9; border-radius: 6px; background: #fafafa;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  color: #bfbfbf; font-size: 12px; text-align: center;
}
.preview img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 提示 ---------- */
.alert { padding: 8px 15px; border-radius: 6px; margin-bottom: 16px; }
.alert-ok { background: #f6ffed; border: 1px solid #b7eb8f; color: #389e0d; }
.alert-err { background: #fff2f0; border: 1px solid #ffccc7; color: #cf1322; }

/* ---------- 登录 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #f5f5f5; padding: 20px; }
.login-box { width: 368px; }
.login-head { text-align: center; margin-bottom: 32px; }
.login-head .brand { justify-content: center; margin-bottom: 16px; font-size: 20px; }
.login-head p { color: #8c8c8c; margin: 0; font-size: 14px; }
.login-box input[type=text], .login-box input[type=password] { width: 100%; height: 40px; }
.login-box .btn { width: 100%; height: 40px; justify-content: center; font-size: 16px; margin-top: 8px; }
.login-box .field { margin-bottom: 20px; }

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .form-grid { grid-template-columns: 1fr; }
}

/* ---------- 弹出层 ---------- */
.modal-mask{position:fixed;inset:0;background:rgba(0,0,0,.45);display:flex;align-items:flex-start;
  justify-content:center;z-index:100;padding:80px 16px 40px;overflow:auto;}
.modal-mask[hidden]{display:none !important;}
.modal{background:#fff;border-radius:4px;width:100%;max-width:620px;position:relative;
  box-shadow:0 6px 24px rgba(0,0,0,.15);padding:28px 32px 26px;}
.modal .x{position:absolute;top:16px;right:18px;border:0;background:none;font-size:22px;line-height:1;
  color:#bfbfbf;cursor:pointer;padding:2px 4px;}
.modal .x:hover{color:#595959;}
.modal-hd{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:22px;padding-right:28px;}
.modal-hd .t{font-size:22px;font-weight:600;color:#262626;}
.modal-hd .tpl{font-size:18px;color:#1677ff;white-space:nowrap;}
.modal-hd .tpl:hover{color:#4096ff;}
.pick-label{font-size:15px;color:#262626;margin-bottom:12px;}

/* 拖拽/点击上传区 */
.dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;
  min-height:200px;border:1px dashed #d9d9d9;border-radius:2px;cursor:pointer;
  transition:border-color .2s,background .2s;padding:20px;text-align:center;}
.dropzone:hover,.dropzone.over{border-color:#1677ff;background:#fafcff;}
.dropzone .plus{font-size:34px;line-height:1;color:#8c8c8c;font-weight:300;}
.dropzone:hover .plus,.dropzone.over .plus{color:#1677ff;}
.dropzone .dz-tip{color:#8c8c8c;font-size:15px;}
.dropzone.busy{cursor:default;border-color:#1677ff;background:#fafcff;}
.dropzone.busy .plus{display:none;}

.ow{display:inline-flex;align-items:center;gap:6px;cursor:pointer;margin-top:16px;color:#595959;font-size:14px;}
.note{margin-top:14px;color:#595959;font-size:14px;}
.note b{color:#ff4d4f;font-weight:400;}

.imp-res{margin-bottom:16px;}
.imp-res .err{margin:8px 0 0;padding-left:20px;color:#cf1322;font-size:13px;line-height:1.8;}

/* 宽表格自身横向滚动，避免撑宽卡片把工具栏按钮挤出视口 */
.table-wrap{overflow-x:auto;}
