.reports-container { padding: 20px; max-width: 1400px; margin: 0 auto; } .reports-header { margin-bottom: 30px; text-align: center; } .header-top { margin-bottom: 20px; text-align: left; } .back-to-dashboard-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; background-color: #f5f5f5; color: #4a90e2; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.3s ease; text-decoration: none; } .back-to-dashboard-btn:hover { background-color: #4a90e2; color: white; border-color: #4a90e2; transform: translateY(-1px); } .back-to-dashboard-btn:active { transform: translateY(0); } .reports-header h1 { font-size: 28px; font-weight: 600; margin-bottom: 8px; color: #333; } .reports-header p { font-size: 16px; color: #666; margin: 0; } /* 报表参数设置区域 */ .reports-params { margin-bottom: 30px; } .params-card { background-color: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); border: 1px solid #e0e0e0; } .params-card h2 { font-size: 20px; font-weight: 600; margin-bottom: 20px; color: #333; } .params-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; } .param-item { display: flex; flex-direction: column; gap: 6px; } .param-item label { font-size: 14px; font-weight: 500; color: #555; } .form-select, .form-input { padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; transition: all 0.3s ease; background-color: #fff; } .form-select:focus, .form-input:focus { outline: none; border-color: #4a90e2; box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2); } .params-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; } /* 按钮样式 */ .btn-primary, .btn-secondary, .btn-outline { padding: 10px 20px; border: none; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; gap: 6px; } .btn-primary { background-color: #4a90e2; color: white; } .btn-primary:hover:not(:disabled) { background-color: #357abd; transform: translateY(-1px); } .btn-primary:disabled { background-color: #ccc; cursor: not-allowed; transform: none; } .btn-secondary { background-color: #28a745; color: white; } .btn-secondary:hover:not(:disabled) { background-color: #218838; transform: translateY(-1px); } .btn-secondary:disabled { background-color: #ccc; cursor: not-allowed; transform: none; } .btn-outline { background-color: transparent; color: #666; border: 1px solid #ddd; } .btn-outline:hover { background-color: #f5f5f5; border-color: #4a90e2; color: #4a90e2; } .btn-icon { background: none; border: none; cursor: pointer; padding: 8px; border-radius: 4px; color: #666; transition: all 0.3s ease; } .btn-icon:hover { background-color: #f5f5f5; color: #4a90e2; } /* 报表结果展示区域 */ .reports-result { margin-bottom: 40px; background-color: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); border: 1px solid #e0e0e0; animation: fadeIn 0.5s ease; } @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } .result-header { margin-bottom: 24px; border-bottom: 1px solid #eee; padding-bottom: 16px; } .result-header h2 { font-size: 22px; font-weight: 600; margin-bottom: 8px; color: #333; } .result-meta { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; color: #666; } /* 汇总卡片 */ .summary-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; } .summary-card { background-color: #f8f9fa; border-radius: 8px; padding: 20px; display: flex; align-items: center; gap: 12px; transition: all 0.3s ease; border: 1px solid #e9ecef; } .summary-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); } .summary-icon { font-size: 24px; } .summary-content { flex: 1; } .summary-label { font-size: 13px; color: #666; margin-bottom: 4px; } .summary-value { font-size: 20px; font-weight: 600; color: #333; } .summary-value.profit { color: #28a745; } /* 图表容器 */ .chart-container { background-color: #fafbfc; border-radius: 8px; padding: 20px; border: 1px solid #e9ecef; .role-warning { margin: 8px 0 12px; padding: 10px 12px; background: #fff7e6; border: 1px solid #ffe7ba; color: #ad6800; border-radius: 6px; font-size: 13px; } } .chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 16px; } .chart-header h3 { font-size: 18px; font-weight: 600; color: #333; margin: 0; } .chart-legend { display: flex; gap: 16px; flex-wrap: wrap; } .legend-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #666; } .legend-color { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; } /* 柱状图 */ .bar-chart { display: flex; gap: 16px; align-items: flex-end; height: 300px; padding: 20px 0; position: relative; } .bar-item { flex: 1; background-color: #4a90e2; border-radius: 6px 6px 0 0; position: relative; transition: all 0.3s ease; cursor: pointer; min-width: 40px; } .bar-item:hover { opacity: 0.9; transform: translateY(-2px); } .bar-label { position: absolute; bottom: -30px; left: 50%; transform: translateX(-50%); font-size: 12px; color: #666; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; } .bar-value { position: absolute; top: -30px; left: 50%; transform: translateX(-50%); font-size: 13px; font-weight: 600; color: #333; background-color: #fff; padding: 4px 8px; border-radius: 4px; white-space: nowrap; } /* 饼图 */ .pie-chart { display: flex; justify-content: center; padding: 20px; } .pie-container { width: 300px; height: 300px; border-radius: 50%; position: relative; overflow: hidden; } .pie-slice { position: absolute; width: 100%; height: 100%; transform-origin: center; } /* 表格 */ .table-container { overflow-x: auto; } .data-table { width: 100%; border-collapse: collapse; background-color: #fff; border-radius: 8px; overflow: hidden; } .data-table th { background-color: #f8f9fa; padding: 12px 16px; text-align: left; font-weight: 600; font-size: 14px; color: #333; border-bottom: 2px solid #e9ecef; } .data-table td { padding: 12px 16px; font-size: 14px; color: #555; border-bottom: 1px solid #f0f0f0; } .data-table tr:last-child td { border-bottom: none; } .data-table tr:hover { background-color: #f8f9fa; } .table-total { background-color: #f8f9fa; font-weight: 600; } .table-label { display: flex; align-items: center; gap: 8px; } .label-color { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; } /* 历史报表 */ .historical-reports { background-color: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); border: 1px solid #e0e0e0; } .history-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } .history-header h2 { font-size: 20px; font-weight: 600; color: #333; margin: 0; } .history-count { font-size: 14px; color: #666; background-color: #f8f9fa; padding: 4px 12px; border-radius: 16px; } .history-list { display: flex; flex-direction: column; gap: 12px; } .history-item { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid #e9ecef; border-radius: 8px; cursor: pointer; transition: all 0.3s ease; background-color: #fafbfc; } .history-item:hover { background-color: #f0f2f5; border-color: #4a90e2; transform: translateX(2px); } .history-icon { font-size: 20px; flex-shrink: 0; } .history-content { flex: 1; min-width: 0; } .history-title { font-size: 15px; font-weight: 500; color: #333; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .history-meta { display: flex; gap: 12px; font-size: 12px; color: #666; } .history-actions { flex-shrink: 0; } /* 响应式设计 */ @media (max-width: 768px) { .reports-container { padding: 16px; } .params-grid { grid-template-columns: 1fr; } .params-actions { justify-content: center; } .summary-cards { grid-template-columns: 1fr 1fr; } .result-meta { flex-direction: column; gap: 8px; } .bar-chart { height: 200px; flex-direction: column; align-items: stretch; } .bar-item { min-height: 40px; } .pie-container { width: 200px; height: 200px; } } @media (max-width: 480px) { .summary-cards { grid-template-columns: 1fr; } .params-actions { flex-direction: column; } .chart-header { flex-direction: column; align-items: flex-start; } .chart-legend { justify-content: flex-start; } }