/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* 容器样式 */
.container {
    display: flex;
    height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: 200px;
    background-color: #2c3e50;
    color: #fff;
    padding: 20px 0;
    position: fixed;
    height: 100%;
    overflow-y: auto;
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 18px;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin: 10px 0;
}

.sidebar ul li a {
    display: block;
    padding: 10px 20px;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s;
    font-size: 14px;
}

.sidebar ul li a:hover {
    background-color: #34495e;
}

.sidebar ul li a.active {
    background-color: #3498db;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    margin-left: 200px;
    padding: 20px;
    overflow-y: auto;
    height: 100vh;
}

/* 头部样式 */
.header {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 20px;
    color: #333;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-info span {
    margin-right: 10px;
    font-size: 14px;
}

.user-info a {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
}

/* 内容区域 */
.content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* 统计卡片 */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-card h3 {
    color: #666;
    margin-bottom: 10px;
    font-size: 14px;
}

.stat-card p {
    font-size: 24px;
    font-weight: bold;
    color: #3498db;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

th {
    background-color: #f8f9fa;
    font-weight: bold;
}

tr:hover {
    background-color: #f5f5f5;
}

/* 按钮样式 */
button, .btn, .add-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
}

.btn-primary, .add-btn {
    background-color: #3498db;
    color: #fff;
}

.btn-primary:hover, .add-btn:hover {
    background-color: #0069d9;
}

.btn-success {
    background-color: #27ae60;
    color: #fff;
}

.btn-success:hover {
    background-color: #219a52;
}

.btn-danger {
    background-color: #e74c3c;
    color: #fff;
}

.btn-danger:hover {
    background-color: #c0392b;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #666;
    font-size: 14px;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* 图片网格 */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.image-card {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.image-card img {
    max-width: 100%;
    border-radius: 4px;
    margin-bottom: 10px;
}

.image-card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

/* 状态样式 */
.status-active {
    color: green;
}

.status-inactive {
    color: red;
}

.status-pending {
    color: orange;
}

.status-submitted {
    color: blue;
}

.status-shipped {
    color: green;
}

.status-completed {
    color: darkgreen;
}

.stock-low {
    color: red;
}

.stock-normal {
    color: green;
}

/* 消息样式 */
.success {
    color: green;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
}

.error {
    color: red;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 10px 0;
    }
    
    .sidebar ul {
        display: flex;
        overflow-x: auto;
        padding: 0 10px;
    }
    
    .sidebar ul li {
        margin: 0 5px;
    }
    
    .sidebar ul li a {
        white-space: nowrap;
        padding: 8px 12px;
    }
    
    .main-content {
        margin-left: 0;
        margin-top: 10px;
        height: calc(100vh - 120px);
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 10px;
    }
    
    .content {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 18px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-card p {
        font-size: 20px;
    }
}