/* css/meituan-style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f5f5f5;
    color: #333;
}

/* 左右布局容器 */
.app-container {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* ========== 左侧导航 ========== */
.sidebar {
    width: 240px;
    background: #fff;
    box-shadow: 2px 0 8px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100vh;
    position: relative;
    z-index: 10;
}

.logo-area {
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.logo {
    font-size: 20px;
    font-weight: 600;
    color: #ff6a00;
}

.logo-sub {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.nav-menu {
    flex: 1;
    padding: 16px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: #fafafa;
    color: #ff6a00;
}

.nav-item.active {
    background: #fff7f0;
    color: #ff6a00;
    border-left-color: #ff6a00;
}

.nav-icon {
    width: 24px;
    margin-right: 12px;
    text-align: center;
    font-size: 18px;
}

/* ========== 右侧内容区 ========== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f5f5f5;
}

/* 顶部栏 */
.top-bar {
    background: #fff;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    flex-shrink: 0;
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-name {
    font-size: 14px;
    color: #666;
}

/* 内容滚动区 */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* 容器 */
.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* 卡片样式 */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-bottom: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

/* 统计卡片 - 大屏 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-title {
    font-size: 14px;
    color: #999;
    margin-bottom: 12px;
}

.stat-number {
    font-size: 32px;
    font-weight: 600;
    color: #ff6a00;
}

/* 表格样式 */
.table-wrapper {
    overflow-x: auto;
}

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

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

th {
    background: #fafafa;
    font-weight: 600;
    color: #666;
    font-size: 14px;
}

td {
    font-size: 14px;
    color: #333;
}

/* 按钮样式 */
.btn {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-block;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: #ff6a00;
    color: #fff;
}

.btn-primary:hover {
    background: #e55a00;
}

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

.btn-danger:hover {
    background: #e04345;
}

.btn-default {
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
}

.btn-default:hover {
    border-color: #ff6a00;
    color: #ff6a00;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

/* 徽章 */
.badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    display: inline-block;
}

.badge-success {
    background: #e6f7e6;
    color: #52c41a;
}

.badge-danger {
    background: #ffe6e6;
    color: #ff4d4f;
}

.badge-warning {
    background: #fff7e6;
    color: #faad14;
}

.badge-default {
    background: #f5f5f5;
    color: #999;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}

.pagination a, .pagination span {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #666;
    font-size: 13px;
    transition: all 0.2s;
}

.pagination a:hover {
    border-color: #ff6a00;
    color: #ff6a00;
}

.pagination .current {
    background: #ff6a00;
    border-color: #ff6a00;
    color: #fff;
}

/* 弹框遮罩 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 500px;
    max-width: 90%;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.modal-header {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-body {
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 表单 */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #666;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #ff6a00;
}

.form-group input:disabled {
    background: #f5f5f5;
    color: #999;
}

/* 搜索栏 */
.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.search-bar input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

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

.search-bar button {
    padding: 10px 24px;
}

/* 订单筛选按钮样式 */
.status-filter {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 16px;
    border-radius: 20px;
    background: #f5f5f5;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #ffe6d5;
    color: #ff6a00;
}

.filter-btn.active {
    background: #ff6a00;
    color: #fff;
}

.filter-btn .count {
    font-size: 12px;
    opacity: 0.8;
}

/* 详情弹框样式 */
.detail-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-label {
    width: 100px;
    color: #999;
    flex-shrink: 0;
}

.detail-value {
    flex: 1;
    color: #333;
    word-break: break-all;
}

/* 下拉选择框样式 */
.status-select {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
}

.status-select:focus {
    outline: none;
    border-color: #ff6a00;
}

/* 统计卡片5列布局 */
.stats-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 80px;
    }
    .logo-area {
        padding: 20px 12px;
    }
    .logo {
        font-size: 14px;
        text-align: center;
    }
    .logo-sub {
        display: none;
    }
    .nav-item {
        padding: 12px;
        justify-content: center;
    }
    .nav-icon {
        margin-right: 0;
    }
    .nav-item span:last-child {
        display: none;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .stats-grid-5 {
        grid-template-columns: 1fr;
    }
    th, td {
        padding: 8px;
        font-size: 12px;
    }
    .btn-sm {
        padding: 2px 8px;
        font-size: 10px;
    }
}