/* ============================================================
 * v22 · 考试中心专属样式（作用域 .exam-hub，不影响站内其它页面）
 * 风格：小清新薄荷 + 天青渐变，玻璃卡片，柔和动效
 * ============================================================ */
.exam-hub {
  --hub-mint: #3f9d8b;
  --hub-mint-l: #72c1a9;
  --hub-sky: #4bb7d8;
  --hub-lilac: #9b8cf0;
  --hub-ink: #22433c;
  --hub-ink-2: #6d8a83;
  --hub-line: rgba(63, 157, 139, .16);
  --hub-card: rgba(255, 255, 255, .88);
  --hub-shadow: 0 10px 34px rgba(45, 115, 100, .10);
  --hub-shadow-h: 0 18px 44px rgba(45, 115, 100, .20);
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 4px 2px 56px;
  color: var(--hub-ink);
  font-size: 15px;
}
.exam-hub * { box-sizing: border-box; }
.exam-hub a { text-decoration: none; }

/* ---------- Hero ---------- */
.hub-hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 40px 44px 38px;
  color: #fff;
  background: linear-gradient(118deg, #2f8f80 0%, #43ab9c 42%, #4fb6c6 76%, #7cc9d8 100%);
  box-shadow: 0 20px 48px rgba(47, 143, 128, .24);
  isolation: isolate;
}
.hub-hero::before,
.hub-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
}
.hub-hero::before {
  width: 360px; height: 360px; right: -70px; top: -190px;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.42), rgba(255,255,255,0) 68%);
}
.hub-hero::after {
  width: 260px; height: 260px; left: 42%; bottom: -190px;
  background: radial-gradient(circle at 50% 50%, rgba(155,140,240,.32), rgba(255,255,255,0) 70%);
}
.hub-hero__ring {
  position: absolute; right: 7%; top: 24%;
  width: 132px; height: 132px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.34);
  box-shadow: 0 0 0 26px rgba(255,255,255,.06), 0 0 0 54px rgba(255,255,255,.05);
  z-index: -1;
  animation: hubFloat 7s ease-in-out infinite;
}
@keyframes hubFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(12deg); }
}
.hub-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 14px; border-radius: 999px;
  background: rgba(255,255,255,.20);
  border: 1px solid rgba(255,255,255,.34);
  font-size: 12px; font-weight: 700; letter-spacing: .14em;
  backdrop-filter: blur(6px);
}
/* 全局 h1/h2 规则会覆盖继承色，这里显式锁定白字保证渐变底上的对比度 */
.hub-hero h1, .hub-hero h2, .hub-hero h3, .hub-hero h4 { color: #fff !important; }
.hub-hero h1 {
  margin: 18px 0 10px;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 800; letter-spacing: .04em;
  text-shadow: 0 4px 18px rgba(20, 80, 70, .18);
}
.hub-hero p { margin: 0; font-size: 15px; opacity: .93; line-height: 1.8; color: #fff; }
.hub-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hub-hero__btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 700;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.hub-hero__btn--solid { background: #fff; color: #2f8f80; box-shadow: 0 8px 20px rgba(20,80,70,.18); }
.hub-hero__btn--ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.5); }
.hub-hero__btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(20,80,70,.24); }

