/** * UI Core Stylesheet * 智能中控台核心样式库 * * @version 1.0.0 * @author Smart Center Team * @description 提供所有UI组件的基础样式和通用样式规范 */ /* ==================== 基础重置 ==================== */ * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif; font-size: 14px; line-height: 1.6; color: #333; background-color: #f5f7fa; } /* ==================== 布局容器 ==================== */ .container { max-width: 1400px; margin: 0 auto; padding: 20px; } .page-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 30px; border-radius: 12px; margin-bottom: 30px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); } .page-header h1 { font-size: 32px; margin-bottom: 10px; } .page-header p { font-size: 16px; opacity: 0.9; } /* ==================== 模块卡片 ==================== */ .module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; margin-top: 30px; } .module-card { background: white; border-radius: 12px; padding: 25px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); transition: all 0.3s ease; cursor: pointer; border: 2px solid transparent; } .module-card:hover { transform: translateY(-5px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); border-color: #667eea; } .module-icon { font-size: 48px; margin-bottom: 15px; text-align: center; } .module-title { font-size: 20px; font-weight: bold; color: #2c3e50; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; } .module-description { font-size: 14px; color: #7f8c8d; line-height: 1.6; margin-bottom: 15px; } .module-badge { display: inline-block; padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: bold; } .module-badge.hot { background: linear-gradient(135deg, #ff6b6b, #ee5a6f); color: white; } .module-badge.new { background: linear-gradient(135deg, #51cf66, #37b24d); color: white; } .module-badge.beta { background: linear-gradient(135deg, #ffd43b, #fcc419); color: #333; } /* ==================== 按钮样式 ==================== */ .btn { display: inline-block; padding: 10px 24px; border: none; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.3s ease; text-decoration: none; outline: none; } .btn-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; } .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4); } .btn-secondary { background: #f1f3f5; color: #343a40; } .btn-secondary:hover { background: #e9ecef; } .btn-success { background: linear-gradient(135deg, #51cf66, #37b24d); color: white; } .btn-warning { background: linear-gradient(135deg, #ffd43b, #fcc419); color: #333; } .btn-danger { background: linear-gradient(135deg, #ff6b6b, #ee5a6f); color: white; } /* ==================== 表单元素 ==================== */ .form-group { margin-bottom: 20px; } .form-label { display: block; margin-bottom: 8px; font-weight: 500; color: #343a40; } .form-control { width: 100%; padding: 10px 15px; border: 1px solid #dee2e6; border-radius: 6px; font-size: 14px; transition: all 0.3s ease; } .form-control:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); } /* ==================== 对话框/弹窗 ==================== */ .modal-overlay { 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-content { background: white; border-radius: 12px; padding: 30px; max-width: 600px; width: 90%; max-height: 80vh; overflow-y: auto; box-shadow: 0 10px 40px rgba(0,0,0,0.2); } .modal-header { font-size: 24px; font-weight: bold; margin-bottom: 20px; color: #2c3e50; } .modal-body { margin-bottom: 20px; } .modal-footer { display: flex; justify-content: flex-end; gap: 12px; padding-top: 20px; border-top: 1px solid #dee2e6; } /* ==================== 加载动画 ==================== */ .loading-spinner { display: inline-block; width: 40px; height: 40px; border: 4px solid #f3f3f3; border-top: 4px solid #667eea; border-radius: 50%; animation: spin 1s linear infinite; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .loading-container { display: flex; align-items: center; justify-content: center; min-height: 200px; } /* ==================== 工具类 ==================== */ .text-center { text-align: center; } .text-left { text-align: left; } .text-right { text-align: right; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .flex { display: flex; } .flex-center { align-items: center; justify-content: center; } .flex-between { align-items: center; justify-content: space-between; } .flex-wrap { flex-wrap: wrap; } .hidden { display: none; } .visible { visibility: visible; } .invisible { visibility: hidden; } /* ==================== 响应式设计 ==================== */ @media (max-width: 768px) { .module-grid { grid-template-columns: 1fr; } .page-header h1 { font-size: 24px; } .container { padding: 15px; } } /* ==================== AI 对话窗口样式 ==================== */ .ai-chat-widget { position: fixed; bottom: 20px; right: 20px; width: 380px; background: white; border-radius: 12px; box-shadow: 0 4px 24px rgba(0,0,0,0.15); z-index: 999; overflow: hidden; } .ai-chat-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 15px 20px; font-weight: bold; display: flex; justify-content: space-between; align-items: center; } .ai-chat-body { height: 400px; overflow-y: auto; padding: 20px; background: #f8f9fa; } .ai-chat-input { padding: 15px; border-top: 1px solid #dee2e6; display: flex; gap: 10px; } .ai-chat-input textarea { flex: 1; padding: 10px; border: 1px solid #dee2e6; border-radius: 6px; resize: none; font-family: inherit; } .ai-message { margin-bottom: 15px; padding: 12px 16px; border-radius: 8px; max-width: 80%; } .ai-message.user { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; margin-left: auto; } .ai-message.assistant { background: white; border: 1px solid #dee2e6; } /* ==================== 字段编辑器样式 ==================== */ .field-editor { background: white; border-radius: 8px; padding: 20px; margin-bottom: 20px; border: 1px solid #dee2e6; } .field-label { font-weight: 600; color: #2c3e50; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; } .field-actions { display: flex; gap: 10px; margin-top: 15px; padding-top: 15px; border-top: 1px solid #f1f3f5; } /* ==================== 拖拽排序样式 ==================== */ .sortable-ghost { opacity: 0.4; background: #f1f3f5; } .sortable-drag { opacity: 1; box-shadow: 0 8px 24px rgba(0,0,0,0.15); } /* ==================== 通知消息 ==================== */ .notification { position: fixed; top: 20px; right: 20px; min-width: 300px; padding: 15px 20px; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.15); z-index: 2000; animation: slideInRight 0.3s ease; } .notification.success { background: #d3f9d8; border-left: 4px solid #51cf66; color: #2b8a3e; } .notification.error { background: #ffe3e3; border-left: 4px solid #ff6b6b; color: #c92a2a; } .notification.warning { background: #fff9db; border-left: 4px solid #ffd43b; color: #e67700; } .notification.info { background: #e7f5ff; border-left: 4px solid #339af0; color: #1864ab; } @keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }