/* 珠艺云图新生报到系统
   设计系统：白底 + 紫色 #7C3AED 点缀，Apple 极简质感
   Token 来源：《00-网易学院报到系统-前端交付文档》第 1 章 / 第 12.1 节
   注意：品牌色(--primary)与危险色(--red)已拆分为两套语义，不可混用 */
:root {
  /* ===== 底色与线条 ===== */
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --surface-2: #FAFAFA;
  --border: #E5E5E7;
  --border-strong: #E5E5E7;
  --hair: #ECECEC;
  --hair-2: #F2F2F7;
  --gray-soft: #F4F4F6;

  /* ===== 文字 ===== */
  --text: #1D1D1F;
  --text-2: #6E6E73;
  --text-3: #86868B;

  /* ===== 品牌主色（紫）===== */
  --primary: #7C3AED;
  --primary-dark: #6D28D9;
  --primary-light: #F5F3FF;
  --primary-tint: #EDE9FE;
  --primary-soft: rgba(124, 58, 237, 0.10);
  --primary-softer: rgba(124, 58, 237, 0.06);

  /* ===== 状态色（语义色，勿挪作品牌色）===== */
  --green: #10B981;   --green-deep: #047857; --green-soft: #D1FAE5; --green-bg: #ECFDF5;
  --amber: #F59E0B;   --amber-deep: #B45309; --amber-soft: #FEF3C7; --amber-bg: #FFFBEB;
  --red:   #EF4444;   --red-deep:   #B91C1C; --red-soft:   #FEE2E2; --red-bg:   #FEF2F2;
  --blue:  #3B82F6;   --blue-deep:  #1D4ED8; --blue-soft:  #DBEAFE;
  --red-softer: #FEF2F2;   /* 危险态 hover 底 */

  /* ===== 圆角 ===== */
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 12px;
  --r-xl: 14px;
  --r-2xl: 18px;
  --r-3xl: 20px;
  --r-4xl: 28px;
  --radius: 14px;      /* 兼容旧引用：小卡/统计卡 */
  --radius-lg: 16px;   /* 兼容旧引用：卡片 */
  --radius-xl: 20px;   /* 弹窗 */
  --radius-2xl: 28px;  /* 顶部圆角 / 看板大卡 */

  /* ===== 阴影 ===== */
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.08);
  --shadow-purple: 0 6px 18px rgba(124, 58, 237, 0.22);
  --shadow-hover: 0 12px 32px rgba(124, 58, 237, 0.08);
  --shadow-modal: 0 12px 40px rgba(0, 0, 0, 0.12);
  --shadow: var(--shadow-md);   /* 兼容旧引用：默认卡片 */

  /* ===== 字体 ===== */
  --font-sans: "Inter", system-ui, -apple-system, "PingFang SC", "PingFang TC",
               "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body { min-height: 100vh; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 24px 20px 64px; }
.wrap-narrow { max-width: 600px; margin: 0 auto; padding: 24px 20px 64px; }

/* ===== 顶栏（文档 4.3：64px + blur 20px）===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--hair);
}
.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex; align-items: center; gap: 12px;
  min-height: 64px;
}
.brand {
  font-size: 16px; font-weight: 700; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 10px;
}
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--r-md);
  background: var(--primary); color: #fff; font-size: 15px; font-weight: 700;
  box-shadow: var(--shadow-purple);
}
.brand .sub { font-size: 12px; font-weight: 400; color: var(--text-2); margin-left: 4px; }
.topbar-spacer { flex: 1; }

/* ===== 卡片（文档：radius-lg 16px + shadow-card）===== */
.card {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
}
.card + .card { margin-top: 16px; }
.card-title { font-size: 17px; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.01em; }
.card-desc { font-size: 13px; color: var(--text-2); margin: 0 0 16px; }
.section-title {
  font-size: 13px; font-weight: 600; color: var(--text-2);
  margin: 24px 0 10px; letter-spacing: 0.02em;
  display: flex; align-items: center; gap: 8px;
}
.section-title::before {
  content: ''; display: inline-block; width: 3px; height: 13px;
  background: var(--primary); border-radius: 2px;
}

