/* ============================================================
   外语学院软件正版化志愿服务站 · 共用样式
   视觉系统：武汉大学校徽四色（深彩语义 × 浅色底材 · 学院派）
   主色珞珈蓝 #002554 / 珞珈绿 #115740 / 秋桂黄 #9A6700 / 霜叶红 #E10800
   底材：浅灰 #F4F5F7 · 纯白卡片 · 细边框 #DFE4EA · 双层低透明阴影
   文字三档：正文 #172131 / 次要 #596474 / 占位 #8A95A3
   圆角 6–10px · 等宽数字 tabular-nums
   ============================================================ */

:root {
  /* —— 四色令牌 —— */
  --blue: #002554;          /* 珞珈蓝 · 主色（品牌/按钮/导航/主操作） */
  --blue-deep: #001b3d;     /* 深色态 · 按压/悬停 */
  --blue-bg: #eef3f9;       /* 极浅蓝 · 主色浅底材 */
  --green: #115740;         /* 珞珈绿 · 成功/可选 */
  --green-deep: #0f5c3f;    /* 选中反转深绿实底 */
  --green-bg: #e6f2ec;      /* 浅绿底 */
  --amber: #9a6700;         /* 秋桂黄 · 警示/已选 */
  --amber-bg: #fff3d6;      /* 浅黄底 */
  --red: #e10800;           /* 霜叶红 · 危险/冲突 */
  --red-bg: #fde9e8;        /* 浅红底 */
  --slate: #596474;         /* 灰蓝 · 中性信息 */

  /* —— 底材与文字 —— */
  --bg: #f4f5f7;
  --card: #ffffff;
  --line: #dfe4ea;
  --text: #172131;
  --muted: #596474;
  --placeholder: #8a95a3;
  --radius: 10px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow: 0 1px 2px rgba(23, 33, 49, 0.04), 0 4px 14px rgba(23, 33, 49, 0.05);

  /* 兼容旧变量名（语义映射） */
  --luojia: #002554;
  --luojia-deep: #001b3d;
  --luojia-dark: #172131;
  --luojia-light: #1a3d6e;
  --luojia-tint: #eef3f9;
  --orange: #9a6700;
  --accent: #9a6700;
  --accent-soft: #fff3d6;
  --ok: #115740;
  --ok-bg: #e6f2ec;
  --warn: #9a6700;
  --warn-bg: #fff3d6;
  --danger: #e10800;
  --danger-bg: #fde9e8;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  /* 字体：Inter + PingFang SC 系统栈 */
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 14px 110px;
}

/* ============ 双栏网格：左主内容 / 右侧工作列 ============ */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

@media (min-width: 960px) {
  .grid { grid-template-columns: 1fr 404px; gap: 24px; }
  .container { padding-bottom: 60px; }
}

/* ---------- 顶部头图（纯白底 + 细边框 + 蓝色品牌字） ---------- */
.site-head {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  padding: 28px 18px 24px;
  text-align: center;
}
.site-head .logo { font-size: 28px; line-height: 1; margin-bottom: 8px; }
.site-head h1 {
  margin: 0 0 6px;
  font-size: 21px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--blue);
}
.site-head .sub { font-size: 13px; margin: 0; color: var(--slate); }
.site-head .tag {
  display: inline-block;
  margin-top: 10px;
  padding: 3px 12px;
  font-size: 12px;
  color: var(--blue);
  border: 1px solid #ccd8e8;
  border-radius: 999px;
  background: var(--blue-bg);
}

/* ---------- 章节标题 ---------- */
.sec { margin-top: 26px; }
.sec-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px 4px;
  letter-spacing: 1px;
}
.sec-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
  margin-left: 6px;
}

/* ---------- 通用卡片（纯白 + 细边框 + 双层轻阴影） ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}

/* ---------- 导航大按钮卡 ---------- */
.btn-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  color: var(--text);
  text-decoration: none;
  transition: transform .06s ease, box-shadow .15s ease;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.btn-card:active { transform: scale(.985); }
.btn-card .ic {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--blue-bg);
  border: 1px solid #d3deec;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-card .txt { flex: 1; min-width: 0; }
