/* 流芳心理 · 移动端心理咨询管理平台 */
:root {
  --bg: #f3f7f8;
  --surface: #ffffff;
  --surface-2: #f7fafb;
  --text: #1f3038;
  --text-2: #4c626c;
  --muted: #8a9ba4;
  --border: #e6edef;
  --primary: #2e8b7e;
  --primary-dark: #226c62;
  --primary-soft: #e8f4f1;
  --warm: #e08b5e;
  --warm-soft: #fdf1e9;
  --blue: #5b86d8;
  --blue-soft: #ecf2fd;
  --danger: #cc5b58;
  --danger-soft: #fbedec;
  --shadow: 0 6px 20px rgba(35, 74, 82, .06);
  --radius: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  color: var(--text);
  background: #e9efef;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
input, textarea { outline: none; }
/* 图标默认尺寸兜底：防止未指定尺寸的 svg 被撑成巨大方块（具体组件规则会覆盖） */
svg { width: 18px; height: 18px; flex-shrink: 0; }

/* 手机外壳 */
.phone {
  width: 100%; max-width: 430px; margin: 0 auto;
  /* UC/旧版浏览器不识别 dvh：先给 vh 兜底，再让支持 dvh 的浏览器覆盖 */
  height: 100vh; height: 100dvh; display: flex; flex-direction: column;
  background: var(--bg); position: relative; overflow: hidden;
}
@media (min-width: 520px) {
  body { display: flex; align-items: center; justify-content: center; padding: 20px 0; background: linear-gradient(145deg, #dfeae9, #eef3f5 60%, #e7eef0); }
  .phone { max-height: 900px; height: calc(100vh - 40px); height: min(900px, calc(100vh - 40px)); height: min(900px, calc(100dvh - 40px)); border-radius: 30px; box-shadow: 0 24px 70px rgba(31, 62, 68, .22); border: 1px solid rgba(255,255,255,.7); }
}
.app-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding-bottom: 24px; }
.app-scroll::-webkit-scrollbar { width: 0; }
.app-scroll.chat-mode { overflow: hidden; padding-bottom: 0; display: flex; flex-direction: column; }
.app-scroll.chat-mode .topbar { flex: 0 0 auto; }
.app-scroll.chat-mode .ai-chat-page { flex: 1; min-height: 0; }

/* 底部导航 */
.tabbar {
  flex: 0 0 auto; display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(255,255,255,.96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--border); padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}
.tab-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; color: var(--muted); font-size: 10px; }
.tab-item.active { color: var(--primary); font-weight: 600; }
.tab-item svg { width: 22px; height: 22px; stroke-width: 1.8; }

/* 顶部栏 */
.topbar {
  position: sticky; top: 0; z-index: 20; background: rgba(243,247,248,.94);
  backdrop-filter: blur(10px); display: flex; align-items: center; gap: 10px;
  padding: calc(12px + env(safe-area-inset-top)) 18px 10px; min-height: 56px;
}
.topbar h1 { font-size: 18px; margin: 0; font-weight: 700; letter-spacing: -.3px; line-height: 1.2; }
.topbar small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.topbar .spacer { flex: 1; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 11px; background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center; color: var(--text-2);
  border: 1px solid var(--border); flex: 0 0 auto;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 页面通用 */
.page { padding: 4px 16px 20px; }
.section { margin-top: 20px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; padding: 0 2px; }
.section-title { font-size: 15px; font-weight: 700; }
.section-more { font-size: 12px; color: var(--primary); }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card + .card { margin-top: 12px; }

/* 首页 */
.hero-card {
  background: linear-gradient(135deg, #2e8b7e 0%, #3fa395 55%, #63b8a8 100%);
  color: #fff; border-radius: 20px; padding: 18px; position: relative; overflow: hidden;
  box-shadow: 0 10px 24px rgba(46,139,126,.2);
}
.hero-card::after { content: ""; position: absolute; width: 150px; height: 150px; border-radius: 50%; background: rgba(255,255,255,.09); right: -45px; top: -60px; }
.hero-card::before { content: ""; position: absolute; width: 90px; height: 90px; border-radius: 50%; background: rgba(255,255,255,.07); right: 60px; bottom: -55px; }
/* 图片背景版 hero */
.hero-photo { background: url('hero-bg.jpg') center 24% / cover no-repeat; min-height: 228px; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px; box-shadow: 0 10px 24px rgba(31,62,68,.18); }
.hero-photo::before, .hero-photo::after { content: none; }
.hero-photo .hero-date { background: rgba(24,58,52,.46); backdrop-filter: blur(4px); align-self: flex-start; padding: 3px 10px; border-radius: 16px; }
.hero-photo-foot { position: relative; z-index: 1; margin: 0 -16px -16px; padding: 40px 16px 13px; background: linear-gradient(180deg, rgba(18,44,39,0) 0%, rgba(18,44,39,.62) 48%, rgba(18,44,39,.88) 100%); }
.hero-photo-foot .hero-sub { display: block; color: #fff; font-size: 12px; font-weight: 600; letter-spacing: 0; text-shadow: 0 1px 5px rgba(0,0,0,.6); margin-bottom: 0; white-space: nowrap; line-height: 1.4; padding-right: 112px; }
.hero-date { font-size: 11px; opacity: .85; position: relative; z-index: 1; }
.hero-title { font-size: 20px; font-weight: 700; margin: 4px 0 2px; position: relative; z-index: 1; }
.hero-sub { font-size: 12px; opacity: .88; position: relative; z-index: 1; }
.hero-badge { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; background: rgba(255,255,255,.18); padding: 4px 10px; border-radius: 20px; font-size: 11px; position: relative; z-index: 1; }
.hero-photo .hero-badge-corner { position: absolute !important; right: 12px; bottom: 7px; top: auto; z-index: 3; background: rgba(24,58,52,.58); backdrop-filter: blur(4px); margin: 0; padding: 2px 7px; font-size: 9px; }
.hero-photo .hero-badge-corner svg { width: 13px; height: 13px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.stat { background: var(--surface); border-radius: 14px; padding: 12px 10px; text-align: center; box-shadow: var(--shadow); }
.stat-num { font-size: 20px; font-weight: 700; color: var(--primary); line-height: 1.2; }
.stat-num.warm { color: var(--warm); }
.stat-num.blue { color: var(--blue); }
.stat-label { font-size: 11px; color: var(--muted); margin-top: 2px; }

.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.action { background: var(--surface); border-radius: 14px; padding: 12px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.action:active { transform: scale(.96); }
.action-icon { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.action-icon svg { width: 20px; height: 20px; }
.action span { display: block; font-size: 11px; color: var(--text-2); text-align: center; }
.bg-mint { background: var(--primary-soft); color: var(--primary); }
.bg-warm { background: var(--warm-soft); color: var(--warm); }
.bg-blue { background: var(--blue-soft); color: var(--blue); }
.bg-danger { background: var(--danger-soft); color: var(--danger); }

/* 搜索与筛选 */
.search-row { display: flex; align-items: center; gap: 8px; margin: 10px 0 12px; }
.search { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 9px 12px; color: var(--muted); }
.search svg { width: 16px; height: 16px; flex: 0 0 auto; }
.search input { border: none; background: none; width: 100%; font-size: 13px; }
.filters { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; margin-bottom: 10px; }
.filters::-webkit-scrollbar { display: none; }
.filter { white-space: nowrap; padding: 6px 13px; border-radius: 20px; background: var(--surface); color: var(--text-2); font-size: 12px; border: 1px solid var(--border); }
.filter.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.source-filter { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 12px; color: var(--text-2); }
.source-filter select { flex: 1; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 7px 10px; font-size: 13px; }

/* 客户列表 */
.client-list { display: flex; flex-direction: column; gap: 10px; }
.client-card { background: var(--surface); border-radius: var(--radius); padding: 13px 14px; box-shadow: var(--shadow); display: flex; gap: 11px; align-items: flex-start; }
.client-card:active { background: var(--surface-2); }
.avatar { width: 40px; height: 40px; border-radius: 13px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex: 0 0 auto; }
.avatar.warm { background: var(--warm-soft); color: var(--warm); }
.avatar.blue { background: var(--blue-soft); color: var(--blue); }
.client-main { flex: 1; min-width: 0; }
.client-top { display: flex; align-items: center; gap: 7px; }
.client-name { font-weight: 700; font-size: 15px; }
.client-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }
.client-summary { font-size: 12px; color: var(--text-2); margin-top: 6px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.chip { display: inline-block; font-size: 10px; padding: 1px 7px; border-radius: 6px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.chip.warm { background: var(--warm-soft); color: var(--warm); border-color: transparent; }
.chip.mint { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.chip.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.chev { color: var(--muted); flex: 0 0 auto; margin-top: 12px; }
.chev svg { width: 16px; height: 16px; }

/* 客户详情 */
.profile-head { display: flex; align-items: center; gap: 13px; }
.profile-head .avatar { width: 54px; height: 54px; border-radius: 17px; font-size: 21px; }
.profile-name { font-size: 19px; font-weight: 700; }
.profile-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.info-item { background: var(--surface-2); border-radius: 11px; padding: 9px 11px; min-width: 0; }
.info-label { font-size: 10px; color: var(--muted); }
.info-value { font-size: 13px; margin-top: 2px; word-break: break-all; }
.info-item.full { grid-column: 1 / -1; }
.segmented { display: flex; background: var(--surface); border-radius: 12px; padding: 4px; margin: 16px 0 12px; box-shadow: var(--shadow); }
.seg-item { flex: 1; text-align: center; padding: 8px 4px; border-radius: 9px; font-size: 12px; color: var(--text-2); }
.seg-item.active { background: var(--primary); color: #fff; font-weight: 600; }

/* 时间线 */
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.tl-item { position: relative; margin-bottom: 12px; }
.tl-dot { position: absolute; left: -18px; top: 18px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); border: 2px solid var(--bg); box-shadow: 0 0 0 2px var(--primary-soft); }
.tl-card { background: var(--surface); border-radius: 14px; padding: 13px; box-shadow: var(--shadow); }
.tl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tl-date { font-weight: 700; font-size: 14px; }
.tl-preview { font-size: 12px; color: var(--text-2); margin-top: 6px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tl-detail { display: none; margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 10px; }
.tl-item.open .tl-detail { display: block; }
.tl-item.open .tl-preview { display: none; }
.kv { margin-top: 9px; }
.kv-label { font-size: 11px; color: var(--primary); font-weight: 700; margin-bottom: 3px; display: flex; align-items: center; gap: 5px; }
.kv-label::before { content: ""; width: 3px; height: 11px; border-radius: 2px; background: var(--primary); }
.kv-value { font-size: 12px; color: var(--text-2); white-space: pre-wrap; word-break: break-word; }
.expand-btn { font-size: 12px; color: var(--primary); margin-top: 8px; display: flex; align-items: center; gap: 3px; }
.expand-btn svg { width: 13px; height: 13px; transition: transform .2s; }
.tl-item.open .expand-btn svg { transform: rotate(180deg); }

/* 专家会诊 */
.expert-list { display: flex; flex-direction: column; gap: 8px; }
.expert-card { background: var(--surface); border-radius: 13px; padding: 11px 12px; box-shadow: var(--shadow); }
.expert-top { display: flex; align-items: center; gap: 8px; }
.expert-avatar { width: 28px; height: 28px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 13px; flex: 0 0 auto; }
.expert-name { font-size: 12px; font-weight: 700; }
.expert-role { font-size: 10px; color: var(--muted); }
.expert-text { font-size: 12px; color: var(--text-2); margin-top: 7px; white-space: pre-wrap; }
.plan-box { background: linear-gradient(135deg, #f0f8f5, #f7fbfa); border: 1px solid #dcefe9; border-radius: 14px; padding: 13px; }
.plan-title { font-size: 13px; font-weight: 700; color: var(--primary-dark); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.plan-title svg { width: 15px; height: 15px; }
.plan-row { margin-top: 8px; }
.plan-row b { font-size: 11px; color: var(--primary-dark); }
.plan-row p { margin: 2px 0 0; font-size: 12px; color: var(--text-2); white-space: pre-wrap; }
.notice { font-size: 11px; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 9px 11px; margin-top: 10px; line-height: 1.6; }
.notice > svg { width: 16px; height: 16px; vertical-align: middle; margin-right: 6px; }
.notice.ai-model-intro > svg { width: 40px; height: 40px; vertical-align: middle; margin-right: 8px; }
.notice.warn { background: var(--warm-soft); color: #9a623c; }

/* 按钮 */
.bottom-actions { display: flex; gap: 9px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); margin: 0 -16px -20px; position: sticky; bottom: 0; z-index: 10; }
.btn { border-radius: 11px; padding: 10px 14px; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-soft { background: var(--primary-soft); color: var(--primary); }
.btn-ghost { background: var(--surface); color: var(--text-2); border: 1px solid var(--border); }
.btn-warm { background: var(--warm); color: #fff; }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 11px; font-size: 12px; border-radius: 9px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* 表单 */
.form { display: flex; flex-direction: column; gap: 12px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.field .required { color: var(--danger); }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--border); background: var(--surface-2);
  border-radius: 11px; padding: 11px 12px; font-size: 16px; line-height: 1.6;
  -webkit-user-select: text; user-select: text;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--primary); background: var(--surface);
  box-shadow: 0 0 0 3px rgba(46, 139, 126, .12);
}
.field textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
.field select { padding-right: 8px; }
.field-hint { font-size: 10px; color: var(--muted); margin-top: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* 录音 */
.steps { display: flex; align-items: center; gap: 6px; margin: 12px 0 16px; }
.step { flex: 1; height: 4px; border-radius: 4px; background: var(--border); }
.step.active, .step.done { background: var(--primary); }
.step-label { font-size: 11px; color: var(--muted); margin-bottom: 7px; display: flex; justify-content: space-between; }
.recorder { text-align: center; padding: 18px 12px 14px; }
.rec-timer { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.rec-status { font-size: 11px; color: var(--muted); margin-top: 2px; }
.rec-status.live { color: var(--danger); font-weight: 600; }
.wave { height: 52px; display: flex; align-items: center; justify-content: center; gap: 3px; margin: 14px 0; }
.wave i { display: block; width: 4px; height: 8px; border-radius: 4px; background: #cbdad9; transition: height .09s ease; }
.wave.live i { background: var(--primary); }
.rec-btn { width: 66px; height: 66px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(46,139,126,.28); }
.rec-btn.recording { background: var(--danger); box-shadow: 0 8px 20px rgba(204,91,88,.28); }
.rec-btn svg { width: 26px; height: 26px; }
.rec-hint { font-size: 11px; color: var(--muted); margin-top: 10px; }
.audio-player { width: 100%; height: 36px; margin-top: 10px; }

/* 微信 / 视频通话兼容模式 */
.compat-card { margin-top: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 14px; }
.compat-card.on { border-color: #a9d5cc; background: linear-gradient(180deg, #f2faf8, #fff); }
.compat-head { display: flex; align-items: center; gap: 10px; }
.compat-ico { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary); }
.compat-ico svg { width: 18px; height: 18px; }
.compat-card:not(.on) .compat-ico { background: var(--surface-2); color: var(--muted); }
.compat-title { font-size: 13px; font-weight: 700; }
.compat-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }
.compat-steps { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 7px; }
.compat-step { display: flex; align-items: flex-start; gap: 8px; font-size: 11px; color: var(--text-2); line-height: 1.5; }
.compat-step b { width: 17px; height: 17px; flex: 0 0 auto; border-radius: 50%; background: var(--primary); color: #fff; font-size: 10px; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.compat-note { margin-top: 10px; font-size: 10px; line-height: 1.65; color: #8a6a52; background: var(--warm-soft); border-radius: 9px; padding: 8px 10px; }
.compat-card:not(.on) .compat-note { color: var(--muted); background: var(--surface-2); }

/* 跨页面悬浮录音条 */
#float-root { position: absolute; left: 12px; right: 12px; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 40; pointer-events: none; }
.rec-float { pointer-events: auto; display: flex; align-items: center; gap: 7px; padding: 9px 10px; border-radius: 14px; background: rgba(31,48,56,.94); color: #fff; box-shadow: 0 10px 26px rgba(18,38,43,.24); }
.rec-float-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff6b6b; flex: 0 0 auto; animation: recPulse 1.2s infinite; }
@keyframes recPulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.rec-float-time { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rec-float-tag { flex: 1; font-size: 10px; color: rgba(255,255,255,.78); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-float-back { font-size: 11px; padding: 5px 9px; border-radius: 9px; background: rgba(255,255,255,.16); color: #fff; flex: 0 0 auto; }
.rec-float-stop { font-size: 10px; padding: 5px 9px; border-radius: 9px; background: var(--danger); color: #fff; flex: 0 0 auto; }

/* 弹层 */
#sheet-root:empty, #modal-root:empty { display: none; }
.sheet-mask { position: fixed; inset: 0; background: rgba(18,38,43,.4); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 430px; background: var(--surface); border-radius: 22px 22px 0 0; max-height: 88vh; max-height: 88dvh; display: flex; flex-direction: column; animation: sheetUp .22s ease-out; }
@keyframes sheetUp { from { transform: translateY(30px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; border-bottom: 1px solid var(--border); }
.sheet-title { font-size: 16px; font-weight: 700; }
.sheet-body { padding: 16px 18px; overflow-y: auto; }
.sheet-foot { padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); display: flex; gap: 10px; }
.sheet-foot .btn { flex: 1; }
.modal-mask { position: fixed; inset: 0; background: rgba(18,38,43,.4); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 30px; }
.modal { background: var(--surface); border-radius: 18px; width: 100%; max-width: 320px; padding: 20px; text-align: center; }
.modal h3 { margin: 0 0 8px; font-size: 16px; }
.modal p { margin: 0 0 16px; font-size: 13px; color: var(--text-2); }
.modal-actions { display: flex; gap: 9px; }
.modal-actions .btn { flex: 1; }

/* 提示 */
.toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 12px); background: rgba(31,48,56,.94); color: #fff; padding: 9px 16px; border-radius: 22px; font-size: 12px; z-index: 100; opacity: 0; pointer-events: none; transition: .22s; max-width: 80%; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty svg { width: 46px; height: 46px; opacity: .5; }
.empty p { font-size: 13px; margin: 10px 0 4px; }
.empty small { font-size: 11px; }
.disclaimer { font-size: 10px; color: var(--muted); text-align: center; padding: 18px 10px 8px; line-height: 1.7; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.setting-row:last-child { border-bottom: none; }
.setting-title { font-size: 13px; font-weight: 600; }
.setting-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.switch { position: relative; width: 42px; height: 24px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #d4dedf; border-radius: 20px; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: .2s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::before { transform: translateX(18px); }

/* 文件导入 / 纪要编辑 / 附件 */
.import-drop { display: flex; align-items: center; gap: 10px; border: 1.5px dashed var(--primary); border-radius: 12px; padding: 13px; background: var(--primary-soft); cursor: pointer; color: var(--primary-dark); }
.import-drop > svg { width: 22px; height: 22px; flex: 0 0 auto; }
.import-drop span { font-size: 13px; font-weight: 600; }
.import-drop small { display: block; font-size: 10px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.import-list { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.import-item, .attach-item { display: flex; align-items: center; gap: 7px; background: var(--surface-2); border-radius: 9px; padding: 7px 10px; font-size: 12px; }
.import-item > svg, .attach-item > svg { width: 15px; height: 15px; color: var(--primary); flex: 0 0 auto; }
.import-item span, .attach-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-item small, .attach-item small { color: var(--muted); font-size: 10px; }
.import-del { color: var(--muted); font-size: 14px; padding: 0 4px; }
.minutes-edit { margin-top: 6px; }
.attach-list { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.attach-item { background: var(--surface); border: 1px solid var(--border); }

/* 咨询记录编辑 / 录音文档 */
.audio-doc { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.audio-doc .btn { flex: 0 0 auto; }
.audio-inline audio { display: block; }
/* 风险提示图标：比字体略大，置于文字前 */
.risk-line { display: flex; align-items: flex-start; gap: 5px; }
.risk-ico { display: inline-flex; flex: 0 0 auto; line-height: 1.6; }
.risk-ico svg { width: 14px; height: 14px; margin-top: 2px; }
.risk-text { flex: 1; min-width: 0; line-height: 1.6; }
.risk-text b { white-space: nowrap; }

/* 可点击统计卡片 */
.stat-btn { width: 100%; border: none; font-family: inherit; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.stat-btn:active { transform: translateY(1px) scale(.98); box-shadow: 0 2px 8px rgba(18,38,43,.10); }
.stat-btn .stat-label::after { content: " ›"; color: var(--primary); }
/* 状态标记选项 */
.status-options { display: flex; flex-wrap: wrap; gap: 8px; }
.status-opt { border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 6px 9px; cursor: pointer; font-family: inherit; transition: border-color .15s, box-shadow .15s; }
.status-opt.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.status-tag-line { display: flex; gap: 6px; flex-wrap: wrap; }
/* 专家建议生成信息 */
.expert-gen-meta { font-size: 10px; color: var(--muted); margin: 8px 0 10px; }
/* 客户列表单条删除入口 */
.card-side { display: flex; flex-direction: column; align-items: center; gap: 10px; flex: 0 0 auto; }
.card-side .chev { margin-top: 0; }
.card-del { color: var(--muted); padding: 4px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.card-del svg { width: 15px; height: 15px; }
.card-del:active { background: var(--danger-soft); color: var(--danger); }

/* ========== AI 专家咨询 ========== */
.tabbar { grid-template-columns: repeat(6, 1fr); }
.tab-item svg { width: 21px; height: 21px; }
.ai-hero { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, #2e8b7e, #4aa89a); color: #fff; border-radius: 18px; padding: 16px; box-shadow: 0 8px 22px rgba(46,139,126,.22); }
.ai-hero-ico { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 13px; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; }
.ai-hero-ico svg { width: 24px; height: 24px; }
.ai-hero-t { font-size: 15px; font-weight: 700; }
.ai-hero-s { font-size: 11px; opacity: .9; margin-top: 3px; }
.domain-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.domain-card { position: relative; text-align: left; background: var(--surface); border: 1.5px solid var(--border); border-radius: 14px; padding: 13px; box-shadow: var(--shadow); overflow: hidden; }
.domain-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--dc); opacity: 0; transition: opacity .15s; }
.domain-card.active { border-color: var(--dc); background: var(--dbg); }
.domain-card.active::before { opacity: 1; }
.domain-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--dbg); display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 7px; }
.domain-name { display: block; font-size: 14px; font-weight: 700; }
.domain-desc { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.quick-list { display: flex; flex-direction: column; gap: 8px; }
.quick-q { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; background: var(--surface); border-radius: 12px; padding: 11px 13px; box-shadow: var(--shadow); font-size: 12px; color: var(--text-2); }
.quick-q span svg { width: 14px; height: 14px; color: var(--primary); }
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.model-pick-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; background: var(--surface); border-radius: 12px; padding: 11px 13px; box-shadow: var(--shadow); text-align: left; }
.model-pick-row .section-more { white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; }
.model-pick-row .section-more svg { width: 13px; height: 13px; }
.chat-model-bar { display: flex; align-items: center; gap: 7px; width: 100%; flex: 0 0 auto; text-align: left; background: var(--primary-soft); border-bottom: 1px solid #d5e9e4; padding: 8px 14px; font-size: 11px; color: var(--primary-dark); }
.chat-model-bar > svg { width: 15px; height: 15px; flex: 0 0 auto; }
.chat-model-bar > span:nth-child(2) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-model-bar .section-more { white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; }
.chat-model-bar .section-more svg { width: 13px; height: 13px; }
.picker-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.picker-item { display: flex; align-items: center; gap: 9px; background: var(--surface-2); border-radius: 11px; padding: 10px 12px; }
.picker-item input.pk { width: 18px; height: 18px; accent-color: var(--primary); flex: 0 0 auto; }
.picker-item small { margin-left: auto; font-size: 10px; color: var(--muted); }
.model-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--primary-soft); color: var(--primary-dark); border-radius: 20px; padding: 5px 11px; font-size: 11px; font-weight: 600; }
.model-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: #3fb56f; }
.model-chip .dot.off { background: #c5cfd2; }
.ai-notice { display: flex; gap: 8px; align-items: flex-start; text-align: left; }
.ai-notice svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 1px; }
.ai-continue { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--blue-soft); border-radius: 14px; padding: 12px 14px; margin-top: 16px; text-align: left; }
.ai-continue > span { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.ai-continue svg { width: 18px; height: 18px; color: var(--blue); }
.ai-continue b { font-size: 13px; }
.ai-continue small { display: block; width: 100%; font-size: 11px; color: var(--muted); margin-left: 27px; }
.ai-start { margin-top: 16px; }
.ai-continue:active, .ai-start:active { transform: scale(.985); }

/* 会话历史 */
.hist-list { display: flex; flex-direction: column; gap: 10px; }
.hist-card { display: flex; align-items: center; gap: 11px; background: var(--surface); border-radius: 14px; padding: 12px 13px; box-shadow: var(--shadow); text-align: left; width: 100%; }
.hist-ico { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 19px; }
.hist-main { flex: 1; min-width: 0; }
.hist-title { display: block; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-sub { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }

/* 聊天窗口 */
.ai-chat-page { flex: 1; min-height: 0; display: flex; flex-direction: column; height: 100%; }
.chat-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px 14px 4px; }
.chat-scroll::-webkit-scrollbar { width: 0; }
.chat-tip { text-align: center; font-size: 11px; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 9px 12px; margin-bottom: 14px; line-height: 1.6; }
.chat-tip span { font-size: 10px; opacity: .8; }
.msg-row { display: flex; margin-bottom: 14px; align-items: flex-start; }
.msg-row.me { justify-content: flex-end; }
.bubble { max-width: 82%; border-radius: 14px; padding: 10px 13px; font-size: 13px; line-height: 1.7; word-break: break-word; white-space: normal; }
.bubble.me { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.bubble.ai { background: var(--surface); color: var(--text); box-shadow: var(--shadow); border-bottom-left-radius: 4px; }
.ai-avatar { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 14px; margin-right: 8px; }
.bubble-wrap { max-width: 82%; }
.bubble-wrap .bubble.ai { max-width: 100%; }
.msg-model { display: flex; align-items: center; gap: 4px; font-size: 10px; color: var(--primary); font-weight: 700; margin-bottom: 4px; }
.msg-model svg { width: 12px; height: 12px; }
.msg-foot { margin-top: 4px; }
.typing { color: var(--muted); }
.cursor { color: var(--primary); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.chat-bottom { flex: 0 0 auto; background: var(--surface); border-top: 1px solid var(--border); padding: 9px 12px calc(9px + env(safe-area-inset-bottom)); }
.multi-bar { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--primary); background: var(--primary-soft); border-radius: 8px; padding: 5px 9px; margin-bottom: 7px; }
.multi-bar svg { width: 13px; height: 13px; }
.multi-names { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer { display: flex; align-items: flex-end; gap: 8px; }
.composer textarea { flex: 1; resize: none; border: 1px solid var(--border); background: var(--surface-2); border-radius: 12px; padding: 9px 11px; font-size: 16px; line-height: 1.5; max-height: 110px; -webkit-user-select: text; user-select: text; }
.composer textarea:focus { border-color: var(--primary); background: var(--surface); }
.send-btn { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 11px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; }
.send-btn svg { width: 18px; height: 18px; }
.send-btn.busy { background: var(--muted); }
.quick-bar { display: flex; gap: 6px; overflow-x: auto; margin-top: 7px; padding-bottom: 1px; }
.quick-bar::-webkit-scrollbar { display: none; }
.quick-bar button { white-space: nowrap; font-size: 10px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 5px 10px; }

/* 模型管理 */
.preset-row { display: flex; flex-wrap: wrap; gap: 6px; }
.preset-opt { font-size: 11px; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 5px 10px; }
.preset-opt.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.model-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.model-item { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.model-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.model-meta { font-size: 10px; color: var(--muted); margin-top: 6px; word-break: break-all; }
.model-actions { display: flex; gap: 7px; margin-top: 8px; }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; }
.icon-btn.sm svg { width: 14px; height: 14px; }
.switch.sm { width: 36px; height: 21px; }
.switch.sm span::before { width: 15px; height: 15px; }
.switch.sm input:checked + span::before { transform: translateX(15px); }
input[type="range"] { width: 100%; accent-color: var(--primary); }

/* 工作台顶部登录用户条 */
.user-bar { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 14px; padding: 10px 12px; margin-bottom: 12px; box-shadow: var(--shadow); }
.user-avatar { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; background: linear-gradient(135deg, #2e8b7e, #4aa89a); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; }
.user-info { flex: 1; min-width: 0; font-size: 13px; color: var(--ink); }
.user-info b { font-weight: 700; }
.user-info small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.user-logout { flex: 0 0 auto; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); border-radius: 10px; padding: 6px 10px; font-size: 12px; }

/* ========== 登录页 / 本地账号锁 ========== */
#auth-root { display: none; }
#auth-root.show { display: block; position: absolute; inset: 0; z-index: 45; }
.auth-screen { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px; overflow-x: hidden; overflow-y: auto; background: #1d4f49; }
.auth-bg { position: absolute; inset: 0; background: url('hero-bg.jpg') center center / cover no-repeat; opacity: .28; filter: saturate(.7); }
.auth-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(20,66,59,.82), rgba(24,58,52,.94)); }
.auth-card { position: relative; z-index: 1; margin: auto; flex: 0 0 auto; width: 100%; max-width: 340px; background: rgba(255,255,255,.97); border-radius: 22px; padding: 30px 24px 22px; box-shadow: 0 18px 50px rgba(0,0,0,.28); text-align: center; }
.auth-logo { width: 76px; height: 76px; margin: 0 auto 12px; border-radius: 20px; background: #4f7d5c; display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: 0 8px 18px rgba(46,139,126,.3); }
.auth-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.auth-logo svg { width: 30px; height: 30px; }
.auth-title { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: 1px; }
.auth-sub { font-size: 12px; color: var(--muted); margin-top: 4px; margin-bottom: 24px; }
.auth-form { text-align: left; }
.auth-field { margin-bottom: 14px; }
.auth-field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.auth-input-wrap { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface-2); border-radius: 12px; padding: 0 12px; transition: border-color .15s, background .15s; }
.auth-input-wrap:focus-within { border-color: var(--primary); background: var(--surface); }
.auth-input-wrap svg { width: 17px; height: 17px; color: var(--primary); flex: 0 0 auto; }
.auth-input-wrap input { flex: 1; border: none; background: none; outline: none; padding: 12px 0; font-size: 15px; color: var(--ink); -webkit-user-select: text; user-select: text; }
.auth-input-wrap input::placeholder { color: #b6c2c7; }
.auth-remember { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); margin: 2px 0 16px; cursor: pointer; }
.auth-remember input { width: 16px; height: 16px; accent-color: var(--primary); }
.auth-code-row { display: flex; align-items: stretch; gap: 8px; }
.auth-code-btn { flex: 0 0 auto; white-space: nowrap; border: 1px solid var(--primary); background: var(--primary-soft); color: var(--primary-dark); border-radius: 12px; padding: 0 11px; font-size: 12px; font-weight: 600; }
.auth-code-btn:disabled { opacity: .55; cursor: default; }
.auth-code-hint { font-size: 11px; color: var(--muted); margin-top: 6px; line-height: 1.5; word-break: break-all; }
.auth-code-hint b { color: var(--primary-dark); font-size: 13px; letter-spacing: 1px; }
.auth-code-hint svg { display: inline; vertical-align: -2px; }
.reset-code-input { flex: 1; min-width: 0; border: 1px solid var(--border); background: var(--surface-2); border-radius: 10px; padding: 9px 11px; font-size: 14px; }
.auth-submit { width: 100%; border: none; border-radius: 12px; padding: 13px; font-size: 15px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #2e8b7e, #479e90); box-shadow: 0 6px 16px rgba(46,139,126,.28); cursor: pointer; }
.auth-submit:active { transform: scale(.98); }
.auth-forgot { display: block; width: 100%; text-align: center; border: none; background: none; color: var(--primary); font-size: 12px; padding: 12px 0 0; }
.auth-forgot.auth-register { font-weight: 700; font-size: 13px; padding-top: 14px; }
.auth-tip { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 10px; color: var(--muted); margin-top: 18px; }
.auth-tip svg { width: 13px; height: 13px; }

/* ===== 规范化文本版式：标题 / 序号 / 项目符号 / 对话 / 段落 ===== */
.fmt-head { font-weight: 700; color: var(--primary-dark); font-size: 12.5px; margin: 8px 0 3px; line-height: 1.5; }
.fmt-head:first-child, .plan-text .fmt-head:first-child, .expert-text .fmt-head:first-child { margin-top: 0; }
.fmt-list { margin: 2px 0 2px 14px; font-size: 12px; line-height: 1.75; color: var(--text-2); }
.fmt-bullet { margin-left: 16px; }
.fmt-dialogue { margin: 5px 0; padding: 6px 10px; border-left: 3px solid var(--primary); background: var(--primary-soft); border-radius: 0 8px 8px 0; font-size: 12px; line-height: 1.7; color: var(--text-2); }
.fmt-dialogue b { color: var(--primary-dark); font-weight: 700; }
.fmt-p { margin: 5px 0; font-size: 12px; line-height: 1.75; color: var(--text-2); }
.kv-value .fmt-p:first-child, .expert-text .fmt-p:first-child, .plan-text .fmt-p:first-child { margin-top: 0; }
.plan-text { margin-top: 2px; font-size: 12px; color: var(--text-2); }
.plan-text .fmt-p, .plan-text .fmt-list, .plan-text .fmt-dialogue { font-size: 12px; }
.white-space-normal { white-space: normal; }
.kv-value:has(.fmt-head), .kv-value:has(.fmt-list), .kv-value:has(.fmt-dialogue), .kv-value:has(.fmt-p), .expert-text:has(.fmt-head), .expert-text:has(.fmt-list), .expert-text:has(.fmt-dialogue), .expert-text:has(.fmt-p) { white-space: normal; }

/* ===== 长文本折叠阅读：默认收起、展开全文、弹窗查阅 ===== */
.longtext { position: relative; }
.longtext .lt-body { max-height: 148px; overflow: hidden; transition: max-height .22s ease; }
.longtext:not(.lt-open) .lt-body { -webkit-mask-image: linear-gradient(to bottom, #000 52%, transparent 100%); mask-image: linear-gradient(to bottom, #000 52%, transparent 100%); }
.longtext.lt-open .lt-body { max-height: none; }
.lt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 7px; }
.lt-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--primary); font-weight: 600; }
.lt-link svg { width: 13px; height: 13px; transition: transform .2s; }
.longtext.lt-open .lt-toggle svg { transform: rotate(180deg); }
.lt-meta { font-size: 11px; color: var(--text-2); }
.lt-read-body { font-size: 13px; line-height: 1.85; color: var(--text); }
.read-sheet .sheet-body { padding-bottom: 26px; }
.read-sheet .lt-read-body .fmt-head { font-size: 15px; margin: 14px 0 5px; }
.read-sheet .lt-read-body .fmt-p, .read-sheet .lt-read-body .fmt-list, .read-sheet .lt-read-body .fmt-dialogue { font-size: 13.5px; line-height: 1.9; }

/* ===== 心理专家团队建议：默认折叠，点击标题展开/收起 ===== */
.expert-fold .eo-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; background: var(--surface-2); border-radius: 9px; text-align: left; }
.expert-fold .eo-head .kv-label { margin-bottom: 0; }
.eo-count { font-size: 10px; font-weight: 500; color: var(--text-2); margin-left: 5px; }
.eo-hint { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--primary); white-space: nowrap; }
.eo-hint svg { width: 13px; height: 13px; transition: transform .2s; }
.expert-fold.eo-open .eo-hint svg { transform: rotate(180deg); }
.expert-fold .eo-body { display: none; }
.expert-fold.eo-open .eo-body { display: block; }

/* ===== 心理咨询师考证模块 ===== */
.exam-entry { width: 100%; display: flex; align-items: center; gap: 11px; margin-top: 13px; padding: 12px 14px; background: linear-gradient(100deg, #eef7f4, #f7fbf9); border: 1px solid #dcefe9; border-radius: 15px; text-align: left; }
.exam-entry:active { transform: scale(.99); }
.exam-entry-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.exam-entry-ico svg { width: 22px; height: 22px; }
.exam-entry-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.exam-entry-main b { font-size: 14px; color: var(--primary-dark); }
.exam-entry-main small { font-size: 11px; color: var(--text-2); margin-top: 2px; }
.exam-entry-count { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; color: var(--primary); white-space: nowrap; }
.exam-entry-count svg { width: 12px; height: 12px; }
.exam-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 4px; }
.exam-stats .stat { padding: 11px 4px; }
.exam-stats .stat-num { font-size: 18px; }
.exam-stats .stat-label { font-size: 10px; }
.stat-num.mint { color: var(--primary); }
.exam-revenue { display: flex; justify-content: space-around; gap: 8px; margin-top: 10px; padding: 10px 12px; background: var(--warm-soft); border-radius: 12px; font-size: 11px; color: #9a623c; }
.exam-revenue span { display: inline-flex; align-items: center; gap: 5px; }
.exam-revenue svg { width: 14px; height: 14px; }
.exam-revenue b { font-size: 13px; }
.exam-detail-head { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.exam-detail-title { display: flex; flex-direction: column; gap: 4px; }
.exam-detail-title b { font-size: 18px; }
.exam-detail-title > span { display: flex; gap: 6px; }
.exam-export-btn { margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 7px; }
.exam-export-btn svg { width: 16px; height: 16px; }
.mini-copy { font-size: 10px; color: var(--primary); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; margin-left: 5px; vertical-align: middle; }
.exam-conversion .conv-date { font-size: 12px; color: var(--primary); font-weight: 700; margin-bottom: 6px; }
.exam-conversion .conv-text { font-size: 13px; color: var(--text-2); line-height: 1.7; }
.exam-certs { display: flex; flex-direction: column; gap: 12px; }
.cert-slot { border-bottom: 1px dashed var(--border); padding-bottom: 11px; }
.cert-slot:last-of-type { border-bottom: none; }
.cert-label { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--text-2); margin-bottom: 7px; }
.cert-label svg { width: 15px; height: 15px; color: var(--primary); }
.cert-box { width: 100%; min-height: 90px; border: 1px dashed var(--border); border-radius: 10px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cert-box img { width: 100%; max-height: 220px; object-fit: contain; }
.cert-empty, .cert-loading { font-size: 11px; color: var(--muted); }
.cert-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 7px; }
.cert-view { text-align: center; }
.cert-view img { width: 100%; max-width: 100%; }
.cert-group-title { font-size: 11px; font-weight: 700; color: var(--primary); padding: 6px 9px; background: var(--primary-soft); border-radius: 8px; margin: 2px 0 9px; }
.cert-slot { padding-bottom: 12px; }
.cert-note { width: 100%; margin-top: 7px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-size: 11.5px; color: var(--text); font-family: inherit; resize: vertical; line-height: 1.5; }
.cert-note::placeholder { color: var(--muted); }
.exam-export-bar { display: flex; align-items: center; gap: 8px; margin: 12px 0 9px; padding: 8px 10px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); font-size: 12px; }
.exam-check-all { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; color: var(--text-2); }
.exam-selected-count { flex: 1; color: var(--muted); font-size: 11px; white-space: nowrap; }
.exam-export-bar .btn { padding: 6px 10px; font-size: 11.5px; }
.exam-export-bar .btn svg { width: 13px; height: 13px; }
.exam-select-row { display: flex; align-items: stretch; gap: 7px; margin-bottom: 10px; }
.exam-select-row .client-card { flex: 1; min-width: 0; }
.exam-select-row.selected .client-card { box-shadow: 0 0 0 2px var(--primary) inset, var(--shadow); }
.exam-pick-box { display: flex; align-items: center; padding: 0 1px; }
.exam-pick { width: 17px; height: 17px; accent-color: var(--primary); }
.cert-viewer-mask { position: fixed; inset: 0; background: rgba(18,38,43,.82); z-index: 70; display: flex; align-items: center; justify-content: center; padding: 16px; }
.cert-viewer { width: 100%; max-width: 560px; background: var(--surface); border-radius: 16px; overflow: hidden; }
.cert-viewer-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
.cert-viewer .cert-view { padding: 12px; }
.cert-viewer .cert-view img { max-height: 72vh; object-fit: contain; }
.user-list .setting-row { align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.user-list .setting-row > span { justify-content: flex-end; }
.user-list .btn { white-space: nowrap; }
.audit-list { max-height: 320px; overflow: auto; }
.audit-row { display: grid; grid-template-columns: 116px 70px 74px 1fr; gap: 6px; font-size: 11px; color: var(--text-2); padding: 8px 2px; border-bottom: 1px solid var(--border); }
.audit-row:last-child { border-bottom: none; }
.audit-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-row b { color: var(--text); font-weight: 500; }