/* ===== 按钮（文档 1.4）===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent;
  background: var(--primary);
  color: #fff;
  font-size: 14.5px; font-weight: 600;
  font-family: inherit;
  padding: 10px 18px;
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: background-color 0.15s, transform 0.1s, box-shadow 0.15s;
  min-height: 44px;
  box-shadow: var(--shadow-purple);
}
.btn:active { transform: scale(0.97); }
.btn:hover { background: var(--primary-dark); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.btn-ghost {
  background: var(--gray-soft);
  color: var(--text);
  border-color: transparent;
  box-shadow: none;
}
.btn-ghost:hover { background: var(--hair); }
.btn-danger {
  background: var(--surface);
  color: var(--red);
  border-color: var(--border);
  box-shadow: none;
}
.btn-danger:hover { background: var(--red-bg); border-color: rgba(239, 68, 68, 0.35); }
.btn-solid-danger { background: var(--red); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { font-size: 13px; padding: 5px 12px; min-height: 28px; border-radius: var(--r-sm); box-shadow: none; }
.btn-lg {
  font-size: 17px; padding: 15px 20px; min-height: 52px;
  border-radius: var(--r-xl); font-weight: 600; letter-spacing: 0.01em;
}

/* ===== 输入（文档 1.6）===== */
.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 12.5px; color: var(--text-2);
  margin-bottom: 6px; font-weight: 600;
}
.input, .select, .textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--text);
  background: var(--surface);
  border: 1.4px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}