/* ---------- 顶部必读提示 ---------- */
.hub-notice {
  display: flex; align-items: flex-start; gap: 16px;
  margin: 22px 0 20px; padding: 18px 22px;
  border-radius: 20px;
  background: linear-gradient(100deg, #fff8e8 0%, #fffdf7 62%, #f4fbf7 100%);
  border: 1px solid #f4dfae;
  box-shadow: 0 8px 24px rgba(190, 145, 55, .10);
}
.hub-notice__icon {
  flex: none; width: 40px; height: 40px; border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #f7b955, #f2a03c);
  color: #fff; font-size: 21px; font-weight: 800;
  box-shadow: 0 6px 16px rgba(242,160,60,.34);
}
.hub-notice b { display: block; font-size: 15.5px; color: #8a6120; margin-bottom: 4px; }
.hub-notice p { margin: 0; font-size: 13.6px; line-height: 1.85; color: #8a7350; }
.hub-notice a { color: #c07a1e; font-weight: 700; border-bottom: 1px dashed #d9a85a; }
.hub-notice strong { color: #a6631a; }

/* ---------- 统计 ---------- */
.hub-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.hub-stat {
  position: relative; overflow: hidden;
  padding: 16px 18px; border-radius: 18px;
  background: var(--hub-card); border: 1px solid var(--hub-line);
  box-shadow: var(--hub-shadow);
  backdrop-filter: blur(8px);
  transition: transform .2s, box-shadow .2s;
}
.hub-stat:hover { transform: translateY(-3px); box-shadow: var(--hub-shadow-h); }
.hub-stat::after {
  content: ''; position: absolute; right: -18px; top: -18px;
  width: 70px; height: 70px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(114,193,169,.20), rgba(75,183,216,.14));
}
.hub-stat__label { font-size: 12px; color: var(--hub-ink-2); font-weight: 600; letter-spacing: .04em; }
.hub-stat__value { font-size: 27px; font-weight: 800; line-height: 1.3; color: var(--hub-mint); }
.hub-stat:nth-child(2) .hub-stat__value { color: var(--hub-sky); }
.hub-stat:nth-child(3) .hub-stat__value { color: var(--hub-lilac); }
.hub-stat:nth-child(4) .hub-stat__value { color: #e2954a; }

/* ---------- 管理工具条 ---------- */
.hub-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 14px 18px; margin-bottom: 24px;
  border-radius: 18px;
  background: linear-gradient(100deg, rgba(226,244,236,.9), rgba(232,247,250,.9));
  border: 1px dashed var(--hub-line);
}
.hub-toolbar__label { font-size: 13px; font-weight: 700; color: var(--hub-ink-2); margin-right: 4px; }

/* ---------- 通用按钮 ---------- */
.hub-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; cursor: pointer; font-size: 13px; font-weight: 700;
  padding: 9px 16px; border-radius: 11px;
  transition: transform .18s, box-shadow .18s, filter .18s;
  white-space: nowrap;
}
.hub-btn:hover { transform: translateY(-2px); filter: brightness(1.04); }
.hub-btn--primary { color: #fff; background: linear-gradient(135deg, #3f9d8b, #4bb7d8); box-shadow: 0 6px 16px rgba(63,157,139,.28); }
.hub-btn--go { color: #fff; background: linear-gradient(135deg, #4aa897, #56b6c6); box-shadow: 0 6px 16px rgba(63,157,139,.24); }
.hub-btn--ghost { color: var(--hub-mint); background: #fff; border: 1px solid var(--hub-line); }
.hub-btn--soft { color: #317d70; background: #e8f7f1; border: 1px solid #c9e9dd; }
.hub-btn--danger { color: #c0453b; background: #fff2f0; border: 1px solid #f6d5d0; }
.hub-btn--sm { padding: 6px 11px; font-size: 12px; border-radius: 9px; }

/* ---------- 分组 ---------- */
.hub-group {
  margin-bottom: 26px; padding: 0 0 22px;
  border-radius: 24px;
  background: var(--hub-card);
  border: 1px solid var(--hub-line);
  box-shadow: var(--hub-shadow);
  overflow: hidden;
  backdrop-filter: blur(8px);
}
.hub-group__head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 18px 22px 16px;
  background: linear-gradient(100deg, rgba(226,244,236,.82), rgba(235,249,251,.55) 65%, rgba(255,255,255,0));
  border-bottom: 1px solid var(--hub-line);
}
.hub-group__badge {
  flex: none; width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  color: #fff; font-size: 15px; font-weight: 800; letter-spacing: .02em;
  background: linear-gradient(135deg, #4aa897, #56b6c6);
  box-shadow: 0 6px 16px rgba(74,168,151,.30);
}
.hub-group__title { flex: 1 1 200px; min-width: 0; }
.hub-group__title h2 { margin: 0; font-size: 18px; font-weight: 800; color: var(--hub-ink); }
.hub-group__title p { margin: 3px 0 0; font-size: 12.5px; color: var(--hub-ink-2); }
.hub-group__count {
  padding: 5px 13px; border-radius: 999px; font-size: 12px; font-weight: 700;
  color: #317d70; background: #e5f6ef; border: 1px solid #c9e9dd;
}
.hub-group__tools { display: flex; gap: 6px; align-items: center; }
.hub-group__tools form { margin: 0; }
.hub-group__body { padding: 20px 22px 2px; }

/* ---------- 考试卡片网格 ---------- */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 16px; }
.hub-exam {
  position: relative; display: flex; flex-direction: column;
  min-height: 172px; padding: 18px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(63,157,139,.14);
  box-shadow: 0 6px 18px rgba(45,115,100,.07);
  transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s, border-color .22s;
  overflow: hidden;
}
.hub-exam::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, #4aa897, #56b6c6, #9b8cf0);
  opacity: .8;
}
.hub-exam:hover { transform: translateY(-6px); box-shadow: var(--hub-shadow-h); border-color: rgba(63,157,139,.38); }
.hub-exam__top { display: flex; gap: 12px; align-items: flex-start; }
.hub-exam__icon {
  flex: none; width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center; font-size: 20px;
  background: linear-gradient(135deg, #e6f7f0, #e4f4fa);
  border: 1px solid #d5eee5;
  transition: transform .25s;
}
.hub-exam:hover .hub-exam__icon { transform: rotate(-8deg) scale(1.08); }
.hub-exam__name { margin: 1px 0 5px; font-size: 15.5px; font-weight: 800; line-height: 1.5; word-break: break-word; }
.hub-exam__host {
  display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11.5px; color: var(--hub-ink-2);
  background: #f4f8f7; border-radius: 6px; padding: 2px 8px;
}
.hub-exam__foot { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: auto; padding-top: 16px; }
.hub-exam__foot form { margin: 0; }

/* ---------- 空状态 ---------- */
.hub-empty {
  padding: 26px 18px; text-align: center; color: var(--hub-ink-2);
  font-size: 13.5px; border: 1px dashed var(--hub-line); border-radius: 16px;
  background: rgba(241,250,246,.6);
}
.hub-empty--big { padding: 60px 20px; font-size: 15px; }
.hub-empty__ic { display: block; font-size: 38px; margin-bottom: 10px; }

/* ---------- 模态框微调 ---------- */
.exam-hub .modal-content { border-radius: 20px; border: 1px solid var(--hub-line); box-shadow: 0 24px 60px rgba(30,90,78,.22); }
.exam-hub .modal-header { border-bottom: 1px solid var(--hub-line); background: linear-gradient(100deg, #f0faf5, #f2fbfd); border-radius: 20px 20px 0 0; }
.exam-hub .modal-title { font-weight: 800; color: var(--hub-ink); }
.exam-hub .modal-footer { border-top: 1px solid var(--hub-line); }
.exam-hub .form-label { font-size: 13px; font-weight: 700; color: var(--hub-ink-2); }
.exam-hub .form-control, .exam-hub .form-select { border-radius: 10px; border-color: #d9eae4; }
.exam-hub .form-control:focus, .exam-hub .form-select:focus { border-color: var(--hub-mint); box-shadow: 0 0 0 3px rgba(63,157,139,.14); }

/* ---------- 记录页 ---------- */
.hub-page-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 22px 0 18px; }
.hub-page-head h2 { margin: 0; font-size: 22px; font-weight: 800; }
.hub-page-head p { margin: 4px 0 0; font-size: 13px; color: var(--hub-ink-2); }
.hub-table-wrap {
  border-radius: 20px; overflow: hidden;
  background: var(--hub-card); border: 1px solid var(--hub-line); box-shadow: var(--hub-shadow);
}
.hub-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.hub-table th {
  padding: 13px 16px; text-align: left; font-size: 12px; letter-spacing: .04em;
  color: #317d70; background: linear-gradient(100deg, #e8f7f0, #eef9fb); font-weight: 800;
  white-space: nowrap;
}
.hub-table td { padding: 13px 16px; border-top: 1px solid rgba(63,157,139,.10); vertical-align: middle; }
.hub-table tbody tr { transition: background .16s; }
.hub-table tbody tr:hover { background: rgba(226,244,236,.42); }
.hub-table .hub-link { color: var(--hub-mint); font-weight: 700; word-break: break-all; }
.hub-table .hub-name { font-weight: 700; }
.hub-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; background: #e8f7f1; color: #317d70; }
.hub-search { display: flex; gap: 8px; flex-wrap: wrap; }
.hub-search input { min-width: 220px; }

/* ---------- 暗色模式 ---------- */
html.dark .exam-hub {
  --hub-ink: #dcefe8;
  --hub-ink-2: #9ab8af;
  --hub-line: rgba(120, 200, 175, .20);
  --hub-card: rgba(24, 42, 36, .86);
  --hub-shadow: 0 10px 34px rgba(0, 0, 0, .26);
  --hub-shadow-h: 0 18px 44px rgba(0, 0, 0, .38);
}
html.dark .hub-exam { background: #1b2e27; border-color: rgba(120,200,175,.18); }
html.dark .hub-exam__icon { background: #234038; border-color: #2f5448; }
html.dark .hub-exam__host { background: #223a32; color: #a9c8be; }
html.dark .hub-notice { background: linear-gradient(100deg, #3a3020, #2b302a); border-color: #5c4c2c; }
html.dark .hub-notice b { color: #f3c87a; }
html.dark .hub-notice p { color: #d8c6a2; }
html.dark .hub-group__head { background: linear-gradient(100deg, rgba(35,66,56,.82), rgba(30,58,62,.4)); }
html.dark .hub-toolbar { background: linear-gradient(100deg, rgba(35,66,56,.7), rgba(30,58,62,.6)); }
html.dark .hub-empty { background: rgba(30,54,46,.5); }
html.dark .hub-table th { background: #234038; color: #a9e2cd; }
html.dark .hub-table tbody tr:hover { background: rgba(60,110,92,.22); }
html.dark .hub-pill { background: #234038; color: #a9e2cd; }
html.dark .hub-btn--ghost { background: #233b33; color: #b9e6d5; border-color: #33564a; }
html.dark .hub-btn--soft { background: #24453a; color: #b9e6d5; border-color: #33564a; }
html.dark .exam-hub .modal-content { background: #1b2e27; }
html.dark .exam-hub .modal-header { background: #234038; }
html.dark .exam-hub .form-control, html.dark .exam-hub .form-select { background: #20372e; border-color: #33564a; color: #dcefe8; }

/* ---------- 响应式 ---------- */
@media (max-width: 767.98px) {
  .hub-hero { padding: 30px 24px; border-radius: 22px; }
  .hub-hero__ring { display: none; }
  .hub-stats { grid-template-columns: repeat(2, 1fr); }
  .hub-group__head { padding: 15px 16px; }
  .hub-group__body { padding: 16px 14px 2px; }
  .hub-grid { grid-template-columns: 1fr; }
  .hub-table-wrap { overflow-x: auto; }
  .hub-table { min-width: 620px; }
}
