/* 恒沃体育 · 管理后台样式
   后台与官网是两套视觉语言：官网面向家长（暖米+深海军），
   后台面向内部同事长时间操作，用中性灰底+高对比表格，降低色彩干扰。 */
:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --line: #e2e4e9;
  --line-soft: #eef0f3;
  --ink: #1c222b;
  --ink-2: #4a5262;
  --ink-3: #7c8494;
  --navy: #16324f;
  --brick: #a03c31;
  --ok: #2e6b45;
  --warn: #8a6a24;
  --radius: 6px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------------- 登录页 ---------------- */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(160deg, #16324f 0%, #0f2237 55%, #1c1f26 100%);
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 8px;
  padding: 34px 30px 30px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.28);
}
.login-card h1 { font-size: 19px; margin: 0 0 4px; letter-spacing: -0.01em; }
.login-card p.sub { font-size: 12.5px; color: var(--ink-3); margin: 0 0 22px; }
.login-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.login-logo img { height: 30px; width: auto; }
.login-logo span { font-size: 11px; letter-spacing: 0.18em; color: var(--ink-3); text-transform: uppercase; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; }
.field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.field input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(22,50,79,0.1); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .16s, border-color .16s, opacity .16s;
}
.btn:hover { background: #f7f8fa; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn--primary:hover { background: #1d3f63; }
.btn--sm { padding: 5px 11px; font-size: 12.5px; }
.btn--full { width: 100%; padding: 11px; font-size: 14px; }
.err {
  font-size: 12.5px;
  color: var(--brick);
  min-height: 18px;
  margin: 8px 0 0;
}

/* ---------------- 框架 ---------------- */
.topbar {
  height: 54px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar__brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14px; }
.topbar__brand img { height: 24px; width: auto; }
.topbar__brand small {
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.topbar__nav { display: flex; gap: 4px; margin-left: 14px; }
.topbar__nav a {
  padding: 6px 11px;
  border-radius: 5px;
  font-size: 13px;
  color: var(--ink-2);
}
.topbar__nav a:hover { background: var(--bg); text-decoration: none; }
.topbar__nav a.is-active { background: rgba(22,50,79,0.08); color: var(--navy); font-weight: 600; }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--ink-3); }

.wrap { max-width: 1240px; margin: 0 auto; padding: 22px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 21px; margin: 0; letter-spacing: -0.01em; }
.page-head p { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-3); }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.toolbar input[type=search], .toolbar input[type=text], .toolbar select {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  min-width: 180px;
  outline: none;
}
.toolbar input:focus, .toolbar select:focus { border-color: var(--navy); }
.toolbar .grow { flex: 1; }

/* ---------------- 表格 ---------------- */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  text-align: left;
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--ink-3);
  text-transform: uppercase;
  padding: 10px 14px;
  background: #fafbfc;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.tbl td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
table.tbl tbody tr:hover { background: #fafbfc; }
table.tbl td.num { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid transparent;
}
.badge--new { background: #fdf1e6; border-color: #f2ddc4; color: #8a5a1c; }
.badge--contacted { background: #e8f0f7; border-color: #cfe0ef; color: #234f78; }
.badge--closed { background: #eef0f3; border-color: #e0e3e8; color: var(--ink-3); }
.empty, .loading { padding: 46px 20px; text-align: center; color: var(--ink-3); font-size: 13px; }
.pager { display: flex; gap: 8px; align-items: center; padding: 13px 16px; justify-content: flex-end; font-size: 12.5px; color: var(--ink-3); }

/* ---------------- 详情抽屉 ---------------- */
.drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 22, 32, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  z-index: 40;
}
.drawer-mask.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(560px, 100%);
  background: #fff;
  box-shadow: -18px 0 48px rgba(15,22,32,0.18);
  transform: translateX(100%);
  transition: transform .24s cubic-bezier(.22,.61,.36,1);
  z-index: 41;
  display: flex;
  flex-direction: column;
}
.drawer.is-open { transform: translateX(0); }
.drawer__head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.drawer__head h2 { font-size: 16px; margin: 0; }
.drawer__body { flex: 1; overflow-y: auto; padding: 18px 22px 26px; }
.drawer__close {
  margin-left: auto;
  background: none;
  border: 0;
  font-size: 20px;
  line-height: 1;
  color: var(--ink-3);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.drawer__close:hover { background: var(--bg); color: var(--ink); }
.kv-list { display: grid; gap: 0; border-top: 1px solid var(--line-soft); }
.kv-list .row {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
}
.kv-list .row dt { color: var(--ink-3); font-size: 12.5px; }
.kv-list .row dd { margin: 0; color: var(--ink); word-break: break-word; white-space: pre-wrap; }

/* ---------------- 表单块 ---------------- */
.section-title {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 26px 0 10px;
  font-weight: 600;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  outline: none;
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(22,50,79,0.08);
}
.form-grid textarea { resize: vertical; min-height: 70px; }
.hintline { font-size: 12px; color: var(--ink-3); margin-top: 6px; }

/* ---------------- 提示条 ---------------- */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(14px);
  background: #1c222b;
  color: #fff;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 60;
  max-width: 90vw;
}
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.is-err { background: #8d3a2f; }

@media (max-width: 860px) {
  .topbar { padding: 0 14px; gap: 10px; }
  .topbar__nav { display: none; }
  .wrap { padding: 14px; }
  .form-grid { grid-template-columns: 1fr; }
  table.tbl th:nth-child(3), table.tbl td:nth-child(3) { display: none; }
}
