/* ========== 基础重置 ========== */ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; padding: 20px; color: #333; } .container { max-width: 1100px; margin: 0 auto; } /* ========== 头部 ========== */ header { text-align: center; padding: 30px 20px 20px; } header h1 { font-size: 2em; color: #fff; margin-bottom: 6px; } .subtitle { color: rgba(255,255,255,0.75); font-size: 0.95em; } .main-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; background: #fff; border-radius: 12px 12px 0 0; box-shadow: 0 2px 8px rgba(0,0,0,0.1); } .main-header h1 { font-size: 1.4em; color: #333; margin-bottom: 0; } .main-header .subtitle { color: #999; margin-top: 2px; } /* ========== 登录/注册卡片 ========== */ .login-card { background: #fff; border-radius: 12px; padding: 36px 30px; max-width: 420px; margin: 0 auto; box-shadow: 0 8px 32px rgba(0,0,0,0.12); } .login-card h2 { font-size: 1.3em; margin-bottom: 18px; color: #333; } .hint { color: #999; font-size: 0.85em; margin-bottom: 14px; } .hint.small { font-size: 0.8em; text-align: center; } .hint a { color: #667eea; text-decoration: none; } /* ========== 表单 ========== */ .form-group { margin-bottom: 14px; } .form-group label { display: block; font-size: 0.85em; color: #666; margin-bottom: 4px; font-weight: 500; } .form-group input, .form-group select { width: 100%; padding: 10px 12px; border: 1.5px solid #e0e0e0; border-radius: 8px; font-size: 0.95em; transition: border-color 0.2s; } .form-group input:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,0.15); } .form-row { display: flex; gap: 12px; } .form-row .form-group { flex: 1; } /* ========== 按钮 ========== */ .btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; border: none; border-radius: 8px; font-size: 0.93em; cursor: pointer; transition: all 0.2s; text-decoration: none; } .btn-primary { background: #667eea; color: #fff; } .btn-primary:hover { background: #5a6fd6; } .btn-outline { background: #fff; color: #667eea; border: 1.5px solid #667eea; } .btn-outline:hover { background: #f0f2ff; } .btn-danger { background: #e74c3c; color: #fff; padding: 5px 12px; font-size: 0.82em; } .btn-danger:hover { background: #c0392b; } .btn-edit { background: #2ecc71; color: #fff; padding: 5px 12px; font-size: 0.82em; margin-right: 6px; } .btn-edit:hover { background: #27ae60; } .btn-sm { padding: 6px 14px; font-size: 0.82em; } .btn-block { display: block; width: 100%; } /* ========== 工具栏 ========== */ .toolbar { background: #fff; padding: 14px 20px; display: flex; gap: 10px; border-top: 1px solid #f0f0f0; align-items: center; } .toolbar input { flex: 1; padding: 9px 12px; border: 1.5px solid #e0e0e0; border-radius: 8px; font-size: 0.93em; } .toolbar input:focus { outline: none; border-color: #667eea; } /* ========== 表格 ========== */ .table-wrap { background: #fff; padding: 0 20px 20px; overflow-x: auto; } table { width: 100%; border-collapse: collapse; font-size: 0.93em; } thead th { text-align: left; padding: 12px 10px; border-bottom: 2px solid #667eea; color: #667eea; font-weight: 600; white-space: nowrap; } tbody td { padding: 12px 10px; border-bottom: 1px solid #f0f0f0; } tbody tr:hover { background: #f8f9ff; } .loading, .empty { text-align: center; color: #999; padding: 40px 0 !important; } /* ========== 成绩徽章 ========== */ .badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 0.82em; font-weight: 600; color: #fff; } .badge-excellent { background: #2ecc71; } .badge-good { background: #3498db; } .badge-normal { background: #f39c12; } .badge-poor { background: #e74c3c; } /* ========== 统计卡片 ========== */ .stats { background: #fff; padding: 16px 20px; border-radius: 0 0 12px 12px; display: flex; gap: 14px; border-top: 1px solid #f0f0f0; box-shadow: 0 2px 8px rgba(0,0,0,0.1); } .stat-card { flex: 1; text-align: center; padding: 14px 10px; border-radius: 8px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); } .stat-value { display: block; font-size: 1.6em; font-weight: 700; color: #fff; } .stat-label { display: block; font-size: 0.78em; color: rgba(255,255,255,0.8); margin-top: 4px; } /* ========== 错误消息 ========== */ .error-msg { color: #e74c3c; font-size: 0.85em; margin-bottom: 10px; min-height: 1.2em; } .error-bar { background: #fff3cd; color: #856404; padding: 10px 20px; border-left: 4px solid #ffc107; font-size: 0.88em; } /* ========== 弹窗 ========== */ .modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.45); display: flex; justify-content: center; align-items: center; z-index: 1000; opacity: 0; pointer-events: none; transition: opacity 0.25s; } .modal-overlay.show { opacity: 1; pointer-events: auto; } .modal { background: #fff; border-radius: 12px; padding: 28px 30px; width: 90%; max-width: 480px; box-shadow: 0 16px 48px rgba(0,0,0,0.2); } .modal h2 { margin-bottom: 18px; font-size: 1.2em; } .modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; } /* ========== 响应式 ========== */ @media (max-width: 600px) { body { padding: 10px; } .login-card { padding: 24px 18px; } .form-row { flex-direction: column; gap: 0; } .main-header { flex-direction: column; gap: 10px; } .toolbar { flex-wrap: wrap; } .stats { flex-direction: column; } }