/* ============================================================
   网络报名后台（老师端）样式
   ------------------------------------------------------------
   复用 /assets/app.css 的变量与基础组件，这里只补后台独有的：
   登录卡、赛事卡片、tab、单位行、抽屉、设置表单。
   桌面宽屏自动两栏，手机单列。
   ============================================================ */

.hidden { display: none !important; }
.boot { padding: 60px 20px; text-align: center; color: var(--text-3); font-size: 14px; }

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center;
  padding: 24px 16px; background:
    radial-gradient(1200px 600px at 50% -10%, #FFEDE5 0%, transparent 60%), var(--bg);
}
.login {
  width: 100%; max-width: 380px; background: var(--surface);
  border-radius: 18px; padding: 26px 22px 22px; box-shadow: var(--sh-3);
}
.login__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.login__mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(145deg, #F26A44, #E8552D 60%, #D14520);
  color: #fff; font-weight: 700; font-size: 18px;
}
.login__title { font-size: 17px; font-weight: 700; }
.login__sub { font-size: 12px; color: var(--text-3); }
.login__switch { text-align: center; font-size: 13px; color: var(--text-2); margin-top: 14px; }
.login__switch a { cursor: pointer; font-weight: 600; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 600; }
.input, .select, .textarea {
  width: 100%; padding: 11px 12px; font-size: 16px; font-family: inherit;
  border: 1px solid var(--border-strong); border-radius: 10px; background: #fff;
  color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(232, 85, 45, .12);
}
.input--sm { padding: 7px 10px; font-size: 14px; border-radius: 8px; }
.hint { font-size: 12px; color: var(--text-3); margin-top: 6px; line-height: 1.6; }
.err-text { font-size: 13px; color: var(--red); margin-top: 10px; min-height: 18px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; min-height: 42px; font-size: 14.5px; font-weight: 600;
  border-radius: 10px; border: 1px solid var(--border-strong); background: #fff;
  color: var(--text); cursor: pointer; text-decoration: none; font-family: inherit;
  transition: transform .08s, background .15s, border-color .15s;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-600); }
.btn--block { width: 100%; }
.btn--ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn--sm { padding: 6px 11px; min-height: 32px; font-size: 13px; border-radius: 8px; }
.btn--danger { color: var(--red); border-color: #F3C9D1; background: #fff; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- 顶栏（后台版） ---------- */
.mtop {
  position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
}
.mtop__back {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  border: 1px solid var(--border); background: #fff; cursor: pointer; font-size: 16px; color: var(--text-2);
  flex: none;
}
.mtop__title { font-size: 15px; font-weight: 700; line-height: 1.25; }
.mtop__sub { font-size: 11.5px; color: var(--text-3); }
.mtop__right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--surface-3);
  display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--text-2);
}

