/* 带队工作台 · 后台样式
   设计取向：信息密度优先。带队老师在电脑前做的是核对与补录，
   一屏能看到的行数与字段，比留白重要。 */

:root {
  --ink: #1b2a24;
  --ink-2: #55635d;
  --ink-3: #8c9893;
  --line: #e8e4da;
  --bg: #f6f4ee;
  --card: #ffffff;
  --green: #1f7a5c;
  --green-2: #2a9670;
  --green-bg: #e8f5ee;
  --amber: #c9761a;
  --amber-bg: #fdf4e4;
  --red: #c0392b;
  --red-bg: #fbeceb;
  --blue: #2b6cb0;
  --radius: 10px;
  /* 与老师手机端共用一套阴影：纯黑阴影落在米白底上会发灰 */
  --sh-1: 0 1px 2px rgba(16, 44, 34, .05), 0 2px 10px rgba(16, 44, 34, .045);
  --sh-2: 0 2px 6px rgba(16, 44, 34, .06), 0 10px 28px rgba(16, 44, 34, .08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; }

/* ------------------------------------------------------------ 登录页 */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(247, 187, 74, .18) 0%, rgba(247, 187, 74, 0) 55%),
    linear-gradient(160deg, #0e3327 0%, #164b39 52%, #1b6349 100%);
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 10px;
  padding: 38px 34px 32px;
  box-shadow: 0 18px 46px rgba(14, 34, 27, 0.28);
}
.login-card h1 {
  font-size: 20px;
  margin: 0 0 4px;
  letter-spacing: 0.5px;
}
.login-card .ver {
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 26px;
  letter-spacing: 1px;
}
.login-card label {
  display: block;
  font-size: 12.5px;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.login-card input[type=text],
.login-card input[type=password] {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 16px;
  background: #fbfaf7;
  outline: none;
  font-family: inherit;
}
.login-card input:focus {
  border-color: var(--green-2);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(63, 138, 106, 0.12);
}
.login-card button { width: 100%; }
.login-tip {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.9;
}
.login-tip code {
  background: var(--green-bg);
  color: var(--green);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
}

/* ------------------------------------------------------------ 按钮 */

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border: none;
  border-radius: var(--radius);
  background: var(--green);
  color: #fff;
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  /* 按下缩一点点：这是全站最便宜的「手感」，一天点几十次也不会觉得吵 */
  transition: background .15s,
              transform var(--mo-fast, 140ms) var(--mo-ease, ease),
              box-shadow var(--mo-fast, 140ms) var(--mo-ease, ease);
}
button:active:not(:disabled), .btn:active { transform: scale(.975); }
button:hover, .btn:hover { background: var(--green-2); }
button:disabled { background: #b9c4c0; cursor: not-allowed; }
button.ghost {
  background: transparent;
  color: var(--green);
  border: 1px solid var(--line);
}
button.ghost:hover { background: var(--green-bg); }
button.sm { padding: 5px 12px; font-size: 12.5px; }
button.warn { background: var(--amber); }
button.warn:hover { background: #b8650a; }

/* ------------------------------------------------------------ 布局 */

.layout { display: flex; min-height: 100vh; }

.side {
  width: 208px;
  flex: 0 0 208px;
  background: #23352e;
  color: #cfe0d8;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.side .brand {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.side .brand b {
  display: block;
  font-size: 14.5px;
  color: #fff;
  letter-spacing: 0.5px;
}
.side .brand span {
  font-size: 11px;
  color: #8aa599;
  letter-spacing: 1.5px;
}
.side nav { padding: 12px 0; flex: 1; overflow-y: auto; }
.side nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 20px;
  color: #b8ccc3;
  font-size: 13px;
  border-left: 3px solid transparent;
}
.side nav a:hover { background: rgba(255,255,255,0.05); color: #fff; }
.side nav a.on {
  background: rgba(63,138,106,0.22);
  border-left-color: #5fb98e;
  color: #fff;
}
.side nav a .ico { width: 16px; text-align: center; opacity: .85; }
/* 侧栏图标跟着手指走一小步，切换页面时眼睛就知道落在哪一条上 */
.side nav a { transition: background var(--mo-fast, 140ms) var(--mo-ease, ease),
                          color var(--mo-fast, 140ms) var(--mo-ease, ease),
                          border-left-color var(--mo-fast, 140ms) var(--mo-ease, ease); }
.side nav a .ico { transition: transform var(--mo-base, 240ms) var(--mo-out, ease); }
.side nav a:hover .ico { transform: translate3d(2px, 0, 0); }
.side nav a.on .ico { transform: translate3d(2px, 0, 0); }
.side .me {
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: #8aa599;
}
.side .me b { display: block; color: #e6efe9; font-size: 13px; font-weight: 500; }
.side .me button {
  margin-top: 10px;
  width: 100%;
  background: rgba(255,255,255,0.08);
  font-size: 12px;
  padding: 6px;
}
.side .me button:hover { background: rgba(255,255,255,0.16); }

.main { flex: 1; min-width: 0; padding: 26px 30px 60px; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.page-head h2 {
  font-size: 19px;
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.page-head .sub {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 3px;
}

/* ------------------------------------------------------------ 卡片与统计 */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.card h3 {
  font-size: 14px;
  margin: 0 0 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card h3 .hint {
  font-size: 11.5px;
  color: var(--ink-3);
  font-weight: 400;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: transform var(--mo-base, 240ms) var(--mo-out, ease),
              box-shadow var(--mo-base, 240ms) var(--mo-out, ease);
}
.stat:hover {
  transform: translate3d(0, -2px, 0);
  box-shadow: 0 8px 20px rgba(20, 40, 32, .08);
}
.stat .n {
  font-size: 24px;
  font-weight: 600;
  color: var(--green);
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.stat .n.amber { color: var(--amber); }
.stat .n.red { color: var(--red); }
.stat .l { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* ------------------------------------------------------------ 表格 */

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left;
  font-weight: 500;
  color: var(--ink-3);
  font-size: 12px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: #fbfaf7;
}
td {
  padding: 10px;
  border-bottom: 1px solid #f0eee7;
  vertical-align: middle;
}
tbody tr:hover { background: #fbfaf7; }
tbody tr { transition: background var(--mo-fast, 140ms) var(--mo-ease, ease); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.mono { font-family: "SF Mono", Menlo, monospace; font-size: 12px; }

.tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 3px;
  font-size: 11.5px;
  background: var(--green-bg);
  color: var(--green);
  white-space: nowrap;
}
.tag.amber { background: var(--amber-bg); color: #a35c05; }
.tag.red { background: var(--red-bg); color: var(--red); }
.tag.gray { background: #eef0ee; color: var(--ink-3); }
.tag.blue { background: #e8f0f9; color: var(--blue); }

/* 营期阶段切换：长得和徽章一样，但点开能选四档。
 * 只有带 camp:write 的账号看到它，只读账号拿到的是纯标签。 */
select.stage-pick {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 3px 16px 3px 8px;
  border-radius: 3px;
  cursor: pointer;
  vertical-align: 3px;
  /* 右侧一个小下拉箭头，提示「这能点」；颜色随 tag 的字色 */
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='6'%3E%3Cpath d='M1 1l3 3 3-3' stroke='%23305a48' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 5px center;
}
select.stage-pick:hover { filter: brightness(.96); }

/* ------------------------------------------------------------ 清单 */

.check-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
}
.bar {
  flex: 1;
  height: 8px;
  background: #e9e6dd;
  border-radius: 4px;
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: 4px;
  transition: width .25s;
}
.bar > i.amber { background: var(--amber); }

.easy-miss {
  background: var(--amber-bg);
  border: 1px solid #f0dcb8;
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
  padding: 13px 16px;
  margin-bottom: 16px;
}
.easy-miss .t {
  font-size: 13px;
  font-weight: 600;
  color: #8a5408;
  margin-bottom: 7px;
}
.easy-miss ul { margin: 0; padding-left: 18px; }
.easy-miss li { font-size: 12.5px; color: #7a5a24; line-height: 1.9; }

.check-group { margin-bottom: 18px; }
.check-group .gh {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2px;
}
.check-group .gh b { font-size: 13.5px; }
.check-group .gh .cnt {
  font-size: 11.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.check-group .gh .bar { max-width: 150px; height: 5px; }

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 4px;
  cursor: pointer;
}
.check-item:hover { background: #fbfaf7; }
.check-item .box {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 1.5px solid #c3ccc7;
  border-radius: 4px;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
  transition: all .12s;
}
.check-item.done .box { background: var(--green); border-color: var(--green); }
.check-item.done .tt { color: var(--ink-3); text-decoration: line-through; }
.check-item .body { flex: 1; min-width: 0; }
.check-item .tt { font-size: 13px; }
.check-item .hint { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }
.check-item .meta {
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------ 话术 */

.script-layout { display: flex; gap: 16px; align-items: flex-start; }
.script-list {
  width: 260px;
  flex: 0 0 260px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.script-list .it {
  padding: 11px 14px;
  border-bottom: 1px solid #f2f0ea;
  cursor: pointer;
  font-size: 13px;
}
.script-list .it:hover { background: #fbfaf7; }
.script-list .it.on { background: var(--green-bg); border-left: 3px solid var(--green); }
.script-list .it .c { font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.script-pane { flex: 1; min-width: 0; }
.script-body {
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 13.5px;
  line-height: 2;
  white-space: pre-wrap;
  color: #2d3a36;
  min-height: 260px;
}
.vars { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.vars .v {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ink-3);
}
.vars input {
  width: 118px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12px;
  font-family: inherit;
}

/* ------------------------------------------------------------ 表单 */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px 18px;
}
.field label {
  display: block;
  font-size: 12px;
  color: var(--ink-2);
  margin-bottom: 5px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  background: #fbfaf7;
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--green-2);
  background: #fff;
}
.field .unit {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-left: 4px;
}

/* ------------------------------------------------------------ 提示 */

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(20px);
  background: #23352e;
  color: #fff;
  padding: 11px 22px;
  border-radius: 22px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: all .22s;
  z-index: 90;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #9c2d22; }

.empty {
  padding: 40px 0;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
}

.muted { color: var(--ink-3); }
.mono { font-family: "SF Mono", Menlo, monospace; }
.right { text-align: right; }
.mt12 { margin-top: 12px; }
.mb0 { margin-bottom: 0; }
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

@media (max-width: 900px) {
  .side { width: 62px; flex-basis: 62px; }
  .side .brand span, .side nav a span.lbl, .side .me b, .side .me span { display: none; }
  .side nav a { justify-content: center; padding: 12px 0; }
  .main { padding: 18px 16px 50px; }
  .script-layout { flex-direction: column; }
  .script-list { width: 100%; flex-basis: auto; }
}

/* ------------------------------------------------------------ 下拉与弹窗 */

.camp-select {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(22, 36, 31, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 80;
}
.modal {
  width: 100%;
  max-width: 780px;
  max-height: calc(100vh - 48px);
  background: #fff;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(14, 34, 27, 0.35);
}
.modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}
/* 标题长的时候「关闭」会被挤成竖排两个字，看起来像排版坏了 */
.modal-head button { white-space: nowrap; flex: 0 0 auto; }
.modal-head > div { min-width: 0; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot {
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}

.fgroup { margin-bottom: 20px; }
.fgroup:last-child { margin-bottom: 4px; }
.fgh {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--green);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
  letter-spacing: 0.4px;
}
.field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.field label .vis {
  font-size: 11px;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.field label .vis input { width: auto; margin: 0; }
.switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-2);
  padding: 8px 0;
}
.switch input { width: auto; }
/* .field label 是「两端对齐」的横排，开关本身也是 label，
   不单独覆盖的话复选框会被推到最左、说明文字被推到最右 */
.field label.switch {
  display: inline-flex;
  justify-content: flex-start;
  width: auto;
  margin: 0;
  padding: 8px 0;
}
.field label.switch input { width: auto; margin: 0 6px 0 0; }

/* 侧边栏营期切换：营期是全局上下文，放在导航上方，
   切换后所有页面跟着变，不必每页单独放一个下拉 */
.camp-pick { padding: 10px 12px 12px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.camp-pick select {
  width: 100%;
  padding: 7px 9px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.07);
  color: #e6efe9;
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
}
.camp-pick select option { color: #1f2b28; background: #fff; }

/* ------------------------------------------------------------ 维护类页面 */

/* 表格里的操作按钮：不做成实心按钮，避免一行里出现三个深色块抢视线 */
.row-actions { display: flex; gap: 6px; flex-wrap: nowrap; }
.row-actions button {
  padding: 4px 9px;
  font-size: 12px;
  white-space: nowrap;   /* 不让「编辑」被挤成竖排两个字 */
}

/* 导入名单的粘贴框。等宽字体，让逗号对齐，改起来不费眼 */
textarea.code {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fbfaf7;
  outline: none;
  font-family: "SF Mono", Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  min-height: 190px;
  resize: vertical;
}

.import-help {
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--ink-2);
  background: var(--green-bg);
  border-radius: 5px;
  padding: 12px 14px;
}
.import-help b { color: var(--green); }

/* 报名表弹窗：左边一个已经报到的人数，右边一句话说清这条链接干什么用。
   老师点开最想知道的是「现在收到几个人了」，所以数字给到 30px。 */.enroll-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: var(--green-bg);
  border-radius: 6px;
}
.enroll-hero .eh-num {
  flex: 0 0 auto;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}
.enroll-hero .eh-num span {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-2);
  margin-left: 3px;
}
.enroll-hero .eh-txt {
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink-2);
}

/* 家长要填哪些：先让老师自己看清，再决定要不要补一句说明 */
.enroll-what {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 5px;
  font-size: 12.5px;
  line-height: 1.95;
  color: var(--ink-2);
}
.enroll-what b {
  display: block;
  color: var(--ink);
  margin-bottom: 2px;
}
.enroll-what b:not(:first-child) { display: inline; }

/* 链接只有一行，别按导入框的高度铺满整张弹窗 */
#el-url {
  min-height: 0;
  height: 62px;
  padding-top: 9px;
  resize: none;
}

/* 侧边栏里的修改密码按钮：与退出登录并排，尺寸要更轻 */
.side .me #change-pwd {
  width: 100%;
  margin-bottom: 6px;
  border-color: rgba(255, 255, 255, 0.25);
  color: #cfe0d8;
}
.side .me #change-pwd:hover { background: rgba(255, 255, 255, 0.1); }

/* ------------------------------------------------------------ 清单自加项 */

/* 分组标题右侧的小加号。做成方块而不是文字按钮，
   是因为它要和进度条挤在同一行，宽一点就会把进度条压没 */
.check-group .gh .gh-add {
  padding: 0 8px;
  height: 24px;
  font-size: 13px;
  line-height: 1;
  border-color: var(--line);
  flex: 0 0 auto;
}

/* 自加项右侧的删除。刻意做小、做成灰字：
   它会和左侧的勾选框同处一行，做成红色的明显按钮容易误触 */
.check-item .item-del {
  padding: 0 7px;
  height: 22px;
  font-size: 12px;
  color: var(--ink-3);
  border-color: transparent;
  flex: 0 0 auto;
}
.check-item .item-del:hover { color: var(--red); border-color: var(--line); }

/* ------------------------------------------------------------ 影像 */

/* 上传区做成虚线框，与「已经传上去的东西」在视觉上分开 */
.media-upload {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fbfaf7;
}

.media-day {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--ink-2);
  margin: 14px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.media-cell {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #fbfaf7;
}
.media-cell img, .media-cell video {
  display: block;
  width: 100%;
  height: 110px;
  object-fit: cover;
  background: #eceae4;
}
.media-cell figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 6px;
  font-size: 11.5px;
  color: var(--ink-3);
  min-height: 30px;
}
.media-cell figcaption button { padding: 2px 8px; font-size: 11px; }

/* ------------------------------------------------------------ 手机端 */

/* 断点定在 720px：iPad 竖屏是 768，仍然按电脑排版走；
   手机横屏最大 926，但那是少数场景，竖屏才是老师实际用手机的样子。
   一句话概括这里的取舍：手机上一切以「拇指够得着」为先。 */
@media (max-width: 720px) {

  body { font-size: 15px; }

  /* ---- 顶部条：侧边栏变成一条横向导航 ---- */
  .layout { display: block; }

  .side {
    width: 100%;
    flex-basis: auto;
    height: auto;
    position: sticky;
    top: 0;
    z-index: 70;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 12px rgba(14, 34, 27, 0.22);
  }

  /* 品牌名在手机上让位给营期与导航，页面标题已经说明在哪一页 */
  .side .brand { display: none; }

  .camp-pick {
    order: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 6px;
    border-bottom: none;
  }
  .camp-pick select {
    flex: 1;
    width: auto;
    padding: 8px 10px;
    font-size: 14px;
  }

  .side .me {
    order: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px 8px;
    border-top: none;
  }
  .side .me b, .side .me span { display: none; }
  .side .me button,
  .side .me #change-pwd {
    width: auto;
    margin: 0;
    padding: 6px 12px;
    font-size: 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
  }
  .side .me #logout { margin-left: auto; }

  .side nav {
    order: 3;
    display: flex;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
  .side nav::-webkit-scrollbar { display: none; }
  .side nav a {
    flex: 0 0 auto;
    padding: 10px 13px;
    font-size: 12.5px;
    gap: 5px;
    border-left: none;
    border-bottom: 3px solid transparent;
  }
  /* 900px 断点把文字藏了只留图标，手机上反而要看文字——
     九个图标挤在一行、又都没有通用含义，认不出来 */
  .side nav a span.lbl { display: inline; }
  .side nav a.on {
    background: rgba(63, 138, 106, 0.16);
    border-left-color: transparent;
    border-bottom-color: #5fb98e;
  }

  .main { padding: 14px 12px 44px; }

  .page-head {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
  }
  .page-head h2 { font-size: 17px; }
  .page-head .sub { font-size: 12px; }
  /* 按钮排成两列等宽，比让它们按文字长短各占一行整齐得多；
     搜索框单独占满一行，因为它是这一屏最常用的入口 */
  .page-head .flex {
    width: 100%;
    gap: 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .page-head .flex > button { padding: 10px 8px; font-size: 13px; min-height: 42px; }
  .page-head .flex > input,
  .page-head .flex > #q { grid-column: 1 / -1; width: 100% !important; }
  /* 主操作（新建营期、新增学员）独占一行。它和旁边的次要按钮一样宽，
     会被当成同一层级的选项，而它其实是这一页唯一的「从这里开始」。 */
  .page-head .flex > #camp-new,
  .page-head .flex > #camper-new,
  .page-head .flex > #acc-new { grid-column: 1 / -1; }

  .card { padding: 12px; border-radius: 8px; }
  .card h3 { font-size: 13.5px; display: block; }
  .card h3 .hint { display: block; margin-top: 3px; }

  /* ---- 表格转卡片 ----
     十列的名单在手机上横滑是没法用的：滑到右边就不知道这一行是谁。
     改成每行一张卡，字段名从 data-label 取，左右两栏对照。
     只对加了 tbl-cards 的表这么做；其余表列少，横滑反而更紧凑。 */
  .tbl-cards,
  .tbl-cards tbody,
  .tbl-cards tr,
  .tbl-cards td { display: block; width: 100%; }

  .tbl-cards thead { display: none; }

  .tbl-cards tr {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 4px 12px;
    margin-bottom: 10px;
    background: #fff;
  }
  .tbl-cards tr:last-child { margin-bottom: 0; }

  .tbl-cards td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding: 7px 0;
    border-bottom: 1px dashed #ece7db;
    text-align: left;
    font-size: 14px;
    white-space: normal;
  }
  .tbl-cards td:last-child { border-bottom: none; }
  .tbl-cards td::before {
    content: attr(data-label);
    color: var(--ink-3);
    font-size: 12px;
    flex: 0 0 64px;
    padding-top: 2px;
  }
  .tbl-cards td > b,
  .tbl-cards td > span,
  .tbl-cards td > div { text-align: right; }
  .tbl-cards .row-actions { justify-content: flex-end; flex-wrap: wrap; }
  .tbl-cards .row-actions button { padding: 7px 12px; font-size: 13px; }

  table:not(.tbl-cards) { display: block; overflow-x: auto; white-space: nowrap; }
  table:not(.tbl-cards) thead,
  table:not(.tbl-cards) tbody { display: table; width: 100%; }

  /* ---- 弹窗铺满整屏 ----
     手机上一半屏幕的弹窗，键盘一弹出来就只剩按钮露在外面 */
  .modal-mask { padding: 0; align-items: stretch; }
  .modal {
    max-width: none !important;
    max-height: 100vh;
    height: 100%;
    border-radius: 0;
  }
  /* 内容不满一屏时，按钮组也要贴着屏幕底边，
     否则表单短一点，保存按钮就浮在半空，拇指够不着 */
  .modal-body { flex: 1 1 auto; }
  .modal-head {
    padding: 12px 14px;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
  }
  .modal-body { padding: 14px 14px 18px; }
  .modal-foot {
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    position: sticky;
    bottom: 0;
    background: #fff;
    z-index: 2;
  }
  .modal-foot button { min-height: 42px; }

  /* ---- 表单 ----
     iOS 上字号小于 16px 的输入框，点进去会自动把整页放大，
     然后要手动缩回去——这是手机上最招人烦的一处细节 */
  input, select, textarea {
    font-size: 16px !important;
    min-height: 42px;
  }
  textarea.code { min-height: 150px; font-size: 12px !important; }
  .form-grid { grid-template-columns: 1fr !important; }
  .field label { font-size: 13px; }

  /* ---- 清单 ---- */
  .check-group .gh { flex-wrap: wrap; gap: 8px; }
  .check-group .gh .bar { max-width: none; flex: 1; }
  .check-group .gh .gh-add { height: 30px; padding: 0 10px; }
  .check-item { padding: 12px 4px; gap: 10px; }
  .check-item .box { width: 24px; height: 24px; flex: 0 0 24px; }
  .check-item .tt { font-size: 14px; line-height: 1.6; }
  .check-item .hint { font-size: 12px; }
  .check-item .meta { font-size: 11px; text-align: right; }

  /* ---- 影像 ---- */
  .media-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .media-cell img, .media-cell video { height: 84px; }
  .media-cell figcaption { font-size: 11px; }
  .media-upload { padding: 10px; }
}


/* ------------------------------------------------------------ 住宿分房 */

.table-wrap { overflow-x: auto; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.tag.pink { background: #fdeef2; color: #a63f5f; }

.room-group { margin-bottom: 18px; }
.rgh {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  padding: 0 2px 8px;
}
.rgh .muted { font-weight: 400; font-size: 12px; }

.room-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.room-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 13px 10px; display: flex; flex-direction: column; gap: 9px;
}
/* 鼠标扫过房间时整块轻轻抬一下：分房是来回比对着看的，能跟住视线 */
.room-card {
  transition: transform var(--mo-base, 240ms) var(--mo-out, ease),
              box-shadow var(--mo-base, 240ms) var(--mo-out, ease);
}
.room-card:hover {
  transform: translate3d(0, -2px, 0);
  box-shadow: 0 10px 22px rgba(20, 40, 32, .09);
}
.room-card.over { border-color: #e8b4ae; background: #fffaf9; }
.room-card .rh { display: flex; align-items: center; gap: 8px; }
.room-card .rh b { font-size: 17px; letter-spacing: 0.5px; }
.room-card .rh .cnt { font-size: 12px; color: var(--ink-3); }
.room-card .rb { display: flex; flex-wrap: wrap; gap: 6px; min-height: 26px; }
.room-card .rf { display: flex; align-items: center; gap: 6px; border-top: 1px dashed var(--line); padding-top: 8px; }
.room-card .rf .muted { font-size: 11.5px; }
.room-card .rf button { padding: 2px 8px; font-size: 11.5px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--green-bg); color: var(--ink);
  border-radius: 999px; padding: 4px 6px 4px 11px; font-size: 12.5px;
}
.chip b {
  cursor: pointer; color: var(--ink-3); font-weight: 400;
  padding: 0 5px; border-radius: 999px;
}
.chip b:hover { background: #fff; color: var(--red); }
.chip i { font-style: normal; color: var(--ink-3); font-size: 11.5px; }
.chip.un { background: #f3f1ea; }
.chip.un b { color: var(--green); padding: 0 7px; }

/* ------------------------------------------------------------ 话术框架 */

.tl { display: flex; gap: 0; overflow-x: auto; padding: 2px 0 6px; }
.tl-step {
  flex: 1 0 168px; position: relative; padding: 0 12px 0 20px;
  border-left: 2px solid var(--line); cursor: pointer;
}
.tl-step:first-child { border-left: none; padding-left: 6px; }
.tl-step .tl-dot {
  position: absolute; left: -6px; top: 3px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--green-2);
}
.tl-step:first-child .tl-dot { left: -4px; }
.tl-step.empty .tl-dot { background: var(--line); }
.tl-step b { font-size: 13px; }
.tl-hint { font-size: 11.5px; color: var(--ink-3); line-height: 1.6; margin-top: 3px; }
.tl-cnt { font-size: 11.5px; color: var(--ink-2); margin-top: 5px; }
.tl-step.empty .tl-cnt { color: var(--amber); }
.tl-note {
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line);
  font-size: 12px; color: var(--ink-3); line-height: 1.8;
}

.script-head { display: flex; align-items: center; gap: 8px; }
.script-head h3 { margin: 0; }
.sg { margin-bottom: 12px; }
.sgh {
  font-size: 11.5px; color: var(--ink-3); letter-spacing: 0.5px;
  padding: 6px 12px 3px;
}
.sg-empty { padding: 6px 12px 10px; font-size: 12px; color: var(--ink-3); }
.script-list .it .c { margin-top: 3px; }

/* ------------------------------------------------------------ 宽表不折行 */

/* 名单加到十三列之后，在 1280 的笔记本上会出现「陈思 / 远」「巴 / 士」
   这种一个字一行的挤法，比横滑难读得多。这里让内容不许折行，
   列宽按内容撑开，放不下就由 .table-wrap 横向滚动。
   只对宽屏生效：窄屏走上面那套「表格转卡片」，卡片里该折就折。 */
@media (min-width: 900px) {
  .table-wrap > table.tbl-cards { min-width: 1080px; }
  /* 十三列挤在一起，左右内边距从 10 收到 7，一列省 6px，
     十三列刚好省出一栏按钮的宽度；内容一律不折行 */
  .table-wrap > table.tbl-cards th,
  .table-wrap > table.tbl-cards td {
    white-space: nowrap;
    padding-left: 7px;
    padding-right: 7px;
  }
  .table-wrap > table.tbl-cards .row-actions { flex-wrap: nowrap; gap: 4px; }
  .table-wrap > table.tbl-cards .row-actions button { padding: 4px 7px; }
  /* 身份证、座位、手机号都是等宽字，缩半号能再省出一截，读起来也不挤 */
  .table-wrap > table.tbl-cards td.mono { font-size: 11.5px; }
}

/* ------------------------------------------------------------ 分房补充 */

/* 排房要看年龄：同龄的孩子作息接近，大小孩同屋往往是小的被吵醒。
   年龄做成一个小胶囊，跟名字贴在一起，扫一眼就能按年龄挑人。 */
.chip i.age {
  font-size: 11px;
  color: var(--ink-2);
  background: rgba(31, 43, 40, .07);
  border-radius: 999px;
  padding: 1px 6px;
  font-variant-numeric: tabular-nums;
}

/* 女生房粉、男生房蓝。文字标签已经有了，再加一条边色：
   查房时整屏扫过去，颜色比两个汉字快得多。 */
.room-card.g-f { border-left: 3px solid #e6a8bc; }
.room-card.g-m { border-left: 3px solid #9dc0e0; }
.room-card.g-f .rh b { color: #a3546e; }
.room-card.g-m .rh b { color: #3e6c94; }

/* 新增房间：常用档位点一下就填，省得每次手输 */
.cap-quick {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 12px;
}
.cap-quick button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12.5px;
  font-family: inherit;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color .16s, border-color .16s, color .16s;
}
.cap-quick button:hover { border-color: #bccdc4; }
.cap-quick button.on {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

/* 随性别变色的预览框：选女生就粉，选男生就蓝。
   排错房是分房里最贵的错，让人在填的时候就看清楚。 */
.room-preview {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f7f5ef;
  display: flex;
  align-items: baseline;
  gap: 10px;
  transition: background-color .2s ease, border-color .2s ease;
}
.room-preview b { font-size: 18px; letter-spacing: .5px; }
.room-preview span { font-size: 12.5px; color: var(--ink-3); }
.room-preview.female { background: #fdf1f4; border-color: #f0c9d6; }
.room-preview.female b { color: #a3546e; }
.room-preview.male { background: #eef4fa; border-color: #cbdcea; }
.room-preview.male b { color: #3e6c94; }

/* ------------------------------------------------------------ 加载骨架 */

.sk-head i { display: block; border-radius: 4px; }
.sk-stat { height: 68px; border-radius: 6px; }
.sk-card { height: 210px; border-radius: 6px; margin-top: 16px; }

/* ------------------------------------------------------------ 联系人一行 */

/* 姓名、昵称、性别、电话收在同一行里读。
   分格摆虽然整齐，但填一位老师要在两行之间来回看，核对电话时容易串行。 */
.tch-list { display: flex; flex-direction: column; gap: 8px; }
.tch-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) minmax(0, 1.35fr) 74px minmax(0, 1.15fr);
  align-items: center;
  gap: 8px;
}
.tch-role {
  font-size: 12.5px;
  color: var(--ink-2);
  white-space: nowrap;
}
.tch-row input,
.tch-row select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  background: #fbfaf7;
  outline: none;
  transition: border-color var(--mo-fast, 140ms) var(--mo-ease, ease),
              background var(--mo-fast, 140ms) var(--mo-ease, ease);
}
.tch-row input:focus,
.tch-row select:focus {
  border-color: var(--green-2);
  background: #fff;
}
/* 电话前面挂个话筒：五个框摆在一起，只有这一格是号码 */
.tch-phone { position: relative; display: block; }
.tch-phone svg {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  pointer-events: none;
}
.tch-phone input { padding-left: 27px; }

@media (max-width: 700px) {
  .tch-row { grid-template-columns: 1fr 1fr; gap: 8px 10px; }
  .tch-role { grid-column: 1 / -1; }
  .tch-phone { grid-column: 1 / -1; }
}

/* 概览页标题下的「谁在带队」：昵称在前，真名小一号跟在后 */
.tch-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.tch-chip { display: inline-flex; align-items: baseline; gap: 5px; }
.tch-chip i {
  font-style: normal;
  font-size: 11px;
  color: var(--green);
  background: var(--green-bg);
  padding: 0 5px;
  border-radius: 3px;
}
.tch-chip b { font-weight: 500; color: var(--ink); }
.tch-chip span { color: var(--ink-3); }
.tch-chip em { font-style: normal; color: var(--ink-3); }

/* ==================================================================
 * 数据中心
 *
 * 这一页是给机构负责人看的，不是给带队老师用的：信息密度可以高，
 * 但每个数字都得能一眼分出「这是今年的」还是「这是老本的」。
 * 所以前四个数字用实色，后两个（累计天数、取消参加）压成一档浅色，
 * 避免六个同等重量的数字站成一排、谁都不突出。
 * ================================================================== */

.dc-filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--sh-1);
}

.dc-frow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.dc-fl {
  flex: 0 0 auto;
  width: 38px;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: .5px;
}

.dc-chip {
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfaf6;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s, transform .14s;
}

.dc-chip:hover { border-color: #cfe0d6; }

.dc-chip:active { transform: scale(.97); }

.dc-chip.on {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 4px 12px -6px rgba(31, 122, 92, .7);
}

/* ---------------- 六个数字 ---------------- */

.dc-hero {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  margin-bottom: 14px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--sh-1);
}

.dc-num {
  padding: 16px 8px 14px;
  background: var(--card);
  text-align: center;
}

.dc-num b {
  display: block;
  font-size: 27px;
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -.5px;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.dc-num span {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: .3px;
}

/* 后两个数字压一档：它们重要，但不是「业绩」 */
.dc-num.soft b { color: var(--ink-2); font-size: 23px; font-weight: 600; }

/* ---------------- 两张图 ---------------- */

.dc-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 12px;
}

.dc-grid > .card { margin: 0; }

.dc-bars { display: flex; flex-direction: column; gap: 11px; margin-top: 4px; }

.dc-bar-row {
  display: grid;
  grid-template-columns: 68px 1fr 92px;
  align-items: center;
  gap: 10px;
}

.dc-bar-name {
  font-size: 12.5px;
  color: var(--ink-2);
  white-space: nowrap;
}

.dc-bar-track {
  height: 9px;
  border-radius: 999px;
  background: #f0eee7;
  overflow: hidden;
}

.dc-bar-track > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), #6ab894);
  transition: width .5s cubic-bezier(.22, .92, .24, 1);
}

.dc-bar-num {
  font-size: 12px;
  color: var(--ink-3);
  text-align: right;
  white-space: nowrap;
}

.dc-bar-num b { color: var(--ink); font-size: 14px; font-weight: 600; }
.dc-bar-num span { margin-left: 7px; color: var(--ink-3); }

/* 年份柱 */
.dc-cols {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  height: 148px;
  padding: 6px 2px 0;
  overflow-x: auto;
}

.dc-col {
  flex: 1 0 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.dc-col-n {
  font-size: 12px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.dc-col-bar {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.dc-col-bar > i {
  display: block;
  width: 60%;
  max-width: 34px;
  border-radius: 5px 5px 3px 3px;
  background: linear-gradient(180deg, #6ab894, var(--green));
  box-shadow: 0 3px 10px -6px rgba(31, 122, 92, .9);
  transition: height .5s cubic-bezier(.22, .92, .24, 1);
}

.dc-col-x {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--ink-3);
}

/* ---------------- 表格 ---------------- */

.dc-table { width: 100%; border-collapse: collapse; }

.dc-table th {
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.dc-table td {
  padding: 10px;
  font-size: 13.5px;
  color: var(--ink);
  border-bottom: 1px solid #f1efe8;
  vertical-align: middle;
}

.dc-table tbody tr:last-child td { border-bottom: none; }

.dc-table tbody tr:hover { background: #fbfaf6; }

.dc-table .num { text-align: right; font-variant-numeric: tabular-nums; }

.dc-rank {
  color: var(--ink-3);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.dc-star { color: #d9a63c; font-size: 13px; }

.dc-camps {
  max-width: 250px;
  font-size: 12.5px;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 分类小标签。五个一组，用同一套低饱和色，避免表格花掉 */
.dc-tag {
  display: inline-block;
  padding: 2px 7px;
  margin-right: 4px;
  border-radius: 4px;
  font-size: 11.5px;
  line-height: 1.6;
  color: #4a5854;
  background: #f1f0ea;
  white-space: nowrap;
}

.dc-tag-day     { color: #8a5a12; background: #fdf3e2; }
.dc-tag-summer  { color: #2f6b52; background: #e8f5ee; }
.dc-tag-winter  { color: #2b5b8a; background: #e8f0f8; }
.dc-tag-intl    { color: #6b4a8a; background: #f2ecf8; }
.dc-tag-custom  { color: #8a4a3a; background: #f9eeea; }

/* ---------------- 孩子榜 ---------------- */

.dc-search {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 4px;
}

.dc-search input {
  flex: 1;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfaf6;
  font-size: 13.5px;
  color: var(--ink);
}

.dc-search input:focus {
  outline: none;
  border-color: var(--green-2);
  box-shadow: 0 0 0 3px rgba(42, 150, 112, .12);
  background: #fff;
}

.dc-count { flex: 0 0 auto; font-size: 12.5px; color: var(--ink-3); }

.dc-kid { cursor: pointer; }

.dc-kid:hover { background: #f2f8f4 !important; }

.dc-times { font-size: 15px; color: var(--green); }

/* ---------------- 孩子的参加记录（弹窗内时间轴） ---------------- */

.dc-tl { position: relative; padding: 2px 0 2px 22px; }

.dc-tl::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 10px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, #cfe5d9, #eef3f0);
}

.dc-tl-item { position: relative; padding: 9px 0; }

.dc-tl-dot {
  position: absolute;
  left: -21px;
  top: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px #d7eadf;
}

.dc-tl-dot.off { background: #c9a227; }

.dc-tl-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-size: 14.5px;
}

.dc-tl-meta {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.dc-tl-note {
  margin-top: 4px;
  font-size: 12px;
  color: #b3701a;
}

/* ---------------- 窄屏 ---------------- */

@media (max-width: 900px) {
  .dc-hero { grid-template-columns: repeat(3, 1fr); }
  .dc-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .dc-hero { grid-template-columns: repeat(2, 1fr); }
  .dc-num { padding: 13px 6px 11px; }
  .dc-num b { font-size: 22px; }
  .dc-num.soft b { font-size: 19px; }
  .dc-bar-row { grid-template-columns: 60px 1fr 78px; }
  .dc-filters { padding: 10px 11px; }
  .dc-fl { width: 32px; }

  /* 表格在手机上改成一条一条的卡片，与后台其它表格同一套做法 */
  .dc-table thead { display: none; }
  .dc-table, .dc-table tbody, .dc-table tr, .dc-table td { display: block; width: 100%; }
  .dc-table tr {
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
  }
  .dc-table td {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    /* 标签靠左、值贴右聚合。早先写 justify-content:space-between，
       一格里有「2」和「次」两个片段时会被拆到屏幕两端，读起来像两列。 */
    justify-content: flex-end;
    column-gap: 6px;
    row-gap: 4px;
    padding: 4px 0;
    border: none;
    text-align: right;
    font-size: 13px;
  }
  .dc-table td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    margin-right: auto;
    color: var(--ink-3);
    font-size: 12px;
  }
  .dc-table td.num { text-align: right; }
  .dc-camps { max-width: none; white-space: normal; }
  .dc-rank { display: none !important; }
}

/* ---------------------------------------------------------- 机构管理 */

/* 到期 / 停用提醒条。长驻在内容区顶部，不用 toast——两秒就消失的
   提醒起不到「提前一个月催续费」的作用。 */
.plan-banner {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.7;
}
.plan-banner.warn {
  background: #fdf6e3;
  border: 1px solid #ecd9a0;
  color: #8a6d1a;
}
.plan-banner.bad {
  background: #fdecea;
  border: 1px solid #f2b8b5;
  color: #a93226;
}

.org-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.org-card {
  border: 1px solid var(--line, #e3e0d8);
  border-radius: 12px;
  padding: 14px 16px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.oc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 15px;
}
.oc-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12.5px;
  color: var(--ink-3, #8a8f8b);
  line-height: 1.6;
}
.oc-nums {
  display: flex;
  gap: 16px;
  font-size: 12.5px;
  color: var(--ink-3, #8a8f8b);
}
.oc-nums b { color: var(--ink, #22302a); font-size: 14px; }
.oc-note {
  font-size: 12.5px;
  color: var(--ink-3, #8a8f8b);
  background: #f7f5f0;
  border-radius: 8px;
  padding: 7px 10px;
  line-height: 1.6;
}
.oc-acts { display: flex; gap: 8px; flex-wrap: wrap; }

.org-days {
  flex: 0 0 auto;
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #eef4f0;
  color: #2f6b52;
  white-space: nowrap;
}
.org-days.warn { background: #fdf3dd; color: #8a6d1a; }
.org-days.bad { background: #fdecea; color: #a93226; }

.sep-line {
  border-top: 1px dashed var(--line, #e3e0d8);
  margin: 14px 0 10px;
}

/* ------------------------------------------------------------ 营员中心 */

/* 点开一个孩子的长期档案：资料块之间留一拍呼吸，别糊成一团 */
.cp-block {
  margin-bottom: 16px;
}
.cp-block h4 {
  margin: 0 0 8px;
  font-size: 13.5px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.cp-block h4 .hint {
  font-weight: 400;
  font-size: 11.5px;
  color: var(--ink-3);
}
.cp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.cp-line {
  font-size: 13px;
  color: var(--ink-2);
}
.cp-block input,
.cp-block textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  background: #fbfaf7;
  outline: none;
  margin-bottom: 8px;
}
.cp-block input:focus,
.cp-block textarea:focus {
  border-color: var(--green-2);
  background: #fff;
}
.cp-save {
  text-align: right;
  margin-top: 2px;
}

/* 往期数据导入按钮贴在卡片标题右侧 */
.dc-import-btn {
  margin-left: auto;
}

/* ------------------------------------------------------------ 成长档案编辑 */

.gr-record {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: #fbfaf7;
}
.gr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.gr-seq {
  font-weight: 700;
  color: var(--green);
  font-size: 13.5px;
}
.gr-line {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.gr-line > label {
  flex: 0 0 46px;
  font-size: 12.5px;
  color: var(--ink-2);
  padding-top: 9px;
}
.gr-line > input,
.gr-line > textarea,
.gr-line > select {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  outline: none;
}
.gr-line > input:focus,
.gr-line > textarea:focus {
  border-color: var(--green-2);
}
.gr-two > span,
.gr-three > span {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.gr-two > span > label,
.gr-three > span > label {
  font-size: 12px;
  color: var(--ink-2);
}
.gr-two > span > input,
.gr-three > span > input,
.gr-three > span > select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  outline: none;
}
.gr-save {
  justify-content: flex-end;
  margin-bottom: 2px;
}
.gr-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.gr-ph {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 8px;
  overflow: hidden;
  background: #eef0ec;
}
.gr-ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gr-ph b {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
}
.gr-add {
  width: 78px;
  height: 78px;
  border: 1px dashed #c9d2cc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  font-size: 12px;
  cursor: pointer;
}
.gr-add:hover {
  border-color: var(--green-2);
  color: var(--green);
}
.gr-hint {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 6px;
}
.gr-new {
  margin: 2px 0 14px;
}
.gr-share {
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}
.gr-link {
  background: #f2f4f0;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  word-break: break-all;
  margin-bottom: 8px;
  color: var(--ink-2);
}
.gr-share-btns {
  display: flex;
  gap: 8px;
  align-items: center;
}
.gr-share-btns a {
  display: inline-flex;
  align-items: center;
}

/* 账号页顶部的短信通道状态条：黄底只在通道没配好时出现 */
.acc-sms {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 12px 16px;
}
.acc-sms b { font-size: 13.5px; }
.acc-sms-warn { border-left: 4px solid var(--amber); }

/* ---------------- 数据中心四页签 ----------------
 * 顶部大页签：营员数据 / 营期数据 / 年份数据 / 领队数据。
 * 选中态用主色底描边，与年份筛选 chips 区分开。 */
.dc-tabs {
  display: flex;
  gap: 8px;
  margin: 14px 0 16px;
  flex-wrap: wrap;
}

.dc-tab {
  padding: 9px 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dc-tab span {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
}

.dc-tab.on {
  border-color: var(--green);
  color: var(--green);
  background: #f0f7f2;
}

.dc-tab:hover { border-color: var(--green); }

/* 分页条：右对齐一行，按钮与计数 */
.dc-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 10px;
}

.dc-pg-info { font-size: 12.5px; color: var(--ink-3); }

/* 领队明细展开行：淡底 + 左侧竖条，像一张折叠的时间表 */
.dc-ldetail > td {
  background: #f7faf8;
  padding: 10px 14px 12px 30px;
}

.dc-ldetail-inner { display: flex; flex-direction: column; gap: 6px; }

.dc-ld-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
  padding-left: 10px;
  border-left: 3px solid var(--green);
}

.dc-ld-date { color: var(--ink-2); flex: 0 0 168px; }

.dc-ld-row b { min-width: 0; }

@media (max-width: 720px) {
  .dc-ld-row { flex-wrap: wrap; gap: 4px 12px; }
  .dc-ld-date { flex-basis: auto; }
}
