:root {
  --blue: #1E5FC9;
  --blue-700: #17479A;
  --blue-50: #EDF3FD;
  --blue-100: #DCE8FA;
  --ink: #16202E;
  --ink-2: #47576E;
  --muted: #8390A4;
  --line: #E4EAF3;
  --bg: #F5F7FB;
  --white: #FFFFFF;
  --red: #D93B3B;
  --red-50: #FDEDED;
  --green: #2E9E5B;
  --green-50: #EDF8F1;
  --amber: #C0791A;
  --amber-50: #FDF5E7;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(22, 32, 46, .05);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */

.header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}

.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-logo { height: 54px; width: auto; display: block; }
.brand-text { min-width: 0; }
.brand-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }

.header-meta {
  font-size: 12.5px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}
.header-meta b { color: var(--ink); font-weight: 600; }

/* ---------- hero ---------- */

.hero {
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 22px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.hero-tag {
  display: inline-block;
  font-size: 11.5px;
  color: var(--blue);
  background: var(--white);
  border: 1px solid var(--blue-100);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 8px;
  letter-spacing: .04em;
}

.hero h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .01em;
}

.hero p {
  margin: 6px 0 0;
  color: var(--ink-2);
  font-size: 13px;
  max-width: 560px;
}

.hero-stats { display: flex; gap: 26px; }
.stat-num { font-size: 22px; font-weight: 600; line-height: 1.2; }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-pending .stat-num { color: var(--amber); }
.stat-accepted .stat-num { color: var(--blue); }

/* ---------- layout ---------- */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding-bottom: 40px;
}

.layout > aside.card {
  position: sticky;
  top: 16px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title { font-size: 15px; font-weight: 600; }
.card-sub { font-size: 12.5px; color: var(--muted); }
.card-body { padding: 20px; }

/* ---------- form ---------- */

.field { margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

.label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  margin-bottom: 7px;
}
.label .req { color: var(--red); margin-left: 2px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }

.input, .select, .textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 12px;
  height: 40px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.textarea { height: auto; min-height: 76px; resize: vertical; line-height: 1.6; }

.input:focus, .select:focus, .textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(30, 95, 201, .12);
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238390A4' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* pills */

.pills { display: flex; flex-wrap: wrap; gap: 8px; }

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
  transition: all .15s;
}
.pill:hover { border-color: var(--blue-100); color: var(--blue); }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill.on {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 500;
}

.wd-row { display: flex; gap: 7px; flex-wrap: wrap; }
.wd {
  width: 44px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
  transition: all .15s;
}
.wd:hover { border-color: var(--blue-100); color: var(--blue); }
.wd.on { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 500; }
.wd input { position: absolute; opacity: 0; pointer-events: none; }

/* segmented */

.seg {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}
.seg button {
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink-2);
  padding: 6px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s;
}
.seg button.on {
  background: var(--white);
  color: var(--blue);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(22, 32, 46, .08);
}

.time-row { display: flex; align-items: center; gap: 10px; }
.time-row .input { max-width: 150px; }
.time-sep { color: var(--muted); }

/* 每天单独设置 */
.day-rows { display: flex; flex-direction: column; gap: 8px; }
.day-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #FBFCFE;
}
.day-row .d-place { grid-column: 2 / -1; }
.day-name { font-size: 12.5px; font-weight: 500; color: var(--ink); line-height: 1.3; }
.day-name span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }
.day-row .select { height: 36px; padding: 6px 24px 6px 9px; font-size: 12.5px; }
.day-row .input { height: 36px; font-size: 12.5px; }

