* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f5f5f5; color: #333; }

/* 登录 */
.login-container { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.login-card { background: #fff; border-radius: 16px; padding: 32px 24px; width: 90%; max-width: 360px; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
.login-title { text-align: center; color: #667eea; margin-bottom: 24px; }
.login-tabs { display: flex; margin-bottom: 20px; border-bottom: 2px solid #eee; }
.login-tab { flex: 1; text-align: center; padding: 10px; cursor: pointer; color: #999; }
.login-tab.active { color: #667eea; border-bottom: 2px solid #667eea; margin-bottom: -2px; font-weight: bold; }
.login-input { width: 100%; padding: 12px; margin-bottom: 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; }
.login-btn { width: 100%; padding: 12px; background: #667eea; color: #fff; border: none; border-radius: 8px; font-size: 16px; cursor: pointer; }
.login-error { color: #e74c3c; font-size: 13px; margin-bottom: 8px; min-height: 18px; }
.login-success { color: #27ae60; font-size: 13px; margin-bottom: 8px; }

/* 主应用 */
.main-app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: #f5f5f5; padding-bottom: 70px; }
.app-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: #667eea; color: #fff; }
.user-role { font-size: 12px; background: rgba(255,255,255,.25); padding: 2px 8px; border-radius: 10px; margin-left: 6px; }
.user-status { font-size: 12px; padding: 2px 8px; border-radius: 10px; margin-left: 6px; }
.status-approved { background: #27ae60; }
.status-pending { background: #f39c12; }
.logout-btn { background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; }
.notice { background: #eef2ff; color: #667eea; font-size: 12px; padding: 8px 16px; }
.filter-bar { display: flex; gap: 8px; padding: 8px 16px; }
.filter-btn { padding: 6px 14px; border: 1px solid #ddd; background: #fff; border-radius: 16px; font-size: 13px; cursor: pointer; }
.filter-btn.active { background: #667eea; color: #fff; border-color: #667eea; }

/* 课程表网格 */
.schedule-grid { display: flex; padding: 0 8px; overflow-x: auto; }
.time-column { width: 44px; flex-shrink: 0; }
.time-slot { height: 70px; display: flex; align-items: flex-start; justify-content: flex-end; padding-right: 4px; font-size: 11px; color: #999; }
.day-column { flex: 1; min-width: 52px; border-left: 1px solid #eee; position: relative; }
.course-cell-bg { height: 70px; border-bottom: 1px solid #f0f0f0; }
.course-block { position: absolute; left: 2px; right: 2px; border-radius: 6px; padding: 4px; color: #fff; font-size: 11px; overflow: hidden; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.course-block .student-name { font-weight: bold; display: block; }
.course-block .course-time { opacity: .9; }
.course-block .course-room { opacity: .85; }
.creator-tag { position: absolute; top: 2px; right: 4px; font-size: 9px; background: rgba(0,0,0,.2); padding: 1px 4px; border-radius: 4px; }

/* 底部导航 */
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; display: flex; background: #fff; border-top: 1px solid #eee; }
.nav-btn { flex: 1; padding: 8px; background: none; border: none; color: #666; font-size: 12px; cursor: pointer; }
.nav-btn i { display: block; font-size: 20px; margin-bottom: 2px; }

/* 弹窗 */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 100; align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }
.modal { background: #fff; border-radius: 12px; width: 90%; max-width: 400px; max-height: 85vh; overflow-y: auto; }
.modal-large { max-width: 460px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid #eee; }
.modal-header h3 { font-size: 16px; }
.modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: #999; }
.modal-body { padding: 16px; }
.modal-body label { display: block; font-size: 13px; color: #666; margin: 10px 0 4px; }
.modal-input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; margin-bottom: 8px; }
.modal-footer { display: flex; gap: 8px; padding: 16px; border-top: 1px solid #eee; justify-content: flex-end; }
.btn-primary { padding: 10px 20px; background: #667eea; color: #fff; border: none; border-radius: 8px; cursor: pointer; }
.btn-secondary { padding: 10px 20px; background: #eee; color: #666; border: none; border-radius: 8px; cursor: pointer; }
.btn-danger { padding: 10px 20px; background: #e74c3c; color: #fff; border: none; border-radius: 8px; cursor: pointer; margin-right: auto; }

/* 学生列表 */
.student-add { display: flex; gap: 8px; margin-bottom: 12px; }
.student-add .modal-input { margin-bottom: 0; }
.student-list { list-style: none; }
.student-list li { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.student-color-dot { width: 12px; height: 12px; border-radius: 50%; margin-right: 10px; }
.student-name-text { flex: 1; }
.delete-student-btn { background: #ffeaea; color: #e74c3c; border: none; padding: 4px 10px; border-radius: 6px; cursor: pointer; font-size: 12px; }

/* 管理员 */
.stats-row { display: flex; gap: 8px; margin-bottom: 16px; }
.stat-box { flex: 1; text-align: center; background: #f8f9ff; border-radius: 8px; padding: 12px 4px; }
.stat-num { font-size: 22px; font-weight: bold; color: #667eea; }
.user-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.user-info-item { display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 40px; height: 40px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: bold; }
.user-name { font-weight: bold; font-size: 14px; }
.user-actions { display: flex; gap: 6px; }
.user-action-btn { padding: 6px 12px; border: none; border-radius: 6px; font-size: 12px; cursor: pointer; color: #fff; }
.approve-btn { background: #27ae60; }
.reject-btn { background: #e74c3c; }
.view-btn { background: #667eea; }