/* Layui风格样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Helvetica Neue", Helvetica, "Microsoft YaHei", Arial, sans-serif;
    background: #f2f2f2;
    color: #333;
    font-size: 14px;
}

/* 主容器 */
.container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* 左侧导航菜单 - Layui风格 */
.sidebar {
    width: 200px;
    background: #393D49;
    color: #c2c2c2;
    overflow-y: auto;
    overflow-x: hidden;
}

.logo {
    height: 60px;
    line-height: 60px;
    padding: 0 20px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: #23262E;
    text-align: center;
    border-bottom: 1px solid #2B2E37;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    height: 45px;
    line-height: 45px;
    padding: 0 20px;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    position: relative;
}

.nav-item:hover {
    background: #4E5465;
    color: #fff;
}

.nav-item.active {
    background: #009688;
    color: #fff;
    border-left-color: #5FB878;
}

.nav-item span {
    display: block;
    font-size: 14px;
}

/* 主内容区 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f2f2f2;
}

/* 顶部导航栏 - Layui风格 */
.top-header {
    height: 60px;
    line-height: 60px;
    background: #fff;
    border-bottom: 1px solid #e6e6e6;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.top-header .header-title {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.top-header .user-info {
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
}

/* 顶部标签页 - Layui风格 */
.tabs {
    display: flex;
    background: #fff;
    border-bottom: 1px solid #e6e6e6;
    padding: 0;
    overflow-x: auto;
}

.tab {
    padding: 0 20px;
    height: 40px;
    line-height: 40px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
    white-space: nowrap;
    color: #666;
    font-size: 14px;
}

.tab:hover {
    background: #f8f8f8;
    color: #333;
}

.tab.active {
    border-bottom-color: #009688;
    color: #009688;
    font-weight: 500;
}

/* 内容区域 */
.content-area {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f2f2f2;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* Layui卡片样式 */
.layui-card {
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.05);
    margin-bottom: 15px;
}

.layui-card-header {
    height: 42px;
    line-height: 42px;
    padding: 0 15px;
    border-bottom: 1px solid #f6f6f6;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.layui-card-body {
    padding: 15px;
}

/* 搜索区域 */
.search-section {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.search-input {
    flex: 1;
    height: 38px;
    line-height: 38px;
    padding: 0 15px;
    border: 1px solid #e6e6e6;
    border-radius: 2px;
    font-size: 14px;
    background: #fff;
    transition: all 0.3s;
}

.search-input:focus {
    border-color: #009688;
    outline: none;
}

/* 订单页工具栏（更紧凑、更丝滑） */
.order-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.order-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.order-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 订单页搜索框：不要过长 */
.order-toolbar .order-search-input {
    flex: 0 0 360px;
    width: 360px;
    min-width: 220px;
    max-width: 100%;
}

/* 订单页筛选下拉：统一高度与交互 */
.order-filter-select {
    height: 38px;
    line-height: 38px;
    padding: 0 12px;
    border: 1px solid #e6e6e6;
    border-radius: 2px;
    font-size: 14px;
    background: #fff;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.12s;
}

.order-filter-select:focus {
    border-color: #009688;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 150, 136, 0.12);
}

/* 订单页时间筛选输入框：跟下拉风格统一 */
.order-filter-date {
    height: 38px;
    line-height: 38px;
    padding: 0 12px;
    border: 1px solid #e6e6e6;
    border-radius: 2px;
    font-size: 14px;
    background: #fff;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.12s;
}

.order-filter-date:focus {
    border-color: #009688;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 150, 136, 0.12);
}

/* 按钮更丝滑一些 */
.order-toolbar .btn {
    transition: background-color 0.2s, opacity 0.2s, box-shadow 0.2s, transform 0.12s;
}

.order-toolbar .btn:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.order-toolbar .btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Layui按钮样式 */
.btn {
    display: inline-block;
    height: 38px;
    line-height: 38px;
    padding: 0 18px;
    background-color: #009688;
    color: #fff;
    white-space: nowrap;
    text-align: center;
    font-size: 14px;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s;
    box-sizing: border-box;
    vertical-align: middle;
}

.btn:hover {
    opacity: 0.8;
}

.btn-primary {
    background-color: #009688;
}

.btn-primary:hover {
    background-color: #33ABA0;
}

.btn-normal {
    background-color: #1E9FFF;
}

.btn-normal:hover {
    background-color: #4AB8FF;
}

.btn-warm {
    background-color: #FFB800;
}

.btn-warm:hover {
    background-color: #FFC933;
}

.btn-danger {
    background-color: #FF5722;
}

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

.btn-disabled {
    background-color: #C2C2C2;
    cursor: not-allowed;
}

.btn-disabled:hover {
    opacity: 1;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e6e6e6;
}

table th,
table td {
    padding: 9px 15px;
    text-align: left;
    border: 1px solid #e6e6e6;
    font-size: 14px;
}

table th {
    background: #f8f8f8;
    font-weight: 500;
    color: #333;
}

table tr:hover {
    background: #f8f8f8;
}

table tr:nth-child(even) {
    background: #fafafa;
}

table tr:nth-child(even):hover {
    background: #f8f8f8;
}

/* 添加订单模态框 - 已选商品列表 */
.order-items-wrap {
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    padding: 8px;
    background: #fafafa;
    margin-top: 4px;
}
.order-items-table {
    margin: 0;
    background: #fff;
}
.order-items-table thead th {
    font-size: 13px;
    padding: 6px 10px;
}
.order-items-table tbody td {
    padding: 6px 10px;
}
.order-items-table tbody td input[type="number"] {
    padding: 4px 8px;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
}

/* 订单表单页（添加/编辑订单独立页面） */
#order-form-wrap {
    padding: 0 4px;
}
.order-form-page {
    width: 100%;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    overflow: hidden;
}
.order-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e6e6e6;
}
.order-form-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}
.order-form-actions {
    display: flex;
    gap: 10px;
}
.order-form-body {
    padding: 20px 20px 24px;
}
.order-form-footer {
    padding: 16px 20px 24px;
    border-top: 1px solid #e6e6e6;
    background: #fafafa;
    text-align: center;
}
.order-form-footer .btn {
    min-width: 120px;
}

