body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: #fff;
    margin: 0;
    padding: 0;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 32px 0 16px 0;
    margin-left: 40px;
}

.config-status-msg {
    min-width: 180px;
    margin-left: 12px;
    font-size: 16px;
    color: #c00;
    font-weight: bold;
    line-height: 1.6;
    display: inline-block;
    vertical-align: middle;
}

.search-bar label {
    font-size: 18px;
    color: #666;
}

.search-bar input[type="text"] {
    width: 140px;
    height: 32px;
    margin-left: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0 8px;
    font-size: 16px;
}

#searchBtn, #configKeyBtn, #resetBtn, #exportBtn {
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 4px;
    height: 36px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
    margin-right: 6px;
}

/* 选择店铺按钮自适应宽度 */
#configKeyBtn {
    min-width: 90px;
    width: auto;
    max-width: 260px;
    padding: 0 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

#searchBtn, #resetBtn, #exportBtn {
    width: 90px;
}
#searchBtn:hover, #configKeyBtn:hover, #resetBtn:hover, #exportBtn:hover {
    background: #1565c0;
}
#searchBtn:active, #configKeyBtn:active, #resetBtn:active, #exportBtn:active {
    background: #0d47a1;
}

.order-list {
    margin: 0 40px;
}

.order-card {
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-bottom: 24px;
    background: #fafafa;
    overflow: hidden;
}

.order-header {
    background: #f5f5f5;
    padding: 10px 20px;
    font-size: 16px;
    color: #666;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    gap: 40px;
}

.order-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.order-table th, .order-table td {
    border: 1px solid #eee;
    padding: 18px 8px;
    text-align: center;
    font-size: 16px;
    color: #444;
}

.order-table th {
    border-bottom: 2px solid #ddd;
    color: #888;
    font-weight: normal;
    background: #fafafa;
}

/* 金额列红色显示 */
.price-cell {
    color: #c00;
}

/* 总金额列右边框保持连续（box-shadow绕过border-collapse限制） */
.total-col {
    border-right: 1px solid #eee;
    box-shadow: inset -1px 0 0 #eee;
}

.product-img {
    width: 48px;
    height: 48px;
    background: #eee;
    border-radius: 4px;
    display: inline-block;
    vertical-align: middle;
    object-fit: cover;
}

.order-table .add-btn {
    background: #c00;
    color: #fff;
    border: none;
    border-radius: 6px;
    width: 70px;
    height: 36px;
    font-size: 18px;
    cursor: pointer;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 40px 0 0 0;
    font-size: 16px;
    color: #888;
}

.page-btn {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 36px;
    height: 36px;
    margin: 0 2px;
    cursor: pointer;
    color: #c00;
    font-size: 16px;
}

.page-btn.active, .page-btn:active {
    background: #c00;
    color: #fff;
    border-color: #c00;
}

.page-btn[disabled] {
    color: #ccc;
    border-color: #eee;
    cursor: not-allowed;
}

.goto-input {
    width: 40px;
    height: 28px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin: 0 4px;
    text-align: center;
}

/* 弹窗样式 */
.modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0,0,0,0.35) !important;
    /* display: flex !important;  由JS控制显示隐藏 */
    align-items: center !important;
    justify-content: center !important;
    z-index: 9999 !important;
}
.modal-content {
    background: #fff;
    border-radius: 10px;
    padding: 32px 36px 24px 36px;
    min-width: 340px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
    margin: 0 auto;
    position: relative;
    z-index: 10000;
}
.modal-content h3 {
    margin: 0 0 10px 0;
    font-size: 22px;
    color: #c00;
    text-align: center;
}
.modal-content label {
    display: flex;
    flex-direction: column;
    font-size: 16px;
    color: #444;
    margin-bottom: 8px;
    gap: 6px;
}
.modal-content input[type="text"] {
    height: 32px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0 8px;
    font-size: 15px;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 10px;
}
#submitConfigBtn, #closeConfigBtn {
    background: #c00;
    color: #fff;
    border: none;
    border-radius: 4px;
    width: 70px;
    height: 36px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}
#closeConfigBtn {
    background: #888;
}
#submitConfigBtn:hover {
    background: #a00;
}
#closeConfigBtn:hover {
    background: #555;
}
/* 新增下拉框样式 */
select {
    height: 32px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0 8px;
    font-size: 15px;
    background: white;
    width: 80px;
    margin: 0 4px;
}

/* 弹窗内表单布局调整 */
#saveForm label {
    margin-bottom: 15px;
    display: block;
}

#saveForm label input,
#saveForm label select {
    margin-top: 4px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .search-bar {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
        margin: 0;
        align-items: stretch;
    }
    .search-bar label {
        display: flex;
        flex-direction: column;
        gap: 2px;
        font-size: 13px;
    }
    .search-bar input[type="text"],
    .search-bar input[type="date"] {
        width: 100% !important;
        height: 32px;
        box-sizing: border-box;
    }
    .search-bar button {
        width: 100% !important;
        height: 36px;
        font-size: 14px !important;
        margin-right: 0 !important;
    }
    #configKeyBtn {
        width: 100% !important;
    }
    
    .order-list {
        margin: 0 8px;
    }
    .order-card {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .order-table {
        min-width: 600px;
        font-size: 12px;
    }
    .order-table th,
    .order-table td {
        padding: 8px 6px;
        font-size: 12px;
        white-space: nowrap;
    }
    .order-table th {
        font-size: 11px;
    }
    .order-header {
        flex-wrap: wrap;
        gap: 4px;
        padding: 8px 12px;
        font-size: 12px;
    }
    .order-header span {
        white-space: nowrap;
    }
    .product-img {
        width: 36px;
        height: 36px;
    }
    .order-table .add-btn {
        width: 60px;
        height: 30px;
        font-size: 14px;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 4px;
        font-size: 12px;
        margin: 16px 0;
        padding: 0 8px;
    }
    .page-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    .goto-input {
        width: 32px;
        height: 24px;
        font-size: 12px;
    }
    
    /* 弹窗 */
    .modal-content {
        min-width: auto;
        width: 90%;
        max-width: 360px;
        padding: 20px;
        margin: 10px auto;
    }
    .modal-content h3 {
        font-size: 18px;
    }
    .modal-content label {
        font-size: 14px;
    }
    .modal-actions {
        flex-direction: row;
        justify-content: center;
    }
    #submitConfigBtn, #closeConfigBtn {
        flex: 1;
        max-width: 120px;
    }
}
