/* 浦江科德高中 · 学生测评中心 —— 与「每日出勤看板」同一套视觉模板 */
:root {
  --brand: #1a5aa8;
  --brand-deep: #123f77;
  --brand-bg: #e9f1fa;
  --bg: #f2f5f9;
  --card: #ffffff;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(20, 50, 90, 0.07), 0 4px 14px rgba(20, 50, 90, 0.05);
  --green: #2e9e63;  --green-deep: #1e7a4a;  --green-bg: #e7f5ed;
  --red: #e0701e;    --red-bg: #fdeee0;
  --orange: #c99a12; --orange-bg: #faf3d7;
  --blue: #3b7dd8;   --blue-bg: #e9f1fc;
  --gray: #8a938e;   --gray-bg: #eef1ef;
  --ink: #243029;  --ink-2: #4c5851;  --ink-3: #8a938e;
  --line: #e2e8ee;
  --font-num: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
}

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

.container { max-width: 880px; margin: 0 auto; padding: 20px 24px 40px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ===== 顶栏：logo 方块 + eyebrow + 标题 ===== */
.site-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  margin-bottom: 20px;
}
.logo-badge {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(26, 90, 168, .35);
}
.eyebrow {
  font-size: 11px;
  letter-spacing: .14em;
  font-weight: 600;
  color: var(--brand);
  text-transform: uppercase;
}
.site-header h1 { font-size: 26px; font-weight: 700; color: var(--ink); line-height: 1.3; }

/* ===== 区块标题 ===== */
.section-head { margin: 4px 0 16px; }
.section-title { font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.section-note { font-size: .88rem; color: var(--ink-3); margin-top: 2px; }

/* ===== 按钮 ===== */
.btn {
  display: inline-block;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  padding: 11px 24px;
  font-size: .95rem;
  font-weight: 600;
  font-family: inherit;
  transition: background .15s, box-shadow .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-deep); }
.btn-block { width: 100%; }
.btn-link {
  background: #fff;
  color: var(--brand);
  border: 1px solid #c7d7ee;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
}
.btn-link:hover { background: var(--brand-bg); }
.btn-ghost { background: var(--gray-bg); color: var(--ink-2); }
.btn-ghost:hover { background: #e2e8e4; }
.btn-ghost:disabled { opacity: .45; cursor: not-allowed; }
.btn-sm { padding: 7px 14px; font-size: .85rem; }

/* ===== 首页 ===== */
.welcome-card { padding: 26px 28px; margin-bottom: 20px; border-top: 4px solid var(--brand); }
.welcome-card h2 { font-size: 1.25rem; color: var(--ink); margin: 6px 0 10px; }
.welcome-card p { color: var(--ink-2); font-size: .95rem; max-width: 640px; }

.entry-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.entry-card {
  display: block;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 24px;
  border-left: 5px solid var(--brand);
  transition: transform .15s ease, box-shadow .15s ease;
  color: var(--ink);
}
.entry-card--green { border-left-color: var(--green); }
.entry-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(20, 50, 90, .12); }
.entry-tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--brand-bg);
  color: var(--brand);
  margin-bottom: 12px;
}
.entry-card--green .entry-tag { background: var(--green-bg); color: var(--green-deep); }
.entry-title { display: block; font-size: 1.3rem; font-weight: 700; margin-bottom: 6px; }
.entry-desc { display: block; font-size: .9rem; color: var(--ink-3); }
.entry-meta { display: block; font-size: .8rem; color: var(--ink-3); margin-top: 14px; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.home-footer { text-align: center; margin-top: 28px; }
.home-footer a { color: var(--ink-3); font-size: .85rem; }
.home-footer a:hover { color: var(--brand); }

/* ===== 答题页 ===== */
.panel { padding: 26px 28px; }
.info-form label { display: block; margin-bottom: 16px; }
.info-form label span { display: block; font-size: .88rem; color: var(--ink-2); margin-bottom: 6px; }
.info-form em { color: var(--red); font-style: normal; }
.info-form input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
  background: #fbfcfe;
}
.info-form input:focus { border-color: var(--brand); background: #fff; }

.progress-wrap { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.progress-bar { flex: 1; height: 8px; background: var(--gray-bg); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--blue)); border-radius: 99px; transition: width .25s ease; }
.progress-text { font-size: .8rem; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }

.question-card h2 { font-size: 1.15rem; line-height: 1.7; margin-bottom: 20px; }
.q-options { display: grid; gap: 12px; }
.opt-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: #fbfcfe;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.opt-btn:hover { border-color: var(--brand); background: var(--brand-bg); }
.opt-btn.selected { border-color: var(--brand); background: var(--brand-bg); }
.opt-tag {
  flex: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--gray-bg);
  color: var(--ink-3);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700;
}
.opt-btn.selected .opt-tag { background: var(--brand); color: #fff; }

.quiz-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; }
.q-counter { font-size: .85rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.fade-in { animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.panel-done { text-align: center; padding: 48px 28px; border-top: 4px solid var(--green); }
.done-icon {
  width: 60px; height: 60px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 1.8rem;
  display: flex; align-items: center; justify-content: center;
}
.panel-done h2 { font-size: 1.3rem; margin-bottom: 8px; }
.panel-done p { color: var(--ink-2); margin-bottom: 24px; }

/* ===== 教师页 ===== */
.teacher-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 4px 0 16px; }
.teacher-header h2 { font-size: 1.15rem; font-weight: 700; }
.teacher-header .actions { display: flex; gap: 10px; }

.login-box { max-width: 400px; margin: 40px auto; padding: 30px 28px; border-top: 4px solid var(--brand); }
.login-box h2 { text-align: center; font-size: 1.2rem; margin-bottom: 20px; }

.records-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.records-table th, .records-table td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.records-table th { color: var(--ink-3); font-weight: 600; font-size: .8rem; letter-spacing: .04em; }
.records-table tr:hover td { background: #f8fbff; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-weight: 600; }
.badge-blue { background: var(--blue-bg); color: var(--brand-deep); }
.badge-green { background: var(--green-bg); color: var(--green-deep); }
.badge-gray { background: var(--gray-bg); color: var(--ink-2); }
.table-wrap { overflow-x: auto; }
.empty-tip { text-align: center; color: var(--ink-3); padding: 40px 0; }
.time-cell { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: .85rem; color: var(--ink-2); }

@media (max-width: 640px) {
  .site-header h1 { font-size: 20px; }
  .entry-cards { grid-template-columns: 1fr; }
  .panel, .welcome-card { padding: 20px 18px; }
  .container { padding: 14px 14px 32px; }
}
