/* ============================================
   快片AI · 全站样式
   ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f4f5fb;
  --card: #ffffff;
  --sidebar: #171a28;
  --sidebar-hover: #232741;
  --sidebar-active: rgba(124, 92, 255, .16);
  --text: #1f2333;
  --text-2: #5a6072;
  --text-3: #9aa0b5;
  --border: #e6e8f0;
  --primary: #7c5cff;
  --primary-2: #ff6b9d;
  --grad: linear-gradient(135deg, #7c5cff 0%, #ff6b9d 100%);
  --success: #16c784;
  --danger: #f6465d;
  --warn: #f59e0b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 24, 60, .04), 0 8px 24px rgba(20, 24, 60, .06);
}

html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
input, textarea { font-family: inherit; }
svg { vertical-align: middle; }

.app { display: flex; height: 100vh; overflow: hidden; }

/* ============ 侧边栏 ============ */
.sidebar {
  width: 224px;
  flex-shrink: 0;
  background: var(--sidebar);
  color: #c6cbe0;
  display: flex;
  flex-direction: column;
  padding: 18px 12px 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 18px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  margin-bottom: 14px;
}
.logo-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(124, 92, 255, .4);
}
.logo-icon svg { width: 20px; height: 20px; }
.logo-name { color: #fff; font-size: 17px; font-weight: 700; }
.logo-sub { font-size: 11px; color: #8a90ab; margin-left: -4px; align-self: flex-end; padding-bottom: 3px; }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #b7bdd6;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s, color .15s;
  user-select: none;
}
.nav-item svg { width: 18px; height: 18px; opacity: .9; }
.nav-item:hover { background: var(--sidebar-hover); color: #e6e9f7; }
.nav-item.active {
  background: var(--sidebar-active);
  color: #fff;
  font-weight: 600;
}
.nav-item.active svg { color: var(--primary-2); opacity: 1; }

.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px; padding: 12px 10px;
  background: rgba(255,255,255,.05);
  border-radius: 12px;
}
.avatar {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600;
}
.avatar-sm { width: 30px; height: 30px; font-size: 13px; }
.user-meta { min-width: 0; }
.user-name { color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-level { font-size: 11px; color: #8a90ab; display: flex; align-items: center; gap: 5px; }
.lv-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); display: inline-block; }

/* ============ 主区域 ============ */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: 60px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
}
.page-title { font-size: 17px; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.points-badge {
  display: flex; align-items: center; gap: 5px;
  background: #f1eefd;
  color: #6b4df0;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 13px;
}
.points-badge svg { width: 15px; height: 15px; }
.points-badge b { font-size: 15px; }

.btn-signin {
  background: var(--grad);
  color: #fff;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(124, 92, 255, .3);
  transition: transform .12s, box-shadow .12s;
}
.btn-signin:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(124, 92, 255, .4); }
.btn-signin.done { background: #eceef5; color: #9aa0b5; box-shadow: none; cursor: default; }

.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px;
  background: #f4f5fb;
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
}

/* ============ 内容区 ============ */
.content { flex: 1; overflow-y: auto; padding: 22px 24px 40px; }
.view { display: none; }
.view.active { display: block; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 卡片 */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
}
.card-title {
  font-size: 15px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
}
.card-desc { color: var(--text-2); font-size: 13px; margin-bottom: 14px; }
.card-head-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.card-head-row .card-title { margin-bottom: 0; }
.muted { color: var(--text-3); font-size: 12px; }
.small { font-size: 12px; margin-top: 10px; display: block; }

/* 标签页 */
.sub-tabs { display: flex; gap: 6px; margin-bottom: 16px; background: #edeef5; padding: 4px; border-radius: 10px; width: max-content; }
.sub-tab {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-2);
  transition: all .15s;
}
.sub-tab.active { background: var(--card); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(20,24,60,.1); }

/* 子视图 */
.sub-view { display: none; }
.sub-view.active { display: block; animation: fadeIn .2s ease; }

/* ============ 创作页通用布局 ============ */
.gen-layout { display: grid; grid-template-columns: 400px 1fr; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .gen-layout { grid-template-columns: 1fr; } }

.gen-config { display: flex; flex-direction: column; gap: 16px; }
.gen-results { min-height: 400px; }

.results-header {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 700;
  margin-bottom: 14px;
}
.results-count {
  background: #f1eefd; color: var(--primary);
  padding: 1px 9px; border-radius: 999px; font-size: 12px;
}

