/* ============================================================
   星域工作台 · css/style.css
   简约现代 · 圆角卡片 · 柔和中性配色 · 全端响应式
   约束：全部样式集中本文件，HTML 不出现内嵌样式
   ============================================================ */

/* ---------- 设计变量 ---------- */
:root {
  --bg: #f3f5fb;
  --card: #ffffff;
  --line: #e6e9f2;
  --text: #232a3d;
  --muted: #7a829c;
  --primary: #5b5ce2;
  --primary-soft: #eef0ff;
  --accent: #2bb3ff;
  --ok: #16a34a;
  --ok-soft: #f0fdf4;
  --warn: #d97706;
  --warn-soft: #fffbeb;
  --danger: #e5484d;
  --danger-soft: #fef2f2;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(35, 42, 61, .08);
  --shadow-lg: 0 16px 48px rgba(35, 42, 61, .18);
  --side-w: 224px;
}

/* ---------- 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "HarmonyOS Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--text); }
ul, ol { list-style: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 12px; margin: 4px 0 12px; }
.mono { font-family: "SFMono-Regular", Consolas, "Courier New", monospace; letter-spacing: .5px; }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; transition: all .18s ease;
  border: 1px solid transparent; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(135deg, var(--primary), #7a6bff); color: #fff; box-shadow: 0 4px 14px rgba(91, 92, 226, .3); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: #f7c6c8; }
.btn-danger:hover { background: #fde3e4; }
.btn-warn { background: var(--warn-soft); color: var(--warn); border-color: #f3ddb2; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 8px; display: inline-flex;
  align-items: center; justify-content: center; color: var(--muted); font-size: 15px;
}
.icon-btn:hover { background: var(--bg); color: var(--text); }
.link-btn { color: var(--primary); font-size: 13px; }
.link-btn:hover { text-decoration: underline; }

/* ---------- 表单 ---------- */
.field { display: block; margin-bottom: 14px; }
.field-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #fbfcff; outline: none;
  transition: border .15s, box-shadow .15s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(91, 92, 226, .12); background: #fff; }
textarea.input { resize: vertical; min-height: 80px; }
.form-err { color: var(--danger); font-size: 12px; min-height: 18px; margin: 2px 0 6px; }

