* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #f5f7fa;
    color: #303133;
    font-size: 14px;
}

[v-cloak] {
    display: none;
}

/* ========== 布局 ========== */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 220px;
    background: #fff;
    border-right: 1px solid #e4e7ed;
    flex-shrink: 0;
}

.brand {
    font-size: 17px;
    font-weight: 600;
    padding: 20px;
    border-bottom: 1px solid #ebeef5;
    color: #409eff;
}

.nav {
    padding: 8px 0;
}

.nav-item {
    display: block;
    padding: 12px 20px;
    color: #303133;
    text-decoration: none;
    font-size: 14px;
    transition: all .15s;
    border-right: 3px solid transparent;
}

.nav-item:hover {
    background: #f5f7fa;
    color: #409eff;
}

.nav-item.active {
    background: #ecf5ff;
    color: #409eff;
    border-right-color: #409eff;
}

.main-content {
    flex: 1;
    padding: 20px;
    overflow-x: hidden;
    min-width: 0;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #303133;
}

/* ========== 统计卡片 ========== */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    border-radius: 4px;
    padding: 20px;
    border: 1px solid #ebeef5;
}

.stat-label {
    color: #909399;
    font-size: 13px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #303133;
}

/* ========== 工具栏 ========== */
.toolbar {
    background: #fff;
    padding: 16px;
    border-radius: 4px;
    border: 1px solid #ebeef5;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

/* ========== 内容卡片 ========== */
.content-card {
    background: #fff;
    border-radius: 4px;
    padding: 16px;
    border: 1px solid #ebeef5;
}

/* ========== 表格单元格不换行 ========== */
.el-table .cell {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== 移动端卡片（备用） ========== */
.mobile-card {
    background: #fff;
    border-radius: 4px;
    padding: 14px;
    margin-bottom: 10px;
    border: 1px solid #ebeef5;
}

.mobile-card-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
    line-height: 1.5;
}

.mobile-card-label {
    color: #909399;
    flex-shrink: 0;
}

.mobile-card-value {
    color: #303133;
    text-align: right;
    word-break: break-all;
    margin-left: 12px;
}

/* ========== 移动端适配 ========== */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e4e7ed;
    }
    .brand {
        padding: 12px 16px;
        font-size: 16px;
    }
    .nav {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        padding: 0;
        -webkit-overflow-scrolling: touch;
    }
    .nav-item {
        padding: 12px 16px;
        flex-shrink: 0;
        border-right: none;
        border-bottom: 3px solid transparent;
    }
    .nav-item.active {
        border-right: none;
        border-bottom-color: #409eff;
    }
    .main-content {
        padding: 12px;
    }
    .page-title {
        font-size: 17px;
        margin-bottom: 14px;
    }
    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .stat-card {
        padding: 14px;
    }
    .stat-value {
        font-size: 18px;
    }
    .toolbar {
        padding: 12px;
        gap: 8px;
    }
    .content-card {
        padding: 12px;
    }
}

/* ========== 筛选区 5 列网格 ========== */
.filter-grid-5 {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 12px !important;
    margin-bottom: 12px !important;
}

.filter-grid-5 > * {
    width: 100% !important;
    min-width: 0 !important;
}

/* 让 el-select / el-date-editor 撑满整格 */
.filter-grid-5 .el-select,
.filter-grid-5 .el-date-editor,
.filter-grid-5 .el-input {
    width: 100% !important;
}

/* 按钮组占一格，内部按钮不拉伸 */
.filter-grid-5 .btn-cell {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* 中等屏：3 列 */
@media (max-width: 1200px) {
    .filter-grid-5 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* 平板：2 列 */
@media (max-width: 768px) {
    .filter-grid-5 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
}

/* 手机：1 列 */
@media (max-width: 480px) {
    .filter-grid-5 {
        grid-template-columns: 1fr !important;
    }
}