/* 上传区 */
.dropzone {
  border: 2px dashed #d8dbe8;
  border-radius: 12px;
  padding: 26px 16px;
  text-align: center;
  color: var(--text-3);
  cursor: pointer;
  position: relative;
  transition: all .15s;
  background: #fafbff;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--primary); background: #f5f2ff; }
.dropzone svg { width: 26px; height: 26px; margin-bottom: 6px; color: #b9bdd4; }
.dropzone p { font-size: 13px; color: var(--text-2); margin-bottom: 2px; }
.dropzone span { font-size: 12px; }
.dz-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dz-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.dz-count { font-size: 12px; color: var(--text-3); }

/* 上传缩略预览 */
.dz-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.dz-preview { position: relative; }
.dz-preview img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.dz-preview .rm {
  position: absolute; top: -6px; right: -6px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--danger); color: #fff; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}

/* 表单 */
.field { margin-bottom: 14px; }
.field-label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-2); margin-bottom: 8px;
}
.textarea {
  width: 100%;
  min-height: 96px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  resize: vertical;
  background: #fafbff;
  transition: border .15s, box-shadow .15s;
  outline: none;
}
.textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124, 92, 255, .12); }

.check-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); margin: 10px 0; cursor: pointer; user-select: none; }
.check-row input { accent-color: var(--primary); width: 15px; height: 15px; }

/* 按钮 */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--grad);
  color: #fff;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 14px; font-weight: 600;
  box-shadow: 0 4px 14px rgba(124, 92, 255, .32);
  transition: transform .12s, box-shadow .12s, opacity .15s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(124, 92, 255, .42); }
.btn-primary:disabled { opacity: .6; cursor: default; transform: none; }
.btn-primary svg { width: 16px; height: 16px; }
.btn-block { width: 100%; }
.btn-generate .cost { font-size: 12px; font-weight: 400; opacity: .85; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-2);
  background: var(--card);
  transition: all .15s;
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 5px 12px; font-size: 12px; }

.btn-danger-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #fbd3da;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--danger);
  background: #fff;
  transition: all .15s;
}
.btn-danger-ghost:hover { background: #fff5f6; border-color: var(--danger); }
.btn-danger-ghost.btn-sm { padding: 5px 12px; font-size: 12px; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }

/* 比例选择 */
.ratio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.ratio-btn {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 4px;
  font-size: 12px;
  color: var(--text-2);
  background: #fff;
  text-align: center;
  transition: all .15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ratio-btn:hover { border-color: var(--primary); color: var(--primary); }
.ratio-btn.active {
  background: var(--primary); border-color: var(--primary);
  color: #fff; font-weight: 600;
}
.ratio-detail {
  margin-top: 8px; font-size: 12px; color: var(--text-3);
  background: #f6f7fc; padding: 6px 10px; border-radius: 8px;
}

/* 档位 / 数量 */
.tier-grid { display: grid; grid-template-columns: 1fr; gap: 7px; }
.tier-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 12px;
  text-align: left;
  background: #fff;
  transition: all .15s;
}
.tier-btn b { font-size: 13px; color: var(--text); }
.tier-btn span { font-size: 11px; color: var(--text-3); }
.tier-btn:hover { border-color: var(--primary); }
.tier-btn.active { border-color: var(--primary); background: #f5f2ff; }
.tier-btn.active b { color: var(--primary); }

.count-grid { display: flex; gap: 7px; flex-wrap: wrap; }
.count-btn {
  min-width: 44px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-2);
  background: #fff;
  transition: all .15s;
}
.count-btn:hover { border-color: var(--primary); color: var(--primary); }
.count-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* 结果网格 */
.results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.result-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(20,24,60,.05);
  animation: popIn .3s ease;
}
@keyframes popIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
.result-media { position: relative; aspect-ratio: 1; background: linear-gradient(135deg, #eee, #ddd); }
.result-media img, .result-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.result-media .gen-loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: #fff;
  background: linear-gradient(135deg, rgba(124,92,255,.9), rgba(255,107,157,.85));
}
.spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.result-info { padding: 8px 10px; font-size: 12px; color: var(--text-3); display: flex; justify-content: space-between; align-items: center; }
.result-info b { color: var(--text); font-size: 12px; }
.result-actions { position: absolute; top: 8px; right: 8px; display: none; gap: 5px; }
.result-card:hover .result-actions { display: flex; }
.result-actions button {
  width: 26px; height: 26px; border-radius: 7px;
  background: rgba(0,0,0,.5); color: #fff;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.result-actions button:hover { background: var(--primary); }
.result-actions button.del:hover { background: var(--danger); }
.play-badge {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.15);
}
.play-badge svg { width: 40px; height: 40px; color: rgba(255,255,255,.9); filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }

/* 空状态 */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  padding: 60px 20px;
  color: var(--text-3);
  text-align: center;
}
.empty-state svg { width: 46px; height: 46px; opacity: .5; margin-bottom: 6px; }
.empty-state p { font-size: 14px; color: var(--text-2); }
.empty-state span { font-size: 12px; }

