/* MindFlow · 全站基础样式（浅色主题） */
:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --ink: #1f2430;
  --ink-2: #5b6272;
  --ink-3: #9aa1b0;
  --line: #e6e8ef;
  --brand: #4f6ef7;
  --brand-deep: #3c56d8;
  --brand-soft: #eef1fe;
  --ok: #14a06b;
  --warn: #e67e22;
  --err: #e5484d;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(31, 36, 48, .07);
  --font: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-deep); }
button { font-family: var(--font); cursor: pointer; }
input, textarea, select { font-family: var(--font); }

/* 顶栏 */
.nav {
  display: flex; align-items: center; gap: 18px;
  padding: 0 28px; height: 60px;
  background: var(--panel); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.nav .logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--ink); }
.nav .logo img { width: 28px; height: 28px; }
.nav .spacer { flex: 1; }
.nav .links a { color: var(--ink-2); margin-left: 20px; font-size: 14px; }
.nav .links a:hover { color: var(--brand); }
.nav .user-chip { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.nav .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
}

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); font-size: 14px;
  transition: all .15s;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-deep); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.danger { color: var(--err); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sm { padding: 5px 12px; font-size: 13px; border-radius: 7px; }

/* 表单 */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 9px; font-size: 14px; background: #fbfbfd; outline: none;
  transition: border-color .15s;
}
.field input:focus { border-color: var(--brand); background: #fff; }
.form-msg { font-size: 13px; min-height: 20px; margin: 8px 0; }
.form-msg.err { color: var(--err); }
.form-msg.ok { color: var(--ok); }

/* 卡片 */
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(20px);
  background: #2a2f3c; color: #fff; padding: 10px 20px; border-radius: 10px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--err); }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(20, 24, 34, .45);
  display: none; align-items: center; justify-content: center; z-index: 200;
}
.modal-mask.show { display: flex; }
.modal { width: min(480px, 92vw); padding: 24px; }
.modal h3 { margin-bottom: 14px; font-size: 17px; }
.modal .modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* 通用容器 */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* 防折行 */
.btn { white-space: nowrap; }
.toast { max-width: 90vw; }

/* 移动端适配 */
@media (max-width: 640px) {
  .nav { padding: 0 14px; height: 54px; gap: 10px; }
  .nav .logo { font-size: 16px; }
  .nav .links a { margin-left: 14px; font-size: 13px; }
  .container { padding: 0 14px; }
  .btn { padding: 8px 14px; min-height: 38px; }
  .btn.sm { min-height: 32px; }
  .modal { padding: 20px 18px; }
  .field input { padding: 11px 12px; font-size: 16px; } /* 16px 防 iOS 聚焦缩放 */
}