/* 日历 */
.cal {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: var(--white);
  max-width: 370px;
}
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.cal-title { font-size: 14px; font-weight: 600; }
.cal-nav {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}
.cal-nav:hover { border-color: var(--blue-100); color: var(--blue); }
.cal-week, .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-week span {
  text-align: center;
  font-size: 11.5px;
  color: var(--muted);
  padding: 4px 0;
}
.cal-day {
  aspect-ratio: 1 / 1;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.cal-day:hover { background: var(--blue-50); }
.cal-day.is-today { border-color: var(--blue-200, #B5D4F4); font-weight: 600; }
.cal-day.is-picked { background: var(--blue); color: #fff; font-weight: 500; }
.cal-day.is-past { color: #C7D0DE; cursor: not-allowed; }
.cal-day.is-past:hover { background: transparent; }
.cal-day.is-empty { cursor: default; }

/* buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 20px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink-2);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--blue-100); color: var(--blue); }

.btn-primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 500;
}
.btn-primary:hover { background: var(--blue-700); border-color: var(--blue-700); color: #fff; }

.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 6px; }
.btn[disabled] { opacity: .32; cursor: default; }
.btn-block { width: 100%; }
.btn-danger { color: var(--red); }
.btn-danger:hover { border-color: var(--red); color: var(--red); background: var(--red-50); }

.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

/* ---------- list ---------- */

.recent-foot {
  text-align: center;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  color: var(--muted);
}
.recent-foot .foot-toggle {
  background: none;
  border: 0;
  padding: 0;
  color: var(--blue);
  font-size: 11.5px;
  cursor: pointer;
  font-family: inherit;
}
.recent-foot .foot-toggle:hover { text-decoration: underline; }

/* 后台"数据有更新"提示条 */
.live-tip {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 130;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px 8px 14px;
  background: #1F2A3A;
  color: #fff;
  border-radius: 999px;
  font-size: 12.5px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, .3);
  animation: liveIn .2s ease-out;
}
.live-tip[hidden] { display: none; }
@keyframes liveIn {
  from { opacity: 0; transform: translate(-50%, -6px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ADE80;
  animation: livePulse 1.6s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .3; }
}
.live-btn {
  border: 0;
  background: #fff;
  color: #1F2A3A;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 11px;
  border-radius: 999px;
  cursor: pointer;
}
.live-btn:hover { background: #EEF2F8; }
.live-x {
  border: 0;
  background: none;
  color: rgba(255, 255, 255, .55);
  font-size: 15px;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
}
.live-x:hover { color: #fff; }

/* 后台编辑：每天的排期行 */
/* 干事排课冲突 */
.pill.has-clash {
  border-color: #F0C9C3;
  background: #FEF6F5;
}
/* 有课 + 已选中：必须比 .pill.on 更醒目，否则浅红底会把白字吃掉 */
.pill.has-clash.on {
  background: #C0392B;
  border-color: #C0392B;
  color: #fff;
  font-weight: 500;
  box-shadow: 0 2px 10px rgba(192, 57, 43, .25);
}
.pill.has-clash.on .clash-mark {
  background: #fff;
  color: #A93226;
  font-weight: 600;
}
.pill.on::before {
  content: "✓";
  margin-right: 5px;
  font-size: 11.5px;
  font-weight: 700;
}
.pill.has-clash:not(.on) .clash-mark { font-weight: 600; }
.clash-mark {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 4px;
  background: #FDE8E5;
  color: #C0392B;
  font-size: 10.5px;
  font-weight: 500;
  vertical-align: 1px;
}
.clash-box {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #F5D9D5;
  border-radius: 9px;
  background: #FEF8F7;
  font-size: 12px;
  color: #8C3A31;
  line-height: 1.9;
}
.clash-box .clash-line b { margin-right: 6px; color: #A93226; }
.clash-box .clash-line span { margin-right: 12px; white-space: nowrap; }

/* 干事当天课表（折叠） */
.daykb {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #FCFDFE;
}
.daykb > summary {
  padding: 9px 12px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--blue);
  user-select: none;
  list-style: none;
}
.daykb > summary::-webkit-details-marker { display: none; }
.daykb > summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform .15s ease;
}
.daykb[open] > summary::before { content: "▾ "; }
.daykb > summary:hover { text-decoration: underline; }
.daykb > div { padding: 0 12px 12px; }

/* 有课确认卡片（不用浏览器原生 confirm） */
.kb-mask {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, .42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 120;
}
.kb-mask[hidden] { display: none; }

.kb-dialog {
  width: 100%;
  max-width: 402px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 54px rgba(16, 24, 40, .24);
  overflow: hidden;
  animation: kbIn .16s ease-out;
}
@keyframes kbIn {
  from { opacity: 0; transform: translateY(6px) scale(.99); }
  to   { opacity: 1; transform: none; }
}

.kb-dialog-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 18px 20px 0;
  font-size: 14.5px;
  font-weight: 600;
  color: #16202E;
}
.kb-warn {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #FDECEA;
  color: #C0392B;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.kb-dialog-body { padding: 10px 20px 4px; }
.kb-dialog-name {
  font-size: 13.5px;
  font-weight: 500;
  color: #A93226;
  margin-bottom: 6px;
}
.kb-dialog-detail {
  font-size: 12.5px;
  color: #5B6B82;
  line-height: 1.9;
  white-space: pre-line;
}
.kb-dialog-hint {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  color: #8FA0B5;
}

.kb-dialog-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 20px 18px;
}

.slot-row {
  display: grid;
  grid-template-columns: 162px minmax(0, 1fr) auto minmax(0, 1fr) minmax(0, 0.9fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.slot-row .select,
.slot-row .input { height: 36px; font-size: 12.5px; }

.week-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}
.week-item:last-child { border-bottom: 0; padding-bottom: 0; }
.week-item:first-child { padding-top: 0; }

.week-day {
  flex: 0 0 62px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.week-day b { display: block; color: var(--ink); font-size: 13px; font-weight: 600; }

.week-main { flex: 1; min-width: 0; }
.week-block { margin-bottom: 10px; }
.week-block:last-child { margin-bottom: 0; }
.week-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.week-title { font-size: 13.5px; font-weight: 500; flex: 1; min-width: 0; }
.week-meta { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.5; }

.badge {
  display: inline-block;
  font-size: 11.5px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--white);
  white-space: nowrap;
}
.st-pending { color: var(--amber); background: var(--amber-50); border-color: #F3E2C4; }
.st-accepted { color: var(--blue); background: var(--blue-50); border-color: var(--blue-100); }
.st-assigned { color: #1B6E8C; background: #E9F4F8; border-color: #C6E2EC; }
.st-processing { color: #7B5BD6; background: #F3EFFC; border-color: #E2D9F7; }
.st-submitted { color: #0E8A7E; background: #E9F7F5; border-color: #C9EAE6; }
.st-done { color: var(--green); background: var(--green-50); border-color: #CDEBD9; }
.st-cancel { color: var(--muted); background: #F3F5F8; }
.st-reject { color: var(--red); background: var(--red-50); border-color: #F6D5D5; }

.empty {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 34px 10px;
}

/* ---------- alert ---------- */

.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid;
}
.alert-ok { background: var(--green-50); border-color: #CDEBD9; color: #1E7A44; }
.alert-err { background: var(--red-50); border-color: #F6D5D5; color: #A62B2B; }
.alert-info { background: var(--blue-50); border-color: var(--blue-100); color: var(--blue-700); }
.alert ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 18px 0 26px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- admin ---------- */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(22, 32, 46, .07);
  padding: 34px 30px;
  text-align: center;
}
.login-card img { height: 66px; margin-bottom: 16px; }
.login-card h1 { font-size: 17px; margin: 0 0 4px; font-weight: 600; }
.login-card p { font-size: 12.5px; color: var(--muted); margin: 0 0 22px; }
.login-card .field { text-align: left; }

.admin-bar {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.admin-bar .header-inner { padding-top: 10px; padding-bottom: 10px; }
.admin-bar .brand-logo { height: 40px; }

.tabs { display: flex; gap: 4px; }
.tabs a {
  padding: 7px 15px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
}
.tabs a:hover { background: var(--bg); text-decoration: none; }
.tabs a.on { background: var(--blue-50); color: var(--blue); font-weight: 500; }

.board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 14px;
  flex-wrap: wrap;
}
.week-nav { display: flex; align-items: center; gap: 8px; }
.week-nav .current { font-size: 15px; font-weight: 600; margin: 0 6px; }

.board {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  padding-bottom: 40px;
}

.board-col {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
}

.board-col-head {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.board-col-head b { font-weight: 600; font-size: 13px; }
.board-col-head .d { color: var(--muted); font-size: 11.5px; }
.board-col.today { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(30, 95, 201, .12); }
.board-col.today .board-col-head { background: var(--blue-50); }

.board-col-body { padding: 8px; display: flex; flex-direction: column; gap: 7px; flex: 1; }

.mini {
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 7px;
  padding: 7px 8px;
  font-size: 11.5px;
  line-height: 1.45;
  background: var(--white);
}
.mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.mini .t { font-weight: 600; font-size: 12px; color: var(--ink); }
.mini-title { font-size: 12.5px; color: var(--ink); margin-top: 1px; word-break: break-all; }
.mini .m { color: var(--muted); }
.mini.is-pending { border-left-color: var(--amber); }
.mini.is-accepted { border-left-color: var(--blue); }
.mini.is-assigned { border-left-color: #1B6E8C; }
.mini.is-processing { border-left-color: #7B5BD6; }
.mini.is-submitted { border-left-color: #0E8A7E; }
.mini.is-done { border-left-color: var(--green); }
.mini.clash { background: var(--red-50); border-color: #F6D5D5; border-left-color: var(--red); }
.clash-tag {
  font-size: 10px;
  line-height: 14px;
  color: #fff;
  background: var(--red);
  border-radius: 3px;
  padding: 0 4px;
  white-space: nowrap;
}
.mini .warn { color: var(--red); font-weight: 500; }

/* table */

.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--white);
}
table.data th {
  text-align: left;
  font-weight: 500;
  font-size: 12.5px;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #FAFBFD;
  white-space: nowrap;
}
table.data td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: #FBFCFE; }

.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.filter-bar .select { max-width: 150px; }

/* action buttons */

a.btn { text-decoration: none; }
a.btn:hover { text-decoration: none; }
.row-actions form { margin: 0; }
.row-actions .btn { font-weight: 400; }

/* ---------- 统计 ---------- */

.stat-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.stat {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.stat-n { font-size: 24px; font-weight: 600; color: var(--ink); line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-l { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.bar-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 13px; }
.bar-name { width: 96px; flex: none; color: var(--ink-2); }
.bar-track { flex: 1; height: 8px; background: #F0F3F9; border-radius: 99px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #3B7DE0, var(--blue)); }
.bar-num { width: 30px; flex: none; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

table.heat { width: 100%; border-collapse: separate; border-spacing: 4px; font-size: 12.5px; }
table.heat th { font-weight: 500; font-size: 12px; color: var(--muted); text-align: center; padding: 2px; }
table.heat td.heat-p { white-space: nowrap; color: var(--ink-2); padding: 2px 6px; }
table.heat td.heat-c { text-align: center; padding: 7px 4px; border-radius: 6px; background: #FAFBFD; font-variant-numeric: tabular-nums; }

/* ---------- 素材库 ---------- */

.mat-group { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.mat-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  background: #FAFBFD;
  border-bottom: 1px solid var(--line);
}
.mat-code { font-weight: 600; color: var(--blue-700); letter-spacing: .2px; }
table.mat-table td { padding: 9px 12px; }
.alert-warn { background: var(--amber-50); border-color: #F0DCB8; color: #8A5A12; }

.mat-list { display: flex; flex-direction: column; gap: 8px; }
.mat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #FCFDFF;
}
.mat-main { flex: 1; min-width: 0; }
.mat-main a { word-break: break-all; }
.mat-ico { font-size: 17px; line-height: 1; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .layout > aside.card { position: static; }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-stats { gap: 20px; }
  .stat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mat-group-head { flex-wrap: wrap; }
  .admin-bar .header-inner { flex-wrap: wrap; row-gap: 6px; }
  .board-toolbar { flex-wrap: wrap; row-gap: 8px; }
  .week-nav { flex-wrap: wrap; row-gap: 6px; }
  .admin-nav { width: 100%; max-width: 100%; min-width: 0; gap: 10px; flex-wrap: nowrap; }
  .admin-nav .tabs {
    flex: 1 1 0;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .admin-nav .tabs::-webkit-scrollbar { display: none; }
  .admin-nav .tabs a { flex: none; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 14px; }
  .brand-logo { height: 42px; }
  .brand-title { font-size: 14px; }
  .header-meta { display: none; }
  .hero { padding: 18px; }
  .hero h1 { font-size: 18px; }
  .grid-2 { grid-template-columns: 1fr; }
  .card-body { padding: 16px; }
  .board { grid-template-columns: 1fr; }
  .board-col { min-height: 0; }
  .board-col-body { flex-direction: row; flex-wrap: wrap; }
  .board-col-body .mini { flex: 1 1 46%; }
  .time-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .time-row .input { max-width: none; width: 100%; }
  .time-row .select { width: 100%; }
  .time-row .time-sep { text-align: center; font-size: 12px; }
  .day-row { grid-template-columns: 1fr; }
  .day-row .time-sep { display: none; }
  .day-name { display: flex; gap: 8px; align-items: baseline; }
  .day-name span { display: inline; }
  .admin-bar .header-inner { flex-wrap: wrap; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 12px 14px; }
  .stat-n { font-size: 20px; }
  .bar-name { width: 72px; font-size: 12.5px; }
  table.heat { font-size: 11.5px; }
  table.heat td.heat-c { padding: 6px 2px; }
  table.mat-table td { padding: 8px 8px; font-size: 12.5px; }
  table.mat-table td:nth-child(5) { display: none; }
  .table-wrap table.data { min-width: 720px; }
  .table-wrap table.data th,
  .table-wrap table.data td { white-space: nowrap; }
  table.heat { min-width: 560px; }
  .member-add { grid-template-columns: 1fr 1fr !important; }
  .clash-box .clash-line span { white-space: normal; }
  .clash-box .clash-line { flex-wrap: wrap; }
  .card-head { flex-wrap: wrap; row-gap: 6px; }
  .card-head .card-title { white-space: nowrap; }
  .card-head .card-sub { flex: 1 1 auto; min-width: 0; }

  /* 需求列表在手机上改成卡片，避免 8 列被挤成竖排 */
  .table-wrap .list-tb { display: block; min-width: 0; }
  .list-tb thead { display: none; }
  .list-tb tbody { display: block; }
  .list-tb tr {
    display: block;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    background: var(--white);
  }
  .list-tb tr:last-child { margin-bottom: 0; }
  .list-tb tr:hover td { background: transparent; }
  .table-wrap .list-tb td {
    display: block;
    position: relative;
    border: 0;
    padding: 3px 0 3px 60px;
    white-space: normal;
  }
  .table-wrap .list-tb td::before {
    content: attr(data-th);
    position: absolute;
    left: 0;
    top: 3px;
    width: 52px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
  }
  .table-wrap .list-tb td[data-th=""] { font-size: 14px; padding-left: 0; }
  .table-wrap .list-tb td[data-th=""]::before { display: none; }
  .table-wrap .list-tb td.cell-actions {
    display: block;
    border-top: 1px dashed var(--line);
    margin-top: 8px;
    padding: 8px 0 0;
  }
  .table-wrap .list-tb td.cell-actions::before { display: none; }
  .admin-nav .tabs {
    -webkit-mask-image: linear-gradient(90deg, #000 88%, rgba(0,0,0,.25) 100%);
    mask-image: linear-gradient(90deg, #000 88%, rgba(0,0,0,.25) 100%);
  }
}
