/* ===== 她屿 AI 商学院 · 员工端样式 ===== */
:root {
  --primary: #c8517a;        /* 她屿品牌色：玫瑰粉 */
  --primary-dark: #a83c60;
  --primary-light: #fbeef3;
  --bg: #f7f5f8;
  --card: #ffffff;
  --text: #2d2a2e;
  --text-muted: #8a8589;
  --border: #eee7ea;
  --success: #2e9e6b;
  --danger: #d9534f;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(0,0,0,.06);
}
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); line-height:1.6;
  max-width: 520px; margin: 0 auto; min-height: 100vh;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font-family: inherit; }

/* ===== 登录页 ===== */
.login-wrap { min-height: 100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; padding: 32px 24px; background: linear-gradient(160deg, #fbeef3 0%, #f7f5f8 60%); }
.login-brand { text-align:center; margin-bottom: 36px; }
.brand-logo {
  width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--primary), #e77f9f);
  color:#fff; font-size:20px; font-weight:700; display:flex; align-items:center; justify-content:center;
  box-shadow: 0 8px 24px rgba(200,81,122,.35);
}
.brand-logo.small { width: 34px; height: 34px; border-radius: 10px; font-size: 12px; margin: 0; }
.login-brand h1 { font-size: 26px; letter-spacing: 2px; }
.login-brand p { color: var(--text-muted); font-size: 14px; margin-top: 6px; letter-spacing: 4px; }
.login-card {
  width: 100%; background: var(--card); border-radius: var(--radius); padding: 28px 24px;
  box-shadow: var(--shadow);
}
.field { margin-bottom: 18px; }
.field label { display:block; font-size:13px; color:var(--text-muted); margin-bottom:6px; }
.field input {
  width:100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 15px; outline: none; transition: border-color .2s; background:#fdfcfd;
}
.field input:focus { border-color: var(--primary); background:#fff; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color:#fff; border-radius: 10px; padding: 13px; font-size: 15px; font-weight:600;
  letter-spacing: 6px; transition: transform .15s, box-shadow .2s;
}
.btn-primary:active { transform: scale(.98); }
.btn-block { width: 100%; }
.login-tip { min-height: 20px; font-size: 13px; color: var(--danger); text-align:center; margin-top: 10px; }
.login-footer { margin-top: 28px; color: #b9b3b7; font-size: 12px; letter-spacing: 1px; }

/* ===== 主框架 ===== */
.app-frame { min-height: 100vh; display:flex; flex-direction:column; }
.app-header {
  position: sticky; top:0; z-index:50; background: var(--card);
  border-bottom: 1px solid var(--border); padding: 12px 16px;
}
.header-inner { display:flex; align-items:center; justify-content:space-between; }
.header-brand { display:flex; align-items:center; gap:10px; }
.header-title { font-size:17px; font-weight:700; letter-spacing:1px; }
.header-user { display:flex; align-items:center; gap:10px; }
.user-name { font-size:13px; color:var(--text-muted); }
.btn-ghost { color:var(--text-muted); font-size:13px; padding:4px 10px; border-radius:8px; }
.btn-ghost:active { background:var(--bg); }
.btn-sm { font-size: 12px; }

.app-main { flex:1; padding: 16px 16px 90px; }
.app-tabbar {
  position: fixed; bottom:0; left:50%; transform: translateX(-50%);
  width:100%; max-width:520px; background: var(--card); border-top:1px solid var(--border);
  display:flex; padding: 6px 0 calc(8px + env(safe-area-inset-bottom)); z-index:50;
}
.tab-item {
  flex:1; display:flex; flex-direction:column; align-items:center; gap:2px;
  color:var(--text-muted); font-size:11px; padding:4px 0;
}
.tab-item.active { color: var(--primary); }
.tab-icon { font-size: 20px; }

/* ===== 首页 ===== */
.welcome-card {
  background: linear-gradient(135deg, var(--primary), #e77f9f);
  border-radius: var(--radius); padding: 22px 20px; color:#fff; margin-bottom:16px;
}
.welcome-card h2 { font-size: 19px; margin-bottom: 6px; }
.welcome-card p { font-size: 13px; opacity:.92; }
.today-card {
  background: var(--card); border-radius: var(--radius); padding: 16px; margin-bottom:16px; box-shadow: var(--shadow);
}
.today-card .card-title { font-size:14px; font-weight:600; margin-bottom:10px; }
.today-list { display:flex; gap:10px; }
.today-item {
  flex:1; background: var(--primary-light); border-radius: 10px; padding: 10px 8px;
  text-align:center; font-size:12.5px; color: var(--primary-dark); font-weight:500;
}
.entry-grid { display:grid; grid-template-columns: repeat(3,1fr); gap:12px; margin-bottom:16px; }
.entry-card {
  background: var(--card); border-radius: var(--radius); padding: 18px 8px; text-align:center;
  box-shadow: var(--shadow); transition: transform .15s;
}
.entry-card:active { transform: scale(.96); }
.entry-icon { font-size: 30px; display:block; margin-bottom: 8px; }
.entry-name { font-size: 13.5px; font-weight:600; }
.entry-sub { font-size: 11px; color:var(--text-muted); margin-top:2px; }
.notice-card {
  background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
}
.notice-card .card-title { font-size:14px; font-weight:600; margin-bottom:10px; }
.notice-item { padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.notice-item:last-child { border-bottom:none; }
.notice-item .notice-time { font-size:11px; color:var(--text-muted); margin-left:8px; }

/* ===== 通用卡片 ===== */
.page-title { font-size:18px; font-weight:700; margin-bottom:14px; }
.card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px; }
.card-title { font-size:14px; font-weight:600; margin-bottom:10px; }

/* ===== 学习中心 ===== */
.cat-grid { display:grid; grid-template-columns: repeat(2,1fr); gap:12px; }
.cat-card {
  background: var(--card); border-radius: var(--radius); padding: 18px 14px; box-shadow: var(--shadow);
  display:flex; align-items:center; gap:12px; transition: transform .15s;
}
.cat-card:active { transform: scale(.97); }
.cat-icon { font-size:26px; }
.cat-name { font-size:14.5px; font-weight:600; }
.cat-count { font-size:11.5px; color:var(--text-muted); margin-top:2px; }

/* ===== 聊天 ===== */
.chat-box { display:flex; flex-direction:column; height: calc(100vh - 190px); }
.chat-body { flex:1; overflow-y:auto; padding: 6px 0; }
.msg { display:flex; margin-bottom: 14px; gap: 8px; }
.msg .avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; font-size:15px;
}
.msg.user { flex-direction: row-reverse; }
.msg.user .avatar { background: var(--primary); }
.msg.ai .avatar { background: #f0e6ea; }
.bubble {
  max-width: 78%; padding: 11px 14px; border-radius: 14px; font-size: 14px; line-height:1.65;
}
.msg.user .bubble { background: var(--primary); color:#fff; border-top-right-radius: 4px; }
.msg.ai .bubble { background: var(--card); border:1px solid var(--border); border-top-left-radius: 4px; box-shadow: var(--shadow); }
.msg.ai .bubble pre { white-space: pre-wrap; font-family: inherit; font-size: 13px; }
.msg .citations { margin-top: 8px; }
.msg .citation {
  display:inline-block; background: var(--primary-light); color: var(--primary-dark);
  font-size: 11px; border-radius: 6px; padding: 2px 8px; margin: 2px 4px 0 0;
}
.msg-time { font-size:10.5px; color:#b9b3b7; text-align:center; margin: 4px 0 10px; }
.typing-dots { display:inline-flex; gap:4px; padding: 4px 2px; }
.typing-dots span { width:6px; height:6px; border-radius:50%; background:var(--text-muted); animation: blink 1.2s infinite; }
.typing-dots span:nth-child(2){ animation-delay:.2s } .typing-dots span:nth-child(3){ animation-delay:.4s }
@keyframes blink { 0%,80%,100%{opacity:.25} 40%{opacity:1} }
.chat-input-bar {
  display:flex; gap:10px; padding: 12px 0 0; border-top: 1px solid var(--border); margin-top: 4px;
}
.chat-input-bar textarea {
  flex:1; resize:none; border:1.5px solid var(--border); border-radius: 12px; padding: 10px 14px;
  font-size:14px; outline:none; max-height: 90px; background: var(--card);
}
.chat-input-bar textarea:focus { border-color: var(--primary); }
.btn-send {
  background: var(--primary); color:#fff; border-radius: 12px; padding: 0 18px;
  font-size:14px; font-weight:600;
}
.suggest-chips { display:flex; flex-wrap:wrap; gap:8px; margin-bottom: 12px; }
.suggest-chip {
  background: var(--primary-light); color: var(--primary-dark); font-size:12.5px;
  border-radius: 20px; padding: 6px 14px;
}
.chat-welcome { text-align:center; padding: 40px 20px; color: var(--text-muted); }
.chat-welcome .big { font-size: 40px; display:block; margin-bottom: 12px; }

/* ===== 考试 ===== */
.exam-radio-card {
  display:flex; align-items:center; gap:12px; background: var(--card); border: 2px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 12px; cursor:pointer; transition: all .15s;
}
.exam-radio-card.selected { border-color: var(--primary); background: var(--primary-light); }
.exam-radio-card input { accent-color: var(--primary); width: 18px; height: 18px; }
.exam-radio-card .radio-label { font-size:15px; font-weight:600; }
.exam-radio-card .radio-desc { font-size:12px; color:var(--text-muted); }
.exam-question {
  background: var(--card); border-radius: var(--radius); padding: 18px 16px; box-shadow: var(--shadow); margin-bottom: 14px;
}
.exam-q-title { font-size:15px; font-weight:600; margin-bottom: 12px; }
.exam-opt {
  display:flex; align-items:center; gap:10px; padding: 11px 12px; border: 1.5px solid var(--border);
  border-radius: 10px; margin-bottom: 8px; cursor:pointer; font-size:14px; transition: all .15s;
}
.exam-opt.selected { border-color: var(--primary); background: var(--primary-light); }
.exam-opt .opt-key {
  width:24px; height:24px; border-radius: 50%; background: var(--bg); display:flex; align-items:center;
  justify-content:center; font-size:12px; font-weight:700; flex-shrink:0;
}
.exam-opt.selected .opt-key { background: var(--primary); color:#fff; }
.exam-result-card { background: var(--card); border-radius: var(--radius); padding: 24px 18px; text-align:center; box-shadow: var(--shadow); }
.score-circle {
  width: 110px; height: 110px; border-radius: 50%; margin: 0 auto 14px;
  display:flex; align-items:center; justify-content:center; font-size:32px; font-weight:700; color:#fff;
}
.score-circle.pass { background: linear-gradient(135deg, #2e9e6b, #57c78e); }
.score-circle.fail { background: linear-gradient(135deg, #d9534f, #ef8a86); }
.exam-review { text-align:left; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border); }
.exam-review-item { font-size: 13px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.exam-review-item:last-child { border-bottom: none; }
.exam-review-item .q { font-weight:600; margin-bottom: 4px; }
.exam-review-item .correct { color: var(--success); }
.exam-review-item .wrong { color: var(--danger); }
.btn-secondary {
  background: var(--bg); border: 1.5px solid var(--border); border-radius: 10px; padding: 12px;
  font-size:14px; font-weight:600; color: var(--text);
}

/* ===== 通用工具 ===== */
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; }
.hidden { display: none !important; }
.loading-text { text-align:center; color:var(--text-muted); padding: 40px 0; font-size:14px; }
.back-link { color: var(--primary); font-size:14px; display:inline-block; margin-bottom: 10px; }