/* 订单详情页 */
#order-detail-wrap {
    padding: 0 4px;
}
.order-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e6e6e6;
}
.order-detail-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}
.order-detail-actions {
    display: flex;
    gap: 10px;
}
.order-detail-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.order-detail-section {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.order-detail-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}
.order-detail-section-title .order-detail-total-qty {
    font-size: 13px;
    font-weight: 500;
    color: #009688;
    margin-left: 10px;
}
.order-detail-table .detail-label {
    width: 100px;
    padding: 10px 14px;
    background: #f8f9fa;
    font-weight: 500;
    color: #555;
    border: 1px solid #e6e6e6;
    font-size: 14px;
}
.order-detail-table td {
    padding: 10px 14px;
    border: 1px solid #e6e6e6;
    background: #fff;
    font-size: 14px;
}
/* 金额信息突出显示 */
.order-detail-amounts {
    background: linear-gradient(135deg, #f8fffe 0%, #f0f9f8 100%);
    border-color: #b2dfdb;
}
.order-detail-amount-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 8px;
}
.order-detail-amount-item {
    text-align: center;
    padding: 16px 12px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0f2f1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.order-detail-amount-item.order-detail-amount-actual {
    background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
    border-color: #009688;
    grid-column: span 1;
}
.order-detail-amount-label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}
.order-detail-amount-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #009688;
    letter-spacing: 0.02em;
}
.order-detail-amount-value.order-detail-amount-fee {
    font-size: 20px;
    color: #00796b;
}
.order-detail-amount-item.order-detail-amount-actual .order-detail-amount-value {
    font-size: 24px;
    color: #00695c;
}
/* 商品明细表格 */
.order-detail-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 4px;
    font-size: 14px;
}
.order-detail-items-table th,
.order-detail-items-table td {
    padding: 10px 14px;
    border: 1px solid #e6e6e6;
    text-align: left;
    background: #fff;
}
.order-detail-items-table thead th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}
.order-detail-items-table .col-spec {
    width: 100px;
    text-align: center;
}
.order-detail-items-table .col-qty {
    width: 100px;
    text-align: center;
}
.order-detail-items-table tfoot td {
    background: #f0f7f6;
    font-weight: 600;
    color: #00695c;
}
.order-detail-items-table .detail-summary-label {
    text-align: right;
    padding-right: 20px;
}
.order-detail-items-table .detail-summary-value {
    text-align: center;
    font-size: 16px;
}