.textarea { min-height: 76px; resize: vertical; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 32px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

/* ===== 徽章（文档 1.5）===== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.7;
}
.badge-green { background: var(--green-soft); color: var(--green-deep); }
.badge-red { background: var(--red-soft); color: var(--red-deep); }
.badge-amber { background: var(--amber-soft); color: var(--amber-deep); }
.badge-blue { background: var(--blue-soft); color: var(--blue-deep); }
.badge-purple { background: var(--primary-light); color: var(--primary-dark); }
.badge-gray { background: var(--gray-soft); color: var(--text-2); }

/* ===== 统计 ===== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}
.stat .num {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.6px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat .label { font-size: 12.5px; color: var(--text-2); margin-top: 4px; font-weight: 500; }
.stat.green .num { color: var(--green-deep); }
.stat.amber .num { color: var(--amber-deep); }

/* 大字报：紫色渐变卡（文档 6.3 .board-big） */
.stat.hero {
  padding: 24px 26px;
  border: none;
  border-radius: var(--r-3xl);
  background: linear-gradient(135deg, #7C3AED, #5B21B6);
  box-shadow: 0 12px 32px rgba(124, 58, 237, 0.28);
  position: relative;
  overflow: hidden;
}
.stat.hero::after {
  content: ''; position: absolute; top: -80px; right: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}
.stat.hero .num { color: #FFFFFF; font-size: 60px; font-weight: 700; position: relative; }
.stat.hero .label { color: rgba(255, 255, 255, 0.88); font-size: 14px; position: relative; }
/* hero 内的次要文字与内联 <b> 统一转白，避免紫底上出现深色字 */
.stat.hero .muted,
.stat.hero .small,
.stat.hero b { color: rgba(255, 255, 255, 0.92) !important; }
.stat.hero .bar { background: rgba(255, 255, 255, 0.22); }
.stat.hero .bar > i { background: #FFFFFF; }

/* ===== 进度条 ===== */
.bar { height: 8px; background: var(--hair-2); border-radius: 999px; overflow: hidden; }
.bar > i {
  display: block; height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.bar.green > i { background: var(--green); }
.bar.amber > i { background: var(--amber); }

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left;
  font-size: 12px; font-weight: 700; color: var(--text-3);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: var(--surface-2);
}
td { padding: 12px; border-bottom: 1px solid var(--hair-2); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--surface-2); }
tbody tr.checked-row { background: linear-gradient(90deg, var(--primary-softer), transparent 40%); }
.num-cell { font-variant-numeric: tabular-nums; }

/* ===== 提示 ===== */
.hint { font-size: 13px; color: var(--text-2); margin: 4px 0; }
.alert {
  border-radius: var(--r-lg);
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 14px;
  border: 1px solid transparent;
}
.alert-red { background: var(--red-bg); color: var(--red-deep); border-color: rgba(239, 68, 68, 0.22); }
.alert-amber { background: var(--amber-bg); color: var(--amber-deep); border-color: rgba(245, 158, 11, 0.22); }
.alert-green { background: var(--green-bg); color: var(--green-deep); border-color: rgba(16, 185, 129, 0.22); }
.alert-blue { background: var(--blue-soft); color: var(--blue-deep); border-color: rgba(59, 130, 246, 0.22); }

/* ===== 空状态 ===== */
.empty { text-align: center; padding: 48px 20px; color: var(--text-2); }
.empty .big { font-size: 44px; margin-bottom: 10px; opacity: 0.35; }

/* ===== 入口卡片 ===== */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.entry {
  display: block;
  background: var(--surface);
  border: 1.4px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-md);
  color: var(--text);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.entry:hover {
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--text);
  border-color: var(--primary-tint);
  box-shadow: var(--shadow-hover);
}
.entry .t { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.entry .d { font-size: 13px; color: var(--text-2); line-height: 1.6; }
.entry .icon {
  width: 40px; height: 40px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 14px;
}
.entry .icon.red { background: var(--primary); color: #fff; }
.entry .icon.soft-red { background: var(--primary-light); color: var(--primary-dark); }
.entry .icon.green { background: var(--green-soft); color: var(--green-deep); }
.entry .icon.blue { background: var(--blue-soft); color: var(--blue-deep); }
.entry .icon.purple { background: var(--primary-light); color: var(--primary-dark); }

/* ===== 签到结果 ===== */
.result-card { text-align: center; padding: 8px 0 4px; }
.result-avatar {
  width: 76px; height: 76px; border-radius: 50%;
  margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 700;
  color: #fff; background: var(--primary);
  box-shadow: var(--shadow-purple);
}
.result-avatar.green { background: var(--green); box-shadow: none; }
.result-avatar.red { background: var(--red); box-shadow: none; }
.result-name { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; }
.result-meta { font-size: 15px; color: var(--text-2); margin-top: 6px; }

/* ===== 大字数字（KPI） ===== */
.big-num {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ===== 专业色块：珠艺云图 4 专业（紫 / 蓝 / 绿 / 琥珀）===== */
.major-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.major-tag.m1 { background: var(--primary-light); color: var(--primary-dark); }  /* 动漫制作技术 — 紫 */
.major-tag.m2 { background: var(--blue-soft);    color: var(--blue-deep); }      /* 动漫设计 — 蓝 */
.major-tag.m3 { background: var(--green-soft);   color: var(--green-deep); }     /* 影视动画 — 绿 */
.major-tag.m4 { background: var(--amber-soft);   color: var(--amber-deep); }     /* 影视多媒体 — 琥珀 */

/* ===== toast ===== */
#toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: #fff;
  padding: 11px 20px;
  border-radius: var(--r-lg);
  font-size: 14px;
  font-weight: 600;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
  box-shadow: var(--shadow-lg);
  max-width: 90vw;
  text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.error { background: var(--red); }
#toast.success { background: var(--green-deep); }

/* ===== 模态（文档：radius-xl 20px + shadow-modal）===== */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  z-index: 90;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 22px;
  width: 100%;
  max-width: 440px;
  max-height: 86vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
}
.modal h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.modal .desc { font-size: 14px; color: var(--text-2); margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* ===== 杂项 ===== */
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > .grow { flex: 1; min-width: 160px; }
.spacer-8 { height: 8px; } .spacer-16 { height: 16px; }
.right { text-align: right; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
/* 等宽字段：学号 / 身份证 / 手机号（文档 1.2） */
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hair-2);
}
.list-row:last-child { border-bottom: none; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .t { font-size: 15px; font-weight: 600; }
.list-row .s { font-size: 12px; color: var(--text-2); }

.switch-line { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; user-select: none; }
.switch-line input { width: 17px; height: 17px; accent-color: var(--primary); }

/* ===== 移动端 ===== */
@media (max-width: 768px) {
  .wrap, .wrap-narrow { padding: 16px 14px 80px; }
  .topbar-inner { padding: 10px 14px; min-height: 56px; }
  .stat.hero { padding: 20px; border-radius: var(--r-2xl); }
  .stat.hero .num { font-size: 48px; }
  .card { padding: 16px; border-radius: var(--r-xl); }
  .btn-lg { font-size: 16px; padding: 14px 18px; min-height: 50px; }
  .entry { padding: 18px; }
  .stat-grid { gap: 10px; }
  .stat { padding: 14px 16px; }
  .stat .num { font-size: 26px; }
  th, td { padding: 10px 8px; font-size: 13px; }
}
