/* style.css - 网站样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
}

/* 导航栏 */
.navbar {
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-brand {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-brand i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-logout {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.3);
}

/* 主内容区 */
.main-content {
    display: flex;
    min-height: calc(100vh - 150px);
}

/* 侧边栏 */
.sidebar {
    width: 250px;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    padding: 2rem 0;
}

.menu {
    list-style: none;
}

.menu li {
    margin-bottom: 5px;
}

.menu a {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: #64748b;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.menu a i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.menu a:hover, .menu li.active a {
    background: #f1f5f9;
    color: #4f46e5;
    border-left-color: #4f46e5;
}

/* 内容区 */
.content {
    flex: 1;
    padding: 2rem;
    background: #f9fafb;
}

/* 卡片样式 */
.welcome-card, .quick-calc, .recent-history {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.welcome-card h2 {
    color: #4f46e5;
    margin-bottom: 10px;
}

.highlight {
    color: #ef4444;
    font-weight: bold;
    font-size: 1.2em;
}

/* 表单样式 */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #475569;
    font-weight: 500;
}

.form-group input, 
.form-group select {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border 0.3s;
}

.form-group input:focus, 
.form-group select:focus {
    border-color: #4f46e5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-primary {
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* 功能卡片 */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card-icon {
    font-size: 2.5rem;
    color: #4f46e5;
    margin-bottom: 15px;
}

.card h4 {
    color: #1e293b;
    margin-bottom: 10px;
}

.card p {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 15px;
}

.card-link {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
}

/* 表格样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.data-table th {
    background: #f1f5f9;
    padding: 12px 15px;
    text-align: left;
    color: #475569;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e2e8f0;
}

.data-table tr:hover {
    background: #f8fafc;
}

.profit-badge {
    background: #10b981;
    color: white;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.empty-state i {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 15px;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 20px;
    background: #f8fafc;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding: 1rem 0;
    }
    
    .menu {
        display: flex;
        overflow-x: auto;
        padding: 0 1rem;
    }
    
    .menu li {
        flex: 0 0 auto;
        margin: 0;
    }
    
    .menu a {
        padding: 10px 15px;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .menu a:hover, .menu li.active a {
        border-left-color: transparent;
        border-bottom-color: #4f46e5;
    }
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .feature-cards {
        grid-template-columns: 1fr;
    }
    
    .navbar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}