/* ---------- 徽标 ---------- */
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.badge-gray { background: #f1f3f9; color: var(--muted); }
.badge-blue { background: var(--primary-soft); color: var(--primary); }
.badge-gold { background: #fdf6e3; color: #b07d10; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }

/* ---------- Toast ---------- */
.toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 4000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  padding: 10px 20px; border-radius: 999px; font-size: 13px; color: #fff;
  box-shadow: var(--shadow-lg); animation: toastIn .25s ease; max-width: 78vw;
}
.toast-success { background: linear-gradient(135deg, #18a558, #2bb673); }
.toast-error { background: linear-gradient(135deg, #e5484d, #f06a6e); }
.toast-info { background: linear-gradient(135deg, #5b5ce2, #7a6bff); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

/* ---------- 弹窗组件库 ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(19, 22, 40, .45);
  backdrop-filter: blur(3px); z-index: 3000;
  display: flex; align-items: center; justify-content: center; padding: 18px;
  animation: fadeIn .18s ease;
}
.modal-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 460px; max-height: 88vh; display: flex; flex-direction: column;
  animation: popIn .22s cubic-bezier(.2, .9, .3, 1.2); overflow: hidden;
}
.modal-card.modal-wide { max-width: 720px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; }
.modal-title { font-size: 16px; font-weight: 600; }
.modal-body { padding: 6px 18px 16px; overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 18px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: scale(.92) translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 认证视图 ---------- */
.auth-view {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #10142e 0%, #1c2352 48%, #253069 100%);
  position: relative; overflow: hidden; padding: 20px;
}
.auth-stars {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 22%, #fff 60%, transparent 61%),
    radial-gradient(1.2px 1.2px at 32% 68%, #cfd6ff 60%, transparent 61%),
    radial-gradient(1.8px 1.8px at 55% 18%, #fff 60%, transparent 61%),
    radial-gradient(1.2px 1.2px at 71% 44%, #ffe9a8 60%, transparent 61%),
    radial-gradient(1.6px 1.6px at 86% 76%, #fff 60%, transparent 61%),
    radial-gradient(1.1px 1.1px at 44% 88%, #cfd6ff 60%, transparent 61%),
    radial-gradient(1.4px 1.4px at 8% 78%, #fff 60%, transparent 61%),
    radial-gradient(1.3px 1.3px at 93% 12%, #ffd76e 60%, transparent 61%);
  opacity: .8; animation: twinkle 5s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .45; } to { opacity: .9; } }
.auth-card {
  width: 100%; max-width: 420px; background: rgba(255, 255, 255, .97);
  border-radius: 18px; padding: 30px 28px; box-shadow: var(--shadow-lg);
  position: relative; z-index: 1;
}
.auth-brand { text-align: center; margin-bottom: 18px; }
.brand-logo { width: 56px; height: 56px; margin: 0 auto 8px; }
.brand-name { font-size: 22px; letter-spacing: 2px; }
.brand-sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.auth-tabs { display: flex; background: #f1f3f9; border-radius: 999px; padding: 4px; margin-bottom: 18px; }
.auth-tab { flex: 1; padding: 8px 0; border-radius: 999px; font-size: 14px; color: var(--muted); transition: all .2s; }
.auth-tab.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 2px 8px rgba(35, 42, 61, .1); }
.auth-divider { text-align: center; color: var(--muted); font-size: 12px; margin: 16px 0 10px; position: relative; }
.auth-divider::before, .auth-divider::after { content: ""; position: absolute; top: 50%; width: 38%; height: 1px; background: var(--line); }
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.auth-tip { margin-top: 14px; text-align: center; font-size: 12px; color: var(--primary); background: var(--primary-soft); border-radius: 8px; padding: 7px; }
.auth-notice { margin-top: 10px; text-align: center; font-size: 11px; color: var(--muted); line-height: 1.7; }

/* ---------- 主布局：侧栏 + 内容 ---------- */
.app-view { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--side-w); flex-shrink: 0; position: sticky; top: 0; height: 100vh;
  background: linear-gradient(180deg, #141a38 0%, #1a2148 100%);
  display: flex; flex-direction: column; z-index: 900;
}
.side-head { display: flex; align-items: center; gap: 10px; padding: 20px 18px 14px; }
.side-logo { width: 34px; height: 34px; }
.side-title { color: #fff; font-size: 16px; font-weight: 600; letter-spacing: 1px; }
.side-nav { flex: 1; overflow-y: auto; padding: 6px 10px; }
.nav-item {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; color: #aab2d3;
  font-size: 14px; margin-bottom: 2px; transition: all .16s; position: relative; text-align: left;
}
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.active { background: linear-gradient(135deg, var(--primary), #7a6bff); color: #fff; box-shadow: 0 4px 12px rgba(91, 92, 226, .4); }
.nav-badge {
  position: absolute; right: 10px; font-style: normal; min-width: 18px; height: 18px;
  border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
}
.nav-admin { color: #ffd76e; }
.nav-admin.active { background: linear-gradient(135deg, #d97706, #f0a13a); box-shadow: 0 4px 12px rgba(217, 119, 6, .4); }
.side-foot { padding: 10px; border-top: 1px solid rgba(255, 255, 255, .08); }

/* 纯 CSS 小图标（避免引入框架，保持离线可用） */
.nav-ico { width: 16px; height: 16px; border-radius: 4px; display: inline-block; position: relative; flex-shrink: 0; }
.ico-home { background: currentColor; opacity: .85; clip-path: polygon(50% 0, 100% 40%, 82% 40%, 82% 100%, 18% 100%, 18% 40%, 0 40%); }
.ico-market { background: currentColor; opacity: .85; clip-path: polygon(0 22%, 100% 22%, 88% 100%, 12% 100%); }
.ico-inv { background: currentColor; opacity: .85; clip-path: polygon(0 30%, 100% 30%, 100% 100%, 0 100%, 0 30%, 18% 30%, 18% 12%, 82% 12%, 82% 30%); }
.ico-pub { background: currentColor; opacity: .85; clip-path: polygon(12% 0, 88% 0, 100% 18%, 100% 100%, 0 100%, 0 18%); }
.ico-member { background: currentColor; opacity: .85; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.ico-wallet { background: currentColor; opacity: .85; clip-path: polygon(0 15%, 88% 15%, 100% 30%, 100% 100%, 0 100%); }
.ico-mall { background: currentColor; opacity: .85; clip-path: polygon(8% 28%, 92% 28%, 78% 100%, 22% 100%, 8% 28%, 20% 28%, 50% 0, 80% 28%); }
.ico-task { background: currentColor; opacity: .85; clip-path: polygon(15% 0, 85% 0, 85% 100%, 15% 100%, 15% 82%, 40% 82%, 40% 64%, 15% 64%, 15% 46%, 60% 46%, 60% 28%, 15% 28%); }
.ico-mail { background: currentColor; opacity: .85; clip-path: polygon(0 18%, 100% 18%, 100% 82%, 0 82%, 0 18%, 50% 55%, 100% 18%, 0 82%); }
.ico-set { background: currentColor; opacity: .85; clip-path: polygon(45% 0, 55% 0, 58% 16%, 68% 20%, 82% 10%, 90% 18%, 80% 32%, 84% 42%, 100% 45%, 100% 55%, 84% 58%, 80% 68%, 90% 82%, 82% 90%, 68% 80%, 58% 84%, 55% 100%, 45% 100%, 42% 84%, 32% 80%, 18% 90%, 10% 82%, 20% 68%, 16% 58%, 0 55%, 0 45%, 16% 42%, 20% 32%, 10% 18%, 18% 10%, 32% 20%, 42% 16%); }
.ico-admin { background: currentColor; opacity: .85; clip-path: polygon(50% 0, 100% 18%, 88% 82%, 50% 100%, 12% 82%, 0 18%); }
.ico-tool { background: currentColor; opacity: .85; clip-path: polygon(0 40%, 40% 40%, 55% 0, 70% 40%, 100% 40%, 100% 60%, 70% 60%, 55% 100%, 40% 60%, 0 60%); }
.ico-out { background: currentColor; opacity: .85; clip-path: polygon(0 0, 60% 0, 60% 22%, 78% 22%, 78% 78%, 60% 78%, 60% 100%, 0 100%); }

.main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; background: rgba(255, 255, 255, .86); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center;
  padding: 0 20px; gap: 14px; position: sticky; top: 0; z-index: 800;
}
.menu-btn { display: none; font-size: 18px; color: var(--text); }
.crumb { font-size: 16px; font-weight: 600; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.user-chip {
  display: flex; align-items: center; gap: 9px; padding: 5px 10px 5px 5px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer;
  transition: box-shadow .15s;
}
.user-chip:hover { box-shadow: var(--shadow); }
.chip-info { display: flex; flex-direction: column; line-height: 1.25; }
.chip-info b { font-size: 13px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-info i { font-style: normal; font-size: 11px; color: var(--muted); }
.title-badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); white-space: nowrap; }
.title-badge.t-gold { background: #fdf3d7; color: #a8740a; }
.title-badge.t-admin { background: linear-gradient(135deg, #f7b733, #e8890c); color: #fff; }

/* 头像（默认 CSS 首字头像 / 上传后为图片） */
.avatar-frame, .avatar-img {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-weight: 600; font-size: 14px; overflow: hidden; position: relative;
}
.avatar-img img { width: 100%; height: 100%; object-fit: cover; }
/* 星环头像框道具效果 */
.prop-ring .avatar-frame, .avatar-frame.prop-ring { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #ffd76e; }
.prop-galaxy .avatar-frame, .avatar-frame.prop-galaxy { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #8a5cff; }

/* ---------- 面板与卡片 ---------- */
.panels { flex: 1; padding: 20px; max-width: 1200px; width: 100%; margin: 0 auto; }
.panel { display: none; animation: panelIn .25s ease; }
.panel.active { display: block; }
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px; margin-bottom: 16px; border: 1px solid rgba(230, 233, 242, .7);
}
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.stat-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; border: 1px solid rgba(230, 233, 242, .7); }
.stat-num { font-size: 22px; font-weight: 700; }
.stat-label { color: var(--muted); font-size: 12px; }

/* 空状态占位 */
.empty {
  text-align: center; color: var(--muted); padding: 34px 10px; font-size: 13px;
  background: repeating-linear-gradient(45deg, #fafbfe, #fafbfe 12px, #f5f7fd 12px, #f5f7fd 24px);
  border-radius: var(--radius-sm); border: 1px dashed var(--line);
}
/* ============================================================
   星域工作台 · css/style.css （第二部分：业务组件）
   ============================================================ */

/* ---------- 首页：公告轮播 ---------- */
.ann-card { background: linear-gradient(135deg, #1c2350, #2c3a7e); border: none; color: #fff; }
.ann-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ann-flag { font-size: 12px; background: rgba(255, 255, 255, .16); padding: 3px 10px; border-radius: 999px; letter-spacing: 2px; }
.ann-card .link-btn { color: #ffd76e; }
.ann-carousel { min-height: 46px; position: relative; cursor: pointer; }
.ann-slide { display: none; animation: panelIn .35s ease; }
.ann-slide.active { display: block; }
.ann-slide b { margin-right: 8px; }
.ann-slide .ann-pin { color: #ffd76e; margin-right: 6px; }
.ann-slide p { color: #c4cdf2; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 92%; }
.ann-dots { display: flex; gap: 6px; margin-top: 10px; }
.ann-dot { width: 7px; height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .28); transition: all .2s; }
.ann-dot.active { background: #ffd76e; width: 18px; }

.hero-card { background: linear-gradient(120deg, #ffffff 55%, #eef0ff); }
.hero-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-name { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hero-id { color: var(--muted); font-size: 13px; margin-top: 2px; }
.hero-bio { color: var(--muted); font-size: 13px; margin-top: 8px; max-width: 640px; }

.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.quick-item {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px;
  text-align: left; transition: all .18s; background: #fbfcff; display: flex; flex-direction: column; gap: 4px;
}
.quick-item:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.quick-item b { font-size: 14px; }
.quick-item span { font-size: 12px; color: var(--muted); }

/* ---------- 页签 ---------- */
.tab-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tab-btn {
  padding: 7px 16px; border-radius: 999px; background: #f1f3f9; color: var(--muted);
  font-size: 13px; transition: all .18s; border: 1px solid transparent;
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { background: var(--primary-soft); color: var(--primary); border-color: #d8dcff; font-weight: 600; }

/* ---------- 作品卡片 ---------- */
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(218px, 1fr)); gap: 14px; }
.work-card {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: #fff; transition: all .18s; cursor: pointer; display: flex; flex-direction: column;
}
.work-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #d8dcff; }
.work-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #0d1230; }
.work-cover-box { position: relative; }
.work-lock-flag {
  position: absolute; left: 8px; top: 8px; background: rgba(15, 18, 34, .72); color: #ffd76e;
  font-size: 11px; padding: 3px 8px; border-radius: 999px; backdrop-filter: blur(2px);
}
.work-del-flag {
  position: absolute; right: 8px; top: 8px; background: rgba(229, 72, 77, .92); color: #fff;
  font-size: 11px; padding: 3px 8px; border-radius: 999px;
}
.work-info { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.work-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.tag { font-size: 11px; background: #f1f3f9; color: var(--muted); border-radius: 5px; padding: 1px 7px; }
.work-meta { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: auto; }
.work-author { color: var(--primary); cursor: pointer; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-author:hover { text-decoration: underline; }
.price-tag { font-weight: 700; color: var(--warn); }
.price-tag.free { color: var(--ok); }
.price-tag.xingli { color: #e8890c; }

/* ---------- 作品详情弹窗 ---------- */
.detail-cover { width: 100%; border-radius: var(--radius-sm); aspect-ratio: 16 / 9; object-fit: cover; background: #0d1230; }
.detail-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin: 12px 0; font-size: 13px; }
.detail-meta span { color: var(--muted); }
.kv { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: none; }

/* ---------- 我的发布列表 ---------- */
.pub-item {
  display: flex; gap: 14px; padding: 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); margin-bottom: 10px; align-items: center; background: #fff;
}
.pub-cover { width: 148px; aspect-ratio: 16 / 9; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: #0d1230; }
.pub-info { flex: 1; min-width: 0; }
.pub-name { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.pub-sub { font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.pub-ops { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 会员中心 ---------- */
.member-box { display: flex; flex-direction: column; gap: 16px; }
.member-hero {
  border-radius: var(--radius); padding: 22px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(120deg, #232a55, #4b3f9e 60%, #7a5cff);
}
.member-hero.vip2 { background: linear-gradient(120deg, #3d2d12, #93610f 55%, #e8a23c); }
.member-hero h3 { font-size: 18px; margin-bottom: 4px; }
.member-count { font-size: 26px; font-weight: 700; font-family: Consolas, monospace; margin-top: 6px; }
.member-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.plan-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: #fff; }
.plan-card h4 { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.plan-price { font-size: 22px; font-weight: 700; color: #e8890c; margin: 6px 0; }
.plan-price small { font-size: 12px; color: var(--muted); font-weight: 400; }
.plan-feats { margin: 8px 0 12px; }
.plan-feats li { font-size: 13px; color: var(--muted); padding: 3px 0; }
.plan-feats li::before { content: "✓"; color: var(--ok); margin-right: 6px; font-weight: 700; }

/* ---------- 钱包 ---------- */
.wallet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 16px; }
.wallet-card { border-radius: var(--radius); padding: 18px; color: #fff; position: relative; overflow: hidden; }
.wallet-xingli { background: linear-gradient(120deg, #b3540c, #e8890c); }
.wallet-shuoli { background: linear-gradient(120deg, #1d6f42, #2fae6a); }
.wallet-card .w-num { font-size: 26px; font-weight: 700; margin: 6px 0 2px; }
.wallet-note { font-size: 11px; opacity: .85; }
.wallet-ops { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.tx-list li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 2px; border-bottom: 1px dashed var(--line); font-size: 13px; }
.tx-list li:last-child { border-bottom: none; }
.tx-plus { color: var(--ok); font-weight: 600; }
.tx-minus { color: var(--danger); font-weight: 600; }

/* ---------- 商城 ---------- */
.mall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.id-card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center;
  background: linear-gradient(160deg, #fff, #f6f4ff); transition: all .18s;
}
.id-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.id-card .id-num { font-size: 21px; font-weight: 700; letter-spacing: 2px; font-family: Consolas, monospace; color: var(--primary); }
.id-card.is-occupied { filter: grayscale(1); opacity: .55; cursor: not-allowed; background: #f6f7fa; }
.id-card.is-occupied .id-num { color: var(--muted); }
.id-tags { display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; margin: 8px 0; }
.id-price { font-size: 18px; font-weight: 700; color: #e8890c; margin-bottom: 10px; }
.id-price small { font-size: 12px; color: var(--muted); font-weight: 400; }

/* ---------- 任务 & 等级 ---------- */
.exp-card { background: linear-gradient(120deg, #232a55, #4b3f9e); color: #fff; }
.exp-bar { height: 10px; background: rgba(255, 255, 255, .2); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.exp-bar-in { height: 100%; background: linear-gradient(90deg, #ffd76e, #ff9d5c); border-radius: 999px; transition: width .4s ease; }
.task-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 4px; border-bottom: 1px dashed var(--line);
}
.task-item:last-child { border-bottom: none; }
.task-name b { font-size: 14px; display: block; }
.task-name span { font-size: 12px; color: var(--muted); }
.task-reward { font-size: 12px; color: var(--warn); white-space: nowrap; }
.level-lock-tip { background: var(--warn-soft); border: 1px solid #f3ddb2; color: var(--warn); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 12px; margin-bottom: 12px; }

/* ---------- 站内邮箱 ---------- */
.mail-item {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px;
  margin-bottom: 10px; cursor: pointer; transition: all .15s; background: #fff;
}
.mail-item:hover { border-color: #d8dcff; }
.mail-item.unread { background: var(--primary-soft); border-color: #d8dcff; }
.mail-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.mail-title { font-weight: 600; font-size: 14px; }
.mail-item.unread .mail-title::before { content: "●"; color: var(--primary); font-size: 10px; margin-right: 6px; }
.mail-time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.mail-body { font-size: 13px; color: var(--muted); margin-top: 6px; white-space: pre-wrap; word-break: break-all; }

/* ---------- 个人设置 ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.avatar-row { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.avatar-big { width: 64px; height: 64px; font-size: 24px; }
.id-showcase {
  background: linear-gradient(135deg, #1c2350, #4b3f9e); color: #fff; border-radius: var(--radius);
  padding: 16px; text-align: center; margin-bottom: 12px;
}
.id-showcase .num { font-size: 26px; letter-spacing: 3px; font-family: Consolas, monospace; font-weight: 700; }
.id-showcase .lab { font-size: 11px; opacity: .8; letter-spacing: 2px; margin-bottom: 2px; }
.mini-tip { font-size: 11px; color: var(--muted); margin-top: 6px; line-height: 1.7; }

/* ---------- 个人主页 ---------- */
.profile-head {
  background: linear-gradient(120deg, #1c2350, #35418c); border-radius: var(--radius);
  padding: 22px; color: #fff; display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
}
.profile-head .avatar-frame { width: 64px; height: 64px; font-size: 24px; }
.profile-stats { display: flex; gap: 18px; margin-top: 6px; font-size: 13px; color: #c4cdf2; flex-wrap: wrap; }
.profile-ops { margin-left: auto; display: flex; gap: 10px; }

/* ---------- 管理后台 ---------- */
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; word-break: break-all; }
.admin-table th { color: var(--muted); font-weight: 500; background: #fafbfe; }
.admin-table tr:hover td { background: #fbfcff; }
.review-item { display: flex; gap: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 10px; align-items: center; }
.log-list li { padding: 8px 2px; border-bottom: 1px dashed var(--line); font-size: 12px; color: var(--muted); }
.log-list li b { color: var(--text); font-weight: 500; }

/* ---------- 回收站卡片状态 ---------- */
.recycle-card { border: 1px dashed #f0c4c6; background: #fffafa; }
.recycle-timer { color: var(--danger); font-size: 12px; }

/* ---------- 抽屉式工具箱 ---------- */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(19, 22, 40, .4); z-index: 1500;
  backdrop-filter: blur(2px); animation: fadeIn .2s ease;
}
.toolbox-drawer {
  position: fixed; top: 0; right: -400px; width: 380px; max-width: 92vw; height: 100vh;
  background: #fff; z-index: 1600; box-shadow: -12px 0 40px rgba(19, 22, 40, .2);
  transition: right .3s cubic-bezier(.2, .8, .3, 1); display: flex; flex-direction: column;
}
.toolbox-drawer.open { right: 0; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--line); font-size: 15px;
}
.drawer-tabs { display: flex; border-bottom: 1px solid var(--line); }
.dtab { flex: 1; padding: 11px 0; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent; }
.dtab.active { color: var(--primary); border-color: var(--primary); font-weight: 600; }
.tool-body { padding: 16px; overflow-y: auto; flex: 1; }

/* 计算器 */
.calc-screen { background: #171c38; border-radius: var(--radius-sm); padding: 14px 16px; color: #fff; text-align: right; margin-bottom: 12px; }
.calc-expr { min-height: 18px; color: #8f97c4; font-size: 13px; word-break: break-all; }
.calc-out { font-size: 28px; font-weight: 600; word-break: break-all; font-family: Consolas, monospace; }
.calc-pad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ck {
  height: 52px; border-radius: 12px; background: #f1f3f9; font-size: 17px; font-weight: 500;
  transition: all .12s;
}
.ck:hover { background: #e7eaf5; }
.ck:active { transform: scale(.95); }
.ck-fn { background: #ffe9c9; color: #a8740a; }
.ck-op { background: var(--primary-soft); color: var(--primary); }
.ck-eq { background: linear-gradient(135deg, var(--primary), #7a6bff); color: #fff; }
.ck-2col { grid-column: span 2; }

/* 备忘录 */
.memo-form, .course-form { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.memo-form .input { flex: 1; min-width: 0; }
.course-form .input { flex: 1; min-width: 0; }
.course-form .input[name="name"] { flex: 2; }
.memo-list li {
  display: flex; align-items: center; gap: 10px; padding: 10px 4px;
  border-bottom: 1px dashed var(--line); font-size: 13px;
}
.memo-text { flex: 1; word-break: break-all; }
.memo-list li.done .memo-text { text-decoration: line-through; color: var(--muted); }
.checkbox { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }

/* 课程表 */
.course-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 12px; }
.course-cell { background: #f6f7fd; border-radius: 6px; min-height: 52px; padding: 3px; font-size: 10px; text-align: center; }
.course-cell .cell-head { color: var(--muted); font-size: 10px; padding-bottom: 2px; border-bottom: 1px dashed var(--line); margin-bottom: 3px; }
.course-chip { background: var(--primary-soft); color: var(--primary); border-radius: 4px; padding: 2px 1px; margin-bottom: 2px; word-break: break-all; cursor: pointer; }
.course-chip:hover { background: #fde3e4; color: var(--danger); text-decoration: line-through; }

/* 图片扫描 */
.scan-preview { margin-bottom: 10px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.scan-preview img { width: 100%; max-height: 220px; object-fit: contain; background: #f6f7fd; }
.scan-result { margin-top: 12px; background: #f6f7fd; border-radius: var(--radius-sm); padding: 12px; font-size: 13px; color: var(--muted); min-height: 48px; white-space: pre-wrap; word-break: break-all; }

/* ---------- 报表证据图 ---------- */
.evidence-img { max-width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--line); margin-top: 8px; }

/* ---------- 响应式适配 ---------- */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-meta { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .sidebar {
    position: fixed; left: -250px; width: 240px; transition: left .28s ease;
    box-shadow: 12px 0 40px rgba(19, 22, 40, .25);
  }
  .sidebar.open { left: 0; }
  .sidebar-mask { position: fixed; inset: 0; background: rgba(19, 22, 40, .4); z-index: 850; }
  .menu-btn { display: block; }
  .panels { padding: 14px; }
  .work-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .user-chip .chip-info { display: none; }
  .pub-item { flex-direction: column; align-items: stretch; }
  .pub-cover { width: 100%; }
  .profile-ops { margin-left: 0; width: 100%; }
}
@media (max-width: 520px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .modal-foot .btn { flex: 1; }
  .course-grid { grid-template-columns: repeat(4, 1fr); }
  .topbar { padding: 0 12px; }
  .btn-sm.tool-top { display: none; }
}

/* ============================================================
   补充：工具类与组件补丁（保持 HTML/JS 零内联样式）
   ============================================================ */
.no-mb { margin-bottom: 0; }
.mt8 { margin-top: 8px; } .mt10 { margin-top: 10px; } .mt12 { margin-top: 12px; } .mt14 { margin-top: 14px; }
.muted-dark { color: #c4cdf2; font-size: 12px; margin: 2px 0; align-self: center; }
.text-danger { color: var(--danger); }
.confirm-text { line-height: 1.8; }
.fs26 { font-size: 26px; color: var(--primary); }
.task-side { display: flex; align-items: center; gap: 10px; }
.plan-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.detail-name { margin: 10px 0 4px; }
.prop-name { margin: 6px 0 2px; }
.owned-flag { left: auto; right: 8px; background: rgba(22, 163, 74, .92); }
.author-btn { background: none; border: none; color: var(--primary); font-size: inherit; }
.author-btn:hover { text-decoration: underline; }
.file-label { position: relative; display: inline-block; overflow: hidden; }
.radio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin-top: 4px; }
.radio-row { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.head-row { background: transparent; border: none; padding: 2px 0; }
.p-label { display: block; font-size: 10px; color: var(--muted); margin-bottom: 2px; }
.pub-item-wrap { padding: 12px; }
.pub-list, .mail-list { display: block; }
.settings-box, .tasks-box, .wallet-box, .profile-box { display: block; }
.settings-grid-wrap { display: block; }

/* 课程表网格：首行表头 + 5行×7列 */
.course-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.course-cell { min-height: 46px; background: #f7f8fd; border-radius: 8px; padding: 4px; border: 1px solid #eef0f7; overflow: hidden; }
.cell-head { text-align: center; font-size: 12px; color: var(--muted); font-weight: 600; }
.course-chip { background: linear-gradient(135deg, #6d5efc, #2bb3ff); color: #fff; border-radius: 6px; font-size: 11px; padding: 3px 5px; margin-top: 3px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.course-chip:hover { filter: brightness(1.1); }

/* 邮箱列表 */
.mail-list .mail-item { cursor: pointer; }
.mail-item.unread .mail-title { font-weight: 700; }
.mail-item.unread::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); margin-right: 6px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
