* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; font-family: "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif; }
body { background: #f5f7fa; color: #303133; }

.layout { display: flex; height: 100%; }
.sidebar { width: 220px; background: #001529; color: #c8c9cc; flex-shrink: 0; display: flex; flex-direction: column; }
.logo { height: 60px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; font-weight: 600; letter-spacing: 1px; border-bottom: 1px solid rgba(255,255,255,.08); }
.menu { flex: 1; overflow-y: auto; padding: 8px; }
.menu-item { display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 6px; cursor: pointer; margin-bottom: 2px; font-size: 14px; transition: all .15s; }
.menu-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.menu-item.active { background: #409eff; color: #fff; }
.menu-group-title { padding: 14px 16px 6px; font-size: 12px; color: #8a8e99; }
.user-box { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; justify-content: space-between; }
.user-box .name { font-size: 13px; color: #fff; }

.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.header { height: 60px; background: #fff; display: flex; align-items: center; padding: 0 24px; justify-content: space-between; box-shadow: 0 1px 4px rgba(0,21,41,.06); }
.header h3 { margin: 0; font-size: 16px; }
.content { flex: 1; overflow-y: auto; padding: 16px 24px; }

.card { background: #fff; border-radius: 8px; padding: 16px 20px; box-shadow: 0 1px 3px rgba(0,0,0,.04); margin-bottom: 16px; }
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.pager { display: flex; justify-content: flex-end; margin-top: 12px; }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat-card { background: #fff; border-radius: 8px; padding: 18px 20px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.stat-card .label { font-size: 13px; color: #909399; }
.stat-card .value { font-size: 26px; font-weight: 700; margin-top: 6px; color: #303133; }
.stat-card .sub { font-size: 12px; color: #909399; margin-top: 4px; }
.trend-green { color: #67c23a; } .trend-red { color: #f56c6c; }

.login-wrap { height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1f2d3d 0%, #001529 100%); }
.login-card { width: 380px; background: #fff; border-radius: 12px; padding: 36px; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.login-card h2 { text-align: center; margin: 0 0 8px; color: #303133; }
.login-card .tip { text-align: center; color: #909399; font-size: 13px; margin-bottom: 24px; }

.chart-box { width: 100%; height: 360px; }

/* ===== 渠道配置表单 ===== */
.muted-tip { color: #909399; font-size: 12px; }
.form-section-title { font-size: 13px; font-weight: 600; color: #303133; margin: 6px 0 10px; padding-left: 8px; border-left: 3px solid #409eff; line-height: 1.2; }
.form-section-desc { font-size: 12px; color: #909399; margin: -4px 0 10px 11px; line-height: 1.6; }
.field-tip { width: 100%; font-size: 12px; color: #909399; line-height: 1.6; margin-top: 2px; }
.event-params { font-family: Consolas, Menlo, monospace; font-size: 12px; color: #606266; word-break: break-all; }

/* ===== 隐私协议富文本编辑器 ===== */
.rich-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 8px 10px; background: #fafafa; border: 1px solid #dcdfe6; border-bottom: none; border-radius: 4px 4px 0 0; }
.rt-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 28px; padding: 0 9px; font-size: 13px; color: #303133; background: #fff; border: 1px solid #dcdfe6; border-radius: 4px; cursor: pointer; user-select: none; }
.rt-btn:hover { color: #409eff; border-color: #c6e2ff; background: #ecf5ff; }
.rt-sep { width: 1px; height: 20px; background: #dcdfe6; margin: 0 5px; }
.rich-editor { min-height: 420px; max-height: 62vh; overflow-y: auto; padding: 18px 22px; border: 1px solid #dcdfe6; border-radius: 0 0 4px 4px; background: #fff; font-size: 14px; line-height: 1.9; color: #303133; outline: none; }
.rich-editor:focus { border-color: #409eff; }
.rich-editor:empty:before { content: attr(data-placeholder); color: #c0c4cc; }
.rich-editor h2, .privacy-preview h2 { font-size: 16px; margin: 18px 0 8px; }
.rich-editor h3, .privacy-preview h3 { font-size: 15px; margin: 14px 0 6px; }
.rich-editor p, .privacy-preview p { margin: 8px 0; }
.rich-editor ul, .rich-editor ol, .privacy-preview ul, .privacy-preview ol { padding-left: 24px; margin: 8px 0; }
.rich-editor li, .privacy-preview li { margin: 4px 0; }
.rich-editor a { color: #2563eb; }
.privacy-preview { max-width: 820px; margin: 0 auto; padding: 26px 30px; border: 1px solid #ebeef5; border-radius: 6px; background: #fff; font-size: 14px; line-height: 1.9; color: #303133; }
.privacy-preview h1 { font-size: 22px; margin: 0 0 12px; }
