:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #14203a;
  --muted: #6b7a90;
  --line: rgba(20, 32, 58, 0.08);
  --accent: #2f6fed;
  --accent-soft: rgba(47, 111, 237, 0.10);
  --danger: #e5484d;
  --ok: #16a34a;
  --warn: #d97706;
  --radius: 18px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at 12% 0%, #eef4ff 0%, transparent 46%), radial-gradient(circle at 88% 4%, #eafaf3 0%, transparent 40%), var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }

/* login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(20, 32, 58, 0.10);
  padding: 32px 28px 26px;
}
.login-logo { height: 56px; width: auto; display: block; margin-bottom: 16px; }
.login-card h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: .5px; }
.login-card .sub { color: var(--muted); font-size: 13px; margin: 0 0 22px; }
.login-card label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
.login-card input {
  width: 100%; height: 46px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fbfcfe; font-size: 15px; color: var(--text); outline: none;
}
.login-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.login-card button {
  width: 100%; height: 48px; margin-top: 22px;
  border: 0; border-radius: 12px; background: var(--accent); color: #fff;
  font-size: 16px; font-weight: 600; cursor: pointer;
}
.login-card button:disabled { opacity: .6; cursor: default; }
.msg { min-height: 20px; margin-top: 12px; font-size: 13px; color: var(--danger); }
.tip { margin: 10px 0 0; font-size: 12px; color: var(--muted); }

/* app */
.topbar {
  height: 64px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px; background: rgba(255,255,255,.86);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 18px; }
.brand img { height: 40px; width: auto; }
.who { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; }
.who button { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 7px 14px; cursor: pointer; color: var(--muted); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 26px 22px 60px; display: grid; gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(20,32,58,.05); }

/* recorder */
.recorder { padding: 22px 24px 18px; }
.rec-head { display: flex; align-items: center; gap: 14px; }
.rec-head .mark {
  width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2f6fed, #23c8b5); color: #fff; font-weight: 700; font-size: 20px;
}
.eyebrow { font-size: 12px; color: var(--accent); font-weight: 700; letter-spacing: .08em; }
.rec-head h2 { margin: 2px 0 0; font-size: 20px; }
.rec-body { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 26px 0 8px; }
.rec-btn {
  width: 96px; height: 96px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 34px rgba(47,111,237,.35); transition: transform .15s ease, background .15s ease;
}
.rec-btn:hover { transform: translateY(-1px); }
.rec-btn .dot { width: 30px; height: 30px; border-radius: 50%; background: #fff; transition: border-radius .15s ease, width .15s ease, height .15s ease; }
.rec-btn.is-recording { background: var(--danger); box-shadow: 0 14px 34px rgba(229,72,77,.35); }
.rec-btn.is-recording .dot { width: 24px; height: 24px; border-radius: 6px; }
.rec-status { font-size: 14px; color: var(--muted); }
.rec-timer { font-size: 26px; font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: .06em; }
.rec-actions { display: flex; align-items: center; gap: 14px; justify-content: center; padding-top: 6px; border-top: 1px dashed var(--line); margin-top: 8px; padding-bottom: 4px; }
.upload-btn {
  display: inline-flex; align-items: center; height: 38px; padding: 0 18px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--text); font-size: 14px; cursor: pointer;
}
.upload-btn:hover { border-color: var(--accent); color: var(--accent); }
.hint { font-size: 12px; color: var(--muted); }