/* ============ 模型选择（视频） ============ */
.model-tabs { display: flex; gap: 10px; margin-bottom: 16px; }
.model-tab {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 18px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--card);
  font-size: 14px; font-weight: 600;
  color: var(--text-2);
  transition: all .15s;
}
.model-tab .tag { font-size: 10px; font-weight: 400; padding: 1px 7px; border-radius: 999px; background: #eee; color: var(--text-3); }
.model-tab.active { border-color: var(--primary); color: var(--primary); background: #f5f2ff; }
.model-tab.active .tag { background: var(--primary); color: #fff; }
.model-panel { display: none; }
.model-panel.active { display: block; animation: fadeIn .2s ease; }

.ref-count { font-size: 12px; font-weight: 500; color: var(--text-3); }

/* 开关 */
.toggle { position: relative; display: inline-flex; }
.toggle input { position: absolute; opacity: 0; }
.toggle i {
  width: 38px; height: 20px;
  background: #d8dbe8;
  border-radius: 999px;
  display: block;
  position: relative;
  transition: background .2s;
}
.toggle i::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle input:checked + i { background: var(--primary); }
.toggle input:checked + i::after { transform: translateX(18px); }

/* 强度 */
.strength-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.strength-row > span { font-size: 12px; color: var(--text-3); }
.strength-scale { display: flex; gap: 5px; flex-wrap: wrap; }
.s-btn {
  width: 28px; height: 28px; border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 12px; color: var(--text-2); background: #fff;
  transition: all .15s;
}
.s-btn:hover { border-color: var(--primary); color: var(--primary); }
.s-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* 满血参考 */
.full-refs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 900px) { .full-refs { grid-template-columns: 1fr; } }

/* 批量 */
.batch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 6px; }
@media (max-width: 900px) { .batch-grid { grid-template-columns: 1fr; } }
.batch-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 14px; }