.btn-card .txt .t { font-size: 16px; font-weight: 600; display: block; color: var(--text); }
.btn-card .txt .d { font-size: 12.5px; color: var(--muted); display: block; margin-top: 2px; }
.btn-card .arrow { flex: 0 0 auto; color: #aab4c2; font-size: 18px; }

/* ---------- 下载卡 ---------- */
.dl-card { padding: 16px; }
.dl-card .name { font-weight: 600; font-size: 14.5px; margin: 0 0 4px; word-break: break-all; color: var(--text); }
.dl-card .meta { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; }
.dl-actions { display: flex; gap: 10px; }
.dl-actions .btn { flex: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.3;
  transition: background .12s ease, border-color .12s ease;
}
.btn:active { transform: scale(.98); }
.btn-primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  box-shadow: 0 1px 2px rgba(0, 37, 84, 0.25);
}
.btn-primary:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.btn-ghost {
  background: #fff;
  color: var(--blue);
  border: 1px solid var(--blue);
}
.btn-ghost:hover { background: var(--blue-bg); }
.btn-hollow {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-hollow:hover { background: #eaedf1; }
.btn .mini { font-size: 11.5px; opacity: .85; font-weight: 400; }

/* 小提示条（秋桂黄 · 警示语义） */
.note {
  background: var(--amber-bg);
  border: 1px solid #f0e3c0;
  color: var(--amber);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 12px;
}
.note b { color: #7c5400; }

/* ---------- 徽标（秋桂黄） ---------- */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 400;
  color: var(--amber);
  background: var(--amber-bg);
  border: 1px dashed rgba(154, 103, 0, 0.45);
  border-radius: 999px;
  padding: 1px 8px;
  margin-top: 4px;
}

/* ---------- 页脚区块 ---------- */
.timebar, .support {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.timebar { border-left: 4px solid var(--blue); }
.timebar .t { font-weight: 700; font-size: 13.5px; color: var(--text); margin-bottom: 6px; }
.timebar ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.timebar li { margin-bottom: 3px; }
.timebar li b { color: var(--red); }
.support { margin-top: 14px; font-size: 13px; color: var(--muted); }
.support a { color: var(--blue); text-decoration: none; }

.copyright {
  text-align: center;
  color: var(--placeholder);
  font-size: 12px;
  margin-top: 18px;
}
.copyright a { color: var(--blue); text-decoration: none; }

/* ============================================================
   右列 · 登录 / 登记表单 / 我的记录
   ============================================================ */
.side { scroll-margin-top: 14px; }
@media (min-width: 960px) {
  .side {
    position: sticky;
    top: 12px;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    padding-right: 2px;
    scrollbar-width: thin;
    scrollbar-color: #c3ccd8 transparent;
  }
}
.side::-webkit-scrollbar { width: 5px; }
.side::-webkit-scrollbar-thumb { background: #c3ccd8; border-radius: 999px; }

.side-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
  margin: 0 0 8px 4px;
}

.who {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-size: 13px;
  flex-wrap: wrap;
}
.who b { color: var(--text); }
.who .role {
  font-size: 11px;
  color: var(--blue);
  background: var(--blue-bg);
  border-radius: 999px;
  padding: 1px 8px;
}
.who button { margin-left: auto; }

.form-card { padding: 14px; }
.form-card label {
  display: block;
  margin-bottom: 10px;
  font-size: 12.5px;
  color: var(--muted);
}
.form-card label .req { color: var(--red); }
.form-card input[type="text"],
.form-card input[type="password"],
.form-card select,
.form-card textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  font-size: 14px;
  font-family: inherit;
  background: #fbfcfd;
  color: var(--text);
}
.form-card input::placeholder, .form-card textarea::placeholder { color: var(--placeholder); }
.form-card input:focus, .form-card select:focus, .form-card textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 37, 84, 0.09);
}
.form-card textarea { min-height: 62px; resize: vertical; }
.form-card .note-in { font-size: 11.5px; color: var(--placeholder); margin: 2px 0 0 2px; }
.form-card .note-in.warn { color: var(--amber); font-weight: 600; }
.form-actions { display: flex; gap: 8px; margin-top: 4px; }
.form-actions .btn { flex: 1; }

.rec-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 13px;
  box-shadow: var(--shadow);
}
.rec-item .r1 { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; color: var(--text); }
.rec-item .r1 .time {
  font-weight: 400;
  font-size: 11px;
  color: var(--placeholder);
  font-variant-numeric: tabular-nums;
}
.rec-item .r2 { font-size: 12px; color: var(--muted); margin-top: 3px; }
.rec-item .r3 { display: flex; gap: 8px; margin-top: 6px; }
.rec-item .r3 .btn { padding: 5px 10px; font-size: 12px; border-radius: var(--radius-xs); }

/* ---------- 分组卡（浅底头部 + 细线） ---------- */
.grp {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  overflow: hidden;
}
.grp-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--blue-bg);
  border-left: 3px solid var(--blue);
  color: var(--text);
}
.grp-head .g {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-xs);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.grp-head h3 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .5px; }
.grp-head .cnt { margin-left: auto; font-size: 11px; color: var(--slate); font-variant-numeric: tabular-nums; }

.grp ul { list-style: none; margin: 0; padding: 2px 0; }
.grp li { border-bottom: 1px solid var(--line); }
.grp li:last-child { border-bottom: none; }
.grp label {
  display: flex;
  gap: 9px;
  padding: 8px 12px;
  cursor: pointer;
  align-items: flex-start;
}
.grp input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--blue);
  cursor: pointer;
}
.grp .it { flex: 1; min-width: 0; }
.grp .it .t { font-size: 13px; font-weight: 500; display: block; line-height: 1.45; color: var(--text); }
.grp .it .hint { font-size: 11.5px; color: var(--muted); display: block; margin-top: 1px; line-height: 1.5; }
.grp label.done .t { color: var(--placeholder); text-decoration: line-through; text-decoration-color: #b9c2cf; }
.grp label.done .hint { opacity: .7; }
.grp .it .hl { color: var(--red); font-weight: 600; }
.grp .it .ok-hl { color: var(--green); font-weight: 600; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  background: var(--blue-deep);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  z-index: 99;
  box-shadow: 0 4px 14px rgba(23, 33, 49, 0.18);
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
  max-width: 86vw;
}
.toast.show { opacity: 1; }
.toast.err { background: var(--red); }

.hint-line { font-size: 12px; color: var(--placeholder); text-align: center; margin-top: 10px; }

/* ============================================================
   管理员后台
   ============================================================ */
.admin-page { max-width: 1180px; }
.admin-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 16px auto;
  position: sticky;
  top: 0;
  background: rgba(244, 245, 247, 0.94);
  padding: 8px 0;
  z-index: 5;
}
.admin-nav .who { margin-bottom: 0; }
.admin-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.admin-stat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.admin-stat .st {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  box-shadow: var(--shadow);
}
.admin-stat .st b {
  display: block;
  font-size: 24px;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}
