/* 会员中心 / 登录 / 注册 / 投稿 —— 全站群共用（11-06）
   跟随各站主题色：全部走 --brand 变量，所以 8 套骨架 × 4 皮肤都自动配色 */

.mb-wrap { max-width: 900px; margin: 0 auto; padding: 24px 16px 48px; }
.mb-wrap-wide { max-width: 1080px; }

/* ---- 卡片 ---- */
.mb-card { background: var(--card, #fff); border: 1px solid var(--line, #e5e7eb); border-radius: 12px; padding: 24px; }
.mb-card + .mb-card { margin-top: 16px; }
.mb-card h1 { font-size: 22px; line-height: 1.4; margin-bottom: 6px; }
.mb-card h2 { font-size: 17px; margin-bottom: 14px; padding-left: 10px; border-left: 3px solid var(--brand, #2563eb); }
.mb-sub { color: var(--mut, #6b7280); font-size: 13px; margin-bottom: 18px; }

/* ---- 表单 ---- */
.mb-field { margin-bottom: 16px; }
.mb-field > label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.mb-field .hint { font-size: 12px; color: var(--mut, #6b7280); font-weight: 400; margin-left: 6px; }
.mb-input, .mb-textarea {
  width: 100%; padding: 10px 12px; font-size: 15px; font-family: inherit;
  border: 1px solid var(--line, #e5e7eb); border-radius: 8px; background: #fff; color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.mb-input:focus, .mb-textarea:focus {
  outline: none; border-color: var(--brand, #2563eb);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, #2563eb) 15%, transparent);
}
.mb-textarea { min-height: 120px; resize: vertical; line-height: 1.8; }

/* ---- 按钮 ---- */
.mb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--brand, #2563eb); color: #fff; border: 0; border-radius: 8px;
  padding: 10px 22px; font-size: 15px; font-family: inherit; cursor: pointer; transition: .15s;
}
.mb-btn:hover { filter: brightness(.92); }
.mb-btn:disabled { opacity: .55; cursor: not-allowed; }
.mb-btn-lg { width: 100%; padding: 12px; font-size: 16px; }
.mb-btn-ghost { background: #fff; color: var(--brand, #2563eb); border: 1px solid var(--brand, #2563eb); }
.mb-btn-ghost:hover { background: color-mix(in srgb, var(--brand, #2563eb) 8%, #fff); }
.mb-btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 6px; }
.mb-btn-danger { background: #dc2626; }
.mb-btn-disabled, .mb-btn:disabled { background: #e5e7eb; color: #9ca3af; cursor: not-allowed; filter: none; }

/* ---- 提示 ---- */
.mb-err { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; border-radius: 8px; padding: 10px 14px; font-size: 14px; margin-bottom: 16px; }
.mb-ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; border-radius: 8px; padding: 10px 14px; font-size: 14px; margin-bottom: 16px; }
.mb-note { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 16px; }

/* ---- 登录/注册页 ---- */
.mb-auth { max-width: 420px; margin: 40px auto; }
.mb-auth .mb-card { padding: 28px; }
.mb-auth-hd { text-align: center; margin-bottom: 22px; }
.mb-auth-hd .logo-m {
  width: 48px; height: 48px; border-radius: 12px; background: var(--brand, #2563eb); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; margin-bottom: 10px;
}
.mb-auth-hd h1 { font-size: 20px; }
.mb-auth-hd p { color: var(--mut, #6b7280); font-size: 13px; margin-top: 4px; }
.mb-switch { text-align: center; font-size: 14px; color: var(--mut, #6b7280); margin-top: 16px; }
.mb-switch a { color: var(--brand, #2563eb); font-weight: 600; }
.mb-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--mut, #6b7280); line-height: 1.6; }
.mb-check input { margin-top: 3px; }

/* ---- 会员中心 ---- */
.mb-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.mb-user { display: flex; align-items: center; gap: 12px; }
.mb-avatar {
  width: 44px; height: 44px; border-radius: 50%; background: var(--brand, #2563eb); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px; flex: none;
}
.mb-user-t b { font-size: 16px; display: block; }
.mb-user-t span { font-size: 12px; color: var(--mut, #6b7280); }

/* 会员等级徽标：普通会员=灰，VIP=金 */
.mb-role {
  display: inline-block; vertical-align: middle; margin-left: 6px;
  font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px;
  background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb;
}
.mb-role.vip { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.mb-stats { display: flex; gap: 10px; }
.mb-stat { background: var(--brand-l, #eff6ff); border-radius: 10px; padding: 10px 18px; text-align: center; min-width: 84px; }
.mb-stat b { display: block; font-size: 20px; color: var(--brand, #2563eb); line-height: 1.2; }
.mb-stat span { font-size: 12px; color: var(--mut, #6b7280); }

/* ---- 我的文章 ---- */
.mb-list { border: 1px solid var(--line, #e5e7eb); border-radius: 10px; overflow: hidden; background: #fff; }
.mb-list-item { padding: 14px 16px; border-bottom: 1px solid var(--line, #e5e7eb); display: flex; gap: 12px; align-items: flex-start; }
.mb-list-item:last-child { border-bottom: 0; }
.mb-list-item .t { flex: 1; min-width: 0; }
.mb-list-item .t a { font-size: 15px; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-list-item .t a:hover { color: var(--brand, #2563eb); }
.mb-list-item .m { font-size: 12px; color: var(--mut, #6b7280); margin-top: 5px; display: flex; gap: 12px; flex-wrap: wrap; }
.mb-list-item .ops { display: flex; gap: 6px; flex: none; }
.mb-empty { padding: 40px 16px; text-align: center; color: var(--mut, #6b7280); font-size: 14px; }
.mb-badge { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: #dcfce7; color: #15803d; }
.mb-badge.off { background: #f3f4f6; color: #6b7280; }

/* ---- 投稿编辑器 ---- */
.mb-editor-toolbar {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; background: #f9fafb;
  border: 1px solid var(--line, #e5e7eb); border-bottom: 0; border-radius: 8px 8px 0 0;
}
.mb-tool {
  border: 1px solid transparent; background: transparent; border-radius: 6px;
  min-width: 32px; height: 30px; padding: 0 8px; font-size: 13px; font-family: inherit;
  cursor: pointer; color: var(--txt, #1f2937); display: inline-flex; align-items: center; justify-content: center;
}
.mb-tool:hover { background: #fff; border-color: var(--line, #e5e7eb); }
.mb-tool.on { background: #fff; border-color: var(--brand, #2563eb); color: var(--brand, #2563eb); }
.mb-tool-sep { width: 1px; background: var(--line, #e5e7eb); margin: 4px 3px; }

.mb-editor-body {
  min-height: 420px; max-height: none; overflow-y: auto; padding: 16px;
  border: 1px solid var(--line, #e5e7eb); border-radius: 0 0 8px 8px; background: #fff;
  font-size: 15px; line-height: 1.85; outline: none;
}
.mb-editor-body:focus { border-color: var(--brand, #2563eb); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, #2563eb) 12%, transparent); }
.mb-editor-body:empty::before { content: attr(data-ph); color: #9ca3af; pointer-events: none; }
.mb-editor-body h2 { font-size: 18px; margin: 18px 0 8px; font-weight: 700; }
.mb-editor-body p { margin: 0 0 12px; }
.mb-editor-body img { max-width: 100%; border-radius: 6px; margin: 8px 0; display: block; }
.mb-editor-body ul, .mb-editor-body ol { margin: 0 0 12px 22px; }
.mb-editor-body blockquote { border-left: 3px solid var(--brand, #2563eb); padding-left: 12px; color: var(--mut, #6b7280); margin: 12px 0; }

/* 上传进度条 */
.mb-upbar { height: 3px; background: #e5e7eb; border-radius: 2px; overflow: hidden; margin-top: 8px; display: none; }
.mb-upbar.on { display: block; }
.mb-upbar i { display: block; height: 100%; width: 30%; background: var(--brand, #2563eb); animation: mb-slide 1s linear infinite; }
@keyframes mb-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(400%); } }

.mb-count { font-size: 12px; color: var(--mut, #6b7280); text-align: right; margin-top: 6px; }
.mb-count.warn { color: #d97706; }
.mb-count.bad { color: #dc2626; }
.mb-actions { display: flex; gap: 12px; align-items: center; margin-top: 20px; flex-wrap: wrap; }
.mb-actions .spacer { flex: 1; }

/* ---- 发布成功提示 ---- */
.mb-toast-ok {
  background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d;
  border-radius: 10px; padding: 12px 16px; margin: 16px 0; font-size: 14px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.mb-toast-ok a { color: #15803d; font-weight: 600; text-decoration: underline; }

/* ---- 文章页作者行 ---- */
.a-author { font-size: 13px; color: var(--mut, #6b7280); }
.a-author b { color: var(--txt, #1f2937); }

/* ---- 移动端 ---- */
@media (max-width: 640px) {
  .mb-wrap { padding: 16px 12px 36px; }
  .mb-card { padding: 18px 16px; }
  .mb-auth { margin: 16px auto; }
  .mb-auth .mb-card { padding: 22px 18px; }
  .mb-top { flex-direction: column; align-items: flex-start; }
  .mb-stats { width: 100%; }
  .mb-stat { flex: 1; min-width: 0; }
  .mb-list-item { flex-direction: column; }
  .mb-list-item .ops { align-self: flex-end; }
  .mb-editor-body { min-height: 320px; }
  .mb-actions .mb-btn { flex: 1; }
}