.batch-stats { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.stat-box {
  flex: 1; min-width: 100px;
  background: #f6f7fc; border: 1px solid var(--border);
  border-radius: 10px; padding: 12px;
  text-align: center; font-size: 12px; color: var(--text-3);
}
.stat-box b { display: block; font-size: 20px; color: var(--text); margin-top: 2px; }
.stat-box.ok b { color: var(--success); }
.stat-box.fail b { color: var(--danger); }

/* 平台标签 */
.platform-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.platform-tab {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-2);
  background: #fff;
  transition: all .15s;
}
.platform-tab:hover { border-color: var(--primary); color: var(--primary); }
.platform-tab.active { background: var(--grad); border-color: transparent; color: #fff; font-weight: 600; }

.watermark-input { margin-bottom: 6px; }
.wm-input-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.wm-input-actions .char-count { margin-right: auto; }

.wm-results-head { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; border-top: 1px solid var(--border); padding-top: 14px; }
.wm-results-head .sub-tabs { margin-bottom: 0; }

/* 解析结果条目 */
.wm-item {
  display: flex; align-items: center; gap: 12px;
  background: #f6f7fc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 10px;
  animation: popIn .25s ease;
}
.wm-item .wm-thumb { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: linear-gradient(135deg,#dfe2f0,#c9cddf); position: relative; }
.wm-item .wm-thumb img { width: 100%; height: 100%; object-fit: cover; }
.wm-item .wm-meta { flex: 1; min-width: 0; }
.wm-item .wm-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wm-item .wm-sub { font-size: 12px; color: var(--text-3); display: flex; gap: 8px; align-items: center; }
.wm-item .wm-platform { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: #eef0f8; color: var(--text-2); }

/* 图片工具 */
.tool-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
@media (max-width: 600px) { .tool-row { grid-template-columns: 1fr; } }

/* 表格 */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th { color: var(--text-3); font-weight: 500; font-size: 12px; background: #fafbfe; }
.table td { color: var(--text-2); }
.table tr:hover td { background: #fafbff; }
.table td:first-child, .table th:first-child { padding-left: 14px; border-radius: 8px 0 0 8px; }
.table-empty { text-align: center; padding: 30px; color: var(--text-3); font-size: 13px; }

.tag-status { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 9px; border-radius: 999px; }
.tag-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag-status.success { background: #e6fbf2; color: var(--success); }
.tag-status.processing { background: #eef1fd; color: var(--primary); }
.tag-status.fail { background: #fdeef0; color: var(--danger); }
.tag-status.pending { background: #fdf3e4; color: var(--warn); }

.act-link { color: var(--primary); font-size: 12px; cursor: pointer; margin-right: 8px; }
.act-link.danger { color: var(--danger); }

/* ============ 账户页 ============ */
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .account-grid { grid-template-columns: 1fr; } }

.account-summary {
  display: flex; align-items: stretch; gap: 20px;
  background: var(--grad);
  color: #fff;
  border: none;
}
.acc-points { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.acc-points span { font-size: 13px; opacity: .85; }
.acc-points b { font-size: 42px; line-height: 1.2; }
.acc-points em { font-style: normal; font-size: 12px; background: rgba(255,255,255,.18); padding: 2px 10px; border-radius: 999px; width: max-content; margin-top: 6px; }
.acc-divider { width: 1px; background: rgba(255,255,255,.3); }
.acc-signin { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.signin-label { font-size: 15px; font-weight: 700; }
.signin-reward { font-size: 12px; opacity: .9; }
.acc-signin .btn-primary { background: #fff; color: var(--primary); box-shadow: 0 4px 14px rgba(0,0,0,.18); margin-top: 10px; }
.signin-hint { font-size: 11px; opacity: .8; margin-top: 6px; }

.account-level .level-line { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.level-name { font-size: 22px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.level-to-next { font-size: 12px; color: var(--text-3); }
.progress { height: 9px; background: #eceef5; border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--grad); border-radius: 999px; transition: width .6s ease; }
.progress-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); margin-top: 6px; }
.level-perks { list-style: none; margin-top: 14px; font-size: 13px; color: var(--text-2); }
.level-perks li { padding: 5px 0; }

.info-list { display: flex; flex-direction: column; }
.info-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.info-row span { color: var(--text-3); }
.info-row b { color: var(--text); font-weight: 600; }
.ok-text { color: var(--success); }

/* ============ 积分中心 ============ */
.points-grid { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .points-grid { grid-template-columns: 1fr; } }

.points-summary {
  background: var(--grad); color: #fff; border: none;
  display: flex; flex-direction: column; gap: 16px;
}
.pts-balance span { font-size: 13px; opacity: .85; }
.pts-balance b { font-size: 44px; line-height: 1.25; display: block; }
.pts-actions { display: flex; gap: 10px; }
.pts-actions .btn-primary { background: #fff; color: var(--primary); box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.pts-actions .btn-ghost { background: transparent; border-color: rgba(255,255,255,.4); color: #fff; }
.pts-actions .btn-ghost:hover { background: rgba(255,255,255,.15); }

.invite-box { display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px; }
.invite-code { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #f6f7fc; padding: 14px; border-radius: 12px; }
.invite-code span { font-size: 13px; color: var(--text-3); }
.invite-code b { font-size: 22px; letter-spacing: 2px; color: var(--primary); margin-right: 8px; }
.invite-stats { display: flex; gap: 12px; }
.invite-stat { flex: 1; text-align: center; background: #f6f7fc; border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.invite-stat b { font-size: 24px; display: block; }
.invite-stat span { font-size: 12px; color: var(--text-3); }
.invite-rules { font-size: 13px; color: var(--text-2); }
.invite-rules ul { padding-left: 18px; margin-top: 6px; }
.invite-rules li { padding: 3px 0; }

/* ============ 客服 ============ */
.support-grid { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .support-grid { grid-template-columns: 1fr; } }
.support-qr { text-align: center; }
.qr-box { width: 220px; height: 220px; margin: 10px auto; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.qr-box svg, .qr-box img { width: 100%; height: 100%; display: block; }
.qr-hint { font-size: 12px; color: var(--text-3); }

.support-list { display: flex; flex-direction: column; gap: 6px; }
.support-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 10px; background: #f8f9fe; }
.s-icon { font-size: 20px; }
.support-item b { display: block; font-size: 13px; margin-bottom: 2px; }
.support-item span { font-size: 12px; color: var(--text-3); }

/* ============ 咨询合作 ============ */
.contact-card { max-width: 640px; }
.contact-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.char-count { font-size: 12px; color: var(--text-3); }
.contact-upload { margin: 14px 0; }
.contact-upload .field-label em { font-style: normal; color: var(--text-3); margin-left: 6px; }
.contact-upload-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.upload-plus {
  width: 86px; height: 86px;
  border: 2px dashed #d8dbe8;
  border-radius: 10px;
  font-size: 13px; color: var(--text-3);
  transition: all .15s;
}
.upload-plus:hover { border-color: var(--primary); color: var(--primary); }
.contact-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.contact-thumbs img { width: 86px; height: 86px; object-fit: cover; border-radius: 10px; }

/* ============ 日志 ============ */
.log-list { display: flex; flex-direction: column; gap: 8px; }
.log-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  background: #f8f9fe;
  border: 1px solid var(--border);
  font-size: 13px;
  animation: popIn .25s ease;
}
.log-item .log-icon { width: 30px; height: 30px; border-radius: 8px; background: #eef1fd; color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.log-item .log-msg { flex: 1; min-width: 0; }
.log-item .log-msg b { display: block; font-size: 13px; }
.log-item .log-msg span { font-size: 12px; color: var(--text-3); }
.log-item .log-time { font-size: 12px; color: var(--text-3); flex-shrink: 0; }
.log-item.success .log-icon { background: #e6fbf2; color: var(--success); }
.log-item.fail .log-icon { background: #fdeef0; color: var(--danger); }

/* ============ 弹窗 ============ */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(15, 18, 40, .5);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center; justify-content: center;
  z-index: 100;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff;
  border-radius: 18px;
  padding: 34px 40px;
  width: 320px;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  animation: popIn .25s ease;
}
.modal-close { position: absolute; top: 12px; right: 14px; color: var(--text-3); font-size: 16px; }
.modal-icon { font-size: 44px; margin-bottom: 10px; }
.modal h3 { font-size: 19px; margin-bottom: 4px; }
.modal p { color: var(--text-3); font-size: 13px; margin-bottom: 14px; }
.signin-gain { font-size: 15px; color: var(--text-2); margin-bottom: 18px; }
.signin-gain b { font-size: 22px; color: var(--success); }

/* ============ 登录 / 注册 ============ */
.auth-modal { width: 380px; text-align: center; padding: 30px 36px; }
.auth-head { margin-bottom: 16px; }
.auth-logo { width: 52px; height: 52px; border-radius: 14px; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; margin: 0 auto 12px; }
.auth-sub { font-size: 12.5px; color: var(--text-3); margin: 6px 0 0; }
.auth-tabs { display: flex; background: #f3f4f9; border-radius: 10px; padding: 4px; margin-bottom: 16px; }
.auth-tab { flex: 1; padding: 8px; border-radius: 8px; font-size: 14px; color: var(--text-2); }
.auth-tab.active { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 4px rgba(20,24,60,.08); }
.auth-err { color: var(--danger); font-size: 12.5px; min-height: 18px; text-align: center; margin-bottom: 2px; }
.auth-field { text-align: left; margin-bottom: 12px; }
.auth-field .mt8 { margin-top: 8px; }
.auth-field label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 5px; }
.auth-field input { width: 100%; border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; font-size: 14px; background: #fafbff; }
.auth-field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,92,255,.12); }
.auth-tip { font-size: 11.5px; color: var(--text-3); margin-top: 12px; }
.acc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* ============ Toast ============ */
.toast-wrap { position: fixed; top: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: #fff;
  border-left: 4px solid var(--primary);
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
  border-radius: 10px;
  padding: 12px 18px;
  min-width: 200px;
  max-width: 340px;
  font-size: 13px;
  animation: slideIn .25s ease;
}
.toast.success { border-left-color: var(--success); }
.toast.warn { border-left-color: var(--warn); }
.toast.error { border-left-color: var(--danger); }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c8ccdd; border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }
.sidebar ::-webkit-scrollbar-thumb { background: #33385a; }

/* 移动端侧栏收起 */
@media (max-width: 780px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; flex-direction: row; align-items: center; padding: 10px 14px; }
  .sidebar .logo { border-bottom: none; margin-bottom: 0; padding: 0; flex-shrink: 0; }
  .nav { flex-direction: row; overflow-x: auto; gap: 4px; }
  .nav-item { padding: 7px 10px; font-size: 13px; white-space: nowrap; }
  .nav-item svg { display: none; }
  .sidebar-user { display: none; }
  .main { height: calc(100vh - 56px); }
  .topbar { padding: 0 14px; }
  .content { padding: 14px 14px 30px; }
  .topbar-right .points-badge span, .user-chip span { display: none; }
}
