:root {
  --bg: #f4f6fa;
  --side: #1f2a3d;
  --side-hover: #2b3purple-ignored;
  --brand: #2d7ff9;
  --text: #1f2937;
  --muted: #8a94a6;
  --border: #e6eaf0;
}
* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ---------- 登录 ---------- */
.login-wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1f2a3d 0%, #2d4a7a 50%, #2d7ff9 100%);
  position: relative;
  overflow: hidden;
}
.login-wrap::before,
.login-wrap::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.login-wrap::before { width: 520px; height: 520px; top: -160px; right: -120px; }
.login-wrap::after { width: 380px; height: 380px; bottom: -140px; left: -100px; }
.login-card {
  width: 380px;
  padding: 42px 36px 30px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.22);
  position: relative;
  z-index: 2;
}
.login-brand { text-align: center; margin-bottom: 26px; }
.login-logo { font-size: 44px; line-height: 1; }
.login-brand h1 {
  margin: 10px 0 4px;
  font-size: 26px;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #2d7ff9, #6f4ef7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.login-brand p { margin: 0; color: var(--muted); font-size: 13px; }
.login-btn { width: 100%; margin-top: 4px; letter-spacing: 4px; }
.login-tip { margin-top: 18px; text-align: center; color: #aab2c0; font-size: 12px; }
.ipx { font-size: 14px; }

/* ---------- 布局 ---------- */
.main-layout { height: 100%; }
.side {
  background: var(--side);
  transition: width .22s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.side-brand {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,.07);
  user-select: none;
}
.side-logo { font-size: 22px; }
.side-name { color: #fff; font-weight: 700; font-size: 17px; letter-spacing: .5px; white-space: nowrap; }
.side-menu { border-right: none !important; flex: 1; padding-top: 8px; }
.side-menu .el-menu-item { border-radius: 8px; margin: 4px 8px; height: 46px; }
.side-menu .el-menu-item.is-active { background: linear-gradient(90deg, #2d7ff9, #4f95ff) !important; }
.side-menu .el-menu-item:hover { background: rgba(255,255,255,.07) !important; }
.mi { margin-right: 10px; font-size: 16px; }

.topbar {
  height: 58px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
}
.topbar-title { font-size: 17px; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.user-chip {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; font-size: 14px; padding: 4px 8px; border-radius: 8px;
}
.user-chip:hover { background: #f2f5fa; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #2d7ff9, #6f4ef7);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.caret { color: var(--muted); font-size: 11px; }
.content { padding: 20px; overflow-y: auto; }

/* ---------- 通用卡片 ---------- */
.card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 18px;
  margin-bottom: 16px;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.card-title { font-size: 15px; font-weight: 600; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.stat-box {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 18px; position: relative; overflow: hidden;
}
.stat-box .n { font-size: 26px; font-weight: 700; }
.stat-box .l { color: var(--muted); font-size: 13px; margin-top: 4px; }
.stat-box .ic { position: absolute; right: 14px; top: 14px; font-size: 26px; opacity: .25; }
.muted { color: var(--muted); font-size: 12px; }

/* ---------- 编辑器 ---------- */
.editor-grid { display: grid; grid-template-columns: 1fr 400px; gap: 16px; align-items: start; }
@media (max-width: 1200px) { .editor-grid { grid-template-columns: 1fr; } }
.md-area :deep(textarea), .md-area textarea {
  font-family: ui-monospace, "SF Mono", Consolas, monospace !important;
  font-size: 14px !important; line-height: 1.75 !important;
}
.ai-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.phone {
  width: 375px; margin: 0 auto; background: #fff;
  border: 10px solid #1f2a3d; border-radius: 30px;
  box-shadow: 0 12px 34px rgba(0,0,0,.18); overflow: hidden;
}
.phone-bar {
  height: 34px; background: #1f2a3d; color: #fff; font-size: 12px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.phone-body { height: 640px; overflow-y: auto; padding: 16px 14px; }
.phone-title { font-size: 20px; font-weight: 700; line-height: 1.4; margin-bottom: 10px; }
.phone-meta { color: #9a9a9a; font-size: 13px; margin-bottom: 16px; }
.phone-cover { width: 100%; border-radius: 8px; margin-bottom: 14px; display: block; }
.art-cover {
  width: 84px; height: 56px; object-fit: cover; border-radius: 6px; background: #f0f2f5;
}
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.asset-item {
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  background: #fff; position: relative;
}
.asset-item img { width: 100%; height: 120px; object-fit: cover; display: block; cursor: pointer; }
.asset-foot { padding: 6px 8px; display: flex; justify-content: space-between; align-items: center; }
.asset-badge {
  position: absolute; left: 6px; top: 6px; padding: 1px 7px; border-radius: 10px;
  font-size: 11px; color: #fff; background: rgba(0,0,0,.5);
}
.el-table { border-radius: 10px; }
