/* 店铺订单管理系统的样式 */
:root {
    --primary-color: #4a6fa5;
    --secondary-color: #5d93db;
    --accent-color: #3d5a80;
    --text-color: #333;
    --light-bg: #f5f7fa;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --sidebar-width: 240px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
}

/* 页面包装器 */
.page-wrapper {
    display: flex;
    flex-direction: row;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* 背景样式 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, rgba(74, 111, 165, 0.05) 0%, rgba(93, 147, 219, 0.05) 100%);
}

/* 侧边栏导航 */
.sidebar {
    position: relative;
    width: var(--sidebar-width);
    height: 100%;
    background-color: var(--primary-color);
    color: white;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: white;
}

.sidebar-menu i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: absolute;
    bottom: 0;
    width: 100%;
    background-color: var(--primary-color);
}

/* 移动端侧边栏控制 */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background-color: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    padding: 20px;
    background-color: var(--light-bg);
    overflow-y: auto;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 内容区域 */
.content-area {
    flex: 1;
    min-height: 400px;
    padding-bottom: 20px;
}

header {
    background-color: white;
    color: var(--primary-color);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    font-size: 1.5rem;
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-info span {
    margin-right: 10px;
}

h1, h2, h3 {
    margin-bottom: 1rem;
}

.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.row > * {
    flex: 1;
    padding: 0 15px;
    min-width: 250px;
}

.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

input[type="text"],
input[type="password"],
input[type="number"],
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    margin-bottom: 0.5rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(93, 147, 219, 0.3);
}

button, .btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

button:hover, .btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-success {
    background-color: var(--success-color);
}

.btn-danger {
    background-color: var(--danger-color);
}

.btn-warning {
    background-color: var(--warning-color);
    color: #333;
}

.btn-info {
    background-color: var(--info-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

th, td {
    text-align: left;
    padding: 12px 15px;
}

th {
    background-color: var(--primary-color);
    color: white;
}

tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.03);
}

tr {
    transition: background-color 0.3s ease;
}

tr:hover {
    background-color: rgba(93, 147, 219, 0.1);
}

.alert {
    padding: 15px;
    margin-bottom: 1rem;
    border-radius: 5px;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.2);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.2);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
}

/* 搜索区域 */
.search-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.search-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
}

.search-form .form-group {
    margin-bottom: 0;
    min-width: 180px;
}

.search-form input,
.search-form select {
    height: 38px;
}

.search-form button,
.search-form .btn {
    margin: 0 5px;
    padding: 8px 15px;
    height: 38px;
}

.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 1.5rem 0;
}

.pagination a {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 5px;
    padding: 8px 12px;
    border-radius: 5px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination a.active {
    background-color: var(--primary-color);
    color: white;
}

.welcome-anim {
    animation: none;
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1); }
}

.stats-card {
    text-align: center;
    padding: 2rem;
}

.stats-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* 状态文本颜色 */
.text-primary {
    color: var(--primary-color);
}

.text-success {
    color: var(--success-color);
}

.text-danger {
    color: var(--danger-color);
}

.text-warning {
    color: var(--warning-color);
}

.text-info {
    color: var(--info-color);
}

/* 添加新订单按钮 */
.add-order-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    margin-left: 10px;
    background-color: var(--success-color);
    color: white;
    border-radius: 5px;
    text-decoration: none;
    font-weight: normal;
    font-size: 14px;
    transition: all 0.3s ease;
    height: 40px;
}

.add-order-btn:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.add-order-btn i {
    margin-right: 5px;
}

/* 操作按钮组 */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.action-buttons .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
}

.action-buttons .btn i {
    margin-right: 5px;
}

.action-buttons .btn-info {
    background-color: #17a2b8;
}

.action-buttons .btn-info:hover {
    background-color: #138496;
}

/* 图表容器 */
.chart-container {
    position: relative;
    width: 100%;
    height: 300px;
    margin-bottom: 1.5rem;
}

/* 页脚 */
footer {
    display: none;
}

/* 登录页面 */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #f5f7fa;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-container .card {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 30px;
    border-radius: 10px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
    background-color: white;
}

.login-container h2 {
    margin-bottom: 25px;
    color: #4a6fa5;
    text-align: center;
    font-weight: bold;
}

.login-container .form-group {
    margin-bottom: 20px;
}

.login-container input {
    padding: 12px;
    border-radius: 6px;
}

.login-container button {
    margin-top: 10px;
    padding: 12px;
    font-weight: bold;
    background-color: #4a6fa5;
    transition: all 0.3s ease;
}

.login-container button:hover {
    background-color: #3d5a80;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 移动端适配 */
@media (max-width: 768px) {
    html, body {
        overflow: auto;
    }
    
    .page-wrapper {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }
    
    .sidebar {
        position: fixed;
        height: 100%;
        width: var(--sidebar-width);
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .main-content {
        width: 100%;
        padding: 20px 15px;
        margin-left: 0;
    }
    
    .main-content.push {
        margin-left: 0;
        opacity: 0.5;
    }
    
    header {
        padding: 0.8rem;
        flex-direction: column;
    }
    
    .header-title {
        margin-bottom: 10px;
    }
    
    .search-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-form {
        flex-direction: column;
        width: 100%;
    }
    
    .add-order-btn {
        margin-top: 10px;
        margin-left: 0;
        text-align: center;
        justify-content: center;
    }
    
    table {
        display: block;
        overflow-x: auto;
    }
    
    th, td {
        padding: 8px 10px;
    }
    
    .card {
        padding: 1rem;
    }
    
    button, .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
} 