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

html, body {
    font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background: #f5f7fa;
    -webkit-tap-highlight-color: transparent;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 标题 */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #f5f7fa;
    border-bottom: 1px solid #e4e7ed;
}
.header .title {
    font-size: 16px;
    font-weight: 600;
    color: #303133;
}
.header .close {
    font-size: 22px;
    color: #909399;
    cursor: pointer;
    padding: 0 6px;
}

/* 汇总条 */
.summary {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    padding: 12px 16px;
    background: #fafbfc;
    border-bottom: 1px solid #ebeef5;
    font-size: 13px;
    color: #606266;
}
.summary .sum-item span {
    color: #303133;
    font-weight: 600;
    margin-left: 2px;
}
.summary .sum-item.red span {
    color: #f56c6c;
}

/* 查询表单 */
.filter {
    padding: 12px 16px;
    border-bottom: 1px solid #ebeef5;
    background: #fff;
}
.filter .row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
}
.filter .row:last-child {
    margin-bottom: 0;
}
.form-item {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 240px;
}
.form-item.double {
    flex: 2;
    min-width: 360px;
}
.form-item.btns {
    flex: 0 0 auto;
    min-width: auto;
    justify-content: flex-end;
}
.form-item label {
    color: #606266;
    white-space: nowrap;
    min-width: 64px;
    text-align: right;
}
.form-item input,
.form-item select {
    flex: 1;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 13px;
    color: #303133;
    outline: none;
    background: #fff;
}
.form-item input:focus,
.form-item select:focus {
    border-color: #409eff;
}
.date-range {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}
.date-range input {
    flex: 1;
    min-width: 0;
}
.date-range .sep {
    color: #909399;
}

/* 按钮 */
.btn {
    height: 32px;
    padding: 0 16px;
    border: 1px solid #dcdfe6;
    background: #fff;
    color: #606266;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
}
.btn:hover {
    color: #409eff;
    border-color: #c6e2ff;
    background: #ecf5ff;
}
.btn.primary {
    background: #409eff;
    border-color: #409eff;
    color: #fff;
}
.btn.primary:hover {
    background: #66b1ff;
    border-color: #66b1ff;
    color: #fff;
}

/* 表格 */
.table-wrap {
    flex: 1;
    overflow-x: auto;
    padding: 0 16px;
    margin-top: 12px;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 1400px;
}
.data-table th,
.data-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #ebeef5;
    white-space: nowrap;
}
.data-table thead th {
    background: #fafafa;
    color: #909399;
    font-weight: 500;
}
.data-table tbody tr:hover {
    background: #f5f7fa;
}
.data-table .empty {
    text-align: center;
    color: #c0c4cc;
    padding: 40px 0;
}
.tag-paid { color: #67c23a; }
.tag-pending { color: #409eff; }
.tag-overdue { color: #f56c6c; font-weight: 600; }
.platform { color: #f56c6c; }

/* 分页 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    color: #606266;
    font-size: 13px;
}
.pagination b {
    color: #303133;
    margin: 0 2px;
}

/* 底部 */
.footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid #ebeef5;
    background: #fff;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .summary {
        gap: 8px 14px;
        font-size: 12px;
    }
    .form-item {
        min-width: 100%;
    }
    .form-item.double {
        min-width: 100%;
    }
    .form-item label {
        min-width: 70px;
    }
    .form-item.btns {
        justify-content: stretch;
    }
    .form-item.btns .btn {
        flex: 1;
    }
    .table-wrap {
        padding: 0 8px;
    }
}


.date-picker-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

.date-picker-wrap input {
    width: 100%;
    cursor: pointer;
    background: #fff;
    padding-right: 24px;
}

.calendar-panel {
    display: none;
    position: absolute;
    top: 36px;
    left: 0;
    z-index: 9999;
    width: 260px;
    background: #fff;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
    padding: 8px;
    font-size: 13px;
}

.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0 8px;
}

.cal-prev,
.cal-next {
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    color: #606266;
    border-radius: 3px;
    text-decoration: none;
    user-select: none;
}

.cal-prev:hover,
.cal-next:hover {
    background: #ecf5ff;
    color: #409eff;
}

.cal-title {
    font-weight: 600;
    color: #303133;
}

.cal-weekdays {
    display: flex;
    border-bottom: 1px solid #ebeef5;
    padding-bottom: 4px;
    margin-bottom: 4px;
}

.cal-wd {
    flex: 1;
    text-align: center;
    color: #909399;
    font-size: 12px;
}

.cal-days {
    display: flex;
    flex-wrap: wrap;
}

.cal-day {
    width: 32px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    cursor: pointer;
    border-radius: 3px;
    color: #303133;
    text-decoration: none;
    user-select: none;
}

.cal-day:hover {
    background: #ecf5ff;
    color: #409eff;
}

.cal-day.active {
    background: #409eff;
    color: #fff;
}

.cal-day.empty {
    cursor: default;
}