/* 订单表单 - 收款方式多选 chips 布局 */
.order-payment-methods-table {
    margin: 0;
}
.order-payment-methods-table td {
    border: none;
    background: transparent;
    padding: 4px 0;
}
.order-products-table td {
    border: none;
    background: transparent;
    padding: 4px 0;
}
.order-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    margin: 0 8px 6px 0;
    background: #e0f2f1;
    border-radius: 14px;
    font-size: 13px;
    color: #00695c;
}
.order-chip-label {
    margin-right: 6px;
}
.order-chip-remove {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    color: #00897b;
    padding: 0 2px;
}
.order-chip-remove:hover {
    color: #d32f2f;
}

/* 分页 - Layui风格 */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding: 10px 0;
}

.pagination-info {
    color: #666;
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    gap: 5px;
    align-items: center;
}

.pagination-controls button {
    height: 32px;
    line-height: 32px;
    padding: 0 12px;
    border: 1px solid #e6e6e6;
    background: #fff;
    color: #666;
    cursor: pointer;
    border-radius: 2px;
    font-size: 14px;
    transition: all 0.3s;
}

.pagination-controls button:hover:not(:disabled) {
    background: #f8f8f8;
    border-color: #009688;
    color: #009688;
}

.pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f8f8;
}

.pagination-controls span {
    padding: 0 10px;
    color: #666;
    font-size: 14px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    height: 38px;
    line-height: 38px;
    padding: 0 15px;
    border: 1px solid #e6e6e6;
    border-radius: 2px;
    font-size: 14px;
    box-sizing: border-box;
    background: #fff;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #009688;
    outline: none;
}

.form-group textarea {
    height: auto;
    line-height: 1.5;
    padding: 10px 15px;
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

/* Layui模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 19891015;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    overflow: auto;
}

.modal-content {
    background: #fff;
    margin: 50px auto;
    padding: 0;
    border-radius: 2px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.modal-header {
    height: 42px;
    line-height: 42px;
    padding: 0 15px;
    border-bottom: 1px solid #f6f6f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f8f8;
}

.modal-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.close {
    font-size: 20px;
    font-weight: normal;
    color: #999;
    cursor: pointer;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 2px;
    transition: all 0.3s;
}

.close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 15px;
    max-height: calc(80vh - 150px);
    overflow-y: auto;
}

.modal-footer {
    min-height: 50px;
    padding: 15px;
    border-top: 1px solid #f6f6f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    background: #fafafa;
    flex-wrap: wrap;
}

/* 操作按钮组 */
.action-buttons {
    display: flex;
    gap: 5px;
}

.action-buttons button {
    height: 28px;
    line-height: 28px;
    padding: 0 12px;
    font-size: 12px;
}

/* 统计卡片 - Layui风格 */
.stats-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    margin-bottom: 15px;
    overflow-x: auto;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 2px;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.05);
    border-left: 4px solid #009688;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
}

.stat-card h4 {
    color: #999;
    font-size: 12px;
    margin-bottom: 10px;
    font-weight: normal;
}

.stat-card .value {
    font-size: 28px;
    font-weight: 600;
    color: #009688;
    line-height: 1;
}

/* 消息提示 - Layui风格 */
.message {
    padding: 12px 15px;
    border-radius: 2px;
    margin-bottom: 15px;
    font-size: 14px;
}

.message.success {
    background: #F0F9FF;
    color: #009688;
    border-left: 4px solid #009688;
}

.message.error {
    background: #FFF0F0;
    color: #FF5722;
    border-left: 4px solid #FF5722;
}

/* 工具条 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.05);
}

.toolbar-left {
    display: flex;
    gap: 10px;
    align-items: center;
    flex: 1;
}

.toolbar-right {
    display: flex;
    gap: 10px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

/* 分页组件 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.pagination-info {
    padding: 0 15px;
    color: #666;
    font-size: 14px;
}

.pagination-btn {
    min-width: 80px;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 响应式 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 200px;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .stats-grid {
        flex-wrap: wrap;
    }
    
    .stat-card {
        flex: 1 1 calc(50% - 7.5px);
        min-width: 150px;
    }
}

/* 滚动条样式 */
.sidebar::-webkit-scrollbar,
.content-area::-webkit-scrollbar,
.modal-body::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.sidebar::-webkit-scrollbar-track,
.content-area::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sidebar::-webkit-scrollbar-thumb,
.content-area::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.content-area::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 权限复选框样式 */
.permission-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.permission-item input[type="checkbox"] {
    width: auto;
    height: auto;
    margin: 0;
}

.permission-item label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}