.admin-stat .st span { font-size: 12px; color: var(--muted); }
.admin-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.admin-filter input, .admin-filter select {
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  padding: 7px 10px;
  font-size: 13px;
  background: #fff;
  font-family: inherit;
  color: var(--text);
}
.admin-filter input::placeholder { color: var(--placeholder); }
table.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.admin-table th, .admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.admin-table th {
  background: var(--bg);
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}
.admin-table tr:hover td { background: #f7f9fc; }
.admin-table .needfix { color: var(--red); font-weight: 600; }
.admin-table .st-ok { color: var(--green); }
@media print { .admin-nav, .admin-filter, .no-print { display: none !important; } }

/* ---------- 自查卡片（Windows/Office/WPS）：浅色小字 ---------- */
.check-card .name {
  font-size: 12.8px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 2px;
}
.check-card .sub {
  font-size: 12.6px;
  font-weight: 600;
  color: var(--text);
  margin: 12px 0 4px;
}
.check-card .sub:first-of-type { margin-top: 8px; }
.steps { margin: 2px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.steps li { margin-bottom: 3px; }
.steps b { color: var(--text); font-weight: 600; }
.steps code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 11.8px;
  color: #333f50;
  background: #f2f4f7;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  padding: 0 5px;
  word-break: break-all;
}
.steps code.cmdline {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 4px 0 2px;
  padding: 5px 10px;
  font-size: 12.3px;
  color: #172131;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius-xs);
  white-space: nowrap;
  overflow-x: auto;
}

/* ---------- 页尾快速链接 ---------- */
.quick-links { margin-bottom: 6px; }
.ql-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.ql {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  transition: transform .06s ease;
}
.ql:active { transform: scale(.985); }
.ql-ic {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--blue-bg);
  border: 1px solid #d3deec;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.ql-t { font-size: 14px; font-weight: 600; color: var(--text); display: block; }
.ql-d { font-size: 11.5px; color: var(--muted); display: block; }
.ql-arrow { margin-left: auto; color: #aab4c2; font-size: 14px; }
@media print { .quick-links { display: none; } }

/* ============================================================
   打印（保留规则，以备清单类打印）
   ============================================================ */
@media print {
  body { background: #fff; font-size: 13px; }
  .container { max-width: 100%; padding: 0; }
  .site-head, .main, .timebar, .support, .copyright { display: none !important; }
  .grid { display: block; }
  .side { position: static; max-height: none; overflow: visible; padding: 0; }
  .grp { box-shadow: none; border: 1px solid #999; background: #fff; break-inside: avoid; }
  .grp-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .grp li { break-inside: avoid; }
}

/* ============================================================
   移动端优化（<960px 单列）：登记表单置顶 + 触控适配
   ============================================================ */
@media (max-width: 959px) {
  .grid { display: flex; flex-direction: column; align-items: stretch; }
  .grid > * { width: 100%; max-width: 100%; }
  .grid .main { order: 2; }
  .grid .side { order: 1; }
  .side { scroll-margin-top: 10px; }

  .site-head { padding: 20px 14px 18px; }
  .site-head h1 { font-size: 18px; letter-spacing: 1px; }
  .site-head .sub { font-size: 12px; }
  .site-head .tag { font-size: 11px; margin-top: 8px; }

  .container { padding: 0 12px 96px; }

  .btn-card { padding: 13px 14px; gap: 12px; }
  .btn-card .ic { flex: 0 0 40px; width: 40px; height: 40px; font-size: 19px; border-radius: 10px; }
  .btn-card .txt .t { font-size: 15px; }

  .dl-actions { gap: 8px; }
  .dl-actions .btn { padding: 11px 6px; font-size: 13.5px; }

  .rec-item .r1 { flex-direction: column; gap: 2px; }
  .rec-item .r1 .time { font-size: 10.5px; }

  .admin-table { min-width: 820px; }
  .admin-stat .st b { font-size: 20px; }

  .ql { padding: 11px 12px; }
  .ql-ic { flex: 0 0 32px; width: 32px; height: 32px; font-size: 16px; }

  .container { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}

@media (max-width: 380px) {
  .steps code.cmdline { font-size: 11.5px; padding: 4px 8px; }
  .who button { width: 100%; margin-left: 0; }
}