/* Trooly 销售培训 —— 移动优先。品牌主色薄荷绿 #66C0B1 / 深绿 #267361。 */
:root {
  --mint: #66C0B1;
  --deep: #267361;
  --ink: #1f2a28;
  --muted: #6b7d79;
  --bg: #f4f7f6;
  --card: #ffffff;
  --line: #e2ebe8;
  --ok: #2e9e6b;
  --bad: #d9534f;
  --radius: 14px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}

/* 登录闸门 */
#gate {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--mint), var(--deep));
}
.gate-box { text-align: center; color: #fff; padding: 24px; }
.brand { font-size: 22px; font-weight: 700; margin-bottom: 18px; letter-spacing: 1px; }
.spinner {
  width: 34px; height: 34px; margin: 0 auto 12px;
  border: 3px solid rgba(255,255,255,.35); border-top-color: #fff;
  border-radius: 50%; animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.gate-msg { font-size: 13px; opacity: .92; }
#gate-dev { margin-top: 16px; }
#gate-dev input {
  width: 220px; padding: 8px; border-radius: 8px; border: none; font-size: 13px;
}
#gate-dev button {
  margin-top: 8px; padding: 8px 20px; border: none; border-radius: 8px;
  background: #fff; color: var(--deep); font-weight: 600;
}

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line);
}
.topbar .title { font-weight: 700; color: var(--deep); }
.who { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--mint); color: #fff; font-size: 13px; font-weight: 600;
}

.view { padding: 16px; max-width: 680px; margin: 0 auto; }
.lead { color: var(--muted); margin: 4px 0 16px; }

/* 能力域卡片 */
.comp-list { display: flex; flex-direction: column; gap: 12px; }
.comp-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; justify-content: space-between; align-items: center;
}
.comp-card .info { flex: 1; }
.comp-card .name { font-weight: 600; font-size: 16px; }
.comp-card .desc { color: var(--muted); font-size: 13px; margin-top: 2px; }
.comp-card .meta { color: var(--mint); font-size: 12px; margin-top: 6px; }
.comp-card .acts { display: flex; flex-direction: column; gap: 6px; margin-left: 12px; }

.btn-primary {
  background: var(--deep); color: #fff; border: none; border-radius: 10px;
  padding: 9px 16px; font-size: 14px; font-weight: 600;
}
.btn-primary:active { opacity: .85; }
.btn-primary.wide { width: 100%; margin-top: 18px; padding: 13px; }
.btn-ghost {
  background: transparent; color: var(--deep); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 14px; font-size: 14px;
}
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }

.sub-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
  font-weight: 600; color: var(--deep);
}
.back { background: none; border: none; color: var(--mint); font-size: 15px; padding: 0; }
.progress { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 400; }

/* 学习对话 */
.chat { display: flex; flex-direction: column; gap: 10px; padding-bottom: 12px; }
.msg { max-width: 85%; padding: 10px 13px; border-radius: 12px; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--mint); color: #fff; border-bottom-right-radius: 3px; }
.msg.bot { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 3px; }
.msg .src { margin-top: 6px; font-size: 11px; color: var(--muted); }
.wait { color: var(--muted); font-size: 13px; padding: 6px 0; }
.composer { display: flex; gap: 8px; align-items: flex-end; position: sticky; bottom: 0; background: var(--bg); padding-top: 8px; }
.composer textarea {
  flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 9px;
  font-size: 14px; font-family: inherit; resize: none;
}

/* 考试 */
.exam-body { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-height: 220px; }
.q-stem { font-weight: 600; margin-bottom: 14px; }
.q-tag { display: inline-block; font-size: 11px; color: var(--mint); border: 1px solid var(--mint); border-radius: 6px; padding: 1px 6px; margin-bottom: 8px; }
.opt {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.opt.sel { border-color: var(--deep); background: rgba(102,192,177,.12); }
.opt .k { font-weight: 700; color: var(--deep); }
.exam-foot { display: flex; gap: 8px; margin-top: 16px; }
.exam-foot .btn-primary { margin-left: auto; }

/* 成绩单 */
.score-hero { text-align: center; padding: 24px; background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); }
.score-num { font-size: 44px; font-weight: 800; color: var(--deep); }
.score-badge { display: inline-block; margin-top: 8px; padding: 4px 14px; border-radius: 20px; font-weight: 600; }
.score-badge.pass { background: rgba(46,158,107,.15); color: var(--ok); }
.score-badge.fail { background: rgba(217,83,79,.12); color: var(--bad); }
.cert-no { margin-top: 10px; font-size: 12px; color: var(--muted); }
.per-comp { margin-top: 16px; }
.per-comp .row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.review { margin-top: 20px; }
.review h3 { font-size: 15px; color: var(--deep); }
.review-item { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.review-item .rq { font-weight: 600; }
.review-item .ra { font-size: 13px; margin-top: 6px; }
.review-item .mark { font-weight: 700; }
.review-item .mark.ok { color: var(--ok); }
.review-item .mark.bad { color: var(--bad); }
.review-item .exp { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* 主观题 textarea */
#scenario-input { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; line-height: 1.6; resize: vertical; font-family: inherit; }
#scenario-input:focus { outline: none; border-color: var(--primary); }
.scenario-hint { margin-top: 6px; font-size: 12px; color: var(--muted); text-align: right; }

/* rubric 得分展示 */
.rubric-scores { margin-top: 8px; padding: 10px; background: rgba(46,158,107,.08); border-radius: 6px; font-size: 13px; }
.disagree-warn { margin-top: 6px; padding: 8px; background: rgba(255,193,7,.15); border-left: 3px solid #ffc107; font-size: 12px; color: #856404; }