/* ---------- 通用卡片 ---------- */
.pg { max-width: 900px; margin: 0 auto; padding: 14px 14px 90px; }
.sec { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.sec__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sec__title { font-size: 14.5px; font-weight: 700; }
.sec__desc { font-size: 12.5px; color: var(--text-3); margin-top: 2px; line-height: 1.6; }
.sec__right { margin-left: auto; }

/* ---------- 赛事卡片 ---------- */
.meet {
  display: flex; align-items: center; gap: 12px; padding: 14px 15px; background: #fff;
  border: 1px solid var(--border); border-radius: 14px; margin-bottom: 10px; cursor: pointer;
  transition: box-shadow .15s, border-color .15s, transform .08s;
}
.meet:hover { border-color: #F0C4B6; box-shadow: var(--sh-2); }
.meet:active { transform: scale(.995); }
.meet__icon {
  width: 42px; height: 42px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-size: 19px; font-weight: 700;
}
.meet__name { font-size: 15px; font-weight: 700; line-height: 1.3; }
.meet__meta { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.meet__arrow { margin-left: auto; color: var(--text-3); font-size: 18px; }

/* ---------- 统计条 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 8px; text-align: center;
}
.stat__n { font-size: 19px; font-weight: 700; line-height: 1.2; }
.stat__l { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.stat--brand .stat__n { color: var(--brand); }
.stat--green .stat__n { color: var(--green); }
.stat--amber .stat__n { color: var(--amber); }
.stat--red .stat__n { color: var(--red); }

/* 进度条 */
.bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; display: flex; }
.bar > i { display: block; height: 100%; }

/* ---------- tab ---------- */
.tabs {
  display: flex; gap: 4px; background: #fff; border: 1px solid var(--border);
  border-radius: 12px; padding: 4px; margin-bottom: 12px; overflow-x: auto;
  position: sticky; top: 55px; z-index: 20;
}
.tab {
  flex: 1; min-width: 68px; text-align: center; padding: 8px 6px; font-size: 13.5px;
  border-radius: 9px; color: var(--text-2); cursor: pointer; white-space: nowrap; font-weight: 600;
}
.tab.is-on { background: var(--brand); color: #fff; }
.tab__dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--red);
  margin-left: 4px; vertical-align: middle;
}

/* ---------- 单位列表 ---------- */
.unit {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px;
  border: 1px solid var(--border); background: #fff; margin-bottom: 8px;
}
.unit__main { min-width: 0; flex: 1; }
.unit__name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.unit__meta { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.unit__right { display: flex; align-items: center; gap: 6px; flex: none; }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11.5px;
  font-weight: 600; line-height: 1.6; white-space: nowrap;
}
.badge--gray { background: var(--surface-3); color: var(--text-2); }
.badge--amber { background: var(--amber-soft); color: var(--amber); }
.badge--green { background: var(--green-soft); color: var(--green); }
.badge--red { background: var(--red-soft); color: var(--red); }
.badge--blue { background: var(--blue-soft); color: var(--blue); }

.warn-dot {
  display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 99px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
}

/* ---------- 抽屉 ---------- */
.mask {
  position: fixed; inset: 0; background: rgba(19, 26, 44, .42); z-index: 60;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.mask.is-on { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; background: #fff;
  border-radius: 18px 18px 0 0; max-height: 88vh; overflow: auto;
  transform: translateY(102%); transition: transform .24s cubic-bezier(.3, .9, .3, 1);
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 30px rgba(19, 26, 44, .16);
}
.sheet.is-on { transform: translateY(0); }
.sheet__grab { width: 38px; height: 4px; border-radius: 99px; background: var(--border-strong); margin: 6px auto 12px; }
.sheet__title { font-size: 16px; font-weight: 700; margin-bottom: 3px; }
.sheet__sub { font-size: 12.5px; color: var(--text-3); margin-bottom: 14px; }

@media (min-width: 720px) {
  .sheet { left: 50%; right: auto; width: 560px; transform: translate(-50%, 102%); border-radius: 18px; bottom: 24px; }
  .sheet.is-on { transform: translate(-50%, 0); }
  .stats { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 运动员表 ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; font-weight: 600; color: var(--text-3); font-size: 11.5px;
  padding: 6px 6px; border-bottom: 1px solid var(--border);
}
.tbl td { padding: 7px 6px; border-bottom: 1px solid var(--surface-3); vertical-align: top; }
.tbl tr:last-child td { border-bottom: none; }
.ev-tag {
  display: inline-block; font-size: 11.5px; padding: 1px 6px; border-radius: 5px;
  background: var(--surface-3); color: var(--text-2); margin: 1px 3px 1px 0;
}

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 34px 16px; color: var(--text-3); font-size: 13.5px; }
.empty__icon { font-size: 30px; opacity: .5; margin-bottom: 8px; }

/* ---------- 提示条 ---------- */
.note {
  font-size: 12.5px; line-height: 1.7; padding: 10px 12px; border-radius: 10px;
  background: var(--blue-soft); color: #1F4FA8;
}
.note--warn { background: var(--amber-soft); color: #8A5A00; }
.note--err { background: var(--red-soft); color: #A32139; }
.note code { background: rgba(255,255,255,.7); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* ---------- 复选行 ---------- */
.check-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--surface-3);
}
.check-row:last-child { border-bottom: none; }
.check-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }

/* ---------- 二维码网格 ---------- */
.qr-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .qr-grid { grid-template-columns: repeat(3, 1fr); } }
.qr-card { border: 1px solid var(--border); border-radius: 12px; padding: 10px; text-align: center; }
.qr-card__name { font-size: 13px; font-weight: 700; }
.qr-card__group { font-size: 11px; color: var(--text-3); margin-bottom: 4px; }
.qr-card img { width: 100%; max-width: 120px; height: auto; display: block; margin: 0 auto; }
.qr-card__code { font-size: 12px; margin-top: 4px; }
.qr-card__code b { font-size: 15px; color: var(--brand); letter-spacing: .5px; }

.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 12px); z-index: 90;
  background: rgba(19, 26, 44, .92); color: #fff; font-size: 13.5px; padding: 10px 16px;
  border-radius: 10px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  max-width: 84vw; text-align: center; line-height: 1.5;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast--err { background: #B32438; }
.toast--ok { background: #0E8A45; }
