/* ===== 私域合作平台 - 基础后台样式 (M1 骨架) ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, 'Segoe UI', 'Microsoft YaHei', sans-serif; background: #f5f7fa; color: #1f2937; font-size: 14px; }

/* 布局 */
.app-layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #0c1420; color: #c3cede; padding: 20px 0; flex-shrink: 0; }
.sidebar-brand { padding: 0 20px 20px; font-size: 16px; font-weight: 600; color: #fff; border-bottom: 1px solid #1a2740; margin-bottom: 12px; }
.sidebar-nav { display: flex; flex-direction: column; }
.nav-item { display: block; padding: 10px 20px; color: #b7c3d6; text-decoration: none; transition: all .2s; font-size: 13.5px; }
.nav-item:hover { background: #16233a; color: #fff; }
.nav-item.active { background: #1a2b4a; color: #fff; border-left: 3px solid #4d82d9; }

.main { flex: 1; padding: 24px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.topbar h1 { font-size: 20px; }
.env-badge { background: #eef2f7; color: #6b7280; padding: 4px 12px; border-radius: 20px; font-size: 12px; }

/* 统计卡片 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04); }
.stat-label { color: #6b7280; font-size: 12px; margin-bottom: 8px; }
.stat-value { font-size: 26px; font-weight: 600; font-family: 'DIN Alternate', 'Bahnschrift', sans-serif; }
.stat-value small { font-size: 13px; font-weight: 400; color: #6b7280; }
.stat-sub { color: #9ca3af; font-size: 12px; margin-top: 6px; }
.stat-card-primary { background: linear-gradient(135deg, #3560a8, #5b82bd); color: #fff; }
.stat-card-primary .stat-label, .stat-card-primary .stat-sub { color: rgba(255,255,255,.75); }

/* 面板与表格 */
.content-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.panel { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.panel-title { font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; color: #6b7280; font-size: 12px; font-weight: 500; padding: 8px; border-bottom: 1px solid #eef2f7; }
.data-table td { padding: 10px 8px; border-bottom: 1px solid #f5f7fa; font-size: 13px; }
.data-table tr:last-child td { border-bottom: none; }
.empty { text-align: center; color: #9ca3af; padding: 30px !important; }

/* 标签 */
.tag { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eef2f7; color: #6b7280; }
.tag-paid, .tag-completed, .tag-1 { background: #e8f5ee; color: #1f7a4d; }
.tag-process { background: #fff7e6; color: #b7791f; }
.tag-cancelled { background: #fde8e8; color: #c0392b; }

/* 响应式 */
@media (max-width: 768px) {
    .sidebar { width: 60px; }
    .sidebar-brand { font-size: 0; padding: 0 0 12px; text-align: center; }
    .sidebar-brand::after { content: '📊'; font-size: 18px; }
    .nav-item span { display: none; }
    .content-grid { grid-template-columns: 1fr; }
}
