/* Seedling 全局样式（S1.6）：功能优先、干净统一，高级视觉留待后续阶段 */

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: #f5f6f8;
  margin: 0;
  color: #2b2f36;
  font-size: 14px;
}

a { color: #2f6fed; text-decoration: none; }
a:hover { text-decoration: underline; }

/* 顶栏 */
.topbar { background: #2f6fed; color: #fff; }
.topbar-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 20px; height: 52px;
  display: flex; align-items: center; gap: 24px;
}
.brand { color: #fff; font-size: 18px; font-weight: 700; }
.brand:hover { text-decoration: none; }
.topnav { display: flex; gap: 4px; flex: 1; }
.topnav a {
  color: rgba(255, 255, 255, .88); font-size: 13px; padding: 6px 10px; border-radius: 4px;
}
.topnav a:hover { background: rgba(255, 255, 255, .16); text-decoration: none; }
.userbox { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.userbox .who { color: rgba(255, 255, 255, .9); }
.userbox a { color: #fff; font-size: 13px; }
.logout-form { margin: 0; }
.logout-form button {
  background: none; border: 0; color: #fff; cursor: pointer; font-size: 13px; padding: 0;
}
.logout-form button:hover { text-decoration: underline; }

/* 页面容器 */
.wrap {
  max-width: 760px; margin: 32px auto; background: #fff; border-radius: 8px;
  padding: 28px 32px; box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
}
.wrap.wide { max-width: 1080px; }
.page-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; gap: 16px; flex-wrap: wrap;
}
.page-head h2 { font-size: 18px; margin: 0; }
.page-head .sub { color: #888; font-size: 13px; margin: 4px 0 0; }

/* 卡片 */
.card {
  background: #fff; border: 1px solid #ececf0; border-radius: 8px;
  padding: 20px 24px; margin-bottom: 20px;
}
.card h3 { font-size: 15px; margin: 0 0 14px; }

/* 表格 */
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th, table.grid td {
  border-bottom: 1px solid #eee; padding: 10px 8px; text-align: left; vertical-align: middle;
}
table.grid th { color: #888; font-weight: normal; white-space: nowrap; }
table.grid tr:hover td { background: #fafbfd; }
table.grid .empty { color: #999; text-align: center; padding: 28px 8px; }

/* 徽章 */
.badge { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 12px; white-space: nowrap; }
.badge.on { background: #e8f7ee; color: #1e7e46; }
.badge.off { background: #fdecea; color: #c0392b; }
.badge.neutral { background: #eef4ff; color: #2f6fed; }

/* 按钮 */
.btn {
  display: inline-block; background: #2f6fed; color: #fff; border: 0; border-radius: 4px;
  padding: 8px 16px; font-size: 14px; cursor: pointer; text-decoration: none; line-height: 1.4;
}
.btn:hover { background: #245fd0; text-decoration: none; }
.btn.plain { background: #fff; color: #2f6fed; border: 1px solid #c9d8f8; }
.btn.plain:hover { background: #f2f6ff; }
.btn.danger { background: #fff; color: #c0392b; border: 1px solid #f0c6c0; }
.btn.danger:hover { background: #fdf3f2; }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* 表单 */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 13px; color: #555; margin-bottom: 4px; }
.field label .req { color: #c0392b; margin-left: 2px; }
.field .hint { color: #999; font-size: 12px; margin-top: 4px; }
input[type="text"], input[type="email"], input[type="number"], input[type="password"], select {
  width: 100%; padding: 8px 10px; border: 1px solid #d7dae0; border-radius: 4px;
  font-size: 14px; font-family: inherit; background: #fff;
}
input:focus, select:focus { outline: 2px solid rgba(47, 111, 237, .25); border-color: #2f6fed; }
input[type="file"] { font-size: 13px; }

.inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline-form input[type="text"], .inline-form select { width: auto; min-width: 200px; }

/* 筛选条 */
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filters input[type="text"] { min-width: 240px; width: auto; }
.filters select { width: auto; min-width: 140px; }
.filters .count { color: #888; font-size: 13px; margin-left: auto; }

/* 消息提示 */
.msg { border-radius: 4px; padding: 10px 12px; font-size: 13px; margin: 12px 0; }
.msg.err { background: #fdecea; color: #c0392b; }
.msg.ok { background: #e8f7ee; color: #1e7e46; }

/* 详情页 */
.detail-grid { display: grid; grid-template-columns: 160px 1fr; gap: 0; }
.detail-grid dt {
  padding: 10px 12px; color: #888; border-bottom: 1px solid #f0f0f3;
}
.detail-grid dd {
  padding: 10px 12px; margin: 0; border-bottom: 1px solid #f0f0f3; word-break: break-all;
}
.photo-box img {
  width: 160px; height: 200px; object-fit: cover; border-radius: 6px;
  border: 1px solid #e5e7ec; display: block; background: #fafbfc;
}
.photo-box .no-photo {
  width: 160px; height: 200px; border: 1px dashed #d7dae0; border-radius: 6px;
  display: flex; align-items: center; justify-content: center; color: #aaa; font-size: 13px;
}

/* 上传行 */
.upload-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 0; }
.upload-row .cur { color: #666; font-size: 13px; }

/* 工作台入口 */
.role-tag {
  display: inline-block; background: #eef4ff; color: #2f6fed; border-radius: 12px;
  padding: 3px 12px; font-size: 13px;
}
.entry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 18px; }
.entry-card {
  display: block; border: 1px solid #e6e9f0; border-radius: 8px; padding: 18px 20px;
  background: #fff; color: inherit;
}
.entry-card:hover { border-color: #2f6fed; text-decoration: none; box-shadow: 0 2px 8px rgba(47, 111, 237, .12); }
.entry-card .t { font-size: 15px; font-weight: 600; color: #2b2f36; margin-bottom: 6px; }
.entry-card .d { font-size: 12px; color: #999; line-height: 1.6; }

@media (max-width: 720px) {
  .topbar-inner { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px; }
  .wrap { margin: 16px; padding: 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 110px 1fr; }
}

/* 题库选项编辑行 */
.opt-row { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.opt-row input[type="text"] { flex: 1; }
.opt-row input[type="radio"] { width: 18px; height: 18px; }
.opt-row.degree .opt-text { flex: 1; }
.opt-row.degree .opt-score { width: 110px; }

/* 弹层（问卷二维码） */
.modal-mask {
  position: fixed; inset: 0; background: rgba(20, 24, 33, .45);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal {
  background: #fff; border-radius: 10px; padding: 24px 28px; max-width: 420px; width: 100%;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .18); text-align: center;
}
.modal h3 { margin: 0 0 14px; font-size: 16px; }
.qr-box img { width: 220px; height: 220px; border: 1px solid #eee; border-radius: 6px; }
.qr-url { word-break: break-all; font-size: 13px; color: #2f6fed; margin: 12px 0 4px; }
.modal .hint { color: #999; font-size: 12px; }

/* 问卷结果成绩格 */
.score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.score-item { border: 1px solid #ececf0; border-radius: 6px; padding: 12px 14px; background: #fafbfd; }
.score-item .k { color: #999; font-size: 12px; margin-bottom: 4px; }
.score-item .v { font-size: 16px; font-weight: 600; color: #2b2f36; }

/* 流程状态徽标配色 */
.badge.st { font-size: 13px; padding: 4px 12px; margin-left: 8px; }
.badge.st-draft { background: #eef0f3; color: #5a6270; }
.badge.st-progress { background: #eef4ff; color: #2f6fed; }
.badge.st-wait { background: #fdf1e3; color: #b26a00; }
.badge.st-active { background: #e6f7f3; color: #0f7b6c; }
.badge.st-good { background: #e8f7ee; color: #1e7e46; }
.badge.st-bad { background: #fdecea; color: #c0392b; }
.badge.st-grey { background: #eef0f3; color: #9aa1ad; }

/* 面试/评价记录项 */
.record-item { border: 1px solid #ececf0; border-radius: 8px; padding: 12px 16px; margin-bottom: 10px; }
.record-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.record-title { font-weight: 600; font-size: 14px; }
.record-meta { color: #999; font-size: 12px; }
.record-scores { color: #2f6fed; font-size: 13px; margin-top: 6px; }
.record-comment { color: #555; font-size: 13px; margin-top: 6px; line-height: 1.7; white-space: pre-wrap; }

/* 表单文本域 */
textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #d7dae0; border-radius: 4px;
  font-size: 14px; font-family: inherit; resize: vertical;
}
textarea:focus { outline: 2px solid rgba(47, 111, 237, .25); border-color: #2f6fed; }
