/* ===== AI语音外呼客服后台 移动端样式 ===== */
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
:root {
  --primary:#4f6ef7; --primary-dark:#3a56d4;
  --bg:#f3f4f8; --card:#fff; --text:#1f2430; --text2:#6b7280;
  --ok:#16a34a; --warn:#d97706; --err:#dc2626; --line:#eceef3;
  --radius:14px;
}
html,body { background:var(--bg); color:var(--text); font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Helvetica Neue",Arial,sans-serif; font-size:15px; }
a { color:var(--primary); text-decoration:none; }
.hidden { display:none !important; }

/* 顶栏 */
.topbar { position:fixed; top:0; left:0; right:0; z-index:100; background:var(--primary); color:#fff; padding:12px 14px; display:flex; align-items:center; gap:10px; }
.topbar .title { flex:1; font-size:17px; font-weight:600; text-align:center; }
.topbar .btn { background:rgba(255,255,255,.15); border:none; color:#fff; padding:6px 12px; border-radius:8px; font-size:13px; cursor:pointer; }
.topbar .btn:active { background:rgba(255,255,255,.3); }

/* 底部导航 */
.bottom-nav { position:fixed; bottom:0; left:0; right:0; z-index:100; background:#fff; border-top:1px solid var(--line); display:flex; padding-bottom:env(safe-area-inset-bottom); }
.bottom-nav .nav-item { flex:1; text-align:center; padding:8px 0 6px; color:var(--text2); font-size:11px; cursor:pointer; }
.bottom-nav .nav-item .ico { font-size:20px; display:block; margin-bottom:2px; }
.bottom-nav .nav-item.active { color:var(--primary); }

/* 页面容器 */
.page { padding:56px 12px 76px; max-width:560px; margin:0 auto; }
.page.no-nav { padding-bottom:20px; }

/* 卡片 */
.card { background:var(--card); border-radius:var(--radius); padding:14px; margin-bottom:12px; box-shadow:0 1px 3px rgba(0,0,0,.05); }
.card h3 { font-size:15px; margin-bottom:8px; display:flex; align-items:center; gap:6px; }
.card .sub { color:var(--text2); font-size:12px; }

/* 按钮 */
.btn { display:block; width:100%; padding:12px; border:none; border-radius:10px; font-size:15px; font-weight:600; cursor:pointer; text-align:center; }
.btn.primary { background:var(--primary); color:#fff; }
.btn.primary:active { background:var(--primary-dark); }
.btn.success { background:var(--ok); color:#fff; }
.btn.danger { background:#fee2e2; color:var(--err); }
.btn.ghost { background:#fff; color:var(--primary); border:1px solid var(--primary); }
.btn.sm { padding:6px 10px; font-size:12px; width:auto; border-radius:8px; display:inline-block; }
.btn.block-inline { display:inline-block; }

/* 表单 */
.field { margin-bottom:14px; }
.field label { display:block; font-size:13px; color:var(--text2); margin-bottom:6px; }
.field input,.field select,.field textarea { width:100%; padding:11px 12px; border:1px solid var(--line); border-radius:10px; font-size:15px; background:#fbfbfd; outline:none; }
.field input:focus,.field textarea:focus,.field select:focus { border-color:var(--primary); background:#fff; }
.field textarea { min-height:90px; resize:vertical; line-height:1.5; }
.field .hint { font-size:11px; color:var(--text2); margin-top:4px; }

/* 标签/徽章 */
.badge { display:inline-block; padding:2px 8px; border-radius:20px; font-size:11px; }
.badge.blue { background:#e8edff; color:var(--primary); }
.badge.green { background:#dcfce7; color:var(--ok); }
.badge.red { background:#fee2e2; color:var(--err); }
.badge.orange { background:#fef3c7; color:var(--warn); }
.badge.gray { background:#f1f2f5; color:var(--text2); }

/* 列表行 */
.list-row { display:flex; align-items:center; justify-content:space-between; padding:12px 0; border-bottom:1px solid var(--line); }
.list-row:last-child { border-bottom:none; }
.list-row .main { flex:1; min-width:0; }
.list-row .name { font-size:15px; font-weight:500; }
.list-row .desc { font-size:12px; color:var(--text2); margin-top:3px; word-break:break-all; }

/* 进度条 */
.progress { background:#eef0f5; height:8px; border-radius:10px; overflow:hidden; margin-top:8px; }
.progress .bar { background:var(--primary); height:100%; border-radius:10px; transition:width .3s; }

/* 统计格子 */
.stat-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:12px; }
.stat-item { background:var(--card); border-radius:var(--radius); padding:12px; text-align:center; box-shadow:0 1px 3px rgba(0,0,0,.05); }
.stat-item .num { font-size:20px; font-weight:700; color:var(--primary); }
.stat-item .lbl { font-size:11px; color:var(--text2); margin-top:2px; }

/* 对话气泡 */
.chat-box { display:flex; flex-direction:column; gap:10px; }
.bubble { max-width:80%; padding:10px 12px; border-radius:12px; font-size:14px; line-height:1.5; word-break:break-all; }
.bubble.user { align-self:flex-end; background:var(--primary); color:#fff; border-bottom-right-radius:4px; }
.bubble.ai { align-self:flex-start; background:#fff; border:1px solid var(--line); border-bottom-left-radius:4px; }
.bubble .meta { font-size:10px; opacity:.7; margin-top:4px; }

/* 音频播放器 */
.audio-wrap { background:#f6f7fb; border-radius:10px; padding:10px; margin:10px 0; }
audio { width:100%; height:38px; }

/* 空状态 */
.empty { text-align:center; color:var(--text2); padding:40px 0; font-size:14px; }
.empty .big { font-size:40px; margin-bottom:10px; }

/* 登录页 */
.login-wrap { min-height:100vh; display:flex; flex-direction:column; justify-content:center; padding:30px; background:linear-gradient(160deg,#4f6ef7,#7b5cf0); }
.login-box { background:#fff; border-radius:20px; padding:30px 22px; box-shadow:0 10px 30px rgba(0,0,0,.15); }
.login-box .logo { font-size:40px; text-align:center; margin-bottom:8px; }
.login-box h1 { text-align:center; font-size:20px; margin-bottom:4px; }
.login-box .slogan { text-align:center; color:var(--text2); font-size:13px; margin-bottom:24px; }

/* 分段筛选 */
.seg { display:flex; background:#eef0f5; border-radius:10px; padding:3px; margin-bottom:12px; }
.seg .seg-item { flex:1; text-align:center; padding:7px 0; font-size:13px; border-radius:8px; color:var(--text2); cursor:pointer; }
.seg .seg-item.active { background:#fff; color:var(--primary); font-weight:600; box-shadow:0 1px 3px rgba(0,0,0,.1); }

/* 弹窗 */
.mask { position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:200; display:flex; align-items:center; justify-content:center; }
.modal { background:#fff; border-radius:16px; padding:20px; width:88%; max-width:420px; max-height:80vh; overflow:auto; }
.modal h3 { margin-bottom:14px; }
.toast { position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); background:rgba(0,0,0,.75); color:#fff; padding:10px 18px; border-radius:10px; font-size:14px; z-index:300; }
.loading { text-align:center; color:var(--text2); padding:20px; font-size:13px; }

/* 问答编辑行 */
.qa-row { display:flex; gap:8px; margin-bottom:8px; align-items:flex-start; }
.qa-row input { flex:1; padding:9px 10px; border:1px solid var(--line); border-radius:10px; font-size:13px; background:#fbfbfd; outline:none; }
.qa-row .del { background:#fee2e2; color:var(--err); border:none; border-radius:10px; padding:8px 10px; font-size:14px; cursor:pointer; }

/* 录音状态点 */
.pulse-dot { display:inline-block; width:10px; height:10px; border-radius:50%; background:var(--err); margin-right:5px; animation:blink 1s infinite; }
@keyframes blink { 50% { opacity:.3; } }