/* list */
.list-card { padding: 18px 22px 22px; }
.list-head { display: flex; align-items: center; justify-content: space-between; }
.list-head h3 { margin: 0; font-size: 17px; }
.ghost { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 7px 14px; font-size: 13px; color: var(--muted); cursor: pointer; }
.ghost:hover { border-color: var(--accent); color: var(--accent); }
.records { display: grid; gap: 12px; margin-top: 14px; }
.record {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 14px; background: #fcfdff;
}
.record .meta { flex: 1 1 auto; min-width: 0; }
.record .name { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record .sub { font-size: 12px; color: var(--muted); margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12px; }
.chip.processing { background: rgba(217,119,6,.10); color: var(--warn); }
.chip.completed { background: rgba(22,163,74,.10); color: var(--ok); }
.chip.failed { background: rgba(229,72,77,.10); color: var(--danger); }
.record .ops { display: flex; gap: 8px; flex-shrink: 0; }
.record .ops button { border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 7px 12px; font-size: 13px; cursor: pointer; color: var(--text); }
.record .ops button:hover { border-color: var(--accent); color: var(--accent); }
.record .ops button.danger:hover { border-color: var(--danger); color: var(--danger); }
.empty { color: var(--muted); text-align: center; padding: 40px 0 30px; font-size: 14px; }

/* detail */
.mask { position: fixed; inset: 0; background: rgba(15,23,42,.38); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 50; }
.detail { width: min(760px, 100%); max-height: 82vh; display: flex; flex-direction: column; overflow: hidden; }
.detail-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.detail-head h3 { margin: 0; font-size: 16px; }
.detail-body { padding: 18px 20px 22px; overflow: auto; font-size: 14px; line-height: 1.75; }
.detail-body h4 { margin: 16px 0 6px; font-size: 14px; color: var(--muted); font-weight: 600; }
.detail-body ul { margin: 6px 0 0; padding-left: 20px; }
.detail-body .transcript { white-space: pre-wrap; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.detail-body .kv { color: var(--muted); font-size: 12px; }

@media (max-width: 720px) {
  .topbar { padding: 0 14px; }
  .brand span { font-size: 16px; }
  .wrap { padding: 16px 12px 40px; }
  .recorder, .list-card { padding: 16px; }
  .record { flex-wrap: wrap; }
  .record .ops { width: 100%; justify-content: flex-end; }
}


/* ---------- 三个页签：首页 / 录音记录 / 我的 ---------- */
.wrap { padding-bottom: 96px; }
.view { display: block; }
.view.hidden { display: none; }
.muted { color: var(--muted); }
.home-hero { padding: 22px 24px 18px; }
.hello { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.hello h2 { margin: 2px 0 6px; font-size: 22px; }
.hello .muted { margin: 0; font-size: 13px; color: var(--muted); }
.home-hero .rec-timer { text-align: center; margin-top: 18px; }
.home-hero .rec-status { text-align: center; margin-top: 4px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--line); }
.stat { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 12px; background: #f8fafc; }
.stat strong { font-size: 20px; }
.stat span { font-size: 12px; color: var(--muted); }
.home-recent { padding: 18px 22px 20px; }
.quick { display: flex; align-items: center; gap: 14px; padding: 16px 20px; }
.quick .upload-btn { margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.filters input {
  flex: 1 1 220px; height: 38px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line); background: #fbfcfe; color: var(--text); outline: none; font-size: 14px;
}
.filters input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 13px; font-size: 13px; color: var(--muted); cursor: pointer; }
.chip-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: 64px; display: flex; align-items: stretch; justify-content: space-around;
  background: rgba(255,255,255,.94); border-top: 1px solid var(--line);
  backdrop-filter: blur(14px); padding-bottom: env(safe-area-inset-bottom, 0);
}
.tabbar .tab {
  flex: 1 1 0; border: 0; background: transparent; color: var(--muted); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 12px; padding: 0;
}
.tabbar .tab i { font-style: normal; font-size: 18px; line-height: 1; }
.tabbar .tab.active { color: var(--accent); font-weight: 600; }

.mine-card { padding: 24px 22px 18px; }
.mine-head { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 56px; height: 56px; border-radius: 18px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2f6fed, #23c8b5); color: #fff; font-size: 22px; font-weight: 700;
}
.mine-name { font-size: 17px; font-weight: 600; }
.mine-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.mine-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 20px 0 8px; }
.mine-stats div { background: #f8fafc; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mine-stats strong { font-size: 18px; }
.mine-stats span { font-size: 12px; color: var(--muted); }
.mine-actions { margin-top: 12px; border-top: 1px solid var(--line); }
.mine-row {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 4px; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; font-size: 14px; color: var(--text); cursor: pointer;
}
.mine-row span { color: var(--muted); }
.mine-row.danger { color: var(--danger); }
.mine-card .tip { margin: 16px 0 0; text-align: center; }

@media (min-width: 860px) {
  .wrap { max-width: 980px; }
  .stats { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .home-hero { padding: 18px 16px 14px; }
}


/* ---------- 能力入口 ---------- */
.caps { padding: 18px 22px 20px; }
.caps .hint { font-size: 12px; color: var(--muted); }
.cap-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.cap {
  border: 1px solid var(--line); background: #fbfcfe; border-radius: 12px;
  padding: 12px 8px; font-size: 13px; color: var(--text); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.cap span { font-size: 11px; color: var(--muted); }
.cap.ready { border-color: rgba(47,111,237,.22); background: rgba(47,111,237,.05); }
.cap.ready span { color: var(--accent); }
.cap.soon { opacity: .62; cursor: default; }
@media (max-width: 720px) {
  .cap-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- 详情：发言人 / 导出 ---------- */
.segments { display: grid; gap: 8px; margin-top: 6px; }
.seg { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.seg b { color: var(--accent); margin-right: 8px; }
.seg i { color: var(--muted); font-style: normal; font-size: 11px; margin-right: 8px; }
.detail-actions { display: flex; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.detail-actions button {
  border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 8px 16px; font-size: 13px; color: var(--text); cursor: pointer;
}
.detail-actions button:hover { border-color: var(--accent); color: var(--accent); }


/* ---------- 详情：待办 / 大纲 / 翻译 / 问 AI ---------- */
.todos li i { color: var(--muted); font-style: normal; font-size: 12px; margin-left: 8px; }
.outline { margin: 6px 0 0; padding-left: 18px; }
.outline li { margin: 4px 0; }
.outline ul { padding-left: 16px; border-left: 1px dashed var(--line); margin: 4px 0; }
.inline-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.inline-row select, .inline-row input {
  height: 36px; border-radius: 10px; border: 1px solid var(--line);
  background: #fbfcfe; color: var(--text); padding: 0 10px; font-size: 13px; outline: none;
}
.inline-row input { flex: 1 1 220px; }
.inline-row select:focus, .inline-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.inline-row button {
  height: 36px; border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 0 14px; font-size: 13px; cursor: pointer; color: var(--text);
}
.inline-row button:hover { border-color: var(--accent); color: var(--accent); }
.ask-answer { margin-top: 10px; font-size: 13px; color: var(--text); white-space: pre-wrap; }
