/** * 班级操行分管理系统 - 全局样式 * * 开发者: Canglan * 联系方式: admin@sea-studio.top * 版权归属: Sea Network Technology Studio * 许可证: MIT License * * 版权所有 © Sea Network Technology Studio */ * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background: #f5f7fb; min-height: 100vh; font-size: 14px; color: #333; } /* ========== 登录页面 ========== */ .login-container { background: white; border-radius: 16px; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); padding: 40px; width: 400px; max-width: 90%; margin: 100px auto; } .login-header { text-align: center; margin-bottom: 30px; } .login-header h1 { font-size: 24px; color: #333; margin-bottom: 8px; } .login-header p { color: #666; font-size: 14px; } .login-form .form-group { margin-bottom: 20px; } .login-form label { display: block; margin-bottom: 6px; color: #555; font-weight: 500; } .login-form input { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; transition: border-color 0.3s; } .login-form input:focus { outline: none; border-color: #667eea; } .btn-login { width: 100%; padding: 12px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; border-radius: 8px; font-size: 16px; font-weight: bold; cursor: pointer; transition: opacity 0.3s; } .btn-login:hover { opacity: 0.9; } .error-msg { background: #fee; color: #c33; padding: 10px; border-radius: 8px; margin-top: 15px; text-align: center; font-size: 13px; } .login-footer { text-align: center; margin-top: 30px; padding-top: 20px; border-top: 1px solid #eee; color: #999; font-size: 12px; } /* ========== 公共头部 ========== */ .header { background: white; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); padding: 12px 24px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 100; } .header h1 { font-size: 18px; color: #333; } .header-info { display: flex; align-items: center; gap: 16px; } .user-name { color: #666; font-weight: 500; } .user-role { background: #667eea; color: white; padding: 2px 8px; border-radius: 20px; font-size: 11px; } .btn-logout { background: #e53e3e; color: white; border: none; padding: 6px 16px; border-radius: 6px; cursor: pointer; font-size: 13px; transition: background 0.3s; } .btn-logout:hover { background: #c53030; } /* ========== 导航菜单 ========== */ .nav { background: white; padding: 0 24px; border-bottom: 1px solid #eee; display: flex; gap: 4px; overflow-x: auto; } .nav-item { padding: 12px 20px; background: none; border: none; color: #666; cursor: pointer; font-size: 14px; transition: all 0.3s; border-bottom: 2px solid transparent; text-decoration: none; display: inline-block; } .nav-item:hover { color: #667eea; } .nav-item.active { color: #667eea; border-bottom-color: #667eea; } /* ========== 容器 ========== */ .container { max-width: 1200px; margin: 24px auto; padding: 0 24px; } /* ========== 卡片 ========== */ .card { background: white; border-radius: 12px; padding: 20px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); } .card-title { font-size: 18px; font-weight: bold; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid #667eea; color: #333; } /* ========== 统计卡片网格 ========== */ .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; } .stat-card { background: white; border-radius: 12px; padding: 20px; text-align: center; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); } .stat-value { font-size: 32px; font-weight: bold; color: #667eea; margin: 10px 0; } .stat-label { color: #666; font-size: 13px; } /* ========== 表格 ========== */ .table-wrapper { overflow-x: auto; } table { width: 100%; border-collapse: collapse; } th, td { padding: 12px; text-align: left; border-bottom: 1px solid #eee; } th { background: #f8f9fa; font-weight: 600; color: #555; } tr:hover { background: #f8f9fa; } /* ========== 状态标签 ========== */ .status-badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; } .status-submitted { background: #c6f6d5; color: #22543d; } .status-not_submitted { background: #fed7d7; color: #742a2a; } .status-late { background: #feebc8; color: #7c2d12; } .status-present { background: #c6f6d5; color: #22543d; } .status-absent { background: #fed7d7; color: #742a2a; } .status-leave { background: #e9d8fd; color: #553c9a; } /* ========== 按钮 ========== */ .btn { padding: 8px 16px; border: none; border-radius: 6px; cursor: pointer; font-size: 13px; transition: all 0.3s; } .btn-primary { background: #667eea; color: white; } .btn-primary:hover { background: #5a67d8; } .btn-danger { background: #e53e3e; color: white; } .btn-danger:hover { background: #c53030; } .btn-success { background: #38a169; color: white; } .btn-success:hover { background: #2f855a; } .btn-sm { padding: 4px 10px; font-size: 12px; } /* ========== 模态框 ========== */ .modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); justify-content: center; align-items: center; z-index: 1000; } .modal-content { background: white; border-radius: 12px; padding: 24px; width: 500px; max-width: 90%; max-height: 80vh; overflow-y: auto; } .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid #eee; } .modal-header h3 { font-size: 18px; color: #333; } .modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: #999; } .modal-footer { margin-top: 20px; padding-top: 16px; border-top: 1px solid #eee; display: flex; justify-content: flex-end; gap: 12px; } /* ========== 表单 ========== */ .form-group { margin-bottom: 16px; } .form-group label { display: block; margin-bottom: 6px; font-weight: 500; color: #555; } .form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; } .form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #667eea; } .form-group small { display: block; color: #999; font-size: 12px; margin-top: 4px; } /* ========== 复选框组 ========== */ .checkbox-group { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; } .checkbox-group input { width: auto; } /* ========== 操作栏 ========== */ .action-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; } .action-buttons { display: flex; gap: 10px; flex-wrap: wrap; } .search-bar { display: flex; gap: 10px; } .search-bar input { padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; width: 200px; } /* ========== 分页 ========== */ .pagination { display: flex; justify-content: center; gap: 8px; margin-top: 20px; } .pagination a, .pagination span { padding: 6px 12px; border: 1px solid #ddd; border-radius: 4px; text-decoration: none; color: #666; cursor: pointer; } .pagination .active { background: #667eea; color: white; border-color: #667eea; } /* ========== 提示消息 ========== */ .toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); padding: 12px 24px; border-radius: 8px; color: white; font-size: 14px; z-index: 1100; animation: fadeInUp 0.3s ease; } .toast-success { background: #38a169; } .toast-error { background: #e53e3e; } .toast-warning { background: #ed8936; } @keyframes fadeInUp { from { opacity: 0; transform: translateX(-50%) translateY(20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } } /* ========== 加载动画 ========== */ .loading { display: inline-block; width: 20px; height: 20px; border: 2px solid #ddd; border-top-color: #667eea; border-radius: 50%; animation: spin 0.8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } /* ========== 底部 ========== */ .footer { text-align: center; padding: 20px; color: #999; font-size: 12px; } /* ========== 记录项 ========== */ .record-item { padding: 12px 0; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; } .record-points { font-weight: bold; } .record-points.plus { color: #38a169; } .record-points.minus { color: #e53e3e; } .record-reason { flex: 1; margin: 0 15px; color: #555; } .record-time { font-size: 12px; color: #999; } .view-more { text-align: center; margin-top: 15px; } .view-more a { color: #667eea; text-decoration: none; } .conduct-score { text-align: center; padding: 20px; } .score-number { font-size: 64px; font-weight: bold; color: #667eea; } /* ========== 触控友好 ========== */ .btn, .btn-login, .btn-logout, .status-btn, .nav-item { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; } .form-group input, .form-group select, .form-group textarea { min-height: 44px; } /* ========== 响应式 — 平板 (≤768px) ========== */ @media (max-width: 768px) { .container { padding: 0 16px; } .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } th, td { padding: 8px; font-size: 12px; } .card { padding: 16px; } .nav { padding: 0 16px; -webkit-overflow-scrolling: touch; scrollbar-width: none; } .nav::-webkit-scrollbar { display: none; } .nav-item { padding: 10px 14px; font-size: 13px; white-space: nowrap; flex-shrink: 0; } .action-bar { flex-direction: column; align-items: stretch; } .search-bar { width: 100%; } .search-bar input { flex: 1; } .header { padding: 10px 16px; flex-wrap: wrap; gap: 8px; } .header h1 { font-size: 16px; } .login-container { margin: 40px auto; padding: 24px; } .modal-content { width: 92%; max-height: 85vh; } .table-wrapper { -webkit-overflow-scrolling: touch; } .stat-value { font-size: 28px; } .pagination a, .pagination span { padding: 8px 10px; min-height: 36px; } .action-buttons { width: 100%; } .action-buttons .btn { flex: 1; min-width: 0; } } /* ========== 响应式 — 手机 (≤480px) ========== */ @media (max-width: 480px) { body { font-size: 13px; } .header { flex-direction: column; align-items: flex-start; padding: 8px 12px; } .header-info { width: 100%; justify-content: space-between; } .header h1 { font-size: 15px; margin-bottom: 4px; } .user-name { font-size: 13px; } .btn-logout { padding: 6px 12px; font-size: 12px; } .container { padding: 0 10px; margin: 12px auto; } .card { padding: 12px; border-radius: 8px; margin-bottom: 12px; } .card-title { font-size: 15px; margin-bottom: 12px; padding-bottom: 8px; } .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } .stat-card { padding: 12px 8px; border-radius: 8px; } .stat-value { font-size: 24px; margin: 6px 0; } .stat-label { font-size: 12px; } .score-number { font-size: 48px; } /* 登录页 */ .login-container { margin: 20px 12px; padding: 20px 16px; border-radius: 12px; max-width: 100%; width: auto; } .login-header h1 { font-size: 20px; } .login-header p { font-size: 13px; } .login-form input { padding: 14px 12px; font-size: 16px; /* 防止 iOS 自动缩放 */ } .btn-login { padding: 14px; font-size: 16px; } /* 导航 */ .nav { padding: 0 8px; } .nav-item { padding: 8px 12px; font-size: 13px; } /* 表格 */ th, td { padding: 6px 8px; font-size: 12px; } /* 模态框 */ .modal-content { width: 100%; max-width: 100%; border-radius: 12px 12px 0 0; max-height: 90vh; position: fixed; bottom: 0; left: 0; } .modal { align-items: flex-end; } /* 按钮 */ .btn { padding: 10px 14px; font-size: 13px; } .btn-sm { padding: 6px 10px; font-size: 12px; min-height: 36px; } /* 表单 */ .form-group input, .form-group select, .form-group textarea { font-size: 16px; /* 防止 iOS 自动缩放 */ padding: 10px 12px; } /* 记录项 */ .record-item { flex-wrap: wrap; gap: 4px; padding: 10px 0; } .record-reason { margin: 0 8px; flex: 1 1 100%; order: 3; font-size: 13px; } .record-time { font-size: 11px; } /* 搜索栏 */ .search-bar { flex-direction: column; gap: 8px; } .search-bar input { width: 100%; } /* 操作栏 */ .action-buttons { flex-wrap: wrap; gap: 8px; } .action-buttons .btn { flex: 1 1 calc(50% - 8px); min-width: 0; } /* 分页 */ .pagination { gap: 4px; flex-wrap: wrap; } .pagination a, .pagination span { padding: 6px 10px; font-size: 12px; } /* 底部 */ .footer { padding: 16px 12px; } /* 状态标签 */ .status-badge { padding: 3px 8px; font-size: 11px; } /* Toast */ .toast { left: 12px; right: 12px; bottom: 12px; transform: none; font-size: 13px; padding: 10px 16px; border-radius: 8px; animation: fadeInUpMobile 0.3s ease; } @keyframes fadeInUpMobile { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } }