:root {
  --bg: #0f1220;
  --panel: #1a1f33;
  --panel2: #232a44;
  --text: #e8ebf5;
  --muted: #8b93b0;
  --accent: #5b8cff;
  --ai: #2fae8e;
  --me: #5b8cff;
  --danger: #ff5b6e;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }
.err { color: var(--danger); font-size: 13px; min-height: 16px; }

/* 登录 */
.overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.login-card { width: 84%; max-width: 340px; background: var(--panel); padding: 28px 22px; border-radius: 16px; text-align: center; }
.login-card h1 { margin: 0 0 4px; font-size: 24px; }
.login-card input { width: 100%; margin: 14px 0 12px; }

/* 布局 */
#app { display: flex; flex-direction: column; height: 100vh; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; background: var(--panel); }
.brand { font-weight: 700; font-size: 18px; }
.bell { position: relative; background: none; border: none; font-size: 22px; color: var(--text); }
.badge { position: absolute; top: -4px; right: -6px; background: var(--danger); color: #fff; font-size: 11px; min-width: 16px; height: 16px; line-height: 16px; border-radius: 8px; padding: 0 4px; }
main { flex: 1; overflow-y: auto; padding: 16px; }
h2 { font-size: 18px; margin: 4px 0 14px; }

/* 表单 */
.field { width: 100%; background: var(--panel2); color: var(--text); border: 1px solid #2c3350;
  border-radius: 10px; padding: 12px; font-size: 15px; margin-bottom: 10px; resize: vertical; }
textarea.field { min-height: 72px; }
button { cursor: pointer; border: none; border-radius: 10px; font-size: 15px; }
.primary { width: 100%; background: var(--accent); color: #fff; padding: 13px; font-weight: 600; }
.small { background: var(--panel2); color: var(--text); padding: 9px 14px; }
.small.alt { background: var(--ai); color: #fff; }
.link { background: none; color: var(--muted); padding: 0; margin-bottom: 10px; font-size: 14px; }

/* 池切换 */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; }
.chip { white-space: nowrap; background: var(--panel); color: var(--muted); padding: 8px 14px; border-radius: 20px; font-size: 13px; }
.chip.active { background: var(--accent); color: #fff; }

/* 卡片 */
.list { display: flex; flex-direction: column; gap: 10px; }
.card { background: var(--panel); border-radius: 12px; padding: 14px; cursor: pointer; }
.card.alert { border-left: 3px solid var(--danger); }
.card.alert.read { opacity: .55; }
.c-title { font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.c-link { color: var(--accent); font-size: 12px; margin-bottom: 4px; word-break: break-all; }
.c-ai { color: var(--ai); font-size: 13px; background: rgba(47,174,142,.1); padding: 6px 8px; border-radius: 8px; margin-bottom: 4px; }
.c-time { color: var(--muted); font-size: 11px; margin-top: 4px; }

/* 详情 */
.block { margin: 16px 0; }
.block > label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.prose { white-space: pre-wrap; line-height: 1.5; }
.status-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.sbtn { background: var(--panel2); color: var(--text); padding: 8px 12px; font-size: 13px; }
.sbtn.cur { background: var(--accent); color: #fff; }

/* 时间轴 */
.notes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.note { padding: 10px 12px; border-radius: 10px; font-size: 14px; line-height: 1.5; }
.note.ai { background: rgba(47,174,142,.12); border-left: 3px solid var(--ai); }
.note.me { background: rgba(91,140,255,.12); border-left: 3px solid var(--me); }
.n-head { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.row { display: flex; gap: 8px; }

/* tabbar */
.tabbar { display: flex; border-top: 1px solid #2c3350; background: var(--panel); }
.tabbar button { flex: 1; background: none; color: var(--muted); padding: 14px 0; font-size: 14px; }
.tabbar button:active { color: var(--text); }
