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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
}

#app {
    min-height: 100vh;
    display: flex;
}

/* 侧边栏 */
.sidebar {
    width: 240px;
    background: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo h1 {
    font-size: 20px;
    font-weight: 600;
    color: white;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 0;
}

.nav-group {
    margin-bottom: 32px;
}

.nav-group-title {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 24px 12px;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0 24px 24px 0;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-item.active .nav-link {
    background: #3498db;
    color: white;
}

.nav-icon {
    font-size: 18px;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

.nav-text {
    font-size: 14px;
    font-weight: 500;
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

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

.user-avatar {
    font-size: 32px;
    margin-right: 12px;
}

.user-details {
    flex: 1;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.user-role {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    margin-top: 2px;
}

.user-logout {
    background: none;
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.8);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.user-logout:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

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

/* 顶部导航 */
.top-nav {
    background: white;
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.top-nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: #f0f0f0;
}

.toggle-icon {
    display: block;
    width: 20px;
    height: 2px;
    background: #333;
    position: relative;
}

.toggle-icon::before,
.toggle-icon::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: #333;
    left: 0;
    transition: all 0.3s ease;
}

.toggle-icon::before {
    top: -6px;
}

.toggle-icon::after {
    top: 6px;
}

.top-nav h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.top-nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-nav-item {
    position: relative;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.top-nav-item:hover {
    background: #f0f0f0;
}

.top-nav-item .nav-icon {
    font-size: 18px;
    margin-right: 0;
}

.nav-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #ff4d4f;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* 页面内容 */
.page-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    background: #f5f7fa;
}

/* 仪表盘 */
.dashboard {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.card-icon {
    font-size: 32px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.card-content {
    flex: 1;
}

.card-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
}

.card-value {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.card-change {
    font-size: 12px;
    font-weight: 500;
}

.card-change.positive {
    color: #52c41a;
}

.card-change.negative {
    color: #ff4d4f;
}

.dashboard-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.recent-courses {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.course-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.course-item:hover {
    border-color: #3498db;
    background: #f8f9ff;
}

.course-time {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    width: 60px;
}

.course-info {
    flex: 1;
}

.course-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.course-details {
    font-size: 12px;
    color: #666;
}

.course-status {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
}

.course-status.active {
    background: #e6f7ff;
    color: #1890ff;
}

.course-status.upcoming {
    background: #f6ffed;
    color: #52c41a;
}

.stats-chart {
    height: 200px;
}

.chart-placeholder {
    height: 100%;
    display: flex;
    align-items: end;
    gap: 12px;
    padding-bottom: 20px;
}

.chart-bars {
    flex: 1;
    display: flex;
    align-items: end;
    gap: 8px;
    height: 100%;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px 4px 0 0;
    transition: all 0.3s ease;
}

.chart-bar:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

/* iframe页面 */
.calendar-iframe,
.course-iframe {
    width: 100%;
    height: 100%;
    min-height: 800px;
}

.calendar-iframe iframe,
.course-iframe iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* 开发中页面 */
.coming-soon {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9ff;
    border-radius: 12px;
    margin-top: 32px;
}

.coming-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.coming-text {
    font-size: 18px;
    font-weight: 500;
    color: #666;
}

/* 设置页面样式 */
.settings-page {
    padding: 20px;
}

.settings-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.settings-section h4 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #333;
    font-size: 16px;
}

.setting-item {
    margin-bottom: 16px;
}

.setting-label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.setting-input {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.setting-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
}

.btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background: #1890ff;
    color: white;
}

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

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

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

/* 响应式设计 */
@media (max-width: 1024px) {
    .dashboard-sections {
        grid-template-columns: 1fr;
    }
    
    .dashboard-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 80px;
    }
    
    .nav-text,
    .nav-group-title,
    .user-details,
    .user-logout {
        display: none;
    }
    
    .logo h1 {
        font-size: 14px;
    }
    
    .top-nav {
        padding: 0 16px;
    }
    
    .page-content {
        padding: 16px;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .dashboard-card {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
}
