/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
}

/* 登录页样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f0f8ff;
}

.login-form {
    width: 400px;
    padding: 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.login-form:hover {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.15);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #1890ff;
    font-size: 24px;
    font-weight: 600;
}

/* 采购单列表页样式 */
.app-container {
    min-height: 100vh;
    background-color: #f0f2f5;
    display: flex;
    flex-direction: column;
}

.header {
    background-color: #fff;
    color: #333;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid #e8e8e8;
}

.header h1 {
    font-size: 18px;
    font-weight: 600;
    color: #1890ff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header h1::before {
    content: 'S';
    display: inline-block;
    width: 24px;
    height: 24px;
    background-color: #1890ff;
    color: white;
    border-radius: 4px;
    text-align: center;
    line-height: 24px;
    font-weight: bold;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-right .user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.sidebar {
    width: 220px;
    background-color: #fff;
    border-right: 1px solid #e8e8e8;
    height: calc(100vh - 64px);
    padding: 24px 0;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu a {
    display: block;
    padding: 12px 24px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
    border-radius: 0 20px 20px 0;
    margin: 0 12px;
}

.sidebar-menu a:hover {
    background-color: #f0f7ff;
    color: #1890ff;
}

.sidebar-menu a.active {
    color: #1890ff;
    background-color: #e6f7ff;
    font-weight: 500;
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background-color: #f0f2f5;
}

.filter-section {
    background-color: #fff;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.filter-row {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 16px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* 卡片样式 */
.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* 统计卡片 */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.stat-trend {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-trend.up {
    color: #52c41a;
}

.stat-trend.down {
    color: #ff4d4f;
}

/* 采购单编辑页样式 */
.form-container {
    background-color: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.form-item {
    margin-bottom: 20px;
}

.form-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-item input,
.form-item select {
    transition: all 0.3s ease;
}

.form-item input:focus,
.form-item select:focus {
    border-color: #1890ff !important;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2) !important;
    outline: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        float: none;
        border-right: none;
        border-bottom: 1px solid #e8e8e8;
    }
    
    .content {
        margin-left: 0;
    }
    
    .login-form {
        width: 90%;
        padding: 20px;
    }
}