/* 原有样式保留，添加新样式 */

/* 渠道信息展示 */
.channel-info {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.info-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.info-label {
    font-weight: 600;
    color: #495057;
    min-width: 80px;
}

.info-value {
    color: #212529;
    flex: 1;
}

/* 数据概览 */
.stats-overview {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    border-top: 4px solid #4b6cb7;
}

.stat-title {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 8px;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #4b6cb7;
}

/* 渠道类型统计 */
.type-stats {
    grid-column: 1 / -1;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.type-stats h4 {
    color: #495057;
    margin-bottom: 15px;
    text-align: center;
}

.type-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.type-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.type-name {
    color: #495057;
    font-weight: 500;
}

.type-quantity {
    color: #28a745;
    font-weight: 600;
}

/* 带单位的输入框 */
.input-with-unit {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-unit input {
    flex: 1;
    padding-right: 40px;
}

.unit {
    position: absolute;
    right: 12px;
    color: #6c757d;
    font-size: 0.9rem;
}

.hint {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 5px;
    font-style: italic;
}

/* 简化表格 */
.records-container table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.records-container th {
    background: #f8f9fa;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.records-container td {
    padding: 10px 12px;
    border-bottom: 1px solid #dee2e6;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .filters {
        grid-template-columns: 1fr;
    }
}

/* 原有样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1200px;
}

/* 登录页面样式 */
.login-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    max-width: 450px;
    margin: 0 auto;
}

.header {
    background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    letter-spacing: 1px;
}

.login-form {
    padding: 40px;
}

.login-form h2 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 1.1rem;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #4b6cb7;
    box-shadow: 0 0 0 3px rgba(75, 108, 183, 0.2);
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(75, 108, 183, 0.4);
}

.demo-notice {
    background: #fff3cd;
    border: 1px solid #ffecb5;
    border-radius: 10px;
    padding: 15px;
    margin: 25px 0;
    text-align: center;
    color: #856404;
    font-size: 0.95rem;
    line-height: 1.5;
}

.demo-notice i {
    color: #ffc107;
    margin-right: 8px;
}

.admin-entry {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.password-label {
    color: #666;
    font-size: 0.9rem;
}

.admin-btn {
    padding: 12px 25px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
}

/* 数据管理页面样式 */
.dashboard-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.dashboard-header {
    background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
    color: white;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.dashboard-header h1 {
    font-size: 2.2rem;
    margin-bottom: 5px;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.dashboard-content {
    padding: 30px;
}

.dashboard-content h2 {
    color: #333;
    margin-bottom: 25px;
    font-size: 1.8rem;
    font-weight: 600;
}

.user-info {
    background: #e9ecef;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 1rem;
    color: #495057;
    border-left: 4px solid #4b6cb7;
}

.controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.export-btn, .refresh-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.export-btn {
    background: #28a745;
    color: white;
}

.export-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

.refresh-btn {
    background: #17a2b8;
    color: white;
}

.refresh-btn:hover {
    background: #138496;
    transform: translateY(-2px);
}

/* 筛选区域 */
.filter-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.filter-section h3 {
    margin-bottom: 15px;
    color: #495057;
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    margin-bottom: 5px;
    color: #6c757d;
    font-size: 0.9rem;
}

.filter-group input,
.filter-group select {
    padding: 8px 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #4b6cb7;
}

/* 数据表格 */
.data-container {
    overflow-x: auto;
    margin-bottom: 30px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

thead {
    background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
    color: white;
}

th {
    padding: 18px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 1.1rem;
}

tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s;
}

tbody tr:hover {
    background-color: #f8f9fa;
}

td {
    padding: 15px;
    color: #333;
    font-size: 1.05rem;
}

td:first-child {
    font-weight: 500;
    color: #4b6cb7;
}

/* 提交表单 */
.submit-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.submit-form h3 {
    color: #495057;
    margin-bottom: 20px;
}

.submit-btn {
    padding: 12px 25px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.submit-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}
EOF# 重启Nginx
systemctl restart nginx

# 检查状态
systemctl status nginx



cd /var/www/html/sales

# 创建数据存储目录
mkdir -p data
chmod 777 data

# 创建数据存储文件
cat > data/sales_data.json << 'EOF'
[]
