* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f6f8;
  color: #333;
  font-size: 15px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}

h1 { font-size: 22px; margin: 0 0 6px; }
h2 { font-size: 18px; margin: 0 0 12px; }

.sub { color: #888; font-size: 13px; margin: 0; }

.brand { padding: 40px 0 28px; }

.card {
  background: #fff;
  border-radius: 14px;
  padding: 18px 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.field {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}
.field:last-of-type { border-bottom: none; }
.field > span { width: 76px; color: #333; font-size: 15px; }
.field input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  text-align: right;
  background: transparent;
  color: #333;
}

.btn {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 13px 16px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  background: #eef0f3;
  color: #333;
}
.btn.primary { background: #2b5fd9; color: #fff; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.small { width: auto; display: inline-block; margin: 0; padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.danger { background: #fdecec; color: #d33; }

.msg { text-align: center; font-size: 14px; margin: 14px 0 0; min-height: 20px; color: #888; }
.msg.ok { color: #0a8f4c; }
.msg.err { color: #d33; }

.muted { color: #999; font-size: 13px; }
.center { text-align: center; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  color: #666;
}
.deadline.warn { color: #d33; }
.link {
  background: none;
  border: none;
  color: #2b5fd9;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}

.hint { font-size: 13px; color: #999; margin: 0 0 14px; }

.card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 4px;
}
.pname { font-size: 17px; font-weight: 600; color: #1a1a1a; flex: 1; }
.pdept { font-size: 12px; color: #888; }
.subtotal { font-size: 13px; color: #576b95; white-space: nowrap; }
.subtotal-num { color: #2b5fd9; }

.item-row {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed #f0f0f0;
}
.item-row:last-child { border-bottom: none; }
.item-text { flex: 1; font-size: 13px; color: #444; line-height: 1.45; padding-right: 10px; }
.item-input-wrap { display: flex; align-items: center; flex-shrink: 0; }
.item-input {
  width: 58px;
  height: 34px;
  border: 1px solid #ddd;
  border-radius: 8px;
  text-align: center;
  font-size: 15px;
  outline: none;
}
.item-input:focus { border-color: #2b5fd9; }
.item-max { font-size: 12px; color: #999; margin-left: 4px; }

.tabs {
  display: flex;
  background: #fff;
  border-radius: 12px;
  padding: 6px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.tab {
  flex: 1;
  text-align: center;
  font-size: 14px;
  padding: 9px 0;
  color: #666;
  border-radius: 8px;
  cursor: pointer;
}
.tab.active { background: #e8f0ff; color: #2b5fd9; font-weight: 600; }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }

.rank { background: #fff; border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.rank-head { display: flex; align-items: center; padding: 14px; cursor: pointer; }
.rank-no { width: 30px; font-size: 16px; font-weight: 600; color: #2b5fd9; }
.rank-mid { flex: 1; }
.rank-name { font-size: 15px; color: #1a1a1a; }
.rank-sub { font-size: 12px; color: #999; margin-top: 2px; }
.rank-score { font-size: 17px; font-weight: 600; color: #d33; }
.rank-detail { border-top: 1px solid #f0f0f0; padding: 8px 14px; }
.judge-row { display: flex; justify-content: space-between; font-size: 13px; color: #555; padding: 6px 0; border-bottom: 1px dashed #f5f5f5; }
.judge-row:last-child { border-bottom: none; }

.form-row { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid #f2f2f2; }
.form-row:last-child { border-bottom: none; }
.form-row > span { width: 86px; color: #333; font-size: 14px; flex-shrink: 0; }
.form-row input, .form-row select {
  flex: 1;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  outline: none;
  color: #333;
  background: #fff;
  min-width: 0;
}
.form-row input:focus { border-color: #2b5fd9; }

.editor-btns { display: flex; gap: 10px; margin-top: 12px; }
.editor-btns .btn { flex: 1; margin: 0; }

.manage-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
}
.mi-name { font-size: 15px; color: #1a1a1a; }
.mi-sub { font-size: 12px; color: #999; margin-top: 2px; }
.mi-btns { display: flex; gap: 8px; flex-shrink: 0; }

.qr-box { text-align: center; padding: 10px 0; }
.qr-box img { width: 220px; height: 220px; display: inline-block; background: #fff; }
.qr-url { font-size: 13px; color: #2b5fd9; word-break: break-all; margin-top: 8px; }
.qr-tip { font-size: 12px; color: #999; margin-top: 6px; }

.gate { margin-top: 60px; }
.gate input {
  width: 100%;
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  padding: 12px;
  font-size: 15px;
  outline: none;
  margin-top: 8px;
}
.gate input:focus { border-color: #2b5fd9; }

[hidden] { display: none !important; }

/* ===== 评分页：分类 / 要素 / 评审项目 / 分值 ===== */
.table-head {
  display: grid;
  grid-template-columns: 1fr 56px 84px;
  gap: 8px;
  padding: 8px 0;
  font-size: 12px;
  color: #999;
  border-bottom: 1px solid #eee;
}
.th-item { text-align: left; }
.th-max { text-align: center; }
.th-score { text-align: center; }

.category-block { margin-top: 10px; }

.cat-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  background: #eef3ff;
  color: #2b5fd9;
  font-size: 15px;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 8px;
  border-left: 4px solid #2b5fd9;
}

.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  background: #2b5fd9;
  color: #fff;
  border-radius: 4px;
  padding: 1px 5px;
  line-height: 1.5;
}
.tag-el { background: #8a93a6; }

.el-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #555;
  font-weight: 600;
  padding: 8px 2px 4px;
  border-bottom: 1px dashed #e8e8e8;
}
.element-block { margin-top: 6px; }

.item-row {
  display: grid;
  grid-template-columns: 1fr 56px 84px;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed #f0f0f0;
}
.item-row:last-child { border-bottom: none; }
.item-text { font-size: 13px; color: #444; line-height: 1.5; }

.item-max {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #f08c00;
  background: #fff7e6;
  border-radius: 6px;
  padding: 4px 0;
}

.item-input {
  width: 84px;
  height: 46px;
  border: 2px solid #2b5fd9;
  border-radius: 10px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: #1a3f9e;
  background: #f4f8ff;
  outline: none;
  box-shadow: 0 2px 6px rgba(43, 95, 217, 0.12);
}
.item-input.filled { background: #e3edff; }
.item-input:focus {
  border-color: #1a3f9e;
  box-shadow: 0 0 0 3px rgba(43, 95, 217, 0.2);
  background: #fff;
}
.item-input::placeholder { font-size: 12px; font-weight: 400; color: #9aa7c7; }
.item-input:disabled { opacity: 0.5; }

/* ===== 管理后台：删除评分 / 回收站 / 撤销 ===== */
.judge-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.judge-name { flex: 1; }
.judge-score { color: #2b5fd9; font-weight: 600; white-space: nowrap; }
.judge-row .btn.small { margin: 0; flex-shrink: 0; }

.trash-card { margin-top: 16px; }
.trash-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed #f0f0f0;
  font-size: 13px;
}
.trash-row:last-child { border-bottom: none; }
.trash-info { color: #666; word-break: break-all; }

.undo-bar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 520px;
  background: #1f2a44;
  color: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  text-align: center;
  z-index: 999;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.undo-bar .btn.small { margin-left: 8px; vertical-align: middle; }

.toolbar-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== 评分页：项目下拉选择 ===== */
.project-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.picker-label {
  font-size: 13px;
  color: #666;
  font-weight: 600;
}
.project-select {
  width: 100%;
  height: 48px;
  border: 2px solid #2b5fd9;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 17px;
  font-weight: 600;
  color: #1a3f9e;
  background: #f4f8ff;
  outline: none;
}
.project-select:focus { box-shadow: 0 0 0 3px rgba(43, 95, 217, 0.2); }
.pick-meta { font-size: 13px; color: #888; }

/* ===== 自定义项目下拉（彩色状态） ===== */
.green { color: #0a8f4c; }
.red { color: #d33; }

.project-toggle {
  width: 100%;
  height: 48px;
  border: 2px solid #2b5fd9;
  border-radius: 10px;
  padding: 0 14px;
  background: #f4f8ff;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
  color: #1a3f9e;
  cursor: pointer;
}
.current-name { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caret { color: #2b5fd9; }

.dot { width: 12px; height: 12px; border-radius: 50%; background: #d33; flex-shrink: 0; }
.dot.complete { background: #0a8f4c; }
.dot.incomplete { background: #d33; }

.project-menu {
  margin-top: 8px;
  border: 1px solid #e0e6f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  max-height: 55vh;
  overflow-y: auto;
}
.menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
}
.menu-item:last-child { border-bottom: none; }
.menu-item.complete { color: #0a8f4c; }
.menu-item.incomplete { color: #d33; }
.menu-item .menu-name { flex: 1; word-break: break-all; }
.menu-item .menu-status { font-size: 12px; opacity: 0.85; white-space: nowrap; }
.menu-empty { padding: 14px; color: #999; font-size: 14px; text-align: center; }

/* ===== 可拖动暂存悬浮按钮 ===== */
.draft-fab {
  position: fixed;
  right: 18px;
  bottom: 96px;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: none;
  background: #2b5fd9;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(43, 95, 217, 0.45);
  z-index: 1000;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.draft-fab:active { transform: scale(0.96); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 180px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 1001;
  max-width: 80vw;
  text-align: center;
}
.toast.show { opacity: 1; }

.save-status {
  font-size: 12px;
  color: #888;
}
.save-status.ok { color: #0a8f4c; }
.save-status.err { color: #d33; }
.save-status.saving { color: #2b5fd9; }

/* ===== 分级标准弹窗 ===== */
.std-btn {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  font-size: 12px;
  color: #2b5fd9;
  background: #fff;
  border: 1px solid #2b5fd9;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.std-btn:active { background: #eef3ff; }

.std-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.std-dialog {
  background: #f5f7fb;
  width: 100%;
  max-width: 760px;
  max-height: 88vh;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.std-head {
  background: #1f3a8a;
  color: #fff;
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.std-title { font-size: 18px; font-weight: 700; line-height: 1.3; }
.std-sub { font-size: 12px; opacity: 0.82; margin-top: 4px; line-height: 1.4; }
.std-close {
  background: rgba(255, 255, 255, 0.16);
  border: none;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
}
.std-body { padding: 14px 16px 22px; overflow-y: auto; }
.std-intro {
  font-size: 13px;
  color: #555;
  background: #fff;
  border-left: 4px solid #2b5fd9;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  line-height: 1.6;
}
.std-legend { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.std-legend span { font-size: 12px; padding: 3px 9px; border-radius: 999px; font-weight: 600; }
.score-hi { background: #e6f6ee; color: #0a8f4c; }
.score-mid { background: #fff3e0; color: #b26a00; }
.score-lo { background: #fdecea; color: #c0392b; }

.std-project {
  background: #fff;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.std-project-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: #eef3ff;
}
.std-no {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #2b5fd9;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.std-pname { font-size: 15px; font-weight: 700; color: #1f2a44; }

.std-level {
  padding: 12px 14px;
  border-top: 1px solid #f0f2f7;
  border-left: 3px solid transparent;
}
.std-level.hi { border-left-color: #0a8f4c; }
.std-level.mid { border-left-color: #e08a00; }
.std-level.lo { border-left-color: #c0392b; }
.std-level-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.std-score { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.std-dim { font-size: 13px; color: #333; font-weight: 600; }
.std-dim .sep { color: #bbb; margin: 0 4px; font-weight: 400; }
.std-type { font-size: 11px; color: #666; border: 1px solid #dcdfe6; border-radius: 4px; padding: 1px 5px; }
.std-std { font-size: 13px; color: #444; line-height: 1.65; margin-bottom: 8px; }
.std-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  background: #f8f9fc;
  border-radius: 8px;
  padding: 8px 10px;
}
.std-meta div { font-size: 12px; color: #666; line-height: 1.5; }
.std-meta b { color: #333; font-weight: 600; }
@media (min-width: 560px) {
  .std-meta { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.std-note { background: #fff; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.std-note.warn { border-left: 4px solid #c0392b; }
.std-note.info { border-left: 4px solid #8a93a6; }
.std-note h4 { margin: 0 0 6px; font-size: 14px; color: #1f2a44; }
.std-note ol { margin: 0; padding-left: 20px; font-size: 13px; color: #444; line-height: 1.75; }


