/* 企微管理后台 - 公共样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f0f2f5; color: #333; }
a { color: #1890ff; text-decoration: none; }
a:hover { color: #40a9ff; }

/* 布局 */
.app-layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 220px; background: #001529; color: #fff;
    flex-shrink: 0; position: fixed; top: 0; left: 0; bottom: 0;
}
.sidebar-logo {
    height: 64px; display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: bold; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-menu { padding: 12px 0; }
.menu-item {
    display: block; padding: 12px 24px; color: rgba(255,255,255,0.65);
    transition: all 0.3s; font-size: 14px;
}
.menu-item:hover { color: #fff; background: rgba(255,255,255,0.08); }
.menu-item.active { color: #fff; background: #1890ff; }
.menu-icon { margin-right: 8px; width: 16px; display: inline-block; }

.main-content { margin-left: 220px; flex: 1; }
.header {
    height: 56px; background: #fff; border-bottom: 1px solid #f0f0f0;
    display: flex; align-items: center; padding: 0 24px;
}
.header-title { font-size: 18px; font-weight: 500; }
.body-content { padding: 24px; }

/* 统计卡片 */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: #fff; border-radius: 8px; padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.stat-card-title { color: #8c8c8c; font-size: 13px; margin-bottom: 8px; }
.stat-card-value { font-size: 28px; font-weight: 600; color: #262626; }
.stat-card-trend { font-size: 12px; margin-top: 8px; color: #52c41a; }
.stat-card-trend.down { color: #ff4d4f; }

/* 表格 */
.table-wrap { background: #fff; border-radius: 8px; overflow: hidden; }
.table-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 24px; border-bottom: 1px solid #f0f0f0;
}
.table-header h3 { font-size: 16px; font-weight: 500; }
.table-actions { display: flex; gap: 8px; align-items: center; }
table { width: 100%; border-collapse: collapse; }
th { background: #fafafa; font-weight: 500; text-align: left; padding: 12px 16px; font-size: 13px; color: #595959; }
td { padding: 12px 16px; border-top: 1px solid #f0f0f0; font-size: 14px; }
tr:hover { background: #f5f5f5; }

/* 按钮 */
.btn {
    display: inline-block; padding: 6px 16px; border-radius: 4px;
    font-size: 14px; cursor: pointer; border: 1px solid transparent;
    transition: all 0.3s; text-align: center;
}
.btn-primary { background: #1890ff; color: #fff; border-color: #1890ff; }
.btn-primary:hover { background: #40a9ff; }
.btn-success { background: #52c41a; color: #fff; }
.btn-warning { background: #faad14; color: #fff; }
.btn-danger { background: #ff4d4f; color: #fff; }
.btn-default { background: #fff; color: #333; border-color: #d9d9d9; }
.btn-sm { padding: 3px 10px; font-size: 12px; }
.btn-link { background: none; color: #1890ff; padding: 3px 8px; }
.btn-link:hover { color: #40a9ff; }

/* 输入框 */
.form-input {
    padding: 6px 12px; border: 1px solid #d9d9d9; border-radius: 4px;
    font-size: 14px; outline: none; transition: border 0.3s;
}
.form-input:focus { border-color: #40a9ff; }

/* 标签 */
.tag {
    display: inline-block; padding: 2px 8px; border-radius: 4px;
    font-size: 12px; margin: 1px 2px;
}
.tag-blue { background: #e6f7ff; color: #1890ff; border: 1px solid #91d5ff; }
.tag-green { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.tag-red { background: #fff2f0; color: #ff4d4f; border: 1px solid #ffa39e; }
.tag-gray { background: #fafafa; color: #8c8c8c; border: 1px solid #d9d9d9; }

/* 分页 */
.pagination { display: flex; justify-content: flex-end; padding: 16px 24px; gap: 4px; }
.pagination a, .pagination span {
    padding: 5px 12px; border: 1px solid #d9d9d9; border-radius: 4px;
    font-size: 13px; color: #333;
}
.pagination .active { background: #1890ff; color: #fff; border-color: #1890ff; }

/* 详情 */
.detail-card { background: #fff; border-radius: 8px; padding: 24px; margin-bottom: 16px; }
.detail-card h3 { font-size: 16px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #f0f0f0; }
.detail-row { display: flex; padding: 8px 0; font-size: 14px; }
.detail-label { width: 120px; color: #8c8c8c; flex-shrink: 0; }
.detail-value { flex: 1; color: #262626; }

/* 搜索栏 */
.search-bar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.search-bar .form-input { width: 240px; }

/* 状态 */
.status-tag { font-size: 12px; }
.status-active { color: #52c41a; }
.status-disabled { color: #ff4d4f; }

/* 空状态 */
.empty { text-align: center; padding: 48px 0; color: #8c8c8c; font-size: 14px; }

/* 进度条 */
.progress-bar { height: 8px; background: #f0f0f0; border-radius: 4px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: #1890ff; border-radius: 4px; transition: width 0.3s; }

/* 加载 */
.loading { text-align: center; padding: 32px; color: #8c8c8c; }

/* 登录页 */
.login-wrap {
    display: flex; justify-content: center; align-items: center;
    min-height: 100vh; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.login-card {
    background: #fff; border-radius: 12px; padding: 40px;
    width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.login-card h2 { text-align: center; margin-bottom: 24px; font-size: 22px; }
.login-card .form-input { width: 100%; margin-bottom: 16px; height: 42px; }
.login-card .btn { width: 100%; height: 42px; font-size: 16px; }

/* 消息提示 */
.msg {
    padding: 10px 16px; border-radius: 4px; margin-bottom: 16px; font-size: 14px;
}
.msg-success { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.msg-error { background: #fff2f0; color: #ff4d4f; border: 1px solid #ffa39e; }
.msg-info { background: #e6f7ff; color: #1890ff; border: 1px solid #91d5ff; }

/* 趋势图表 */
.trend-chart { background: #fff; border-radius: 8px; padding: 24px; }
.trend-chart h3 { font-size: 16px; margin-bottom: 16px; }
.bar-chart { display: flex; align-items: flex-end; gap: 12px; height: 160px; padding-top: 16px; }
.bar-item { flex: 1; display: flex; flex-direction: column; align-items: center; }
.bar { width: 100%; background: #1890ff; border-radius: 4px 4px 0 0; min-height: 2px; transition: height 0.3s; }
.bar-label { font-size: 12px; color: #8c8c8c; margin-top: 8px; }
.bar-value { font-size: 12px; color: #333; margin-bottom: 4px; }
