* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    font-size: 14px;
}

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

/* 侧边栏 */
.sidebar {
    width: 220px;
    background: linear-gradient(180deg, #1890ff 0%, #36cfc9 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
}

.logo {
    padding: 30rpx 20px;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.nav {
    flex: 1;
    padding: 20rpx 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 15rpx 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.2s;
}

.nav-item:hover, .nav-item.active {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.nav-item .icon {
    margin-right: 10px;
}

/* 主内容区 */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.header {
    background: #fff;
    padding: 20rpx 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.page-title {
    font-size: 20px;
    font-weight: bold;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info button {
    padding: 6rpx 15px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
}

/* 内容区域 */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    padding: 25rpx;
    border-radius: 12rpx;
    text-align: center;
    box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.06);
}

.stat-value {
    font-size: 36rpx;
    font-weight: bold;
    color: #1890ff;
}

.stat-value.income { color: #52c41a; }
.stat-value.expense { color: #ff4d4f; }
.stat-value.profit { color: #1890ff; }

.stat-label {
    font-size: 24rpx;
    color: #666;
    margin-top: 10rpx;
}

/* 区块 */
.section {
    background: #fff;
    padding: 25rpx;
    border-radius: 12rpx;
    margin-bottom: 20px;
}

.section h3 {
    font-size: 30rpx;
    margin-bottom: 20rpx;
}

/* 工具栏 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.toolbar input, .toolbar select {
    padding: 10rpx 15rpx;
    border: 1px solid #ddd;
    border-radius: 6rpx;
    font-size: 28rpx;
}

.toolbar input {
    flex: 1;
    max-width: 300px;
}

/* 按钮 */
.btn-primary {
    padding: 12rpx 25rpx;
    background: #1890ff;
    color: #fff;
    border: none;
    border-radius: 6rpx;
    cursor: pointer;
    font-size: 28rpx;
}

.btn-primary:hover {
    background: #40a9ff;
}

.btn-sm {
    padding: 6rpx 12rpx;
    font-size: 24rpx;
    border-radius: 4rpx;
    cursor: pointer;
    margin-right: 5px;
}

.btn-success { background: #52c41a; color: #fff; }

.btn-secondary {
    padding: 12rpx 25rpx;
    background: #fff;
    color: #1890ff;
    border: 1px solid #1890ff;
    border-radius: 6rpx;
    cursor: pointer;
    font-size: 28rpx;
}

.btn-secondary:hover {
    background: #e6f7ff;
}

/* 会员等级标签 */
.tag-普通 { background: #f0f0f0; color: #666; }
.tag-银卡 { background: #e6f7ff; color: #1890ff; }
.tag-金卡 { background: #fffbe6; color: #faad14; }
.tag-钻石 { background: #fff0f6; color: #eb2f96; }

/* 会员详情 */
.member-detail {
    padding: 10px 0;
}

.detail-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-row .label {
    width: 100px;
    color: #666;
}

.detail-row .value {
    flex: 1;
    font-weight: 500;
}

.detail-actions {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.detail-actions button {
    flex: 1;
    min-width: 120px;
}

/* 等级权益表 */
.level-table {
    overflow-x: auto;
}

.level-table table {
    width: 100%;
    border-collapse: collapse;
}

.level-table th, .level-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.level-table th {
    background: #fafafa;
    font-weight: 600;
}
.btn-danger { background: #ff4d4f; color: #fff; }
.btn-default { background: #f5f5f5; color: #666; }

/* 表格 */
.data-table {
    width: 100%;
    background: #fff;
    border-radius: 12rpx;
    overflow: hidden;
    box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.06);
}

.data-table th, .data-table td {
    padding: 20rpx;
    text-align: left;
    border-bottom: 1rpx solid #f5f5f5;
}

.data-table th {
    background: #fafafa;
    font-weight: bold;
    color: #666;
    font-size: 26rpx;
}

.data-table tr:hover {
    background: #fafafa;
}

/* 课程列表 */
.schedule-list .schedule-item {
    display: flex;
    align-items: center;
    padding: 20rpx;
    border-bottom: 1rpx solid #f5f5f5;
}

.schedule-item:last-child {
    border-bottom: none;
}

.schedule-time {
    color: #1890ff;
    font-weight: bold;
    width: 100px;
}

.schedule-info {
    flex: 1;
}

.schedule-course {
    font-size: 28rpx;
    color: #333;
}

.schedule-member {
    font-size: 24rpx;
    color: #999;
}

.schedule-status {
    padding: 4rpx 12rpx;
    border-radius: 20rpx;
    font-size: 24rpx;
}

.schedule-status.Booked { background: #e6f7ff; color: #1890ff; }
.schedule-status.Completed { background: #f6ffed; color: #52c41a; }
.schedule-status.Cancelled { background: #fff1f0; color: #ff4d4f; }

/* 弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #fff;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    padding: 30rpx;
    border-radius: 16rpx;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-content h3 {
    font-size: 32rpx;
    margin-bottom: 25rpx;
    text-align: center;
}

.form-group {
    margin-bottom: 20rpx;
}

.form-group label {
    display: block;
    font-size: 28rpx;
    color: #666;
    margin-bottom: 10rpx;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 15rpx;
    border: 1rpx solid #ddd;
    border-radius: 8rpx;
    font-size: 28rpx;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 30rpx;
}

.modal-actions button {
    flex: 1;
    padding: 20rpx;
    border-radius: 8rpx;
    font-size: 30rpx;
    cursor: pointer;
}

.modal-actions button:first-child {
    background: #f5f5f5;
    color: #666;
    border: none;
}

/* 响应式 */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sidebar {
        width: 60px;
    }
    
    .logo {
        font-size: 12px;
        padding: 15rpx 5rpx;
    }
    
    .nav-item span:not(.icon) {
        display: none;
    }
    
    .nav-item {
        justify-content: center;
    }
}

.tag { padding: 4rpx 12rpx; border-radius: 6rpx; font-size: 24rpx; }
.tag-入门初级 { background: #e6f7ff; color: #1890ff; }
.tag-提高中级 { background: #fff7e6; color: #fa8c16; }
.tag-精英高级 { background: #fff1f0; color: #ff4d4f; }
.tag-Booked { background: #e6f7ff; color: #1890ff; }
.tag-Completed { background: #f6ffed; color: #52c41a; }
.tag-Cancelled { background: #fff1f0; color: #ff4d4f; }
.tag-Income { background: #f6ffed; color: #52c41a; }
.tag-Expense { background: #fff1f0; color: #ff4d4f; }
.tag-active { background: #f6ffed; color: #52c41a; }
.tag-success { background: #f6ffed; color: #52c41a; }
.income-text { color: #52c41a; font-weight: bold; }
.expense-text { color: #ff4d4f; font-weight: bold; }
.coach-avatar { width: 80rpx; height: 80rpx; background: #1890ff; border-radius: 50%; color: #fff; font-size: 32rpx; display: flex; align-items: center; justify-content: center; }
.member-detail { background: #fafafa; padding: 20rpx; border-radius: 8rpx; margin-bottom: 20rpx; }
.detail-row { display: flex; padding: 10rpx 0; }
.detail-row .label { color: #666; width: 160rpx; }
.detail-row .value { color: #333; font-weight: bold; }
.records-list { max-height: 300rpx; overflow-y: auto; }
.record-item { display: flex; justify-content: space-between; padding: 15rpx; border-bottom: 1rpx solid #f5f5f5; font-size: 24rpx; }
.form-group textarea { width: 100%; padding: 15rpx; border: 1rpx solid #ddd; border-radius: 8rpx; font-size: 28rpx; min-height: 120rpx; }

/* 财务报表 */
.finance-summary { margin: 20rpx 0; padding: 20rpx; background: #fafafa; border-radius: 8rpx; }
.finance-summary h4 { margin-bottom: 15rpx; color: #333; }
.chart-bars { margin-top: 10rpx; }
.chart-item { display: flex; align-items: center; margin: 10rpx 0; }
.chart-label { width: 150rpx; font-size: 24rpx; color: #666; }
.chart-bar { height: 24rpx; background: #1890ff; border-radius: 4rpx; min-width: 20rpx; }
.chart-value { margin-left: 15rpx; font-size: 24rpx; color: #333; }

.report-popup { padding: 20rpx; }
.report-popup h3 { margin-bottom: 20rpx; text-align: center; }
.report-summary { display: flex; justify-content: space-around; padding: 20rpx; background: #fafafa; border-radius: 8rpx; margin-bottom: 20rpx; }
.report-item { text-align: center; }
.report-item span { display: block; font-size: 24rpx; color: #666; }
.report-item span:last-child { font-size: 32rpx; font-weight: bold; margin-top: 10rpx; }
.report-detail { margin: 20rpx 0; }
.report-detail h4 { margin-bottom: 10rpx; }
.profit-text { color: #1890ff; font-weight: bold; }

.cashflow { margin-top: 20rpx; padding: 20rpx; background: #fff7e6; border-radius: 8rpx; }
.cashflow h4 { margin-bottom: 15rpx; }
.cashflow-item { display: flex; justify-content: space-between; padding: 10rpx 0; border-bottom: 1rpx solid #f5f5f5; }
.cashflow-item:last-child { border: none; }

/* 菲特云对标功能样式 */
.register-flow .step { margin: 20rpx 0; padding: 10rpx; background: #f5f5f5; border-radius: 8rpx; font-weight: bold; }
.member-profile .profile-section { margin: 20rpx 0; padding: 20rpx; background: #fafafa; border-radius: 8rpx; }
.member-profile .profile-section h5 { margin-bottom: 15rpx; color: #333; }
.member-profile .profile-row { display: flex; justify-content: space-between; padding: 8rpx 0; border-bottom: 1rpx solid #f0f0f0; }
.marketing-panel .marketing-item { margin: 15rpx 0; }
.alerts-list .alert-item { padding: 15rpx; margin: 10rpx 0; border-radius: 8rpx; }
.alerts-list .alert-item.balance { background: #fff7e6; }
.alerts-list .alert-item.expire { background: #e6f7ff; }
.alerts-list .alert-item.birthday { background: #fff0f6; }

.coach-salary table { width: 100%; }
.reconcile .reconcile-item { display: flex; justify-content: space-between; padding: 15rpx; border-bottom: 1rpx solid #f0f0f0; }
.reconcile .success { padding: 20rpx; background: #f6ffed; color: #52c41a; text-align: center; border-radius: 8rpx; }
.reconcile .issues { padding: 20rpx; background: #fff1f0; color: #ff4d4f; border-radius: 8rpx; }

.wechat-portal .portal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20rpx; }
.wechat-portal .portal-item { text-align: center; padding: 30rpx; background: #f5f5f5; border-radius: 12rpx; }
.wechat-portal .portal-item .icon { font-size: 48rpx; display: block; margin-bottom: 10rpx; }
.wechat-portal .note { text-align: center; color: #999; margin-top: 20rpx; font-size: 24rpx; }

.marketing-plugins .plugin-item { display: flex; justify-content: space-between; align-items: center; padding: 20rpx; border-bottom: 1rpx solid #f0f0f0; }
.marketing-plugins .plugin-item .name { font-weight: 500; }
.marketing-plugins .plugin-item .status { color: #52c41a; font-size: 24rpx; }

.data-analysis .analysis-section { margin: 20rpx 0; padding: 20rpx; background: #fafafa; border-radius: 8rpx; }
.data-analysis .analysis-section h5 { margin-bottom: 15rpx; color: #333; }
.data-analysis .stat-row { display: flex; justify-content: space-between; padding: 10rpx 0; }

.dispatch-form { display: flex; gap: 10rpx; flex-wrap: wrap; margin: 20rpx 0; }
.dispatch-form select, .dispatch-form input { padding: 10rpx; border: 1rpx solid #ddd; border-radius: 6rpx; }
