/* 管理后台全局样式 */
:root { color-scheme: dark; }

* { box-sizing: border-box; }

html { background: #0a0f1e; }

body {
  margin: 0;
  background: #0a0f1e;
  color: #e2e8f0;
  font-family: "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

#app { min-height: 100vh; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 3px; }

/* 品牌渐变字 */
.brand-text {
  background: linear-gradient(90deg, #22d3ee, #60a5fa, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 布局 */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 220px;
  background: #0d1428;
  border-right: 1px solid #1e293b;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px;
  border-bottom: 1px solid #1e293b;
}

.logo img { width: 34px; height: 34px; border-radius: 8px; }

.logo span {
  font-weight: 800;
  font-size: 15px;
}

.menu { padding: 10px 8px; }

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 2px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #94a3b8;
  transition: all .15s;
}

.menu-item:hover { background: rgba(34,211,238,.06); color: #e2e8f0; }

.menu-item.active {
  background: rgba(34,211,238,.12);
  color: #22d3ee;
  font-weight: 700;
}

.menu-item .icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: .85;
}

.menu-item.active .icon { opacity: 1; }

.menu-item .badge {
  margin-left: auto;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 7px;
  min-width: 18px;
  text-align: center;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 60px;
  border-bottom: 1px solid #1e293b;
  background: rgba(13,20,40,.8);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar .title { font-size: 15px; font-weight: 800; }

.content { padding: 24px; }

/* 统计卡片 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  background: linear-gradient(160deg, #111a33, #0d1428);
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 16px;
}

.stat-card .label { font-size: 12px; color: #64748b; }
.stat-card .value { font-size: 22px; font-weight: 800; margin-top: 6px; }

/* 面板 */
.panel {
  background: #0d1428;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 18px;
}

.panel-title {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* 图表 */
.chart { display: flex; align-items: flex-end; gap: 4px; height: 140px; }

.chart .bar {
  flex: 1;
  background: linear-gradient(180deg, #22d3ee, #3b82f6);
  border-radius: 3px 3px 0 0;
  min-height: 3px;
  opacity: .85;
}

/* 文字色 */
.text-green { color: #4ade80; }
.text-red { color: #f87171; }
.text-cyan { color: #22d3ee; }
.text-yellow { color: #facc15; }
.text-purple { color: #c084fc; }
.muted { color: #64748b; font-size: 12px; }
.mono { font-family: ui-monospace, monospace; font-size: 12px; }

/* 登录页 */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at top, #111a33, #0a0f1e);
}

.login-box {
  width: 380px;
  background: #0d1428;
  border: 1px solid #1e293b;
  border-radius: 16px;
  padding: 36px;
}

/* Element Plus 深色适配 */
.el-table {
  --el-table-bg-color: transparent;
  --el-table-tr-bg-color: transparent;
  --el-table-header-bg-color: #111a33;
  --el-table-border-color: #1e293b;
  --el-table-text-color: #cbd5e1;
  --el-table-header-text-color: #94a3b8;
  --el-table-row-hover-bg-color: rgba(34,211,238,.05);
}

.el-dialog { background: #0d1428; border: 1px solid #1e293b; }
.el-dialog__title { color: #e2e8f0; }
.el-form-item__label { color: #94a3b8 !important; }

.el-input, .el-select {
  --el-input-bg-color: #0a0f1e;
  --el-input-border-color: #334155;
  --el-input-text-color: #e2e8f0;
  --el-input-hover-border-color: #22d3ee;
}

.el-select-dropdown, .el-popper.is-light {
  background: #111a33 !important;
  border-color: #334155 !important;
}

.el-select-dropdown__item { color: #cbd5e1; }
.el-select-dropdown__item.is-hovering,
.el-select-dropdown__item:hover { background: rgba(34,211,238,.1); }

.el-pagination {
  --el-pagination-bg-color: transparent;
  --el-pagination-button-disabled-bg-color: transparent;
  --el-pagination-hover-color: #22d3ee;
}

.el-pagination button { background: transparent !important; color: #94a3b8; }
.el-pagination .el-pager li { background: transparent; color: #94a3b8; }
.el-pagination .el-pager li.is-active { color: #22d3ee; }

.el-message-box { background: #0d1428; border: 1px solid #334155; }
.el-message-box__title { color: #e2e8f0; }
.el-message-box__content { color: #94a3b8; }

.el-card { background: #0d1428; border-color: #1e293b; }
.el-tag { border: none; }

/* 社区聊天可视化 */
.community-layout { display: flex; flex-direction: column; min-height: calc(100vh - 210px); }
.community-workspace { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.community-feed { flex: 1; display: flex; flex-direction: column; min-height: 480px; }

.community-feed-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-bottom: 1px solid #1e293b;
  background: linear-gradient(180deg, rgba(17,26,51,.6), transparent);
}

.community-feed-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(34,211,238,.04), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(59,130,246,.05), transparent 45%),
    #0a0f1e;
  min-height: 320px;
  max-height: calc(100vh - 420px);
}

.community-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  color: #94a3b8;
  text-align: center;
}

.community-empty-icon { font-size: 42px; margin-bottom: 10px; opacity: .7; }

.community-msg-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: community-fade-in .25s ease;
}

.community-msg-row.is-official { flex-direction: row; }
.community-msg-row.is-user { flex-direction: row-reverse; }

.community-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
  border: 2px solid transparent;
}

.community-avatar.avatar-official {
  background: linear-gradient(135deg, #22d3ee, #3b82f6);
  color: #0a0f1e;
  box-shadow: 0 0 12px rgba(34,211,238,.35);
}

.community-avatar.avatar-user {
  background: #1e293b;
  color: #94a3b8;
  border-color: #334155;
}

.community-bubble-wrap {
  max-width: min(72%, 640px);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.community-msg-row.is-user .community-bubble-wrap { align-items: flex-end; }
.community-msg-row.is-official .community-bubble-wrap { align-items: flex-start; }

.community-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11px;
}

.community-name { font-weight: 700; color: #e2e8f0; font-size: 12px; }
.community-time { margin-left: auto; }

.community-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.65;
  word-break: break-word;
  position: relative;
}

.community-msg-row.is-official .community-bubble {
  background: linear-gradient(135deg, rgba(34,211,238,.12), rgba(59,130,246,.1));
  border: 1px solid rgba(34,211,238,.25);
  color: #e2e8f0;
  border-top-left-radius: 4px;
}

.community-msg-row.is-user .community-bubble {
  background: #111a33;
  border: 1px solid #1e293b;
  color: #cbd5e1;
  border-top-right-radius: 4px;
}

.community-del-btn { opacity: 0; transition: opacity .15s; padding: 0 4px !important; height: auto !important; }
.community-msg-row:hover .community-del-btn { opacity: 1; }

.community-compose {
  border-top: 1px solid #1e293b;
  padding: 14px 16px;
  background: #0d1428;
}

.community-compose-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
}

@keyframes community-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 充值凭证查看 */
.proof-viewer { min-height: 200px; }
.proof-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.proof-image {
  width: 100%;
  max-height: 520px;
  border-radius: 10px;
  border: 1px solid #1e293b;
  background: #0a0f1e;
}
.proof-image .el-image__inner { max-height: 520px; }
.proof-error {
  text-align: center;
  padding: 36px 20px;
  border: 1px dashed #334155;
  border-radius: 12px;
  background: rgba(248,113,113,.04);
}
.proof-error-icon { font-size: 36px; margin-bottom: 10px; }
.proof-error-title { font-weight: 700; color: #f87171; margin-bottom: 8px; }
.proof-error-inline { padding: 40px; text-align: center; color: #64748b; }

/* 系统设置页 */
.settings-page { max-width: 1180px; margin: 0 auto; }

.settings-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid #1e293b;
}

.settings-title {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 6px;
  color: #f1f5f9;
}

.settings-desc {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

.settings-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

.settings-main { display: flex; flex-direction: column; gap: 20px; }

.settings-section {
  background: #0d1428;
  border: 1px solid #1e293b;
  border-radius: 14px;
  padding: 22px 24px;
}

.settings-section-compact { padding: 20px; }

.settings-section-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 22px;
}

.settings-section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(34, 211, 238, .1);
  color: #22d3ee;
}

.settings-section-icon svg {
  width: 18px;
  height: 18px;
}

.settings-section-head.compact { margin-bottom: 16px; }

.settings-section-title {
  font-size: 15px;
  font-weight: 800;
  color: #e2e8f0;
}

.settings-section-desc {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
  line-height: 1.5;
}

.settings-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}

.settings-fields.cols-3 { grid-template-columns: repeat(3, 1fr); }

.settings-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 8px;
}

.settings-field.full { grid-column: 1 / -1; }

.settings-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.settings-tier {
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #1e293b;
  background: rgba(17, 26, 51, .5);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-tier .tier-badge {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .03em;
  margin-bottom: 4px;
}

.tier-silver .tier-badge { color: #94a3b8; }
.tier-gold .tier-badge { color: #facc15; }
.tier-platinum .tier-badge { color: #c084fc; }

.settings-addresses { display: flex; flex-direction: column; gap: 12px; }

.settings-addr-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
}

.addr-tag {
  font-size: 11px;
  font-weight: 800;
  padding: 6px 0;
  text-align: center;
  border-radius: 6px;
  letter-spacing: .02em;
}

.tag-trc { background: rgba(34,211,238,.12); color: #22d3ee; }
.tag-erc { background: rgba(96,165,250,.12); color: #60a5fa; }
.tag-btc { background: rgba(251,191,36,.12); color: #fbbf24; }
.tag-bsc { background: rgba(192,132,252,.12); color: #c084fc; }

.settings-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 76px;
}

.settings-tips { background: rgba(17, 26, 51, .4); }

.settings-tip-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.9;
}

.settings-tip-list li { margin-bottom: 2px; }

@media (max-width: 768px) {
  .settings-body { grid-template-columns: 1fr; }
  .settings-aside { position: static; }
  .settings-fields.cols-3,
  .settings-tiers { grid-template-columns: 1fr; }
  .settings-hero { flex-direction: column; }
  .community-feed-scroll { max-height: none; }
  .community-bubble-wrap { max-width: 88%; }
  .community-feed-toolbar { flex-direction: column; align-items: stretch; }
  .sidebar { display: none; }
  .content { padding: 16px; }
}
